diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/assets/browser.ef1932a4.js b/assets/browser.a42c4047.js similarity index 86% rename from assets/browser.ef1932a4.js rename to assets/browser.a42c4047.js index 84b92de..c08ee49 100644 --- a/assets/browser.ef1932a4.js +++ b/assets/browser.a42c4047.js @@ -1 +1 @@ -import{e as a}from"./index.c7b65400.js";function c(t,s){for(var o=0;oe[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=a.exports.EventSourcePolyfill;const l=c({__proto__:null,default:f},[f]);export{l as b}; +import{e as a}from"./index.6ea4e25b.js";function c(t,s){for(var o=0;oe[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=a.exports.EventSourcePolyfill;const l=c({__proto__:null,default:f},[f]);export{l as b}; diff --git a/assets/index.6ea4e25b.js b/assets/index.6ea4e25b.js new file mode 100644 index 0000000..9036e2a --- /dev/null +++ b/assets/index.6ea4e25b.js @@ -0,0 +1,2694 @@ +const oT=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};oT();function Vh(t,e){const n=Object.create(null),r=t.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const aT="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",cT=Vh(aT);function iv(t){return!!t||t===""}function ol(t){if(ue(t)){const e={};for(let n=0;n{if(n){const r=n.split(uT);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function _i(t){let e="";if(dt(t))e=t;else if(ue(t))for(let n=0;nal(n,e))}const Ke=t=>dt(t)?t:t==null?"":ue(t)||Ze(t)&&(t.toString===av||!ve(t.toString))?JSON.stringify(t,sv,2):String(t),sv=(t,e)=>e&&e.__v_isRef?sv(t,e.value):Ji(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:ll(e)?{[`Set(${e.size})`]:[...e.values()]}:Ze(e)&&!ue(e)&&!cv(e)?String(e):e,Fe={},Xi=[],Sn=()=>{},pT=()=>!1,mT=/^on[^a-z]/,cl=t=>mT.test(t),Fh=t=>t.startsWith("onUpdate:"),bt=Object.assign,$h=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},gT=Object.prototype.hasOwnProperty,Se=(t,e)=>gT.call(t,e),ue=Array.isArray,Ji=t=>Bo(t)==="[object Map]",ll=t=>Bo(t)==="[object Set]",tm=t=>Bo(t)==="[object Date]",ve=t=>typeof t=="function",dt=t=>typeof t=="string",ho=t=>typeof t=="symbol",Ze=t=>t!==null&&typeof t=="object",ov=t=>Ze(t)&&ve(t.then)&&ve(t.catch),av=Object.prototype.toString,Bo=t=>av.call(t),yT=t=>Bo(t).slice(8,-1),cv=t=>Bo(t)==="[object Object]",Lh=t=>dt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Fa=Vh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ul=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},vT=/-(\w)/g,Bn=ul(t=>t.replace(vT,(e,n)=>n?n.toUpperCase():"")),_T=/\B([A-Z])/g,Si=ul(t=>t.replace(_T,"-$1").toLowerCase()),fl=ul(t=>t.charAt(0).toUpperCase()+t.slice(1)),Au=ul(t=>t?`on${fl(t)}`:""),fc=(t,e)=>!Object.is(t,e),$a=(t,e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},po=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let nm;const bT=()=>nm||(nm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let On;class wT{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&On&&(this.parent=On,this.index=(On.scopes||(On.scopes=[])).push(this)-1)}run(e){if(this.active){const n=On;try{return On=this,e()}finally{On=n}}}on(){On=this}off(){On=this.parent}stop(e){if(this.active){let n,r;for(n=0,r=this.effects.length;n{const e=new Set(t);return e.w=0,e.n=0,e},lv=t=>(t.w&Mr)>0,uv=t=>(t.n&Mr)>0,TT=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r{(l==="length"||l>=r)&&a.push(c)});else switch(n!==void 0&&a.push(o.get(n)),e){case"add":ue(t)?Lh(n)&&a.push(o.get("length")):(a.push(o.get(gi)),Ji(t)&&a.push(o.get(yf)));break;case"delete":ue(t)||(a.push(o.get(gi)),Ji(t)&&a.push(o.get(yf)));break;case"set":Ji(t)&&a.push(o.get(gi));break}if(a.length===1)a[0]&&vf(a[0]);else{const c=[];for(const l of a)l&&c.push(...l);vf(jh(c))}}function vf(t,e){const n=ue(t)?t:[...t];for(const r of n)r.computed&&im(r);for(const r of n)r.computed||im(r)}function im(t,e){(t!==En||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const AT=Vh("__proto__,__v_isRef,__isVue"),dv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ho)),CT=Bh(),ST=Bh(!1,!0),xT=Bh(!0),sm=PT();function PT(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=ke(this);for(let s=0,o=this.length;s{t[e]=function(...n){gs();const r=ke(this)[e].apply(this,n);return ys(),r}}),t}function Bh(t=!1,e=!1){return function(r,i,s){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&s===(t?e?zT:vv:e?yv:gv).get(r))return r;const o=ue(r);if(!t&&o&&Se(sm,i))return Reflect.get(sm,i,s);const a=Reflect.get(r,i,s);return(ho(i)?dv.has(i):AT(i))||(t||rn(r,"get",i),e)?a:Wt(a)?o&&Lh(i)?a:a.value:Ze(a)?t?_v(a):dl(a):a}}const RT=pv(),OT=pv(!0);function pv(t=!1){return function(n,r,i,s){let o=n[r];if(mo(o)&&Wt(o)&&!Wt(i))return!1;if(!t&&!mo(i)&&(_f(i)||(i=ke(i),o=ke(o)),!ue(n)&&Wt(o)&&!Wt(i)))return o.value=i,!0;const a=ue(n)&&Lh(r)?Number(r)t,hl=t=>Reflect.getPrototypeOf(t);function ya(t,e,n=!1,r=!1){t=t.__v_raw;const i=ke(t),s=ke(e);n||(e!==s&&rn(i,"get",e),rn(i,"get",s));const{has:o}=hl(i),a=r?qh:n?Kh:Wh;if(o.call(i,e))return a(t.get(e));if(o.call(i,s))return a(t.get(s));t!==i&&t.get(e)}function va(t,e=!1){const n=this.__v_raw,r=ke(n),i=ke(t);return e||(t!==i&&rn(r,"has",t),rn(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function _a(t,e=!1){return t=t.__v_raw,!e&&rn(ke(t),"iterate",gi),Reflect.get(t,"size",t)}function om(t){t=ke(t);const e=ke(this);return hl(e).has.call(e,t)||(e.add(t),Zn(e,"add",t,t)),this}function am(t,e){e=ke(e);const n=ke(this),{has:r,get:i}=hl(n);let s=r.call(n,t);s||(t=ke(t),s=r.call(n,t));const o=i.call(n,t);return n.set(t,e),s?fc(e,o)&&Zn(n,"set",t,e):Zn(n,"add",t,e),this}function cm(t){const e=ke(this),{has:n,get:r}=hl(e);let i=n.call(e,t);i||(t=ke(t),i=n.call(e,t)),r&&r.call(e,t);const s=e.delete(t);return i&&Zn(e,"delete",t,void 0),s}function lm(){const t=ke(this),e=t.size!==0,n=t.clear();return e&&Zn(t,"clear",void 0,void 0),n}function ba(t,e){return function(r,i){const s=this,o=s.__v_raw,a=ke(o),c=e?qh:t?Kh:Wh;return!t&&rn(a,"iterate",gi),o.forEach((l,u)=>r.call(i,c(l),c(u),s))}}function wa(t,e,n){return function(...r){const i=this.__v_raw,s=ke(i),o=Ji(s),a=t==="entries"||t===Symbol.iterator&&o,c=t==="keys"&&o,l=i[t](...r),u=n?qh:e?Kh:Wh;return!e&&rn(s,"iterate",c?yf:gi),{next(){const{value:f,done:h}=l.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function pr(t){return function(...e){return t==="delete"?!1:this}}function FT(){const t={get(s){return ya(this,s)},get size(){return _a(this)},has:va,add:om,set:am,delete:cm,clear:lm,forEach:ba(!1,!1)},e={get(s){return ya(this,s,!1,!0)},get size(){return _a(this)},has:va,add:om,set:am,delete:cm,clear:lm,forEach:ba(!1,!0)},n={get(s){return ya(this,s,!0)},get size(){return _a(this,!0)},has(s){return va.call(this,s,!0)},add:pr("add"),set:pr("set"),delete:pr("delete"),clear:pr("clear"),forEach:ba(!0,!1)},r={get(s){return ya(this,s,!0,!0)},get size(){return _a(this,!0)},has(s){return va.call(this,s,!0)},add:pr("add"),set:pr("set"),delete:pr("delete"),clear:pr("clear"),forEach:ba(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=wa(s,!1,!1),n[s]=wa(s,!0,!1),e[s]=wa(s,!1,!0),r[s]=wa(s,!0,!0)}),[t,n,e,r]}const[$T,LT,jT,UT]=FT();function Hh(t,e){const n=e?t?UT:jT:t?LT:$T;return(r,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?r:Reflect.get(Se(n,i)&&i in r?n:r,i,s)}const BT={get:Hh(!1,!1)},qT={get:Hh(!1,!0)},HT={get:Hh(!0,!1)},gv=new WeakMap,yv=new WeakMap,vv=new WeakMap,zT=new WeakMap;function WT(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function KT(t){return t.__v_skip||!Object.isExtensible(t)?0:WT(yT(t))}function dl(t){return mo(t)?t:zh(t,!1,mv,BT,gv)}function GT(t){return zh(t,!1,VT,qT,yv)}function _v(t){return zh(t,!0,MT,HT,vv)}function zh(t,e,n,r,i){if(!Ze(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=i.get(t);if(s)return s;const o=KT(t);if(o===0)return t;const a=new Proxy(t,o===2?r:n);return i.set(t,a),a}function Zi(t){return mo(t)?Zi(t.__v_raw):!!(t&&t.__v_isReactive)}function mo(t){return!!(t&&t.__v_isReadonly)}function _f(t){return!!(t&&t.__v_isShallow)}function bv(t){return Zi(t)||mo(t)}function ke(t){const e=t&&t.__v_raw;return e?ke(e):t}function wv(t){return hc(t,"__v_skip",!0),t}const Wh=t=>Ze(t)?dl(t):t,Kh=t=>Ze(t)?_v(t):t;function YT(t){xr&&En&&(t=ke(t),hv(t.dep||(t.dep=jh())))}function QT(t,e){t=ke(t),t.dep&&vf(t.dep)}function Wt(t){return!!(t&&t.__v_isRef===!0)}function XT(t){return Wt(t)?t.value:t}const JT={get:(t,e,n)=>XT(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const i=t[e];return Wt(i)&&!Wt(n)?(i.value=n,!0):Reflect.set(t,e,n,r)}};function Ev(t){return Zi(t)?t:new Proxy(t,JT)}class ZT{constructor(e,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new Uh(e,()=>{this._dirty||(this._dirty=!0,QT(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const e=ke(this);return YT(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function eI(t,e,n=!1){let r,i;const s=ve(t);return s?(r=t,i=Sn):(r=t.get,i=t.set),new ZT(r,i,s||!i,n)}function Pr(t,e,n,r){let i;try{i=r?t(...r):t()}catch(s){pl(s,e,n)}return i}function pn(t,e,n,r){if(ve(t)){const s=Pr(t,e,n,r);return s&&ov(s)&&s.catch(o=>{pl(o,e,n)}),s}const i=[];for(let s=0;s>>1;go(tn[r])Yn&&tn.splice(e,1)}function Cv(t,e,n,r){ue(t)?n.push(...t):(!e||!e.includes(t,t.allowRecurse?r+1:r))&&n.push(t),Av()}function sI(t){Cv(t,Fs,Ys,Li)}function oI(t){Cv(t,vr,Qs,ji)}function ml(t,e=null){if(Ys.length){for(wf=e,Fs=[...new Set(Ys)],Ys.length=0,Li=0;Ligo(n)-go(r)),ji=0;jit.id==null?1/0:t.id;function xv(t){bf=!1,dc=!0,ml(t),tn.sort((n,r)=>go(n)-go(r));const e=Sn;try{for(Yn=0;Yng.trim())),f&&(i=n.map(po))}let a,c=r[a=Au(e)]||r[a=Au(Bn(e))];!c&&s&&(c=r[a=Au(Si(e))]),c&&pn(c,t,6,i);const l=r[a+"Once"];if(l){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,pn(l,t,6,i)}}function Pv(t,e,n=!1){const r=e.emitsCache,i=r.get(t);if(i!==void 0)return i;const s=t.emits;let o={},a=!1;if(!ve(t)){const c=l=>{const u=Pv(l,e,!0);u&&(a=!0,bt(o,u))};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}return!s&&!a?(r.set(t,null),null):(ue(s)?s.forEach(c=>o[c]=null):bt(o,s),r.set(t,o),o)}function gl(t,e){return!t||!cl(e)?!1:(e=e.slice(2).replace(/Once$/,""),Se(t,e[0].toLowerCase()+e.slice(1))||Se(t,Si(e))||Se(t,e))}let Vt=null,yl=null;function pc(t){const e=Vt;return Vt=t,yl=t&&t.type.__scopeId||null,e}function ar(t){yl=t}function cr(){yl=null}function Rr(t,e=Vt,n){if(!e||t._n)return t;const r=(...i)=>{r._d&&bm(-1);const s=pc(e),o=t(...i);return pc(s),r._d&&bm(1),o};return r._n=!0,r._c=!0,r._d=!0,r}function Cu(t){const{type:e,vnode:n,proxy:r,withProxy:i,props:s,propsOptions:[o],slots:a,attrs:c,emit:l,render:u,renderCache:f,data:h,setupState:g,ctx:S,inheritAttrs:T}=t;let I,b;const R=pc(t);try{if(n.shapeFlag&4){const F=i||r;I=kn(u.call(F,F,f,s,g,h,S)),b=c}else{const F=e;I=kn(F.length>1?F(s,{attrs:c,slots:a,emit:l}):F(s,null)),b=e.props?c:cI(c)}}catch(F){Js.length=0,pl(F,t,1),I=ge(mn)}let $=I;if(b&&T!==!1){const F=Object.keys(b),{shapeFlag:W}=$;F.length&&W&7&&(o&&F.some(Fh)&&(b=lI(b,o)),$=Vr($,b))}return n.dirs&&($=Vr($),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition&&($.transition=n.transition),I=$,pc(R),I}const cI=t=>{let e;for(const n in t)(n==="class"||n==="style"||cl(n))&&((e||(e={}))[n]=t[n]);return e},lI=(t,e)=>{const n={};for(const r in t)(!Fh(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function uI(t,e,n){const{props:r,children:i,component:s}=t,{props:o,children:a,patchFlag:c}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?um(r,o,l):!!o;if(c&8){const u=e.dynamicProps;for(let f=0;ft.__isSuspense;function dI(t,e){e&&e.pendingBranch?ue(t)?e.effects.push(...t):e.effects.push(t):oI(t)}function $s(t,e){if(_t){let n=_t.provides;const r=_t.parent&&_t.parent.provides;r===n&&(n=_t.provides=Object.create(r)),n[t]=e}}function Su(t,e,n=!1){const r=_t||Vt;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&t in i)return i[t];if(arguments.length>1)return n&&ve(e)?e.call(r.proxy):e}}const fm={};function La(t,e,n){return Rv(t,e,n)}function Rv(t,e,{immediate:n,deep:r,flush:i,onTrack:s,onTrigger:o}=Fe){const a=_t;let c,l=!1,u=!1;if(Wt(t)?(c=()=>t.value,l=_f(t)):Zi(t)?(c=()=>t,r=!0):ue(t)?(u=!0,l=t.some(b=>Zi(b)||_f(b)),c=()=>t.map(b=>{if(Wt(b))return b.value;if(Zi(b))return fi(b);if(ve(b))return Pr(b,a,2)})):ve(t)?e?c=()=>Pr(t,a,2):c=()=>{if(!(a&&a.isUnmounted))return f&&f(),pn(t,a,3,[h])}:c=Sn,e&&r){const b=c;c=()=>fi(b())}let f,h=b=>{f=I.onStop=()=>{Pr(b,a,4)}};if(bo)return h=Sn,e?n&&pn(e,a,3,[c(),u?[]:void 0,h]):c(),Sn;let g=u?[]:fm;const S=()=>{if(!!I.active)if(e){const b=I.run();(r||l||(u?b.some((R,$)=>fc(R,g[$])):fc(b,g)))&&(f&&f(),pn(e,a,3,[b,g===fm?void 0:g,h]),g=b)}else I.run()};S.allowRecurse=!!e;let T;i==="sync"?T=S:i==="post"?T=()=>Xt(S,a&&a.suspense):T=()=>sI(S);const I=new Uh(c,T);return e?n?S():g=I.run():i==="post"?Xt(I.run.bind(I),a&&a.suspense):I.run(),()=>{I.stop(),a&&a.scope&&$h(a.scope.effects,I)}}function pI(t,e,n){const r=this.proxy,i=dt(t)?t.includes(".")?Ov(r,t):()=>r[t]:t.bind(r,r);let s;ve(e)?s=e:(s=e.handler,n=e);const o=_t;as(this);const a=Rv(i,s.bind(r),n);return o?as(o):yi(),a}function Ov(t,e){const n=e.split(".");return()=>{let r=t;for(let i=0;i{fi(n,e)});else if(cv(t))for(const n in t)fi(t[n],e);return t}function kv(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vv(()=>{t.isMounted=!0}),$v(()=>{t.isUnmounting=!0}),t}const ln=[Function,Array],mI={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ln,onEnter:ln,onAfterEnter:ln,onEnterCancelled:ln,onBeforeLeave:ln,onLeave:ln,onAfterLeave:ln,onLeaveCancelled:ln,onBeforeAppear:ln,onAppear:ln,onAfterAppear:ln,onAppearCancelled:ln},setup(t,{slots:e}){const n=td(),r=kv();let i;return()=>{const s=e.default&&Yh(e.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const T of s)if(T.type!==mn){o=T;break}}const a=ke(t),{mode:c}=a;if(r.isLeaving)return xu(o);const l=hm(o);if(!l)return xu(o);const u=yo(l,a,r,n);vo(l,u);const f=n.subTree,h=f&&hm(f);let g=!1;const{getTransitionKey:S}=l.type;if(S){const T=S();i===void 0?i=T:T!==i&&(i=T,g=!0)}if(h&&h.type!==mn&&(!ci(l,h)||g)){const T=yo(h,a,r,n);if(vo(h,T),c==="out-in")return r.isLeaving=!0,T.afterLeave=()=>{r.isLeaving=!1,n.update()},xu(o);c==="in-out"&&l.type!==mn&&(T.delayLeave=(I,b,R)=>{const $=Nv(r,h);$[String(h.key)]=h,I._leaveCb=()=>{b(),I._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=R})}return o}}},Dv=mI;function Nv(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function yo(t,e,n,r){const{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:f,onLeave:h,onAfterLeave:g,onLeaveCancelled:S,onBeforeAppear:T,onAppear:I,onAfterAppear:b,onAppearCancelled:R}=e,$=String(t.key),F=Nv(n,t),W=(ee,X)=>{ee&&pn(ee,r,9,X)},fe=(ee,X)=>{const ie=X[1];W(ee,X),ue(ee)?ee.every(O=>O.length<=1)&&ie():ee.length<=1&&ie()},_e={mode:s,persisted:o,beforeEnter(ee){let X=a;if(!n.isMounted)if(i)X=T||a;else return;ee._leaveCb&&ee._leaveCb(!0);const ie=F[$];ie&&ci(t,ie)&&ie.el._leaveCb&&ie.el._leaveCb(),W(X,[ee])},enter(ee){let X=c,ie=l,O=u;if(!n.isMounted)if(i)X=I||c,ie=b||l,O=R||u;else return;let w=!1;const M=ee._enterCb=P=>{w||(w=!0,P?W(O,[ee]):W(ie,[ee]),_e.delayedLeave&&_e.delayedLeave(),ee._enterCb=void 0)};X?fe(X,[ee,M]):M()},leave(ee,X){const ie=String(t.key);if(ee._enterCb&&ee._enterCb(!0),n.isUnmounting)return X();W(f,[ee]);let O=!1;const w=ee._leaveCb=M=>{O||(O=!0,X(),M?W(S,[ee]):W(g,[ee]),ee._leaveCb=void 0,F[ie]===t&&delete F[ie])};F[ie]=t,h?fe(h,[ee,w]):w()},clone(ee){return yo(ee,e,n,r)}};return _e}function xu(t){if(_l(t))return t=Vr(t),t.children=null,t}function hm(t){return _l(t)?t.children?t.children[0]:void 0:t}function vo(t,e){t.shapeFlag&6&&t.component?vo(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Yh(t,e=!1,n){let r=[],i=0;for(let s=0;s1)for(let s=0;s!!t.type.__asyncLoader,_l=t=>t.type.__isKeepAlive;function gI(t,e){Mv(t,"a",e)}function yI(t,e){Mv(t,"da",e)}function Mv(t,e,n=_t){const r=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(bl(e,r,n),n){let i=n.parent;for(;i&&i.parent;)_l(i.parent.vnode)&&vI(r,e,n,i),i=i.parent}}function vI(t,e,n,r){const i=bl(e,t,r,!0);Lv(()=>{$h(r[e],i)},n)}function bl(t,e,n=_t,r=!1){if(n){const i=n[t]||(n[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(n.isUnmounted)return;gs(),as(n);const a=pn(e,n,t,o);return yi(),ys(),a});return r?i.unshift(s):i.push(s),s}}const lr=t=>(e,n=_t)=>(!bo||t==="sp")&&bl(t,e,n),_I=lr("bm"),Vv=lr("m"),bI=lr("bu"),Fv=lr("u"),$v=lr("bum"),Lv=lr("um"),wI=lr("sp"),EI=lr("rtg"),TI=lr("rtc");function II(t,e=_t){bl("ec",t,e)}function Jt(t,e){const n=Vt;if(n===null)return t;const r=Tl(n)||n.proxy,i=t.dirs||(t.dirs=[]);for(let s=0;se(o,a,void 0,s&&s[a]));else{const o=Object.keys(t);i=new Array(o.length);for(let a=0,c=o.length;ayc(e)?!(e.type===mn||e.type===$e&&!qv(e.children)):!0)?t:null}const Ef=t=>t?t_(t)?Tl(t)||t.proxy:Ef(t.parent):null,mc=bt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ef(t.parent),$root:t=>Ef(t.root),$emit:t=>t.emit,$options:t=>zv(t),$forceUpdate:t=>t.f||(t.f=()=>Iv(t.update)),$nextTick:t=>t.n||(t.n=nI.bind(t.proxy)),$watch:t=>pI.bind(t)}),CI={get({_:t},e){const{ctx:n,setupState:r,data:i,props:s,accessCache:o,type:a,appContext:c}=t;let l;if(e[0]!=="$"){const g=o[e];if(g!==void 0)switch(g){case 1:return r[e];case 2:return i[e];case 4:return n[e];case 3:return s[e]}else{if(r!==Fe&&Se(r,e))return o[e]=1,r[e];if(i!==Fe&&Se(i,e))return o[e]=2,i[e];if((l=t.propsOptions[0])&&Se(l,e))return o[e]=3,s[e];if(n!==Fe&&Se(n,e))return o[e]=4,n[e];Tf&&(o[e]=0)}}const u=mc[e];let f,h;if(u)return e==="$attrs"&&rn(t,"get",e),u(t);if((f=a.__cssModules)&&(f=f[e]))return f;if(n!==Fe&&Se(n,e))return o[e]=4,n[e];if(h=c.config.globalProperties,Se(h,e))return h[e]},set({_:t},e,n){const{data:r,setupState:i,ctx:s}=t;return i!==Fe&&Se(i,e)?(i[e]=n,!0):r!==Fe&&Se(r,e)?(r[e]=n,!0):Se(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:i,propsOptions:s}},o){let a;return!!n[o]||t!==Fe&&Se(t,o)||e!==Fe&&Se(e,o)||(a=s[0])&&Se(a,o)||Se(r,o)||Se(mc,o)||Se(i.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Se(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};let Tf=!0;function SI(t){const e=zv(t),n=t.proxy,r=t.ctx;Tf=!1,e.beforeCreate&&pm(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:o,watch:a,provide:c,inject:l,created:u,beforeMount:f,mounted:h,beforeUpdate:g,updated:S,activated:T,deactivated:I,beforeDestroy:b,beforeUnmount:R,destroyed:$,unmounted:F,render:W,renderTracked:fe,renderTriggered:_e,errorCaptured:ee,serverPrefetch:X,expose:ie,inheritAttrs:O,components:w,directives:M,filters:P}=e;if(l&&xI(l,r,null,t.appContext.config.unwrapInjectedRef),o)for(const te in o){const ae=o[te];ve(ae)&&(r[te]=ae.bind(n))}if(i){const te=i.call(n,n);Ze(te)&&(t.data=dl(te))}if(Tf=!0,s)for(const te in s){const ae=s[te],De=ve(ae)?ae.bind(n,n):ve(ae.get)?ae.get.bind(n,n):Sn,Ye=!ve(ae)&&ve(ae.set)?ae.set.bind(n):Sn,Re=fn({get:De,set:Ye});Object.defineProperty(r,te,{enumerable:!0,configurable:!0,get:()=>Re.value,set:Je=>Re.value=Je})}if(a)for(const te in a)Hv(a[te],r,n,te);if(c){const te=ve(c)?c.call(n):c;Reflect.ownKeys(te).forEach(ae=>{$s(ae,te[ae])})}u&&pm(u,t,"c");function G(te,ae){ue(ae)?ae.forEach(De=>te(De.bind(n))):ae&&te(ae.bind(n))}if(G(_I,f),G(Vv,h),G(bI,g),G(Fv,S),G(gI,T),G(yI,I),G(II,ee),G(TI,fe),G(EI,_e),G($v,R),G(Lv,F),G(wI,X),ue(ie))if(ie.length){const te=t.exposed||(t.exposed={});ie.forEach(ae=>{Object.defineProperty(te,ae,{get:()=>n[ae],set:De=>n[ae]=De})})}else t.exposed||(t.exposed={});W&&t.render===Sn&&(t.render=W),O!=null&&(t.inheritAttrs=O),w&&(t.components=w),M&&(t.directives=M)}function xI(t,e,n=Sn,r=!1){ue(t)&&(t=If(t));for(const i in t){const s=t[i];let o;Ze(s)?"default"in s?o=Su(s.from||i,s.default,!0):o=Su(s.from||i):o=Su(s),Wt(o)&&r?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):e[i]=o}}function pm(t,e,n){pn(ue(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function Hv(t,e,n,r){const i=r.includes(".")?Ov(n,r):()=>n[r];if(dt(t)){const s=e[t];ve(s)&&La(i,s)}else if(ve(t))La(i,t.bind(n));else if(Ze(t))if(ue(t))t.forEach(s=>Hv(s,e,n,r));else{const s=ve(t.handler)?t.handler.bind(n):e[t.handler];ve(s)&&La(i,s,t)}}function zv(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,a=s.get(e);let c;return a?c=a:!i.length&&!n&&!r?c=e:(c={},i.length&&i.forEach(l=>gc(c,l,o,!0)),gc(c,e,o)),s.set(e,c),c}function gc(t,e,n,r=!1){const{mixins:i,extends:s}=e;s&&gc(t,s,n,!0),i&&i.forEach(o=>gc(t,o,n,!0));for(const o in e)if(!(r&&o==="expose")){const a=PI[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const PI={data:mm,props:Jr,emits:Jr,methods:Jr,computed:Jr,beforeCreate:zt,created:zt,beforeMount:zt,mounted:zt,beforeUpdate:zt,updated:zt,beforeDestroy:zt,beforeUnmount:zt,destroyed:zt,unmounted:zt,activated:zt,deactivated:zt,errorCaptured:zt,serverPrefetch:zt,components:Jr,directives:Jr,watch:OI,provide:mm,inject:RI};function mm(t,e){return e?t?function(){return bt(ve(t)?t.call(this,this):t,ve(e)?e.call(this,this):e)}:e:t}function RI(t,e){return Jr(If(t),If(e))}function If(t){if(ue(t)){const e={};for(let n=0;n0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,g]=Kv(f,e,!0);bt(o,h),g&&a.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!c)return r.set(t,Xi),Xi;if(ue(s))for(let u=0;u-1,g[1]=T<0||S-1||Se(g,"default"))&&a.push(f)}}}const l=[o,a];return r.set(t,l),l}function gm(t){return t[0]!=="$"}function ym(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:t===null?"null":""}function vm(t,e){return ym(t)===ym(e)}function _m(t,e){return ue(e)?e.findIndex(n=>vm(n,t)):ve(e)&&vm(e,t)?0:-1}const Gv=t=>t[0]==="_"||t==="$stable",Xh=t=>ue(t)?t.map(kn):[kn(t)],NI=(t,e,n)=>{if(e._n)return e;const r=Rr((...i)=>Xh(e(...i)),n);return r._c=!1,r},Yv=(t,e,n)=>{const r=t._ctx;for(const i in t){if(Gv(i))continue;const s=t[i];if(ve(s))e[i]=NI(i,s,r);else if(s!=null){const o=Xh(s);e[i]=()=>o}}},Qv=(t,e)=>{const n=Xh(e);t.slots.default=()=>n},MI=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=ke(e),hc(e,"_",n)):Yv(e,t.slots={})}else t.slots={},e&&Qv(t,e);hc(t.slots,El,1)},VI=(t,e,n)=>{const{vnode:r,slots:i}=t;let s=!0,o=Fe;if(r.shapeFlag&32){const a=e._;a?n&&a===1?s=!1:(bt(i,e),!n&&a===1&&delete i._):(s=!e.$stable,Yv(e,i)),o=e}else e&&(Qv(t,e),o={default:1});if(s)for(const a in i)!Gv(a)&&!(a in o)&&delete i[a]};function Xv(){return{app:null,config:{isNativeTag:pT,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let FI=0;function $I(t,e){return function(r,i=null){ve(r)||(r=Object.assign({},r)),i!=null&&!Ze(i)&&(i=null);const s=Xv(),o=new Set;let a=!1;const c=s.app={_uid:FI++,_component:r,_props:i,_container:null,_context:s,_instance:null,version:nA,get config(){return s.config},set config(l){},use(l,...u){return o.has(l)||(l&&ve(l.install)?(o.add(l),l.install(c,...u)):ve(l)&&(o.add(l),l(c,...u))),c},mixin(l){return s.mixins.includes(l)||s.mixins.push(l),c},component(l,u){return u?(s.components[l]=u,c):s.components[l]},directive(l,u){return u?(s.directives[l]=u,c):s.directives[l]},mount(l,u,f){if(!a){const h=ge(r,i);return h.appContext=s,u&&e?e(h,l):t(h,l,f),a=!0,c._container=l,l.__vue_app__=c,Tl(h.component)||h.component.proxy}},unmount(){a&&(t(null,c._container),delete c._container.__vue_app__)},provide(l,u){return s.provides[l]=u,c}};return c}}function Cf(t,e,n,r,i=!1){if(ue(t)){t.forEach((h,g)=>Cf(h,e&&(ue(e)?e[g]:e),n,r,i));return}if(Xs(r)&&!i)return;const s=r.shapeFlag&4?Tl(r.component)||r.component.proxy:r.el,o=i?null:s,{i:a,r:c}=t,l=e&&e.r,u=a.refs===Fe?a.refs={}:a.refs,f=a.setupState;if(l!=null&&l!==c&&(dt(l)?(u[l]=null,Se(f,l)&&(f[l]=null)):Wt(l)&&(l.value=null)),ve(c))Pr(c,a,12,[o,u]);else{const h=dt(c),g=Wt(c);if(h||g){const S=()=>{if(t.f){const T=h?u[c]:c.value;i?ue(T)&&$h(T,s):ue(T)?T.includes(s)||T.push(s):h?(u[c]=[s],Se(f,c)&&(f[c]=u[c])):(c.value=[s],t.k&&(u[t.k]=c.value))}else h?(u[c]=o,Se(f,c)&&(f[c]=o)):g&&(c.value=o,t.k&&(u[t.k]=o))};o?(S.id=-1,Xt(S,n)):S()}}}const Xt=dI;function LI(t){return jI(t)}function jI(t,e){const n=bT();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:o,createText:a,createComment:c,setText:l,setElementText:u,parentNode:f,nextSibling:h,setScopeId:g=Sn,cloneNode:S,insertStaticContent:T}=t,I=(m,_,V,y=null,E=null,C=null,A=!1,N=null,D=!!_.dynamicChildren)=>{if(m===_)return;m&&!ci(m,_)&&(y=Rt(m),de(m,E,C,!0),m=null),_.patchFlag===-2&&(D=!1,_.dynamicChildren=null);const{type:k,ref:B,shapeFlag:L}=_;switch(k){case Jh:b(m,_,V,y);break;case mn:R(m,_,V,y);break;case ja:m==null&&$(_,V,y,A);break;case $e:M(m,_,V,y,E,C,A,N,D);break;default:L&1?fe(m,_,V,y,E,C,A,N,D):L&6?P(m,_,V,y,E,C,A,N,D):(L&64||L&128)&&k.process(m,_,V,y,E,C,A,N,D,It)}B!=null&&E&&Cf(B,m&&m.ref,C,_||m,!_)},b=(m,_,V,y)=>{if(m==null)r(_.el=a(_.children),V,y);else{const E=_.el=m.el;_.children!==m.children&&l(E,_.children)}},R=(m,_,V,y)=>{m==null?r(_.el=c(_.children||""),V,y):_.el=m.el},$=(m,_,V,y)=>{[m.el,m.anchor]=T(m.children,_,V,y,m.el,m.anchor)},F=({el:m,anchor:_},V,y)=>{let E;for(;m&&m!==_;)E=h(m),r(m,V,y),m=E;r(_,V,y)},W=({el:m,anchor:_})=>{let V;for(;m&&m!==_;)V=h(m),i(m),m=V;i(_)},fe=(m,_,V,y,E,C,A,N,D)=>{A=A||_.type==="svg",m==null?_e(_,V,y,E,C,A,N,D):ie(m,_,E,C,A,N,D)},_e=(m,_,V,y,E,C,A,N)=>{let D,k;const{type:B,props:L,shapeFlag:q,transition:K,patchFlag:H,dirs:re}=m;if(m.el&&S!==void 0&&H===-1)D=m.el=S(m.el);else{if(D=m.el=o(m.type,C,L&&L.is,L),q&8?u(D,m.children):q&16&&X(m.children,D,null,y,E,C&&B!=="foreignObject",A,N),re&&Gr(m,null,y,"created"),L){for(const Ie in L)Ie!=="value"&&!Fa(Ie)&&s(D,Ie,null,L[Ie],C,m.children,y,E,Pt);"value"in L&&s(D,"value",null,L.value),(k=L.onVnodeBeforeMount)&&Rn(k,y,m)}ee(D,m,m.scopeId,A,y)}re&&Gr(m,null,y,"beforeMount");const be=(!E||E&&!E.pendingBranch)&&K&&!K.persisted;be&&K.beforeEnter(D),r(D,_,V),((k=L&&L.onVnodeMounted)||be||re)&&Xt(()=>{k&&Rn(k,y,m),be&&K.enter(D),re&&Gr(m,null,y,"mounted")},E)},ee=(m,_,V,y,E)=>{if(V&&g(m,V),y)for(let C=0;C{for(let k=D;k{const N=_.el=m.el;let{patchFlag:D,dynamicChildren:k,dirs:B}=_;D|=m.patchFlag&16;const L=m.props||Fe,q=_.props||Fe;let K;V&&Yr(V,!1),(K=q.onVnodeBeforeUpdate)&&Rn(K,V,_,m),B&&Gr(_,m,V,"beforeUpdate"),V&&Yr(V,!0);const H=E&&_.type!=="foreignObject";if(k?O(m.dynamicChildren,k,N,V,y,H,C):A||De(m,_,N,null,V,y,H,C,!1),D>0){if(D&16)w(N,_,L,q,V,y,E);else if(D&2&&L.class!==q.class&&s(N,"class",null,q.class,E),D&4&&s(N,"style",L.style,q.style,E),D&8){const re=_.dynamicProps;for(let be=0;be{K&&Rn(K,V,_,m),B&&Gr(_,m,V,"updated")},y)},O=(m,_,V,y,E,C,A)=>{for(let N=0;N<_.length;N++){const D=m[N],k=_[N],B=D.el&&(D.type===$e||!ci(D,k)||D.shapeFlag&70)?f(D.el):V;I(D,k,B,null,y,E,C,A,!0)}},w=(m,_,V,y,E,C,A)=>{if(V!==y){for(const N in y){if(Fa(N))continue;const D=y[N],k=V[N];D!==k&&N!=="value"&&s(m,N,k,D,A,_.children,E,C,Pt)}if(V!==Fe)for(const N in V)!Fa(N)&&!(N in y)&&s(m,N,V[N],null,A,_.children,E,C,Pt);"value"in y&&s(m,"value",V.value,y.value)}},M=(m,_,V,y,E,C,A,N,D)=>{const k=_.el=m?m.el:a(""),B=_.anchor=m?m.anchor:a("");let{patchFlag:L,dynamicChildren:q,slotScopeIds:K}=_;K&&(N=N?N.concat(K):K),m==null?(r(k,V,y),r(B,V,y),X(_.children,V,B,E,C,A,N,D)):L>0&&L&64&&q&&m.dynamicChildren?(O(m.dynamicChildren,q,V,E,C,A,N),(_.key!=null||E&&_===E.subTree)&&Jv(m,_,!0)):De(m,_,V,B,E,C,A,N,D)},P=(m,_,V,y,E,C,A,N,D)=>{_.slotScopeIds=N,m==null?_.shapeFlag&512?E.ctx.activate(_,V,y,A,D):le(_,V,y,E,C,A,D):G(m,_,D)},le=(m,_,V,y,E,C,A)=>{const N=m.component=YI(m,y,E);if(_l(m)&&(N.ctx.renderer=It),QI(N),N.asyncDep){if(E&&E.registerDep(N,te),!m.el){const D=N.subTree=ge(mn);R(null,D,_,V)}return}te(N,m,_,V,E,C,A)},G=(m,_,V)=>{const y=_.component=m.component;if(uI(m,_,V))if(y.asyncDep&&!y.asyncResolved){ae(y,_,V);return}else y.next=_,iI(y.update),y.update();else _.el=m.el,y.vnode=_},te=(m,_,V,y,E,C,A)=>{const N=()=>{if(m.isMounted){let{next:B,bu:L,u:q,parent:K,vnode:H}=m,re=B,be;Yr(m,!1),B?(B.el=H.el,ae(m,B,A)):B=H,L&&$a(L),(be=B.props&&B.props.onVnodeBeforeUpdate)&&Rn(be,K,B,H),Yr(m,!0);const Ie=Cu(m),Me=m.subTree;m.subTree=Ie,I(Me,Ie,f(Me.el),Rt(Me),m,E,C),B.el=Ie.el,re===null&&fI(m,Ie.el),q&&Xt(q,E),(be=B.props&&B.props.onVnodeUpdated)&&Xt(()=>Rn(be,K,B,H),E)}else{let B;const{el:L,props:q}=_,{bm:K,m:H,parent:re}=m,be=Xs(_);if(Yr(m,!1),K&&$a(K),!be&&(B=q&&q.onVnodeBeforeMount)&&Rn(B,re,_),Yr(m,!0),L&&hr){const Ie=()=>{m.subTree=Cu(m),hr(L,m.subTree,m,E,null)};be?_.type.__asyncLoader().then(()=>!m.isUnmounted&&Ie()):Ie()}else{const Ie=m.subTree=Cu(m);I(null,Ie,V,y,m,E,C),_.el=Ie.el}if(H&&Xt(H,E),!be&&(B=q&&q.onVnodeMounted)){const Ie=_;Xt(()=>Rn(B,re,Ie),E)}(_.shapeFlag&256||re&&Xs(re.vnode)&&re.vnode.shapeFlag&256)&&m.a&&Xt(m.a,E),m.isMounted=!0,_=V=y=null}},D=m.effect=new Uh(N,()=>Iv(k),m.scope),k=m.update=()=>D.run();k.id=m.uid,Yr(m,!0),k()},ae=(m,_,V)=>{_.component=m;const y=m.vnode.props;m.vnode=_,m.next=null,DI(m,_.props,y,V),VI(m,_.children,V),gs(),ml(void 0,m.update),ys()},De=(m,_,V,y,E,C,A,N,D=!1)=>{const k=m&&m.children,B=m?m.shapeFlag:0,L=_.children,{patchFlag:q,shapeFlag:K}=_;if(q>0){if(q&128){Re(k,L,V,y,E,C,A,N,D);return}else if(q&256){Ye(k,L,V,y,E,C,A,N,D);return}}K&8?(B&16&&Pt(k,E,C),L!==k&&u(V,L)):B&16?K&16?Re(k,L,V,y,E,C,A,N,D):Pt(k,E,C,!0):(B&8&&u(V,""),K&16&&X(L,V,y,E,C,A,N,D))},Ye=(m,_,V,y,E,C,A,N,D)=>{m=m||Xi,_=_||Xi;const k=m.length,B=_.length,L=Math.min(k,B);let q;for(q=0;qB?Pt(m,E,C,!0,!1,L):X(_,V,y,E,C,A,N,D,L)},Re=(m,_,V,y,E,C,A,N,D)=>{let k=0;const B=_.length;let L=m.length-1,q=B-1;for(;k<=L&&k<=q;){const K=m[k],H=_[k]=D?Er(_[k]):kn(_[k]);if(ci(K,H))I(K,H,V,null,E,C,A,N,D);else break;k++}for(;k<=L&&k<=q;){const K=m[L],H=_[q]=D?Er(_[q]):kn(_[q]);if(ci(K,H))I(K,H,V,null,E,C,A,N,D);else break;L--,q--}if(k>L){if(k<=q){const K=q+1,H=Kq)for(;k<=L;)de(m[k],E,C,!0),k++;else{const K=k,H=k,re=new Map;for(k=H;k<=q;k++){const xe=_[k]=D?Er(_[k]):kn(_[k]);xe.key!=null&&re.set(xe.key,k)}let be,Ie=0;const Me=q-H+1;let Le=!1,At=0;const Yt=new Array(Me);for(k=0;k=Me){de(xe,E,C,!0);continue}let nt;if(xe.key!=null)nt=re.get(xe.key);else for(be=H;be<=q;be++)if(Yt[be-H]===0&&ci(xe,_[be])){nt=be;break}nt===void 0?de(xe,E,C,!0):(Yt[nt-H]=k+1,nt>=At?At=nt:Le=!0,I(xe,_[nt],V,null,E,C,A,N,D),Ie++)}const Wn=Le?UI(Yt):Xi;for(be=Wn.length-1,k=Me-1;k>=0;k--){const xe=H+k,nt=_[xe],rt=xe+1{const{el:C,type:A,transition:N,children:D,shapeFlag:k}=m;if(k&6){Je(m.component.subTree,_,V,y);return}if(k&128){m.suspense.move(_,V,y);return}if(k&64){A.move(m,_,V,It);return}if(A===$e){r(C,_,V);for(let L=0;LN.enter(C),E);else{const{leave:L,delayLeave:q,afterLeave:K}=N,H=()=>r(C,_,V),re=()=>{L(C,()=>{H(),K&&K()})};q?q(C,H,re):re()}else r(C,_,V)},de=(m,_,V,y=!1,E=!1)=>{const{type:C,props:A,ref:N,children:D,dynamicChildren:k,shapeFlag:B,patchFlag:L,dirs:q}=m;if(N!=null&&Cf(N,null,V,m,!0),B&256){_.ctx.deactivate(m);return}const K=B&1&&q,H=!Xs(m);let re;if(H&&(re=A&&A.onVnodeBeforeUnmount)&&Rn(re,_,m),B&6)Gt(m.component,V,y);else{if(B&128){m.suspense.unmount(V,y);return}K&&Gr(m,null,_,"beforeUnmount"),B&64?m.type.remove(m,_,V,E,It,y):k&&(C!==$e||L>0&&L&64)?Pt(k,_,V,!1,!0):(C===$e&&L&384||!E&&B&16)&&Pt(D,_,V),y&&pt(m)}(H&&(re=A&&A.onVnodeUnmounted)||K)&&Xt(()=>{re&&Rn(re,_,m),K&&Gr(m,null,_,"unmounted")},V)},pt=m=>{const{type:_,el:V,anchor:y,transition:E}=m;if(_===$e){Zt(V,y);return}if(_===ja){W(m);return}const C=()=>{i(V),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(m.shapeFlag&1&&E&&!E.persisted){const{leave:A,delayLeave:N}=E,D=()=>A(V,C);N?N(m.el,C,D):D()}else C()},Zt=(m,_)=>{let V;for(;m!==_;)V=h(m),i(m),m=V;i(_)},Gt=(m,_,V)=>{const{bum:y,scope:E,update:C,subTree:A,um:N}=m;y&&$a(y),E.stop(),C&&(C.active=!1,de(A,m,_,V)),N&&Xt(N,_),Xt(()=>{m.isUnmounted=!0},_),_&&_.pendingBranch&&!_.isUnmounted&&m.asyncDep&&!m.asyncResolved&&m.suspenseId===_.pendingId&&(_.deps--,_.deps===0&&_.resolve())},Pt=(m,_,V,y=!1,E=!1,C=0)=>{for(let A=C;Am.shapeFlag&6?Rt(m.component.subTree):m.shapeFlag&128?m.suspense.next():h(m.anchor||m.el),Bt=(m,_,V)=>{m==null?_._vnode&&de(_._vnode,null,null,!0):I(_._vnode||null,m,_,null,null,null,V),Sv(),_._vnode=m},It={p:I,um:de,m:Je,r:pt,mt:le,mc:X,pc:De,pbc:O,n:Rt,o:t};let mt,hr;return e&&([mt,hr]=e(It)),{render:Bt,hydrate:mt,createApp:$I(Bt,mt)}}function Yr({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function Jv(t,e,n=!1){const r=t.children,i=e.children;if(ue(r)&&ue(i))for(let s=0;s>1,t[n[a]]0&&(e[r]=n[s-1]),n[s]=r)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=e[o];return n}const BI=t=>t.__isTeleport,$e=Symbol(void 0),Jh=Symbol(void 0),mn=Symbol(void 0),ja=Symbol(void 0),Js=[];let In=null;function Y(t=!1){Js.push(In=t?null:[])}function qI(){Js.pop(),In=Js[Js.length-1]||null}let _o=1;function bm(t){_o+=t}function Zv(t){return t.dynamicChildren=_o>0?In||Xi:null,qI(),_o>0&&In&&In.push(t),t}function Z(t,e,n,r,i,s){return Zv(d(t,e,n,r,i,s,!0))}function wl(t,e,n,r,i){return Zv(ge(t,e,n,r,i,!0))}function yc(t){return t?t.__v_isVNode===!0:!1}function ci(t,e){return t.type===e.type&&t.key===e.key}const El="__vInternal",e_=({key:t})=>t!=null?t:null,Ua=({ref:t,ref_key:e,ref_for:n})=>t!=null?dt(t)||Wt(t)||ve(t)?{i:Vt,r:t,k:e,f:!!n}:t:null;function d(t,e=null,n=null,r=0,i=null,s=t===$e?0:1,o=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&e_(e),ref:e&&Ua(e),scopeId:yl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null};return a?(ed(c,n),s&128&&t.normalize(c)):n&&(c.shapeFlag|=dt(n)?8:16),_o>0&&!o&&In&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&In.push(c),c}const ge=HI;function HI(t,e=null,n=null,r=0,i=null,s=!1){if((!t||t===jv)&&(t=mn),yc(t)){const a=Vr(t,e,!0);return n&&ed(a,n),_o>0&&!s&&In&&(a.shapeFlag&6?In[In.indexOf(t)]=a:In.push(a)),a.patchFlag|=-2,a}if(tA(t)&&(t=t.__vccOpts),e){e=zI(e);let{class:a,style:c}=e;a&&!dt(a)&&(e.class=_i(a)),Ze(c)&&(bv(c)&&!ue(c)&&(c=bt({},c)),e.style=ol(c))}const o=dt(t)?1:hI(t)?128:BI(t)?64:Ze(t)?4:ve(t)?2:0;return d(t,e,n,r,i,o,s,!0)}function zI(t){return t?bv(t)||El in t?bt({},t):t:null}function Vr(t,e,n=!1){const{props:r,ref:i,patchFlag:s,children:o}=t,a=e?WI(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:a,key:a&&e_(a),ref:e&&e.ref?n&&i?ue(i)?i.concat(Ua(e)):[i,Ua(e)]:Ua(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==$e?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Vr(t.ssContent),ssFallback:t.ssFallback&&Vr(t.ssFallback),el:t.el,anchor:t.anchor}}function Xn(t=" ",e=0){return ge(Jh,null,t,e)}function Zh(t,e){const n=ge(ja,null,t);return n.staticCount=e,n}function ut(t="",e=!1){return e?(Y(),wl(mn,null,t)):ge(mn,null,t)}function kn(t){return t==null||typeof t=="boolean"?ge(mn):ue(t)?ge($e,null,t.slice()):typeof t=="object"?Er(t):ge(Jh,null,String(t))}function Er(t){return t.el===null||t.memo?t:Vr(t)}function ed(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(ue(e))n=16;else if(typeof e=="object")if(r&65){const i=e.default;i&&(i._c&&(i._d=!1),ed(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!(El in e)?e._ctx=Vt:i===3&&Vt&&(Vt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ve(e)?(e={default:e,_ctx:Vt},n=32):(e=String(e),r&64?(n=16,e=[Xn(e)]):n=8);t.children=e,t.shapeFlag|=n}function WI(...t){const e={};for(let n=0;n_t||Vt,as=t=>{_t=t,t.scope.on()},yi=()=>{_t&&_t.scope.off(),_t=null};function t_(t){return t.vnode.shapeFlag&4}let bo=!1;function QI(t,e=!1){bo=e;const{props:n,children:r}=t.vnode,i=t_(t);kI(t,n,i,e),MI(t,r);const s=i?XI(t,e):void 0;return bo=!1,s}function XI(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=wv(new Proxy(t.ctx,CI));const{setup:r}=n;if(r){const i=t.setupContext=r.length>1?ZI(t):null;as(t),gs();const s=Pr(r,t,0,[t.props,i]);if(ys(),yi(),ov(s)){if(s.then(yi,yi),e)return s.then(o=>{wm(t,o,e)}).catch(o=>{pl(o,t,0)});t.asyncDep=s}else wm(t,s,e)}else n_(t,e)}function wm(t,e,n){ve(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Ze(e)&&(t.setupState=Ev(e)),n_(t,n)}let Em;function n_(t,e,n){const r=t.type;if(!t.render){if(!e&&Em&&!r.render){const i=r.template;if(i){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:c}=r,l=bt(bt({isCustomElement:s,delimiters:a},o),c);r.render=Em(i,l)}}t.render=r.render||Sn}as(t),gs(),SI(t),ys(),yi()}function JI(t){return new Proxy(t.attrs,{get(e,n){return rn(t,"get","$attrs"),e[n]}})}function ZI(t){const e=r=>{t.exposed=r||{}};let n;return{get attrs(){return n||(n=JI(t))},slots:t.slots,emit:t.emit,expose:e}}function Tl(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Ev(wv(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in mc)return mc[n](t)}}))}function eA(t,e=!0){return ve(t)?t.displayName||t.name:t.name||e&&t.__name}function tA(t){return ve(t)&&"__vccOpts"in t}const fn=(t,e)=>eI(t,e,bo);function sn(t,e,n){const r=arguments.length;return r===2?Ze(e)&&!ue(e)?yc(e)?ge(t,null,[e]):ge(t,e):ge(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&yc(n)&&(n=[n]),ge(t,e,n))}const nA="3.2.37",rA="http://www.w3.org/2000/svg",li=typeof document<"u"?document:null,Tm=li&&li.createElement("template"),iA={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const i=e?li.createElementNS(rA,t):li.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:t=>li.createTextNode(t),createComment:t=>li.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>li.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},cloneNode(t){const e=t.cloneNode(!0);return"_value"in t&&(e._value=t._value),e},insertStaticContent(t,e,n,r,i,s){const o=n?n.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Tm.innerHTML=r?`${t}`:t;const a=Tm.content;if(r){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function sA(t,e,n){const r=t._vtc;r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function oA(t,e,n){const r=t.style,i=dt(n);if(n&&!i){for(const s in n)Sf(r,s,n[s]);if(e&&!dt(e))for(const s in e)n[s]==null&&Sf(r,s,"")}else{const s=r.display;i?e!==n&&(r.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(r.display=s)}}const Im=/\s*!important$/;function Sf(t,e,n){if(ue(n))n.forEach(r=>Sf(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=aA(t,e);Im.test(n)?t.setProperty(Si(r),n.replace(Im,""),"important"):t[r]=n}}const Am=["Webkit","Moz","ms"],Pu={};function aA(t,e){const n=Pu[e];if(n)return n;let r=Bn(e);if(r!=="filter"&&r in t)return Pu[e]=r;r=fl(r);for(let i=0;i{let t=Date.now,e=!1;if(typeof window<"u"){Date.now()>document.createEvent("Event").timeStamp&&(t=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);e=!!(n&&Number(n[1])<=53)}return[t,e]})();let xf=0;const fA=Promise.resolve(),hA=()=>{xf=0},dA=()=>xf||(fA.then(hA),xf=r_());function ui(t,e,n,r){t.addEventListener(e,n,r)}function pA(t,e,n,r){t.removeEventListener(e,n,r)}function mA(t,e,n,r,i=null){const s=t._vei||(t._vei={}),o=s[e];if(r&&o)o.value=r;else{const[a,c]=gA(e);if(r){const l=s[e]=yA(r,i);ui(t,a,l,c)}else o&&(pA(t,a,o,c),s[e]=void 0)}}const Sm=/(?:Once|Passive|Capture)$/;function gA(t){let e;if(Sm.test(t)){e={};let n;for(;n=t.match(Sm);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[Si(t.slice(2)),e]}function yA(t,e){const n=r=>{const i=r.timeStamp||r_();(uA||i>=n.attached-1)&&pn(vA(r,n.value),e,5,[r])};return n.value=t,n.attached=dA(),n}function vA(t,e){if(ue(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>i=>!i._stopped&&r&&r(i))}else return e}const xm=/^on[a-z]/,_A=(t,e,n,r,i=!1,s,o,a,c)=>{e==="class"?sA(t,r,i):e==="style"?oA(t,n,r):cl(e)?Fh(e)||mA(t,e,n,r,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):bA(t,e,r,i))?lA(t,e,r,s,o,a,c):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),cA(t,e,r,i))};function bA(t,e,n,r){return r?!!(e==="innerHTML"||e==="textContent"||e in t&&xm.test(e)&&ve(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||xm.test(e)&&dt(n)?!1:e in t}const mr="transition",Rs="animation",Zs=(t,{slots:e})=>sn(Dv,s_(t),e);Zs.displayName="Transition";const i_={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},wA=Zs.props=bt({},Dv.props,i_),Qr=(t,e=[])=>{ue(t)?t.forEach(n=>n(...e)):t&&t(...e)},Pm=t=>t?ue(t)?t.some(e=>e.length>1):t.length>1:!1;function s_(t){const e={};for(const w in t)w in i_||(e[w]=t[w]);if(t.css===!1)return e;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:l=o,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,S=EA(i),T=S&&S[0],I=S&&S[1],{onBeforeEnter:b,onEnter:R,onEnterCancelled:$,onLeave:F,onLeaveCancelled:W,onBeforeAppear:fe=b,onAppear:_e=R,onAppearCancelled:ee=$}=e,X=(w,M,P)=>{_r(w,M?u:a),_r(w,M?l:o),P&&P()},ie=(w,M)=>{w._isLeaving=!1,_r(w,f),_r(w,g),_r(w,h),M&&M()},O=w=>(M,P)=>{const le=w?_e:R,G=()=>X(M,w,P);Qr(le,[M,G]),Rm(()=>{_r(M,w?c:s),Gn(M,w?u:a),Pm(le)||Om(M,r,T,G)})};return bt(e,{onBeforeEnter(w){Qr(b,[w]),Gn(w,s),Gn(w,o)},onBeforeAppear(w){Qr(fe,[w]),Gn(w,c),Gn(w,l)},onEnter:O(!1),onAppear:O(!0),onLeave(w,M){w._isLeaving=!0;const P=()=>ie(w,M);Gn(w,f),a_(),Gn(w,h),Rm(()=>{!w._isLeaving||(_r(w,f),Gn(w,g),Pm(F)||Om(w,r,I,P))}),Qr(F,[w,P])},onEnterCancelled(w){X(w,!1),Qr($,[w])},onAppearCancelled(w){X(w,!0),Qr(ee,[w])},onLeaveCancelled(w){ie(w),Qr(W,[w])}})}function EA(t){if(t==null)return null;if(Ze(t))return[Ru(t.enter),Ru(t.leave)];{const e=Ru(t);return[e,e]}}function Ru(t){return po(t)}function Gn(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function _r(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function Rm(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let TA=0;function Om(t,e,n,r){const i=t._endId=++TA,s=()=>{i===t._endId&&r()};if(n)return setTimeout(s,n);const{type:o,timeout:a,propCount:c}=o_(t,e);if(!o)return r();const l=o+"end";let u=0;const f=()=>{t.removeEventListener(l,h),s()},h=g=>{g.target===t&&++u>=c&&f()};setTimeout(()=>{u(n[S]||"").split(", "),i=r(mr+"Delay"),s=r(mr+"Duration"),o=km(i,s),a=r(Rs+"Delay"),c=r(Rs+"Duration"),l=km(a,c);let u=null,f=0,h=0;e===mr?o>0&&(u=mr,f=o,h=s.length):e===Rs?l>0&&(u=Rs,f=l,h=c.length):(f=Math.max(o,l),u=f>0?o>l?mr:Rs:null,h=u?u===mr?s.length:c.length:0);const g=u===mr&&/\b(transform|all)(,|$)/.test(n[mr+"Property"]);return{type:u,timeout:f,propCount:h,hasTransform:g}}function km(t,e){for(;t.lengthDm(n)+Dm(t[r])))}function Dm(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function a_(){return document.body.offsetHeight}const c_=new WeakMap,l_=new WeakMap,IA={name:"TransitionGroup",props:bt({},wA,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=td(),r=kv();let i,s;return Fv(()=>{if(!i.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!PA(i[0].el,n.vnode.el,o))return;i.forEach(CA),i.forEach(SA);const a=i.filter(xA);a_(),a.forEach(c=>{const l=c.el,u=l.style;Gn(l,o),u.transform=u.webkitTransform=u.transitionDuration="";const f=l._moveCb=h=>{h&&h.target!==l||(!h||/transform$/.test(h.propertyName))&&(l.removeEventListener("transitionend",f),l._moveCb=null,_r(l,o))};l.addEventListener("transitionend",f)})}),()=>{const o=ke(t),a=s_(o);let c=o.tag||$e;i=s,s=e.default?Yh(e.default()):[];for(let l=0;l{o.split(/\s+/).forEach(a=>a&&r.classList.remove(a))}),n.split(/\s+/).forEach(o=>o&&r.classList.add(o)),r.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(r);const{hasTransform:s}=o_(r);return i.removeChild(r),s}const vc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ue(e)?n=>$a(e,n):e};function RA(t){t.target.composing=!0}function Nm(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Dn={created(t,{modifiers:{lazy:e,trim:n,number:r}},i){t._assign=vc(i);const s=r||i.props&&i.props.type==="number";ui(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),s&&(a=po(a)),t._assign(a)}),n&&ui(t,"change",()=>{t.value=t.value.trim()}),e||(ui(t,"compositionstart",RA),ui(t,"compositionend",Nm),ui(t,"change",Nm))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:i}},s){if(t._assign=vc(s),t.composing||document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===e||(i||t.type==="number")&&po(t.value)===e))return;const o=e==null?"":e;t.value!==o&&(t.value=o)}},Pf={deep:!0,created(t,{value:e,modifiers:{number:n}},r){const i=ll(e);ui(t,"change",()=>{const s=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?po(_c(o)):_c(o));t._assign(t.multiple?i?new Set(s):s:s[0])}),t._assign=vc(r)},mounted(t,{value:e}){Mm(t,e)},beforeUpdate(t,e,n){t._assign=vc(n)},updated(t,{value:e}){Mm(t,e)}};function Mm(t,e){const n=t.multiple;if(!(n&&!ue(e)&&!ll(e))){for(let r=0,i=t.options.length;r-1:s.selected=e.has(o);else if(al(_c(s),e)){t.selectedIndex!==r&&(t.selectedIndex=r);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function _c(t){return"_value"in t?t._value:t.value}const OA=["ctrl","shift","alt","meta"],kA={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>OA.some(n=>t[`${n}Key`]&&!e.includes(n))},DA=(t,e)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=Si(n.key);if(e.some(i=>i===r||NA[i]===r))return t(n)},MA={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):ks(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),ks(t,!0),r.enter(t)):r.leave(t,()=>{ks(t,!1)}):ks(t,e))},beforeUnmount(t,{value:e}){ks(t,e)}};function ks(t,e){t.style.display=e?t._vod:"none"}const VA=bt({patchProp:_A},iA);let Vm;function FA(){return Vm||(Vm=LI(VA))}const $A=(...t)=>{const e=FA().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=LA(r);if(!i)return;const s=e._component;!ve(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const o=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e};function LA(t){return dt(t)?document.querySelector(t):t}const jA="/assets/gavel_logo.992bca02.png",He=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},UA={data(){return{logo:{filename:jA,alt:"Gavel Logo"}}}},BA=["src","alt"];function qA(t,e,n,r,i,s){return Y(),Z("img",{src:i.logo.filename,alt:i.logo.alt,height:"120",width:"120"},null,8,BA)}const HA=He(UA,[["render",qA]]);/*! + * Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2022 Fonticons, Inc. + */function Fm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Q(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1;i--){var s=n[i],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=s)}return Be.head.insertBefore(e,r),t}}var y2="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function wo(){for(var t=12,e="";t-- >0;)e+=y2[Math.random()*62|0];return e}function vs(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function ad(t){return t.classList?vs(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(e){return e})}function E_(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function v2(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(E_(t[n]),'" ')},"").trim()}function Al(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")},"")}function cd(t){return t.size!==Mn.size||t.x!==Mn.x||t.y!==Mn.y||t.rotate!==Mn.rotate||t.flipX||t.flipY}function _2(t){var e=t.transform,n=t.containerWidth,r=t.iconWidth,i={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(s," ").concat(o," ").concat(a)},l={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:l}}function b2(t){var e=t.transform,n=t.width,r=n===void 0?Of:n,i=t.height,s=i===void 0?Of:i,o=t.startCentered,a=o===void 0?!1:o,c="";return a&&p_?c+="translate(".concat(e.x/gr-r/2,"em, ").concat(e.y/gr-s/2,"em) "):a?c+="translate(calc(-50% + ".concat(e.x/gr,"em), calc(-50% + ").concat(e.y/gr,"em)) "):c+="translate(".concat(e.x/gr,"em, ").concat(e.y/gr,"em) "),c+="scale(".concat(e.size/gr*(e.flipX?-1:1),", ").concat(e.size/gr*(e.flipY?-1:1),") "),c+="rotate(".concat(e.rotate,"deg) "),c}var w2=`:root, :host { + --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; + --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; + --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; + --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; + --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; + --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; +} + +svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { + overflow: visible; + box-sizing: content-box; +} + +.svg-inline--fa { + display: var(--fa-display, inline-block); + height: 1em; + overflow: visible; + vertical-align: -0.125em; +} +.svg-inline--fa.fa-2xs { + vertical-align: 0.1em; +} +.svg-inline--fa.fa-xs { + vertical-align: 0em; +} +.svg-inline--fa.fa-sm { + vertical-align: -0.0714285705em; +} +.svg-inline--fa.fa-lg { + vertical-align: -0.2em; +} +.svg-inline--fa.fa-xl { + vertical-align: -0.25em; +} +.svg-inline--fa.fa-2xl { + vertical-align: -0.3125em; +} +.svg-inline--fa.fa-pull-left { + margin-right: var(--fa-pull-margin, 0.3em); + width: auto; +} +.svg-inline--fa.fa-pull-right { + margin-left: var(--fa-pull-margin, 0.3em); + width: auto; +} +.svg-inline--fa.fa-li { + width: var(--fa-li-width, 2em); + top: 0.25em; +} +.svg-inline--fa.fa-fw { + width: var(--fa-fw-width, 1.25em); +} + +.fa-layers svg.svg-inline--fa { + bottom: 0; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; +} + +.fa-layers-counter, .fa-layers-text { + display: inline-block; + position: absolute; + text-align: center; +} + +.fa-layers { + display: inline-block; + height: 1em; + position: relative; + text-align: center; + vertical-align: -0.125em; + width: 1em; +} +.fa-layers svg.svg-inline--fa { + -webkit-transform-origin: center center; + transform-origin: center center; +} + +.fa-layers-text { + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + -webkit-transform-origin: center center; + transform-origin: center center; +} + +.fa-layers-counter { + background-color: var(--fa-counter-background-color, #ff253a); + border-radius: var(--fa-counter-border-radius, 1em); + box-sizing: border-box; + color: var(--fa-inverse, #fff); + line-height: var(--fa-counter-line-height, 1); + max-width: var(--fa-counter-max-width, 5em); + min-width: var(--fa-counter-min-width, 1.5em); + overflow: hidden; + padding: var(--fa-counter-padding, 0.25em 0.5em); + right: var(--fa-right, 0); + text-overflow: ellipsis; + top: var(--fa-top, 0); + -webkit-transform: scale(var(--fa-counter-scale, 0.25)); + transform: scale(var(--fa-counter-scale, 0.25)); + -webkit-transform-origin: top right; + transform-origin: top right; +} + +.fa-layers-bottom-right { + bottom: var(--fa-bottom, 0); + right: var(--fa-right, 0); + top: auto; + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: bottom right; + transform-origin: bottom right; +} + +.fa-layers-bottom-left { + bottom: var(--fa-bottom, 0); + left: var(--fa-left, 0); + right: auto; + top: auto; + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: bottom left; + transform-origin: bottom left; +} + +.fa-layers-top-right { + top: var(--fa-top, 0); + right: var(--fa-right, 0); + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: top right; + transform-origin: top right; +} + +.fa-layers-top-left { + left: var(--fa-left, 0); + right: auto; + top: var(--fa-top, 0); + -webkit-transform: scale(var(--fa-layers-scale, 0.25)); + transform: scale(var(--fa-layers-scale, 0.25)); + -webkit-transform-origin: top left; + transform-origin: top left; +} + +.fa-1x { + font-size: 1em; +} + +.fa-2x { + font-size: 2em; +} + +.fa-3x { + font-size: 3em; +} + +.fa-4x { + font-size: 4em; +} + +.fa-5x { + font-size: 5em; +} + +.fa-6x { + font-size: 6em; +} + +.fa-7x { + font-size: 7em; +} + +.fa-8x { + font-size: 8em; +} + +.fa-9x { + font-size: 9em; +} + +.fa-10x { + font-size: 10em; +} + +.fa-2xs { + font-size: 0.625em; + line-height: 0.1em; + vertical-align: 0.225em; +} + +.fa-xs { + font-size: 0.75em; + line-height: 0.0833333337em; + vertical-align: 0.125em; +} + +.fa-sm { + font-size: 0.875em; + line-height: 0.0714285718em; + vertical-align: 0.0535714295em; +} + +.fa-lg { + font-size: 1.25em; + line-height: 0.05em; + vertical-align: -0.075em; +} + +.fa-xl { + font-size: 1.5em; + line-height: 0.0416666682em; + vertical-align: -0.125em; +} + +.fa-2xl { + font-size: 2em; + line-height: 0.03125em; + vertical-align: -0.1875em; +} + +.fa-fw { + text-align: center; + width: 1.25em; +} + +.fa-ul { + list-style-type: none; + margin-left: var(--fa-li-margin, 2.5em); + padding-left: 0; +} +.fa-ul > li { + position: relative; +} + +.fa-li { + left: calc(var(--fa-li-width, 2em) * -1); + position: absolute; + text-align: center; + width: var(--fa-li-width, 2em); + line-height: inherit; +} + +.fa-border { + border-color: var(--fa-border-color, #eee); + border-radius: var(--fa-border-radius, 0.1em); + border-style: var(--fa-border-style, solid); + border-width: var(--fa-border-width, 0.08em); + padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); +} + +.fa-pull-left { + float: left; + margin-right: var(--fa-pull-margin, 0.3em); +} + +.fa-pull-right { + float: right; + margin-left: var(--fa-pull-margin, 0.3em); +} + +.fa-beat { + -webkit-animation-name: fa-beat; + animation-name: fa-beat; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); + animation-timing-function: var(--fa-animation-timing, ease-in-out); +} + +.fa-bounce { + -webkit-animation-name: fa-bounce; + animation-name: fa-bounce; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); + animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); +} + +.fa-fade { + -webkit-animation-name: fa-fade; + animation-name: fa-fade; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); + animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); +} + +.fa-beat-fade { + -webkit-animation-name: fa-beat-fade; + animation-name: fa-beat-fade; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); + animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); +} + +.fa-flip { + -webkit-animation-name: fa-flip; + animation-name: fa-flip; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); + animation-timing-function: var(--fa-animation-timing, ease-in-out); +} + +.fa-shake { + -webkit-animation-name: fa-shake; + animation-name: fa-shake; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, linear); + animation-timing-function: var(--fa-animation-timing, linear); +} + +.fa-spin { + -webkit-animation-name: fa-spin; + animation-name: fa-spin; + -webkit-animation-delay: var(--fa-animation-delay, 0); + animation-delay: var(--fa-animation-delay, 0); + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 2s); + animation-duration: var(--fa-animation-duration, 2s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, linear); + animation-timing-function: var(--fa-animation-timing, linear); +} + +.fa-spin-reverse { + --fa-animation-direction: reverse; +} + +.fa-pulse, +.fa-spin-pulse { + -webkit-animation-name: fa-spin; + animation-name: fa-spin; + -webkit-animation-direction: var(--fa-animation-direction, normal); + animation-direction: var(--fa-animation-direction, normal); + -webkit-animation-duration: var(--fa-animation-duration, 1s); + animation-duration: var(--fa-animation-duration, 1s); + -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); + animation-iteration-count: var(--fa-animation-iteration-count, infinite); + -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); + animation-timing-function: var(--fa-animation-timing, steps(8)); +} + +@media (prefers-reduced-motion: reduce) { + .fa-beat, +.fa-bounce, +.fa-fade, +.fa-beat-fade, +.fa-flip, +.fa-pulse, +.fa-shake, +.fa-spin, +.fa-spin-pulse { + -webkit-animation-delay: -1ms; + animation-delay: -1ms; + -webkit-animation-duration: 1ms; + animation-duration: 1ms; + -webkit-animation-iteration-count: 1; + animation-iteration-count: 1; + transition-delay: 0s; + transition-duration: 0s; + } +} +@-webkit-keyframes fa-beat { + 0%, 90% { + -webkit-transform: scale(1); + transform: scale(1); + } + 45% { + -webkit-transform: scale(var(--fa-beat-scale, 1.25)); + transform: scale(var(--fa-beat-scale, 1.25)); + } +} +@keyframes fa-beat { + 0%, 90% { + -webkit-transform: scale(1); + transform: scale(1); + } + 45% { + -webkit-transform: scale(var(--fa-beat-scale, 1.25)); + transform: scale(var(--fa-beat-scale, 1.25)); + } +} +@-webkit-keyframes fa-bounce { + 0% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 10% { + -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + } + 30% { + -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + } + 50% { + -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + } + 57% { + -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + } + 64% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 100% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } +} +@keyframes fa-bounce { + 0% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 10% { + -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); + } + 30% { + -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); + } + 50% { + -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); + } + 57% { + -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); + } + 64% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } + 100% { + -webkit-transform: scale(1, 1) translateY(0); + transform: scale(1, 1) translateY(0); + } +} +@-webkit-keyframes fa-fade { + 50% { + opacity: var(--fa-fade-opacity, 0.4); + } +} +@keyframes fa-fade { + 50% { + opacity: var(--fa-fade-opacity, 0.4); + } +} +@-webkit-keyframes fa-beat-fade { + 0%, 100% { + opacity: var(--fa-beat-fade-opacity, 0.4); + -webkit-transform: scale(1); + transform: scale(1); + } + 50% { + opacity: 1; + -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); + transform: scale(var(--fa-beat-fade-scale, 1.125)); + } +} +@keyframes fa-beat-fade { + 0%, 100% { + opacity: var(--fa-beat-fade-opacity, 0.4); + -webkit-transform: scale(1); + transform: scale(1); + } + 50% { + opacity: 1; + -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); + transform: scale(var(--fa-beat-fade-scale, 1.125)); + } +} +@-webkit-keyframes fa-flip { + 50% { + -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + } +} +@keyframes fa-flip { + 50% { + -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); + } +} +@-webkit-keyframes fa-shake { + 0% { + -webkit-transform: rotate(-15deg); + transform: rotate(-15deg); + } + 4% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } + 8%, 24% { + -webkit-transform: rotate(-18deg); + transform: rotate(-18deg); + } + 12%, 28% { + -webkit-transform: rotate(18deg); + transform: rotate(18deg); + } + 16% { + -webkit-transform: rotate(-22deg); + transform: rotate(-22deg); + } + 20% { + -webkit-transform: rotate(22deg); + transform: rotate(22deg); + } + 32% { + -webkit-transform: rotate(-12deg); + transform: rotate(-12deg); + } + 36% { + -webkit-transform: rotate(12deg); + transform: rotate(12deg); + } + 40%, 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} +@keyframes fa-shake { + 0% { + -webkit-transform: rotate(-15deg); + transform: rotate(-15deg); + } + 4% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } + 8%, 24% { + -webkit-transform: rotate(-18deg); + transform: rotate(-18deg); + } + 12%, 28% { + -webkit-transform: rotate(18deg); + transform: rotate(18deg); + } + 16% { + -webkit-transform: rotate(-22deg); + transform: rotate(-22deg); + } + 20% { + -webkit-transform: rotate(22deg); + transform: rotate(22deg); + } + 32% { + -webkit-transform: rotate(-12deg); + transform: rotate(-12deg); + } + 36% { + -webkit-transform: rotate(12deg); + transform: rotate(12deg); + } + 40%, 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +.fa-rotate-90 { + -webkit-transform: rotate(90deg); + transform: rotate(90deg); +} + +.fa-rotate-180 { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} + +.fa-rotate-270 { + -webkit-transform: rotate(270deg); + transform: rotate(270deg); +} + +.fa-flip-horizontal { + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); +} + +.fa-flip-vertical { + -webkit-transform: scale(1, -1); + transform: scale(1, -1); +} + +.fa-flip-both, +.fa-flip-horizontal.fa-flip-vertical { + -webkit-transform: scale(-1, -1); + transform: scale(-1, -1); +} + +.fa-rotate-by { + -webkit-transform: rotate(var(--fa-rotate-angle, none)); + transform: rotate(var(--fa-rotate-angle, none)); +} + +.fa-stack { + display: inline-block; + vertical-align: middle; + height: 2em; + position: relative; + width: 2.5em; +} + +.fa-stack-1x, +.fa-stack-2x { + bottom: 0; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; + z-index: var(--fa-stack-z-index, auto); +} + +.svg-inline--fa.fa-stack-1x { + height: 1em; + width: 1.25em; +} +.svg-inline--fa.fa-stack-2x { + height: 2em; + width: 2.5em; +} + +.fa-inverse { + color: var(--fa-inverse, #fff); +} + +.sr-only, +.fa-sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.sr-only-focusable:not(:focus), +.fa-sr-only-focusable:not(:focus) { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.svg-inline--fa .fa-primary { + fill: var(--fa-primary-color, currentColor); + opacity: var(--fa-primary-opacity, 1); +} + +.svg-inline--fa .fa-secondary { + fill: var(--fa-secondary-color, currentColor); + opacity: var(--fa-secondary-opacity, 0.4); +} + +.svg-inline--fa.fa-swap-opacity .fa-primary { + opacity: var(--fa-secondary-opacity, 0.4); +} + +.svg-inline--fa.fa-swap-opacity .fa-secondary { + opacity: var(--fa-primary-opacity, 1); +} + +.svg-inline--fa mask .fa-primary, +.svg-inline--fa mask .fa-secondary { + fill: black; +} + +.fad.fa-inverse, +.fa-duotone.fa-inverse { + color: var(--fa-inverse, #fff); +}`;function T_(){var t=m_,e=g_,n=oe.familyPrefix,r=oe.replacementClass,i=w2;if(n!==t||r!==e){var s=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),a=new RegExp("\\.".concat(e),"g");i=i.replace(s,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var Hm=!1;function Ou(){oe.autoAddCss&&!Hm&&(g2(T_()),Hm=!0)}var E2={mixout:function(){return{dom:{css:T_,insertCss:Ou}}},hooks:function(){return{beforeDOMElementCreation:function(){Ou()},beforeI2svg:function(){Ou()}}}},tr=Fr||{};tr[er]||(tr[er]={});tr[er].styles||(tr[er].styles={});tr[er].hooks||(tr[er].hooks={});tr[er].shims||(tr[er].shims=[]);var An=tr[er],I_=[],T2=function t(){Be.removeEventListener("DOMContentLoaded",t),Ec=1,I_.map(function(e){return e()})},Ec=!1;ur&&(Ec=(Be.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Be.readyState),Ec||Be.addEventListener("DOMContentLoaded",T2));function I2(t){!ur||(Ec?setTimeout(t,0):I_.push(t))}function qo(t){var e=t.tag,n=t.attributes,r=n===void 0?{}:n,i=t.children,s=i===void 0?[]:i;return typeof t=="string"?E_(t):"<".concat(e," ").concat(v2(r),">").concat(s.map(qo).join(""),"")}function zm(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}var A2=function(e,n){return function(r,i,s,o){return e.call(n,r,i,s,o)}},ku=function(e,n,r,i){var s=Object.keys(e),o=s.length,a=i!==void 0?A2(n,i):n,c,l,u;for(r===void 0?(c=1,u=e[s[0]]):(c=0,u=r);c=55296&&i<=56319&&n=55296&&r<=56319&&n>e+1&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Wm(t){return Object.keys(t).reduce(function(e,n){var r=t[n],i=!!r.icon;return i?e[r.iconName]=r.icon:e[n]=r,e},{})}function Nf(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,s=Wm(e);typeof An.hooks.addPack=="function"&&!i?An.hooks.addPack(t,Wm(e)):An.styles[t]=Q(Q({},An.styles[t]||{}),s),t==="fas"&&Nf("fa",e)}var to=An.styles,x2=An.shims,P2=Object.values(v_),ld=null,A_={},C_={},S_={},x_={},P_={},R2=Object.keys(od);function O2(t){return~u2.indexOf(t)}function k2(t,e){var n=e.split("-"),r=n[0],i=n.slice(1).join("-");return r===t&&i!==""&&!O2(i)?i:null}var R_=function(){var e=function(s){return ku(to,function(o,a,c){return o[c]=ku(a,s,{}),o},{})};A_=e(function(i,s,o){if(s[3]&&(i[s[3]]=o),s[2]){var a=s[2].filter(function(c){return typeof c=="number"});a.forEach(function(c){i[c.toString(16)]=o})}return i}),C_=e(function(i,s,o){if(i[o]=o,s[2]){var a=s[2].filter(function(c){return typeof c=="string"});a.forEach(function(c){i[c]=o})}return i}),P_=e(function(i,s,o){var a=s[2];return i[o]=o,a.forEach(function(c){i[c]=o}),i});var n="far"in to||oe.autoFetchSvg,r=ku(x2,function(i,s){var o=s[0],a=s[1],c=s[2];return a==="far"&&!n&&(a="fas"),typeof o=="string"&&(i.names[o]={prefix:a,iconName:c}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:a,iconName:c}),i},{names:{},unicodes:{}});S_=r.names,x_=r.unicodes,ld=Cl(oe.styleDefault)};m2(function(t){ld=Cl(t.styleDefault)});R_();function ud(t,e){return(A_[t]||{})[e]}function D2(t,e){return(C_[t]||{})[e]}function Ki(t,e){return(P_[t]||{})[e]}function O_(t){return S_[t]||{prefix:null,iconName:null}}function N2(t){var e=x_[t],n=ud("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function $r(){return ld}var fd=function(){return{prefix:null,iconName:null,rest:[]}};function Cl(t){var e=od[t],n=wc[t]||wc[e],r=t in An.styles?t:null;return n||r||null}function Sl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.skipLookups,r=n===void 0?!1:n,i=null,s=t.reduce(function(o,a){var c=k2(oe.familyPrefix,a);if(to[a]?(a=P2.includes(a)?i2[a]:a,i=a,o.prefix=a):R2.indexOf(a)>-1?(i=a,o.prefix=Cl(a)):c?o.iconName=c:a!==oe.replacementClass&&o.rest.push(a),!r&&o.prefix&&o.iconName){var l=i==="fa"?O_(o.iconName):{},u=Ki(o.prefix,o.iconName);l.prefix&&(i=null),o.iconName=l.iconName||u||o.iconName,o.prefix=l.prefix||o.prefix,o.prefix==="far"&&!to.far&&to.fas&&!oe.autoFetchSvg&&(o.prefix="fas")}return o},fd());return(s.prefix==="fa"||i==="fa")&&(s.prefix=$r()||"fas"),s}var M2=function(){function t(){zA(this,t),this.definitions={}}return WA(t,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),s=0;s0&&u.forEach(function(f){typeof f=="string"&&(n[a][f]=l)}),n[a][c]=l}),n}}]),t}(),Km=[],Gi={},es={},V2=Object.keys(es);function F2(t,e){var n=e.mixoutsTo;return Km=t,Gi={},Object.keys(es).forEach(function(r){V2.indexOf(r)===-1&&delete es[r]}),Km.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),bc(i[o])==="object"&&Object.keys(i[o]).forEach(function(a){n[o]||(n[o]={}),n[o][a]=i[o][a]})}),r.hooks){var s=r.hooks();Object.keys(s).forEach(function(o){Gi[o]||(Gi[o]=[]),Gi[o].push(s[o])})}r.provides&&r.provides(es)}),n}function Mf(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return ur?(wi("beforeI2svg",e),nr("pseudoElements2svg",e),nr("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot;oe.autoReplaceSvg===!1&&(oe.autoReplaceSvg=!0),oe.observeMutations=!0,I2(function(){U2({autoReplaceSvgRoot:n}),wi("watch",e)})}},j2={icon:function(e){if(e===null)return null;if(bc(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ki(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var n=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=Cl(e[0]);return{prefix:r,iconName:Ki(r,n)||n}}if(typeof e=="string"&&(e.indexOf("".concat(oe.familyPrefix,"-"))>-1||e.match(s2))){var i=Sl(e.split(" "),{skipLookups:!0});return{prefix:i.prefix||$r(),iconName:Ki(i.prefix,i.iconName)||i.iconName}}if(typeof e=="string"){var s=$r();return{prefix:s,iconName:Ki(s,e)||e}}}},an={noAuto:$2,config:oe,dom:L2,parse:j2,library:k_,findIconDefinition:Vf,toHtml:qo},U2=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot,r=n===void 0?Be:n;(Object.keys(An.styles).length>0||oe.autoFetchSvg)&&ur&&oe.autoReplaceSvg&&an.dom.i2svg({node:r})};function xl(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(r){return qo(r)})}}),Object.defineProperty(t,"node",{get:function(){if(!!ur){var r=Be.createElement("div");return r.innerHTML=t.html,r.children}}}),t}function B2(t){var e=t.children,n=t.main,r=t.mask,i=t.attributes,s=t.styles,o=t.transform;if(cd(o)&&n.found&&!r.found){var a=n.width,c=n.height,l={x:a/c/2,y:.5};i.style=Al(Q(Q({},s),{},{"transform-origin":"".concat(l.x+o.x/16,"em ").concat(l.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}function q2(t){var e=t.prefix,n=t.iconName,r=t.children,i=t.attributes,s=t.symbol,o=s===!0?"".concat(e,"-").concat(oe.familyPrefix,"-").concat(n):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Q(Q({},i),{},{id:o}),children:r}]}]}function hd(t){var e=t.icons,n=e.main,r=e.mask,i=t.prefix,s=t.iconName,o=t.transform,a=t.symbol,c=t.title,l=t.maskId,u=t.titleId,f=t.extra,h=t.watchable,g=h===void 0?!1:h,S=r.found?r:n,T=S.width,I=S.height,b=i==="fak",R=[oe.replacementClass,s?"".concat(oe.familyPrefix,"-").concat(s):""].filter(function(X){return f.classes.indexOf(X)===-1}).filter(function(X){return X!==""||!!X}).concat(f.classes).join(" "),$={children:[],attributes:Q(Q({},f.attributes),{},{"data-prefix":i,"data-icon":s,class:R,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(T," ").concat(I)})},F=b&&!~f.classes.indexOf("fa-fw")?{width:"".concat(T/I*16*.0625,"em")}:{};g&&($.attributes[bi]=""),c&&($.children.push({tag:"title",attributes:{id:$.attributes["aria-labelledby"]||"title-".concat(u||wo())},children:[c]}),delete $.attributes.title);var W=Q(Q({},$),{},{prefix:i,iconName:s,main:n,mask:r,maskId:l,transform:o,symbol:a,styles:Q(Q({},F),f.styles)}),fe=r.found&&n.found?nr("generateAbstractMask",W)||{children:[],attributes:{}}:nr("generateAbstractIcon",W)||{children:[],attributes:{}},_e=fe.children,ee=fe.attributes;return W.children=_e,W.attributes=ee,a?q2(W):B2(W)}function Gm(t){var e=t.content,n=t.width,r=t.height,i=t.transform,s=t.title,o=t.extra,a=t.watchable,c=a===void 0?!1:a,l=Q(Q(Q({},o.attributes),s?{title:s}:{}),{},{class:o.classes.join(" ")});c&&(l[bi]="");var u=Q({},o.styles);cd(i)&&(u.transform=b2({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=Al(u);f.length>0&&(l.style=f);var h=[];return h.push({tag:"span",attributes:l,children:[e]}),s&&h.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),h}function H2(t){var e=t.content,n=t.title,r=t.extra,i=Q(Q(Q({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),s=Al(r.styles);s.length>0&&(i.style=s);var o=[];return o.push({tag:"span",attributes:i,children:[e]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}var Du=An.styles;function Ff(t){var e=t[0],n=t[1],r=t.slice(4),i=nd(r,1),s=i[0],o=null;return Array.isArray(s)?o={tag:"g",attributes:{class:"".concat(oe.familyPrefix,"-").concat(hi.GROUP)},children:[{tag:"path",attributes:{class:"".concat(oe.familyPrefix,"-").concat(hi.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(oe.familyPrefix,"-").concat(hi.PRIMARY),fill:"currentColor",d:s[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:e,height:n,icon:o}}var z2={found:!1,width:512,height:512};function W2(t,e){!y_&&!oe.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function $f(t,e){var n=e;return e==="fa"&&oe.styleDefault!==null&&(e=$r()),new Promise(function(r,i){if(nr("missingIconAbstract"),n==="fa"){var s=O_(t)||{};t=s.iconName||t,e=s.prefix||e}if(t&&e&&Du[e]&&Du[e][t]){var o=Du[e][t];return r(Ff(o))}W2(t,e),r(Q(Q({},z2),{},{icon:oe.showMissingIcons&&t?nr("missingIconAbstract")||{}:{}}))})}var Ym=function(){},Lf=oe.measurePerformance&&Ea&&Ea.mark&&Ea.measure?Ea:{mark:Ym,measure:Ym},Ls='FA "6.1.2"',K2=function(e){return Lf.mark("".concat(Ls," ").concat(e," begins")),function(){return D_(e)}},D_=function(e){Lf.mark("".concat(Ls," ").concat(e," ends")),Lf.measure("".concat(Ls," ").concat(e),"".concat(Ls," ").concat(e," begins"),"".concat(Ls," ").concat(e," ends"))},dd={begin:K2,end:D_},qa=function(){};function Qm(t){var e=t.getAttribute?t.getAttribute(bi):null;return typeof e=="string"}function G2(t){var e=t.getAttribute?t.getAttribute(id):null,n=t.getAttribute?t.getAttribute(sd):null;return e&&n}function Y2(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(oe.replacementClass)}function Q2(){if(oe.autoReplaceSvg===!0)return Ha.replace;var t=Ha[oe.autoReplaceSvg];return t||Ha.replace}function X2(t){return Be.createElementNS("http://www.w3.org/2000/svg",t)}function J2(t){return Be.createElement(t)}function N_(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.ceFn,r=n===void 0?t.tag==="svg"?X2:J2:n;if(typeof t=="string")return Be.createTextNode(t);var i=r(t.tag);Object.keys(t.attributes||[]).forEach(function(o){i.setAttribute(o,t.attributes[o])});var s=t.children||[];return s.forEach(function(o){i.appendChild(N_(o,{ceFn:r}))}),i}function Z2(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var Ha={replace:function(e){var n=e[0];if(n.parentNode)if(e[1].forEach(function(i){n.parentNode.insertBefore(N_(i),n)}),n.getAttribute(bi)===null&&oe.keepOriginalSource){var r=Be.createComment(Z2(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(e){var n=e[0],r=e[1];if(~ad(n).indexOf(oe.replacementClass))return Ha.replace(e);var i=new RegExp("".concat(oe.familyPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var s=r[0].attributes.class.split(" ").reduce(function(a,c){return c===oe.replacementClass||c.match(i)?a.toSvg.push(c):a.toNode.push(c),a},{toNode:[],toSvg:[]});r[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",s.toNode.join(" "))}var o=r.map(function(a){return qo(a)}).join(` +`);n.setAttribute(bi,""),n.innerHTML=o}};function Xm(t){t()}function M_(t,e){var n=typeof e=="function"?e:qa;if(t.length===0)n();else{var r=Xm;oe.mutateApproach===n2&&(r=Fr.requestAnimationFrame||Xm),r(function(){var i=Q2(),s=dd.begin("mutate");t.map(i),s(),n()})}}var pd=!1;function V_(){pd=!0}function jf(){pd=!1}var Tc=null;function Jm(t){if(!!Bm&&!!oe.observeMutations){var e=t.treeCallback,n=e===void 0?qa:e,r=t.nodeCallback,i=r===void 0?qa:r,s=t.pseudoElementsCallback,o=s===void 0?qa:s,a=t.observeMutationsRoot,c=a===void 0?Be:a;Tc=new Bm(function(l){if(!pd){var u=$r();vs(l).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!Qm(f.addedNodes[0])&&(oe.searchPseudoElements&&o(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&oe.searchPseudoElements&&o(f.target.parentNode),f.type==="attributes"&&Qm(f.target)&&~l2.indexOf(f.attributeName))if(f.attributeName==="class"&&G2(f.target)){var h=Sl(ad(f.target)),g=h.prefix,S=h.iconName;f.target.setAttribute(id,g||u),S&&f.target.setAttribute(sd,S)}else Y2(f.target)&&i(f.target)})}}),ur&&Tc.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function eC(){!Tc||Tc.disconnect()}function tC(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce(function(r,i){var s=i.split(":"),o=s[0],a=s.slice(1);return o&&a.length>0&&(r[o]=a.join(":").trim()),r},{})),n}function nC(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),r=t.innerText!==void 0?t.innerText.trim():"",i=Sl(ad(t));return i.prefix||(i.prefix=$r()),e&&n&&(i.prefix=e,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=D2(i.prefix,t.innerText)||ud(i.prefix,Df(t.innerText))),!i.iconName&&oe.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=t.firstChild.data)),i}function rC(t){var e=vs(t.attributes).reduce(function(i,s){return i.name!=="class"&&i.name!=="style"&&(i[s.name]=s.value),i},{}),n=t.getAttribute("title"),r=t.getAttribute("data-fa-title-id");return oe.autoA11y&&(n?e["aria-labelledby"]="".concat(oe.replacementClass,"-title-").concat(r||wo()):(e["aria-hidden"]="true",e.focusable="false")),e}function iC(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Mn,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Zm(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=nC(t),r=n.iconName,i=n.prefix,s=n.rest,o=rC(t),a=Mf("parseNodeAttributes",{},t),c=e.styleParser?tC(t):[];return Q({iconName:r,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:i,transform:Mn,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:c,attributes:o}},a)}var sC=An.styles;function F_(t){var e=oe.autoReplaceSvg==="nest"?Zm(t,{styleParser:!1}):Zm(t);return~e.extra.classes.indexOf(__)?nr("generateLayersText",t,e):nr("generateSvgReplacementMutation",t,e)}function eg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ur)return Promise.resolve();var n=Be.documentElement.classList,r=function(f){return n.add("".concat(qm,"-").concat(f))},i=function(f){return n.remove("".concat(qm,"-").concat(f))},s=oe.autoFetchSvg?Object.keys(od):Object.keys(sC);s.includes("fa")||s.push("fa");var o=[".".concat(__,":not([").concat(bi,"])")].concat(s.map(function(u){return".".concat(u,":not([").concat(bi,"])")})).join(", ");if(o.length===0)return Promise.resolve();var a=[];try{a=vs(t.querySelectorAll(o))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var c=dd.begin("onTree"),l=a.reduce(function(u,f){try{var h=F_(f);h&&u.push(h)}catch(g){y_||g.name==="MissingIcon"&&console.error(g)}return u},[]);return new Promise(function(u,f){Promise.all(l).then(function(h){M_(h,function(){r("active"),r("complete"),i("pending"),typeof e=="function"&&e(),c(),u()})}).catch(function(h){c(),f(h)})})}function oC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;F_(t).then(function(n){n&&M_([n],e)})}function aC(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:Vf(e||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Vf(i||{})),t(r,Q(Q({},n),{},{mask:i}))}}var cC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Mn:r,s=n.symbol,o=s===void 0?!1:s,a=n.mask,c=a===void 0?null:a,l=n.maskId,u=l===void 0?null:l,f=n.title,h=f===void 0?null:f,g=n.titleId,S=g===void 0?null:g,T=n.classes,I=T===void 0?[]:T,b=n.attributes,R=b===void 0?{}:b,$=n.styles,F=$===void 0?{}:$;if(!!e){var W=e.prefix,fe=e.iconName,_e=e.icon;return xl(Q({type:"icon"},e),function(){return wi("beforeDOMElementCreation",{iconDefinition:e,params:n}),oe.autoA11y&&(h?R["aria-labelledby"]="".concat(oe.replacementClass,"-title-").concat(S||wo()):(R["aria-hidden"]="true",R.focusable="false")),hd({icons:{main:Ff(_e),mask:c?Ff(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:W,iconName:fe,transform:Q(Q({},Mn),i),symbol:o,title:h,maskId:u,titleId:S,extra:{attributes:R,styles:F,classes:I}})})}},lC={mixout:function(){return{icon:aC(cC)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=eg,n.nodeCallback=oC,n}}},provides:function(e){e.i2svg=function(n){var r=n.node,i=r===void 0?Be:r,s=n.callback,o=s===void 0?function(){}:s;return eg(i,o)},e.generateSvgReplacementMutation=function(n,r){var i=r.iconName,s=r.title,o=r.titleId,a=r.prefix,c=r.transform,l=r.symbol,u=r.mask,f=r.maskId,h=r.extra;return new Promise(function(g,S){Promise.all([$f(i,a),u.iconName?$f(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(T){var I=nd(T,2),b=I[0],R=I[1];g([n,hd({icons:{main:b,mask:R},prefix:a,iconName:i,transform:c,symbol:l,maskId:f,title:s,titleId:o,extra:h,watchable:!0})])}).catch(S)})},e.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,s=n.main,o=n.transform,a=n.styles,c=Al(a);c.length>0&&(i.style=c);var l;return cd(o)&&(l=nr("generateAbstractTransformGrouping",{main:s,transform:o,containerWidth:s.width,iconWidth:s.width})),r.push(l||s.icon),{children:r,attributes:i}}}},uC={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,s=i===void 0?[]:i;return xl({type:"layer"},function(){wi("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(a){Array.isArray(a)?a.map(function(c){o=o.concat(c.abstract)}):o=o.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(oe.familyPrefix,"-layers")].concat(Il(s)).join(" ")},children:o}]})}}}},fC={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,s=i===void 0?null:i,o=r.classes,a=o===void 0?[]:o,c=r.attributes,l=c===void 0?{}:c,u=r.styles,f=u===void 0?{}:u;return xl({type:"counter",content:n},function(){return wi("beforeDOMElementCreation",{content:n,params:r}),H2({content:n.toString(),title:s,extra:{attributes:l,styles:f,classes:["".concat(oe.familyPrefix,"-layers-counter")].concat(Il(a))}})})}}}},hC={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,s=i===void 0?Mn:i,o=r.title,a=o===void 0?null:o,c=r.classes,l=c===void 0?[]:c,u=r.attributes,f=u===void 0?{}:u,h=r.styles,g=h===void 0?{}:h;return xl({type:"text",content:n},function(){return wi("beforeDOMElementCreation",{content:n,params:r}),Gm({content:n,transform:Q(Q({},Mn),s),title:a,extra:{attributes:f,styles:g,classes:["".concat(oe.familyPrefix,"-layers-text")].concat(Il(l))}})})}}},provides:function(e){e.generateLayersText=function(n,r){var i=r.title,s=r.transform,o=r.extra,a=null,c=null;if(p_){var l=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();a=u.width/l,c=u.height/l}return oe.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,Gm({content:n.innerHTML,width:a,height:c,transform:s,title:i,extra:o,watchable:!0})])}}},dC=new RegExp('"',"ug"),tg=[1105920,1112319];function pC(t){var e=t.replace(dC,""),n=S2(e,0),r=n>=tg[0]&&n<=tg[1],i=e.length===2?e[0]===e[1]:!1;return{value:Df(i?e[0]:e),isSecondary:r||i}}function ng(t,e){var n="".concat(t2).concat(e.replace(":","-"));return new Promise(function(r,i){if(t.getAttribute(n)!==null)return r();var s=vs(t.children),o=s.filter(function(fe){return fe.getAttribute(kf)===e})[0],a=Fr.getComputedStyle(t,e),c=a.getPropertyValue("font-family").match(o2),l=a.getPropertyValue("font-weight"),u=a.getPropertyValue("content");if(o&&!c)return t.removeChild(o),r();if(c&&u!=="none"&&u!==""){var f=a.getPropertyValue("content"),h=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?wc[c[2].toLowerCase()]:a2[l],g=pC(f),S=g.value,T=g.isSecondary,I=c[0].startsWith("FontAwesome"),b=ud(h,S),R=b;if(I){var $=N2(S);$.iconName&&$.prefix&&(b=$.iconName,h=$.prefix)}if(b&&!T&&(!o||o.getAttribute(id)!==h||o.getAttribute(sd)!==R)){t.setAttribute(n,R),o&&t.removeChild(o);var F=iC(),W=F.extra;W.attributes[kf]=e,$f(b,h).then(function(fe){var _e=hd(Q(Q({},F),{},{icons:{main:fe,mask:fd()},prefix:h,iconName:R,extra:W,watchable:!0})),ee=Be.createElement("svg");e==="::before"?t.insertBefore(ee,t.firstChild):t.appendChild(ee),ee.outerHTML=_e.map(function(X){return qo(X)}).join(` +`),t.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function mC(t){return Promise.all([ng(t,"::before"),ng(t,"::after")])}function gC(t){return t.parentNode!==document.head&&!~r2.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(kf)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function rg(t){if(!!ur)return new Promise(function(e,n){var r=vs(t.querySelectorAll("*")).filter(gC).map(mC),i=dd.begin("searchPseudoElements");V_(),Promise.all(r).then(function(){i(),jf(),e()}).catch(function(){i(),jf(),n()})})}var yC={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=rg,n}}},provides:function(e){e.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Be:r;oe.searchPseudoElements&&rg(i)}}},ig=!1,vC={mixout:function(){return{dom:{unwatch:function(){V_(),ig=!0}}}},hooks:function(){return{bootstrap:function(){Jm(Mf("mutationObserverCallbacks",{}))},noAuto:function(){eC()},watch:function(n){var r=n.observeMutationsRoot;ig?jf():Jm(Mf("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},sg=function(e){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,i){var s=i.toLowerCase().split("-"),o=s[0],a=s.slice(1).join("-");if(o&&a==="h")return r.flipX=!0,r;if(o&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(o){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},_C={mixout:function(){return{parse:{transform:function(n){return sg(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=sg(i)),n}}},provides:function(e){e.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,s=n.containerWidth,o=n.iconWidth,a={transform:"translate(".concat(s/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),l="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),u="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(c," ").concat(l," ").concat(u)},h={transform:"translate(".concat(o/2*-1," -256)")},g={outer:a,inner:f,path:h};return{tag:"g",attributes:Q({},g.outer),children:[{tag:"g",attributes:Q({},g.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Q(Q({},r.icon.attributes),g.path)}]}]}}}},Nu={x:0,y:0,width:"100%",height:"100%"};function og(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function bC(t){return t.tag==="g"?t.children:[t]}var wC={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),s=i?Sl(i.split(" ").map(function(o){return o.trim()})):fd();return s.prefix||(s.prefix=$r()),n.mask=s,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(e){e.generateAbstractMask=function(n){var r=n.children,i=n.attributes,s=n.main,o=n.mask,a=n.maskId,c=n.transform,l=s.width,u=s.icon,f=o.width,h=o.icon,g=_2({transform:c,containerWidth:f,iconWidth:l}),S={tag:"rect",attributes:Q(Q({},Nu),{},{fill:"white"})},T=u.children?{children:u.children.map(og)}:{},I={tag:"g",attributes:Q({},g.inner),children:[og(Q({tag:u.tag,attributes:Q(Q({},u.attributes),g.path)},T))]},b={tag:"g",attributes:Q({},g.outer),children:[I]},R="mask-".concat(a||wo()),$="clip-".concat(a||wo()),F={tag:"mask",attributes:Q(Q({},Nu),{},{id:R,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[S,b]},W={tag:"defs",children:[{tag:"clipPath",attributes:{id:$},children:bC(h)},F]};return r.push(W,{tag:"rect",attributes:Q({fill:"currentColor","clip-path":"url(#".concat($,")"),mask:"url(#".concat(R,")")},Nu)}),{children:r,attributes:i}}}},EC={provides:function(e){var n=!1;Fr.matchMedia&&(n=Fr.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Q(Q({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var o=Q(Q({},s),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Q(Q({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Q(Q({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Q(Q({},o),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:Q(Q({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Q(Q({},o),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Q(Q({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Q(Q({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},TC={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),s=i===null?!1:i===""?!0:i;return n.symbol=s,n}}}},IC=[E2,lC,uC,fC,hC,yC,vC,_C,wC,EC,TC];F2(IC,{mixoutsTo:an});an.noAuto;var $_=an.config,AC=an.library;an.dom;var Ic=an.parse;an.findIconDefinition;an.toHtml;var CC=an.icon;an.layer;var SC=an.text;an.counter;function ag(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Tn(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function PC(t,e){if(t==null)return{};var n=xC(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function Uf(t){return RC(t)||OC(t)||kC(t)||DC()}function RC(t){if(Array.isArray(t))return Bf(t)}function OC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function kC(t,e){if(!!t){if(typeof t=="string")return Bf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bf(t,e)}}function Bf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(c){return md(c)}),i=Object.keys(t.attributes||{}).reduce(function(c,l){var u=t.attributes[l];switch(l){case"class":c.class=$C(u);break;case"style":c.style=FC(u);break;default:c.attrs[l]=u}return c},{attrs:{},class:{},style:{}});n.class;var s=n.style,o=s===void 0?{}:s,a=PC(n,VC);return sn(t.tag,Tn(Tn(Tn({},e),{},{class:i.class,style:Tn(Tn({},i.style),o)},i.attrs),a),r)}var j_=!1;try{j_=!0}catch{}function LC(){if(!j_&&console&&typeof console.error=="function"){var t;(t=console).error.apply(t,arguments)}}function no(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Qt({},t,e):{}}function jC(t){var e,n=(e={"fa-spin":t.spin,"fa-pulse":t.pulse,"fa-fw":t.fixedWidth,"fa-border":t.border,"fa-li":t.listItem,"fa-inverse":t.inverse,"fa-flip":t.flip===!0,"fa-flip-horizontal":t.flip==="horizontal"||t.flip==="both","fa-flip-vertical":t.flip==="vertical"||t.flip==="both"},Qt(e,"fa-".concat(t.size),t.size!==null),Qt(e,"fa-rotate-".concat(t.rotation),t.rotation!==null),Qt(e,"fa-pull-".concat(t.pull),t.pull!==null),Qt(e,"fa-swap-opacity",t.swapOpacity),Qt(e,"fa-bounce",t.bounce),Qt(e,"fa-shake",t.shake),Qt(e,"fa-beat",t.beat),Qt(e,"fa-fade",t.fade),Qt(e,"fa-beat-fade",t.beatFade),Qt(e,"fa-flash",t.flash),Qt(e,"fa-spin-pulse",t.spinPulse),Qt(e,"fa-spin-reverse",t.spinReverse),e);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function cg(t){if(t&&Ac(t)==="object"&&t.prefix&&t.iconName&&t.icon)return t;if(Ic.icon)return Ic.icon(t);if(t===null)return null;if(Ac(t)==="object"&&t.prefix&&t.iconName)return t;if(Array.isArray(t)&&t.length===2)return{prefix:t[0],iconName:t[1]};if(typeof t=="string")return{prefix:"fas",iconName:t}}var UC=vl({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(e){return[!0,!1,"horizontal","vertical","both"].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return["right","left"].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(Number.parseInt(e,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(e)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(e,n){var r=n.attrs,i=fn(function(){return cg(e.icon)}),s=fn(function(){return no("classes",jC(e))}),o=fn(function(){return no("transform",typeof e.transform=="string"?Ic.transform(e.transform):e.transform)}),a=fn(function(){return no("mask",cg(e.mask))}),c=fn(function(){return CC(i.value,Tn(Tn(Tn(Tn({},s.value),o.value),a.value),{},{symbol:e.symbol,title:e.title}))});La(c,function(u){if(!u)return LC("Could not find one or more icon(s)",i.value,a.value)},{immediate:!0});var l=fn(function(){return c.value?md(c.value.abstract[0],{},r):null});return function(){return l.value}}});vl({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(e,n){var r=n.slots,i=$_.familyPrefix,s=fn(function(){return["".concat(i,"-layers")].concat(Uf(e.fixedWidth?["".concat(i,"-fw")]:[]))});return function(){return sn("div",{class:s.value},r.default?r.default():[])}}});vl({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(e){return["bottom-left","bottom-right","top-left","top-right"].indexOf(e)>-1}}},setup:function(e,n){var r=n.attrs,i=$_.familyPrefix,s=fn(function(){return no("classes",[].concat(Uf(e.counter?["".concat(i,"-layers-counter")]:[]),Uf(e.position?["".concat(i,"-layers-").concat(e.position)]:[])))}),o=fn(function(){return no("transform",typeof e.transform=="string"?Ic.transform(e.transform):e.transform)}),a=fn(function(){var l=SC(e.value.toString(),Tn(Tn({},o.value),s.value)),u=l.abstract;return e.counter&&(u[0].attributes.class=u[0].attributes.class.replace("fa-layers-text","")),u[0]}),c=fn(function(){return md(a.value,{},r)});return function(){return c.value}}});/*! + * Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2022 Fonticons, Inc. + */var U_={prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M504 256C504 119 393 8 256 8S8 119 8 256c0 123.8 90.69 226.4 209.3 245V327.7h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.3 482.4 504 379.8 504 256z"]},B_={prefix:"fab",iconName:"instagram",icon:[448,512,[],"f16d","M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]},q_={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]};AC.add(B_,U_,q_);const BC={components:{GavelLogo:HA,FontAwesomeIcon:UC},data(){return{footer_menus:[{title:"Contact",links:[{text:"Umesha Tilakarathna : +94 77 067 6760",href:"tel: +94 77 067 6760"},{text:"Inodee Fernando : +94 76 603 3004",href:"tel: +94 76 603 3004"},{text:"Email : speecholympiadxv@gmail.com",href:"mailto: speecholympiadxv@gmail.com"}]}],social_media_profiles:[{profile:"instagram",icon:B_,link:"https://www.instagram.com/gavelmora_"},{profile:"facebook",icon:U_,link:"https://www.facebook.com/gavelmora/"},{profile:"linkedin",icon:q_,link:"https://www.linkedin.com/company/gavel-club-of-university-of-moratuwa/"}]}}},gd=t=>(ar("data-v-b0b4f552"),t=t(),cr(),t),qC={class:"container-fluid app-footer"},HC={class:"row"},zC={class:"col-12 col-md-3 d-flex align-items-center justify-content-center justify-content-md-start my-md-0 my-4"},WC={class:"col-12 col-md-9"},KC={class:"row justify-content-end"},GC={class:"col-md-4 col-12 text-center text-md-start"},YC={class:"footer-menu-title mt-2 mb-1"},QC={class:"row"},XC={class:"col-12"},JC=["href"],ZC={class:""},eS=gd(()=>d("div",{class:"row"},[d("div",{class:"col"},[d("hr")])],-1)),tS={class:"row"},nS=gd(()=>d("div",{class:"col-md-4 col-12 d-flex justify-content-center justify-content-md-start align-items-center order-last order-md-first my-2 my-lg-0"},[d("span",null,"\xA9 Speech Olympiad 2022")],-1)),rS={class:"col-md-8 col-12 order-first order-md-last"},iS={class:"row"},sS=gd(()=>d("div",{class:"col-12 col-md-6 my-2 my-md-0 d-flex justify-content-center justify-content-md-end align-items-center"},[d("span",null,"Follow us on")],-1)),oS={class:"col my-2 my-md-0 d-flex justify-content-center"},aS=["href"];function cS(t,e,n,r,i,s){const o=Qe("GavelLogo"),a=Qe("FontAwesomeIcon");return Y(),Z("div",qC,[d("div",HC,[d("div",zC,[ge(o)]),d("div",WC,[d("div",KC,[(Y(!0),Z($e,null,$n(i.footer_menus,c=>(Y(),Z("div",GC,[d("div",YC,Ke(c.title),1),d("div",QC,[(Y(!0),Z($e,null,$n(c.links,l=>(Y(),Z("div",XC,[d("a",{href:l.href,class:"footer-link"},[d("span",ZC,Ke(l.text),1)],8,JC)]))),256))])]))),256))])])]),eS,d("div",tS,[nS,d("div",rS,[d("div",iS,[sS,(Y(!0),Z($e,null,$n(i.social_media_profiles,c=>(Y(),Z("div",oS,[d("a",{href:c.link},[ge(a,{icon:c.icon,size:"2x",class:"icon-color"},null,8,["icon"])],8,aS)]))),256))])])])])}const lS=He(BC,[["render",cS],["__scopeId","data-v-b0b4f552"]]),lg=()=>{let t=window.location.hash.slice(1);return["","about","champions-story","technical-tips"].indexOf(t)},uS={data(){return{items:[{name:"Home",url:"#",newTab:!1},{name:"About",url:"#about",newTab:!1},{name:"Champion's Story",url:"#champions-story",newTab:!1},{name:"Technical Tips",url:"#technical-tips",newTab:!1},{name:"Gallery",url:"#gallery",newTab:!1},{name:"Rules & Regulations",url:"https://bit.ly/SOXV_Rules",newTab:!0},{name:"Blogs",url:"#blogs",newTab:!1},{name:"Register",url:"#form2",newTab:!1}],activeItem:lg()}},methods:{clickHandler(t){window.matchMedia("(max-width: 768px)").matches&&document.querySelector(".navbar-toggler").click()}},mounted(){window.addEventListener("hashchange",()=>{window.location.hash.slice(1),this.activeItem=lg()})}},fS=["onClick"],hS=["href","target"];function dS(t,e,n,r,i,s){return Y(!0),Z($e,null,$n(i.items,(o,a)=>(Y(),Z("li",{class:"nav-item",key:a,style:{padding:"1px",border:"none"}},[d("div",{onClick:c=>s.clickHandler(a),class:_i({"font-bold text-gray-400":a===i.activeItem})},[d("a",{class:"nav-link",href:o.url,target:o.newTab?"_blank":""},Ke(o.name),9,hS)],10,fS)]))),128)}const pS=He(uS,[["render",dS]]),mS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAA5ESURBVHhe7ZsJjFXVGceZ4c0mKqAIIihQFREiVupKalUUVNqapsGNpRq1jUZS0dpapda2MbVRsIaqsVWsimJBI61KsRKQRWlxwwUVBy0WXMBlGEeYfYb+/ud998698+5784ZhRmzPP/nnO+c739nuWe5Z7u3m4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eGRiQKTO4Xm5uYSxNfhK7AYHgabCgoK3oNbCT8Yf01hYeGHSI880KEG2bFjRwEPfRlyIQ99AHJPGiKFbl0qlboJuQazqwlbko7h0RY61CBCbW3t4cXFxStwVtMYR9IoJ+D+OZwIX0A3EDbjVgP2hpfhPBMeArvDDfApeCcNtwXp0NDQcBb+UeYNYWlpxC0m/D9OCWj8k0j7FPNmBfFfI95j2I/C/ixTZwU2G+hc95vXgbhHISbBkVCzxGa4Cs4l7U+QDsQ9CNuL5CbfNwmb7wIMhJUhfopdIeEVhM9Kh3QAJFZMwu/A5bg1YsrgZjgV3mFmyvxguBGbRBBWAcMHivtuC0oE4Q1wupnL/noLygnsHjT7S0yVE9iFoxtvIf4ZsDkdmoFK+D0z71ZfX//NtNql86ipQ6DbBzZY+DvSFbqQDoC0foZ4G6neP5lWrsG/EN5Aqz9sNhqJ9+E/0Pwvw9vgLPiadIT1RjyCv5f8UaDbBrca66TDPgVvpCLfcUYRYNMI65NInEYzC4G+qbVdhKE97huJ/xNYgFsoR72cMgSjoie6efiPNX/Xgsx7k/liqN4/Bj6Grgj5LfgEbjcl4h6E2wH344hwqsRd2NTUNNcFAsIvkR4ZjhDc450xwFuKXw0ZwE0D6MIRgvsHCD20RJp9OEJwX4NItBVlr6kZOzW07DU6p0gvoNIscZfCBNwrpe/yEUJH2cqIGAvfhUvh99E1IFfA76ojmWk/k8KGiF5pNMNbKNNDIqov0iHJwLa2rq7u9+bVwxhizhiURzaaSQxJdgEVznvyYtx65wn3U7855lbcesSVlOUzKPvj9LBdYDvR4SkrH1BgvTvcix1cSmFvh2PRuemJyq2Bmu7Eec4qB0pKSvQyDNBkMor9SX9oAg8lz6Q690mwdcQ+JQPqcLKzTONekyEodw02h+LcH2oh87kLaEE/0hsXJTq9M8PZoktBxebDGChUPXwFzoRaJYUPC390ypoEVSFxOFxkQQpzKyBkmy91bOrgXmaf70s9eO/phR2UOa/eH52y2gJp7pqXejtwIfneAavMr15XBI+EV8FlqJYSnvFSB5oetNT9ELs34BlSqh6I2XJ3NnhgriGBNr615t7l6LIGoRLVDOupyH48yPFU8CakGiD6ztAoudXcIYgjaK0elhe7jxEXkab2QDEQNgOe0ZoE6b2mVWAMhN3b2jYg9m4FhQw6kt4j2nu0C6SlvZbed1EehT5pyu1ckGkhLDbGOkF5eXkJjaP3SrCC2SIbZHQf8jv85xonwOPRubk9ALrYKsvUWYFNbJVl6qzA5nkzl702vxlAPxleCafBsi9lH5IPWNZeitD+oY68r3ZKw9ChQ+vofX/EuUF+3Op9wWrGgThatc0zPgr/hV3GfqIzQRmeMaeg04YYeKADEX+mXBrh1yAbXEA70SUNQmFfNKcqdjl+rV7c6gKp0aN9hlu+4l6/s5WJQKsp9c4MkrdGV+uVzeDWdq2o6VIjNiiXFhnTYZnCkGqMudgEo/YB3F3aYdoFCq0jlYVIB9zaWL3FyFmNDI9TcDdCd76ETNwYZgM2+R6dVCF0AJrXKsuwh+Vxnfkd8H8BN0E37Qi4y+Hest9tpyx6izZL55HvPKhVio49hjH1HIt0y0oKpJfmj9A9Lv/uCMqqhYgaxS0M8Ot0W3sONzLQv4j7NOoQriTbiy7flNTW1h7GrlfnT4dQeA15baBexf0YrHRGgAYagRggN/qX4adyZ0NNTc3BbBh1/9IW1CGWVldXDygrKxtuupzAfgkMV0OUrT/iPHgE1OjRae9ibJ6K2lG3XjA419pCQ71qbgfCiqA2nAWNjY01PJeViQ1ChiUkfKISg9p5agW0iQRXoVcvSFyqYVPIgxlYWlpa2ZFesjuAZ7Afoph6fJDWdB7ISxvNUvKKX+TxQNVSE5nbP8BoB7IBboafwCbTrUPqPiMD6PcmXCsp3Yd8pUE9/g43q5OZqtNAPndDt8oMM1Nj8EB/Qys9xAjQNDIRd2/YH/aFOiDU8lX7hoXwCsVLAol/Oeczux5dUg+etxPOE4AGOZsH2Qyf5mFHD+9isFGwDGrEnGpqBwurY5Rda6qvLLZv3z6Q+uTzTuowyEcj5D3zOsVeKDQ1ba6srGzz4IzG64Ptx/At3OEm7n+pQboS0QYJpqxJDJt+8OZevXpVmC4rsPuUhpiJHIb8tqkzQEb9RfMmgnCttHT3LLkn8kCkLoYKWcfrXmEqDTytoaFBZ0v6ssUBdwrdyYRdgY2OKk5HV2TBDkpH6VVUVPQ0v45uTiOOjjd0xXwqTDyXQr8vTCw7+r5QRzhXKX/KcSbpur1KNhCui7VxVt4f4z8ZxsobAoNnaKFaDHSNmhew/RpxNMWFHwCQTmyEKKytdAn/FdT0NwRejlObxkHIxdKDSqgNmBYUuvrtzUpuiNwKBNHw55FuUyZguwc6bTavh8fjXg+1UNkKt1scLWAyFinoVPb15nUgvRS6m2EtrIdKpwrqOXxMnMTOSYOdTviHlt82qDKrzuvhCbBlhJCJ1sJH415Lj98qZZ7QqkB7g+OcLwGkdz9UDzw7rYmDfDVCdRX6HIsGt8oAGh26i9+DuEeh31ekwBPQjaDwd7JeX4S7ivCRCkPqgulcdPpGLGO6JD2N5Kdx/gPbgyzN/XCfg075/U2j0RnnAHn8AqHPmm4j7gBLR9TXMR+p3Njs64wN+I/B9gmc25Bjoez7QO2z1qlcsGU/xMvrACKp5dzXGO0BcZ6FGgFuhUA6sRGCvjv+jTDjiFzAXr1DxwY/NL/OuVSW14lb6owiQD/Xwl8iPJy+AqCfD982bzhCoHrwnaaOgfSGEqZeu9xUDuhjI0T54VfP/qupYsBe06vqog2jA3H0vcBqWKFFgqlDEK4Rp28SVKf0COnevbubX2m5zyTbCY0ozYOJqzLS1K5YU9poMh2U1raAAk2Guvp8xFQO9J4/oMu4BELndrrEmYVb99gxWHj/tWvXtm4s3cWEnwxFgb6ceHfhPJEyumOcJJDnYISmndg3WhG8adKdLgjE0U5eI+SOHj16vJ/WtgB9I5yGXXjPX8jwd7tudLH7hTzhFgXEzXXJ8gDUiejktDcN4mgEnA+fpFDhkYkh24hy+dCJYr05Ap2wpkaMGBGrC+kvhbmm40WEawFwvPkzoIYj3+FFRUULTBWCumgk6I5cZQz3drhPUro4Yx0uCtJ9A/FW2oe/qqoqOCPKuRrKAsX5gkTdt1JJIEzD/p+UayIFDzc/TGuaT/UZUfj1hqDGhVm/BSZMIyPnuVYCwgpnQfAFZNYREoD8S7Xio9zX0Qj3QvddFo2VcZpL3bVQaaCeOfMnXN9GOxT27NlTl/ebUR6BjO8Wc4CMNE3pZRQM1awgXY2Sw+GRTgEo7BT0W1KplF7QUWj4hkM4Ae6rQXPnBcpabc5sCKbHjPdSFKSjG8GNlP1JiqBbSU1jm3h2M5BjZBMFNmWEKe3gi5tsCK+VdfGi76KWEHkIVAZ5gZ6h4ahDyKWmygp6jz5m08v/AvmplDafuveYT/xOv8ghjz7mzAb3HqWcWfdglFl7DXUs3VYOxnYYHAP16dJN6FanLVuATt8LaH+V83VAuA4yHdx8R0R95tmdgGlO2wawK6AQ2tw0sVyMTTlJIG3N3/qS8Ryowun712KmrfsU3gUYbTIRPOxvSDIVve4UCaDcOsf7nLqcT90zXtCE9zBnFFowqL4u/STY8wjfXcELSF9/6PPHS3nAx6RV2YGtere+4vhLaWlpuMzMBQqm++YDiHsKvBDVmywo9LtCp4N8R+n2zrwxUBaCC3R7+BEv7BdMnYT+2P2bxthu/tbImLKAnqumWPd5bBII05ctfc0bjhBNW4pUwxB8nMInrjZUeHrTeKQ++XyfwuU1ogTSV+F0nH093tH4darcrnfBzoI8G6nXPZQ9nBoE1Yepdxrl0N3PLchc02c5NodXV1dnvPhJV+9f9/kSz8TpBNzvInQDegE22rjGgE7/1NwOw6kyjE3kcqibvBSF14ZvAREuZhiPgTr/uQy/dpVPYqPbr3FUIO/VDrb68nyOKo+3uaamRvNxV+FPUDvyNdThaqhV0iT8CyjPTOTT1DnnvxnYuQdeUlKyimcxVcchyCk8pznEf5HnMYc0t2EyFr32V26BRLypiA/wz8X2QcLOxm48cjq6NYS/RHjiZtMB435EnAX1j4d2niHRbYC/JqE9zTwGbHoQvhKZ+F0U+pGWTuJCgEpOIOw50k88qCOuLs9WIBM3oui1ctMfXW6Xr3SwD86ydIowA27BHdRnI/IG7DIO+dD/kvDY/oGZ42h0K6DSVPw6uAy324PwkG/Ar8s8nSSEnZ1wPdN74KeKZ3F1jqX3sPZo1+LP2N/EgKF61GAKoR2sdtr9pbPgnQJpjIU7KPjFpupUUN6wQUzl6oW/L1L/s+xUfZQuaeh9mLFMzpWmwoinU+R9djbvXQoezmyon0GTViS7HHpwrRtkd0fLG6iTwUPRP4U6KpnNfJttpfJ/j05vEKYnzY8P01ufxat1/G/TIR5J6IoRoqWtjlj0R64+ImvzRnIXQkcW62B7z748PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PLKgW7f/Aom0nnjYWeTKAAAAAElFTkSuQmCC";const gS={data(){return{logo:{filename:mS,alt:"Speech Olympiad Logo"}}}},yS=["src","alt"];function vS(t,e,n,r,i,s){return Y(),Z("img",{src:i.logo.filename,alt:i.logo.alt,class:"logo"},null,8,yS)}const H_=He(gS,[["render",vS],["__scopeId","data-v-f53a5274"]]);const _S={components:{AppHeaderMenu:pS,SOLogo:H_},data(){return{mobileNavOpen:!1}}},z_=t=>(ar("data-v-9047eda8"),t=t(),cr(),t),bS={class:"headerbar"},wS={class:"bg-dark"},ES={class:"container mx-auto px-4 py-2"},TS={class:"flex items-center justify-between"},IS={id:"logo",class:"w-8 h-8 md:w-20 md:h-8"},AS={class:"navbar-brand",href:"/#"},CS=z_(()=>d("span",{class:"sr-only"},"Toggle navigation",-1)),SS=z_(()=>d("svg",{class:"h-6 w-6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[d("path",{d:"M4 6h16M4 12h16m-7 6h7"})],-1)),xS=[CS,SS],PS={class:"hidden md:block"},RS={class:"flex space-x-4"},OS={class:"px-2 pt-2 pb-4 space-y-2"};function kS(t,e,n,r,i,s){const o=Qe("SOLogo"),a=Qe("AppHeaderMenu");return Y(),Z("div",bS,[d("nav",wS,[d("div",ES,[d("div",TS,[d("div",IS,[d("a",AS,[ge(o,{class:"w-full h-full"})])]),d("button",{class:"block md:hidden text-white hover:text-gray-300 focus:outline-none",type:"button",onClick:e[0]||(e[0]=c=>i.mobileNavOpen=!i.mobileNavOpen)},xS),d("div",PS,[d("ul",RS,[ge(a)])])])]),d("div",{class:_i(["md:hidden bg-dark",{block:i.mobileNavOpen,hidden:!i.mobileNavOpen}])},[d("ul",OS,[ge(a)])],2)])])}const DS=He(_S,[["render",kS],["__scopeId","data-v-9047eda8"]]),NS="/assets/HomePage_carousel1_mobile.b250e0bf.jpg",MS="/assets/HomePage_carousel1_desktop.5161a5a6.jpg",VS="/assets/HomePage_carousel2_mobile.ce3ab877.jpg",FS="/assets/HomePage_carousel2_desktop.de5596f9.jpg",$S="/assets/HomePage_carousel3_mobile.a28d55c7.jpg",LS="/assets/HomePage_carousel3_desktop.fc478a3e.jpg";const jS={data(){return{HomePage_carousel1_mobile:NS,HomePage_carousel1_desktop:MS,HomePage_carousel2_mobile:VS,HomePage_carousel2_desktop:FS,HomePage_carousel3_mobile:$S,HomePage_carousel3_desktop:LS}},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},US=t=>(ar("data-v-1b8604e1"),t=t(),cr(),t),BS={id:"myCarousel",class:"carousel slide","data-bs-ride":"carousel"},qS=US(()=>d("div",{class:"carousel-indicators"},[d("button",{type:"button","data-bs-target":"#myCarousel","data-bs-slide-to":"0",class:"active","aria-current":"true","aria-label":"Slide 1"}),d("button",{type:"button","data-bs-target":"#myCarousel","data-bs-slide-to":"1","aria-label":"Slide 2"}),d("button",{type:"button","data-bs-target":"#myCarousel","data-bs-slide-to":"2","aria-label":"Slide 3"})],-1)),HS={class:"carousel-inner"},zS={class:"carousel-item active"},WS=["src"],KS={class:"carousel-item"},GS=["src"],YS={class:"carousel-item"},QS=["src"],XS=Zh('',2);function JS(t,e,n,r,i,s){return Y(),Z("div",BS,[qS,d("div",HS,[d("div",zS,[d("img",{src:s.isMobile?i.HomePage_carousel1_mobile:i.HomePage_carousel1_desktop,alt:"","aria-hidden":"true",loading:"eager"},null,8,WS)]),d("div",KS,[d("img",{src:s.isMobile?i.HomePage_carousel2_mobile:i.HomePage_carousel2_desktop,alt:"","aria-hidden":"true",loading:"lazy"},null,8,GS)]),d("div",YS,[d("img",{src:s.isMobile?i.HomePage_carousel3_mobile:i.HomePage_carousel3_desktop,alt:"","aria-hidden":"true",loading:"lazy"},null,8,QS)])]),XS])}const ZS=He(jS,[["render",JS],["__scopeId","data-v-1b8604e1"]]);const ex=4,tx={name:"AppGallery",props:{galleryName:String,images:Array,showLink:Boolean},data(){return{currentImage:""}},computed:{previewImage(){return this.currentImage!==""?this.currentImage:""},isShowModal(){return this.currentImage!==""}},mounted(){},methods:{closeModal(t){t.target.tagName!=="IMG"&&this._setCurrentImage("")},getImages(){return console.log(this.images),this.images},preview(t){this._setCurrentImage(t)},getShowLink(){return console.log(this.showLink),this.showLink==null?!1:this.showLink},getOrder(t){return"--order:"+t%ex+";"},_setCurrentImage(t){this.currentImage=t}}},W_=t=>(ar("data-v-e4372cd0"),t=t(),cr(),t),nx={class:"row gallery"},rx=["onClick"],ix=W_(()=>d("h5",{class:"center"},"See full image",-1)),sx=[ix],ox=["src"],ax={key:0,class:"col-sm-12 col-md-3 link-container"},cx=W_(()=>d("a",{class:"gallery-link",href:"#gallery"},"View Gallery",-1)),lx=[cx],ux={class:"img-modal"},fx=["src"];function hx(t,e,n,r,i,s){return Y(),Z($e,null,[d("div",nx,[(Y(!0),Z($e,null,$n(s.getImages(),(o,a)=>(Y(),Z("div",{class:"img-container",style:ol(s.getOrder(a)),key:a},[d("div",{onClick:c=>s.preview(o),class:"overlay"},sx,8,rx),d("img",{src:o,class:"center",alt:"",loading:"lazy"},null,8,ox)],4))),128)),s.getShowLink()?(Y(),Z("div",ax,lx)):ut("",!0)]),Jt(d("div",ux,[d("button",{onClick:e[0]||(e[0]=(...o)=>s.closeModal&&s.closeModal(...o)),type:"button",class:"btn-close btn-close-white","aria-label":"Close"}),d("img",{src:s.previewImage,class:"center",loading:"lazy"},null,8,fx)],512),[[MA,s.isShowModal]])],64)}const K_=He(tx,[["render",hx],["__scopeId","data-v-e4372cd0"]]);const dx={name:"AppFeaturette",props:{index:Number,heading:String,headingEnd:String,text:String,image:String,urlString:String},methods:{getOrder(t,e){return t%2===0&&e===0||t%2===1&&e===1?"order-md-first":"order-md-last"}}},px=t=>(ar("data-v-1b85b7fd"),t=t(),cr(),t),mx={class:"row featurette"},gx={class:"featurette-heading"},yx={class:"nav-link"},vx={class:"text-muted"},_x={class:"lead"},bx=["href"],wx=["src"],Ex=px(()=>d("hr",{class:"featurette-divider"},null,-1));function Tx(t,e,n,r,i,s){return Y(),Z($e,null,[d("div",mx,[d("div",{class:_i("col-md-7 "+s.getOrder(n.index,0))},[d("h2",gx,[d("div",yx,[Xn(Ke(n.heading)+" ",1),d("span",vx,Ke(n.headingEnd),1)])]),d("p",_x,Ke(n.text),1),d("div",null,[d("a",{class:"read-more btn btn-secondary mb-3",href:n.urlString},"Read more",8,bx)])],2),d("div",{class:_i("col-md-5 "+s.getOrder(n.index,1))},[d("img",{class:"bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto w-1/2",src:n.image,alt:"",loading:"lazy"},null,8,wx)],2)]),Ex],64)}const G_=He(dx,[["render",Tx],["__scopeId","data-v-1b85b7fd"]]);const Ix={name:"TestimonialCard",props:{imageSrc:String,title:String,subtitle:String,body:String}},Ax={class:"card testimonial-card mb-3 md-lg-0"},Cx={class:"row mt-3"},Sx={class:"col d-flex justify-content-center my-4"},xx=["src"],Px={class:"card-body"},Rx={class:"card-title text-left testimonial-card-heading"},Ox={class:"card-subtitle mb-2 text-muted"},kx={class:"card-text text-left testimonial-card-body"};function Dx(t,e,n,r,i,s){return Y(),Z("div",Ax,[d("div",Cx,[d("div",Sx,[d("img",{alt:"",src:n.imageSrc,class:"testimonial-card-img",loading:"lazy"},null,8,xx)])]),d("div",Px,[d("h5",Rx,Ke(this.title),1),d("h6",Ox,Ke(this.subtitle),1),d("p",kx,'"'+Ke(this.body)+'"',1)])])}const Y_=He(Ix,[["render",Dx],["__scopeId","data-v-aefe8af5"]]);let Nx={name:"Doodle",mounted(){this.setColorScheme(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.colorScheme=t.matches?"dark":"light"}),this.paths=this.$el.querySelectorAll("path"),this.paths.forEach(t=>{this.setPathStrokeColor(t),this.drawPath(t)})},watch:{colorScheme(){this.paths.forEach(t=>this.setPathStrokeColor(t))}},data(){return{colorScheme:null,paths:[]}},methods:{setColorScheme:function(){window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?this.colorScheme="dark":this.colorScheme="light"},setPathStrokeColor:function(t){t.style.stroke=this.colorScheme==="dark"?"white":"black"},drawPath:function(t){let e=t.getTotalLength();t.style.strokeDasharray=e,t.style.strokeDashoffset=e,window.addEventListener("scroll",function(n){let r=(document.documentElement.scrollTop+document.body.scrollTop)/(document.documentElement.scrollHeight-document.documentElement.clientHeight),i=e*r;t.style.strokeDashoffset=e-i,r>=.99?t.style.strokeDasharray=0:t.style.strokeDasharray=e})}}};const Mx=Nx,Vx={id:"doodle"},Fx=Zh('',1),$x=[Fx];function Lx(t,e,n,r,i,s){return Y(),Z("div",Vx,$x)}const jx=He(Mx,[["render",Lx],["__scopeId","data-v-c108975c"]]),Ux="/assets/HomePage_About.c100ebcf.jpg",Bx="/assets/HomePage_testimonial_sirimevan.c43b09f7.jpg",qx="/assets/HomePage_testimonial_malindi.518dfdf3.jpeg",Hx="/assets/HomePage_testimonial_amaya.3226fc94.jpg",zx="/assets/HomePage_testimonial_asitha.589462e3.jpg",Q_="/assets/prelis1.c5d4e42a.jpg",X_="/assets/prelis2.0d38f998.jpg",J_="/assets/prelis3.96cac351.jpg";function Wx(t){const e=new IntersectionObserver(r=>{r.forEach(i=>{i.isIntersecting?i.target.classList.add("animated-show"):i.target.classList.remove("animated-show")})});document.querySelectorAll(t).forEach(r=>e.observe(r))}const Kx="modulepreload",Gx=function(t){return"/"+t},ug={},Yx=function(e,n,r){return!n||n.length===0?e():Promise.all(n.map(i=>{if(i=Gx(i),i in ug)return;ug[i]=!0;const s=i.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${o}`))return;const a=document.createElement("link");if(a.rel=s?"stylesheet":Kx,s||(a.as="script",a.crossOrigin=""),a.href=i,document.head.appendChild(a),s)return new Promise((c,l)=>{a.addEventListener("load",c),a.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},Qx=typeof navigator>"u"?!1:navigator.product==="ReactNative",Z_={timeout:Qx?6e4:12e4},Xx=function(e){const n={...Z_,...typeof e=="string"?{url:e}:e},{searchParams:r}=new URL(n.url,"http://localhost");if(n.timeout=eb(n.timeout),n.query){for(const[o,a]of Object.entries(n.query))if(a!==void 0)if(Array.isArray(a))for(const c of a)r.append(o,c);else r.append(o,a)}const[i]=n.url.split("?"),s=r.toString();return s&&(n.url="".concat(i,"?").concat(s)),n.method=n.body&&!n.method?"POST":(n.method||"GET").toUpperCase(),n};function eb(t){if(t===!1||t===0)return!1;if(t.connect||t.socket)return t;const e=Number(t);return isNaN(e)?eb(Z_.timeout):{connect:e,socket:e}}const Jx=/^https?:\/\//i,Zx=function(e){if(!Jx.test(e.url))throw new Error('"'.concat(e.url,'" is not a valid URL'))};var Ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mu=function(t){return t.replace(/^\s+|\s+$/g,"")},eP=function(t){return Object.prototype.toString.call(t)==="[object Array]"},tb=function(t){if(!t)return{};for(var e={},n=Mu(t).split(` +`),r=0;r"u"?e[o]=a:eP(e[o])?e[o].push(a):e[o]=[e[o],a]}return e};const tP=t=>function(n,r){const i=n==="onError";let s=r;for(var o=arguments.length,a=new Array(o>2?o-2:0),c=2;c(s[o]=s[o]||[],s),{processOptions:[Xx],validateOptions:[Zx]});function i(s){const o=(S,T,I)=>{let b=S,R=T;if(!b)try{R=c("onResponse",T,I)}catch($){R=null,b=$}b=b&&c("onError",b,I),b?a.error.publish(b):R&&a.response.publish(R)},a=rP.reduce((S,T)=>(S[T]=nP(),S),{}),c=tP(r),l=c("processOptions",s);c("validateOptions",l);const u={options:l,channels:a,applyMiddleware:c};let f;const h=a.request.subscribe(S=>{f=e(S,(T,I)=>o(T,I,S))});a.abort.subscribe(()=>{h(),f&&f.abort()});const g=c("onReturn",a,u);return g===a&&a.request.publish(u),g}return i.use=function(o){if(!o)throw new Error("Tried to add middleware that resolved to falsey value");if(typeof o=="function")throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(o.onReturn&&r.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return fg.forEach(a=>{o[a]&&r[a].push(o[a])}),n.push(o),i},i.clone=()=>nb(n,e),t.forEach(i.use),i}var iP=Object.defineProperty,sP=(t,e,n)=>e in t?iP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bn=(t,e,n)=>(sP(t,typeof e!="symbol"?e+"":e,n),n),rb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},un=(t,e,n)=>(rb(t,e,"read from private field"),n?n.call(t):e.get(t)),Xr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},yr=(t,e,n,r)=>(rb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),za,Wa,Ui,Ka,br,Ga,Ya;class ib{constructor(){bn(this,"onabort"),bn(this,"onerror"),bn(this,"onreadystatechange"),bn(this,"ontimeout"),bn(this,"readyState",0),bn(this,"response"),bn(this,"responseText"),bn(this,"responseType",""),bn(this,"status"),bn(this,"statusText"),bn(this,"withCredentials"),Xr(this,za,void 0),Xr(this,Wa,void 0),Xr(this,Ui,void 0),Xr(this,Ka,{}),Xr(this,br,void 0),Xr(this,Ga,{}),Xr(this,Ya,void 0)}open(e,n,r){yr(this,za,e),yr(this,Wa,n),yr(this,Ui,""),this.readyState=1,this.onreadystatechange(),yr(this,br,void 0)}abort(){un(this,br)&&un(this,br).abort()}getAllResponseHeaders(){return un(this,Ui)}setRequestHeader(e,n){un(this,Ka)[e]=n}setInit(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;yr(this,Ga,e),yr(this,Ya,n)}send(e){const n=this.responseType!=="arraybuffer",r={...un(this,Ga),method:un(this,za),headers:un(this,Ka),body:e};typeof AbortController=="function"&&un(this,Ya)&&(yr(this,br,new AbortController),typeof EventTarget<"u"&&un(this,br).signal instanceof EventTarget&&(r.signal=un(this,br).signal)),typeof document<"u"&&(r.credentials=this.withCredentials?"include":"omit"),fetch(un(this,Wa),r).then(i=>(i.headers.forEach((s,o)=>{yr(this,Ui,un(this,Ui)+"".concat(o,": ").concat(s,`\r +`))}),this.status=i.status,this.statusText=i.statusText,this.readyState=3,n?i.text():i.arrayBuffer())).then(i=>{typeof i=="string"?this.responseText=i:this.response=i,this.readyState=4,this.onreadystatechange()}).catch(i=>{var s;if(i.name==="AbortError"){this.onabort();return}(s=this.onerror)==null||s.call(this,i)})}}za=new WeakMap;Wa=new WeakMap;Ui=new WeakMap;Ka=new WeakMap;br=new WeakMap;Ga=new WeakMap;Ya=new WeakMap;const qf=typeof XMLHttpRequest=="function"?"xhr":"fetch",oP=qf==="xhr"?XMLHttpRequest:ib,aP=(t,e)=>{var n;const r=t.options,i=t.applyMiddleware("finalizeOptions",r),s={},o=t.applyMiddleware("interceptRequest",void 0,{adapter:qf,context:t});if(o){const F=setTimeout(e,0,null,o);return{abort:()=>clearTimeout(F)}}let a=new oP;a instanceof ib&&typeof i.fetch=="object"&&a.setInit(i.fetch,(n=i.useAbortSignal)!=null?n:!0);const c=i.headers,l=i.timeout;let u=!1,f=!1,h=!1;if(a.onerror=F=>{b(new Error("Request error while attempting to reach ".concat(i.url).concat(F.lengthComputable?"(".concat(F.loaded," of ").concat(F.total," bytes transferred)"):"")))},a.ontimeout=F=>{b(new Error("Request timeout while attempting to reach ".concat(i.url).concat(F.lengthComputable?"(".concat(F.loaded," of ").concat(F.total," bytes transferred)"):"")))},a.onabort=()=>{I(!0),u=!0},a.onreadystatechange=()=>{T(),!(u||a.readyState!==4)&&a.status!==0&&$()},a.open(i.method,i.url,!0),a.withCredentials=!!i.withCredentials,c&&a.setRequestHeader)for(const F in c)c.hasOwnProperty(F)&&a.setRequestHeader(F,c[F]);return i.rawBody&&(a.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:i,adapter:qf,request:a,context:t}),a.send(i.body||null),l&&(s.connect=setTimeout(()=>S("ETIMEDOUT"),l.connect)),{abort:g};function g(){u=!0,a&&a.abort()}function S(F){h=!0,a.abort();const W=new Error(F==="ESOCKETTIMEDOUT"?"Socket timed out on request to ".concat(i.url):"Connection timed out on request to ".concat(i.url));W.code=F,t.channels.error.publish(W)}function T(){!l||(I(),s.socket=setTimeout(()=>S("ESOCKETTIMEDOUT"),l.socket))}function I(F){(F||u||a.readyState>=2&&s.connect)&&clearTimeout(s.connect),s.socket&&clearTimeout(s.socket)}function b(F){if(f)return;I(!0),f=!0,a=null;const W=F||new Error("Network error while attempting to reach ".concat(i.url));W.isNetworkError=!0,W.request=i,e(W)}function R(){return{body:a.response||(a.responseType===""||a.responseType==="text"?a.responseText:""),url:i.url,method:i.method,headers:tb(a.getAllResponseHeaders()),statusCode:a.status,statusMessage:a.statusText}}function $(){if(!(u||f||h)){if(a.status===0){b(new Error("Unknown XHR error"));return}I(),f=!0,e(null,R())}}},cP=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:aP;return nb(t,e)};var hg={exports:{}},Vu,dg;function lP(){if(dg)return Vu;dg=1;var t=1e3,e=t*60,n=e*60,r=n*24,i=r*7,s=r*365.25;Vu=function(u,f){f=f||{};var h=typeof u;if(h==="string"&&u.length>0)return o(u);if(h==="number"&&isFinite(u))return f.long?c(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function o(u){if(u=String(u),!(u.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(!!f){var h=parseFloat(f[1]),g=(f[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return h*s;case"weeks":case"week":case"w":return h*i;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(u){var f=Math.abs(u);return f>=r?Math.round(u/r)+"d":f>=n?Math.round(u/n)+"h":f>=e?Math.round(u/e)+"m":f>=t?Math.round(u/t)+"s":u+"ms"}function c(u){var f=Math.abs(u);return f>=r?l(u,f,r,"day"):f>=n?l(u,f,n,"hour"):f>=e?l(u,f,e,"minute"):f>=t?l(u,f,t,"second"):u+" ms"}function l(u,f,h,g){var S=f>=h*1.5;return Math.round(u/h)+" "+g+(S?"s":"")}return Vu}function uP(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=i,n.enabled=o,n.humanize=lP(),n.destroy=l,Object.keys(t).forEach(u=>{n[u]=t[u]}),n.names=[],n.skips=[],n.formatters={};function e(u){let f=0;for(let h=0;h{if(fe==="%%")return"%";F++;const ee=n.formatters[_e];if(typeof ee=="function"){const X=I[F];fe=ee.call(b,X),I.splice(F,1),F--}return fe}),n.formatArgs.call(b,I),(b.log||n.log).apply(b,I)}return T.namespace=u,T.useColors=n.useColors(),T.color=n.selectColor(u),T.extend=r,T.destroy=n.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(g!==n.namespaces&&(g=n.namespaces,S=n.enabled(u)),S),set:I=>{h=I}}),typeof n.init=="function"&&n.init(T),T}function r(u,f){const h=n(this.namespace+(typeof f>"u"?":":f)+u);return h.log=this.log,h}function i(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f;const h=(typeof u=="string"?u:"").split(/[\s,]+/),g=h.length;for(f=0;f"-"+f)].join(",");return n.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let f,h;for(f=0,h=n.skips.length;f{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,f=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(u++,h==="%c"&&(f=u))}),c.splice(f,0,l)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=fP(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(hg,hg.exports);/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */function pg(t){return Object.prototype.toString.call(t)==="[object Object]"}function hP(t){var e,n;return pg(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(pg(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}const dP=typeof Buffer>"u"?()=>!1:t=>Buffer.isBuffer(t),pP=["boolean","string","number"];function mP(){return{processOptions:t=>{const e=t.body;return!e||!(!(typeof e.pipe=="function")&&!dP(e)&&(pP.indexOf(typeof e)!==-1||Array.isArray(e)||hP(e)))?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}}}function gP(t){return{onResponse:n=>{const r=n.headers["content-type"]||"",i=t&&t.force||r.indexOf("application/json")!==-1;return!n.body||!r||!i?n:Object.assign({},n,{body:e(n.body)})},processOptions:n=>Object.assign({},n,{headers:Object.assign({Accept:"application/json"},n.headers)})};function e(n){try{return JSON.parse(n)}catch(r){throw r.message="Failed to parsed response body as JSON: ".concat(r.message),r}}}let js={};typeof globalThis<"u"?js=globalThis:typeof window<"u"?js=window:typeof global<"u"?js=global:typeof self<"u"&&(js=self);var yP=js;function vP(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).implementation||yP.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(n,r)=>new e(i=>(n.error.subscribe(s=>i.error(s)),n.progress.subscribe(s=>i.next(Object.assign({type:"progress"},s))),n.response.subscribe(s=>{i.next(Object.assign({type:"response"},s)),i.complete()}),n.request.publish(r),()=>n.abort.publish()))}}function _P(){return{onRequest:t=>{if(t.adapter!=="xhr")return;const e=t.request,n=t.context;"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=r("upload")),"onprogress"in e&&(e.onprogress=r("download"));function r(i){return s=>{const o=s.lengthComputable?s.loaded/s.total*100:-1;n.channels.progress.publish({stage:i,percent:o,total:s.total,loaded:s.loaded,lengthComputable:s.lengthComputable})}}}}}var bP=Object.defineProperty,wP=(t,e,n)=>e in t?bP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eo=(t,e,n)=>(wP(t,typeof e!="symbol"?e+"":e,n),n);class EP{constructor(e){Eo(this,"__CANCEL__",!0),Eo(this,"message"),this.message=e}toString(){return"Cancel".concat(this.message?": ".concat(this.message):"")}}const mg=class{constructor(e){if(Eo(this,"promise"),Eo(this,"reason"),typeof e!="function")throw new TypeError("executor must be a function.");let n=null;this.promise=new Promise(r=>{n=r}),e(r=>{this.reason||(this.reason=new EP(r),n(this.reason))})}};Eo(mg,"source",()=>{let t;return{token:new mg(n=>{t=n}),cancel:t}});var sb=(t,e,n)=>n.method!=="GET"&&n.method!=="HEAD"?!1:t.isNetworkError||!1;const TP=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";var IP=t=>{const e=t.maxRetries||5,n=t.retryDelay||AP,r=t.shouldRetry;return{onError:(i,s)=>{const o=s.options,a=o.maxRetries||e,c=o.shouldRetry||r,l=o.attemptNumber||0;if(TP(o.body)||!c(i,l,o)||l>=a)return i;const u=Object.assign({},s,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>s.channels.request.publish(u),n(l)),null}}};function AP(t){return 100*Math.pow(2,t)+Math.random()*100}const yd=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return IP({shouldRetry:sb,...t})};yd.shouldRetry=sb;var Hf=function(t,e){return Hf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hf(t,e)};function vd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Hf(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function gg(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cc(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function Sc(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;re in t?UP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ir=(t,e,n)=>(BP(t,typeof e!="symbol"?e+"":e,n),n);const Lu=5;class qP extends Error{constructor(e){const n=ub(e);super(n.message),Ir(this,"response"),Ir(this,"statusCode",400),Ir(this,"responseBody"),Ir(this,"details"),Object.assign(this,n)}}class HP extends Error{constructor(e){const n=ub(e);super(n.message),Ir(this,"response"),Ir(this,"statusCode",500),Ir(this,"responseBody"),Ir(this,"details"),Object.assign(this,n)}}function ub(t){const e=t.body,n={response:t,statusCode:t.statusCode,responseBody:KP(e,t),message:"",details:void 0};if(e.error&&e.message)return n.message="".concat(e.error," - ").concat(e.message),n;if(zP(e)){const r=e.error.items||[],i=r.slice(0,Lu).map(o=>{var a;return(a=o.error)==null?void 0:a.description}).filter(Boolean);let s=i.length?`: +- `.concat(i.join(` +- `)):"";return r.length>Lu&&(s+=` +...and `.concat(r.length-Lu," more")),n.message="".concat(e.error.description).concat(s),n.details=e.error,n}return e.error&&e.error.description?(n.message=e.error.description,n.details=e.error,n):(n.message=e.error||e.message||WP(t),n)}function zP(t){return wg(t)&&wg(t.error)&&t.error.type==="mutationError"&&typeof t.error.description=="string"}function wg(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function WP(t){const e=t.statusMessage?" ".concat(t.statusMessage):"";return"".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)}function KP(t,e){return(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")!==-1?JSON.stringify(t,null,2):t}const GP={onResponse:t=>{if(t.statusCode>=500)throw new HP(t);if(t.statusCode>=400)throw new qP(t);return t}},YP={onResponse:t=>{const e=t.headers["x-sanity-warning"];return(Array.isArray(e)?e:[e]).filter(Boolean).forEach(r=>console.warn(r)),t}};function QP(t,e){let{maxRetries:n=5,retryDelay:r}=e;const i=cP([n>0?yd({retryDelay:r,maxRetries:n,shouldRetry:XP}):{},...t,YP,mP(),gP(),_P(),GP,vP({implementation:To})]);function s(o){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:i)({maxRedirects:0,...o})}return s.defaultRequester=i,s}function XP(t,e,n){const r=n.method==="GET"||n.method==="HEAD",s=(n.uri||n.url).startsWith("/data/query"),o=t.response&&(t.response.statusCode===429||t.response.statusCode===502||t.response.statusCode===503);return(r||s)&&o?!0:yd.shouldRetry(t,e,n)}const JP="https://www.sanity.io/help/";function Ed(t){return JP+t}const Eg=["image","file"],Tg=["before","after","replace"],fb=t=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},ZP=t=>{if(!/^[-a-z0-9]+$/i.test(t))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},eR=t=>{if(Eg.indexOf(t)===-1)throw new Error("Invalid asset type: ".concat(t,". Must be one of ").concat(Eg.join(", ")))},ro=(t,e)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new Error("".concat(t,"() takes an object of properties"))},hb=(t,e)=>{if(typeof e!="string"||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(e)||e.includes(".."))throw new Error("".concat(t,'(): "').concat(e,'" is not a valid document ID'))},xc=(t,e)=>{if(!e._id)throw new Error("".concat(t,'() requires that the document contains an ID ("_id" property)'));hb(t,e._id)},tR=(t,e,n)=>{const r="insert(at, selector, items)";if(Tg.indexOf(t)===-1){const i=Tg.map(s=>'"'.concat(s,'"')).join(", ");throw new Error("".concat(r,' takes an "at"-argument which is one of: ').concat(i))}if(typeof e!="string")throw new Error("".concat(r,' takes a "selector"-argument which must be a string'));if(!Array.isArray(n))throw new Error("".concat(r,' takes an "items"-argument which must be an array'))},db=t=>{if(!t.dataset)throw new Error("`dataset` must be provided to perform queries");return t.dataset||""},pb=t=>{if(typeof t!="string"||!/^[a-z0-9._-]{1,75}$/i.test(t))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t};function nR(t){let e=!1,n;return function(){return e||(n=t(...arguments),e=!0),n}}const zo=t=>nR(function(){for(var e=arguments.length,n=new Array(e),r=0;rlR.indexOf(t)!==-1,fR=function(e){if(e==="1"||e==="X")return;const n=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&n instanceof Date&&n.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")},mb=function(e){switch(e){case"previewDrafts":case"published":case"raw":return;default:throw new TypeError("Invalid API perspective string, expected `published`, `previewDrafts` or `raw`")}},gb=(t,e)=>{const n=Object.assign({},e,t);n.apiVersion||oR();const r=Object.assign({},Pc,n),i=r.useProjectHostname;if(typeof Promise>"u"){const f=Ed("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(f))}if(i&&!r.projectId)throw new Error("Configuration must contain `projectId`");if(typeof r.perspective=="string"&&mb(r.perspective),"encodeSourceMapAtPath"in r||"encodeSourceMap"in r||"studioUrl"in r||"logger"in r)throw new Error("It looks like you're using options meant for '@sanity/preview-kit/client', such as 'encodeSourceMapAtPath', 'encodeSourceMap', 'studioUrl' and 'logger'. Make sure you're using the right import.");const s=typeof window<"u"&&window.location&&window.location.hostname,o=s&&uR(window.location.hostname);s&&o&&r.token&&r.ignoreBrowserTokenWarning!==!0?sR():typeof r.useCdn>"u"&&rR(),i&&ZP(r.projectId),r.dataset&&fb(r.dataset),"requestTagPrefix"in r&&(r.requestTagPrefix=r.requestTagPrefix?pb(r.requestTagPrefix).replace(/\.+$/,""):void 0),r.apiVersion="".concat(r.apiVersion).replace(/^v/,""),r.isDefaultApi=r.apiHost===Pc.apiHost,r.useCdn=r.useCdn!==!1&&!r.withCredentials,fR(r.apiVersion);const a=r.apiHost.split("://",2),c=a[0],l=a[1],u=r.isDefaultApi?cR:l;return r.useProjectHostname?(r.url="".concat(c,"://").concat(r.projectId,".").concat(l,"/v").concat(r.apiVersion),r.cdnUrl="".concat(c,"://").concat(r.projectId,".").concat(u,"/v").concat(r.apiVersion)):(r.url="".concat(r.apiHost,"/v").concat(r.apiVersion),r.cdnUrl=r.url),r},hR="X-Sanity-Project-ID";function dR(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n={},r=e.token||t.token;r&&(n.Authorization="Bearer ".concat(r)),!e.useGlobalApi&&!t.useProjectHostname&&t.projectId&&(n[hR]=t.projectId);const i=Boolean(typeof e.withCredentials>"u"?t.token||t.withCredentials:e.withCredentials),s=typeof e.timeout>"u"?t.timeout:e.timeout;return Object.assign({},e,{headers:Object.assign({},n,e.headers||{}),timeout:typeof s>"u"?5*60*1e3:s,proxy:e.proxy||t.proxy,json:!0,withCredentials:i,fetch:typeof e.fetch=="object"&&typeof t.fetch=="object"?{...t.fetch,...e.fetch}:e.fetch||t.fetch})}function yb(t){if(typeof t=="string"||Array.isArray(t))return{id:t};if(typeof t=="object"&&t!==null&&"query"in t&&typeof t.query=="string")return"params"in t&&typeof t.params=="object"&&t.params!==null?{query:t.query,params:t.params}:{query:t.query};const e=["* Document ID ()","* Array of document IDs","* Object containing `query`"].join(` +`);throw new Error(`Unknown selection - must be one of: + +`.concat(e))}const vb=t=>{let{query:e,params:n={},options:r={}}=t;const i=new URLSearchParams,{tag:s,...o}=r;s&&i.append("tag",s),i.append("query",e);for(const[a,c]of Object.entries(n))i.append("$".concat(a),JSON.stringify(c));for(const[a,c]of Object.entries(o))c&&i.append(a,"".concat(c));return"?".concat(i)};var pR=Object.defineProperty,mR=(t,e,n)=>e in t?pR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ig=(t,e,n)=>(mR(t,typeof e!="symbol"?e+"":e,n),n),_b=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ts=(t,e,n)=>(_b(t,e,"read from private field"),n?n.call(t):e.get(t)),bb=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},wb=(t,e,n,r)=>(_b(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Bi,qi;class Eb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ig(this,"selection"),Ig(this,"operations"),this.selection=e,this.operations=n}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return ro("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,n,r){return tR(e,n,r),this._assign("insert",{[e]:n,items:r})}append(e,n){return this.insert("after","".concat(e,"[-1]"),n)}prepend(e,n){return this.insert("before","".concat(e,"[0]"),n)}splice(e,n,r,i){const s=typeof r>"u"||r===-1,o=n<0?n-1:n,a=s?-1:Math.max(0,n+r),c=o<0&&a>=0?"":a,l="".concat(e,"[").concat(o,":").concat(c,"]");return this.insert("replace",l,i||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...yb(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return ro(e,n),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},n)}),this}_set(e,n){return this._assign(e,n,!1)}}const gR=class Tb extends Eb{constructor(e,n,r){super(e,n),bb(this,Bi,void 0),wb(this,Bi,r)}clone(){return new Tb(this.selection,{...this.operations},ts(this,Bi))}commit(e){if(!ts(this,Bi))throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");const n=typeof this.selection=="string",r=Object.assign({returnFirst:n,returnDocuments:!0},e);return ts(this,Bi).mutate({patch:this.serialize()},r)}};Bi=new WeakMap;let io=gR;const yR=class Ib extends Eb{constructor(e,n,r){super(e,n),bb(this,qi,void 0),wb(this,qi,r)}clone(){return new Ib(this.selection,{...this.operations},ts(this,qi))}commit(e){if(!ts(this,qi))throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");const n=typeof this.selection=="string",r=Object.assign({returnFirst:n,returnDocuments:!0},e);return ts(this,qi).mutate({patch:this.serialize()},r)}};qi=new WeakMap;let so=yR;var vR=Object.defineProperty,_R=(t,e,n)=>e in t?vR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ag=(t,e,n)=>(_R(t,typeof e!="symbol"?e+"":e,n),n),Ab=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ar=(t,e,n)=>(Ab(t,e,"read from private field"),n?n.call(t):e.get(t)),Cb=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Sb=(t,e,n,r)=>(Ab(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Zr,ei;const xb={returnDocuments:!1};class Pb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;Ag(this,"operations"),Ag(this,"trxId"),this.operations=e,this.trxId=n}create(e){return ro("create",e),this._add({create:e})}createIfNotExists(e){const n="createIfNotExists";return ro(n,e),xc(n,e),this._add({[n]:e})}createOrReplace(e){const n="createOrReplace";return ro(n,e),xc(n,e),this._add({[n]:e})}delete(e){return hb("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}const bR=class Rb extends Pb{constructor(e,n,r){super(e,r),Cb(this,Zr,void 0),Sb(this,Zr,n)}clone(){return new Rb([...this.operations],Ar(this,Zr),this.trxId)}commit(e){if(!Ar(this,Zr))throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return Ar(this,Zr).mutate(this.serialize(),Object.assign({transactionId:this.trxId},xb,e||{}))}patch(e,n){const r=typeof n=="function";if(typeof e!="string"&&e instanceof so)return this._add({patch:e.serialize()});if(r){const s=n(new so(e,{},Ar(this,Zr)));if(!(s instanceof so))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:s.serialize()})}return this._add({patch:{id:e,...n}})}};Zr=new WeakMap;let Ob=bR;const wR=class kb extends Pb{constructor(e,n,r){super(e,r),Cb(this,ei,void 0),Sb(this,ei,n)}clone(){return new kb([...this.operations],Ar(this,ei),this.trxId)}commit(e){if(!Ar(this,ei))throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return Ar(this,ei).mutate(this.serialize(),Object.assign({transactionId:this.trxId},xb,e||{}))}patch(e,n){const r=typeof n=="function";if(typeof e!="string"&&e instanceof io)return this._add({patch:e.serialize()});if(r){const s=n(new io(e,{},Ar(this,ei)));if(!(s instanceof io))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:s.serialize()})}return this._add({patch:{id:e,...n}})}};ei=new WeakMap;let Db=wR;const ER=(t,e)=>t===!1?void 0:typeof t>"u"?e:t,TR=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{dryRun:t.dryRun,returnIds:!0,returnDocuments:ER(t.returnDocuments,!0),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}},Td=t=>t.type==="response",IR=t=>t.body,AR=(t,e)=>t.reduce((n,r)=>(n[e(r)]=r,n),Object.create(null)),CR=11264;function Nb(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=i.filterResponse===!1?u=>u:u=>u.result,{cache:o,next:a,...c}={useAbortSignal:typeof i.signal<"u",...i},l=typeof o<"u"||typeof a<"u"?{...c,fetch:{cache:o,next:a}}:c;return Wo(t,e,"query",{query:n,params:r},l).pipe(Ei(s))}function Mb(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i={uri:_s(t,"doc",n),json:!0,tag:r.tag};return Ko(t,e,i).pipe(Ho(Td),Ei(s=>s.body.documents&&s.body.documents[0]))}function Vb(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i={uri:_s(t,"doc",n.join(",")),json:!0,tag:r.tag};return Ko(t,e,i).pipe(Ho(Td),Ei(s=>{const o=AR(s.body.documents||[],a=>a._id);return n.map(a=>o[a]||null)}))}function Fb(t,e,n,r){return xc("createIfNotExists",n),Pl(t,e,n,"createIfNotExists",r)}function $b(t,e,n,r){return xc("createOrReplace",n),Pl(t,e,n,"createOrReplace",r)}function Lb(t,e,n,r){return Wo(t,e,"mutate",{mutations:[{delete:yb(n)}]},r)}function jb(t,e,n,r){let i;n instanceof so||n instanceof io?i={patch:n.serialize()}:n instanceof Ob||n instanceof Db?i=n.serialize():i=n;const s=Array.isArray(i)?i:[i],o=r&&r.transactionId||void 0;return Wo(t,e,"mutate",{mutations:s,transactionId:o},r)}function Wo(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=n==="mutate",o=n==="query",a=s?"":vb(r),c=!s&&a.length{if(!s)return b;const R=b.results||[];if(i.returnDocuments)return u?R[0]&&R[0].document:R.map(W=>W.document);const $=u?"documentId":"documentIds",F=u?R[0]&&R[0].id:R.map(W=>W.id);return{transactionId:b.transactionId,results:R,[$]:F}}))}function Pl(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s={[r]:n},o=Object.assign({returnFirst:!0,returnDocuments:!0},i);return Wo(t,e,"mutate",{mutations:[s]},o)}function Ko(t,e,n){var r;const i=n.url||n.uri,s=t.config(),o=typeof n.canUseCdn>"u"?["GET","HEAD"].indexOf(n.method||"GET")>=0&&i.indexOf("/data/")===0:n.canUseCdn;let a=s.useCdn&&o;const c=n.tag&&s.requestTagPrefix?[s.requestTagPrefix,n.tag].join("."):n.tag||s.requestTagPrefix;if(c&&(n.query={tag:pb(c),...n.query}),["GET","HEAD","POST"].indexOf(n.method||"GET")>=0&&i.indexOf("/data/query/")===0){((r=n.resultSourceMap)!=null?r:s.resultSourceMap)&&(n.query={resultSourceMap:!0,...n.query});const f=n.perspective||s.perspective;typeof f=="string"&&f!=="raw"&&(mb(f),n.query={perspective:f,...n.query},f==="previewDrafts"&&a&&(a=!1,iR()))}const l=dR(s,Object.assign({},n,{url:Id(t,i,a)})),u=new To(f=>e(l,s.requester).subscribe(f));return n.signal?u.pipe(SR(n.signal)):u}function xn(t,e,n){return Ko(t,e,n).pipe(Ho(i=>i.type==="response"),Ei(i=>i.body))}function _s(t,e,n){const r=t.config(),i=db(r),s="/".concat(e,"/").concat(i),o=n?"".concat(s,"/").concat(n):s;return"/data".concat(o).replace(/\/($|\?)/,"$1")}function Id(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{url:r,cdnUrl:i}=t.config(),s=n?i:r;return"".concat(s,"/").concat(e.replace(/^\//,""))}function SR(t){return e=>new To(n=>{const r=()=>n.error(PR(t));if(t&&t.aborted){r();return}const i=e.subscribe(n);return t.addEventListener("abort",r),()=>{t.removeEventListener("abort",r),i.unsubscribe()}})}const xR=Boolean(globalThis.DOMException);function PR(t){var e,n;if(xR)return new DOMException((e=t==null?void 0:t.reason)!=null?e:"The operation was aborted.","AbortError");const r=new Error((n=t==null?void 0:t.reason)!=null?n:"The operation was aborted.");return r.name="AbortError",r}var Ub=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Rc=(t,e,n)=>(Ub(t,e,"read from private field"),n?n.call(t):e.get(t)),Oc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},kc=(t,e,n,r)=>(Ub(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Qa,Xa,Ja,Za;class RR{constructor(e,n){Oc(this,Qa,void 0),Oc(this,Xa,void 0),kc(this,Qa,e),kc(this,Xa,n)}upload(e,n,r){return Bb(Rc(this,Qa),Rc(this,Xa),e,n,r)}}Qa=new WeakMap;Xa=new WeakMap;class OR{constructor(e,n){Oc(this,Ja,void 0),Oc(this,Za,void 0),kc(this,Ja,e),kc(this,Za,n)}upload(e,n,r){const i=Bb(Rc(this,Ja),Rc(this,Za),e,n,r);return yt(i.pipe(Ho(s=>s.type==="response"),Ei(s=>s.body.document)))}}Ja=new WeakMap;Za=new WeakMap;function Bb(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};eR(n);let s=i.extract||void 0;s&&!s.length&&(s=["none"]);const o=db(t.config()),a=n==="image"?"images":"files",c=kR(i,r),{tag:l,label:u,title:f,description:h,creditLine:g,filename:S,source:T}=c,I={label:u,title:f,description:h,filename:S,meta:s,creditLine:g};return T&&(I.sourceId=T.id,I.sourceName=T.name,I.sourceUrl=T.url),Ko(t,e,{tag:l,method:"POST",timeout:c.timeout||0,uri:"/assets/".concat(a,"/").concat(o),headers:c.contentType?{"Content-Type":c.contentType}:{},query:I,body:r})}function kR(t,e){return typeof File>"u"||!(e instanceof File)?t:Object.assign({filename:t.preserveFilename===!1?void 0:e.name,contentType:e.type},t)}var DR=(t,e)=>Object.keys(e).concat(Object.keys(t)).reduce((n,r)=>(n[r]=typeof t[r]>"u"?e[r]:t[r],n),{});const NR=(t,e)=>e.reduce((n,r)=>(typeof t[r]>"u"||(n[r]=t[r]),n),{}),MR=16e3-1200,VR=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],FR={includeResult:!0};function qb(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{url:r,token:i,withCredentials:s,requestTagPrefix:o}=this.config(),a=n.tag&&o?[o,n.tag].join("."):n.tag,c={...DR(n,FR),tag:a},l=NR(c,VR),u=vb({query:t,params:e,options:{tag:a,...l}}),f="".concat(r).concat(_s(this,"listen",u));if(f.length>MR)return new To(T=>T.error(new Error("Query too large for listener")));const h=c.events?c.events:["mutation"],g=h.indexOf("reconnect")!==-1,S={};return(i||s)&&(S.withCredentials=!0),i&&(S.headers={Authorization:"Bearer ".concat(i)}),new To(T=>{let I;X().then(w=>{I=w}).catch(w=>{T.error(w),O()});let b,R=!1;function $(){R||(ee(),!R&&I.readyState===I.CLOSED&&(_e(),clearTimeout(b),b=setTimeout(ie,100)))}function F(w){T.error($R(w))}function W(w){const M=Hb(w);return M instanceof Error?T.error(M):T.next(M)}function fe(){R=!0,_e(),T.complete()}function _e(){!I||(I.removeEventListener("error",$),I.removeEventListener("channelError",F),I.removeEventListener("disconnect",fe),h.forEach(w=>I.removeEventListener(w,W)),I.close())}function ee(){g&&T.next({type:"reconnect"})}async function X(){const{default:w}=await Yx(()=>import("./browser.a42c4047.js").then(P=>P.b),[]),M=new w(f,S);return M.addEventListener("error",$),M.addEventListener("channelError",F),M.addEventListener("disconnect",fe),h.forEach(P=>M.addEventListener(P,W)),M}function ie(){X().then(w=>{I=w}).catch(w=>{T.error(w),O()})}function O(){R=!0,_e()}return O})}function Hb(t){try{const e=t.data&&JSON.parse(t.data)||{};return Object.assign({type:t.type},e)}catch(e){return e}}function $R(t){if(t instanceof Error)return t;const e=Hb(t);return e instanceof Error?e:new Error(LR(e))}function LR(t){return t.error?t.error.description?t.error.description:typeof t.error=="string"?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error"}var zb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},kt=(t,e,n)=>(zb(t,e,"read from private field"),n?n.call(t):e.get(t)),Dc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Nc=(t,e,n,r)=>(zb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ti,ni,ri,ii;class jR{constructor(e,n){Dc(this,ti,void 0),Dc(this,ni,void 0),Nc(this,ti,e),Nc(this,ni,n)}create(e,n){return ns(kt(this,ti),kt(this,ni),"PUT",e,n)}edit(e,n){return ns(kt(this,ti),kt(this,ni),"PATCH",e,n)}delete(e){return ns(kt(this,ti),kt(this,ni),"DELETE",e)}list(){return xn(kt(this,ti),kt(this,ni),{uri:"/datasets"})}}ti=new WeakMap;ni=new WeakMap;class UR{constructor(e,n){Dc(this,ri,void 0),Dc(this,ii,void 0),Nc(this,ri,e),Nc(this,ii,n)}create(e,n){return yt(ns(kt(this,ri),kt(this,ii),"PUT",e,n))}edit(e,n){return yt(ns(kt(this,ri),kt(this,ii),"PATCH",e,n))}delete(e){return yt(ns(kt(this,ri),kt(this,ii),"DELETE",e))}list(){return yt(xn(kt(this,ri),kt(this,ii),{uri:"/datasets"}))}}ri=new WeakMap;ii=new WeakMap;function ns(t,e,n,r,i){return fb(r),xn(t,e,{method:n,uri:"/datasets/".concat(r),body:i})}var Wb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Cr=(t,e,n)=>(Wb(t,e,"read from private field"),n?n.call(t):e.get(t)),Mc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Vc=(t,e,n,r)=>(Wb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Us,Bs,qs,Hs;class BR{constructor(e,n){Mc(this,Us,void 0),Mc(this,Bs,void 0),Vc(this,Us,e),Vc(this,Bs,n)}list(e){const n=(e==null?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return xn(Cr(this,Us),Cr(this,Bs),{uri:n})}getById(e){return xn(Cr(this,Us),Cr(this,Bs),{uri:"/projects/".concat(e)})}}Us=new WeakMap;Bs=new WeakMap;class qR{constructor(e,n){Mc(this,qs,void 0),Mc(this,Hs,void 0),Vc(this,qs,e),Vc(this,Hs,n)}list(e){const n=(e==null?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return yt(xn(Cr(this,qs),Cr(this,Hs),{uri:n}))}getById(e){return yt(xn(Cr(this,qs),Cr(this,Hs),{uri:"/projects/".concat(e)}))}}qs=new WeakMap;Hs=new WeakMap;var Kb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Fc=(t,e,n)=>(Kb(t,e,"read from private field"),n?n.call(t):e.get(t)),$c=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Lc=(t,e,n,r)=>(Kb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ec,tc,nc,rc;class HR{constructor(e,n){$c(this,ec,void 0),$c(this,tc,void 0),Lc(this,ec,e),Lc(this,tc,n)}getById(e){return xn(Fc(this,ec),Fc(this,tc),{uri:"/users/".concat(e)})}}ec=new WeakMap;tc=new WeakMap;class zR{constructor(e,n){$c(this,nc,void 0),$c(this,rc,void 0),Lc(this,nc,e),Lc(this,rc,n)}getById(e){return yt(xn(Fc(this,nc),Fc(this,rc),{uri:"/users/".concat(e)}))}}nc=new WeakMap;rc=new WeakMap;var WR=Object.defineProperty,KR=(t,e,n)=>e in t?WR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wn=(t,e,n)=>(KR(t,typeof e!="symbol"?e+"":e,n),n),Gb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},we=(t,e,n)=>(Gb(t,e,"read from private field"),n?n.call(t):e.get(t)),jc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Uc=(t,e,n,r)=>(Gb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),si,gt,oi,lt;const GR=class Kf{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pc;wn(this,"assets"),wn(this,"datasets"),wn(this,"projects"),wn(this,"users"),jc(this,si,void 0),jc(this,gt,void 0),wn(this,"listen",qb),this.config(n),Uc(this,gt,e),this.assets=new RR(this,we(this,gt)),this.datasets=new jR(this,we(this,gt)),this.projects=new BR(this,we(this,gt)),this.users=new HR(this,we(this,gt))}clone(){return new Kf(we(this,gt),this.config())}config(e){if(e===void 0)return{...we(this,si)};if(we(this,si)&&we(this,si).allowReconfigure===!1)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return Uc(this,si,gb(e,we(this,si)||{})),this}withConfig(e){return new Kf(we(this,gt),{...this.config(),...e})}fetch(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Nb(this,we(this,gt),e,n,r)}getDocument(e,n){return Mb(this,we(this,gt),e,n)}getDocuments(e,n){return Vb(this,we(this,gt),e,n)}create(e,n){return Pl(this,we(this,gt),e,"create",n)}createIfNotExists(e,n){return Fb(this,we(this,gt),e,n)}createOrReplace(e,n){return $b(this,we(this,gt),e,n)}delete(e,n){return Lb(this,we(this,gt),e,n)}mutate(e,n){return jb(this,we(this,gt),e,n)}patch(e,n){return new io(e,n,this)}transaction(e){return new Db(e,this)}request(e){return xn(this,we(this,gt),e)}getUrl(e,n){return Id(this,e,n)}getDataUrl(e,n){return _s(this,e,n)}};si=new WeakMap;gt=new WeakMap;let YR=GR;const QR=class Gf{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pc;wn(this,"assets"),wn(this,"datasets"),wn(this,"projects"),wn(this,"users"),wn(this,"observable"),jc(this,oi,void 0),jc(this,lt,void 0),wn(this,"listen",qb),this.config(n),Uc(this,lt,e),this.assets=new OR(this,we(this,lt)),this.datasets=new UR(this,we(this,lt)),this.projects=new qR(this,we(this,lt)),this.users=new zR(this,we(this,lt)),this.observable=new YR(e,n)}clone(){return new Gf(we(this,lt),this.config())}config(e){if(e===void 0)return{...we(this,oi)};if(we(this,oi)&&we(this,oi).allowReconfigure===!1)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),Uc(this,oi,gb(e,we(this,oi)||{})),this}withConfig(e){return new Gf(we(this,lt),{...this.config(),...e})}fetch(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return yt(Nb(this,we(this,lt),e,n,r))}getDocument(e,n){return yt(Mb(this,we(this,lt),e,n))}getDocuments(e,n){return yt(Vb(this,we(this,lt),e,n))}create(e,n){return yt(Pl(this,we(this,lt),e,"create",n))}createIfNotExists(e,n){return yt(Fb(this,we(this,lt),e,n))}createOrReplace(e,n){return yt($b(this,we(this,lt),e,n))}delete(e,n){return yt(Lb(this,we(this,lt),e,n))}mutate(e,n){return yt(jb(this,we(this,lt),e,n))}patch(e,n){return new so(e,n,this)}transaction(e){return new Ob(e,this)}request(e){return yt(xn(this,we(this,lt),e))}dataRequest(e,n,r){return yt(Wo(this,we(this,lt),e,n,r))}getUrl(e,n){return Id(this,e,n)}getDataUrl(e,n){return _s(this,e,n)}};oi=new WeakMap;lt=new WeakMap;let XR=QR;const Yb=QP(jP,{});Yb.defaultRequester;function JR(t){return aR(),new XR(Yb,t)}const Bc=JR({projectId:"i32b0q2c",dataset:"production",useCdn:!0,apiVersion:"2021-03-25"});var Yf={exports:{}};(function(t,e){var n=200,r="__lodash_hash_undefined__",i=800,s=16,o=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Function]",S="[object GeneratorFunction]",T="[object Map]",I="[object Number]",b="[object Null]",R="[object Object]",$="[object Proxy]",F="[object RegExp]",W="[object Set]",fe="[object String]",_e="[object Undefined]",ee="[object WeakMap]",X="[object ArrayBuffer]",ie="[object DataView]",O="[object Float32Array]",w="[object Float64Array]",M="[object Int8Array]",P="[object Int16Array]",le="[object Int32Array]",G="[object Uint8Array]",te="[object Uint8ClampedArray]",ae="[object Uint16Array]",De="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Re=/^\[object .+?Constructor\]$/,Je=/^(?:0|[1-9]\d*)$/,de={};de[O]=de[w]=de[M]=de[P]=de[le]=de[G]=de[te]=de[ae]=de[De]=!0,de[a]=de[c]=de[X]=de[u]=de[ie]=de[f]=de[h]=de[g]=de[T]=de[I]=de[R]=de[F]=de[W]=de[fe]=de[ee]=!1;var pt=typeof Ft=="object"&&Ft&&Ft.Object===Object&&Ft,Zt=typeof self=="object"&&self&&self.Object===Object&&self,Gt=pt||Zt||Function("return this")(),Pt=e&&!e.nodeType&&e,Rt=Pt&&!0&&t&&!t.nodeType&&t,Bt=Rt&&Rt.exports===Pt,It=Bt&&pt.process,mt=function(){try{var p=Rt&&Rt.require&&Rt.require("util").types;return p||It&&It.binding&&It.binding("util")}catch{}}(),hr=mt&&mt.isTypedArray;function m(p,v,x){switch(x.length){case 0:return p.call(v);case 1:return p.call(v,x[0]);case 2:return p.call(v,x[0],x[1]);case 3:return p.call(v,x[0],x[1],x[2])}return p.apply(v,x)}function _(p,v){for(var x=-1,J=Array(p);++x-1}function gE(p,v){var x=this.__data__,J=da(x,p);return J<0?(++this.size,x.push([p,v])):x[J][1]=v,this}je.prototype.clear=ct,je.prototype.delete=vn,je.prototype.get=_n,je.prototype.has=dr,je.prototype.set=gE;function Di(p){var v=-1,x=p==null?0:p.length;for(this.clear();++v1?x[Ae-1]:void 0,ze=Ae>2?x[2]:void 0;for(Ve=p.length>3&&typeof Ve=="function"?(Ae--,Ve):void 0,ze&&zE(x[0],x[1],ze)&&(Ve=Ae<3?void 0:Ve,Ae=1),v=Object(v);++J-1&&p%1==0&&p0){if(++v>=i)return arguments[0]}else v=0;return p.apply(void 0,arguments)}}function ZE(p){if(p!=null){try{return k.call(p)}catch{}try{return p+""}catch{}}return""}function ga(p,v){return p===v||p!==p&&v!==v}var _u=zp(function(){return arguments}())?zp:function(p){return xs(p)&&B.call(p,"callee")&&!Yt.call(p,"callee")},bu=Array.isArray;function wu(p){return p!=null&&Qp(p.length)&&!Eu(p)}function eT(p){return xs(p)&&wu(p)}var Yp=rt||sT;function Eu(p){if(!Kr(p))return!1;var v=pa(p);return v==g||v==S||v==l||v==$}function Qp(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=o}function Kr(p){var v=typeof p;return p!=null&&(v=="object"||v=="function")}function xs(p){return p!=null&&typeof p=="object"}function tT(p){if(!xs(p)||pa(p)!=R)return!1;var v=Le(p);if(v===null)return!0;var x=B.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&k.call(x)==K}var Xp=hr?V(hr):OE;function nT(p){return jE(p,Jp(p))}function Jp(p){return wu(p)?SE(p,!0):kE(p)}var rT=UE(function(p,v,x){Wp(p,v,x)});function iT(p){return function(){return p}}function Zp(p){return p}function sT(){return!1}t.exports=rT})(Yf,Yf.exports);const ZR=Yf.exports;/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function eO(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function tO(t,e){for(var n=0,r=e.length,i=t.length;n1;)n.splice(r,0,e.hardBreak());return n},ic=function(t,e,n,r){var i=Qb(e),s=i[0],o=i.slice(1);if(!s)return iO(t.text,n);var a=s in n.marks?{_type:s,_key:""}:r.find(function(u){return u._key===s}),c=a?n.marks[a._type]:"span";if(Zb(c)){var l=Qf(a);return sn(c,l,function(){return ic(t,o,n,r)})}return typeof c=="function"?c(a||{},ic(t,o,n,r)):sn(c,Qf(a),ic(t,o,n,r))},e0=function(t,e,n){var r=["em","strong","code"],i=tO([],Qb(t.marks)).sort(function(s,o){return r.includes(s)?1:r.includes(o)?-1:0});return ic(t,i,e,n)},sO=function(t,e){var n=t.children.flatMap(function(r){return e0(r,e,t.markDefs)});return Xb(t,e,n)},oO=function(t,e){return sn("span",{style:"text-decoration: underline;"},e)},aO=function(t,e){return sn("a",{href:t.href,target:t.newtab?"_blank":void 0},e)},cO=function(t,e){var n=t.listItem==="number"?"ol":"ul";return sn(n,{},Ad(t.children,e,t.level))},lO=function(t,e){var n=Ad(t.children,e,t.level),r=t.style&&t.style!=="normal";return sn("li",{},r?Xb(t,e,n):n)},Qf=function(t){if(t){t._key,t._type;var e=eO(t,["_key","_type"]);return e}return{}},uO=function(t,e){var n=rO(t,e);if(!n)return null;if(Zb(n)){var r=Qf(t);return sn(n,r)}return typeof n=="function"?Jb(t)?n(t,e,[]):n(t,e):sn(n,{})},Cg=function(t){return{_type:"list",_key:t._key+"-parent",level:t.level,listItem:t.listItem,children:[t]}},fO=function(t,e){e===void 0&&(e=0);var n=function(s){return"level"in s},r=function(s){return s&&"children"in s},i=[];return t.forEach(function(s){if(!n(s)){i.push(s);return}var o=i[i.length-1];if(s.level===e){i.push(s);return}s.level&&s.level>e&&(!r(o)||!n(o)||o.level&&o.level>s.level||o.level===s.level&&o.listItem!==s.listItem?i.push(Cg(s)):o.children.push(s))}),i},Ad=function(t,e,n){n===void 0&&(n=0);var r=fO(t,n);return r.map(function(i){return uO(i,e)}).filter(nO)},hO={types:{image:"image",block:sO},marks:{strong:"strong",em:"em",link:aO,underline:oO},styles:{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",normal:"p"},hardBreak:function(){return sn("br")},span:e0,list:cO,listItem:lO},dO=vl({functional:!0,props:{blocks:{type:Array,default:function(){return[]}},serializers:{type:Object,default:function(){return{}}}},setup:function(t){var e=ZR({},hO,t.serializers);return function(){return Ad(t.blocks,e)}}}),t0={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ft,function(){function n(){return n=Object.assign||function(O){for(var w=1;wO.length)&&(w=O.length);for(var M=0,P=new Array(w);M=O.length?{done:!0}:{done:!1,value:O[P++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function a(O){var w=O.split("-"),M=w[1],P=w[2],le=w[3];if(!M||!P||!le)throw new Error("Malformed asset _ref '"+O+`'. Expected an id like "`+o+'".');var G=P.split("x"),te=G[0],ae=G[1],De=+te,Ye=+ae,Re=isFinite(De)&&isFinite(Ye);if(!Re)throw new Error("Malformed asset _ref '"+O+`'. Expected an id like "`+o+'".');return{id:M,width:De,height:Ye,format:le}}var c=function(w){var M=w;return M?typeof M._ref=="string":!1},l=function(w){var M=w;return M?typeof M._id=="string":!1},u=function(w){var M=w;return M&&M.asset?typeof M.asset.url=="string":!1};function f(O){if(!O)return null;var w;if(typeof O=="string"&&h(O))w={asset:{_ref:g(O)}};else if(typeof O=="string")w={asset:{_ref:O}};else if(c(O))w={asset:O};else if(l(O))w={asset:{_ref:O._id||""}};else if(u(O))w={asset:{_ref:g(O.asset.url)}};else if(typeof O.asset=="object")w=n({},O);else return null;var M=O;return M.crop&&(w.crop=M.crop),M.hotspot&&(w.hotspot=M.hotspot),S(w)}function h(O){return/^https?:\/\//.test(""+O)}function g(O){var w=O.split("/").slice(-1);return("image-"+w[0]).replace(/\.([a-z]+)$/,"-$1")}function S(O){if(O.crop&&O.hotspot)return O;var w=n({},O);return w.crop||(w.crop={left:0,top:0,bottom:0,right:0}),w.hotspot||(w.hotspot={x:.5,y:.5,height:1,width:1}),w}var T=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"]];function I(O){var w=n({},O||{}),M=w.source;delete w.source;var P=f(M);if(!P)throw new Error("Unable to resolve image URL from source ("+JSON.stringify(M)+")");var le=P.asset._ref||P.asset._id||"",G=a(le),te=Math.round(P.crop.left*G.width),ae=Math.round(P.crop.top*G.height),De={left:te,top:ae,width:Math.round(G.width-P.crop.right*G.width-te),height:Math.round(G.height-P.crop.bottom*G.height-ae)},Ye=P.hotspot.height*G.height/2,Re=P.hotspot.width*G.width/2,Je=P.hotspot.x*G.width,de=P.hotspot.y*G.height,pt={left:Je-Re,top:de-Ye,right:Je+Re,bottom:de+Ye};return w.rect||w.focalPoint||w.ignoreImageParams||w.crop||(w=n({},w,R({crop:De,hotspot:pt},w))),b(n({},w,{asset:G}))}function b(O){var w=(O.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),M=O.asset.id+"-"+O.asset.width+"x"+O.asset.height+"."+O.asset.format,P=w+"/images/"+O.projectId+"/"+O.dataset+"/"+M,le=[];if(O.rect){var G=O.rect,te=G.left,ae=G.top,De=G.width,Ye=G.height,Re=te!==0||ae!==0||Ye!==O.asset.height||De!==O.asset.width;Re&&le.push("rect="+te+","+ae+","+De+","+Ye)}O.bg&&le.push("bg="+O.bg),O.focalPoint&&(le.push("fp-x="+O.focalPoint.x),le.push("fp-y="+O.focalPoint.y));var Je=[O.flipHorizontal&&"h",O.flipVertical&&"v"].filter(Boolean).join("");return Je&&le.push("flip="+Je),T.forEach(function(de){var pt=de[0],Zt=de[1];typeof O[pt]<"u"?le.push(Zt+"="+encodeURIComponent(O[pt])):typeof O[Zt]<"u"&&le.push(Zt+"="+encodeURIComponent(O[Zt]))}),le.length===0?P:P+"?"+le.join("&")}function R(O,w){var M,P=w.width,le=w.height;if(!(P&&le))return{width:P,height:le,rect:O.crop};var G=O.crop,te=O.hotspot,ae=P/le,De=G.width/G.height;if(De>ae){var Ye=Math.round(G.height),Re=Math.round(Ye*ae),Je=Math.max(0,Math.round(G.top)),de=Math.round((te.right-te.left)/2+te.left),pt=Math.max(0,Math.round(de-Re/2));ptG.left+G.width&&(pt=G.left+G.width-Re),M={left:pt,top:Je,width:Re,height:Ye}}else{var Zt=G.width,Gt=Math.round(Zt/ae),Pt=Math.max(0,Math.round(G.left)),Rt=Math.round((te.bottom-te.top)/2+te.top),Bt=Math.max(0,Math.round(Rt-Gt/2));BtG.top+G.height&&(Bt=G.top+G.height-Gt),M={left:Pt,top:Bt,width:Zt,height:Gt}}return{width:P,height:le,rect:M}}var $=["clip","crop","fill","fillmax","max","scale","min"],F=["top","bottom","left","right","center","focalpoint","entropy"],W=["format"];function fe(O){return O&&"config"in O?typeof O.config=="function":!1}function _e(O){return O&&"clientConfig"in O?typeof O.clientConfig=="object":!1}function ee(O){for(var w=T,M=s(w),P;!(P=M()).done;){var le=P.value,G=le[0],te=le[1];if(O===G||O===te)return G}return O}function X(O){if(fe(O)){var w=O.config(),M=w.apiHost,P=w.projectId,le=w.dataset,G=M||"https://api.sanity.io";return new ie(null,{baseUrl:G.replace(/^https:\/\/api\./,"https://cdn."),projectId:P,dataset:le})}var te=O;if(_e(te)){var ae=te.clientConfig,De=ae.apiHost,Ye=ae.projectId,Re=ae.dataset,Je=De||"https://api.sanity.io";return new ie(null,{baseUrl:Je.replace(/^https:\/\/api\./,"https://cdn."),projectId:Ye,dataset:Re})}return new ie(null,O)}var ie=function(){function O(M,P){this.options=void 0,this.options=M?n({},M.options||{},P||{}):n({},P||{})}var w=O.prototype;return w.withOptions=function(P){var le=P.baseUrl||this.options.baseUrl,G={baseUrl:le};for(var te in P)if(P.hasOwnProperty(te)){var ae=ee(te);G[ae]=P[te]}return new O(this,n({baseUrl:le},G))},w.image=function(P){return this.withOptions({source:P})},w.dataset=function(P){return this.withOptions({dataset:P})},w.projectId=function(P){return this.withOptions({projectId:P})},w.bg=function(P){return this.withOptions({bg:P})},w.dpr=function(P){return this.withOptions(P&&P!==1?{dpr:P}:{})},w.width=function(P){return this.withOptions({width:P})},w.height=function(P){return this.withOptions({height:P})},w.focalPoint=function(P,le){return this.withOptions({focalPoint:{x:P,y:le}})},w.maxWidth=function(P){return this.withOptions({maxWidth:P})},w.minWidth=function(P){return this.withOptions({minWidth:P})},w.maxHeight=function(P){return this.withOptions({maxHeight:P})},w.minHeight=function(P){return this.withOptions({minHeight:P})},w.size=function(P,le){return this.withOptions({width:P,height:le})},w.blur=function(P){return this.withOptions({blur:P})},w.sharpen=function(P){return this.withOptions({sharpen:P})},w.rect=function(P,le,G,te){return this.withOptions({rect:{left:P,top:le,width:G,height:te}})},w.format=function(P){return this.withOptions({format:P})},w.invert=function(P){return this.withOptions({invert:P})},w.orientation=function(P){return this.withOptions({orientation:P})},w.quality=function(P){return this.withOptions({quality:P})},w.forceDownload=function(P){return this.withOptions({download:P})},w.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},w.flipVertical=function(){return this.withOptions({flipVertical:!0})},w.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},w.fit=function(P){if($.indexOf(P)===-1)throw new Error('Invalid fit mode "'+P+'"');return this.withOptions({fit:P})},w.crop=function(P){if(F.indexOf(P)===-1)throw new Error('Invalid crop mode "'+P+'"');return this.withOptions({crop:P})},w.saturation=function(P){return this.withOptions({saturation:P})},w.auto=function(P){if(W.indexOf(P)===-1)throw new Error('Invalid auto mode "'+P+'"');return this.withOptions({auto:P})},w.pad=function(P){return this.withOptions({pad:P})},w.url=function(){return I(this.options)},w.toString=function(){return this.url()},O}();return X})})(t0);const Cd=t0.exports;const pO=Cd(Bc),mO={name:"Home",props:{limit:Number},data(){return{loading:!0,loading2:!0,loadBlog:!0,slug:"",posts:[],post:[],blocks:[],limit:50}},created(){this.fetchData()},components:{AppTestimonialCard:Y_,AppFeaturette:G_,SanityBlocks:dO},methods:{imageUrlFor(t){return pO.image(t)},convertImageUrl(t){let e=t.replace("image-","");return e=e.replace("-jpg",".jpg"),e=e.replace("-png",".png"),console.log("https://cdn.sanity.io/images/i32b0q2c/production/"+e),"https://cdn.sanity.io/images/i32b0q2c/production/"+e},handleReadmore(t){console.log("button clicked"+t),console.log(t);const e=`*[slug.current == $slug] { + _id, + title, + slug, + body, + "image": mainImage{ + asset->{ + _id, + url + } + }, + "coverImage": coverImage{ + asset->{ + _id, + url + } + }, + "name":author->name, + images, + "authorImage":author->image + }[0] + `;this.slug=t,this.loadBlog=!1,Bc.fetch(e,{slug:this.slug}).then(n=>{this.loading2=!1,this.post=n,this.blocks=n.body,console.log(n.images[1].image.asset._ref)},n=>{this.error=n})},fetchData(){let t=`*[_type == "post"]{ + _id, + title, + slug, + description, + "image": mainImage{ + asset->{ + _id, + url + } +}, + +"name":author->name, + + excerpt + }[0..${this.limit}]`;console.log(this.limit),this.error=this.post=null,this.loading=!0,Bc.fetch(t).then(e=>{this.loading=!1,this.posts=e,console.log(e)},e=>{this.error=e})}}},gO={class:"home"},yO=d("br",null,null,-1),vO={key:0},_O={key:0,class:"loading"},bO={key:1,class:"error"},wO={key:2,class:"content px-2 py-4"},EO=["src"],TO=d("br",null,null,-1),IO={class:"text-5xl"},AO=d("br",null,null,-1),CO={class:"flex items-center"},SO=["src"],xO={class:"grid grid-cols-3 md:grid-cols-3 lg:grid-cols-3 gap-4"},PO=["src"],RO={key:1,class:"grid grid-cols-2 md:grid-cols- lg:grid-cols-3 gap-2 px-4 w-full"},OO={class:"max-w-sm border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"},kO={href:"#"},DO=["src"],NO={class:"p-2"},MO={href:"#"},VO={class:"mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"},FO={class:"mb-3 font-normal text-gray-700 dark:text-gray-400"},$O=["onClick"],LO=Xn(" Read more "),jO=d("svg",{class:"w-3.5 h-3.5 ml-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 10"},[d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5h12m0 0L9 1m4 4L9 9"})],-1),UO=[LO,jO];function BO(t,e,n,r,i,s){const o=Qe("SanityBlocks");return Y(),Z("div",gO,[yO,i.slug?(Y(),Z("div",vO,[i.loading2?(Y(),Z("div",_O,"Loading...")):ut("",!0),t.error?(Y(),Z("div",bO,Ke(t.error),1)):ut("",!0),i.post?(Y(),Z("div",wO,[i.post.coverImage?(Y(),Z("img",{key:0,src:s.imageUrlFor(i.post.coverImage),class:"w-full h-auto"},null,8,EO)):ut("",!0),TO,d("h1",IO,Ke(i.post.title),1),AO,ge(o,{blocks:i.blocks},null,8,["blocks"]),d("h6",CO,[i.post.authorImage?(Y(),Z("img",{key:0,src:s.imageUrlFor(i.post.authorImage),class:"w-16 h-16 rounded-full mr-2"},null,8,SO)):ut("",!0),Xn(" Compiled By: "+Ke(i.post.name),1)]),d("div",xO,[(Y(!0),Z($e,null,$n(i.post.images,(a,c)=>(Y(),Z("div",{key:c,class:"image-container"},[d("img",{src:s.convertImageUrl(a.image.asset._ref),class:"w-full h-auto rounded"},null,8,PO)]))),128))])])):ut("",!0)])):ut("",!0),i.loadBlog?(Y(),Z("div",RO,[(Y(!0),Z($e,null,$n(i.posts,a=>(Y(),Z("div",{key:a._id,class:"post-item"},[d("div",OO,[d("a",kO,[d("img",{class:"w-full h-auto",src:s.imageUrlFor(a.image),alt:""},null,8,DO)]),d("div",NO,[d("a",MO,[d("h5",VO,Ke(a.title),1)]),d("p",FO,Ke(a.description),1),d("a",{onClick:c=>s.handleReadmore(a.slug.current),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},UO,8,$O)])])]))),128))])):ut("",!0)])}const n0=He(mO,[["render",BO]]);const qO={components:{AppFeaturette:G_,AppTestimonialCard:Y_,AppCarousel:ZS,Doodle:jx,AppGallery:K_,Blogs:n0},mounted(){var t=null;Wx(".hidden"),window.matchMedia("(max-width: 768px)").matches||(t=this.$data.testimonials.pop(),setInterval(()=>{let n=t;t=this.$data.testimonials.shift(),this.$data.testimonials.push(n)},1e4))},data(){return{galleryImages:[Q_,X_,J_],featurettes:[{heading:"What is Speech Olympiad?",headingEnd:"",text:"The Speech Olympiad stands as the flagship occasion hosted by the Gavel Club at the University of Moratuwa. As the sole English language speech competition within the university !",image:Ux,urlString:"#about"}],testimonials:[{key:"1",imageSrc:Bx,title:"Sirimevan Jayasundera",subtitle:"Champion - SOVI",body:"Speech Olympiad is more than a mere speaking contest, it is a culmination of people, experiences and exposure. I cherish to this date, every moment of the competition which was a gateway to self-reflection that enhanced my capabilities in the corporate world and beyond."},{key:"2",imageSrc:qx,title:"Malindi Jayathunga",subtitle:"1st Runner-Up and Best Prepared Speaker - SOXI",body:"My Speech Olympiad experience has enabled me to become the storyteller I am today. I work in advertising where I get to present new ideas and unique concepts to both my team and clients on a daily basis. I developed my presenting skills thanks to the support and knowledge I got from Speech Olympiad and the Gavel Club of University of Moratuwa."},{key:"3",imageSrc:zx,title:"Asitha Rathnayake",subtitle:"Champion \u2013 SOXII",body:"Speech Olympiad is a good place to win, but more than that, it is a great place to lose. The Gavel Mora family helped me a lot to improve myself as a speaker and a leader during the course of three Speech Olympiads, which helped me become the overall champion at Speech Olympiad XII."},{key:"4",imageSrc:Hx,title:"Amaya Dharmasiri",subtitle:"1st Runner-Up and Best Impromptu Speaker \u2013 SOXII",body:"I was not new to the stage, but I was new to public speaking when I took part in Speech Olympiad. Everyone at the Gavel Club was willing to help us become the best version of ourselves. Not only did I become more confident in communicating in English, but I also learnt about my capabilities and understood myself better, thanks to Speech Olympiad."}]}}},Go=t=>(ar("data-v-a6f42418"),t=t(),cr(),t),HO={class:"container marketing"},zO=Go(()=>d("div",{class:"col-12 mb-2"},[d("h1",{class:"featurette-heading mt-0 mb-4"},"Blogs")],-1)),WO=Go(()=>d("br",null,null,-1)),KO=Go(()=>d("br",null,null,-1)),GO={class:"row mb-5"},YO=Go(()=>d("div",{class:"col-12 mb-2"},[d("h1",{class:"featurette-heading mt-0 mb-4"},"Testimonials")],-1)),QO={class:"col-12 mb-2"},XO={class:"row mb-5"},JO=Go(()=>d("div",{class:"col-12 mb-2"},[d("h1",{class:"featurette-heading mt-0 mb-4"},"Gallery")],-1)),ZO={class:"col-12 mb-2"};function ek(t,e,n,r,i,s){const o=Qe("AppCarousel"),a=Qe("Doodle"),c=Qe("AppFeaturette"),l=Qe("Blogs"),u=Qe("AppTestimonialCard"),f=Qe("AppGallery");return Y(),Z("main",null,[ge(o),d("div",HO,[ge(a),(Y(!0),Z($e,null,$n(i.featurettes,(h,g)=>(Y(),wl(c,{index:g,key:g,heading:h.heading,"heading-end":h.headingEnd,text:h.text,image:h.image,urlString:h.urlString},null,8,["index","heading","heading-end","text","image","urlString"]))),128)),zO,ge(l,{limit:50}),WO,KO,d("div",GO,[YO,d("div",QO,[ge(AA,{name:"list",tag:"div",class:"row"},{default:Rr(()=>[(Y(!0),Z($e,null,$n(i.testimonials,h=>(Y(),Z("div",{class:"col-lg-4 d-flex justify-content-center",key:"testimonial"+h.key},[ge(u,{title:h.title,imageSrc:h.imageSrc,body:h.body,subtitle:h.subtitle},null,8,["title","imageSrc","body","subtitle"])]))),128))]),_:1})])]),d("div",XO,[JO,d("div",ZO,[ge(f,{images:i.galleryImages,showLink:!0},null,8,["images"])])])])])}const tk=He(qO,[["render",ek],["__scopeId","data-v-a6f42418"]]);const nk={name:"AppArticle"},rk={class:"container-fluid article-container"},ik={class:"article column pb-2"};function sk(t,e,n,r,i,s){return Y(),Z("div",rk,[d("div",ik,[Bv(t.$slots,"default")])])}const Sd=He(nk,[["render",sk]]);const ok={name:"AppHeroSection",props:{heading:String,subHeading:String,imagePath:String,imageMobile:String}},ak={class:"hero"},ck=["src"];function lk(t,e,n,r,i,s){return Y(),Z("div",ak,[Bv(t.$slots,"default"),d("img",{class:"hero-img",src:n.imagePath,alt:"",loading:"lazy"},null,8,ck)])}const xd=He(ok,[["render",lk]]),uk="/assets/About_title_mobile.2840cc58.jpg",fk="/assets/About_title_desktop.55003129.jpg",hk="/assets/about_SO_article_image_1.babdf8b7.jpg",dk={data(){return{About_title_mobile:uk,About_title_desktop:fk}},components:{AppArticle:Sd,AppHeroSection:xd},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},pk=d("p",{class:"mt-3 first-letter"}," The Speech Olympiad stands as the flagship occasion hosted by the Gavel Club at the University of Moratuwa. As the sole English language speech competition within the university, it garners participants from all five faculties. Since its establishment in 2005, this event has progressively gained momentum, evolving into one of the most highly anticipated highlights on the university calendar. In an era where effective communication is paramount in any industry, the Speech Olympiad championship has become a coveted goal pursued by all young undergraduates. The enthusiasm instilled by faculty members to engage their students in this competition has led to a consistent rise in participation from all academic departments. While the Speech Olympiad certainly boasts prestige, it transcends mere title-seeking; it provides a platform for personal growth and the potential to ignite transformative change not only within oneself but also among peers. ",-1),mk=d("p",null," Throughout the span of the last 15 Speech Olympiad editions, there has been a consistent demonstration of the event\u2019s ability to unveil hidden talents within the university\u2019s undergraduate population. The recipients of awards and the participants who reach the final stages encompass a broad spectrum of backgrounds, highlighting the event\u2019s widespread appeal that transcends various academic disciplines. Countless champions and finalists not only in the Inter-University Best Speaker Contest and All Island Best Speaker Contest but also in several other esteemed All Island and Inter-University Competitions such as Viva Voce, Eloquence, Speech Weaver, Templanza, and Enliven, have emerged as winners, attributing their recognition to their involvement in preceding Speech Olympiad competitions. ",-1),gk=d("img",{class:"article-img",alt:"",src:hk,loading:"lazy"},null,-1);function yk(t,e,n,r,i,s){const o=Qe("AppHeroSection"),a=Qe("AppArticle");return Y(),Z("main",null,[ge(o,{imagePath:s.isMobile?i.About_title_mobile:i.About_title_desktop},null,8,["imagePath"]),ge(a,null,{default:Rr(()=>[pk,mk,gk]),_:1})])}const vk=He(dk,[["render",yk]]);const _k={name:"ArticleInterview",props:{authorName:String,intervieweeName:String,intervieweeImg:String}},bk=t=>(ar("data-v-fb599a6a"),t=t(),cr(),t),wk=bk(()=>d("p",null,"Words by",-1)),Ek={class:"interviewee d-flex"},Tk={class:"interviewee-img"},Ik=["src"],Ak={class:"interview-name"};function Ck(t,e,n,r,i,s){return Y(),Z($e,null,[wk,d("div",Ek,[d("div",Tk,[d("img",{src:n.intervieweeImg,alt:"",loading:"lazy",class:"interviewee-img"},null,8,Ik)]),d("div",Ak,Ke(n.intervieweeName),1)]),d("p",null,"Compiled by "+Ke(n.authorName),1)],64)}const r0=He(_k,[["render",Ck],["__scopeId","data-v-fb599a6a"]]),Sk="/assets/TechnicalTips_title_mobile.fae846a9.jpg",xk="/assets/TechnicalTips_title_desktop.951b060a.jpg",Pk="/assets/TechnicalTips_portrait.b97eb5b2.jpeg",Rk="/assets/TechnicalTips_StageMovement.7c954d74.jpg",Ok="/assets/TechnicalTips_Humor.a1907cb5.jpg",kk="/assets/TechnicalTips_Confidence.20cb5fc8.jpg";const Dk={data(){return{TechnicalTips_title_mobile:Sk,TechnicalTips_title_desktop:xk,TechnicalTips_portrait:Pk}},components:{AppArticle:Sd,AppHeroSection:xd,ArticleInterview:r0},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},at=t=>(ar("data-v-8b777371"),t=t(),cr(),t),Nk=at(()=>d("p",{class:"mt-3 first-letter"}," A single voice has the power to create a massive impact, it just needs the right opportunity. Speech Olympiad is a stage where revolutionary leaders and revolutionary speakers are discovered. To help you embark on this sensational journey of discovery, we got into conversation with a prestigious and eloquent past champion of Speech Olympiad, who shared some invaluable tips with us. ",-1)),Mk=at(()=>d("div",{class:"row mb-3 border"},[d("div",{class:"col d-flex text-center"},[d("p",null," Dr. Samadhi Poornima, the Champion of Speech Olympiad IX generously joined us for an interview despite her busy schedule working as a Computer Vision Algorithm Researcher at Zebra Technologies. As the crowned champion in 2015 along with the public speaking experience she has accumulated over the years, we are most certain that up-and-coming speakers will definitely have a lot to take home from the answers of Dr. Poornima. ")])],-1)),Vk=at(()=>d("h3",null,"1. What are the key points to focus on when crafting a speech?",-1)),Fk=at(()=>d("ul",null,[d("li",null,[d("b",null,"Take home message")]),d("p",null," The message that the speaker is trying to convey is a crucial aspect of a speech. It adds value to the words you speak and the effort you put in. "),d("li",null,[d("b",null,"Structure of the speech")]),d("p",null," You can structure your speech in several different ways and be creative with it. You can break down your speech into parts and use the stage appropriately for each part. But the most important thing is that your speech is clear and concise. A well-structured speech is easy to follow for the audience and makes it easier to deliver for the speaker. "),d("li",null,[d("b",null,"Stage movements")]),d("img",{class:"article-img article-img-resize",alt:"",src:Rk,loading:"lazy"}),d("p",null," Stage movements keep your speech alive. For example, if you are talking about two friends you divide the stage into two, left and right for each one. "),d("li",null,[d("b",null,"Humour")]),d("img",{class:"article-img article-img-resize",alt:"",src:Ok,loading:"lazy"}),d("p",null," Humour is what keeps your audience entertained and engaged. It is one of the best things to include in a speech. To bring out some humour does not mean you need to make your audience roll on the floor laughing. A simple smile is enough to make a difference. "),d("li",null,[d("b",null,"Gestures and vocal variations")]),d("p",null," These make your speech livelier. It shows the speaker is confident and adds some colour to your speech. One of the easiest ways to bring out some natural variations is by adding some dialogues to your speech. ")],-1)),$k=at(()=>d("h3",null,"2. How should one decide on what he/she is going to speak on?",-1)),Lk=at(()=>d("p",null," One of the best ways to come up with a good speech is to speak about your own experiences. Especially if you learnt something out of it, it certainly is worth sharing. This has three advantages ",-1)),jk=at(()=>d("ul",null,[d("li",null,"You will never forget what you are going to say."),d("li",null,"You can say it the best. After all, it is your story!"),d("li",null," You are the only one in the whole world who has gone through it. And it is worth sharing. ")],-1)),Uk=at(()=>d("p",null," Another classic approach to a good speech is to talk about something relatable, something universal. The audience would find this quite interesting and feel more connected to you. You don\u2019t need extraordinary facts or stories to make an interesting story. Simplicity itself can be quite attractive ",-1)),Bk=at(()=>d("h3",null,"3. How important is it to use stories in our speeches?",-1)),qk=at(()=>d("p",null," Stories can be interesting to add to a speech. We all love to hear stories. But it does not mean that you need to narrate lengthy tales. Something you saw on your way to university when put into the right words can be an interesting story. ",-1)),Hk=at(()=>d("h3",null,"4. Can you give some tips on impromptu speaking?",-1)),zk=at(()=>d("p",null," Impromptu speaking requires a lot of practice and experience. You need to have 3 qualities mastered when doing an impromptu speech. ",-1)),Wk=at(()=>d("ul",null,[d("li",null,[d("b",null,"Time management")]),d("p",null," Practise how to deliver some message within the given time. Time management is something you can achieve with enough practice. A well-practised speaker will have an idea of what 1-minute feels like. "),d("li",null,[d("b",null,"Confidence")]),d("img",{class:"article-img article-img-resize",alt:"",src:kk,loading:"lazy"}),d("p",null," Impromptu speakers require a lot of confidence. If you are nervous you might not be able to bring out the best speech you can. And through practice, you build up meaningful confidence. In this practice, you need to put yourself into a real situation instead of being flexible and relaxed. "),d("li",null,[d("b",null,"Thinking on the stage")]),d("p",null," Practically, you might not be able to work out all the details of your speech before going on to the stage. So it is likely that you might have to figure out certain things while you are speaking. Figure out a few things you can do to buy some thinking time on the stage. A couple of things I did was purposeful repetition and asking a question from the audience. Meaningful repetition can be used at any point in your speech. For example, if you are talking about how your parents wanted you to be a doctor you can say something like "),d("ul",null,[d("li",null,"\u2018The girl next door was a doctor\u2019"),d("li",null,"\u2018The girl next next door was a doctor\u2019"),d("li",null,"\u2018The girl next next next door was a doctor\u2019"),d("li",null,"\u2018So my mama wanted me to be a doctor\u2019")]),d("p",null," Instead of simply saying \u2018my mama wanted me to be a doctor\u2019, when you use a simple phrase and repeat it, it gives you time to think without making the audience feel you are struggling. And when you ask a question, the general practice is you give a few seconds for the audience to react. When you ask a rhetorical question, you don\u2019t need to respond to their reaction. Instead, you can take this time to think and focus on what you are going to say next. ")],-1)),Kk=at(()=>d("h3",null,"5. Do you have any tips on practising a speech?",-1)),Gk=at(()=>d("p",null," Practice is key for both prepared speeches and impromptu speeches. You need to practise until you feel at home on a stage. Practice is what brings you confidence. For prepared speeches, it is good if you first have a basic structure of the speech organised and then practise with words that come to you naturally. In this way, you would be more comfortable with the language you use for your speech. ",-1)),Yk=at(()=>d("p",null,"A couple of things you can do to fine-tune a prepared speech are,",-1)),Qk=at(()=>d("ul",null,[d("li",null,[d("b",null,"Remove repetitions")]),d("p",null," Think carefully of each sentence, and each phrase. Think what value it would add to the speech. And think if the same thing is being repeated (not purposeful repetition) somewhere else in the speech unintentionally. "),d("li",null,[d("b",null,"Balance your speech")]),d("p",null," Add a balance to your speech with a bit of humour and a bit of seriousness. Even if the speech is about a sad story, it is good to have some appropriate humour at least once. And even if the speech is a humorous speech, it is great if there is an important take-home message. "),d("li",null,[d("b",null,"Make it simple, clear and concise")]),d("p",null," In a prepared speech it is very important to have a clear structure to your speech. It should be easy-to-follow and meaningful to what you say. Something I personally followed for practising a prepared speech was to watch some world championship speeches. When I say watch it, I mean \u2018watch it watch it\u2019 where you notice the structure, notice the way they start, take transitions and bring out the message. ")],-1)),Xk=at(()=>d("p",null," Practising an impromptu speech can be a bit tricky. Because even if you practise 1000 speeches, the next one could be an entirely different experience. These are some ways of practising impromptu speeches that I personally followed. ",-1)),Jk=at(()=>d("ul",null,[d("li",null," Have some generic stories ready. These could be targeted for some common impromptu topics such as never giving up, little things matter in life and being true to yourself etc. "),d("li",null," Have some facts ready. It is good to have some general knowledge facts ready when you are practising for an impromptu speech. You don\u2019t need to memorise a whole list but 5 key facts from different areas can be helpful if you can\u2019t think of a story related to the topic you got. This could be about areas like economy, education or some great sayings etc. "),d("li",null," Be ready to think of something entirely new then and there. This is an example I heard from someone when I was practising. So this guy has got the topic \u2018Michael Jordan\u2019 as the title for his impromptu speech. He started the speech with \u201CI don\u2019t know who Michael Jordan is but I know a guy named Michael and another guy named Jordan\u201D, and went on to deliver a very interesting speech which was completely unexpected. "),d("li",null," Practise coming up with an impromptu speech response within 2 minutes. And if you could not, just deliver whatever that you manage to come up with then and there. Experience how you work under pressure. With each practice, you will improve. And once you feel confident, try lowering this time, now try to come up with an impromptu speech in 1 and half minutes. And next, try 1 minute. When you practice like this, even if nothing comes to your mind in the first minute, you would still be able to remain calm and think clearly because you know you can come up with something successful even in the last few seconds. "),d("li",null," It is okay to practise on the same topic several times. No need to have a new topic each time you practise. But practise facing completely unheard of topics as well, just to broaden your thinking. "),d("li",null," No need to practise for long hours. So do not exhaust yourself. You might get tired and lose interest. ")],-1)),Zk=at(()=>d("p",null," From deciding on what to speak, crafting your speech, practising your speech, to finally delivering your speech, each and every aspect needed for a good public speaker was insightfully addressed in detail by Dr. Poornima Take in and practise what you have learnt. Showcase your progress at Speech Olympiad. Get onto that stage and speak your heart out, because the speech you deliver today can be the reason for a changed world tomorrow. ",-1));function e4(t,e,n,r,i,s){const o=Qe("AppHeroSection"),a=Qe("ArticleInterview"),c=Qe("AppArticle");return Y(),Z("main",null,[ge(o,{imagePath:s.isMobile?i.TechnicalTips_title_mobile:i.TechnicalTips_title_desktop},null,8,["imagePath"]),ge(c,null,{default:Rr(()=>[Nk,Mk,Vk,Fk,$k,Lk,jk,Uk,Bk,qk,Hk,zk,Wk,Kk,Gk,Yk,Qk,Xk,Jk,Zk,ge(a,{"author-name":"Udesh Dangalla","interviewee-name":"Dr. Samadhi Poornima",intervieweeImg:i.TechnicalTips_portrait},null,8,["intervieweeImg"])]),_:1})])}const t4=He(Dk,[["render",e4],["__scopeId","data-v-8b777371"]]);const n4="/assets/prelis4.9270c5ef.jpg",r4="/assets/prelis5.492e8603.jpg",i4="/assets/prelis6.9e3344fc.jpg",s4="/assets/prelis7.9637c075.jpg",o4="/assets/prelis8.754f06d4.jpg",a4="/assets/prelis9.3f3d09cb.jpg",c4="/assets/prelis10.618eb0c8.jpg",l4="/assets/prelis11.79b2289e.jpg",u4="/assets/judges.4cff70b3.jpg",f4="/assets/group_pic_1.7dc32d4e.jpg",h4="/assets/crowd_1.92bdcae5.jpg";const d4={components:{AppGallery:K_},data(){return{images:[Q_,X_,J_,n4,r4,i4,s4,o4,a4,c4,l4,h4,f4,u4]}}},p4={class:"container"},m4={class:"row mb-5"};function g4(t,e,n,r,i,s){const o=Qe("AppGallery");return Y(),Z("main",null,[d("div",p4,[d("div",m4,[ge(o,{images:i.images},null,8,["images"])])])])}const y4=He(d4,[["render",g4],["__scopeId","data-v-f5afcb38"]]);const v4={};function _4(t,e){return Y(),Z("main",null,"Page Not Found")}const b4=He(v4,[["render",_4],["__scopeId","data-v-147157fb"]]),w4="/assets/PathOfChampion_title_mobile.1d5e1775.jpg",E4="/assets/PathOfChampion_title_desktop.273035c9.jpg",T4="/assets/PathOfChampion_image1_mobile.f116adc3.jpg",I4="/assets/PathOfChampion_image1_desktop.5eb979c0.jpg",A4="/assets/PathOfChampion_image2_mobile.8d1c7b14.jpg",C4="/assets/PathOfChampion_image2_desktop.ead73ac0.jpg",S4="/assets/PathOfChampion_portrait.adc4344f.jpg",x4={data(){return{PathOfChampion_title_mobile:w4,PathOfChampion_title_desktop:E4,PathOfChampion_image1_mobile:T4,PathOfChampion_image1_desktop:I4,PathOfChampion_image2_mobile:A4,PathOfChampion_image2_desktop:C4,PathOfChampion_portrait:S4}},components:{AppArticle:Sd,AppHeroSection:xd,ArticleInterview:r0},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},P4=d("p",{class:"mt-3 first-letter"}," Walking the journey through the shadows of my past, during my school days, just like most students, I was always reluctant to opt in speech contests. Perturbed by the fear of failure and embarrassment, I never wanted to perform before an audience. I remember being forced to do a speech in grade 11 at the assembly which surprisingly turned out well. That was when I realized that I had a potential towards public speaking. Thus, I started my public speaking journey. Following this, I grabbed a few chances to compere at school functions and gradually established myself as a decent public speaker. ",-1),R4=d("p",null," I geared my public speaking drive during the twilight of my school career, but I did not have many opportunities to explore. Right from the moment I joined university, I told the inner me that I am going to try as many extracurricular activities as possible. Taking part in a speech contest was the ultimate challenge since delivering a speech under pressure was a monumental task. The very minute I stepped into my university life, I eagerly joined Speech Olympiad, embarking on a quest to expand my comfort zone. ",-1),O4=["src"],k4=d("p",null," I was excited for my very first experience at Speech Olympiad which was also the first speech contest I took part in. I was, however, under-prepared with a very short speech lasting merely 2 minutes, not to mention getting tongue-tied somewhere mid-speech as well. ",-1),D4=d("p",null," Leaving the hall, I realized that I needed help from someone who was experienced and proficient in public speaking, which was my driving intention to join the Gavel Club. ",-1),N4=d("p",null,[Xn(" The following year was all about learning the basics of public speaking, getting the exposure and being mentored by senior Gaveliers. With their guidance, I came up with a solid speech for the following Speech Olympiad, and with a huge effort put in from my end, I emerged as the "),d("b",null,"first runner-up"),Xn(". ")],-1),M4=["src"],V4=d("p",null," Motivated by the success of that year\u2019s competition, I wanted to compete in the upcoming competition as well. But along with being a past winner and the experience gained through Gavel, I became overconfident in myself and my abilities. I prioritized other commitments over Speech Olympiad practices and mentoring sessions with the belief that I would be able to manage on my own. It was only after emerging second runner-up that year, I realized the fault in my approach. ",-1),F4=d("p",null," The final Speech Olympiad during my undergraduate life was the last shot at giving my best. I went back to square one and started my journey once again. This time, I reinforced myself with past Gavel experiences along with the understanding that I will always be able to improve with others' help. ",-1),$4=d("p",{class:"box"},[Xn(" Similar to my second Speech Olympiad experience, I worked hard, carefully focusing on the specifics such as time management and coming up with the best approach for table topics while sharpening my speaking skills and refining my speech with the help of practice and impactful mentoring sessions; which finally made me the "),d("b",null,[d("br"),Xn("Champion of Speech Olympiad VIII in 2014")]),Xn(". ")],-1),L4=d("p",null," The surreal moment when I emerged as the champion is something I will cherish forever! I will never forget the warm big proud smiles my parents, friends and my Gavel family were projecting at me from the audience. Engulfing the feelings of this successful achievement was the appreciation I had towards my mentors who guided me to this achievement; some of whom had even gone beyond their university life but still showed up to support me and all my fellow Gaveliers. ",-1),j4=d("p",null," Unfortunately, till then I did not have a long-sighted personality that focused on developing leadership qualities, rather I was only improving my public speaking skills through the Gavel Club. On that day, I promised myself to become a better team player and that was the vibrant rainbow that coloured the path for me to become a Toastmaster. Currently working as the Assistant Division Director of Toastmaster District 82 - Division F, I am very proud to say that I have taken what I learnt from Gavel, through to Toastmasters, not only in becoming a sound Toastmaster, but perhaps in nurturing myself as an encouraging mentor as well. ",-1),U4=d("p",null," I believe that regardless of where you stand, if you are passionate about something, it is important to expose and challenge yourself to grow as an individual. Speech Olympiad taught me that compering and delivering a speech are not the same thing, especially when it comes to a contest where the delivery is done under a lot of pressure. Some core lessons I learnt were that commitment, along with self-evaluation, learning from others and being humble, goes a long way. Reflecting on my voyage of public speaking, the moral is to remind oneself to never shy away from opportunities. It is not necessarily about winning or losing, but the experience and exposure you gain by pushing your limits to become better at what you do and the way you define yourself. ",-1),B4=d("p",{class:"box"}," Being a champion does not only mean that you will be celebrating, but rather exploring the deep end and investing in yourself more. Grow up to every dawn of sunrise and bloom wherever life plants you, for enjoying what you do matters the most. I cherish the journey, not the end result. ",-1);function q4(t,e,n,r,i,s){const o=Qe("AppHeroSection"),a=Qe("ArticleInterview"),c=Qe("AppArticle");return Y(),Z("main",null,[ge(o,{imagePath:s.isMobile?i.PathOfChampion_title_mobile:i.PathOfChampion_title_desktop},null,8,["imagePath"]),ge(c,null,{default:Rr(()=>[P4,R4,d("img",{class:"article-img",alt:"",src:s.isMobile?i.PathOfChampion_image1_mobile:i.PathOfChampion_image1_desktop,loading:"lazy"},null,8,O4),k4,D4,N4,d("img",{class:"article-img",src:s.isMobile?i.PathOfChampion_image2_mobile:i.PathOfChampion_image2_desktop,loading:"lazy"},null,8,M4),V4,F4,$4,L4,j4,U4,B4,ge(a,{"author-name":"Chemini Mallikarachchi","interviewee-name":"Mohamed Yasir",intervieweeImg:i.PathOfChampion_portrait},null,8,["intervieweeImg"])]),_:1})])}const H4=He(x4,[["render",q4]]);/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var Sg=Object.getOwnPropertySymbols,z4=Object.prototype.hasOwnProperty,W4=Object.prototype.propertyIsEnumerable;function K4(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function G4(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(s){return e[s]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(s){i[s]=s}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Et=G4()?Object.assign:function(t,e){for(var n,r=K4(t),i,s=1;s)","* Array of document IDs","* Object containing `query`"].join(` +`);throw new Error(`Unknown selection - must be one of: + +`.concat(n))},Br={};(function(t){function e(i){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(i)}var n=["image","file"],r=["before","after","replace"];t.dataset=function(i){if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(i))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},t.projectId=function(i){if(!/^[-a-z0-9]+$/i.test(i))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},t.validateAssetType=function(i){if(n.indexOf(i)===-1)throw new Error("Invalid asset type: ".concat(i,". Must be one of ").concat(n.join(", ")))},t.validateObject=function(i,s){if(s===null||e(s)!=="object"||Array.isArray(s))throw new Error("".concat(i,"() takes an object of properties"))},t.requireDocumentId=function(i,s){if(!s._id)throw new Error("".concat(i,'() requires that the document contains an ID ("_id" property)'));t.validateDocumentId(i,s._id)},t.validateDocumentId=function(i,s){if(typeof s!="string"||!/^[a-z0-9_.-]+$/i.test(s))throw new Error("".concat(i,'(): "').concat(s,'" is not a valid document ID'))},t.validateInsert=function(i,s,o){var a="insert(at, selector, items)";if(r.indexOf(i)===-1){var c=r.map(function(l){return'"'.concat(l,'"')}).join(", ");throw new Error("".concat(a,' takes an "at"-argument which is one of: ').concat(c))}if(typeof s!="string")throw new Error("".concat(a,' takes a "selector"-argument which must be a string'));if(!Array.isArray(o))throw new Error("".concat(a,' takes an "items"-argument which must be an array'))},t.hasDataset=function(i){if(!i.dataset)throw new Error("`dataset` must be provided to perform queries");return i.dataset||""},t.requestTag=function(i){if(typeof i!="string"||!/^[a-z0-9._-]{1,75}$/i.test(i))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return i}})(Br);function Bu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wr=Et,ND=c0,l0=Br,qu=l0.validateObject,MD=l0.validateInsert;function Zf(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.selection=t,this.operations=wr({},e),this.client=n}wr(Zf.prototype,{clone:function(){return new Zf(this.selection,wr({},this.operations),this.client)},set:function(e){return this._assign("set",e)},diffMatchPatch:function(e){return qu("diffMatchPatch",e),this._assign("diffMatchPatch",e)},unset:function(e){if(!Array.isArray(e))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=wr({},this.operations,{unset:e}),this},setIfMissing:function(e){return this._assign("setIfMissing",e)},replace:function(e){return qu("replace",e),this._set("set",{$:e})},inc:function(e){return this._assign("inc",e)},dec:function(e){return this._assign("dec",e)},insert:function(e,n,r){var i;return MD(e,n,r),this._assign("insert",(i={},Bu(i,e,n),Bu(i,"items",r),i))},append:function(e,n){return this.insert("after","".concat(e,"[-1]"),n)},prepend:function(e,n){return this.insert("before","".concat(e,"[0]"),n)},splice:function(e,n,r,i){var s=typeof r>"u"||r===-1,o=n<0?n-1:n,a=s?-1:Math.max(0,n+r),c=o<0&&a>=0?"":a,l="".concat(e,"[").concat(o,":").concat(c,"]");return this.insert("replace",l,i||[])},ifRevisionId:function(e){return this.operations.ifRevisionID=e,this},serialize:function(){return wr(ND(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.client)throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var n=typeof this.selection=="string",r=wr({returnFirst:n,returnDocuments:!0},e);return this.client.mutate({patch:this.serialize()},r)},reset:function(){return this.operations={},this},_set:function(e,n){return this._assign(e,n,!1)},_assign:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return qu(e,n),this.operations=wr({},this.operations,Bu({},e,wr({},r&&this.operations[e]||{},n))),this}});var jd=Zf;function kg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hu=Et,Vi=Br,zu=jd,VD={returnDocuments:!1};function eh(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.trxId=n,this.operations=t,this.client=e}Hu(eh.prototype,{clone:function(){return new eh(this.operations.slice(0),this.client,this.trxId)},create:function(e){return Vi.validateObject("create",e),this._add({create:e})},createIfNotExists:function(e){var n="createIfNotExists";return Vi.validateObject(n,e),Vi.requireDocumentId(n,e),this._add(kg({},n,e))},createOrReplace:function(e){var n="createOrReplace";return Vi.validateObject(n,e),Vi.requireDocumentId(n,e),this._add(kg({},n,e))},delete:function(e){return Vi.validateDocumentId("delete",e),this._add({delete:{id:e}})},patch:function(e,n){var r=typeof n=="function",i=e instanceof zu;if(i)return this._add({patch:e.serialize()});if(r){var s=n(new zu(e,{},this.client));if(!(s instanceof zu))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:s.serialize()})}return this._add({patch:Hu({id:e},n)})},transactionId:function(e){return e?(this.trxId=e,this):this.trxId},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(e){if(!this.client)throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),Hu({transactionId:this.trxId},VD,e||{}))},reset:function(){return this.operations=[],this},_add:function(e){return this.operations.push(e),this}});var u0=eh,FD=["tag"];function $D(t,e){if(t==null)return{};var n=LD(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function LD(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s=0)&&(n[i]=t[i]);return n}var Fi=encodeURIComponent,f0=function(t){var e=t.query,n=t.params,r=n===void 0?{}:n,i=t.options,s=i===void 0?{}:i,o=s.tag,a=$D(s,FD),c="query=".concat(Fi(e)),l=o?"?tag=".concat(Fi(o),"&").concat(c):"?".concat(c),u=Object.keys(r).reduce(function(f,h){return"".concat(f,"&").concat(Fi("$".concat(h)),"=").concat(Fi(JSON.stringify(r[h])))},l);return Object.keys(a).reduce(function(f,h){return s[h]?"".concat(f,"&").concat(Fi(h),"=").concat(Fi(s[h])):f},u)},th={exports:{}};/** @license + * eventsource.js + * Available under MIT License (MIT) + * https://github.com/Yaffle/EventSource/ + */(function(t,e){(function(n){var r=n.setTimeout,i=n.clearTimeout,s=n.XMLHttpRequest,o=n.XDomainRequest,a=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,f=n.fetch,h=n.Response,g=n.TextDecoder,S=n.TextEncoder,T=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(y){l.readyState="complete"},!1)),s==null&&a!=null&&(s=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(y){function E(){}return E.prototype=y,new E}),Date.now||(Date.now=function(){return new Date().getTime()}),T==null){var I=f;f=function(y,E){var C=E.signal;return I(y,{headers:E.headers,credentials:E.credentials,cache:E.cache}).then(function(A){var N=A.body.getReader();return C._reader=N,C._aborted&&C._reader.cancel(),{status:A.status,statusText:A.statusText,headers:A.headers,body:{getReader:function(){return N}}}})},T=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function b(){this.bitsNeeded=0,this.codePoint=0}b.prototype.decode=function(y){function E(q,K,H){if(H===1)return q>=128>>K&&q<=2048>>K&&q<=57344>>K&&q<=65536>>K&&q<>6>15?3:K>31?2:1;if(q===6*2)return K>15?3:2;if(q===6*3)return 3;throw new Error}for(var A=65533,N="",D=this.bitsNeeded,k=this.codePoint,B=0;B191||!E(k<<6|L&63,D-6,C(D,k)))&&(D=0,k=A,N+=String.fromCharCode(k)),D===0?(L>=0&&L<=127?(D=0,k=L):L>=192&&L<=223?(D=6*1,k=L&31):L>=224&&L<=239?(D=6*2,k=L&15):L>=240&&L<=247?(D=6*3,k=L&7):(D=0,k=A),D!==0&&!E(k,D,C(D,k))&&(D=0,k=A)):(D-=6,k=k<<6|L&63),D===0&&(k<=65535?N+=String.fromCharCode(k):(N+=String.fromCharCode(55296+(k-65535-1>>10)),N+=String.fromCharCode(56320+(k-65535-1&1023))))}return this.bitsNeeded=D,this.codePoint=k,N};var R=function(){try{return new g().decode(new S().encode("test"),{stream:!0})==="test"}catch(y){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+y)}return!1};(g==null||S==null||!R())&&(g=b);var $=function(){};function F(y){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=$,this.onload=$,this.onerror=$,this.onreadystatechange=$,this._contentType="",this._xhr=y,this._sendTimeout=0,this._abort=$}F.prototype.open=function(y,E){this._abort(!0);var C=this,A=this._xhr,N=1,D=0;this._abort=function(H){C._sendTimeout!==0&&(i(C._sendTimeout),C._sendTimeout=0),(N===1||N===2||N===3)&&(N=4,A.onload=$,A.onerror=$,A.onabort=$,A.onprogress=$,A.onreadystatechange=$,A.abort(),D!==0&&(i(D),D=0),H||(C.readyState=4,C.onabort(null),C.onreadystatechange())),N=0};var k=function(){if(N===1){var H=0,re="",be=void 0;if("contentType"in A)H=200,re="OK",be=A.contentType;else try{H=A.status,re=A.statusText,be=A.getResponseHeader("Content-Type")}catch{H=0,re="",be=void 0}H!==0&&(N=2,C.readyState=2,C.status=H,C.statusText=re,C._contentType=be,C.onreadystatechange())}},B=function(){if(k(),N===2||N===3){N=3;var H="";try{H=A.responseText}catch{}C.readyState=3,C.responseText=H,C.onprogress()}},L=function(H,re){if((re==null||re.preventDefault==null)&&(re={preventDefault:$}),B(),N===1||N===2||N===3){if(N=4,D!==0&&(i(D),D=0),C.readyState=4,H==="load")C.onload(re);else if(H==="error")C.onerror(re);else if(H==="abort")C.onabort(re);else throw new TypeError;C.onreadystatechange()}},q=function(H){A!=null&&(A.readyState===4?(!("onload"in A)||!("onerror"in A)||!("onabort"in A))&&L(A.responseText===""?"error":"load",H):A.readyState===3?"onprogress"in A||B():A.readyState===2&&k())},K=function(){D=r(function(){K()},500),A.readyState===3&&B()};"onload"in A&&(A.onload=function(H){L("load",H)}),"onerror"in A&&(A.onerror=function(H){L("error",H)}),"onabort"in A&&(A.onabort=function(H){L("abort",H)}),"onprogress"in A&&(A.onprogress=B),"onreadystatechange"in A&&(A.onreadystatechange=function(H){q(H)}),("contentType"in A||!("ontimeout"in s.prototype))&&(E+=(E.indexOf("?")===-1?"?":"&")+"padding=true"),A.open(y,E,!0),"readyState"in A&&(D=r(function(){K()},0))},F.prototype.abort=function(){this._abort(!1)},F.prototype.getResponseHeader=function(y){return this._contentType},F.prototype.setRequestHeader=function(y,E){var C=this._xhr;"setRequestHeader"in C&&C.setRequestHeader(y,E)},F.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},F.prototype.send=function(){if((!("ontimeout"in s.prototype)||!("sendAsBinary"in s.prototype)&&!("mozAnon"in s.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var y=this;y._sendTimeout=r(function(){y._sendTimeout=0,y.send()},4);return}var E=this._xhr;"withCredentials"in E&&(E.withCredentials=this.withCredentials);try{E.send(void 0)}catch(C){throw C}};function W(y){return y.replace(/[A-Z]/g,function(E){return String.fromCharCode(E.charCodeAt(0)+32)})}function fe(y){for(var E=Object.create(null),C=y.split(`\r +`),A=0;A"u"?typeof window<"u"?window:typeof self<"u"?self:Ft:globalThis)})(th,th.exports);var jD=th.exports.EventSourcePolyfill,UD=function(t,e){return e.reduce(function(n,r){return typeof t[r]>"u"||(n[r]=t[r]),n},{})},BD=function(t,e){return Object.keys(e).concat(Object.keys(t)).reduce(function(n,r){return n[r]=typeof t[r]>"u"?e[r]:t[r],n},{})};function Dg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ng(t){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:{},i=this.clientConfig,s=i.url,o=i.token,a=i.withCredentials,c=i.requestTagPrefix,l=r.tag&&c?[c,r.tag].join("."):r.tag,u=Ng(Ng({},GD(r,JD)),{},{tag:l}),f=KD(u,XD),h=YD({query:e,params:n,options:f,tag:l}),g="".concat(s).concat(this.getDataUrl("listen",h));if(g.length>QD)return new Mg(function(b){return b.error(new Error("Query too large for listener"))});var S=u.events?u.events:["mutation"],T=S.indexOf("reconnect")!==-1,I={};return(o||a)&&(I.withCredentials=!0),o&&(I.headers={Authorization:"Bearer ".concat(o)}),new Mg(function(b){var R=O(),$,F=!1;function W(){F||(ie(),!F&&R.readyState===Vg.CLOSED&&(X(),clearTimeout($),$=setTimeout(w,100)))}function fe(P){b.error(e3(P))}function _e(P){var le=h0(P);return le instanceof Error?b.error(le):b.next(le)}function ee(P){F=!0,X(),b.complete()}function X(){R.removeEventListener("error",W,!1),R.removeEventListener("channelError",fe,!1),R.removeEventListener("disconnect",ee,!1),S.forEach(function(P){return R.removeEventListener(P,_e,!1)}),R.close()}function ie(){T&&b.next({type:"reconnect"})}function O(){var P=new Vg(g,I);return P.addEventListener("error",W,!1),P.addEventListener("channelError",fe,!1),P.addEventListener("disconnect",ee,!1),S.forEach(function(le){return P.addEventListener(le,_e,!1)}),P}function w(){R=O()}function M(){F=!0,X()}return M})};function h0(t){try{var e=t.data&&JSON.parse(t.data)||{};return HD({type:t.type},e)}catch(n){return n}}function e3(t){if(t instanceof Error)return t;var e=h0(t);return e instanceof Error?e:new Error(t3(e))}function t3(t){return t.error?t.error.description?t.error.description:typeof t.error=="string"?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error"}function Fg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var n3=Et,d0=Qo,Ds=d0.map,Wu=d0.filter,Ku=Br,r3=c0,i3=f0,$g=u0,Lg=jd,s3=ZD,o3=function(e,n){var r=typeof e>"u"?n:e;return e===!1?void 0:r},a3=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{dryRun:e.dryRun,returnIds:!0,returnDocuments:o3(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}},Gu=function(e){return e.type==="response"},c3=function(e){return e.body},l3=function(e,n){return e.reduce(function(r,i){return r[n(i)]=i,r},Object.create(null))},Ca=function(e){return e.toPromise()},u3=11264,f3={listen:s3,getDataUrl:function(e,n){var r=this.clientConfig,i=Ku.hasDataset(r),s="/".concat(e,"/").concat(i),o=n?"".concat(s,"/").concat(n):s;return"/data".concat(o).replace(/\/($|\?)/,"$1")},fetch:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.filterResponse===!1?function(o){return o}:function(o){return o.result},s=this._dataRequest("query",{query:e,params:n},r).pipe(Ds(i));return this.isPromiseAPI()?Ca(s):s},getDocument:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={uri:this.getDataUrl("doc",e),json:!0,tag:n.tag},i=this._requestObservable(r).pipe(Wu(Gu),Ds(function(s){return s.body.documents&&s.body.documents[0]}));return this.isPromiseAPI()?Ca(i):i},getDocuments:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={uri:this.getDataUrl("doc",e.join(",")),json:!0,tag:n.tag},i=this._requestObservable(r).pipe(Wu(Gu),Ds(function(s){var o=l3(s.body.documents||[],function(a){return a._id});return e.map(function(a){return o[a]||null})}));return this.isPromiseAPI()?Ca(i):i},create:function(e,n){return this._create(e,"create",n)},createIfNotExists:function(e,n){return Ku.requireDocumentId("createIfNotExists",e),this._create(e,"createIfNotExists",n)},createOrReplace:function(e,n){return Ku.requireDocumentId("createOrReplace",e),this._create(e,"createOrReplace",n)},patch:function(e,n){return new Lg(e,n,this)},delete:function(e,n){return this.dataRequest("mutate",{mutations:[{delete:r3(e)}]},n)},mutate:function(e,n){var r=e instanceof Lg||e instanceof $g?e.serialize():e,i=Array.isArray(r)?r:[r],s=n&&n.transactionId;return this.dataRequest("mutate",{mutations:i,transactionId:s},n)},transaction:function(e){return new $g(e,this)},dataRequest:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this._dataRequest(e,n,r);return this.isPromiseAPI()?Ca(i):i},_dataRequest:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=e==="mutate",s=e==="query",o=!i&&i3(n),a=!i&&o.length2&&arguments[2]!==void 0?arguments[2]:{},i=Fg({},n,e),s=n3({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[i]},s)}},h3=Et,d3=Br;function p0(t){this.request=t.request.bind(t)}h3(p0.prototype,{create:function(e,n){return this._modify("PUT",e,n)},edit:function(e,n){return this._modify("PATCH",e,n)},delete:function(e){return this._modify("DELETE",e)},list:function(){return this.request({uri:"/datasets"})},_modify:function(e,n,r){return d3.dataset(n),this.request({method:e,uri:"/datasets/".concat(n),body:r})}});var p3=p0,m3=Et;function m0(t){this.client=t}m3(m0.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(e){return this.client.request({uri:"/projects/".concat(e)})}});var g3=m0,y3=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t[n])));return e.length>0?"?".concat(e.join("&")):""};function v3(t,e){return E3(t)||w3(t,e)||b3(t,e)||_3()}function _3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b3(t,e){if(!!t){if(typeof t=="string")return jg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jg(t,e)}}function jg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!(e instanceof window.File)?t:g0({filename:t.preserveFilename===!1?void 0:e.name,contentType:e.type},t)}g0(v0.prototype,{upload:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Sa.validateAssetType(e);var i=r.extract||void 0;i&&!i.length&&(i=["none"]);var s=Sa.hasDataset(this.client.clientConfig),o=e==="image"?"images":"files",a=C3(r,n),c=a.tag,l=a.label,u=a.title,f=a.description,h=a.creditLine,g=a.filename,S=a.source,T={label:l,title:u,description:f,filename:g,meta:i,creditLine:h};S&&(T.sourceId=S.id,T.sourceName=S.name,T.sourceUrl=S.url);var I=this.client._requestObservable({tag:c,method:"POST",timeout:a.timeout||0,uri:"/assets/".concat(o,"/").concat(s),headers:a.contentType?{"Content-Type":a.contentType}:{},query:T,body:n});return this.client.isPromiseAPI()?I.pipe(I3(function(b){return b.type==="response"}),T3(function(b){return b.body.document})).toPromise():I},delete:function(e,n){console.warn("client.assets.delete() is deprecated, please use client.delete()");var r=n||"";return/^(image|file)-/.test(r)?e._id&&(r=e._id):r="".concat(e,"-").concat(r),Sa.hasDataset(this.client.clientConfig),this.client.delete(r)},getImageUrl:function(e,n){var r=e._ref||e;if(typeof r!="string")throw new Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9_]+-\d+x\d+-[a-z]{1,5}$/.test(r))throw new Error('Unsupported asset ID "'.concat(r,'". URL generation only works for auto-generated IDs.'));var i=r.split("-"),s=v3(i,4),o=s[1],a=s[2],c=s[3];Sa.hasDataset(this.client.clientConfig);var l=this.client.clientConfig,u=l.projectId,f=l.dataset,h=n?A3(n):"";return"https://cdn.sanity.io/images/".concat(u,"/").concat(f,"/").concat(o,"-").concat(a,".").concat(c).concat(h)}});var S3=v0,x3=Et;function _0(t){this.client=t}x3(_0.prototype,{getById:function(e){return this.client.request({uri:"/users/".concat(e)})}});var P3=_0,R3=Et;function b0(t){this.client=t}R3(b0.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}});var O3=b0,w0={exports:{}},k3=function(){var e=[];return{subscribe:n,publish:r};function n(i){return e.push(i),function(){var o=e.indexOf(i);o>-1&&e.splice(o,1)}}function r(){for(var i=0;i2?a-2:0),l=2;l=2&&(a=a.slice(2)):jn(r)?a=n[4]:r?i&&(a=a.slice(2)):o>=2&&jn(e.protocol)&&(a=n[4]),{protocol:r,slashes:i||jn(r),slashesCount:o,rest:a}}function q3(t,e){if(t==="")return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],s=!1,o=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),o++):o&&(r===0&&(s=!0),n.splice(r,1),o--);return s&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function qn(t,e,n){if(t=Bd(t),t=t.replace(T0,""),!(this instanceof qn))return new qn(t,e,n);var r,i,s,o,a,c,l=nh.slice(),u=typeof e,f=this,h=0;for(u!=="object"&&u!=="string"&&(n=e,e=null),n&&typeof n!="function"&&(n=Ml.parse),e=A0(e),i=C0(t||"",e),r=!i.protocol&&!i.slashes,f.slashes=i.slashes||r&&e.slashes,f.protocol=i.protocol||e.protocol||"",t=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||B3.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!jn(f.protocol)))&&(l[3]=[/(.*)/,"pathname"]);h"u"?!1:navigator.product==="ReactNative",Y3=Object.prototype.hasOwnProperty,rh={timeout:G3?6e4:12e4},Q3=function(t){var e=typeof t=="string"?Yu({url:t},rh):Yu({},rh,t),n=K3(e.url,{},!0);return e.timeout=S0(e.timeout),e.query&&(n.query=Yu({},n.query,J3(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=n.toString(X3),e};function X3(t){var e=[];for(var n in t)Y3.call(t,n)&&r(n,t[n]);return e.length?e.join("&"):"";function r(i,s){Array.isArray(s)?s.forEach(function(o){return r(i,o)}):e.push([i,s].map(encodeURIComponent).join("="))}}function S0(t){if(t===!1||t===0)return!1;if(t.connect||t.socket)return t;var e=Number(t);return isNaN(e)?S0(rh.timeout):{connect:e,socket:e}}function J3(t){var e={};for(var n in t)t[n]!==void 0&&(e[n]=t[n]);return e}var Z3=/^https?:\/\//i,eN=function(t){if(!Z3.test(t.url))throw new Error('"'.concat(t.url,'" is not a valid URL'))},x0={exports:{}},Hg=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/,tN={regex:Hg,parse:function(t){var e=Hg.exec(t);return e?{protocol:(e[1]||"").toLowerCase()||void 0,hostname:(e[5]||"").toLowerCase()||void 0,port:e[6]||void 0}:{}}},zg=tN,nN=function(t,e,n){if(t===e)return!0;var r=zg.parse(t,!1,!0),i=zg.parse(e,!1,!0),s=r.port|0||(r.protocol==="https"?443:80),o=i.port|0||(i.protocol==="https"?443:80),a={proto:r.protocol===i.protocol,hostname:r.hostname===i.hostname,port:s===o};return a.proto&&a.hostname&&(a.port||n)};function bs(){this.readyState=0}bs.prototype.open=function(t,e){this._method=t,this._url=e,this._resHeaders="",this.readyState=1,this.onreadystatechange()};bs.prototype.abort=function(){this._controller&&this._controller.abort()};bs.prototype.getAllResponseHeaders=function(){return this._resHeaders};bs.prototype.setRequestHeader=function(t,e){this._headers=this._headers||{},this._headers[t]=e};bs.prototype.send=function(t){var e=this,n=this._controller=typeof AbortController=="function"&&new AbortController,r=this.responseType!=="arraybuffer",i={method:this._method,headers:this._headers,signal:n&&n.signal,body:t};typeof window<"u"&&(i.credentials=this.withCredentials?"include":"omit"),fetch(this._url,i).then(function(s){return s.headers.forEach(function(o,a){e._resHeaders+="".concat(a,": ").concat(o,`\r +`)}),e.status=s.status,e.statusText=s.statusText,e.readyState=3,r?s.text():s.arrayBuffer()}).then(function(s){r?e.responseText=s:e.response=s,e.readyState=4,e.onreadystatechange()}).catch(function(s){if(s.name==="AbortError"){e.onabort();return}e.onerror(s)})};var rN=bs,iN=nN,sN=tb,Wg=rN,oN=function(){},Tr=typeof window>"u"?void 0:window,Kg=Tr?"xhr":"fetch",Vl=typeof XMLHttpRequest=="function"?XMLHttpRequest:oN,aN="withCredentials"in new Vl,cN=typeof XDomainRequest>"u"?void 0:XDomainRequest,P0=aN?Vl:cN;Tr||(Vl=Wg,P0=Wg);var lN=function(t,e){var n=t.options,r=t.applyMiddleware("finalizeOptions",n),i={},s=Tr&&Tr.location&&!iN(Tr.location.href,r.url),o=t.applyMiddleware("interceptRequest",void 0,{adapter:Kg,context:t});if(o){var a=setTimeout(e,0,null,o),c=function(){return clearTimeout(a)};return{abort:c}}var l=s?new P0:new Vl,u=Tr&&Tr.XDomainRequest&&l instanceof Tr.XDomainRequest,f=r.headers,h=r.timeout,g=!1,S=!1,T=!1;l.onerror=fe,l.ontimeout=fe,l.onabort=function(){W(!0),g=!0},l.onprogress=function(){};var I=u?"onload":"onreadystatechange";if(l[I]=function(){F(),!(g||l.readyState!==4&&!u)&&l.status!==0&&ee()},l.open(r.method,r.url,!0),l.withCredentials=!!r.withCredentials,f&&l.setRequestHeader)for(var b in f)f.hasOwnProperty(b)&&l.setRequestHeader(b,f[b]);else if(f&&u)throw new Error("Headers cannot be set on an XDomainRequest object");return r.rawBody&&(l.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:r,adapter:Kg,request:l,context:t}),l.send(r.body||null),h&&(i.connect=setTimeout(function(){return $("ETIMEDOUT")},h.connect)),{abort:R};function R(){g=!0,l&&l.abort()}function $(X){T=!0,l.abort();var ie=new Error(X==="ESOCKETTIMEDOUT"?"Socket timed out on request to ".concat(r.url):"Connection timed out on request to ".concat(r.url));ie.code=X,t.channels.error.publish(ie)}function F(){!h||(W(),i.socket=setTimeout(function(){return $("ESOCKETTIMEDOUT")},h.socket))}function W(X){(X||g||l.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function fe(X){if(!S){W(!0),S=!0,l=null;var ie=X||new Error("Network error while attempting to reach ".concat(r.url));ie.isNetworkError=!0,ie.request=r,e(ie)}}function _e(){var X=l.status,ie=l.statusText;if(u&&X===void 0)X=200;else{if(X>12e3&&X<12156)return fe();X=l.status===1223?204:l.status,ie=l.status===1223?"No Content":ie}return{body:l.response||l.responseText,url:r.url,method:r.method,headers:u?{}:sN(l.getAllResponseHeaders()),statusCode:X,statusMessage:ie}}function ee(){if(!(g||S||T)){if(l.status===0){fe(new Error("Unknown XHR error"));return}W(),S=!0,e(null,_e())}}};(function(t){t.exports=lN})(x0);var uN=k3,fN=D3,hN=Q3,dN=eN,pN=x0.exports,mN=["request","response","progress","error","abort"],Gg=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"],gN=function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pN,r=[],i=Gg.reduce(function(o,a){return o[a]=o[a]||[],o},{processOptions:[hN],validateOptions:[dN]});function s(o){var a=mN.reduce(function(T,I){return T[I]=uN(),T},{}),c=fN(i),l=c("processOptions",o);c("validateOptions",l);var u={options:l,channels:a,applyMiddleware:c},f=null,h=a.request.subscribe(function(T){f=n(T,function(I,b){return S(I,b,T)})});a.abort.subscribe(function(){h(),f&&f.abort()});var g=c("onReturn",a,u);return g===a&&a.request.publish(u),g;function S(T,I,b){var R=T,$=I;if(!R)try{$=c("onResponse",I,b)}catch(F){$=null,R=F}R=R&&c("onError",R,b),R?a.error.publish(R):$&&a.response.publish($)}}return s.use=function(a){if(!a)throw new Error("Tried to add middleware that resolved to falsey value");if(typeof a=="function")throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(a.onReturn&&i.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return Gg.forEach(function(c){a[c]&&i[c].push(a[c])}),r.push(a),s},s.clone=function(){return t(r)},e.forEach(s.use),s};(function(t){t.exports=gN})(w0);var Hi={exports:{}};typeof globalThis<"u"?Hi.exports=globalThis:typeof window<"u"?Hi.exports=window:typeof Ft<"u"?Hi.exports=Ft:typeof self<"u"?Hi.exports=self:Hi.exports={};var yN=Hi.exports,Yg=Et,vN=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.implementation||yN.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(r,i){return new e(function(s){return r.error.subscribe(function(o){return s.error(o)}),r.progress.subscribe(function(o){return s.next(Yg({type:"progress"},o))}),r.response.subscribe(function(o){s.next(Yg({type:"response"},o)),s.complete()}),r.request.publish(i),function(){return r.abort.publish()}})}}};/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */var _N=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */var bN=_N;function Qg(t){return bN(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var wN=function(e){var n,r;return!(Qg(e)===!1||(n=e.constructor,typeof n!="function")||(r=n.prototype,Qg(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};function ih(t){return ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ih(t)}var Xg=Et,EN=wN,TN=["boolean","string","number"],IN=function(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)},AN=function(){return{processOptions:function(e){var n=e.body;if(!n)return e;var r=typeof n.pipe=="function",i=!r&&!IN(n)&&(TN.indexOf(ih(n))!==-1||Array.isArray(n)||EN(n));return i?Xg({},e,{body:JSON.stringify(e.body),headers:Xg({},e.headers,{"Content-Type":"application/json"})}):e}}},Qu=Et,CN=function(t){return{onResponse:function(n){var r=n.headers["content-type"]||"",i=t&&t.force||r.indexOf("application/json")!==-1;return!n.body||!r||!i?n:Qu({},n,{body:SN(n.body)})},processOptions:function(n){return Qu({},n,{headers:Qu({Accept:"application/json"},n.headers)})}}};function SN(t){try{return JSON.parse(t)}catch(e){throw e.message="Failed to parsed response body as JSON: ".concat(e.message),e}}var R0={exports:{}},xN=function(){return{onRequest:function(e){if(e.adapter!=="xhr")return;var n=e.request,r=e.context;"upload"in n&&"onprogress"in n.upload&&(n.upload.onprogress=i("upload")),"onprogress"in n&&(n.onprogress=i("download"));function i(s){return function(o){var a=o.lengthComputable?o.loaded/o.total*100:-1;r.channels.progress.publish({stage:s,percent:a,total:o.total,loaded:o.loaded,lengthComputable:o.lengthComputable})}}}}};(function(t){t.exports=xN})(R0);var qd={},sh={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,i=Error.captureStackTrace;i===void 0&&(i=function(l){var u=new Error;r(l,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(l,"stack",{configurable:!0,value:h,writable:!0})}})});function s(c){c!==void 0&&r(this,"message",{configurable:!0,value:c,writable:!0});var l=this.constructor.name;l!==void 0&&l!==this.name&&r(this,"name",{configurable:!0,value:l,writable:!0}),i(this,this.constructor)}s.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:s,writable:!0}});var o=function(){function c(u,f){return r(u,"name",{configurable:!0,value:f})}try{var l=function(){};if(c(l,"foo"),l.name==="foo")return c}catch{}}();function a(c,l){if(l==null||l===Error)l=s;else if(typeof l!="function")throw new TypeError("super_ should be a function");var u;if(typeof c=="string")u=c,c=n!==void 0?function(){return n(l,arguments,this.constructor)}:function(){l.apply(this,arguments)},o!==void 0&&(o(c,u),u=void 0);else if(typeof c!="function")throw new TypeError("constructor should be either a string or a function");c.super_=c.super=l;var f={constructor:{configurable:!0,value:c,writable:!0}};return u!==void 0&&(f.name={configurable:!0,value:u,writable:!0}),c.prototype=Object.create(l.prototype,f),c}e=t.exports=a,e.BaseError=s})(sh,sh.exports);var O0=sh.exports,k0=Et;function Hd(t){var e=D0(t);Hd.super.call(this,e.message),k0(this,e)}function zd(t){var e=D0(t);zd.super.call(this,e.message),k0(this,e)}function D0(t){var e=t.body,n={response:t,statusCode:t.statusCode,responseBody:RN(e,t)};return e.error&&e.message?(n.message="".concat(e.error," - ").concat(e.message),n):e.error&&e.error.description?(n.message=e.error.description,n.details=e.error,n):(n.message=e.error||e.message||PN(t),n)}function PN(t){var e=t.statusMessage?" ".concat(t.statusMessage):"";return"".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)}function RN(t,e){var n=(e.headers["content-type"]||"").toLowerCase(),r=n.indexOf("application/json")!==-1;return r?JSON.stringify(t,null,2):t}O0(Hd);O0(zd);qd.ClientError=Hd;qd.ServerError=zd;var ON=[],kN=w0.exports,DN=Et,NN=vN,MN=AN,VN=CN,FN=R0.exports,$N=Qo,LN=$N.Observable,N0=qd,M0=N0.ClientError,V0=N0.ServerError,jN={onResponse:function(e){if(e.statusCode>=500)throw new V0(e);if(e.statusCode>=400)throw new M0(e);return e}},UN={onResponse:function(e){var n=e.headers["x-sanity-warning"],r=Array.isArray(n)?n:[n];return r.filter(Boolean).forEach(function(i){return console.warn(i)}),e}},BN=ON,qN=BN.concat([UN,MN(),VN(),FN(),jN,NN({implementation:LN})]),F0=kN(qN);function Fl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F0;return e(DN({maxRedirects:0},t))}Fl.defaultRequester=F0;Fl.ClientError=M0;Fl.ServerError=V0;var HN=Fl,Jg=Et,zN="X-Sanity-Project-ID",WN=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={},r=e.token||t.token;r&&(n.Authorization="Bearer ".concat(r)),!e.useGlobalApi&&!t.useProjectHostname&&t.projectId&&(n[zN]=t.projectId);var i=Boolean(typeof e.withCredentials>"u"?t.token||t.withCredentials:e.withCredentials),s=typeof e.timeout>"u"?t.timeout:e.timeout;return Jg({},e,{headers:Jg({},n,e.headers||{}),timeout:typeof s>"u"?5*60*1e3:s,proxy:e.proxy||t.proxy,json:!0,withCredentials:i})},$0={},KN="https://docs.sanity.io/help/",L0=function(e){return KN+e},$l={},GN=function(t){var e=!1,n;return function(){return e||(n=t.apply(void 0,arguments),e=!0),n}},Wd=L0,YN=GN,Kd=function(e){return YN(function(){for(var n,r=arguments.length,i=new Array(r),s=0;s"u"){var S=n("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(S))}if(g&&!h.projectId)throw new Error("Configuration must contain `projectId`");var T=typeof window<"u"&&window.location&&window.location.hostname,I=T&&c(window.location.hostname);T&&I&&h.token&&h.ignoreBrowserTokenWarning!==!0?i.printBrowserTokenWarning():typeof h.useCdn>"u"&&i.printCdnWarning(),g&&r.projectId(h.projectId),h.dataset&&r.dataset(h.dataset),"requestTagPrefix"in h&&(h.requestTagPrefix=h.requestTagPrefix?r.requestTag(h.requestTagPrefix).replace(/\.+$/,""):void 0),h.apiVersion="".concat(h.apiVersion).replace(/^v/,""),h.isDefaultApi=h.apiHost===o.apiHost,h.useCdn=Boolean(h.useCdn)&&!h.withCredentials,t.validateApiVersion(h.apiVersion);var b=h.apiHost.split("://",2),R=b[0],$=b[1],F=h.isDefaultApi?s:$;return h.useProjectHostname?(h.url="".concat(R,"://").concat(h.projectId,".").concat($,"/v").concat(h.apiVersion),h.cdnUrl="".concat(R,"://").concat(h.projectId,".").concat(F,"/v").concat(h.apiVersion)):(h.url="".concat(h.apiHost,"/v").concat(h.apiVersion),h.cdnUrl=h.url),h},t.validateApiVersion=function(u){if(!(u==="1"||u==="X")){var f=new Date(u),h=/^\d{4}-\d{2}-\d{2}$/.test(u)&&f instanceof Date&&f.getTime()>0;if(!h)throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}}})($0);function Zg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xu(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:lM;if(!(this instanceof nn))return new nn(t);if(this.config(t),this.assets=new sM(this),this.datasets=new rM(this),this.projects=new iM(this),this.users=new oM(this),this.auth=new aM(this),this.clientConfig.isPromiseAPI){var e=Yi({},this.clientConfig,{isPromiseAPI:!1});this.observable=new nn(e)}}Yi(nn.prototype,nM);Yi(nn.prototype,{clone:function(){return new nn(this.config())},config:function(e){if(typeof e>"u")return Yi({},this.clientConfig);if(this.clientConfig&&this.clientConfig.allowReconfigure===!1)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");if(this.observable){var n=Yi({},e,{isPromiseAPI:!1});this.observable.config(n)}return this.clientConfig=uM(e,this.clientConfig||{}),this},withConfig:function(e){return new nn(Xu(Xu({},this.config()),e))},getUrl:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(r,"/").concat(e.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(e){var n=this,r=e.url||e.uri,i=typeof e.canUseCdn>"u"?["GET","HEAD"].indexOf(e.method||"GET")>=0&&r.indexOf("/data/")===0:e.canUseCdn,s=this.clientConfig.useCdn&&i,o=e.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,e.tag].join("."):e.tag||this.clientConfig.requestTagPrefix;o&&(e.query=Xu({tag:fM.requestTag(o)},e.query));var a=cM(this.clientConfig,Yi({},e,{url:this.getUrl(r,s)}));return new XN(function(c){return Ll(a,n.clientConfig.requester).subscribe(c)})},request:function(e){var n=this._requestObservable(e).pipe(ZN(function(r){return r.type==="response"}),JN(function(r){return r.body}));return this.isPromiseAPI()?hM(n):n}});nn.Patch=eM;nn.Transaction=tM;nn.ClientError=Ll.ClientError;nn.ServerError=Ll.ServerError;nn.requester=Ll.defaultRequester;var ey=nn;dl({});function dM(){const t=td();if(!t)throw new Error("You must call this from within a component");return t.proxy}const pM=Symbol("Sanity image URL builder"),mM=Symbol("Sanity client"),gM=Symbol("Sanity client for previews"),yM=Symbol("Default query options");function vM(t,e=!1,n={}){dM();const r=ey(t),i=Cd(t);if($s(mM,r),$s(pM,i),$s(yM,n),e){const s=ey({...t,useCdn:!1,token:void 0,withCredentials:!0});$s(gM,s)}}Cd(Bc);/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const U0=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},_M=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],a=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},B0={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,f=(s&3)<<4|a>>4;let h=(a&15)<<2|l>>6,g=l&63;c||(g=64,o||(h=64)),r.push(n[u],n[f],n[h],n[g])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(U0(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):_M(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(h),l!==64){const g=a<<4&240|l>>2;if(r.push(g),f!==64){const S=l<<6&192|f;r.push(S)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class bM extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const wM=function(t){const e=U0(t);return B0.encodeByteArray(e,!0)},qc=function(t){return wM(t).replace(/\./g,"")},EM=function(t){try{return B0.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function TM(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const IM=()=>TM().__FIREBASE_DEFAULTS__,AM=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},CM=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&EM(t[1]);return e&&JSON.parse(e)},q0=()=>{try{return IM()||AM()||CM()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},SM=t=>{var e,n;return(n=(e=q0())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},xM=t=>{const e=SM(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},H0=()=>{var t;return(t=q0())===null||t===void 0?void 0:t.config};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class PM{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function RM(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t),a="";return[qc(JSON.stringify(n)),qc(JSON.stringify(o)),a].join(".")}function OM(){try{return typeof indexedDB=="object"}catch{return!1}}function kM(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const DM="FirebaseError";class ws extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=DM,Object.setPrototypeOf(this,ws.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,z0.prototype.create)}}class z0{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?NM(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new ws(i,a,r)}}function NM(t,e){return t.replace(MM,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const MM=/\{\$([^}]+)}/g;function oh(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(ty(s)&&ty(o)){if(!oh(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function ty(t){return t!==null&&typeof t=="object"}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Io(t){return t&&t._delegate?t._delegate:t}class Ao{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const ai="[DEFAULT]";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class VM{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new PM;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if($M(e))try{this.getOrInitializeService({instanceIdentifier:ai})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=ai){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=ai){return this.instances.has(e)}getOptions(e=ai){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(!!r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:FM(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=ai){return this.component?this.component.multipleInstances?e:ai:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function FM(t){return t===ai?void 0:t}function $M(t){return t.instantiationMode==="EAGER"}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class LM{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new VM(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var Oe;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Oe||(Oe={}));const jM={debug:Oe.DEBUG,verbose:Oe.VERBOSE,info:Oe.INFO,warn:Oe.WARN,error:Oe.ERROR,silent:Oe.SILENT},UM=Oe.INFO,BM={[Oe.DEBUG]:"log",[Oe.VERBOSE]:"log",[Oe.INFO]:"info",[Oe.WARN]:"warn",[Oe.ERROR]:"error"},qM=(t,e,...n)=>{if(ee.some(n=>t instanceof n);let ny,ry;function zM(){return ny||(ny=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function WM(){return ry||(ry=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const K0=new WeakMap,ah=new WeakMap,G0=new WeakMap,Ju=new WeakMap,Yd=new WeakMap;function KM(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(Or(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&K0.set(n,t)}).catch(()=>{}),Yd.set(e,t),e}function GM(t){if(ah.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});ah.set(t,e)}let ch={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return ah.get(t);if(e==="objectStoreNames")return t.objectStoreNames||G0.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Or(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function YM(t){ch=t(ch)}function QM(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Zu(this),e,...n);return G0.set(r,e.sort?e.sort():[e]),Or(r)}:WM().includes(t)?function(...e){return t.apply(Zu(this),e),Or(K0.get(this))}:function(...e){return Or(t.apply(Zu(this),e))}}function XM(t){return typeof t=="function"?QM(t):(t instanceof IDBTransaction&&GM(t),HM(t,zM())?new Proxy(t,ch):t)}function Or(t){if(t instanceof IDBRequest)return KM(t);if(Ju.has(t))return Ju.get(t);const e=XM(t);return e!==t&&(Ju.set(t,e),Yd.set(e,t)),e}const Zu=t=>Yd.get(t);function JM(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Or(o);return r&&o.addEventListener("upgradeneeded",c=>{r(Or(o.result),c.oldVersion,c.newVersion,Or(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const ZM=["get","getKey","getAll","getAllKeys","count"],e9=["put","add","delete","clear"],ef=new Map;function iy(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ef.get(e))return ef.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=e9.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ZM.includes(n)))return;const s=async function(o,...a){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),i&&c.done]))[0]};return ef.set(e,s),s}YM(t=>({...t,get:(e,n,r)=>iy(e,n)||t.get(e,n,r),has:(e,n)=>!!iy(e,n)||t.has(e,n)}));/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class t9{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(n9(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function n9(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const lh="@firebase/app",sy="0.9.17";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ti=new W0("@firebase/app"),r9="@firebase/app-compat",i9="@firebase/analytics-compat",s9="@firebase/analytics",o9="@firebase/app-check-compat",a9="@firebase/app-check",c9="@firebase/auth",l9="@firebase/auth-compat",u9="@firebase/database",f9="@firebase/database-compat",h9="@firebase/functions",d9="@firebase/functions-compat",p9="@firebase/installations",m9="@firebase/installations-compat",g9="@firebase/messaging",y9="@firebase/messaging-compat",v9="@firebase/performance",_9="@firebase/performance-compat",b9="@firebase/remote-config",w9="@firebase/remote-config-compat",E9="@firebase/storage",T9="@firebase/storage-compat",I9="@firebase/firestore",A9="@firebase/firestore-compat",C9="firebase",S9="10.3.0";/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const uh="[DEFAULT]",x9={[lh]:"fire-core",[r9]:"fire-core-compat",[s9]:"fire-analytics",[i9]:"fire-analytics-compat",[a9]:"fire-app-check",[o9]:"fire-app-check-compat",[c9]:"fire-auth",[l9]:"fire-auth-compat",[u9]:"fire-rtdb",[f9]:"fire-rtdb-compat",[h9]:"fire-fn",[d9]:"fire-fn-compat",[p9]:"fire-iid",[m9]:"fire-iid-compat",[g9]:"fire-fcm",[y9]:"fire-fcm-compat",[v9]:"fire-perf",[_9]:"fire-perf-compat",[b9]:"fire-rc",[w9]:"fire-rc-compat",[E9]:"fire-gcs",[T9]:"fire-gcs-compat",[I9]:"fire-fst",[A9]:"fire-fst-compat","fire-js":"fire-js",[C9]:"fire-js-all"};/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Hc=new Map,fh=new Map;function P9(t,e){try{t.container.addComponent(e)}catch(n){Ti.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function zc(t){const e=t.name;if(fh.has(e))return Ti.debug(`There were multiple attempts to register component ${e}.`),!1;fh.set(e,t);for(const n of Hc.values())P9(n,t);return!0}function R9(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const O9={["no-app"]:"No Firebase App '{$appName}' has been created - call initializeApp() first",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},kr=new z0("app","Firebase",O9);/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class k9{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Ao("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw kr.create("app-deleted",{appName:this._name})}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const D9=S9;function jl(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:uh,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw kr.create("bad-app-name",{appName:String(i)});if(n||(n=H0()),!n)throw kr.create("no-options");const s=Hc.get(i);if(s){if(oh(n,s.options)&&oh(r,s.config))return s;throw kr.create("duplicate-app",{appName:i})}const o=new LM(i);for(const c of fh.values())o.addComponent(c);const a=new k9(n,r,o);return Hc.set(i,a),a}function N9(t=uh){const e=Hc.get(t);if(!e&&t===uh&&H0())return jl();if(!e)throw kr.create("no-app",{appName:t});return e}function rs(t,e,n){var r;let i=(r=x9[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const a=[`Unable to register library "${i}" with version "${e}":`];s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Ti.warn(a.join(" "));return}zc(new Ao(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const M9="firebase-heartbeat-database",V9=1,Co="firebase-heartbeat-store";let tf=null;function Y0(){return tf||(tf=JM(M9,V9,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(Co)}}}).catch(t=>{throw kr.create("idb-open",{originalErrorMessage:t.message})})),tf}async function F9(t){try{return await(await Y0()).transaction(Co).objectStore(Co).get(Q0(t))}catch(e){if(e instanceof ws)Ti.warn(e.message);else{const n=kr.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Ti.warn(n.message)}}}async function oy(t,e){try{const r=(await Y0()).transaction(Co,"readwrite");await r.objectStore(Co).put(e,Q0(t)),await r.done}catch(n){if(n instanceof ws)Ti.warn(n.message);else{const r=kr.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Ti.warn(r.message)}}}function Q0(t){return`${t.name}!${t.options.appId}`}/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const $9=1024,L9=30*24*60*60*1e3;class j9{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new B9(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=ay();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const s=new Date(i.date).valueOf();return Date.now()-s<=L9}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=ay(),{heartbeatsToSend:n,unsentEntries:r}=U9(this._heartbeatsCache.heartbeats),i=qc(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function ay(){return new Date().toISOString().substring(0,10)}function U9(t,e=$9){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),cy(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),cy(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class B9{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return OM()?kM().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await F9(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return oy(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return oy(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function cy(t){return qc(JSON.stringify({version:2,heartbeats:t})).length}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function q9(t){zc(new Ao("platform-logger",e=>new t9(e),"PRIVATE")),zc(new Ao("heartbeat",e=>new j9(e),"PRIVATE")),rs(lh,sy,t),rs(lh,sy,"esm2017"),rs("fire-js","")}q9("");var H9="firebase",z9="10.3.0";/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */rs(H9,z9,"app");var W9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},z,Qd=Qd||{},pe=W9||self;function Ul(t){var e=typeof t;return e=e!="object"?e:t?Array.isArray(t)?"array":e:"null",e=="array"||e=="object"&&typeof t.length=="number"}function Xo(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function K9(t){return Object.prototype.hasOwnProperty.call(t,nf)&&t[nf]||(t[nf]=++G9)}var nf="closure_uid_"+(1e9*Math.random()>>>0),G9=0;function Y9(t,e,n){return t.call.apply(t.bind,arguments)}function Q9(t,e,n){if(!t)throw Error();if(2{},e),pe.removeEventListener("test",()=>{},e)}catch{}return t}();function So(t){return/^[\s\xa0]*$/.test(t)}function Bl(){var t=pe.navigator;return t&&(t=t.userAgent)?t:""}function Nn(t){return Bl().indexOf(t)!=-1}function Jd(t){return Jd[" "](t),t}Jd[" "]=function(){};function Z9(t,e){var n=zV;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}var eV=Nn("Opera"),cs=Nn("Trident")||Nn("MSIE"),J0=Nn("Edge"),hh=J0||cs,Z0=Nn("Gecko")&&!(Bl().toLowerCase().indexOf("webkit")!=-1&&!Nn("Edge"))&&!(Nn("Trident")||Nn("MSIE"))&&!Nn("Edge"),tV=Bl().toLowerCase().indexOf("webkit")!=-1&&!Nn("Edge");function ew(){var t=pe.document;return t?t.documentMode:void 0}var dh;e:{var rf="",sf=function(){var t=Bl();if(Z0)return/rv:([^\);]+)(\)|;)/.exec(t);if(J0)return/Edge\/([\d\.]+)/.exec(t);if(cs)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(tV)return/WebKit\/(\S+)/.exec(t);if(eV)return/(?:Version)[ \/]?(\S+)/.exec(t)}();if(sf&&(rf=sf?sf[1]:""),cs){var of=ew();if(of!=null&&of>parseFloat(rf)){dh=String(of);break e}}dh=rf}var ph;if(pe.document&&cs){var uy=ew();ph=uy||parseInt(dh,10)||void 0}else ph=void 0;var nV=ph;function xo(t,e){if(Lt.call(this,t?t.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(Z0){e:{try{Jd(e.nodeName);var i=!0;break e}catch{}i=!1}i||(e=null)}}else n=="mouseover"?e=t.fromElement:n=="mouseout"&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=r.clientX!==void 0?r.clientX:r.pageX,this.clientY=r.clientY!==void 0?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=t.clientX!==void 0?t.clientX:t.pageX,this.clientY=t.clientY!==void 0?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=typeof t.pointerType=="string"?t.pointerType:rV[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&xo.$.h.call(this)}}Tt(xo,Lt);var rV={2:"touch",3:"pen",4:"mouse"};xo.prototype.h=function(){xo.$.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var Jo="closure_listenable_"+(1e6*Math.random()|0),iV=0;function sV(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.la=i,this.key=++iV,this.fa=this.ia=!1}function ql(t){t.fa=!0,t.listener=null,t.proxy=null,t.src=null,t.la=null}function Zd(t,e,n){for(const r in t)e.call(n,t[r],r,t)}function oV(t,e){for(const n in t)e.call(void 0,t[n],n,t)}function tw(t){const e={};for(const n in t)e[n]=t[n];return e}const fy="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function nw(t,e){let n,r;for(let i=1;i>>0);function rp(t){return typeof t=="function"?t:(t[cf]||(t[cf]=function(e){return t.handleEvent(e)}),t[cf])}function wt(){qr.call(this),this.i=new Hl(this),this.S=this,this.J=null}Tt(wt,qr);wt.prototype[Jo]=!0;wt.prototype.removeEventListener=function(t,e,n,r){ow(this,t,e,n,r)};function xt(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,typeof e=="string")e=new Lt(e,t);else if(e instanceof Lt)e.target=e.target||t;else{var i=e;e=new Lt(r,t),nw(e,i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=e.g=n[s];i=Pa(o,r,!0,e)&&i}if(o=e.g=t,i=Pa(o,r,!0,e)&&i,i=Pa(o,r,!1,e)&&i,n)for(s=0;snew hV,t=>t.reset());class hV{constructor(){this.next=this.g=this.h=null}set(e,n){this.h=e,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function dV(t){var e=1;t=t.split(":");const n=[];for(;0{throw t},0)}let Po,Ro=!1,sp=new fV,lw=()=>{const t=pe.Promise.resolve(void 0);Po=()=>{t.then(mV)}};var mV=()=>{for(var t;t=uV();){try{t.h.call(t.g)}catch(n){pV(n)}var e=cw;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}Ro=!1};function zl(t,e){wt.call(this),this.h=t||1,this.g=e||pe,this.j=$t(this.qb,this),this.l=Date.now()}Tt(zl,wt);z=zl.prototype;z.ga=!1;z.T=null;z.qb=function(){if(this.ga){var t=Date.now()-this.l;0{t.g=null,t.i&&(t.i=!1,uw(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class gV extends qr{constructor(e,n){super(),this.m=e,this.j=n,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:uw(this)}N(){super.N(),this.g&&(pe.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Oo(t){qr.call(this),this.h=t,this.g={}}Tt(Oo,qr);var hy=[];function fw(t,e,n,r){Array.isArray(n)||(n&&(hy[0]=n.toString()),n=hy);for(var i=0;ir.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if(s!="noop"&&s!="stop"&&s!="close")for(var o=1;ou)&&(u!=3||hh||this.g&&(this.h.h||this.g.ja()||vy(this.g)))){this.J||u!=4||e==7||(e==8||0>=f?ko(3):ko(2)),Ql(this);var n=this.g.da();this.ca=n;t:if(bw(this)){var r=vy(this.g);t="";var i=r.length,s=Vn(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){di(this),oo(this);var o="";break t}this.h.i=new pe.TextDecoder}for(e=0;ee.length?Wc:(e=e.slice(r,r+n),t.C=r+n,e)))}z.cancel=function(){this.J=!0,di(this)};function na(t){t.Y=Date.now()+t.P,Ew(t,t.P)}function Ew(t,e){if(t.B!=null)throw Error("WatchDog timer not null");t.B=Zo($t(t.lb,t),e)}function Ql(t){t.B&&(pe.clearTimeout(t.B),t.B=null)}z.lb=function(){this.B=null;const t=Date.now();0<=t-this.Y?(_V(this.j,this.A),this.L!=2&&(ko(),Kt(17)),di(this),this.o=2,oo(this)):Ew(this,this.Y-t)};function oo(t){t.l.H==0||t.J||Hw(t.l,t)}function di(t){Ql(t);var e=t.M;e&&typeof e.sa=="function"&&e.sa(),t.M=null,op(t.V),hw(t.U),t.g&&(e=t.g,t.g=null,e.abort(),e.sa())}function bh(t,e){try{var n=t.l;if(n.H!=0&&(n.g==t||wh(n.i,t))){if(!t.K&&wh(n.i,t)&&n.H==3){try{var r=n.Ja.g.parse(e)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3i[2]&&n.G&&n.A==0&&!n.v&&(n.v=Zo($t(n.ib,n),6e3));if(1>=Rw(n.i)&&n.oa){try{n.oa()}catch{}n.oa=void 0}}else pi(n,11)}else if((t.K||n.g==t)&&Yc(n),!So(e))for(i=n.Ja.g.parse(e),e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function my(t,e,n){e instanceof Do?(t.i=e,OV(t.i,t.h)):(n||(e=Ws(e,PV)),t.i=new Do(e,t.h))}function Ue(t,e,n){t.i.set(e,n)}function Xl(t){return Ue(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function zs(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Ws(t,e,n){return typeof t=="string"?(t=encodeURI(t).replace(e,CV),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function CV(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var gy=/[#\/\?@]/g,SV=/[#\?:]/g,xV=/[#\?]/g,PV=/[#\?@]/g,RV=/#/g;function Do(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function Hr(t){t.g||(t.g=new Map,t.h=0,t.i&&AV(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}z=Do.prototype;z.add=function(t,e){Hr(this),this.i=null,t=Es(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this};function Aw(t,e){Hr(t),e=Es(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function Cw(t,e){return Hr(t),e=Es(t,e),t.g.has(e)}z.forEach=function(t,e){Hr(this),this.g.forEach(function(n,r){n.forEach(function(i){t.call(e,i,r,this)},this)},this)};z.ta=function(){Hr(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r=t.j:!1}function Rw(t){return t.h?1:t.g?t.g.size:0}function wh(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function fp(t,e){t.g?t.g.add(e):t.h=e}function Ow(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}xw.prototype.cancel=function(){if(this.i=kw(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const t of this.g.values())t.cancel();this.g.clear()}};function kw(t){if(t.h!=null)return t.i.concat(t.h.F);if(t.g!=null&&t.g.size!==0){let e=t.i;for(const n of t.g.values())e=e.concat(n.F);return e}return Xd(t.i)}var NV=class{stringify(t){return pe.JSON.stringify(t,void 0)}parse(t){return pe.JSON.parse(t,void 0)}};function MV(){this.g=new NV}function VV(t,e,n){const r=n||"";try{Tw(t,function(i,s){let o=i;Xo(i)&&(o=ip(i)),e.push(r+s+"="+encodeURIComponent(o))})}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function FV(t,e){const n=new Wl;if(pe.Image){const r=new Image;r.onload=xa(Ra,n,r,"TestLoadImage: loaded",!0,e),r.onerror=xa(Ra,n,r,"TestLoadImage: error",!1,e),r.onabort=xa(Ra,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=xa(Ra,n,r,"TestLoadImage: timeout",!1,e),pe.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}function Ra(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch{}}function Jl(t){this.l=t.fc||null,this.j=t.ob||!1}Tt(Jl,cp);Jl.prototype.g=function(){return new Zl(this.l,this.j)};Jl.prototype.i=function(t){return function(){return t}}({});function Zl(t,e){wt.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=hp,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Tt(Zl,wt);var hp=0;z=Zl.prototype;z.open=function(t,e){if(this.readyState!=hp)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,No(this)};z.send=function(t){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||pe).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))};z.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,ra(this)),this.readyState=hp};z.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,No(this)),this.g&&(this.readyState=3,No(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof pe.ReadableStream<"u"&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;Dw(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))};function Dw(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}z.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?ra(this):No(this),this.readyState==3&&Dw(this)}};z.Za=function(t){this.g&&(this.response=this.responseText=t,ra(this))};z.Ya=function(t){this.g&&(this.response=t,ra(this))};z.ka=function(){this.g&&ra(this)};function ra(t){t.readyState=4,t.l=null,t.j=null,t.A=null,No(t)}z.setRequestHeader=function(t,e){this.v.append(t,e)};z.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};z.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join(`\r +`)};function No(t){t.onreadystatechange&&t.onreadystatechange.call(t)}Object.defineProperty(Zl.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(t){this.m=t?"include":"same-origin"}});var $V=pe.JSON.parse;function et(t){wt.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=Nw,this.L=this.M=!1}Tt(et,wt);var Nw="",LV=/^https?$/i,jV=["POST","PUT"];z=et.prototype;z.Oa=function(t){this.M=t};z.ha=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+t);e=e?e.toUpperCase():"GET",this.I=t,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():yh.g(),this.C=this.u?py(this.u):py(yh),this.g.onreadystatechange=$t(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(s){yy(this,s);return}if(t=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if(typeof r.keys=="function"&&typeof r.get=="function")for(const s of r.keys())n.set(s,r.get(s));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(s=>s.toLowerCase()=="content-type"),i=pe.FormData&&t instanceof pe.FormData,!(0<=X0(jV,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[s,o]of n)this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{Fw(this),0{}:null;t.g=null,t.C=null,e||xt(t,"ready");try{n.onreadystatechange=r}catch{}}}function Fw(t){t.g&&t.L&&(t.g.ontimeout=null),t.A&&(pe.clearTimeout(t.A),t.A=null)}z.isActive=function(){return!!this.g};function Vn(t){return t.g?t.g.readyState:0}z.da=function(){try{return 2=t.i.j-(t.m?1:0)?!1:t.m?(t.j=e.F.concat(t.j),!0):t.H==1||t.H==2||t.C>=(t.cb?0:t.eb)?!1:(t.m=Zo($t(t.Na,t,e),zw(t,t.C)),t.C++,!0)}z.Na=function(t){if(this.m)if(this.m=null,this.H==1){if(!t){this.W=Math.floor(1e5*Math.random()),t=this.W++;const i=new ta(this,this.l,t);let s=this.s;if(this.U&&(s?(s=tw(s),nw(s,this.U)):s=this.U),this.o!==null||this.O||(i.I=s,s=null),this.P)e:{for(var e=0,n=0;nl)s=Math.max(0,i[c].g-100),a=!1;else try{VV(u,o,"req"+l+"_")}catch{r&&r(u)}}if(a){r=o.join("&");break e}}}return t=t.j.splice(0,n),e.F=t,r}function Bw(t){if(!t.g&&!t.u){t.ba=1;var e=t.Ma;Po||lw(),Ro||(Po(),Ro=!0),sp.add(e,t),t.A=0}}function mp(t){return t.g||t.u||3<=t.A?!1:(t.ba++,t.u=Zo($t(t.Ma,t),zw(t,t.A)),t.A++,!0)}z.Ma=function(){if(this.u=null,qw(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var t=2*this.S;this.l.info("BP detection timer enabled: "+t),this.B=Zo($t(this.jb,this),t)}};z.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Kt(10),tu(this),qw(this))};function gp(t){t.B!=null&&(pe.clearTimeout(t.B),t.B=null)}function qw(t){t.g=new ta(t,t.l,"rpc",t.ba),t.o===null&&(t.g.I=t.s),t.g.O=0;var e=rr(t.wa);Ue(e,"RID","rpc"),Ue(e,"SID",t.K),Ue(e,"AID",t.V),Ue(e,"CI",t.G?"0":"1"),!t.G&&t.qa&&Ue(e,"TO",t.qa),Ue(e,"TYPE","xmlhttp"),ia(t,e),t.o&&t.s&&dp(e,t.o,t.s),t.L&&t.g.setTimeout(t.L);var n=t.g;t=t.pa,n.L=1,n.v=Xl(rr(e)),n.s=null,n.S=!0,_w(n,t)}z.ib=function(){this.v!=null&&(this.v=null,tu(this),mp(this),Kt(19))};function Yc(t){t.v!=null&&(pe.clearTimeout(t.v),t.v=null)}function Hw(t,e){var n=null;if(t.g==e){Yc(t),gp(t),t.g=null;var r=2}else if(wh(t.i,e))n=e.F,Ow(t.i,e),r=1;else return;if(t.H!=0){if(e.i)if(r==1){n=e.s?e.s.length:0,e=Date.now()-e.G;var i=t.C;r=Kl(),xt(r,new mw(r,n)),nu(t)}else Bw(t);else if(i=e.o,i==3||i==0&&0i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var s=t.g[3],o=e+(s^n&(i^s))+r[0]+3614090360&4294967295;e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[1]+3905402710&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[2]+606105819&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[3]+3250441966&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[4]+4118548399&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[5]+1200080426&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[6]+2821735955&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[7]+4249261313&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[8]+1770035416&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[9]+2336552879&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[10]+4294925233&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[11]+2304563134&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[12]+1804603682&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[13]+4254626195&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[14]+2792965006&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(i^s&(n^i))+r[1]+4129170786&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[6]+3225465664&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[5]+3593408605&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[10]+38016083&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[9]+568446438&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[14]+3275163606&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[13]+2850285829&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[2]+4243563512&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[12]+2368359562&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(n^i^s)+r[5]+4294588738&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[8]+2272392833&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[11]+1839030562&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[14]+4259657740&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[1]+2763975236&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[4]+1272893353&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[7]+4139469664&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[10]+3200236656&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[13]+681279174&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[0]+3936430074&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[3]+3572445317&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[6]+76029189&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[9]+3654602809&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[12]+3873151461&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[15]+530742520&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(i^(n|~s))+r[0]+4096336452&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[7]+1126891415&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[12]+1700485571&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[3]+2399980690&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[8]+1873313359&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[15]+4264355552&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[4]+4149444226&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[11]+3174756917&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+s&4294967295}Pn.prototype.j=function(t,e){e===void 0&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,s=0;sthis.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;ee;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};function Ne(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var s=t[i]|0;r&&s==e||(n[i]=s,r=!1)}this.g=n}var zV={};function yp(t){return-128<=t&&128>t?Z9(t,function(e){return new Ne([e|0],0>e?-1:0)}):new Ne([t|0],0>t?-1:0)}function Fn(t){if(isNaN(t)||!isFinite(t))return is;if(0>t)return St(Fn(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=Eh;return new Ne(e,0)}function Jw(t,e){if(t.length==0)throw Error("number format error: empty string");if(e=e||10,2>e||36s?(s=Fn(Math.pow(e,s)),r=r.R(s).add(Fn(o))):(r=r.R(n),r=r.add(Fn(o)))}return r}var Eh=4294967296,is=yp(0),Th=yp(1),by=yp(16777216);z=Ne.prototype;z.ea=function(){if(hn(this))return-St(this).ea();for(var t=0,e=1,n=0;nt||36>>0).toString(t);if(n=i,Qn(n))return s+r;for(;6>s.length;)s="0"+s;r=s+r}};z.D=function(t){return 0>t?0:t>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new Ne(n,n[n.length-1]&-2147483648?-1:0)};function Xc(t,e){return t.add(St(e))}z.R=function(t){if(Qn(this)||Qn(t))return is;if(hn(this))return hn(t)?St(this).R(St(t)):St(St(this).R(t));if(hn(t))return St(this.R(St(t)));if(0>this.X(by)&&0>t.X(by))return Fn(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r>>16,o=this.D(r)&65535,a=t.D(i)>>>16,c=t.D(i)&65535;n[2*r+2*i]+=o*c,Oa(n,2*r+2*i),n[2*r+2*i+1]+=s*c,Oa(n,2*r+2*i+1),n[2*r+2*i+1]+=o*a,Oa(n,2*r+2*i+1),n[2*r+2*i+2]+=s*a,Oa(n,2*r+2*i+2)}for(r=0;r>>16,t[e]&=65535,e++}function Ms(t,e){this.g=t,this.h=e}function Jc(t,e){if(Qn(e))throw Error("division by zero");if(Qn(t))return new Ms(is,is);if(hn(t))return e=Jc(St(t),e),new Ms(St(e.g),St(e.h));if(hn(e))return e=Jc(t,St(e)),new Ms(St(e.g),e.h);if(30=r.X(t);)n=wy(n),r=wy(r);var i=$i(n,1),s=$i(r,1);for(r=$i(r,2),n=$i(n,2);!Qn(r);){var o=s.add(r);0>=o.X(t)&&(i=i.add(n),s=o),r=$i(r,1),n=$i(n,1)}return e=Xc(t,i.R(e)),new Ms(i,e)}for(i=is;0<=t.X(e);){for(n=Math.max(1,Math.floor(t.ea()/e.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),s=Fn(n),o=s.R(e);hn(o)||0>>31;return new Ne(n,t.h)}function $i(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],s=0;s>>e|t.D(s+n+1)<<32-e:t.D(s+n);return new Ne(i,t.h)}Qc.prototype.createWebChannel=Qc.prototype.g;on.prototype.send=on.prototype.u;on.prototype.open=on.prototype.m;on.prototype.close=on.prototype.close;Gl.NO_ERROR=0;Gl.TIMEOUT=8;Gl.HTTP_ERROR=6;gw.COMPLETE="complete";yw.EventType=ea;ea.OPEN="a";ea.CLOSE="b";ea.ERROR="c";ea.MESSAGE="d";wt.prototype.listen=wt.prototype.O;et.prototype.listenOnce=et.prototype.P;et.prototype.getLastError=et.prototype.Sa;et.prototype.getLastErrorCode=et.prototype.Ia;et.prototype.getStatus=et.prototype.da;et.prototype.getResponseJson=et.prototype.Wa;et.prototype.getResponseText=et.prototype.ja;et.prototype.send=et.prototype.ha;et.prototype.setWithCredentials=et.prototype.Oa;Pn.prototype.digest=Pn.prototype.l;Pn.prototype.reset=Pn.prototype.reset;Pn.prototype.update=Pn.prototype.j;Ne.prototype.add=Ne.prototype.add;Ne.prototype.multiply=Ne.prototype.R;Ne.prototype.modulo=Ne.prototype.gb;Ne.prototype.compare=Ne.prototype.X;Ne.prototype.toNumber=Ne.prototype.ea;Ne.prototype.toString=Ne.prototype.toString;Ne.prototype.getBits=Ne.prototype.D;Ne.fromNumber=Fn;Ne.fromString=Jw;var WV=function(){return new Qc},KV=function(){return Kl()},uf=Gl,GV=gw,YV=Pi,Ey={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},ka=yw,QV=et,XV=Pn,ss=Ne;const Ty="@firebase/firestore";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Dt{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Dt.UNAUTHENTICATED=new Dt(null),Dt.GOOGLE_CREDENTIALS=new Dt("google-credentials-uid"),Dt.FIRST_PARTY=new Dt("first-party-uid"),Dt.MOCK_USER=new Dt("mock-user");/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let Is="10.3.0";/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ii=new W0("@firebase/firestore");function Iy(){return Ii.logLevel}function ne(t,...e){if(Ii.logLevel<=Oe.DEBUG){const n=e.map(vp);Ii.debug(`Firestore (${Is}): ${t}`,...n)}}function ir(t,...e){if(Ii.logLevel<=Oe.ERROR){const n=e.map(vp);Ii.error(`Firestore (${Is}): ${t}`,...n)}}function ls(t,...e){if(Ii.logLevel<=Oe.WARN){const n=e.map(vp);Ii.warn(`Firestore (${Is}): ${t}`,...n)}}function vp(t){if(typeof t=="string")return t;try{/** +* @license +* Copyright 2020 Google LLC +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function he(t="Unexpected state"){const e=`FIRESTORE (${Is}) INTERNAL ASSERTION FAILED: `+t;throw ir(e),new Error(e)}function qe(t,e){t||he()}function ye(t,e){return t}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const j={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class se extends ws{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Dr{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Zw{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class JV{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Dt.UNAUTHENTICATED))}shutdown(){}}class ZV{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class e5{constructor(e){this.t=e,this.currentUser=Dt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){let r=this.i;const i=c=>this.i!==r?(r=this.i,n(c)):Promise.resolve();let s=new Dr;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new Dr,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const c=s;e.enqueueRetryable(async()=>{await c.promise,await i(this.currentUser)})},a=c=>{ne("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit(c=>a(c)),setTimeout(()=>{if(!this.auth){const c=this.t.getImmediate({optional:!0});c?a(c):(ne("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Dr)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(ne("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(qe(typeof r.accessToken=="string"),new Zw(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return qe(e===null||typeof e=="string"),new Dt(e)}}class t5{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Dt.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class n5{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new t5(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Dt.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class r5{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class i5{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){const r=s=>{s.error!=null&&ne("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,ne("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{ne("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):ne("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(qe(typeof n.token=="string"),this.R=n.token,new r5(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function s5(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;re?1:0}function us(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ht{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new se(j.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new se(j.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new se(j.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new se(j.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return ht.fromMillis(Date.now())}static fromDate(e){return ht.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new ht(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Pe(this.nanoseconds,e.nanoseconds):Pe(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class me{constructor(e){this.timestamp=e}static fromTimestamp(e){return new me(e)}static min(){return new me(new ht(0,0))}static max(){return new me(new ht(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Mo{constructor(e,n,r){n===void 0?n=0:n>e.length&&he(),r===void 0?r=e.length-n:r>e.length-n&&he(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return Mo.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Mo?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.lengtho)return 1}return e.lengthn.length?1:0}}class Ge extends Mo{construct(e,n,r){return new Ge(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new se(j.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new Ge(n)}static emptyPath(){return new Ge([])}}const o5=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Mt extends Mo{construct(e,n,r){return new Mt(e,n,r)}static isValidIdentifier(e){return o5.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Mt.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new Mt(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new se(j.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Ge.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return Ge.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ce(new Ge(e.slice()))}}function a5(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=me.fromTimestamp(r===1e9?new ht(n+1,0):new ht(n,r));return new Lr(i,ce.empty(),e)}function c5(t){return new Lr(t.readTime,t.key,-1)}class Lr{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Lr(me.min(),ce.empty(),-1)}static max(){return new Lr(me.max(),ce.empty(),-1)}}function l5(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=ce.comparator(t.documentKey,e.documentKey),n!==0?n:Pe(t.largestBatchId,e.largestBatchId))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const u5="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class f5{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function sa(t){if(t.code!==j.FAILED_PRECONDITION||t.message!==u5)throw t;ne("LocalStore","Unexpectedly lost primary lease")}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class U{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&he(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new U((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof U?n:U.resolve(n)}catch(n){return U.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):U.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):U.reject(n)}static resolve(e){return new U((n,r)=>{n(e)})}static reject(e){return new U((n,r)=>{r(e)})}static waitFor(e){return new U((n,r)=>{let i=0,s=0,o=!1;e.forEach(a=>{++i,a.next(()=>{++s,o&&s===i&&n()},c=>r(c))}),o=!0,s===i&&n()})}static or(e){let n=U.resolve(!1);for(const r of e)n=n.next(i=>i?U.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new U((r,i)=>{const s=e.length,o=new Array(s);let a=0;for(let c=0;c{o[l]=u,++a,a===s&&r(o)},u=>i(u))}})}static doWhile(e,n){return new U((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function oa(t){return t.name==="IndexedDbTransactionError"}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class _p{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.oe(r),this._e=r=>n.writeSequenceNumber(r))}oe(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this._e&&this._e(e),e}}_p.ae=-1;function ru(t){return t==null}function Zc(t){return t===0&&1/t==-1/0}function h5(t){return typeof t=="number"&&Number.isInteger(t)&&!Zc(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ay(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function As(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function t1(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Xe{constructor(e,n){this.comparator=e,this.root=n||Ct.EMPTY}insert(e,n){return new Xe(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Ct.BLACK,null,null))}remove(e){return new Xe(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Ct.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Da(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Da(this.root,e,this.comparator,!1)}getReverseIterator(){return new Da(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Da(this.root,e,this.comparator,!0)}}class Da{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Ct{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r!=null?r:Ct.RED,this.left=i!=null?i:Ct.EMPTY,this.right=s!=null?s:Ct.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new Ct(e!=null?e:this.key,n!=null?n:this.value,r!=null?r:this.color,i!=null?i:this.left,s!=null?s:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Ct.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return Ct.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Ct.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Ct.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw he();const e=this.left.check();if(e!==this.right.check())throw he();return e+(this.isRed()?0:1)}}Ct.EMPTY=null,Ct.RED=!0,Ct.BLACK=!1;Ct.EMPTY=new class{constructor(){this.size=0}get key(){throw he()}get value(){throw he()}get color(){throw he()}get left(){throw he()}get right(){throw he()}copy(e,n,r,i,s){return this}insert(e,n,r){return new Ct(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class jt{constructor(e){this.comparator=e,this.data=new Xe(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new Cy(this.data.getIterator())}getIteratorFrom(e){return new Cy(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size{n=n.add(r)}),n}isEqual(e){if(!(e instanceof jt)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new jt(this.comparator);return n.data=e,n}}class Cy{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cn{constructor(e){this.fields=e,e.sort(Mt.comparator)}static empty(){return new Cn([])}unionWith(e){let n=new jt(Mt.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new Cn(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return us(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class n1 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ut{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new n1("Invalid base64 string: "+s):s}}(e);return new Ut(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;oeHn(n,e))!==void 0}function fs(t,e){if(t===e)return 0;const n=Ci(t),r=Ci(e);if(n!==r)return Pe(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Pe(t.booleanValue,e.booleanValue);case 2:return function(s,o){const a=ot(s.integerValue||s.doubleValue),c=ot(o.integerValue||o.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(t,e);case 3:return Sy(t.timestampValue,e.timestampValue);case 4:return Sy(Vo(t),Vo(e));case 5:return Pe(t.stringValue,e.stringValue);case 6:return function(s,o){const a=Ai(s),c=Ai(o);return a.compareTo(c)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),c=o.split("/");for(let l=0;le.mapValue.fields[n]=ao(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=ao(t.arrayValue.values[n]);return e}return Object.assign({},t)}function m5(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dn{constructor(e){this.value=e}static empty(){return new dn({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r{if(!n.isImmediateParentOf(a)){const c=this.getFieldsMap(n);this.applyChanges(c,r,i),r={},i=[],n=a.popLast()}o?r[a.lastSegment()]=ao(o):i.push(a.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());ac(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Hn(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;re[i]=s);for(const i of r)delete e[i]}clone(){return new dn(ao(this.value))}}function r1(t){const e=[];return As(t.fields,(n,r)=>{const i=new Mt([n]);if(ac(r)){const s=r1(r.mapValue).fields;if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new Cn(e)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Nt{constructor(e,n,r,i,s,o,a){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new Nt(e,0,me.min(),me.min(),me.min(),dn.empty(),0)}static newFoundDocument(e,n,r,i){return new Nt(e,1,n,me.min(),r,i,0)}static newNoDocument(e,n){return new Nt(e,2,n,me.min(),me.min(),dn.empty(),0)}static newUnknownDocument(e,n){return new Nt(e,3,n,me.min(),me.min(),dn.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(me.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=dn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=dn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=me.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Nt&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Nt(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class el{constructor(e,n){this.position=e,this.inclusive=n}}function Ry(t,e,n){let r=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return he()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class zn extends i1{constructor(e,n){super(),this.filters=e,this.op=n,this.ce=null}static create(e,n){return new zn(e,n)}matches(e){return s1(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ce!==null||(this.ce=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ce}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){const e=this.le(n=>n.isInequality());return e!==null?e.field:null}le(e){for(const n of this.getFlattenedFilters())if(e(n))return n;return null}}function s1(t){return t.op==="and"}function o1(t){return y5(t)&&s1(t)}function y5(t){for(const e of t.filters)if(e instanceof zn)return!1;return!0}function Ch(t){if(t instanceof ft)return t.field.canonicalString()+t.op.toString()+hs(t.value);if(o1(t))return t.filters.map(e=>Ch(e)).join(",");{const e=t.filters.map(n=>Ch(n)).join(",");return`${t.op}(${e})`}}function a1(t,e){return t instanceof ft?function(r,i){return i instanceof ft&&r.op===i.op&&r.field.isEqual(i.field)&&Hn(r.value,i.value)}(t,e):t instanceof zn?function(r,i){return i instanceof zn&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,a)=>s&&a1(o,i.filters[a]),!0):!1}(t,e):void he()}function c1(t){return t instanceof ft?function(n){return`${n.field.canonicalString()} ${n.op} ${hs(n.value)}`}(t):t instanceof zn?function(n){return n.op.toString()+" {"+n.getFilters().map(c1).join(" ,")+"}"}(t):"Filter"}class v5 extends ft{constructor(e,n,r){super(e,n,r),this.key=ce.fromName(r.referenceValue)}matches(e){const n=ce.comparator(e.key,this.key);return this.matchesComparison(n)}}class _5 extends ft{constructor(e,n){super(e,"in",n),this.keys=l1("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class b5 extends ft{constructor(e,n){super(e,"not-in",n),this.keys=l1("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function l1(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>ce.fromName(r.referenceValue))}class w5 extends ft{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Ep(n)&&$o(n.arrayValue,this.value)}}class E5 extends ft{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&$o(this.value.arrayValue,n)}}class T5 extends ft{constructor(e,n){super(e,"not-in",n)}matches(e){if($o(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!$o(this.value.arrayValue,n)}}class I5 extends ft{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!Ep(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>$o(this.value.arrayValue,r))}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class A5{constructor(e,n=null,r=[],i=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=a,this.he=null}}function ky(t,e=null,n=[],r=[],i=null,s=null,o=null){return new A5(t,e,n,r,i,s,o)}function Tp(t){const e=ye(t);if(e.he===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>Ch(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),ru(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>hs(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>hs(r)).join(",")),e.he=n}return e.he}function Ip(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n0?t.explicitOrderBy[0].field:null}function x5(t){for(const e of t.filters){const n=e.getFirstInequalityField();if(n!==null)return n}return null}function P5(t){return t.collectionGroup!==null}function lo(t){const e=ye(t);if(e.Pe===null){e.Pe=[];const n=x5(e),r=S5(e);if(n!==null&&r===null)n.isKeyField()||e.Pe.push(new co(n)),e.Pe.push(new co(Mt.keyField(),"asc"));else{let i=!1;for(const s of e.explicitOrderBy)e.Pe.push(s),s.field.isKeyField()&&(i=!0);if(!i){const s=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.Pe.push(new co(Mt.keyField(),s))}}}return e.Pe}function sr(t){const e=ye(t);return e.Ie||(e.Ie=R5(e,lo(t))),e.Ie}function R5(t,e){if(t.limitType==="F")return ky(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new co(i.field,s)});const n=t.endAt?new el(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new el(t.startAt.position,t.startAt.inclusive):null;return ky(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function xh(t,e,n){return new iu(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function su(t,e){return Ip(sr(t),sr(e))&&t.limitType===e.limitType}function f1(t){return`${Tp(sr(t))}|lt:${t.limitType}`}function Ph(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>c1(i)).join(", ")}]`),ru(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>hs(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>hs(i)).join(",")),`Target(${r})`}(sr(t))}; limitType=${t.limitType})`}function ou(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):ce.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of lo(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,a,c){const l=Ry(o,a,c);return o.inclusive?l<=0:l<0}(r.startAt,lo(r),i)||r.endAt&&!function(o,a,c){const l=Ry(o,a,c);return o.inclusive?l>=0:l>0}(r.endAt,lo(r),i))}(t,e)}function O5(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function h1(t){return(e,n)=>{let r=!1;for(const i of lo(t)){const s=k5(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function k5(t,e,n){const r=t.field.isKeyField()?ce.comparator(e.key,n.key):function(s,o,a){const c=o.data.field(s),l=a.data.field(s);return c!==null&&l!==null?fs(c,l):he()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return he()}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cs{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s{for(const[i,s]of r)e(i,s)})}isEmpty(){return t1(this.inner)}size(){return this.innerSize}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const D5=new Xe(ce.comparator);function or(){return D5}const d1=new Xe(ce.comparator);function Ks(...t){let e=d1;for(const n of t)e=e.insert(n.key,n);return e}function p1(t){let e=d1;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function mi(){return uo()}function m1(){return uo()}function uo(){return new Cs(t=>t.toString(),(t,e)=>t.isEqual(e))}const N5=new Xe(ce.comparator),M5=new jt(ce.comparator);function Ee(...t){let e=M5;for(const n of t)e=e.add(n);return e}const V5=new jt(Pe);function F5(){return V5}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function g1(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Zc(e)?"-0":e}}function y1(t){return{integerValue:""+t}}function $5(t,e){return h5(e)?y1(e):g1(t,e)}/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class au{constructor(){this._=void 0}}function L5(t,e,n){return t instanceof tl?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&bp(s)&&(s=wp(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof Lo?_1(t,e):t instanceof jo?b1(t,e):function(i,s){const o=v1(i,s),a=Ny(o)+Ny(i.Ee);return Ah(o)&&Ah(i.Ee)?y1(a):g1(i.serializer,a)}(t,e)}function j5(t,e,n){return t instanceof Lo?_1(t,e):t instanceof jo?b1(t,e):n}function v1(t,e){return t instanceof nl?function(r){return Ah(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class tl extends au{}class Lo extends au{constructor(e){super(),this.elements=e}}function _1(t,e){const n=w1(e);for(const r of t.elements)n.some(i=>Hn(i,r))||n.push(r);return{arrayValue:{values:n}}}class jo extends au{constructor(e){super(),this.elements=e}}function b1(t,e){let n=w1(e);for(const r of t.elements)n=n.filter(i=>!Hn(i,r));return{arrayValue:{values:n}}}class nl extends au{constructor(e,n){super(),this.serializer=e,this.Ee=n}}function Ny(t){return ot(t.integerValue||t.doubleValue)}function w1(t){return Ep(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function U5(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Lo&&i instanceof Lo||r instanceof jo&&i instanceof jo?us(r.elements,i.elements,Hn):r instanceof nl&&i instanceof nl?Hn(r.Ee,i.Ee):r instanceof tl&&i instanceof tl}(t.transform,e.transform)}class B5{constructor(e,n){this.version=e,this.transformResults=n}}class Jn{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new Jn}static exists(e){return new Jn(void 0,e)}static updateTime(e){return new Jn(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function cc(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class cu{}function E1(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new I1(t.key,Jn.none()):new aa(t.key,t.data,Jn.none());{const n=t.data,r=dn.empty();let i=new jt(Mt.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new Ri(t.key,r,new Cn(i.toArray()),Jn.none())}}function q5(t,e,n){t instanceof aa?function(i,s,o){const a=i.value.clone(),c=Vy(i.fieldTransforms,s,o.transformResults);a.setAll(c),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof Ri?function(i,s,o){if(!cc(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=Vy(i.fieldTransforms,s,o.transformResults),c=s.data;c.setAll(T1(i)),c.setAll(a),s.convertToFoundDocument(o.version,c).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function fo(t,e,n,r){return t instanceof aa?function(s,o,a,c){if(!cc(s.precondition,o))return a;const l=s.value.clone(),u=Fy(s.fieldTransforms,c,o);return l.setAll(u),o.convertToFoundDocument(o.version,l).setHasLocalMutations(),null}(t,e,n,r):t instanceof Ri?function(s,o,a,c){if(!cc(s.precondition,o))return a;const l=Fy(s.fieldTransforms,c,o),u=o.data;return u.setAll(T1(s)),u.setAll(l),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(f=>f.field))}(t,e,n,r):function(s,o,a){return cc(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function H5(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=v1(r.transform,i||null);s!=null&&(n===null&&(n=dn.empty()),n.set(r.field,s))}return n||null}function My(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&us(r,i,(s,o)=>U5(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class aa extends cu{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class Ri extends cu{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function T1(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function Vy(t,e,n){const r=new Map;qe(t.length===n.length);for(let i=0;i{const s=e.get(i.key),o=s.overlayedDocument;let a=this.applyToLocalView(o,s.mutatedFields);a=n.has(i.key)?null:a;const c=E1(o,a);c!==null&&r.set(i.key,c),o.isValidDocument()||o.convertToNoDocument(me.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),Ee())}isEqual(e){return this.batchId===e.batchId&&us(this.mutations,e.mutations,(n,r)=>My(n,r))&&us(this.baseMutations,e.baseMutations,(n,r)=>My(n,r))}}class Ap{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){qe(e.mutations.length===r.length);let i=function(){return N5}();const s=e.mutations;for(let o=0;o=8)throw new Gs(`Invalid padding: ${n}`);if(r<0)throw new Gs(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Gs(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Gs(`Invalid padding when bitmap length is 0: ${n}`);this.Ae=8*e.length-n,this.Re=ss.fromNumber(this.Ae)}Ve(e,n,r){let i=e.add(n.multiply(ss.fromNumber(r)));return i.compare(X5)===1&&(i=new ss([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Re).toNumber()}me(e){return(this.bitmap[Math.floor(e/8)]&1<o.insert(a)),o}insert(e){if(this.Ae===0)return;const n=$y(e),[r,i]=Ly(n);for(let s=0;s0&&(this.ve=!0,this.be=e)}xe(){let e=Ee(),n=Ee(),r=Ee();return this.Se.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:he()}}),new ca(this.be,this.De,e,n,r)}Oe(){this.ve=!1,this.Se=By()}Ne(e,n){this.ve=!0,this.Se=this.Se.insert(e,n)}Be(e){this.ve=!0,this.Se=this.Se.remove(e)}Le(){this.we+=1}ke(){this.we-=1}qe(){this.ve=!0,this.De=!0}}class J5{constructor(e){this.Qe=e,this.Ke=new Map,this.$e=or(),this.Ue=Uy(),this.We=new Xe(Pe)}Ge(e){for(const n of e.ge)e.pe&&e.pe.isFoundDocument()?this.ze(n,e.pe):this.je(n,e.key,e.pe);for(const n of e.removedTargetIds)this.je(n,e.key,e.pe)}He(e){this.forEachTarget(e,n=>{const r=this.Je(n);switch(e.state){case 0:this.Ye(n)&&r.Me(e.resumeToken);break;case 1:r.ke(),r.Ce||r.Oe(),r.Me(e.resumeToken);break;case 2:r.ke(),r.Ce||this.removeTarget(n);break;case 3:this.Ye(n)&&(r.qe(),r.Me(e.resumeToken));break;case 4:this.Ye(n)&&(this.Ze(n),r.Me(e.resumeToken));break;default:he()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Ke.forEach((r,i)=>{this.Ye(i)&&n(i)})}Xe(e){const n=e.targetId,r=e.ye.count,i=this.et(n);if(i){const s=i.target;if(Sh(s))if(r===0){const o=new ce(s.path);this.je(n,o,Nt.newNoDocument(o,me.min()))}else qe(r===1);else{const o=this.tt(n);if(o!==r){const a=this.nt(e),c=a?this.rt(a,e,o):1;if(c!==0){this.Ze(n);const l=c===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.We=this.We.insert(n,l)}}}}}nt(e){const n=e.ye.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,a;try{o=Ai(r).toUint8Array()}catch(c){if(c instanceof n1)return ls("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw c}try{a=new Cp(o,i,s)}catch(c){return ls(c instanceof Gs?"BloomFilter error: ":"Applying bloom filter failed: ",c),null}return a.Ae===0?null:a}rt(e,n,r){return n.ye.count===r-this.ot(e,n.targetId)?0:2}ot(e,n){const r=this.Qe.getRemoteKeysForTarget(n);let i=0;return r.forEach(s=>{const o=this.Qe.st(),a=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(a)||(this.je(n,s,null),i++)}),i}_t(e){const n=new Map;this.Ke.forEach((s,o)=>{const a=this.et(o);if(a){if(s.current&&Sh(a.target)){const c=new ce(a.target.path);this.$e.get(c)!==null||this.ut(o,c)||this.je(o,c,Nt.newNoDocument(c,e))}s.Fe&&(n.set(o,s.xe()),s.Oe())}});let r=Ee();this.Ue.forEach((s,o)=>{let a=!0;o.forEachWhile(c=>{const l=this.et(c);return!l||l.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(s))}),this.$e.forEach((s,o)=>o.setReadTime(e));const i=new lu(e,n,this.We,this.$e,r);return this.$e=or(),this.Ue=Uy(),this.We=new Xe(Pe),i}ze(e,n){if(!this.Ye(e))return;const r=this.ut(e,n.key)?2:0;this.Je(e).Ne(n.key,r),this.$e=this.$e.insert(n.key,n),this.Ue=this.Ue.insert(n.key,this.ct(n.key).add(e))}je(e,n,r){if(!this.Ye(e))return;const i=this.Je(e);this.ut(e,n)?i.Ne(n,1):i.Be(n),this.Ue=this.Ue.insert(n,this.ct(n).delete(e)),r&&(this.$e=this.$e.insert(n,r))}removeTarget(e){this.Ke.delete(e)}tt(e){const n=this.Je(e).xe();return this.Qe.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Le(e){this.Je(e).Le()}Je(e){let n=this.Ke.get(e);return n||(n=new jy,this.Ke.set(e,n)),n}ct(e){let n=this.Ue.get(e);return n||(n=new jt(Pe),this.Ue=this.Ue.insert(e,n)),n}Ye(e){const n=this.et(e)!==null;return n||ne("WatchChangeAggregator","Detected inactive target",e),n}et(e){const n=this.Ke.get(e);return n&&n.Ce?null:this.Qe.lt(e)}Ze(e){this.Ke.set(e,new jy),this.Qe.getRemoteKeysForTarget(e).forEach(n=>{this.je(e,n,null)})}ut(e,n){return this.Qe.getRemoteKeysForTarget(e).has(n)}}function Uy(){return new Xe(ce.comparator)}function By(){return new Xe(ce.comparator)}const Z5=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),e6=(()=>({"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"}))(),t6=(()=>({and:"AND",or:"OR"}))();class n6{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Rh(t,e){return t.useProto3Json||ru(e)?e:{value:e}}function rl(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function x1(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function r6(t,e){return rl(t,e.toTimestamp())}function Un(t){return qe(!!t),me.fromTimestamp(function(n){const r=jr(n);return new ht(r.seconds,r.nanos)}(t))}function Sp(t,e){return function(r){return new Ge(["projects",r.projectId,"databases",r.database])}(t).child("documents").child(e).canonicalString()}function P1(t){const e=Ge.fromString(t);return qe(D1(e)),e}function Oh(t,e){return Sp(t.databaseId,e.path)}function ff(t,e){const n=P1(e);if(n.get(1)!==t.databaseId.projectId)throw new se(j.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new se(j.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new ce(R1(n))}function kh(t,e){return Sp(t.databaseId,e)}function i6(t){const e=P1(t);return e.length===4?Ge.emptyPath():R1(e)}function Dh(t){return new Ge(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function R1(t){return qe(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function qy(t,e,n){return{name:Oh(t,e),fields:n.value.mapValue.fields}}function s6(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(l){return l==="NO_CHANGE"?0:l==="ADD"?1:l==="REMOVE"?2:l==="CURRENT"?3:l==="RESET"?4:he()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(l,u){return l.useProto3Json?(qe(u===void 0||typeof u=="string"),Ut.fromBase64String(u||"")):(qe(u===void 0||u instanceof Uint8Array),Ut.fromUint8Array(u||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(l){const u=l.code===void 0?j.UNKNOWN:A1(l.code);return new se(u,l.message||"")}(o);n=new S1(r,i,s,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=ff(t,r.document.name),s=Un(r.document.updateTime),o=r.document.createTime?Un(r.document.createTime):me.min(),a=new dn({mapValue:{fields:r.document.fields}}),c=Nt.newFoundDocument(i,s,o,a),l=r.targetIds||[],u=r.removedTargetIds||[];n=new lc(l,u,c.key,c)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=ff(t,r.document),s=r.readTime?Un(r.readTime):me.min(),o=Nt.newNoDocument(i,s),a=r.removedTargetIds||[];n=new lc([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=ff(t,r.document),s=r.removedTargetIds||[];n=new lc([],s,i,null)}else{if(!("filter"in e))return he();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new G5(i,s),a=r.targetId;n=new C1(a,o)}}return n}function o6(t,e){let n;if(e instanceof aa)n={update:qy(t,e.key,e.value)};else if(e instanceof I1)n={delete:Oh(t,e.key)};else if(e instanceof Ri)n={update:qy(t,e.key,e.data),updateMask:m6(e.fieldMask)};else{if(!(e instanceof z5))return he();n={verify:Oh(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const a=o.transform;if(a instanceof tl)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Lo)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof jo)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof nl)return{fieldPath:o.field.canonicalString(),increment:a.Ee};throw he()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:r6(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:he()}(t,e.precondition)),n}function a6(t,e){return t&&t.length>0?(qe(e!==void 0),t.map(n=>function(i,s){let o=i.updateTime?Un(i.updateTime):Un(s);return o.isEqual(me.min())&&(o=Un(s)),new B5(o,i.transformResults||[])}(n,e))):[]}function c6(t,e){return{documents:[kh(t,e.path)]}}function l6(t,e){const n={structuredQuery:{}},r=e.path;e.collectionGroup!==null?(n.parent=kh(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=kh(t,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(c){if(c.length!==0)return k1(zn.create(c,"and"))}(e.filters);i&&(n.structuredQuery.where=i);const s=function(c){if(c.length!==0)return c.map(l=>function(f){return{field:zi(f.field),direction:h6(f.dir)}}(l))}(e.orderBy);s&&(n.structuredQuery.orderBy=s);const o=Rh(t,e.limit);return o!==null&&(n.structuredQuery.limit=o),e.startAt&&(n.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),n}function u6(t){let e=i6(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){qe(r===1);const u=n.from[0];u.allDescendants?i=u.collectionId:e=e.child(u.collectionId)}let s=[];n.where&&(s=function(f){const h=O1(f);return h instanceof zn&&o1(h)?h.getFilters():[h]}(n.where));let o=[];n.orderBy&&(o=function(f){return f.map(h=>function(S){return new co(Wi(S.field),function(I){switch(I){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(S.direction))}(h))}(n.orderBy));let a=null;n.limit&&(a=function(f){let h;return h=typeof f=="object"?f.value:f,ru(h)?null:h}(n.limit));let c=null;n.startAt&&(c=function(f){const h=!!f.before,g=f.values||[];return new el(g,h)}(n.startAt));let l=null;return n.endAt&&(l=function(f){const h=!f.before,g=f.values||[];return new el(g,h)}(n.endAt)),C5(e,i,o,s,a,"F",c,l)}function f6(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return he()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function O1(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Wi(n.unaryFilter.field);return ft.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=Wi(n.unaryFilter.field);return ft.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Wi(n.unaryFilter.field);return ft.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Wi(n.unaryFilter.field);return ft.create(o,"!=",{nullValue:"NULL_VALUE"});default:return he()}}(t):t.fieldFilter!==void 0?function(n){return ft.create(Wi(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return he()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return zn.create(n.compositeFilter.filters.map(r=>O1(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return he()}}(n.compositeFilter.op))}(t):he()}function h6(t){return Z5[t]}function d6(t){return e6[t]}function p6(t){return t6[t]}function zi(t){return{fieldPath:t.canonicalString()}}function Wi(t){return Mt.fromServerFormat(t.fieldPath)}function k1(t){return t instanceof ft?function(n){if(n.op==="=="){if(Py(n.value))return{unaryFilter:{field:zi(n.field),op:"IS_NAN"}};if(xy(n.value))return{unaryFilter:{field:zi(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(Py(n.value))return{unaryFilter:{field:zi(n.field),op:"IS_NOT_NAN"}};if(xy(n.value))return{unaryFilter:{field:zi(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:zi(n.field),op:d6(n.op),value:n.value}}}(t):t instanceof zn?function(n){const r=n.getFilters().map(i=>k1(i));return r.length===1?r[0]:{compositeFilter:{op:p6(n.op),filters:r}}}(t):he()}function m6(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function D1(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Sr{constructor(e,n,r,i,s=me.min(),o=me.min(),a=Ut.EMPTY_BYTE_STRING,c=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=c}withSequenceNumber(e){return new Sr(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new Sr(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Sr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Sr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class g6{constructor(e){this.ht=e}}function y6(t){const e=u6({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?xh(e,e.limit,"L"):e}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class v6{constructor(){this._n=new _6}addToCollectionParentIndex(e,n){return this._n.add(n),U.resolve()}getCollectionParents(e,n){return U.resolve(this._n.getEntries(n))}addFieldIndex(e,n){return U.resolve()}deleteFieldIndex(e,n){return U.resolve()}getDocumentsMatchingTarget(e,n){return U.resolve(null)}getIndexType(e,n){return U.resolve(0)}getFieldIndexes(e,n){return U.resolve([])}getNextCollectionGroupToUpdate(e){return U.resolve(null)}getMinOffset(e,n){return U.resolve(Lr.min())}getMinOffsetFromCollectionGroup(e,n){return U.resolve(Lr.min())}updateCollectionGroup(e,n,r){return U.resolve()}updateIndexEntries(e,n){return U.resolve()}}class _6{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new jt(Ge.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new jt(Ge.comparator)).toArray()}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ds{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new ds(0)}static Bn(){return new ds(-1)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class b6{constructor(){this.changes=new Cs(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,Nt.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?U.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class w6{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class E6{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&fo(r.mutation,i,Cn.empty(),ht.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Ee()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Ee()){const i=mi();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=Ks();return s.forEach((a,c)=>{o=o.insert(a,c.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=mi();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Ee()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,r,i){let s=or();const o=uo(),a=function(){return uo()}();return n.forEach((c,l)=>{const u=r.get(l.key);i.has(l.key)&&(u===void 0||u.mutation instanceof Ri)?s=s.insert(l.key,l):u!==void 0?(o.set(l.key,u.mutation.getFieldMask()),fo(u.mutation,l,u.mutation.getFieldMask(),ht.now())):o.set(l.key,Cn.empty())}),this.recalculateAndSaveOverlays(e,s).next(c=>(c.forEach((l,u)=>o.set(l,u)),n.forEach((l,u)=>{var f;return a.set(l,new w6(u,(f=o.get(l))!==null&&f!==void 0?f:null))}),a))}recalculateAndSaveOverlays(e,n){const r=uo();let i=new Xe((o,a)=>o-a),s=Ee();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const a of o)a.keys().forEach(c=>{const l=n.get(c);if(l===null)return;let u=r.get(c)||Cn.empty();u=a.applyToLocalView(l,u),r.set(c,u);const f=(i.get(a.batchId)||Ee()).add(c);i=i.insert(a.batchId,f)})}).next(()=>{const o=[],a=i.getReverseIterator();for(;a.hasNext();){const c=a.getNext(),l=c.key,u=c.value,f=m1();u.forEach(h=>{if(!s.has(h)){const g=E1(n.get(h),r.get(h));g!==null&&f.set(h,g),s=s.add(h)}}),o.push(this.documentOverlayCache.saveOverlays(e,l,f))}return U.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r){return function(s){return ce.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):P5(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r):this.getDocumentsMatchingCollectionQuery(e,n,r)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):U.resolve(mi());let a=-1,c=s;return o.next(l=>U.forEach(l,(u,f)=>(a{c=c.insert(u,h)}))).next(()=>this.populateOverlays(e,l,s)).next(()=>this.computeViews(e,c,l,Ee())).next(u=>({batchId:a,changes:p1(u)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new ce(n)).next(r=>{let i=Ks();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r){const i=n.collectionGroup;let s=Ks();return this.indexManager.getCollectionParents(e,i).next(o=>U.forEach(o,a=>{const c=function(u,f){return new iu(f,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt)}(n,a.child(i));return this.getDocumentsMatchingCollectionQuery(e,c,r).next(l=>{l.forEach((u,f)=>{s=s.insert(u,f)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(e,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,i))).next(s=>{i.forEach((a,c)=>{const l=c.getKey();s.get(l)===null&&(s=s.insert(l,Nt.newInvalidDocument(l)))});let o=Ks();return s.forEach((a,c)=>{const l=i.get(a);l!==void 0&&fo(l.mutation,c,Cn.empty(),ht.now()),ou(n,c)&&(o=o.insert(a,c))}),o})}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class T6{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,n){return U.resolve(this.cr.get(n))}saveBundleMetadata(e,n){return this.cr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:Un(i.createTime)}}(n)),U.resolve()}getNamedQuery(e,n){return U.resolve(this.lr.get(n))}saveNamedQuery(e,n){return this.lr.set(n.name,function(i){return{name:i.name,query:y6(i.bundledQuery),readTime:Un(i.readTime)}}(n)),U.resolve()}}/** + * @license + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class I6{constructor(){this.overlays=new Xe(ce.comparator),this.hr=new Map}getOverlay(e,n){return U.resolve(this.overlays.get(n))}getOverlays(e,n){const r=mi();return U.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.It(e,n,s)}),U.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.hr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(r)),U.resolve()}getOverlaysForCollection(e,n,r){const i=mi(),s=n.length+1,o=new ce(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const c=a.getNext().value,l=c.getKey();if(!n.isPrefixOf(l.path))break;l.path.length===s&&c.largestBatchId>r&&i.set(c.getKey(),c)}return U.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Xe((l,u)=>l-u);const o=this.overlays.getIterator();for(;o.hasNext();){const l=o.getNext().value;if(l.getKey().getCollectionGroup()===n&&l.largestBatchId>r){let u=s.get(l.largestBatchId);u===null&&(u=mi(),s=s.insert(l.largestBatchId,u)),u.set(l.getKey(),l)}}const a=mi(),c=s.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((l,u)=>a.set(l,u)),!(a.size()>=i)););return U.resolve(a)}It(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.hr.get(i.largestBatchId).delete(r.key);this.hr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new K5(n,r));let s=this.hr.get(n);s===void 0&&(s=Ee(),this.hr.set(n,s)),this.hr.set(n,s.add(r.key))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xp{constructor(){this.Pr=new jt(vt.Ir),this.Tr=new jt(vt.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,n){const r=new vt(e,n);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.Ar(new vt(e,n))}Rr(e,n){e.forEach(r=>this.removeReference(r,n))}Vr(e){const n=new ce(new Ge([])),r=new vt(n,e),i=new vt(n,e+1),s=[];return this.Tr.forEachInRange([r,i],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){const n=new ce(new Ge([])),r=new vt(n,e),i=new vt(n,e+1);let s=Ee();return this.Tr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new vt(e,0),r=this.Pr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class vt{constructor(e,n){this.key=e,this.pr=n}static Ir(e,n){return ce.comparator(e.key,n.key)||Pe(e.pr,n.pr)}static Er(e,n){return Pe(e.pr,n.pr)||ce.comparator(e.key,n.key)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class A6{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.yr=1,this.wr=new jt(vt.Ir)}checkEmpty(e){return U.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new W5(s,n,r,i);this.mutationQueue.push(o);for(const a of i)this.wr=this.wr.add(new vt(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return U.resolve(o)}lookupMutationBatch(e,n){return U.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.br(r),s=i<0?0:i;return U.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return U.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(e){return U.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new vt(n,0),i=new vt(n,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([r,i],o=>{const a=this.Sr(o.pr);s.push(a)}),U.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new jt(Pe);return n.forEach(i=>{const s=new vt(i,0),o=new vt(i,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],a=>{r=r.add(a.pr)})}),U.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;ce.isDocumentKey(s)||(s=s.child(""));const o=new vt(new ce(s),0);let a=new jt(Pe);return this.wr.forEachWhile(c=>{const l=c.key.path;return!!r.isPrefixOf(l)&&(l.length===i&&(a=a.add(c.pr)),!0)},o),U.resolve(this.Dr(a))}Dr(e){const n=[];return e.forEach(r=>{const i=this.Sr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){qe(this.vr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return U.forEach(n.mutations,i=>{const s=new vt(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.wr=r})}Mn(e){}containsKey(e,n){const r=new vt(n,0),i=this.wr.firstAfterOrEqual(r);return U.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,U.resolve()}vr(e,n){return this.br(e)}br(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Sr(e){const n=this.br(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class C6{constructor(e){this.Cr=e,this.docs=function(){return new Xe(ce.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.Cr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return U.resolve(r?r.document.mutableCopy():Nt.newInvalidDocument(n))}getEntries(e,n){let r=or();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():Nt.newInvalidDocument(i))}),U.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=or();const o=n.path,a=new ce(o.child("")),c=this.docs.getIteratorFrom(a);for(;c.hasNext();){const{key:l,value:{document:u}}=c.getNext();if(!o.isPrefixOf(l.path))break;l.path.length>o.length+1||l5(c5(u),r)<=0||(i.has(u.key)||ou(n,u))&&(s=s.insert(u.key,u.mutableCopy()))}return U.resolve(s)}getAllFromCollectionGroup(e,n,r,i){he()}Fr(e,n){return U.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new S6(this)}getSize(e){return U.resolve(this.size)}}class S6 extends b6{constructor(e){super(),this.ar=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.ar.addEntry(e,i)):this.ar.removeEntry(r)}),U.waitFor(n)}getFromCache(e,n){return this.ar.getEntry(e,n)}getAllFromCache(e,n){return this.ar.getEntries(e,n)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class x6{constructor(e){this.persistence=e,this.Mr=new Cs(n=>Tp(n),Ip),this.lastRemoteSnapshotVersion=me.min(),this.highestTargetId=0,this.Or=0,this.Nr=new xp,this.targetCount=0,this.Br=ds.Nn()}forEachTarget(e,n){return this.Mr.forEach((r,i)=>n(i)),U.resolve()}getLastRemoteSnapshotVersion(e){return U.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return U.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Br.next(),U.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Or&&(this.Or=n),U.resolve()}qn(e){this.Mr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Br=new ds(n),this.highestTargetId=n),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,n){return this.qn(n),this.targetCount+=1,U.resolve()}updateTargetData(e,n){return this.qn(n),U.resolve()}removeTargetData(e,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,U.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Mr.forEach((o,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),U.waitFor(s).next(()=>i)}getTargetCount(e){return U.resolve(this.targetCount)}getTargetData(e,n){const r=this.Mr.get(n)||null;return U.resolve(r)}addMatchingKeys(e,n,r){return this.Nr.dr(n,r),U.resolve()}removeMatchingKeys(e,n,r){this.Nr.Rr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),U.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Nr.Vr(n),U.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Nr.gr(n);return U.resolve(r)}containsKey(e,n){return U.resolve(this.Nr.containsKey(n))}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class P6{constructor(e,n){this.Lr={},this.overlays={},this.kr=new _p(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new x6(this),this.indexManager=new v6,this.remoteDocumentCache=function(i){return new C6(i)}(r=>this.referenceDelegate.Kr(r)),this.serializer=new g6(n),this.$r=new T6(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new I6,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Lr[e.toKey()];return r||(r=new A6(n,this.referenceDelegate),this.Lr[e.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,n,r){ne("MemoryPersistence","Starting transaction:",e);const i=new R6(this.kr.next());return this.referenceDelegate.Ur(),r(i).next(s=>this.referenceDelegate.Wr(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Gr(e,n){return U.or(Object.values(this.Lr).map(r=>()=>r.containsKey(e,n)))}}class R6 extends f5{constructor(e){super(),this.currentSequenceNumber=e}}class Pp{constructor(e){this.persistence=e,this.zr=new xp,this.jr=null}static Hr(e){return new Pp(e)}get Jr(){if(this.jr)return this.jr;throw he()}addReference(e,n,r){return this.zr.addReference(r,n),this.Jr.delete(r.toString()),U.resolve()}removeReference(e,n,r){return this.zr.removeReference(r,n),this.Jr.add(r.toString()),U.resolve()}markPotentiallyOrphaned(e,n){return this.Jr.add(n.toString()),U.resolve()}removeTarget(e,n){this.zr.Vr(n.targetId).forEach(i=>this.Jr.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.Jr.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}Ur(){this.jr=new Set}Wr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return U.forEach(this.Jr,r=>{const i=ce.fromPath(r);return this.Yr(e,i).next(s=>{s||n.removeEntry(i,me.min())})}).next(()=>(this.jr=null,n.apply(e)))}updateLimboDocument(e,n){return this.Yr(e,n).next(r=>{r?this.Jr.delete(n.toString()):this.Jr.add(n.toString())})}Kr(e){return 0}Yr(e,n){return U.or([()=>U.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Gr(e,n)])}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Rp{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.qi=r,this.Qi=i}static Ki(e,n){let r=Ee(),i=Ee();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new Rp(e,n.fromCache,r,i)}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class O6{constructor(){this.$i=!1}initialize(e,n){this.Ui=e,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(e,n,r,i){return this.Wi(e,n).next(s=>s||this.Gi(e,n,i,r)).next(s=>s||this.zi(e,n))}Wi(e,n){if(Dy(n))return U.resolve(null);let r=sr(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=xh(n,null,"F"),r=sr(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=Ee(...s);return this.Ui.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(c=>{const l=this.ji(n,a);return this.Hi(n,l,o,c.readTime)?this.Wi(e,xh(n,null,"F")):this.Ji(e,l,n,c)}))})))}Gi(e,n,r,i){return Dy(n)||i.isEqual(me.min())?this.zi(e,n):this.Ui.getDocuments(e,r).next(s=>{const o=this.ji(n,s);return this.Hi(n,o,r,i)?this.zi(e,n):(Iy()<=Oe.DEBUG&&ne("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Ph(n)),this.Ji(e,o,n,a5(i,-1)))})}ji(e,n){let r=new jt(h1(e));return n.forEach((i,s)=>{ou(e,s)&&(r=r.add(s))}),r}Hi(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}zi(e,n){return Iy()<=Oe.DEBUG&&ne("QueryEngine","Using full collection scan to execute query:",Ph(n)),this.Ui.getDocumentsMatchingQuery(e,n,Lr.min())}Ji(e,n,r,i){return this.Ui.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class k6{constructor(e,n,r,i){this.persistence=e,this.Yi=n,this.serializer=i,this.Zi=new Xe(Pe),this.Xi=new Cs(s=>Tp(s),Ip),this.es=new Map,this.ts=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this.ns(r)}ns(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new E6(this.ts,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.ts.setIndexManager(this.indexManager),this.Yi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.Zi))}}function D6(t,e,n,r){return new k6(t,e,n,r)}async function N1(t,e){const n=ye(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n.ns(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],a=[];let c=Ee();for(const l of i){o.push(l.batchId);for(const u of l.mutations)c=c.add(u.key)}for(const l of s){a.push(l.batchId);for(const u of l.mutations)c=c.add(u.key)}return n.localDocuments.getDocuments(r,c).next(l=>({rs:l,removedBatchIds:o,addedBatchIds:a}))})})}function N6(t,e){const n=ye(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=n.ts.newChangeBuffer({trackRemovals:!0});return function(a,c,l,u){const f=l.batch,h=f.keys();let g=U.resolve();return h.forEach(S=>{g=g.next(()=>u.getEntry(c,S)).next(T=>{const I=l.docVersions.get(S);qe(I!==null),T.version.compareTo(I)<0&&(f.applyToRemoteDocument(T,l),T.isValidDocument()&&(T.setReadTime(l.commitVersion),u.addEntry(T)))})}),g.next(()=>a.mutationQueue.removeMutationBatch(c,f))}(n,r,e,s).next(()=>s.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let c=Ee();for(let l=0;l0&&(c=c.add(a.batch.mutations[l].key));return c}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function M1(t){const e=ye(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Qr.getLastRemoteSnapshotVersion(n))}function M6(t,e){const n=ye(t),r=e.snapshotVersion;let i=n.Zi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.ts.newChangeBuffer({trackRemovals:!0});i=n.Zi;const a=[];e.targetChanges.forEach((u,f)=>{const h=i.get(f);if(!h)return;a.push(n.Qr.removeMatchingKeys(s,u.removedDocuments,f).next(()=>n.Qr.addMatchingKeys(s,u.addedDocuments,f)));let g=h.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(f)!==null?g=g.withResumeToken(Ut.EMPTY_BYTE_STRING,me.min()).withLastLimboFreeSnapshotVersion(me.min()):u.resumeToken.approximateByteSize()>0&&(g=g.withResumeToken(u.resumeToken,r)),i=i.insert(f,g),function(T,I,b){return T.resumeToken.approximateByteSize()===0||I.snapshotVersion.toMicroseconds()-T.snapshotVersion.toMicroseconds()>=3e8?!0:b.addedDocuments.size+b.modifiedDocuments.size+b.removedDocuments.size>0}(h,g,u)&&a.push(n.Qr.updateTargetData(s,g))});let c=or(),l=Ee();if(e.documentUpdates.forEach(u=>{e.resolvedLimboDocuments.has(u)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(s,u))}),a.push(V6(s,o,e.documentUpdates).next(u=>{c=u.ss,l=u.os})),!r.isEqual(me.min())){const u=n.Qr.getLastRemoteSnapshotVersion(s).next(f=>n.Qr.setTargetsMetadata(s,s.currentSequenceNumber,r));a.push(u)}return U.waitFor(a).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,c,l)).next(()=>c)}).then(s=>(n.Zi=i,s))}function V6(t,e,n){let r=Ee(),i=Ee();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=or();return n.forEach((a,c)=>{const l=s.get(a);c.isFoundDocument()!==l.isFoundDocument()&&(i=i.add(a)),c.isNoDocument()&&c.version.isEqual(me.min())?(e.removeEntry(a,c.readTime),o=o.insert(a,c)):!l.isValidDocument()||c.version.compareTo(l.version)>0||c.version.compareTo(l.version)===0&&l.hasPendingWrites?(e.addEntry(c),o=o.insert(a,c)):ne("LocalStore","Ignoring outdated watch update for ",a,". Current version:",l.version," Watch version:",c.version)}),{ss:o,os:i}})}function F6(t,e){const n=ye(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function $6(t,e){const n=ye(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Qr.getTargetData(r,e).next(s=>s?(i=s,U.resolve(i)):n.Qr.allocateTargetId(r).next(o=>(i=new Sr(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Qr.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.Zi.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Zi=n.Zi.insert(r.targetId,r),n.Xi.set(e,r.targetId)),r})}async function Nh(t,e,n){const r=ye(t),i=r.Zi.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!oa(o))throw o;ne("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.Zi=r.Zi.remove(e),r.Xi.delete(i.target)}function Hy(t,e,n){const r=ye(t);let i=me.min(),s=Ee();return r.persistence.runTransaction("Execute query","readonly",o=>function(c,l,u){const f=ye(c),h=f.Xi.get(u);return h!==void 0?U.resolve(f.Zi.get(h)):f.Qr.getTargetData(l,u)}(r,o,sr(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(o,a.targetId).next(c=>{s=c})}).next(()=>r.Yi.getDocumentsMatchingQuery(o,e,n?i:me.min(),n?s:Ee())).next(a=>(L6(r,O5(e),a),{documents:a,_s:s})))}function L6(t,e,n){let r=t.es.get(e)||me.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.es.set(e,r)}class zy{constructor(){this.activeTargetIds=F5()}Is(e){this.activeTargetIds=this.activeTargetIds.add(e)}Ts(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ps(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class j6{constructor(){this.Ys=new zy,this.Zs={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.Ys.Is(e),this.Zs[e]||"not-current"}updateQueryState(e,n,r){this.Zs[e]=n}removeLocalQueryTarget(e){this.Ys.Ts(e)}isLocalQueryTarget(e){return this.Ys.activeTargetIds.has(e)}clearQueryState(e){delete this.Zs[e]}getAllActiveQueryTargets(){return this.Ys.activeTargetIds}isActiveQueryTarget(e){return this.Ys.activeTargetIds.has(e)}start(){return this.Ys=new zy,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class U6{Xs(e){}shutdown(){}}/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Wy{constructor(){this.eo=()=>this.no(),this.ro=()=>this.io(),this.so=[],this.oo()}Xs(e){this.so.push(e)}shutdown(){window.removeEventListener("online",this.eo),window.removeEventListener("offline",this.ro)}oo(){window.addEventListener("online",this.eo),window.addEventListener("offline",this.ro)}no(){ne("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.so)e(0)}io(){ne("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.so)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */let Ma=null;function hf(){return Ma===null?Ma=function(){return 268435456+Math.round(2147483648*Math.random())}():Ma++,"0x"+Ma.toString(16)}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const B6={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class q6{constructor(e){this._o=e._o,this.ao=e.ao}uo(e){this.co=e}lo(e){this.ho=e}onMessage(e){this.Po=e}close(){this.ao()}send(e){this._o(e)}Io(){this.co()}To(e){this.ho(e)}Eo(e){this.Po(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ot="WebChannelConnection";class H6 extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.Ao=r+"://"+n.host,this.Ro=`projects/${i}/databases/${s}`,this.Vo=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}get mo(){return!1}fo(n,r,i,s,o){const a=hf(),c=this.po(n,r);ne("RestConnection",`Sending RPC '${n}' ${a}:`,c,i);const l={"google-cloud-resource-prefix":this.Ro,"x-goog-request-params":this.Vo};return this.yo(l,s,o),this.wo(n,c,l,i).then(u=>(ne("RestConnection",`Received RPC '${n}' ${a}: `,u),u),u=>{throw ls("RestConnection",`RPC '${n}' ${a} failed with error: `,u,"url: ",c,"request:",i),u})}So(n,r,i,s,o,a){return this.fo(n,r,i,s,o)}yo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Is}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>n[o]=s),i&&i.headers.forEach((s,o)=>n[o]=s)}po(n,r){const i=B6[n];return`${this.Ao}/v1/${r}:${i}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}wo(e,n,r,i){const s=hf();return new Promise((o,a)=>{const c=new QV;c.setWithCredentials(!0),c.listenOnce(GV.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case uf.NO_ERROR:const u=c.getResponseJson();ne(Ot,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(u)),o(u);break;case uf.TIMEOUT:ne(Ot,`RPC '${e}' ${s} timed out`),a(new se(j.DEADLINE_EXCEEDED,"Request time out"));break;case uf.HTTP_ERROR:const f=c.getStatus();if(ne(Ot,`RPC '${e}' ${s} failed with status:`,f,"response text:",c.getResponseText()),f>0){let h=c.getResponseJson();Array.isArray(h)&&(h=h[0]);const g=h==null?void 0:h.error;if(g&&g.status&&g.message){const S=function(I){const b=I.toLowerCase().replace(/_/g,"-");return Object.values(j).indexOf(b)>=0?b:j.UNKNOWN}(g.status);a(new se(S,g.message))}else a(new se(j.UNKNOWN,"Server responded with status "+c.getStatus()))}else a(new se(j.UNAVAILABLE,"Connection failed."));break;default:he()}}finally{ne(Ot,`RPC '${e}' ${s} completed.`)}});const l=JSON.stringify(i);ne(Ot,`RPC '${e}' ${s} sending request:`,i),c.send(n,"POST",l,r,15)})}bo(e,n,r){const i=hf(),s=[this.Ao,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=WV(),a=KV(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;l!==void 0&&(c.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(c.useFetchStreams=!0),this.yo(c.initMessageHeaders,n,r),c.encodeInitMessageHeaders=!0;const u=s.join("");ne(Ot,`Creating RPC '${e}' stream ${i}: ${u}`,c);const f=o.createWebChannel(u,c);let h=!1,g=!1;const S=new q6({_o:I=>{g?ne(Ot,`Not sending because RPC '${e}' stream ${i} is closed:`,I):(h||(ne(Ot,`Opening RPC '${e}' stream ${i} transport.`),f.open(),h=!0),ne(Ot,`RPC '${e}' stream ${i} sending:`,I),f.send(I))},ao:()=>f.close()}),T=(I,b,R)=>{I.listen(b,$=>{try{R($)}catch(F){setTimeout(()=>{throw F},0)}})};return T(f,ka.EventType.OPEN,()=>{g||ne(Ot,`RPC '${e}' stream ${i} transport opened.`)}),T(f,ka.EventType.CLOSE,()=>{g||(g=!0,ne(Ot,`RPC '${e}' stream ${i} transport closed`),S.To())}),T(f,ka.EventType.ERROR,I=>{g||(g=!0,ls(Ot,`RPC '${e}' stream ${i} transport errored:`,I),S.To(new se(j.UNAVAILABLE,"The operation could not be completed")))}),T(f,ka.EventType.MESSAGE,I=>{var b;if(!g){const R=I.data[0];qe(!!R);const $=R,F=$.error||((b=$[0])===null||b===void 0?void 0:b.error);if(F){ne(Ot,`RPC '${e}' stream ${i} received error:`,F);const W=F.status;let fe=function(X){const ie=st[X];if(ie!==void 0)return A1(ie)}(W),_e=F.message;fe===void 0&&(fe=j.INTERNAL,_e="Unknown error status: "+W+" with message "+F.message),g=!0,S.To(new se(fe,_e)),f.close()}else ne(Ot,`RPC '${e}' stream ${i} received:`,R),S.Eo(R)}}),T(a,YV.STAT_EVENT,I=>{I.stat===Ey.PROXY?ne(Ot,`RPC '${e}' stream ${i} detected buffering proxy`):I.stat===Ey.NOPROXY&&ne(Ot,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{S.Io()},0),S}}function df(){return typeof document<"u"?document:null}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function uu(t){return new n6(t,!0)}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class V1{constructor(e,n,r=1e3,i=1.5,s=6e4){this.oi=e,this.timerId=n,this.Do=r,this.vo=i,this.Co=s,this.Fo=0,this.Mo=null,this.xo=Date.now(),this.reset()}reset(){this.Fo=0}Oo(){this.Fo=this.Co}No(e){this.cancel();const n=Math.floor(this.Fo+this.Bo()),r=Math.max(0,Date.now()-this.xo),i=Math.max(0,n-r);i>0&&ne("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.Fo} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Mo=this.oi.enqueueAfterDelay(this.timerId,i,()=>(this.xo=Date.now(),e())),this.Fo*=this.vo,this.Fothis.Co&&(this.Fo=this.Co)}Lo(){this.Mo!==null&&(this.Mo.skipDelay(),this.Mo=null)}cancel(){this.Mo!==null&&(this.Mo.cancel(),this.Mo=null)}Bo(){return(Math.random()-.5)*this.Fo}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class F1{constructor(e,n,r,i,s,o,a,c){this.oi=e,this.ko=r,this.qo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=c,this.state=0,this.Qo=0,this.Ko=null,this.$o=null,this.stream=null,this.Uo=new V1(e,n)}Wo(){return this.state===1||this.state===5||this.Go()}Go(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.zo()}async stop(){this.Wo()&&await this.close(0)}jo(){this.state=0,this.Uo.reset()}Ho(){this.Go()&&this.Ko===null&&(this.Ko=this.oi.enqueueAfterDelay(this.ko,6e4,()=>this.Jo()))}Yo(e){this.Zo(),this.stream.send(e)}async Jo(){if(this.Go())return this.close(0)}Zo(){this.Ko&&(this.Ko.cancel(),this.Ko=null)}Xo(){this.$o&&(this.$o.cancel(),this.$o=null)}async close(e,n){this.Zo(),this.Xo(),this.Uo.cancel(),this.Qo++,e!==4?this.Uo.reset():n&&n.code===j.RESOURCE_EXHAUSTED?(ir(n.toString()),ir("Using maximum backoff delay to prevent overloading the backend."),this.Uo.Oo()):n&&n.code===j.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.e_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.lo(n)}e_(){}auth(){this.state=1;const e=this.t_(this.Qo),n=this.Qo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.Qo===n&&this.n_(r,i)},r=>{e(()=>{const i=new se(j.UNKNOWN,"Fetching auth token failed: "+r.message);return this.r_(i)})})}n_(e,n){const r=this.t_(this.Qo);this.stream=this.i_(e,n),this.stream.uo(()=>{r(()=>(this.state=2,this.$o=this.oi.enqueueAfterDelay(this.qo,1e4,()=>(this.Go()&&(this.state=3),Promise.resolve())),this.listener.uo()))}),this.stream.lo(i=>{r(()=>this.r_(i))}),this.stream.onMessage(i=>{r(()=>this.onMessage(i))})}zo(){this.state=5,this.Uo.No(async()=>{this.state=0,this.start()})}r_(e){return ne("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}t_(e){return n=>{this.oi.enqueueAndForget(()=>this.Qo===e?n():(ne("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class z6 extends F1{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}i_(e,n){return this.connection.bo("Listen",e,n)}onMessage(e){this.Uo.reset();const n=s6(this.serializer,e),r=function(s){if(!("targetChange"in s))return me.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?me.min():o.readTime?Un(o.readTime):me.min()}(e);return this.listener.s_(n,r)}o_(e){const n={};n.database=Dh(this.serializer),n.addTarget=function(s,o){let a;const c=o.target;if(a=Sh(c)?{documents:c6(s,c)}:{query:l6(s,c)},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=x1(s,o.resumeToken);const l=Rh(s,o.expectedCount);l!==null&&(a.expectedCount=l)}else if(o.snapshotVersion.compareTo(me.min())>0){a.readTime=rl(s,o.snapshotVersion.toTimestamp());const l=Rh(s,o.expectedCount);l!==null&&(a.expectedCount=l)}return a}(this.serializer,e);const r=f6(this.serializer,e);r&&(n.labels=r),this.Yo(n)}__(e){const n={};n.database=Dh(this.serializer),n.removeTarget=e,this.Yo(n)}}class W6 extends F1{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s,this.a_=!1}get u_(){return this.a_}start(){this.a_=!1,this.lastStreamToken=void 0,super.start()}e_(){this.a_&&this.c_([])}i_(e,n){return this.connection.bo("Write",e,n)}onMessage(e){if(qe(!!e.streamToken),this.lastStreamToken=e.streamToken,this.a_){this.Uo.reset();const n=a6(e.writeResults,e.commitTime),r=Un(e.commitTime);return this.listener.l_(r,n)}return qe(!e.writeResults||e.writeResults.length===0),this.a_=!0,this.listener.h_()}P_(){const e={};e.database=Dh(this.serializer),this.Yo(e)}c_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>o6(this.serializer,r))};this.Yo(n)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class K6 extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.I_=!1}T_(){if(this.I_)throw new se(j.FAILED_PRECONDITION,"The client has already been terminated.")}fo(e,n,r){return this.T_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.fo(e,n,r,i,s)).catch(i=>{throw i.name==="FirebaseError"?(i.code===j.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),i):new se(j.UNKNOWN,i.toString())})}So(e,n,r,i){return this.T_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.So(e,n,r,s,o,i)).catch(s=>{throw s.name==="FirebaseError"?(s.code===j.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new se(j.UNKNOWN,s.toString())})}terminate(){this.I_=!0}}class G6{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.d_=0,this.A_=null,this.R_=!0}V_(){this.d_===0&&(this.m_("Unknown"),this.A_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.A_=null,this.f_("Backend didn't respond within 10 seconds."),this.m_("Offline"),Promise.resolve())))}g_(e){this.state==="Online"?this.m_("Unknown"):(this.d_++,this.d_>=1&&(this.p_(),this.f_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.m_("Offline")))}set(e){this.p_(),this.d_=0,e==="Online"&&(this.R_=!1),this.m_(e)}m_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}f_(e){const n=`Could not reach Cloud Firestore backend. ${e} +This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.R_?(ir(n),this.R_=!1):ne("OnlineStateTracker",n)}p_(){this.A_!==null&&(this.A_.cancel(),this.A_=null)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Y6{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.y_=[],this.w_=new Map,this.S_=new Set,this.b_=[],this.D_=s,this.D_.Xs(o=>{r.enqueueAndForget(async()=>{Oi(this)&&(ne("RemoteStore","Restarting streams for network reachability change."),await async function(c){const l=ye(c);l.S_.add(4),await la(l),l.v_.set("Unknown"),l.S_.delete(4),await fu(l)}(this))})}),this.v_=new G6(r,i)}}async function fu(t){if(Oi(t))for(const e of t.b_)await e(!0)}async function la(t){for(const e of t.b_)await e(!1)}function $1(t,e){const n=ye(t);n.w_.has(e.targetId)||(n.w_.set(e.targetId,e),Dp(n)?kp(n):Ss(n).Go()&&Op(n,e))}function L1(t,e){const n=ye(t),r=Ss(n);n.w_.delete(e),r.Go()&&j1(n,e),n.w_.size===0&&(r.Go()?r.Ho():Oi(n)&&n.v_.set("Unknown"))}function Op(t,e){if(t.C_.Le(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(me.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Ss(t).o_(e)}function j1(t,e){t.C_.Le(e),Ss(t).__(e)}function kp(t){t.C_=new J5({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),lt:e=>t.w_.get(e)||null,st:()=>t.datastore.serializer.databaseId}),Ss(t).start(),t.v_.V_()}function Dp(t){return Oi(t)&&!Ss(t).Wo()&&t.w_.size>0}function Oi(t){return ye(t).S_.size===0}function U1(t){t.C_=void 0}async function Q6(t){t.w_.forEach((e,n)=>{Op(t,e)})}async function X6(t,e){U1(t),Dp(t)?(t.v_.g_(e),kp(t)):t.v_.set("Unknown")}async function J6(t,e,n){if(t.v_.set("Online"),e instanceof S1&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.w_.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.w_.delete(a),i.C_.removeTarget(a))}(t,e)}catch(r){ne("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await il(t,r)}else if(e instanceof lc?t.C_.Ge(e):e instanceof C1?t.C_.Xe(e):t.C_.He(e),!n.isEqual(me.min()))try{const r=await M1(t.localStore);n.compareTo(r)>=0&&await function(s,o){const a=s.C_._t(o);return a.targetChanges.forEach((c,l)=>{if(c.resumeToken.approximateByteSize()>0){const u=s.w_.get(l);u&&s.w_.set(l,u.withResumeToken(c.resumeToken,o))}}),a.targetMismatches.forEach((c,l)=>{const u=s.w_.get(c);if(!u)return;s.w_.set(c,u.withResumeToken(Ut.EMPTY_BYTE_STRING,u.snapshotVersion)),j1(s,c);const f=new Sr(u.target,c,l,u.sequenceNumber);Op(s,f)}),s.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){ne("RemoteStore","Failed to raise snapshot:",r),await il(t,r)}}async function il(t,e,n){if(!oa(e))throw e;t.S_.add(1),await la(t),t.v_.set("Offline"),n||(n=()=>M1(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ne("RemoteStore","Retrying IndexedDB access"),await n(),t.S_.delete(1),await fu(t)})}function B1(t,e){return e().catch(n=>il(t,n,e))}async function hu(t){const e=ye(t),n=Ur(e);let r=e.y_.length>0?e.y_[e.y_.length-1].batchId:-1;for(;Z6(e);)try{const i=await F6(e.localStore,r);if(i===null){e.y_.length===0&&n.Ho();break}r=i.batchId,eF(e,i)}catch(i){await il(e,i)}q1(e)&&H1(e)}function Z6(t){return Oi(t)&&t.y_.length<10}function eF(t,e){t.y_.push(e);const n=Ur(t);n.Go()&&n.u_&&n.c_(e.mutations)}function q1(t){return Oi(t)&&!Ur(t).Wo()&&t.y_.length>0}function H1(t){Ur(t).start()}async function tF(t){Ur(t).P_()}async function nF(t){const e=Ur(t);for(const n of t.y_)e.c_(n.mutations)}async function rF(t,e,n){const r=t.y_.shift(),i=Ap.from(r,e,n);await B1(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await hu(t)}async function iF(t,e){e&&Ur(t).u_&&await async function(r,i){if(function(o){return Y5(o)&&o!==j.ABORTED}(i.code)){const s=r.y_.shift();Ur(r).jo(),await B1(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await hu(r)}}(t,e),q1(t)&&H1(t)}async function Ky(t,e){const n=ye(t);n.asyncQueue.verifyOperationInProgress(),ne("RemoteStore","RemoteStore received new credentials");const r=Oi(n);n.S_.add(3),await la(n),r&&n.v_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.S_.delete(3),await fu(n)}async function sF(t,e){const n=ye(t);e?(n.S_.delete(2),await fu(n)):e||(n.S_.add(2),await la(n),n.v_.set("Unknown"))}function Ss(t){return t.F_||(t.F_=function(n,r,i){const s=ye(n);return s.T_(),new z6(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{uo:Q6.bind(null,t),lo:X6.bind(null,t),s_:J6.bind(null,t)}),t.b_.push(async e=>{e?(t.F_.jo(),Dp(t)?kp(t):t.v_.set("Unknown")):(await t.F_.stop(),U1(t))})),t.F_}function Ur(t){return t.M_||(t.M_=function(n,r,i){const s=ye(n);return s.T_(),new W6(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{uo:tF.bind(null,t),lo:iF.bind(null,t),h_:nF.bind(null,t),l_:rF.bind(null,t)}),t.b_.push(async e=>{e?(t.M_.jo(),await hu(t)):(await t.M_.stop(),t.y_.length>0&&(ne("RemoteStore",`Stopping write stream with ${t.y_.length} pending writes`),t.y_=[]))})),t.M_}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Np{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Dr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,a=new Np(e,n,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new se(j.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Mp(t,e){if(ir("AsyncQueue",`${e}: ${t}`),oa(t))return new se(j.UNAVAILABLE,`${e}: ${t}`);throw t}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class os{constructor(e){this.comparator=e?(n,r)=>e(n,r)||ce.comparator(n.key,r.key):(n,r)=>ce.comparator(n.key,r.key),this.keyedMap=Ks(),this.sortedSet=new Xe(this.comparator)}static emptySet(e){return new os(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof os)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( + `+e.join(` +`)+` +)`}copy(e,n){const r=new os;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Gy{constructor(){this.x_=new Xe(ce.comparator)}track(e){const n=e.doc.key,r=this.x_.get(n);r?e.type!==0&&r.type===3?this.x_=this.x_.insert(n,e):e.type===3&&r.type!==1?this.x_=this.x_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.x_=this.x_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.x_=this.x_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.x_=this.x_.remove(n):e.type===1&&r.type===2?this.x_=this.x_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.x_=this.x_.insert(n,{type:2,doc:e.doc}):he():this.x_=this.x_.insert(n,e)}O_(){const e=[];return this.x_.inorderTraversal((n,r)=>{e.push(r)}),e}}class ps{constructor(e,n,r,i,s,o,a,c,l){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=c,this.hasCachedResults=l}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new ps(e,n,os.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&su(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;if1(e),su),this.onlineState="Unknown",this.B_=new Set}}async function cF(t,e){const n=ye(t),r=e.query;let i=!1,s=n.queries.get(r);if(s||(i=!0,s=new oF),i)try{s.N_=await n.onListen(r)}catch(o){const a=Mp(o,`Initialization of query '${Ph(e.query)}' failed`);return void e.onError(a)}n.queries.set(r,s),s.listeners.push(e),e.L_(n.onlineState),s.N_&&e.k_(s.N_)&&Vp(n)}async function lF(t,e){const n=ye(t),r=e.query;let i=!1;const s=n.queries.get(r);if(s){const o=s.listeners.indexOf(e);o>=0&&(s.listeners.splice(o,1),i=s.listeners.length===0)}if(i)return n.queries.delete(r),n.onUnlisten(r)}function uF(t,e){const n=ye(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const a of o.listeners)a.k_(i)&&(r=!0);o.N_=i}}r&&Vp(n)}function fF(t,e,n){const r=ye(t),i=r.queries.get(e);if(i)for(const s of i.listeners)s.onError(n);r.queries.delete(e)}function Vp(t){t.B_.forEach(e=>{e.next()})}class hF{constructor(e,n,r){this.query=e,this.q_=n,this.Q_=!1,this.K_=null,this.onlineState="Unknown",this.options=r||{}}k_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new ps(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.Q_?this.U_(e)&&(this.q_.next(e),n=!0):this.W_(e,this.onlineState)&&(this.G_(e),n=!0),this.K_=e,n}onError(e){this.q_.error(e)}L_(e){this.onlineState=e;let n=!1;return this.K_&&!this.Q_&&this.W_(this.K_,e)&&(this.G_(this.K_),n=!0),n}W_(e,n){if(!e.fromCache)return!0;const r=n!=="Offline";return(!this.options.z_||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}U_(e){if(e.docChanges.length>0)return!0;const n=this.K_&&this.K_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}G_(e){e=ps.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Q_=!0,this.q_.next(e)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class z1{constructor(e){this.key=e}}class W1{constructor(e){this.key=e}}class dF{constructor(e,n){this.query=e,this.ta=n,this.na=null,this.hasCachedResults=!1,this.current=!1,this.ra=Ee(),this.mutatedKeys=Ee(),this.ia=h1(e),this.sa=new os(this.ia)}get oa(){return this.ta}_a(e,n){const r=n?n.aa:new Gy,i=n?n.sa:this.sa;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,a=!1;const c=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,l=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((u,f)=>{const h=i.get(u),g=ou(this.query,f)?f:null,S=!!h&&this.mutatedKeys.has(h.key),T=!!g&&(g.hasLocalMutations||this.mutatedKeys.has(g.key)&&g.hasCommittedMutations);let I=!1;h&&g?h.data.isEqual(g.data)?S!==T&&(r.track({type:3,doc:g}),I=!0):this.ua(h,g)||(r.track({type:2,doc:g}),I=!0,(c&&this.ia(g,c)>0||l&&this.ia(g,l)<0)&&(a=!0)):!h&&g?(r.track({type:0,doc:g}),I=!0):h&&!g&&(r.track({type:1,doc:h}),I=!0,(c||l)&&(a=!0)),I&&(g?(o=o.add(g),s=T?s.add(u):s.delete(u)):(o=o.delete(u),s=s.delete(u)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const u=this.query.limitType==="F"?o.last():o.first();o=o.delete(u.key),s=s.delete(u.key),r.track({type:1,doc:u})}return{sa:o,aa:r,Hi:a,mutatedKeys:s}}ua(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r){const i=this.sa;this.sa=e.sa,this.mutatedKeys=e.mutatedKeys;const s=e.aa.O_();s.sort((l,u)=>function(h,g){const S=T=>{switch(T){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return he()}};return S(h)-S(g)}(l.type,u.type)||this.ia(l.doc,u.doc)),this.ca(r);const o=n?this.la():[],a=this.ra.size===0&&this.current?1:0,c=a!==this.na;return this.na=a,s.length!==0||c?{snapshot:new ps(this.query,e.sa,i,s,e.mutatedKeys,a===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),ha:o}:{ha:o}}L_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({sa:this.sa,aa:new Gy,mutatedKeys:this.mutatedKeys,Hi:!1},!1)):{ha:[]}}Pa(e){return!this.ta.has(e)&&!!this.sa.has(e)&&!this.sa.get(e).hasLocalMutations}ca(e){e&&(e.addedDocuments.forEach(n=>this.ta=this.ta.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.ta=this.ta.delete(n)),this.current=e.current)}la(){if(!this.current)return[];const e=this.ra;this.ra=Ee(),this.sa.forEach(r=>{this.Pa(r.key)&&(this.ra=this.ra.add(r.key))});const n=[];return e.forEach(r=>{this.ra.has(r)||n.push(new W1(r))}),this.ra.forEach(r=>{e.has(r)||n.push(new z1(r))}),n}Ia(e){this.ta=e._s,this.ra=Ee();const n=this._a(e.documents);return this.applyChanges(n,!0)}Ta(){return ps.fromInitialDocuments(this.query,this.sa,this.mutatedKeys,this.na===0,this.hasCachedResults)}}class pF{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class mF{constructor(e){this.key=e,this.Ea=!1}}class gF{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.da={},this.Aa=new Cs(a=>f1(a),su),this.Ra=new Map,this.Va=new Set,this.ma=new Xe(ce.comparator),this.fa=new Map,this.ga=new xp,this.pa={},this.ya=new Map,this.wa=ds.Bn(),this.onlineState="Unknown",this.Sa=void 0}get isPrimaryClient(){return this.Sa===!0}}async function yF(t,e){const n=SF(t);let r,i;const s=n.Aa.get(e);if(s)r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.Ta();else{const o=await $6(n.localStore,sr(e)),a=n.sharedClientState.addLocalQueryTarget(o.targetId);r=o.targetId,i=await vF(n,e,r,a==="current",o.resumeToken),n.isPrimaryClient&&$1(n.remoteStore,o)}return i}async function vF(t,e,n,r,i){t.ba=(f,h,g)=>async function(T,I,b,R){let $=I.view._a(b);$.Hi&&($=await Hy(T.localStore,I.query,!1).then(({documents:fe})=>I.view._a(fe,$)));const F=R&&R.targetChanges.get(I.targetId),W=I.view.applyChanges($,T.isPrimaryClient,F);return Qy(T,I.targetId,W.ha),W.snapshot}(t,f,h,g);const s=await Hy(t.localStore,e,!0),o=new dF(e,s._s),a=o._a(s.documents),c=ca.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),l=o.applyChanges(a,t.isPrimaryClient,c);Qy(t,n,l.ha);const u=new pF(e,n,o);return t.Aa.set(e,u),t.Ra.has(n)?t.Ra.get(n).push(e):t.Ra.set(n,[e]),l.snapshot}async function _F(t,e){const n=ye(t),r=n.Aa.get(e),i=n.Ra.get(r.targetId);if(i.length>1)return n.Ra.set(r.targetId,i.filter(s=>!su(s,e))),void n.Aa.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Nh(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),L1(n.remoteStore,r.targetId),Mh(n,r.targetId)}).catch(sa)):(Mh(n,r.targetId),await Nh(n.localStore,r.targetId,!0))}async function bF(t,e,n){const r=xF(t);try{const i=await function(o,a){const c=ye(o),l=ht.now(),u=a.reduce((g,S)=>g.add(S.key),Ee());let f,h;return c.persistence.runTransaction("Locally write mutations","readwrite",g=>{let S=or(),T=Ee();return c.ts.getEntries(g,u).next(I=>{S=I,S.forEach((b,R)=>{R.isValidDocument()||(T=T.add(b))})}).next(()=>c.localDocuments.getOverlayedDocuments(g,S)).next(I=>{f=I;const b=[];for(const R of a){const $=H5(R,f.get(R.key).overlayedDocument);$!=null&&b.push(new Ri(R.key,$,r1($.value.mapValue),Jn.exists(!0)))}return c.mutationQueue.addMutationBatch(g,l,b,a)}).next(I=>{h=I;const b=I.applyToLocalDocumentSet(f,T);return c.documentOverlayCache.saveOverlays(g,I.batchId,b)})}).then(()=>({batchId:h.batchId,changes:p1(f)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,a,c){let l=o.pa[o.currentUser.toKey()];l||(l=new Xe(Pe)),l=l.insert(a,c),o.pa[o.currentUser.toKey()]=l}(r,i.batchId,n),await ua(r,i.changes),await hu(r.remoteStore)}catch(i){const s=Mp(i,"Failed to persist write");n.reject(s)}}async function K1(t,e){const n=ye(t);try{const r=await M6(n.localStore,e);e.targetChanges.forEach((i,s)=>{const o=n.fa.get(s);o&&(qe(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.Ea=!0:i.modifiedDocuments.size>0?qe(o.Ea):i.removedDocuments.size>0&&(qe(o.Ea),o.Ea=!1))}),await ua(n,r,e)}catch(r){await sa(r)}}function Yy(t,e,n){const r=ye(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.Aa.forEach((s,o)=>{const a=o.view.L_(e);a.snapshot&&i.push(a.snapshot)}),function(o,a){const c=ye(o);c.onlineState=a;let l=!1;c.queries.forEach((u,f)=>{for(const h of f.listeners)h.L_(a)&&(l=!0)}),l&&Vp(c)}(r.eventManager,e),i.length&&r.da.s_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function wF(t,e,n){const r=ye(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.fa.get(e),s=i&&i.key;if(s){let o=new Xe(ce.comparator);o=o.insert(s,Nt.newNoDocument(s,me.min()));const a=Ee().add(s),c=new lu(me.min(),new Map,new Xe(Pe),o,a);await K1(r,c),r.ma=r.ma.remove(s),r.fa.delete(e),Fp(r)}else await Nh(r.localStore,e,!1).then(()=>Mh(r,e,n)).catch(sa)}async function EF(t,e){const n=ye(t),r=e.batch.batchId;try{const i=await N6(n.localStore,e);Y1(n,r,null),G1(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await ua(n,i)}catch(i){await sa(i)}}async function TF(t,e,n){const r=ye(t);try{const i=await function(o,a){const c=ye(o);return c.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let u;return c.mutationQueue.lookupMutationBatch(l,a).next(f=>(qe(f!==null),u=f.keys(),c.mutationQueue.removeMutationBatch(l,f))).next(()=>c.mutationQueue.performConsistencyCheck(l)).next(()=>c.documentOverlayCache.removeOverlaysForBatchId(l,u,a)).next(()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,u)).next(()=>c.localDocuments.getDocuments(l,u))})}(r.localStore,e);Y1(r,e,n),G1(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await ua(r,i)}catch(i){await sa(i)}}function G1(t,e){(t.ya.get(e)||[]).forEach(n=>{n.resolve()}),t.ya.delete(e)}function Y1(t,e,n){const r=ye(t);let i=r.pa[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.pa[r.currentUser.toKey()]=i}}function Mh(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Ra.get(e))t.Aa.delete(r),n&&t.da.Da(r,n);t.Ra.delete(e),t.isPrimaryClient&&t.ga.Vr(e).forEach(r=>{t.ga.containsKey(r)||Q1(t,r)})}function Q1(t,e){t.Va.delete(e.path.canonicalString());const n=t.ma.get(e);n!==null&&(L1(t.remoteStore,n),t.ma=t.ma.remove(e),t.fa.delete(n),Fp(t))}function Qy(t,e,n){for(const r of n)r instanceof z1?(t.ga.addReference(r.key,e),IF(t,r)):r instanceof W1?(ne("SyncEngine","Document no longer in limbo: "+r.key),t.ga.removeReference(r.key,e),t.ga.containsKey(r.key)||Q1(t,r.key)):he()}function IF(t,e){const n=e.key,r=n.path.canonicalString();t.ma.get(n)||t.Va.has(r)||(ne("SyncEngine","New document in limbo: "+n),t.Va.add(r),Fp(t))}function Fp(t){for(;t.Va.size>0&&t.ma.size{o.push(r.ba(c,e,n).then(l=>{if((l||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(c.targetId,l!=null&&l.fromCache?"not-current":"current"),l){i.push(l);const u=Rp.Ki(c.targetId,l);s.push(u)}}))}),await Promise.all(o),r.da.s_(i),await async function(c,l){const u=ye(c);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>U.forEach(l,h=>U.forEach(h.qi,g=>u.persistence.referenceDelegate.addReference(f,h.targetId,g)).next(()=>U.forEach(h.Qi,g=>u.persistence.referenceDelegate.removeReference(f,h.targetId,g)))))}catch(f){if(!oa(f))throw f;ne("LocalStore","Failed to update sequence numbers: "+f)}for(const f of l){const h=f.targetId;if(!f.fromCache){const g=u.Zi.get(h),S=g.snapshotVersion,T=g.withLastLimboFreeSnapshotVersion(S);u.Zi=u.Zi.insert(h,T)}}}(r.localStore,s))}async function AF(t,e){const n=ye(t);if(!n.currentUser.isEqual(e)){ne("SyncEngine","User change. New user:",e.toKey());const r=await N1(n.localStore,e);n.currentUser=e,function(s,o){s.ya.forEach(a=>{a.forEach(c=>{c.reject(new se(j.CANCELLED,o))})}),s.ya.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await ua(n,r.rs)}}function CF(t,e){const n=ye(t),r=n.fa.get(e);if(r&&r.Ea)return Ee().add(r.key);{let i=Ee();const s=n.Ra.get(e);if(!s)return i;for(const o of s){const a=n.Aa.get(o);i=i.unionWith(a.view.oa)}return i}}function SF(t){const e=ye(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=K1.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=CF.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=wF.bind(null,e),e.da.s_=uF.bind(null,e.eventManager),e.da.Da=fF.bind(null,e.eventManager),e}function xF(t){const e=ye(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=EF.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=TF.bind(null,e),e}class Xy{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=uu(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return D6(this.persistence,new O6,e.initialUser,this.serializer)}createPersistence(e){return new P6(Pp.Hr,this.serializer)}createSharedClientState(e){return new j6}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class PF{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>Yy(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=AF.bind(null,this.syncEngine),await sF(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new aF}()}createDatastore(e){const n=uu(e.databaseInfo.databaseId),r=function(s){return new H6(s)}(e.databaseInfo);return function(s,o,a,c){return new K6(s,o,a,c)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,a){return new Y6(r,i,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>Yy(this.syncEngine,n,0),function(){return Wy.v()?new Wy:new U6}())}createSyncEngine(e,n){return function(i,s,o,a,c,l,u){const f=new gF(i,s,o,a,c,l);return u&&(f.Sa=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}terminate(){return async function(n){const r=ye(n);ne("RemoteStore","RemoteStore shutting down."),r.S_.add(5),await la(r),r.D_.shutdown(),r.v_.set("Unknown")}(this.remoteStore)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *//** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class RF{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Fa(this.observer.next,e)}error(e){this.observer.error?this.Fa(this.observer.error,e):ir("Uncaught Error in snapshot listener:",e.toString())}Ma(){this.muted=!0}Fa(e,n){this.muted||setTimeout(()=>{this.muted||e(n)},0)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class OF{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Dt.UNAUTHENTICATED,this.clientId=e1.V(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async s=>{ne("FirestoreClient","Received user=",s.uid),await this.authCredentialListener(s),this.user=s}),this.appCheckCredentials.start(r,s=>(ne("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new se(j.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Dr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=Mp(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function pf(t,e){t.asyncQueue.verifyOperationInProgress(),ne("FirestoreClient","Initializing OfflineComponentProvider");const n=await t.getConfiguration();await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await N1(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function Jy(t,e){t.asyncQueue.verifyOperationInProgress();const n=await DF(t);ne("FirestoreClient","Initializing OnlineComponentProvider");const r=await t.getConfiguration();await e.initialize(n,r),t.setCredentialChangeListener(i=>Ky(e.remoteStore,i)),t.setAppCheckTokenChangeListener((i,s)=>Ky(e.remoteStore,s)),t._onlineComponents=e}function kF(t){return t.name==="FirebaseError"?t.code===j.FAILED_PRECONDITION||t.code===j.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function DF(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ne("FirestoreClient","Using user provided OfflineComponentProvider");try{await pf(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!kF(n))throw n;ls("Error using user provided cache. Falling back to memory cache: "+n),await pf(t,new Xy)}}else ne("FirestoreClient","Using default OfflineComponentProvider"),await pf(t,new Xy);return t._offlineComponents}async function X1(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ne("FirestoreClient","Using user provided OnlineComponentProvider"),await Jy(t,t._uninitializedComponentsProvider._online)):(ne("FirestoreClient","Using default OnlineComponentProvider"),await Jy(t,new PF))),t._onlineComponents}function NF(t){return X1(t).then(e=>e.syncEngine)}async function MF(t){const e=await X1(t),n=e.eventManager;return n.onListen=yF.bind(null,e.syncEngine),n.onUnlisten=_F.bind(null,e.syncEngine),n}function VF(t,e,n={}){const r=new Dr;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,a,c,l){const u=new RF({next:h=>{o.enqueueAndForget(()=>lF(s,f)),h.fromCache&&c.source==="server"?l.reject(new se(j.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(h)},error:h=>l.reject(h)}),f=new hF(a,u,{includeMetadataChanges:!0,z_:!0});return cF(s,f)}(await MF(t),t.asyncQueue,e,n,r)),r.promise}/** + * @license + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function J1(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Zy=new Map;/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Z1(t,e,n){if(!n)throw new se(j.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function FF(t,e,n,r){if(e===!0&&r===!0)throw new se(j.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function ev(t){if(!ce.isDocumentKey(t))throw new se(j.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function tv(t){if(ce.isDocumentKey(t))throw new se(j.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function $p(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":he()}function Uo(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new se(j.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=$p(t);throw new se(j.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nv{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new se(j.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new se(j.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}FF("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=J1((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new se(j.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new se(j.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new se(j.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class du{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new nv({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new se(j.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(e){if(this._settingsFrozen)throw new se(j.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new nv(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new JV;switch(r.type){case"firstParty":return new n5(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new se(j.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=Zy.get(n);r&&(ne("ComponentProvider","Removing Datastore"),Zy.delete(n),r.terminate())}(this),Promise.resolve()}}function $F(t,e,n,r={}){var i;const s=(t=Uo(t,du))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&ls("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let a,c;if(typeof r.mockUserToken=="string")a=r.mockUserToken,c=Dt.MOCK_USER;else{a=RM(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const l=r.mockUserToken.sub||r.mockUserToken.user_id;if(!l)throw new se(j.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Dt(l)}t._authCredentials=new ZV(new Zw(a,c))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class pu{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new pu(this.firestore,e,this._query)}}class gn{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Nr(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new gn(this.firestore,e,this._key)}}class Nr extends pu{constructor(e,n,r){super(e,n,u1(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new gn(this.firestore,null,new ce(e))}withConverter(e){return new Nr(this.firestore,e,this._path)}}function Lp(t,e,...n){if(t=Io(t),Z1("collection","path",e),t instanceof du){const r=Ge.fromString(e,...n);return tv(r),new Nr(t,null,r)}{if(!(t instanceof gn||t instanceof Nr))throw new se(j.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Ge.fromString(e,...n));return tv(r),new Nr(t.firestore,null,r)}}function eE(t,e,...n){if(t=Io(t),arguments.length===1&&(e=e1.V()),Z1("doc","path",e),t instanceof du){const r=Ge.fromString(e,...n);return ev(r),new gn(t,null,new ce(r))}{if(!(t instanceof gn||t instanceof Nr))throw new se(j.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Ge.fromString(e,...n));return ev(r),new gn(t.firestore,t instanceof Nr?t.converter:null,new ce(r))}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class LF{constructor(){this.za=Promise.resolve(),this.ja=[],this.Ha=!1,this.Ja=[],this.Ya=null,this.Za=!1,this.Xa=!1,this.eu=[],this.Uo=new V1(this,"async_queue_retry"),this.tu=()=>{const n=df();n&&ne("AsyncQueue","Visibility state changed to "+n.visibilityState),this.Uo.Lo()};const e=df();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.tu)}get isShuttingDown(){return this.Ha}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.nu(),this.ru(e)}enterRestrictedMode(e){if(!this.Ha){this.Ha=!0,this.Xa=e||!1;const n=df();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.tu)}}enqueue(e){if(this.nu(),this.Ha)return new Promise(()=>{});const n=new Dr;return this.ru(()=>this.Ha&&this.Xa?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.ja.push(e),this.iu()))}async iu(){if(this.ja.length!==0){try{await this.ja[0](),this.ja.shift(),this.Uo.reset()}catch(e){if(!oa(e))throw e;ne("AsyncQueue","Operation failed with retryable error: "+e)}this.ja.length>0&&this.Uo.No(()=>this.iu())}}ru(e){const n=this.za.then(()=>(this.Za=!0,e().catch(r=>{this.Ya=r,this.Za=!1;const i=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+` +`+o.stack),a}(r);throw ir("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.Za=!1,r))));return this.za=n,n}enqueueAfterDelay(e,n,r){this.nu(),this.eu.indexOf(e)>-1&&(n=0);const i=Np.createAndSchedule(this,e,n,r,s=>this.su(s));return this.Ja.push(i),i}nu(){this.Ya&&he()}verifyOperationInProgress(){}async ou(){let e;do e=this.za,await e;while(e!==this.za)}_u(e){for(const n of this.Ja)if(n.timerId===e)return!0;return!1}au(e){return this.ou().then(()=>{this.Ja.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.Ja)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.ou()})}uu(e){this.eu.push(e)}su(e){const n=this.Ja.indexOf(e);this.Ja.splice(n,1)}}class jp extends du{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=function(){return new LF}(),this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||nE(this),this._firestoreClient.terminate()}}function Up(t,e){const n=typeof t=="object"?t:N9(),r=typeof t=="string"?t:e||"(default)",i=R9(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=xM("firestore");s&&$F(i,...s)}return i}function tE(t){return t._firestoreClient||nE(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function nE(t){var e,n,r;const i=t._freezeSettings(),s=function(a,c,l,u){return new p5(a,c,l,u.host,u.ssl,u.experimentalForceLongPolling,u.experimentalAutoDetectLongPolling,J1(u.experimentalLongPollingOptions),u.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._firestoreClient=new OF(t._authCredentials,t._appCheckCredentials,t._queue,s),((n=i.localCache)===null||n===void 0?void 0:n._offlineComponentProvider)&&((r=i.localCache)===null||r===void 0?void 0:r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ms{constructor(e){this._byteString=e}static fromBase64String(e){try{return new ms(Ut.fromBase64String(e))}catch(n){throw new se(j.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new ms(Ut.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Bp{constructor(...e){for(let n=0;n90)throw new se(j.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new se(j.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Pe(this._lat,e._lat)||Pe(this._long,e._long)}}/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const jF=/^__.*__$/;class UF{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new Ri(e,this.data,this.fieldMask,n,this.fieldTransforms):new aa(e,this.data,n,this.fieldTransforms)}}function iE(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw he()}}class Hp{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.cu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get lu(){return this.settings.lu}hu(e){return new Hp(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Pu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.hu({path:r,Iu:!1});return i.Tu(e),i}Eu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.hu({path:r,Iu:!1});return i.cu(),i}du(e){return this.hu({path:void 0,Iu:!0})}Au(e){return sl(e,this.settings.methodName,this.settings.Ru||!1,this.path,this.settings.Vu)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}cu(){if(this.path)for(let e=0;ec.covers(f.field))}else c=null,l=o.fieldTransforms;return new UF(new dn(a),c,l)}function sE(t,e){if(aE(t=Io(t)))return cE("Unsupported field value:",e,t),oE(t,e);if(t instanceof rE)return function(r,i){if(!iE(i.lu))throw i.Au(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.Au(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.Iu&&e.lu!==4)throw e.Au("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let c=sE(a,i.du(o));c==null&&(c={nullValue:"NULL_VALUE"}),s.push(c),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=Io(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return $5(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=ht.fromDate(r);return{timestampValue:rl(i.serializer,s)}}if(r instanceof ht){const s=new ht(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:rl(i.serializer,s)}}if(r instanceof qp)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof ms)return{bytesValue:x1(i.serializer,r._byteString)};if(r instanceof gn){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.Au(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:Sp(r.firestore._databaseId||i.databaseId,r._key.path)}}throw i.Au(`Unsupported field value: ${$p(r)}`)}(t,e)}function oE(t,e){const n={};return t1(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):As(t,(r,i)=>{const s=sE(i,e.Pu(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function aE(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof ht||t instanceof qp||t instanceof ms||t instanceof gn||t instanceof rE)}function cE(t,e,n){if(!aE(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=$p(n);throw r==="an object"?e.Au(t+" a custom object"):e.Au(t+" "+r)}}function zF(t,e,n){if((e=Io(e))instanceof Bp)return e._internalPath;if(typeof e=="string")return lE(t,e);throw sl("Field path arguments must be of type string or ",t,!1,void 0,n)}const WF=new RegExp("[~\\*/\\[\\]]");function lE(t,e,n){if(e.search(WF)>=0)throw sl(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Bp(...e.split("."))._internalPath}catch{throw sl(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function sl(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(s||o)&&(c+=" (found",s&&(c+=` in field ${r}`),o&&(c+=` in document ${i}`),c+=")"),new se(j.INVALID_ARGUMENT,a+t+c)}function KF(t,e){return t.some(n=>n.isEqual(e))}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class uE{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new gn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new GF(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(fE("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class GF extends uE{data(){return super.data()}}function fE(t,e){return typeof e=="string"?lE(t,e):e instanceof Bp?e._internalPath:e._delegate._internalPath}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function YF(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new se(j.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class QF{convertValue(e,n="none"){switch(Ci(e)){case 0:return null;case 1:return e.booleanValue;case 2:return ot(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Ai(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw he()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return As(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertGeoPoint(e){return new qp(ot(e.latitude),ot(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=wp(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Vo(e));default:return null}}convertTimestamp(e){const n=jr(e);return new ht(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=Ge.fromString(e);qe(D1(r));const i=new Fo(r.get(1),r.get(3)),s=new ce(r.popFirst(5));return i.isEqual(n)||ir(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function XF(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Va{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class JF extends uE{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new uc(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(fE("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class uc extends JF{data(e={}){return super.data(e)}}class ZF{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Va(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new uc(this._firestore,this._userDataWriter,r.key,r,new Va(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new se(j.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>{const c=new uc(i._firestore,i._userDataWriter,a.doc.key,a.doc,new Va(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:c,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const c=new uc(i._firestore,i._userDataWriter,a.doc.key,a.doc,new Va(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let l=-1,u=-1;return a.type!==0&&(l=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),u=o.indexOf(a.doc.key)),{type:e$(a.type),doc:c,oldIndex:l,newIndex:u}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function e$(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return he()}}class t$ extends QF{constructor(e){super(),this.firestore=e}convertBytes(e){return new ms(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new gn(this.firestore,null,n)}}function n$(t){t=Uo(t,pu);const e=Uo(t.firestore,jp),n=tE(e),r=new t$(e);return YF(t._query),VF(n,t._query).then(i=>new ZF(e,r,t,i))}function hE(t,e,n){t=Uo(t,gn);const r=Uo(t.firestore,jp),i=XF(t.converter,e,n);return r$(r,[HF(qF(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,Jn.none())])}function r$(t,e){return function(r,i){const s=new Dr;return r.asyncQueue.enqueueAndForget(async()=>bF(await NF(r),i,s)),s.promise}(tE(t),e)}(function(e,n=!0){(function(i){Is=i})(D9),zc(new Ao("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new jp(new e5(r.getProvider("auth-internal")),new i5(r.getProvider("app-check-internal")),function(l,u){if(!Object.prototype.hasOwnProperty.apply(l.options,["projectId"]))throw new se(j.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Fo(l.options.projectId,u)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),rs(Ty,"4.1.2",e),rs(Ty,"4.1.2","esm2017")})();const i$={components:{SOLogo:H_},data(){return{fullName:"",universityId:"",phoneNumber:"",email:"",faculty:"",department:"",batch:"",showMessage:!1}},methods:{closeMessage(){this.showMessage=!1},async submitForm(){console.log("formRan"),jl({apiKey:"AIzaSyBMOiTpc_PPERG4ZhPbTQIZ8uAHnNzsKos",authDomain:"speech-olympiad.firebaseapp.com",projectId:"speech-olympiad",storageBucket:"speech-olympiad.appspot.com",messagingSenderId:"718732602589",appId:"1:718732602589:web:d2b3a682106d06fc773f34",measurementId:"G-T1D958J5EE"});const e=Up(),n=eE(Lp(e,"registrations")),r={fullName:this.fullName,universityId:this.universityId,phoneNumber:this.phoneNumber,email:this.email,faculty:this.faculty,department:this.department,batch:this.batch,time:new Date};console.log("efewf"),await hE(n,r),console.log("efewf");try{this.fullName="",this.universityId="",this.phoneNumber="",this.email="",this.faculty="",this.department="",this.batch="",this.showMessage=!0}catch(i){console.error("Error adding document: ",i)}console.log("efewf")}}},s$={class:"flex items-center justify-center"},o$={class:"rounded-lg mt-12 bg-gray-600 p-2 shadow-md"},a$={class:"flex flex-wrap -mx-3 mb-6"},c$={class:"w-full md:w-1/2 px-3 mb-6 md:mb-0"},l$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-first-name"}," Full Name ",-1),u$={class:"w-full md:w-1/2 px-3"},f$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-last-name"}," University Id ",-1),h$={class:"flex flex-wrap -mx-3 mb-6"},d$={class:"w-full md:w-1/2 px-3 mb-6 md:mb-0"},p$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-first-name"}," Phone Number ",-1),m$={class:"w-full md:w-1/2 px-3"},g$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-last-name"}," Email ",-1),y$={class:"flex flex-wrap -mx-3 mb-2"},v$=Zh('
c
',1),_$={class:"w-full md:w-1/3 px-3 mb-6 md:mb-0"},b$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-city"}," Department ",-1),w$={class:"w-full md:w-1/3 px-3 mb-6 md:mb-0"},E$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-state"}," Batch ",-1),T$={class:"relative"},I$=d("option",null,"2019",-1),A$=d("option",null,"2020",-1),C$=d("option",null,"2021",-1),S$=d("option",null,"2022",-1),x$=[I$,A$,C$,S$],P$=d("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700"},[d("svg",{class:"fill-current h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[d("path",{d:"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"})])],-1),R$=d("br",null,null,-1),O$=d("div",{class:"flex flex-wrap -mx-3 mb-6"},[d("div",{class:"w-full justify-center px-3"},[d("button",{type:"submit",class:"bg-gray-800 w-full hover:bg-gray-900 text-gray-300 border-gray-200 font-bold py-2 px-4 outline-1 rounded focus:outline-none focus:shadow-outline"}," Register ")])],-1),k$={class:"flex justify-center items-center"},D$={key:0,class:"bg-pink-900 w-full rounded-lg p-6 shadow-md"},N$=d("p",{class:"text-white text-lg font-semibold mb-2"},"Success!",-1),M$=d("p",{class:"text-white text-sm"},"Congragulations for taking this step \u{1F973}.",-1);function V$(t,e,n,r,i,s){const o=Qe("SOLogo");return Y(),Z("div",s$,[d("div",o$,[ge(o,{class:"w-24 items-center justify-cente"}),d("form",{class:"w-full max-w-lg",onSubmit:e[6]||(e[6]=DA((...a)=>s.submitForm&&s.submitForm(...a),["prevent"]))},[d("div",a$,[d("div",c$,[l$,Jt(d("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>i.fullName=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-red-300 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-gray-900",id:"grid-first-name",type:"text",placeholder:"Pavan Pitiwaduge"},null,512),[[Dn,i.fullName]])]),d("div",u$,[f$,Jt(d("input",{"onUpdate:modelValue":e[1]||(e[1]=a=>i.universityId=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-last-name",type:"text",placeholder:"210454I"},null,512),[[Dn,i.universityId]])])]),d("div",h$,[d("div",d$,[p$,Jt(d("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>i.phoneNumber=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-gray-900",id:"grid-first-name",type:"mobile",placeholder:"718456734"},null,512),[[Dn,i.phoneNumber]])]),d("div",m$,[g$,Jt(d("input",{"onUpdate:modelValue":e[3]||(e[3]=a=>i.email=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-last-name",type:"email",placeholder:"example@gmail.com"},null,512),[[Dn,i.email]])])]),d("div",y$,[v$,d("div",_$,[b$,Jt(d("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>i.department=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-city",type:"text",placeholder:"CSE"},null,512),[[Dn,i.department]])]),d("div",w$,[E$,d("div",T$,[Jt(d("select",{"onUpdate:modelValue":e[5]||(e[5]=a=>i.batch=a),class:"block appearance-none w-full bg-gray-800 border border-gray-200 text-gray-300 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-state"},x$,512),[[Pf,i.batch]]),P$])])]),R$,O$],32),d("div",k$,[i.showMessage?(Y(),Z("div",D$,[N$,M$,d("button",{onClick:e[7]||(e[7]=(...a)=>s.closeMessage&&s.closeMessage(...a)),class:"mt-4 text-sm text-white underline cursor-pointer focus:outline-none"},"Close")])):ut("",!0)])])])}const F$=He(i$,[["render",V$]]),$$={data(){return{registrations:[]}},methods:{downloadCsvFile(){let t="RegistrationData.csv",e=this.convertJsonToCsv(this.registrations);const n=new Blob([e],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},convertJsonToCsv(t){const e=",",n=Object.keys(t[0]).join(e),r=t.map(s=>Object.values(s).map(o=>typeof o=="string"&&o.includes(e)?`"${o}"`:o).join(e));return[n,...r].join(` +`)}},async mounted(){jl({apiKey:"AIzaSyBMOiTpc_PPERG4ZhPbTQIZ8uAHnNzsKos",authDomain:"speech-olympiad.firebaseapp.com",projectId:"speech-olympiad",storageBucket:"speech-olympiad.appspot.com",messagingSenderId:"718732602589",appId:"1:718732602589:web:d2b3a682106d06fc773f34",measurementId:"G-T1D958J5EE"});const e=Up(),n=await n$(Lp(e,"registrations"));this.registrations=n.docs.map(r=>{const i=r.data();return{id:r.id,fullName:i.fullName,universityId:i.universityId,phoneNumber:i.phoneNumber,email:i.email,faculty:i.faculty,department:i.department,batch:i.batch,time:i.time.toDate()}})}},L$=d("h1",{class:"text-2xl font-semibold mb-4"},"Registrations",-1),j$={class:"overflow-x-auto"},U$={class:"min-w-full border divide-y divide-gray-300"},B$=d("thead",{class:"bg-gray-100 text-black"},[d("tr",null,[d("th",{class:"py-2 px-4"},"Full Name"),d("th",{class:"py-2 px-4"},"University ID"),d("th",{class:"py-2 px-4"},"Email"),d("th",{class:"py-2 px-4"},"Faculty"),d("th",{class:"py-2 px-4"},"Department"),d("th",{class:"py-2 px-4"},"Batch"),d("th",{class:"py-2 px-4"},"Phone Number"),d("th",{class:"py-2 px-4"},"Time")])],-1),q$={class:"py-2 px-4"},H$={class:"py-2 px-4"},z$={class:"py-2 px-4"},W$={class:"py-2 px-4"},K$={class:"py-2 px-4"},G$={class:"py-2 px-4"},Y$={class:"py-2 px-4"},Q$={class:"py-2 px-4"};function X$(t,e,n,r,i,s){return Y(),Z("div",null,[L$,d("button",{class:"bg-gray-500 w-64 m-3 hover:bg-gray-600 text-gray-300 border-gray-200 font-bold py-2 px-4 outline-1 rounded focus:outline-none focus:shadow-outline",onClick:e[0]||(e[0]=(...o)=>s.downloadCsvFile&&s.downloadCsvFile(...o))}," Download Data "),d("div",j$,[d("table",U$,[B$,d("tbody",null,[(Y(!0),Z($e,null,$n(i.registrations,o=>(Y(),Z("tr",{key:o.id},[d("td",q$,Ke(o.fullName),1),d("td",H$,Ke(o.universityId),1),d("td",z$,Ke(o.email),1),d("td",W$,Ke(o.faculty),1),d("td",K$,Ke(o.department),1),d("td",G$,Ke(o.batch),1),d("td",Y$,Ke(o.phoneNumber),1),d("td",Q$,Ke(o.time),1)]))),128))])])])])}const J$=He($$,[["render",X$]]),dE="/assets/dragon1.6691882b.png",pE="/assets/dragon2.50d07c9f.png",Z$="/assets/gavelium2.c1c19a0f.jpg",rv="/assets/SOXVI.c0a933a3.jpg";const eL={data(){return{currentImage:dE}},methods:{switchImage(){setTimeout(()=>{this.currentImage=pE},1500)}},mounted(){this.switchImage()}},tL={class:"w-full"},nL=["src"];function rL(t,e,n,r,i,s){return Y(),Z("div",tL,[(Y(),Z("img",{src:i.currentImage,key:i.currentImage,class:"image"},null,8,nL))])}const mE=He(eL,[["render",rL]]);const iL={name:"AnimatedText",components:{imageAnimation:mE},data(){return{Background:{filename:Z$,alt:"Alt Text for Image"},firstV:!0,secondV:!1,thirdV:!1,fourthV:!1,fifthV:!1,sixthV:!1,seventhV:!1,eightV:!1,fullName:"",universityId:"",phoneNumber:"",email:"",faculty:"",department:"",batch:"",showMessage:!1,fadeAnimation:!1,currentImage:dE,sologo:rv,first:{typedText:"",fullText:"Hi Contestant \u{1F44B}
What is your name?",currentIndex:0},second:{typedText:"",fullText:"Hi, what is your university id? ",currentIndex:0},third:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},fourth:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},fifth:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},sixth:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},seventh:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},eight:{typedText:"",fullText:"Your journey is about to begin \u{1F973}",currentIndex:0}}},methods:{typeText(t){t.currentIndex<=t.fullText.length&&(t.typedText=t.fullText.slice(0,t.currentIndex),t.currentIndex++,setTimeout(()=>this.typeText(t),50))},closeMessage(){this.showMessage=!1},firstB(t){switch(t){case 2:this.firstV=!1,this.secondV=!0,this.second.fullText=this.fullName.split(" ")[1]+", What is your University ID ? \u{1F393}",this.typeText(this.second);break;case 3:this.secondV=!1,this.thirdV=!0,this.third.fullText=this.fullName.split(" ")[1]+", We need your phone number \u260E\uFE0F
(whatsapp preferred)",this.typeText(this.third);break;case 4:this.thirdV=!1,this.fourthV=!0,this.fourth.fullText=" What is your Email \u{1F4E7} ?",this.typeText(this.fourth);break;case 5:this.fourthV=!1,this.fifthV=!0,this.fifth.fullText=this.fullName.split(" ")[1]+", In which faculty do you study ?",this.typeText(this.fifth);break;case 6:this.fifthV=!1,this.sixthV=!0,this.sixth.fullText="What is your department ?",this.typeText(this.sixth);break;case 7:this.sixthV=!1,this.seventhV=!0,this.seventh.fullText="Final question \u{1F62E}\u200D\u{1F4A8}
"+this.fullName.split(" ")[1]+", Select your batch",this.typeText(this.seventh);break;case 8:this.seventhV=!1,this.eightV=!0,this.typeText(this.eight),this.switchImage(),setTimeout(()=>{this.fadeAnimation=!0,this.eight.fullText="Your journey is about to begin \u{1F973}",this.sologo=rv},1500)}},finish(){this.seventhV=!1,this.submitForm(),this.firstB(8)},async submitForm(){console.log("formRan"),jl({apiKey:"AIzaSyBMOiTpc_PPERG4ZhPbTQIZ8uAHnNzsKos",authDomain:"speech-olympiad.firebaseapp.com",projectId:"speech-olympiad",storageBucket:"speech-olympiad.appspot.com",messagingSenderId:"718732602589",appId:"1:718732602589:web:d2b3a682106d06fc773f34",measurementId:"G-T1D958J5EE"});const e=Up(),n=eE(Lp(e,"registrations")),r={fullName:this.fullName,universityId:this.universityId,phoneNumber:this.phoneNumber,email:this.email,faculty:this.faculty,department:this.department,batch:this.batch,time:new Date};console.log("efewf"),await hE(n,r),console.log("efewf");try{this.fullName="",this.universityId="",this.phoneNumber="",this.email="",this.faculty="",this.department="",this.batch="",this.showMessage=!0}catch(i){console.error("Error adding document: ",i)}console.log("efewf")},switchImage(){setTimeout(()=>{this.currentImage=pE},1500)}},mounted(){this.typeText(this.first)}},fr=t=>(ar("data-v-e306ec9e"),t=t(),cr(),t),sL={class:"relative min-h-screen bg-black"},oL=["src","alt"],aL={key:0,class:"absolute md:top-1/2 i top-1/2 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center flex"},cL=["src"],lL={class:"flex flex-col items-center justify-center ml-4 w-1/2"},uL=["innerHTML"],fL=["src"],hL={key:1,class:"absolute md:top-1/3 i top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},dL=["innerHTML"],pL={class:"relative flex items-center mt-4"},mL={key:2,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},gL=["innerHTML"],yL={class:"relative flex items-center mt-4"},vL={key:3,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},_L=["innerHTML"],bL={class:"relative flex items-center mt-4"},wL={key:4,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},EL=["innerHTML"],TL={class:"relative flex items-center mt-4"},IL={key:5,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},AL=["innerHTML"],CL={class:"relative flex items-center mt-4"},SL=fr(()=>d("option",null,"Faculty of Engineering",-1)),xL=fr(()=>d("option",null,"Faculty of Information Technology",-1)),PL=fr(()=>d("option",null,"Faculty of Architecture",-1)),RL=fr(()=>d("option",null,"Faculty of Business",-1)),OL=fr(()=>d("option",null,"Faculty of Medicine",-1)),kL=[SL,xL,PL,RL,OL],DL={key:6,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},NL=["innerHTML"],ML={class:"relative flex items-center mt-4"},VL={key:7,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},FL=["innerHTML"],$L={class:"relative flex items-center mt-4"},LL=fr(()=>d("option",null,"2019",-1)),jL=fr(()=>d("option",null,"2020",-1)),UL=fr(()=>d("option",null,"2021",-1)),BL=fr(()=>d("option",null,"2022",-1)),qL=[LL,jL,UL,BL];function HL(t,e,n,r,i,s){return Y(),Z("div",sL,[d("img",{src:i.Background.filename,alt:i.Background.alt,class:"w-full sm:w-1/2 mx-auto"},null,8,oL),i.eightV?(Y(),Z("div",aL,[ge(Zs,{name:"bon",mode:"out-in"},{default:Rr(()=>[(Y(),Z("img",{src:i.currentImage,key:i.currentImage,class:"image"},null,8,cL))]),_:1}),d("div",lL,[ge(Zs,{name:"bounce",mode:"out-in"},{default:Rr(()=>[i.fadeAnimation?(Y(),Z("p",{class:"text-white text-3xl ml-2",innerHTML:i.eight.fullText,key:i.fadeAnimation},null,8,uL)):ut("",!0)]),_:1}),ge(Zs,{name:"slide-fade",mode:"out-in"},{default:Rr(()=>[i.fadeAnimation?(Y(),Z("img",{src:i.sologo,class:"w-32",key:i.fadeAnimation},null,8,fL)):ut("",!0)]),_:1})])])):ut("",!0),i.firstV?(Y(),Z("div",hL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.first.typedText},null,8,dL),d("div",pL,[Jt(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"text",placeholder:"Enter your full name here","onUpdate:modelValue":e[0]||(e[0]=o=>i.fullName=o),onKeyup:e[1]||(e[1]=Os(o=>s.firstB(2),["enter"]))},null,544),[[Dn,i.fullName]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[2]||(e[2]=o=>s.firstB(2))}," \u2192 ")])])):ut("",!0),i.secondV?(Y(),Z("div",mL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.second.typedText},null,8,gL),d("div",yL,[Jt(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"text",placeholder:"Enter your Uni id here","onUpdate:modelValue":e[3]||(e[3]=o=>i.universityId=o),onKeyup:e[4]||(e[4]=Os(o=>s.firstB(3),["enter"]))},null,544),[[Dn,i.universityId]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[5]||(e[5]=o=>s.firstB(3))}," \u2192 ")])])):ut("",!0),i.thirdV?(Y(),Z("div",vL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.third.typedText},null,8,_L),d("div",bL,[Jt(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"mobile",placeholder:"Enter your mobile number","onUpdate:modelValue":e[6]||(e[6]=o=>i.phoneNumber=o),onKeyup:e[7]||(e[7]=Os(o=>s.firstB(4),["enter"]))},null,544),[[Dn,i.phoneNumber]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[8]||(e[8]=o=>s.firstB(4))}," \u2192 ")])])):ut("",!0),i.fourthV?(Y(),Z("div",wL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.fourth.typedText},null,8,EL),d("div",TL,[Jt(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"email",placeholder:"Enter your email","onUpdate:modelValue":e[9]||(e[9]=o=>i.email=o),onKeyup:e[10]||(e[10]=Os(o=>s.firstB(5),["enter"]))},null,544),[[Dn,i.email]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[11]||(e[11]=o=>s.firstB(5))}," \u2192 ")])])):ut("",!0),i.fifthV?(Y(),Z("div",IL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.fifth.typedText},null,8,AL),d("div",CL,[Jt(d("select",{"onUpdate:modelValue":e[12]||(e[12]=o=>i.faculty=o),class:"block appearance-none w-full border border-gray-200 py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500 placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14",id:"grid-state"},kL,512),[[Pf,i.faculty]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[13]||(e[13]=o=>s.firstB(6))}," \u2192 ")])])):ut("",!0),i.sixthV?(Y(),Z("div",DL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.sixth.typedText},null,8,NL),d("div",ML,[Jt(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"email",placeholder:"Ex : CSE","onUpdate:modelValue":e[14]||(e[14]=o=>i.department=o),onKeyup:e[15]||(e[15]=Os(o=>s.firstB(7),["enter"]))},null,544),[[Dn,i.department]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[16]||(e[16]=o=>s.firstB(7))}," \u2192 ")])])):ut("",!0),i.seventhV?(Y(),Z("div",VL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.seventh.typedText},null,8,FL),d("div",$L,[Jt(d("select",{"onUpdate:modelValue":e[17]||(e[17]=o=>i.batch=o),class:"block appearance-none w-full border border-gray-200 py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500 placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14",id:"grid-state"},qL,512),[[Pf,i.batch]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[18]||(e[18]=(...o)=>s.finish&&s.finish(...o))}," \u2192 ")])])):ut("",!0)])}const zL=He(iL,[["render",HL],["__scopeId","data-v-e306ec9e"]]),WL={"/":tk,"/about":vk,"/champions-story":H4,"/technical-tips":t4,"/gallery":y4,"/blogs":n0,"/form":F$,"/admin":J$,"/form2":zL,"/rr":mE},KL={data(){return{currentPath:window.location.hash}},components:{AppHeader:DS,AppFooter:lS},computed:{currentView(){return window.scrollTo({top:0,behavior:"auto"}),WL["/"+this.currentPath.slice(1)]||b4}},mounted(){window.addEventListener("hashchange",()=>{this.currentPath=window.location.hash})},setup(){vM({projectId:"i32b0q2c",dataset:"production",useCdn:!0},!0)}};function GL(t,e,n,r,i,s){const o=Qe("AppHeader"),a=Qe("AppFooter");return Y(),Z($e,null,[ge(o),(Y(),wl(AI(s.currentView))),ge(a)],64)}const YL=He(KL,[["render",GL]]);const QL=$A(YL);QL.mount("#app");export{th as e}; diff --git a/assets/index.c7b65400.js b/assets/index.c7b65400.js deleted file mode 100644 index 769d176..0000000 --- a/assets/index.c7b65400.js +++ /dev/null @@ -1,2706 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ed(t,e){const n=Object.create(null),r=t.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const je={},ts=[],Dn=()=>{},ST=()=>!1,xT=/^on[^a-z]/,Al=t=>xT.test(t),td=t=>t.startsWith("onUpdate:"),st=Object.assign,nd=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},PT=Object.prototype.hasOwnProperty,Se=(t,e)=>PT.call(t,e),ue=Array.isArray,ns=t=>Xo(t)==="[object Map]",Cl=t=>Xo(t)==="[object Set]",Em=t=>Xo(t)==="[object Date]",_e=t=>typeof t=="function",ot=t=>typeof t=="string",vo=t=>typeof t=="symbol",Fe=t=>t!==null&&typeof t=="object",Pv=t=>Fe(t)&&_e(t.then)&&_e(t.catch),Rv=Object.prototype.toString,Xo=t=>Rv.call(t),RT=t=>Xo(t).slice(8,-1),Ov=t=>Xo(t)==="[object Object]",rd=t=>ot(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ic=ed(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sl=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},OT=/-(\w)/g,Gn=Sl(t=>t.replace(OT,(e,n)=>n?n.toUpperCase():"")),kT=/\B([A-Z])/g,Oi=Sl(t=>t.replace(kT,"-$1").toLowerCase()),xl=Sl(t=>t.charAt(0).toUpperCase()+t.slice(1)),qu=Sl(t=>t?`on${xl(t)}`:""),Oc=(t,e)=>!Object.is(t,e),sc=(t,e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},Dc=t=>{const e=parseFloat(t);return isNaN(e)?t:e},DT=t=>{const e=ot(t)?Number(t):NaN;return isNaN(e)?t:e};let Tm;const Nf=()=>Tm||(Tm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pl(t){if(ue(t)){const e={};for(let n=0;n{if(n){const r=n.split(MT);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Ti(t){let e="";if(ot(t))e=t;else if(ue(t))for(let n=0;nRl(n,e))}const Ye=t=>ot(t)?t:t==null?"":ue(t)||Fe(t)&&(t.toString===Rv||!_e(t.toString))?JSON.stringify(t,Dv,2):String(t),Dv=(t,e)=>e&&e.__v_isRef?Dv(t,e.value):ns(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:Cl(e)?{[`Set(${e.size})`]:[...e.values()]}:Fe(e)&&!ue(e)&&!Ov(e)?String(e):e;let Cn;class BT{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Cn,!e&&Cn&&(this.index=(Cn.scopes||(Cn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Cn;try{return Cn=this,e()}finally{Cn=n}}}on(){Cn=this}off(){Cn=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const e=new Set(t);return e.w=0,e.n=0,e},Nv=t=>(t.w&Fr)>0,Mv=t=>(t.n&Fr)>0,zT=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r{(u==="length"||u>=c)&&a.push(l)})}else switch(n!==void 0&&a.push(o.get(n)),e){case"add":ue(t)?rd(n)&&a.push(o.get("length")):(a.push(o.get(bi)),ns(t)&&a.push(o.get(Ff)));break;case"delete":ue(t)||(a.push(o.get(bi)),ns(t)&&a.push(o.get(Ff)));break;case"set":ns(t)&&a.push(o.get(bi));break}if(a.length===1)a[0]&&$f(a[0]);else{const c=[];for(const l of a)l&&c.push(...l);$f(id(c))}}function $f(t,e){const n=ue(t)?t:[...t];for(const r of n)r.computed&&Am(r);for(const r of n)r.computed||Am(r)}function Am(t,e){(t!==xn||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const KT=ed("__proto__,__v_isRef,__isVue"),$v=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(vo)),GT=od(),YT=od(!1,!0),QT=od(!0),Cm=XT();function XT(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Re(this);for(let s=0,o=this.length;s{t[e]=function(...n){Ts();const r=Re(this)[e].apply(this,n);return Is(),r}}),t}function JT(t){const e=Re(this);return nn(e,"has",t),e.hasOwnProperty(t)}function od(t=!1,e=!1){return function(r,i,s){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&s===(t?e?pI:qv:e?Bv:Uv).get(r))return r;const o=ue(r);if(!t){if(o&&Se(Cm,i))return Reflect.get(Cm,i,s);if(i==="hasOwnProperty")return JT}const a=Reflect.get(r,i,s);return(vo(i)?$v.has(i):KT(i))||(t||nn(r,"get",i),e)?a:Yt(a)?o&&rd(i)?a:a.value:Fe(a)?t?Hv(a):kl(a):a}}const ZT=Lv(),eI=Lv(!0);function Lv(t=!1){return function(n,r,i,s){let o=n[r];if(_o(o)&&Yt(o)&&!Yt(i))return!1;if(!t&&(!Lf(i)&&!_o(i)&&(o=Re(o),i=Re(i)),!ue(n)&&Yt(o)&&!Yt(i)))return o.value=i,!0;const a=ue(n)&&rd(r)?Number(r)t,Ol=t=>Reflect.getPrototypeOf(t);function xa(t,e,n=!1,r=!1){t=t.__v_raw;const i=Re(t),s=Re(e);n||(e!==s&&nn(i,"get",e),nn(i,"get",s));const{has:o}=Ol(i),a=r?ad:n?fd:ud;if(o.call(i,e))return a(t.get(e));if(o.call(i,s))return a(t.get(s));t!==i&&t.get(e)}function Pa(t,e=!1){const n=this.__v_raw,r=Re(n),i=Re(t);return e||(t!==i&&nn(r,"has",t),nn(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function Ra(t,e=!1){return t=t.__v_raw,!e&&nn(Re(t),"iterate",bi),Reflect.get(t,"size",t)}function Sm(t){t=Re(t);const e=Re(this);return Ol(e).has.call(e,t)||(e.add(t),ir(e,"add",t,t)),this}function xm(t,e){e=Re(e);const n=Re(this),{has:r,get:i}=Ol(n);let s=r.call(n,t);s||(t=Re(t),s=r.call(n,t));const o=i.call(n,t);return n.set(t,e),s?Oc(e,o)&&ir(n,"set",t,e):ir(n,"add",t,e),this}function Pm(t){const e=Re(this),{has:n,get:r}=Ol(e);let i=n.call(e,t);i||(t=Re(t),i=n.call(e,t)),r&&r.call(e,t);const s=e.delete(t);return i&&ir(e,"delete",t,void 0),s}function Rm(){const t=Re(this),e=t.size!==0,n=t.clear();return e&&ir(t,"clear",void 0,void 0),n}function Oa(t,e){return function(r,i){const s=this,o=s.__v_raw,a=Re(o),c=e?ad:t?fd:ud;return!t&&nn(a,"iterate",bi),o.forEach((l,u)=>r.call(i,c(l),c(u),s))}}function ka(t,e,n){return function(...r){const i=this.__v_raw,s=Re(i),o=ns(s),a=t==="entries"||t===Symbol.iterator&&o,c=t==="keys"&&o,l=i[t](...r),u=n?ad:e?fd:ud;return!e&&nn(s,"iterate",c?Ff:bi),{next(){const{value:f,done:h}=l.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function vr(t){return function(...e){return t==="delete"?!1:this}}function oI(){const t={get(s){return xa(this,s)},get size(){return Ra(this)},has:Pa,add:Sm,set:xm,delete:Pm,clear:Rm,forEach:Oa(!1,!1)},e={get(s){return xa(this,s,!1,!0)},get size(){return Ra(this)},has:Pa,add:Sm,set:xm,delete:Pm,clear:Rm,forEach:Oa(!1,!0)},n={get(s){return xa(this,s,!0)},get size(){return Ra(this,!0)},has(s){return Pa.call(this,s,!0)},add:vr("add"),set:vr("set"),delete:vr("delete"),clear:vr("clear"),forEach:Oa(!0,!1)},r={get(s){return xa(this,s,!0,!0)},get size(){return Ra(this,!0)},has(s){return Pa.call(this,s,!0)},add:vr("add"),set:vr("set"),delete:vr("delete"),clear:vr("clear"),forEach:Oa(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=ka(s,!1,!1),n[s]=ka(s,!0,!1),e[s]=ka(s,!1,!0),r[s]=ka(s,!0,!0)}),[t,n,e,r]}const[aI,cI,lI,uI]=oI();function cd(t,e){const n=e?t?uI:lI:t?cI:aI;return(r,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?r:Reflect.get(Se(n,i)&&i in r?n:r,i,s)}const fI={get:cd(!1,!1)},hI={get:cd(!1,!0)},dI={get:cd(!0,!1)},Uv=new WeakMap,Bv=new WeakMap,qv=new WeakMap,pI=new WeakMap;function mI(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gI(t){return t.__v_skip||!Object.isExtensible(t)?0:mI(RT(t))}function kl(t){return _o(t)?t:ld(t,!1,jv,fI,Uv)}function yI(t){return ld(t,!1,sI,hI,Bv)}function Hv(t){return ld(t,!0,iI,dI,qv)}function ld(t,e,n,r,i){if(!Fe(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=i.get(t);if(s)return s;const o=gI(t);if(o===0)return t;const a=new Proxy(t,o===2?r:n);return i.set(t,a),a}function rs(t){return _o(t)?rs(t.__v_raw):!!(t&&t.__v_isReactive)}function _o(t){return!!(t&&t.__v_isReadonly)}function Lf(t){return!!(t&&t.__v_isShallow)}function zv(t){return rs(t)||_o(t)}function Re(t){const e=t&&t.__v_raw;return e?Re(e):t}function Wv(t){return kc(t,"__v_skip",!0),t}const ud=t=>Fe(t)?kl(t):t,fd=t=>Fe(t)?Hv(t):t;function vI(t){Rr&&xn&&(t=Re(t),Fv(t.dep||(t.dep=id())))}function _I(t,e){t=Re(t);const n=t.dep;n&&$f(n)}function Yt(t){return!!(t&&t.__v_isRef===!0)}function bI(t){return Yt(t)?t.value:t}const wI={get:(t,e,n)=>bI(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const i=t[e];return Yt(i)&&!Yt(n)?(i.value=n,!0):Reflect.set(t,e,n,r)}};function Kv(t){return rs(t)?t:new Proxy(t,wI)}class EI{constructor(e,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new sd(e,()=>{this._dirty||(this._dirty=!0,_I(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const e=Re(this);return vI(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function TI(t,e,n=!1){let r,i;const s=_e(t);return s?(r=t,i=Dn):(r=t.get,i=t.set),new EI(r,i,s||!i,n)}function Or(t,e,n,r){let i;try{i=r?t(...r):t()}catch(s){Dl(s,e,n)}return i}function gn(t,e,n,r){if(_e(t)){const s=Or(t,e,n,r);return s&&Pv(s)&&s.catch(o=>{Dl(o,e,n)}),s}const i=[];for(let s=0;s>>1;wo(Lt[r])$n&&Lt.splice(e,1)}function xI(t){ue(t)?is.push(...t):(!er||!er.includes(t,t.allowRecurse?ui+1:ui))&&is.push(t),Yv()}function Om(t,e=bo?$n+1:0){for(;ewo(n)-wo(r)),ui=0;uit.id==null?1/0:t.id,PI=(t,e)=>{const n=wo(t)-wo(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function Xv(t){jf=!1,bo=!0,Lt.sort(PI);const e=Dn;try{for($n=0;$not(m)?m.trim():m)),f&&(i=n.map(Dc))}let a,c=r[a=qu(e)]||r[a=qu(Gn(e))];!c&&s&&(c=r[a=qu(Oi(e))]),c&&gn(c,t,6,i);const l=r[a+"Once"];if(l){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,gn(l,t,6,i)}}function Jv(t,e,n=!1){const r=e.emitsCache,i=r.get(t);if(i!==void 0)return i;const s=t.emits;let o={},a=!1;if(!_e(t)){const c=l=>{const u=Jv(l,e,!0);u&&(a=!0,st(o,u))};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}return!s&&!a?(Fe(t)&&r.set(t,null),null):(ue(s)?s.forEach(c=>o[c]=null):st(o,s),Fe(t)&&r.set(t,o),o)}function Nl(t,e){return!t||!Al(e)?!1:(e=e.slice(2).replace(/Once$/,""),Se(t,e[0].toLowerCase()+e.slice(1))||Se(t,Oi(e))||Se(t,e))}let Dt=null,Ml=null;function Nc(t){const e=Dt;return Dt=t,Ml=t&&t.type.__scopeId||null,e}function hr(t){Ml=t}function dr(){Ml=null}function kr(t,e=Dt,n){if(!e||t._n)return t;const r=(...i)=>{r._d&&qm(-1);const s=Nc(e);let o;try{o=t(...i)}finally{Nc(s),r._d&&qm(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Hu(t){const{type:e,vnode:n,proxy:r,withProxy:i,props:s,propsOptions:[o],slots:a,attrs:c,emit:l,render:u,renderCache:f,data:h,setupState:m,ctx:P,inheritAttrs:v}=t;let A,E;const C=Nc(t);try{if(n.shapeFlag&4){const F=i||r;A=Fn(u.call(F,F,f,s,m,h,P)),E=c}else{const F=e;A=Fn(F.length>1?F(s,{attrs:c,slots:a,emit:l}):F(s,null)),E=e.props?c:OI(c)}}catch(F){io.length=0,Dl(F,t,1),A=ye(yn)}let D=A;if(E&&v!==!1){const F=Object.keys(E),{shapeFlag:G}=D;F.length&&G&7&&(o&&F.some(td)&&(E=kI(E,o)),D=$r(D,E))}return n.dirs&&(D=$r(D),D.dirs=D.dirs?D.dirs.concat(n.dirs):n.dirs),n.transition&&(D.transition=n.transition),A=D,Nc(C),A}const OI=t=>{let e;for(const n in t)(n==="class"||n==="style"||Al(n))&&((e||(e={}))[n]=t[n]);return e},kI=(t,e)=>{const n={};for(const r in t)(!td(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function DI(t,e,n){const{props:r,children:i,component:s}=t,{props:o,children:a,patchFlag:c}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?km(r,o,l):!!o;if(c&8){const u=e.dynamicProps;for(let f=0;ft.__isSuspense;function VI(t,e){e&&e.pendingBranch?ue(t)?e.effects.push(...t):e.effects.push(t):xI(t)}const Da={};function oc(t,e,n){return Zv(t,e,n)}function Zv(t,e,{immediate:n,deep:r,flush:i,onTrack:s,onTrigger:o}=je){var a;const c=HT()===((a=At)==null?void 0:a.scope)?At:null;let l,u=!1,f=!1;if(Yt(t)?(l=()=>t.value,u=Lf(t)):rs(t)?(l=()=>t,r=!0):ue(t)?(f=!0,u=t.some(F=>rs(F)||Lf(F)),l=()=>t.map(F=>{if(Yt(F))return F.value;if(rs(F))return pi(F);if(_e(F))return Or(F,c,2)})):_e(t)?e?l=()=>Or(t,c,2):l=()=>{if(!(c&&c.isUnmounted))return h&&h(),gn(t,c,3,[m])}:l=Dn,e&&r){const F=l;l=()=>pi(F())}let h,m=F=>{h=C.onStop=()=>{Or(F,c,4)}},P;if(Ao)if(m=Dn,e?n&&gn(e,c,3,[l(),f?[]:void 0,m]):l(),i==="sync"){const F=SA();P=F.__watcherHandles||(F.__watcherHandles=[])}else return Dn;let v=f?new Array(t.length).fill(Da):Da;const A=()=>{if(!!C.active)if(e){const F=C.run();(r||u||(f?F.some((G,se)=>Oc(G,v[se])):Oc(F,v)))&&(h&&h(),gn(e,c,3,[F,v===Da?void 0:f&&v[0]===Da?[]:v,m]),v=F)}else C.run()};A.allowRecurse=!!e;let E;i==="sync"?E=A:i==="post"?E=()=>en(A,c&&c.suspense):(A.pre=!0,c&&(A.id=c.uid),E=()=>dd(A));const C=new sd(l,E);e?n?A():v=C.run():i==="post"?en(C.run.bind(C),c&&c.suspense):C.run();const D=()=>{C.stop(),c&&c.scope&&nd(c.scope.effects,C)};return P&&P.push(D),D}function FI(t,e,n){const r=this.proxy,i=ot(t)?t.includes(".")?e_(r,t):()=>r[t]:t.bind(r,r);let s;_e(e)?s=e:(s=e.handler,n=e);const o=At;ds(this);const a=Zv(i,s.bind(r),n);return o?ds(o):wi(),a}function e_(t,e){const n=e.split(".");return()=>{let r=t;for(let i=0;i{pi(n,e)});else if(Ov(t))for(const n in t)pi(t[n],e);return t}function tn(t,e){const n=Dt;if(n===null)return t;const r=Bl(n)||n.proxy,i=t.dirs||(t.dirs=[]);for(let s=0;s{t.isMounted=!0}),a_(()=>{t.isUnmounting=!0}),t}const hn=[Function,Array],n_={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hn,onEnter:hn,onAfterEnter:hn,onEnterCancelled:hn,onBeforeLeave:hn,onLeave:hn,onAfterLeave:hn,onLeaveCancelled:hn,onBeforeAppear:hn,onAppear:hn,onAfterAppear:hn,onAppearCancelled:hn},$I={name:"BaseTransition",props:n_,setup(t,{slots:e}){const n=bd(),r=t_();let i;return()=>{const s=e.default&&pd(e.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const v of s)if(v.type!==yn){o=v;break}}const a=Re(t),{mode:c}=a;if(r.isLeaving)return zu(o);const l=Dm(o);if(!l)return zu(o);const u=Eo(l,a,r,n);To(l,u);const f=n.subTree,h=f&&Dm(f);let m=!1;const{getTransitionKey:P}=l.type;if(P){const v=P();i===void 0?i=v:v!==i&&(i=v,m=!0)}if(h&&h.type!==yn&&(!fi(l,h)||m)){const v=Eo(h,a,r,n);if(To(h,v),c==="out-in")return r.isLeaving=!0,v.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},zu(o);c==="in-out"&&l.type!==yn&&(v.delayLeave=(A,E,C)=>{const D=r_(r,h);D[String(h.key)]=h,A._leaveCb=()=>{E(),A._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=C})}return o}}},LI=$I;function r_(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function Eo(t,e,n,r){const{appear:i,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:f,onLeave:h,onAfterLeave:m,onLeaveCancelled:P,onBeforeAppear:v,onAppear:A,onAfterAppear:E,onAppearCancelled:C}=e,D=String(t.key),F=r_(n,t),G=(te,Z)=>{te&&gn(te,r,9,Z)},se=(te,Z)=>{const oe=Z[1];G(te,Z),ue(te)?te.every(O=>O.length<=1)&&oe():te.length<=1&&oe()},ge={mode:s,persisted:o,beforeEnter(te){let Z=a;if(!n.isMounted)if(i)Z=v||a;else return;te._leaveCb&&te._leaveCb(!0);const oe=F[D];oe&&fi(t,oe)&&oe.el._leaveCb&&oe.el._leaveCb(),G(Z,[te])},enter(te){let Z=c,oe=l,O=u;if(!n.isMounted)if(i)Z=A||c,oe=E||l,O=C||u;else return;let w=!1;const N=te._enterCb=R=>{w||(w=!0,R?G(O,[te]):G(oe,[te]),ge.delayedLeave&&ge.delayedLeave(),te._enterCb=void 0)};Z?se(Z,[te,N]):N()},leave(te,Z){const oe=String(t.key);if(te._enterCb&&te._enterCb(!0),n.isUnmounting)return Z();G(f,[te]);let O=!1;const w=te._leaveCb=N=>{O||(O=!0,Z(),N?G(P,[te]):G(m,[te]),te._leaveCb=void 0,F[oe]===t&&delete F[oe])};F[oe]=t,h?se(h,[te,w]):w()},clone(te){return Eo(te,e,n,r)}};return ge}function zu(t){if(Fl(t))return t=$r(t),t.children=null,t}function Dm(t){return Fl(t)?t.children?t.children[0]:void 0:t}function To(t,e){t.shapeFlag&6&&t.component?To(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function pd(t,e=!1,n){let r=[],i=0;for(let s=0;s1)for(let s=0;sst({name:t.name},e,{setup:t}))():t}const no=t=>!!t.type.__asyncLoader,Fl=t=>t.type.__isKeepAlive;function jI(t,e){i_(t,"a",e)}function UI(t,e){i_(t,"da",e)}function i_(t,e,n=At){const r=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if($l(e,r,n),n){let i=n.parent;for(;i&&i.parent;)Fl(i.parent.vnode)&&BI(r,e,n,i),i=i.parent}}function BI(t,e,n,r){const i=$l(e,t,r,!0);c_(()=>{nd(r[e],i)},n)}function $l(t,e,n=At,r=!1){if(n){const i=n[t]||(n[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(n.isUnmounted)return;Ts(),ds(n);const a=gn(e,n,t,o);return wi(),Is(),a});return r?i.unshift(s):i.push(s),s}}const pr=t=>(e,n=At)=>(!Ao||t==="sp")&&$l(t,(...r)=>e(...r),n),qI=pr("bm"),s_=pr("m"),HI=pr("bu"),o_=pr("u"),a_=pr("bum"),c_=pr("um"),zI=pr("sp"),WI=pr("rtg"),KI=pr("rtc");function GI(t,e=At){$l("ec",t,e)}const md="components";function Je(t,e){return u_(md,t,!0,e)||t}const l_=Symbol.for("v-ndc");function YI(t){return ot(t)?u_(md,t,!1)||t:t||l_}function u_(t,e,n=!0,r=!1){const i=Dt||At;if(i){const s=i.type;if(t===md){const a=IA(s,!1);if(a&&(a===e||a===Gn(e)||a===xl(Gn(e))))return s}const o=Nm(i[t]||s[t],e)||Nm(i.appContext[t],e);return!o&&r?s:o}}function Nm(t,e){return t&&(t[e]||t[Gn(e)]||t[xl(Gn(e))])}function Hn(t,e,n,r){let i;const s=n&&n[r];if(ue(t)||ot(t)){i=new Array(t.length);for(let o=0,a=t.length;oe(o,a,void 0,s&&s[a]));else{const o=Object.keys(t);i=new Array(o.length);for(let a=0,c=o.length;aFc(e)?!(e.type===yn||e.type===Ve&&!h_(e.children)):!0)?t:null}const Uf=t=>t?T_(t)?Bl(t)||t.proxy:Uf(t.parent):null,ro=st(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Uf(t.parent),$root:t=>Uf(t.root),$emit:t=>t.emit,$options:t=>gd(t),$forceUpdate:t=>t.f||(t.f=()=>dd(t.update)),$nextTick:t=>t.n||(t.n=AI.bind(t.proxy)),$watch:t=>FI.bind(t)}),Wu=(t,e)=>t!==je&&!t.__isScriptSetup&&Se(t,e),QI={get({_:t},e){const{ctx:n,setupState:r,data:i,props:s,accessCache:o,type:a,appContext:c}=t;let l;if(e[0]!=="$"){const m=o[e];if(m!==void 0)switch(m){case 1:return r[e];case 2:return i[e];case 4:return n[e];case 3:return s[e]}else{if(Wu(r,e))return o[e]=1,r[e];if(i!==je&&Se(i,e))return o[e]=2,i[e];if((l=t.propsOptions[0])&&Se(l,e))return o[e]=3,s[e];if(n!==je&&Se(n,e))return o[e]=4,n[e];Bf&&(o[e]=0)}}const u=ro[e];let f,h;if(u)return e==="$attrs"&&nn(t,"get",e),u(t);if((f=a.__cssModules)&&(f=f[e]))return f;if(n!==je&&Se(n,e))return o[e]=4,n[e];if(h=c.config.globalProperties,Se(h,e))return h[e]},set({_:t},e,n){const{data:r,setupState:i,ctx:s}=t;return Wu(i,e)?(i[e]=n,!0):r!==je&&Se(r,e)?(r[e]=n,!0):Se(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:i,propsOptions:s}},o){let a;return!!n[o]||t!==je&&Se(t,o)||Wu(e,o)||(a=s[0])&&Se(a,o)||Se(r,o)||Se(ro,o)||Se(i.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Se(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function Mm(t){return ue(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Bf=!0;function XI(t){const e=gd(t),n=t.proxy,r=t.ctx;Bf=!1,e.beforeCreate&&Vm(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:o,watch:a,provide:c,inject:l,created:u,beforeMount:f,mounted:h,beforeUpdate:m,updated:P,activated:v,deactivated:A,beforeDestroy:E,beforeUnmount:C,destroyed:D,unmounted:F,render:G,renderTracked:se,renderTriggered:ge,errorCaptured:te,serverPrefetch:Z,expose:oe,inheritAttrs:O,components:w,directives:N,filters:R}=e;if(l&&JI(l,r,null),o)for(const re in o){const ce=o[re];_e(ce)&&(r[re]=ce.bind(n))}if(i){const re=i.call(n,n);Fe(re)&&(t.data=kl(re))}if(Bf=!0,s)for(const re in s){const ce=s[re],Ne=_e(ce)?ce.bind(n,n):_e(ce.get)?ce.get.bind(n,n):Dn,We=!_e(ce)&&_e(ce.set)?ce.set.bind(n):Dn,xe=dn({get:Ne,set:We});Object.defineProperty(r,re,{enumerable:!0,configurable:!0,get:()=>xe.value,set:$e=>xe.value=$e})}if(a)for(const re in a)d_(a[re],r,n,re);if(c){const re=_e(c)?c.call(n):c;Reflect.ownKeys(re).forEach(ce=>{zs(ce,re[ce])})}u&&Vm(u,t,"c");function W(re,ce){ue(ce)?ce.forEach(Ne=>re(Ne.bind(n))):ce&&re(ce.bind(n))}if(W(qI,f),W(s_,h),W(HI,m),W(o_,P),W(jI,v),W(UI,A),W(GI,te),W(KI,se),W(WI,ge),W(a_,C),W(c_,F),W(zI,Z),ue(oe))if(oe.length){const re=t.exposed||(t.exposed={});oe.forEach(ce=>{Object.defineProperty(re,ce,{get:()=>n[ce],set:Ne=>n[ce]=Ne})})}else t.exposed||(t.exposed={});G&&t.render===Dn&&(t.render=G),O!=null&&(t.inheritAttrs=O),w&&(t.components=w),N&&(t.directives=N)}function JI(t,e,n=Dn){ue(t)&&(t=qf(t));for(const r in t){const i=t[r];let s;Fe(i)?"default"in i?s=ac(i.from||r,i.default,!0):s=ac(i.from||r):s=ac(i),Yt(s)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[r]=s}}function Vm(t,e,n){gn(ue(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function d_(t,e,n,r){const i=r.includes(".")?e_(n,r):()=>n[r];if(ot(t)){const s=e[t];_e(s)&&oc(i,s)}else if(_e(t))oc(i,t.bind(n));else if(Fe(t))if(ue(t))t.forEach(s=>d_(s,e,n,r));else{const s=_e(t.handler)?t.handler.bind(n):e[t.handler];_e(s)&&oc(i,s,t)}}function gd(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,a=s.get(e);let c;return a?c=a:!i.length&&!n&&!r?c=e:(c={},i.length&&i.forEach(l=>Mc(c,l,o,!0)),Mc(c,e,o)),Fe(e)&&s.set(e,c),c}function Mc(t,e,n,r=!1){const{mixins:i,extends:s}=e;s&&Mc(t,s,n,!0),i&&i.forEach(o=>Mc(t,o,n,!0));for(const o in e)if(!(r&&o==="expose")){const a=ZI[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const ZI={data:Fm,props:$m,emits:$m,methods:Hs,computed:Hs,beforeCreate:Gt,created:Gt,beforeMount:Gt,mounted:Gt,beforeUpdate:Gt,updated:Gt,beforeDestroy:Gt,beforeUnmount:Gt,destroyed:Gt,unmounted:Gt,activated:Gt,deactivated:Gt,errorCaptured:Gt,serverPrefetch:Gt,components:Hs,directives:Hs,watch:tA,provide:Fm,inject:eA};function Fm(t,e){return e?t?function(){return st(_e(t)?t.call(this,this):t,_e(e)?e.call(this,this):e)}:e:t}function eA(t,e){return Hs(qf(t),qf(e))}function qf(t){if(ue(t)){const e={};for(let n=0;n1)return n&&_e(e)?e.call(r&&r.proxy):e}}function iA(t,e,n,r=!1){const i={},s={};kc(s,Ul,1),t.propsDefaults=Object.create(null),m_(t,e,i,s);for(const o in t.propsOptions[0])o in i||(i[o]=void 0);n?t.props=r?i:yI(i):t.type.props?t.props=i:t.props=s,t.attrs=s}function sA(t,e,n,r){const{props:i,attrs:s,vnode:{patchFlag:o}}=t,a=Re(i),[c]=t.propsOptions;let l=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,m]=g_(f,e,!0);st(o,h),m&&a.push(...m)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!s&&!c)return Fe(t)&&r.set(t,ts),ts;if(ue(s))for(let u=0;u-1,m[1]=v<0||P-1||Se(m,"default"))&&a.push(f)}}}const l=[o,a];return Fe(t)&&r.set(t,l),l}function Lm(t){return t[0]!=="$"}function jm(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function Um(t,e){return jm(t)===jm(e)}function Bm(t,e){return ue(e)?e.findIndex(n=>Um(n,t)):_e(e)&&Um(e,t)?0:-1}const y_=t=>t[0]==="_"||t==="$stable",yd=t=>ue(t)?t.map(Fn):[Fn(t)],oA=(t,e,n)=>{if(e._n)return e;const r=kr((...i)=>yd(e(...i)),n);return r._c=!1,r},v_=(t,e,n)=>{const r=t._ctx;for(const i in t){if(y_(i))continue;const s=t[i];if(_e(s))e[i]=oA(i,s,r);else if(s!=null){const o=yd(s);e[i]=()=>o}}},__=(t,e)=>{const n=yd(e);t.slots.default=()=>n},aA=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=Re(e),kc(e,"_",n)):v_(e,t.slots={})}else t.slots={},e&&__(t,e);kc(t.slots,Ul,1)},cA=(t,e,n)=>{const{vnode:r,slots:i}=t;let s=!0,o=je;if(r.shapeFlag&32){const a=e._;a?n&&a===1?s=!1:(st(i,e),!n&&a===1&&delete i._):(s=!e.$stable,v_(e,i)),o=e}else e&&(__(t,e),o={default:1});if(s)for(const a in i)!y_(a)&&!(a in o)&&delete i[a]};function zf(t,e,n,r,i=!1){if(ue(t)){t.forEach((h,m)=>zf(h,e&&(ue(e)?e[m]:e),n,r,i));return}if(no(r)&&!i)return;const s=r.shapeFlag&4?Bl(r.component)||r.component.proxy:r.el,o=i?null:s,{i:a,r:c}=t,l=e&&e.r,u=a.refs===je?a.refs={}:a.refs,f=a.setupState;if(l!=null&&l!==c&&(ot(l)?(u[l]=null,Se(f,l)&&(f[l]=null)):Yt(l)&&(l.value=null)),_e(c))Or(c,a,12,[o,u]);else{const h=ot(c),m=Yt(c);if(h||m){const P=()=>{if(t.f){const v=h?Se(f,c)?f[c]:u[c]:c.value;i?ue(v)&&nd(v,s):ue(v)?v.includes(s)||v.push(s):h?(u[c]=[s],Se(f,c)&&(f[c]=u[c])):(c.value=[s],t.k&&(u[t.k]=c.value))}else h?(u[c]=o,Se(f,c)&&(f[c]=o)):m&&(c.value=o,t.k&&(u[t.k]=o))};o?(P.id=-1,en(P,n)):P()}}}const en=VI;function lA(t){return uA(t)}function uA(t,e){const n=Nf();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:o,createText:a,createComment:c,setText:l,setElementText:u,parentNode:f,nextSibling:h,setScopeId:m=Dn,insertStaticContent:P}=t,v=(y,b,M,$=null,g=null,I=null,k=!1,T=null,V=!!b.dynamicChildren)=>{if(y===b)return;y&&!fi(y,b)&&($=_n(y),$e(y,g,I,!0),y=null),b.patchFlag===-2&&(V=!1,b.dynamicChildren=null);const{type:S,ref:L,shapeFlag:U}=b;switch(S){case Ll:A(y,b,M,$);break;case yn:E(y,b,M,$);break;case cc:y==null&&C(b,M,$,k);break;case Ve:w(y,b,M,$,g,I,k,T,V);break;default:U&1?G(y,b,M,$,g,I,k,T,V):U&6?N(y,b,M,$,g,I,k,T,V):(U&64||U&128)&&S.process(y,b,M,$,g,I,k,T,V,pt)}L!=null&&g&&zf(L,y&&y.ref,I,b||y,!b)},A=(y,b,M,$)=>{if(y==null)r(b.el=a(b.children),M,$);else{const g=b.el=y.el;b.children!==y.children&&l(g,b.children)}},E=(y,b,M,$)=>{y==null?r(b.el=c(b.children||""),M,$):b.el=y.el},C=(y,b,M,$)=>{[y.el,y.anchor]=P(y.children,b,M,$,y.el,y.anchor)},D=({el:y,anchor:b},M,$)=>{let g;for(;y&&y!==b;)g=h(y),r(y,M,$),y=g;r(b,M,$)},F=({el:y,anchor:b})=>{let M;for(;y&&y!==b;)M=h(y),i(y),y=M;i(b)},G=(y,b,M,$,g,I,k,T,V)=>{k=k||b.type==="svg",y==null?se(b,M,$,g,I,k,T,V):Z(y,b,g,I,k,T,V)},se=(y,b,M,$,g,I,k,T)=>{let V,S;const{type:L,props:U,shapeFlag:B,transition:H,dirs:X}=y;if(V=y.el=o(y.type,I,U&&U.is,U),B&8?u(V,y.children):B&16&&te(y.children,V,null,$,g,I&&L!=="foreignObject",k,T),X&&Xr(y,null,$,"created"),ge(V,y,y.scopeId,k,$),U){for(const ae in U)ae!=="value"&&!ic(ae)&&s(V,ae,null,U[ae],I,y.children,$,g,et);"value"in U&&s(V,"value",null,U.value),(S=U.onVnodeBeforeMount)&&Vn(S,$,y)}X&&Xr(y,null,$,"beforeMount");const K=(!g||g&&!g.pendingBranch)&&H&&!H.persisted;K&&H.beforeEnter(V),r(V,b,M),((S=U&&U.onVnodeMounted)||K||X)&&en(()=>{S&&Vn(S,$,y),K&&H.enter(V),X&&Xr(y,null,$,"mounted")},g)},ge=(y,b,M,$,g)=>{if(M&&m(y,M),$)for(let I=0;I<$.length;I++)m(y,$[I]);if(g){let I=g.subTree;if(b===I){const k=g.vnode;ge(y,k,k.scopeId,k.slotScopeIds,g.parent)}}},te=(y,b,M,$,g,I,k,T,V=0)=>{for(let S=V;S{const T=b.el=y.el;let{patchFlag:V,dynamicChildren:S,dirs:L}=b;V|=y.patchFlag&16;const U=y.props||je,B=b.props||je;let H;M&&Jr(M,!1),(H=B.onVnodeBeforeUpdate)&&Vn(H,M,b,y),L&&Xr(b,y,M,"beforeUpdate"),M&&Jr(M,!0);const X=g&&b.type!=="foreignObject";if(S?oe(y.dynamicChildren,S,T,M,$,X,I):k||ce(y,b,T,null,M,$,X,I,!1),V>0){if(V&16)O(T,b,U,B,M,$,g);else if(V&2&&U.class!==B.class&&s(T,"class",null,B.class,g),V&4&&s(T,"style",U.style,B.style,g),V&8){const K=b.dynamicProps;for(let ae=0;ae{H&&Vn(H,M,b,y),L&&Xr(b,y,M,"updated")},$)},oe=(y,b,M,$,g,I,k)=>{for(let T=0;T{if(M!==$){if(M!==je)for(const T in M)!ic(T)&&!(T in $)&&s(y,T,M[T],null,k,b.children,g,I,et);for(const T in $){if(ic(T))continue;const V=$[T],S=M[T];V!==S&&T!=="value"&&s(y,T,S,V,k,b.children,g,I,et)}"value"in $&&s(y,"value",M.value,$.value)}},w=(y,b,M,$,g,I,k,T,V)=>{const S=b.el=y?y.el:a(""),L=b.anchor=y?y.anchor:a("");let{patchFlag:U,dynamicChildren:B,slotScopeIds:H}=b;H&&(T=T?T.concat(H):H),y==null?(r(S,M,$),r(L,M,$),te(b.children,M,L,g,I,k,T,V)):U>0&&U&64&&B&&y.dynamicChildren?(oe(y.dynamicChildren,B,M,g,I,k,T),(b.key!=null||g&&b===g.subTree)&&b_(y,b,!0)):ce(y,b,M,L,g,I,k,T,V)},N=(y,b,M,$,g,I,k,T,V)=>{b.slotScopeIds=T,y==null?b.shapeFlag&512?g.ctx.activate(b,M,$,k,V):R(b,M,$,g,I,k,V):he(y,b,V)},R=(y,b,M,$,g,I,k)=>{const T=y.component=_A(y,$,g);if(Fl(y)&&(T.ctx.renderer=pt),bA(T),T.asyncDep){if(g&&g.registerDep(T,W),!y.el){const V=T.subTree=ye(yn);E(null,V,b,M)}return}W(T,y,b,M,g,I,k)},he=(y,b,M)=>{const $=b.component=y.component;if(DI(y,b,M))if($.asyncDep&&!$.asyncResolved){re($,b,M);return}else $.next=b,SI($.update),$.update();else b.el=y.el,$.vnode=b},W=(y,b,M,$,g,I,k)=>{const T=()=>{if(y.isMounted){let{next:L,bu:U,u:B,parent:H,vnode:X}=y,K=L,ae;Jr(y,!1),L?(L.el=X.el,re(y,L,k)):L=X,U&&sc(U),(ae=L.props&&L.props.onVnodeBeforeUpdate)&&Vn(ae,H,L,X),Jr(y,!0);const Ce=Hu(y),at=y.subTree;y.subTree=Ce,v(at,Ce,f(at.el),_n(at),y,g,I),L.el=Ce.el,K===null&&NI(y,Ce.el),B&&en(B,g),(ae=L.props&&L.props.onVnodeUpdated)&&en(()=>Vn(ae,H,L,X),g)}else{let L;const{el:U,props:B}=b,{bm:H,m:X,parent:K}=y,ae=no(b);if(Jr(y,!1),H&&sc(H),!ae&&(L=B&&B.onVnodeBeforeMount)&&Vn(L,K,b),Jr(y,!0),U&&wt){const Ce=()=>{y.subTree=Hu(y),wt(U,y.subTree,y,g,null)};ae?b.type.__asyncLoader().then(()=>!y.isUnmounted&&Ce()):Ce()}else{const Ce=y.subTree=Hu(y);v(null,Ce,M,$,y,g,I),b.el=Ce.el}if(X&&en(X,g),!ae&&(L=B&&B.onVnodeMounted)){const Ce=b;en(()=>Vn(L,K,Ce),g)}(b.shapeFlag&256||K&&no(K.vnode)&&K.vnode.shapeFlag&256)&&y.a&&en(y.a,g),y.isMounted=!0,b=M=$=null}},V=y.effect=new sd(T,()=>dd(S),y.scope),S=y.update=()=>V.run();S.id=y.uid,Jr(y,!0),S()},re=(y,b,M)=>{b.component=y;const $=y.vnode.props;y.vnode=b,y.next=null,sA(y,b.props,$,M),cA(y,b.children,M),Ts(),Om(),Is()},ce=(y,b,M,$,g,I,k,T,V=!1)=>{const S=y&&y.children,L=y?y.shapeFlag:0,U=b.children,{patchFlag:B,shapeFlag:H}=b;if(B>0){if(B&128){We(S,U,M,$,g,I,k,T,V);return}else if(B&256){Ne(S,U,M,$,g,I,k,T,V);return}}H&8?(L&16&&et(S,g,I),U!==S&&u(M,U)):L&16?H&16?We(S,U,M,$,g,I,k,T,V):et(S,g,I,!0):(L&8&&u(M,""),H&16&&te(U,M,$,g,I,k,T,V))},Ne=(y,b,M,$,g,I,k,T,V)=>{y=y||ts,b=b||ts;const S=y.length,L=b.length,U=Math.min(S,L);let B;for(B=0;BL?et(y,g,I,!0,!1,U):te(b,M,$,g,I,k,T,V,U)},We=(y,b,M,$,g,I,k,T,V)=>{let S=0;const L=b.length;let U=y.length-1,B=L-1;for(;S<=U&&S<=B;){const H=y[S],X=b[S]=V?Ir(b[S]):Fn(b[S]);if(fi(H,X))v(H,X,M,null,g,I,k,T,V);else break;S++}for(;S<=U&&S<=B;){const H=y[U],X=b[B]=V?Ir(b[B]):Fn(b[B]);if(fi(H,X))v(H,X,M,null,g,I,k,T,V);else break;U--,B--}if(S>U){if(S<=B){const H=B+1,X=HB)for(;S<=U;)$e(y[S],g,I,!0),S++;else{const H=S,X=S,K=new Map;for(S=X;S<=B;S++){const lt=b[S]=V?Ir(b[S]):Fn(b[S]);lt.key!=null&&K.set(lt.key,S)}let ae,Ce=0;const at=B-X+1;let Xe=!1,rt=0;const ct=new Array(at);for(S=0;S=at){$e(lt,g,I,!0);continue}let De;if(lt.key!=null)De=K.get(lt.key);else for(ae=X;ae<=B;ae++)if(ct[ae-X]===0&&fi(lt,b[ae])){De=ae;break}De===void 0?$e(lt,g,I,!0):(ct[De-X]=S+1,De>=rt?rt=De:Xe=!0,v(lt,b[De],M,null,g,I,k,T,V),Ce++)}const bn=Xe?fA(ct):ts;for(ae=bn.length-1,S=at-1;S>=0;S--){const lt=X+S,De=b[lt],un=lt+1{const{el:I,type:k,transition:T,children:V,shapeFlag:S}=y;if(S&6){xe(y.component.subTree,b,M,$);return}if(S&128){y.suspense.move(b,M,$);return}if(S&64){k.move(y,b,M,pt);return}if(k===Ve){r(I,b,M);for(let U=0;UT.enter(I),g);else{const{leave:U,delayLeave:B,afterLeave:H}=T,X=()=>r(I,b,M),K=()=>{U(I,()=>{X(),H&&H()})};B?B(I,X,K):K()}else r(I,b,M)},$e=(y,b,M,$=!1,g=!1)=>{const{type:I,props:k,ref:T,children:V,dynamicChildren:S,shapeFlag:L,patchFlag:U,dirs:B}=y;if(T!=null&&zf(T,null,M,y,!0),L&256){b.ctx.deactivate(y);return}const H=L&1&&B,X=!no(y);let K;if(X&&(K=k&&k.onVnodeBeforeUnmount)&&Vn(K,b,y),L&6)rn(y.component,M,$);else{if(L&128){y.suspense.unmount(M,$);return}H&&Xr(y,null,b,"beforeUnmount"),L&64?y.type.remove(y,b,M,g,pt,$):S&&(I!==Ve||U>0&&U&64)?et(S,b,M,!1,!0):(I===Ve&&U&384||!g&&L&16)&&et(V,b,M),$&&be(y)}(X&&(K=k&&k.onVnodeUnmounted)||H)&&en(()=>{K&&Vn(K,b,y),H&&Xr(y,null,b,"unmounted")},M)},be=y=>{const{type:b,el:M,anchor:$,transition:g}=y;if(b===Ve){Pt(M,$);return}if(b===cc){F(y);return}const I=()=>{i(M),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(y.shapeFlag&1&&g&&!g.persisted){const{leave:k,delayLeave:T}=g,V=()=>k(M,I);T?T(y.el,I,V):V()}else I()},Pt=(y,b)=>{let M;for(;y!==b;)M=h(y),i(y),y=M;i(b)},rn=(y,b,M)=>{const{bum:$,scope:g,update:I,subTree:k,um:T}=y;$&&sc($),g.stop(),I&&(I.active=!1,$e(k,y,b,M)),T&&en(T,b),en(()=>{y.isUnmounted=!0},b),b&&b.pendingBranch&&!b.isUnmounted&&y.asyncDep&&!y.asyncResolved&&y.suspenseId===b.pendingId&&(b.deps--,b.deps===0&&b.resolve())},et=(y,b,M,$=!1,g=!1,I=0)=>{for(let k=I;ky.shapeFlag&6?_n(y.component.subTree):y.shapeFlag&128?y.suspense.next():h(y.anchor||y.el),Xt=(y,b,M)=>{y==null?b._vnode&&$e(b._vnode,null,null,!0):v(b._vnode||null,y,b,null,null,null,M),Om(),Qv(),b._vnode=y},pt={p:v,um:$e,m:xe,r:be,mt:R,mc:te,pc:ce,pbc:oe,n:_n,o:t};let Jt,wt;return e&&([Jt,wt]=e(pt)),{render:Xt,hydrate:Jt,createApp:rA(Xt,Jt)}}function Jr({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function b_(t,e,n=!1){const r=t.children,i=e.children;if(ue(r)&&ue(i))for(let s=0;s>1,t[n[a]]0&&(e[r]=n[s-1]),n[s]=r)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=e[o];return n}const hA=t=>t.__isTeleport,Ve=Symbol.for("v-fgt"),Ll=Symbol.for("v-txt"),yn=Symbol.for("v-cmt"),cc=Symbol.for("v-stc"),io=[];let Rn=null;function Y(t=!1){io.push(Rn=t?null:[])}function dA(){io.pop(),Rn=io[io.length-1]||null}let Io=1;function qm(t){Io+=t}function w_(t){return t.dynamicChildren=Io>0?Rn||ts:null,dA(),Io>0&&Rn&&Rn.push(t),t}function ee(t,e,n,r,i,s){return w_(d(t,e,n,r,i,s,!0))}function jl(t,e,n,r,i){return w_(ye(t,e,n,r,i,!0))}function Fc(t){return t?t.__v_isVNode===!0:!1}function fi(t,e){return t.type===e.type&&t.key===e.key}const Ul="__vInternal",E_=({key:t})=>t!=null?t:null,lc=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?ot(t)||Yt(t)||_e(t)?{i:Dt,r:t,k:e,f:!!n}:t:null);function d(t,e=null,n=null,r=0,i=null,s=t===Ve?0:1,o=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&E_(e),ref:e&&lc(e),scopeId:Ml,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Dt};return a?(_d(c,n),s&128&&t.normalize(c)):n&&(c.shapeFlag|=ot(n)?8:16),Io>0&&!o&&Rn&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&Rn.push(c),c}const ye=pA;function pA(t,e=null,n=null,r=0,i=null,s=!1){if((!t||t===l_)&&(t=yn),Fc(t)){const a=$r(t,e,!0);return n&&_d(a,n),Io>0&&!s&&Rn&&(a.shapeFlag&6?Rn[Rn.indexOf(t)]=a:Rn.push(a)),a.patchFlag|=-2,a}if(AA(t)&&(t=t.__vccOpts),e){e=mA(e);let{class:a,style:c}=e;a&&!ot(a)&&(e.class=Ti(a)),Fe(c)&&(zv(c)&&!ue(c)&&(c=st({},c)),e.style=Pl(c))}const o=ot(t)?1:MI(t)?128:hA(t)?64:Fe(t)?4:_e(t)?2:0;return d(t,e,n,r,i,o,s,!0)}function mA(t){return t?zv(t)||Ul in t?st({},t):t:null}function $r(t,e,n=!1){const{props:r,ref:i,patchFlag:s,children:o}=t,a=e?gA(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:a,key:a&&E_(a),ref:e&&e.ref?n&&i?ue(i)?i.concat(lc(e)):[i,lc(e)]:lc(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ve?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&$r(t.ssContent),ssFallback:t.ssFallback&&$r(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function nr(t=" ",e=0){return ye(Ll,null,t,e)}function vd(t,e){const n=ye(cc,null,t);return n.staticCount=e,n}function yt(t="",e=!1){return e?(Y(),jl(yn,null,t)):ye(yn,null,t)}function Fn(t){return t==null||typeof t=="boolean"?ye(yn):ue(t)?ye(Ve,null,t.slice()):typeof t=="object"?Ir(t):ye(Ll,null,String(t))}function Ir(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:$r(t)}function _d(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(ue(e))n=16;else if(typeof e=="object")if(r&65){const i=e.default;i&&(i._c&&(i._d=!1),_d(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!(Ul in e)?e._ctx=Dt:i===3&&Dt&&(Dt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else _e(e)?(e={default:e,_ctx:Dt},n=32):(e=String(e),r&64?(n=16,e=[nr(e)]):n=8);t.children=e,t.shapeFlag|=n}function gA(...t){const e={};for(let n=0;nAt||Dt;let wd,Li,Hm="__VUE_INSTANCE_SETTERS__";(Li=Nf()[Hm])||(Li=Nf()[Hm]=[]),Li.push(t=>At=t),wd=t=>{Li.length>1?Li.forEach(e=>e(t)):Li[0](t)};const ds=t=>{wd(t),t.scope.on()},wi=()=>{At&&At.scope.off(),wd(null)};function T_(t){return t.vnode.shapeFlag&4}let Ao=!1;function bA(t,e=!1){Ao=e;const{props:n,children:r}=t.vnode,i=T_(t);iA(t,n,i,e),aA(t,r);const s=i?wA(t,e):void 0;return Ao=!1,s}function wA(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Wv(new Proxy(t.ctx,QI));const{setup:r}=n;if(r){const i=t.setupContext=r.length>1?TA(t):null;ds(t),Ts();const s=Or(r,t,0,[t.props,i]);if(Is(),wi(),Pv(s)){if(s.then(wi,wi),e)return s.then(o=>{zm(t,o,e)}).catch(o=>{Dl(o,t,0)});t.asyncDep=s}else zm(t,s,e)}else I_(t,e)}function zm(t,e,n){_e(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Fe(e)&&(t.setupState=Kv(e)),I_(t,n)}let Wm;function I_(t,e,n){const r=t.type;if(!t.render){if(!e&&Wm&&!r.render){const i=r.template||gd(t).template;if(i){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:c}=r,l=st(st({isCustomElement:s,delimiters:a},o),c);r.render=Wm(i,l)}}t.render=r.render||Dn}ds(t),Ts(),XI(t),Is(),wi()}function EA(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,n){return nn(t,"get","$attrs"),e[n]}}))}function TA(t){const e=n=>{t.exposed=n||{}};return{get attrs(){return EA(t)},slots:t.slots,emit:t.emit,expose:e}}function Bl(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Kv(Wv(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in ro)return ro[n](t)},has(e,n){return n in e||n in ro}}))}function IA(t,e=!0){return _e(t)?t.displayName||t.name:t.name||e&&t.__name}function AA(t){return _e(t)&&"__vccOpts"in t}const dn=(t,e)=>TI(t,e,Ao);function an(t,e,n){const r=arguments.length;return r===2?Fe(e)&&!ue(e)?Fc(e)?ye(t,null,[e]):ye(t,e):ye(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Fc(n)&&(n=[n]),ye(t,e,n))}const CA=Symbol.for("v-scx"),SA=()=>ac(CA),xA="3.3.4",PA="http://www.w3.org/2000/svg",hi=typeof document<"u"?document:null,Km=hi&&hi.createElement("template"),RA={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const i=e?hi.createElementNS(PA,t):hi.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:t=>hi.createTextNode(t),createComment:t=>hi.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>hi.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,i,s){const o=n?n.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Km.innerHTML=r?`${t}`:t;const a=Km.content;if(r){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function OA(t,e,n){const r=t._vtc;r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function kA(t,e,n){const r=t.style,i=ot(n);if(n&&!i){if(e&&!ot(e))for(const s in e)n[s]==null&&Wf(r,s,"");for(const s in n)Wf(r,s,n[s])}else{const s=r.display;i?e!==n&&(r.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(r.display=s)}}const Gm=/\s*!important$/;function Wf(t,e,n){if(ue(n))n.forEach(r=>Wf(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=DA(t,e);Gm.test(n)?t.setProperty(Oi(r),n.replace(Gm,""),"important"):t[r]=n}}const Ym=["Webkit","Moz","ms"],Ku={};function DA(t,e){const n=Ku[e];if(n)return n;let r=Gn(e);if(r!=="filter"&&r in t)return Ku[e]=r;r=xl(r);for(let i=0;iGu||(LA.then(()=>Gu=0),Gu=Date.now());function UA(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gn(BA(r,n.value),e,5,[r])};return n.value=t,n.attached=jA(),n}function BA(t,e){if(ue(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>i=>!i._stopped&&r&&r(i))}else return e}const Jm=/^on[a-z]/,qA=(t,e,n,r,i=!1,s,o,a,c)=>{e==="class"?OA(t,r,i):e==="style"?kA(t,n,r):Al(e)?td(e)||FA(t,e,n,r,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):HA(t,e,r,i))?MA(t,e,r,s,o,a,c):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),NA(t,e,r,i))};function HA(t,e,n,r){return r?!!(e==="innerHTML"||e==="textContent"||e in t&&Jm.test(e)&&_e(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||Jm.test(e)&&ot(n)?!1:e in t}const _r="transition",Fs="animation",so=(t,{slots:e})=>an(LI,C_(t),e);so.displayName="Transition";const A_={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},zA=so.props=st({},n_,A_),Zr=(t,e=[])=>{ue(t)?t.forEach(n=>n(...e)):t&&t(...e)},Zm=t=>t?ue(t)?t.some(e=>e.length>1):t.length>1:!1;function C_(t){const e={};for(const w in t)w in A_||(e[w]=t[w]);if(t.css===!1)return e;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:l=o,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=t,P=WA(i),v=P&&P[0],A=P&&P[1],{onBeforeEnter:E,onEnter:C,onEnterCancelled:D,onLeave:F,onLeaveCancelled:G,onBeforeAppear:se=E,onAppear:ge=C,onAppearCancelled:te=D}=e,Z=(w,N,R)=>{wr(w,N?u:a),wr(w,N?l:o),R&&R()},oe=(w,N)=>{w._isLeaving=!1,wr(w,f),wr(w,m),wr(w,h),N&&N()},O=w=>(N,R)=>{const he=w?ge:C,W=()=>Z(N,w,R);Zr(he,[N,W]),eg(()=>{wr(N,w?c:s),Zn(N,w?u:a),Zm(he)||tg(N,r,v,W)})};return st(e,{onBeforeEnter(w){Zr(E,[w]),Zn(w,s),Zn(w,o)},onBeforeAppear(w){Zr(se,[w]),Zn(w,c),Zn(w,l)},onEnter:O(!1),onAppear:O(!0),onLeave(w,N){w._isLeaving=!0;const R=()=>oe(w,N);Zn(w,f),x_(),Zn(w,h),eg(()=>{!w._isLeaving||(wr(w,f),Zn(w,m),Zm(F)||tg(w,r,A,R))}),Zr(F,[w,R])},onEnterCancelled(w){Z(w,!1),Zr(D,[w])},onAppearCancelled(w){Z(w,!0),Zr(te,[w])},onLeaveCancelled(w){oe(w),Zr(G,[w])}})}function WA(t){if(t==null)return null;if(Fe(t))return[Yu(t.enter),Yu(t.leave)];{const e=Yu(t);return[e,e]}}function Yu(t){return DT(t)}function Zn(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function wr(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function eg(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let KA=0;function tg(t,e,n,r){const i=t._endId=++KA,s=()=>{i===t._endId&&r()};if(n)return setTimeout(s,n);const{type:o,timeout:a,propCount:c}=S_(t,e);if(!o)return r();const l=o+"end";let u=0;const f=()=>{t.removeEventListener(l,h),s()},h=m=>{m.target===t&&++u>=c&&f()};setTimeout(()=>{u(n[P]||"").split(", "),i=r(`${_r}Delay`),s=r(`${_r}Duration`),o=ng(i,s),a=r(`${Fs}Delay`),c=r(`${Fs}Duration`),l=ng(a,c);let u=null,f=0,h=0;e===_r?o>0&&(u=_r,f=o,h=s.length):e===Fs?l>0&&(u=Fs,f=l,h=c.length):(f=Math.max(o,l),u=f>0?o>l?_r:Fs:null,h=u?u===_r?s.length:c.length:0);const m=u===_r&&/\b(transform|all)(,|$)/.test(r(`${_r}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:m}}function ng(t,e){for(;t.lengthrg(n)+rg(t[r])))}function rg(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function x_(){return document.body.offsetHeight}const P_=new WeakMap,R_=new WeakMap,O_={name:"TransitionGroup",props:st({},zA,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=bd(),r=t_();let i,s;return o_(()=>{if(!i.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!ZA(i[0].el,n.vnode.el,o))return;i.forEach(QA),i.forEach(XA);const a=i.filter(JA);x_(),a.forEach(c=>{const l=c.el,u=l.style;Zn(l,o),u.transform=u.webkitTransform=u.transitionDuration="";const f=l._moveCb=h=>{h&&h.target!==l||(!h||/transform$/.test(h.propertyName))&&(l.removeEventListener("transitionend",f),l._moveCb=null,wr(l,o))};l.addEventListener("transitionend",f)})}),()=>{const o=Re(t),a=C_(o);let c=o.tag||Ve;i=s,s=e.default?pd(e.default()):[];for(let l=0;ldelete t.mode;O_.props;const YA=O_;function QA(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function XA(t){R_.set(t,t.el.getBoundingClientRect())}function JA(t){const e=P_.get(t),n=R_.get(t),r=e.left-n.left,i=e.top-n.top;if(r||i){const s=t.el.style;return s.transform=s.webkitTransform=`translate(${r}px,${i}px)`,s.transitionDuration="0s",t}}function ZA(t,e,n){const r=t.cloneNode();t._vtc&&t._vtc.forEach(o=>{o.split(/\s+/).forEach(a=>a&&r.classList.remove(a))}),n.split(/\s+/).forEach(o=>o&&r.classList.add(o)),r.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(r);const{hasTransform:s}=S_(r);return i.removeChild(r),s}const $c=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ue(e)?n=>sc(e,n):e};function e2(t){t.target.composing=!0}function ig(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ln={created(t,{modifiers:{lazy:e,trim:n,number:r}},i){t._assign=$c(i);const s=r||i.props&&i.props.type==="number";di(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),s&&(a=Dc(a)),t._assign(a)}),n&&di(t,"change",()=>{t.value=t.value.trim()}),e||(di(t,"compositionstart",e2),di(t,"compositionend",ig),di(t,"change",ig))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:i}},s){if(t._assign=$c(s),t.composing||document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===e||(i||t.type==="number")&&Dc(t.value)===e))return;const o=e==null?"":e;t.value!==o&&(t.value=o)}},Kf={deep:!0,created(t,{value:e,modifiers:{number:n}},r){const i=Cl(e);di(t,"change",()=>{const s=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?Dc(Lc(o)):Lc(o));t._assign(t.multiple?i?new Set(s):s:s[0])}),t._assign=$c(r)},mounted(t,{value:e}){sg(t,e)},beforeUpdate(t,e,n){t._assign=$c(n)},updated(t,{value:e}){sg(t,e)}};function sg(t,e){const n=t.multiple;if(!(n&&!ue(e)&&!Cl(e))){for(let r=0,i=t.options.length;r-1:s.selected=e.has(o);else if(Rl(Lc(s),e)){t.selectedIndex!==r&&(t.selectedIndex=r);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Lc(t){return"_value"in t?t._value:t.value}const t2=["ctrl","shift","alt","meta"],n2={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>t2.some(n=>t[`${n}Key`]&&!e.includes(n))},r2=(t,e)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=Oi(n.key);if(e.some(i=>i===r||i2[i]===r))return t(n)},s2={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Ls(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),Ls(t,!0),r.enter(t)):r.leave(t,()=>{Ls(t,!1)}):Ls(t,e))},beforeUnmount(t,{value:e}){Ls(t,e)}};function Ls(t,e){t.style.display=e?t._vod:"none"}const o2=st({patchProp:qA},RA);let og;function a2(){return og||(og=lA(o2))}const c2=(...t)=>{const e=a2().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=l2(r);if(!i)return;const s=e._component;!_e(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const o=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e};function l2(t){return ot(t)?document.querySelector(t):t}const u2="/assets/gavel_logo.992bca02.png",ze=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},f2={data(){return{logo:{filename:u2,alt:"Gavel Logo"}}}},h2=["src","alt"];function d2(t,e,n,r,i,s){return Y(),ee("img",{src:i.logo.filename,alt:i.logo.alt,height:"120",width:"120"},null,8,h2)}const p2=ze(f2,[["render",d2]]);function ag(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Q(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1;i--){var s=n[i],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=s)}return qe.head.insertBefore(e,r),t}}var L2="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Ro(){for(var t=12,e="";t-- >0;)e+=L2[Math.random()*62|0];return e}function As(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function Sd(t){return t.classList?As(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(e){return e})}function q_(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function j2(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(q_(t[n]),'" ')},"").trim()}function ql(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")},"")}function xd(t){return t.size!==Un.size||t.x!==Un.x||t.y!==Un.y||t.rotate!==Un.rotate||t.flipX||t.flipY}function U2(t){var e=t.transform,n=t.containerWidth,r=t.iconWidth,i={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(s," ").concat(o," ").concat(a)},l={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:l}}function B2(t){var e=t.transform,n=t.width,r=n===void 0?Yf:n,i=t.height,s=i===void 0?Yf:i,o=t.startCentered,a=o===void 0?!1:o,c="";return a&&V_?c+="translate(".concat(e.x/br-r/2,"em, ").concat(e.y/br-s/2,"em) "):a?c+="translate(calc(-50% + ".concat(e.x/br,"em), calc(-50% + ").concat(e.y/br,"em)) "):c+="translate(".concat(e.x/br,"em, ").concat(e.y/br,"em) "),c+="scale(".concat(e.size/br*(e.flipX?-1:1),", ").concat(e.size/br*(e.flipY?-1:1),") "),c+="rotate(".concat(e.rotate,"deg) "),c}var q2=`:root, :host { - --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; - --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; - --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; - --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; - --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; - --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; - --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; - --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; - --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; -} - -svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { - overflow: visible; - box-sizing: content-box; -} - -.svg-inline--fa { - display: var(--fa-display, inline-block); - height: 1em; - overflow: visible; - vertical-align: -0.125em; -} -.svg-inline--fa.fa-2xs { - vertical-align: 0.1em; -} -.svg-inline--fa.fa-xs { - vertical-align: 0em; -} -.svg-inline--fa.fa-sm { - vertical-align: -0.0714285705em; -} -.svg-inline--fa.fa-lg { - vertical-align: -0.2em; -} -.svg-inline--fa.fa-xl { - vertical-align: -0.25em; -} -.svg-inline--fa.fa-2xl { - vertical-align: -0.3125em; -} -.svg-inline--fa.fa-pull-left { - margin-right: var(--fa-pull-margin, 0.3em); - width: auto; -} -.svg-inline--fa.fa-pull-right { - margin-left: var(--fa-pull-margin, 0.3em); - width: auto; -} -.svg-inline--fa.fa-li { - width: var(--fa-li-width, 2em); - top: 0.25em; -} -.svg-inline--fa.fa-fw { - width: var(--fa-fw-width, 1.25em); -} - -.fa-layers svg.svg-inline--fa { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; -} - -.fa-layers-counter, .fa-layers-text { - display: inline-block; - position: absolute; - text-align: center; -} - -.fa-layers { - display: inline-block; - height: 1em; - position: relative; - text-align: center; - vertical-align: -0.125em; - width: 1em; -} -.fa-layers svg.svg-inline--fa { - -webkit-transform-origin: center center; - transform-origin: center center; -} - -.fa-layers-text { - left: 50%; - top: 50%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - -webkit-transform-origin: center center; - transform-origin: center center; -} - -.fa-layers-counter { - background-color: var(--fa-counter-background-color, #ff253a); - border-radius: var(--fa-counter-border-radius, 1em); - box-sizing: border-box; - color: var(--fa-inverse, #fff); - line-height: var(--fa-counter-line-height, 1); - max-width: var(--fa-counter-max-width, 5em); - min-width: var(--fa-counter-min-width, 1.5em); - overflow: hidden; - padding: var(--fa-counter-padding, 0.25em 0.5em); - right: var(--fa-right, 0); - text-overflow: ellipsis; - top: var(--fa-top, 0); - -webkit-transform: scale(var(--fa-counter-scale, 0.25)); - transform: scale(var(--fa-counter-scale, 0.25)); - -webkit-transform-origin: top right; - transform-origin: top right; -} - -.fa-layers-bottom-right { - bottom: var(--fa-bottom, 0); - right: var(--fa-right, 0); - top: auto; - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: bottom right; - transform-origin: bottom right; -} - -.fa-layers-bottom-left { - bottom: var(--fa-bottom, 0); - left: var(--fa-left, 0); - right: auto; - top: auto; - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: bottom left; - transform-origin: bottom left; -} - -.fa-layers-top-right { - top: var(--fa-top, 0); - right: var(--fa-right, 0); - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: top right; - transform-origin: top right; -} - -.fa-layers-top-left { - left: var(--fa-left, 0); - right: auto; - top: var(--fa-top, 0); - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: top left; - transform-origin: top left; -} - -.fa-1x { - font-size: 1em; -} - -.fa-2x { - font-size: 2em; -} - -.fa-3x { - font-size: 3em; -} - -.fa-4x { - font-size: 4em; -} - -.fa-5x { - font-size: 5em; -} - -.fa-6x { - font-size: 6em; -} - -.fa-7x { - font-size: 7em; -} - -.fa-8x { - font-size: 8em; -} - -.fa-9x { - font-size: 9em; -} - -.fa-10x { - font-size: 10em; -} - -.fa-2xs { - font-size: 0.625em; - line-height: 0.1em; - vertical-align: 0.225em; -} - -.fa-xs { - font-size: 0.75em; - line-height: 0.0833333337em; - vertical-align: 0.125em; -} - -.fa-sm { - font-size: 0.875em; - line-height: 0.0714285718em; - vertical-align: 0.0535714295em; -} - -.fa-lg { - font-size: 1.25em; - line-height: 0.05em; - vertical-align: -0.075em; -} - -.fa-xl { - font-size: 1.5em; - line-height: 0.0416666682em; - vertical-align: -0.125em; -} - -.fa-2xl { - font-size: 2em; - line-height: 0.03125em; - vertical-align: -0.1875em; -} - -.fa-fw { - text-align: center; - width: 1.25em; -} - -.fa-ul { - list-style-type: none; - margin-left: var(--fa-li-margin, 2.5em); - padding-left: 0; -} -.fa-ul > li { - position: relative; -} - -.fa-li { - left: calc(var(--fa-li-width, 2em) * -1); - position: absolute; - text-align: center; - width: var(--fa-li-width, 2em); - line-height: inherit; -} - -.fa-border { - border-color: var(--fa-border-color, #eee); - border-radius: var(--fa-border-radius, 0.1em); - border-style: var(--fa-border-style, solid); - border-width: var(--fa-border-width, 0.08em); - padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); -} - -.fa-pull-left { - float: left; - margin-right: var(--fa-pull-margin, 0.3em); -} - -.fa-pull-right { - float: right; - margin-left: var(--fa-pull-margin, 0.3em); -} - -.fa-beat { - -webkit-animation-name: fa-beat; - animation-name: fa-beat; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); - animation-timing-function: var(--fa-animation-timing, ease-in-out); -} - -.fa-bounce { - -webkit-animation-name: fa-bounce; - animation-name: fa-bounce; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); -} - -.fa-fade { - -webkit-animation-name: fa-fade; - animation-name: fa-fade; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); -} - -.fa-beat-fade { - -webkit-animation-name: fa-beat-fade; - animation-name: fa-beat-fade; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); -} - -.fa-flip { - -webkit-animation-name: fa-flip; - animation-name: fa-flip; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); - animation-timing-function: var(--fa-animation-timing, ease-in-out); -} - -.fa-shake { - -webkit-animation-name: fa-shake; - animation-name: fa-shake; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, linear); - animation-timing-function: var(--fa-animation-timing, linear); -} - -.fa-spin { - -webkit-animation-name: fa-spin; - animation-name: fa-spin; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 2s); - animation-duration: var(--fa-animation-duration, 2s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, linear); - animation-timing-function: var(--fa-animation-timing, linear); -} - -.fa-spin-reverse { - --fa-animation-direction: reverse; -} - -.fa-pulse, -.fa-spin-pulse { - -webkit-animation-name: fa-spin; - animation-name: fa-spin; - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); - animation-timing-function: var(--fa-animation-timing, steps(8)); -} - -@media (prefers-reduced-motion: reduce) { - .fa-beat, -.fa-bounce, -.fa-fade, -.fa-beat-fade, -.fa-flip, -.fa-pulse, -.fa-shake, -.fa-spin, -.fa-spin-pulse { - -webkit-animation-delay: -1ms; - animation-delay: -1ms; - -webkit-animation-duration: 1ms; - animation-duration: 1ms; - -webkit-animation-iteration-count: 1; - animation-iteration-count: 1; - -webkit-transition-delay: 0s; - transition-delay: 0s; - -webkit-transition-duration: 0s; - transition-duration: 0s; - } -} -@-webkit-keyframes fa-beat { - 0%, 90% { - -webkit-transform: scale(1); - transform: scale(1); - } - 45% { - -webkit-transform: scale(var(--fa-beat-scale, 1.25)); - transform: scale(var(--fa-beat-scale, 1.25)); - } -} -@keyframes fa-beat { - 0%, 90% { - -webkit-transform: scale(1); - transform: scale(1); - } - 45% { - -webkit-transform: scale(var(--fa-beat-scale, 1.25)); - transform: scale(var(--fa-beat-scale, 1.25)); - } -} -@-webkit-keyframes fa-bounce { - 0% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 10% { - -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - } - 30% { - -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - } - 50% { - -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - } - 57% { - -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - } - 64% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 100% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } -} -@keyframes fa-bounce { - 0% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 10% { - -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - } - 30% { - -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - } - 50% { - -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - } - 57% { - -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - } - 64% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 100% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } -} -@-webkit-keyframes fa-fade { - 50% { - opacity: var(--fa-fade-opacity, 0.4); - } -} -@keyframes fa-fade { - 50% { - opacity: var(--fa-fade-opacity, 0.4); - } -} -@-webkit-keyframes fa-beat-fade { - 0%, 100% { - opacity: var(--fa-beat-fade-opacity, 0.4); - -webkit-transform: scale(1); - transform: scale(1); - } - 50% { - opacity: 1; - -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); - transform: scale(var(--fa-beat-fade-scale, 1.125)); - } -} -@keyframes fa-beat-fade { - 0%, 100% { - opacity: var(--fa-beat-fade-opacity, 0.4); - -webkit-transform: scale(1); - transform: scale(1); - } - 50% { - opacity: 1; - -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); - transform: scale(var(--fa-beat-fade-scale, 1.125)); - } -} -@-webkit-keyframes fa-flip { - 50% { - -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - } -} -@keyframes fa-flip { - 50% { - -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - } -} -@-webkit-keyframes fa-shake { - 0% { - -webkit-transform: rotate(-15deg); - transform: rotate(-15deg); - } - 4% { - -webkit-transform: rotate(15deg); - transform: rotate(15deg); - } - 8%, 24% { - -webkit-transform: rotate(-18deg); - transform: rotate(-18deg); - } - 12%, 28% { - -webkit-transform: rotate(18deg); - transform: rotate(18deg); - } - 16% { - -webkit-transform: rotate(-22deg); - transform: rotate(-22deg); - } - 20% { - -webkit-transform: rotate(22deg); - transform: rotate(22deg); - } - 32% { - -webkit-transform: rotate(-12deg); - transform: rotate(-12deg); - } - 36% { - -webkit-transform: rotate(12deg); - transform: rotate(12deg); - } - 40%, 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@keyframes fa-shake { - 0% { - -webkit-transform: rotate(-15deg); - transform: rotate(-15deg); - } - 4% { - -webkit-transform: rotate(15deg); - transform: rotate(15deg); - } - 8%, 24% { - -webkit-transform: rotate(-18deg); - transform: rotate(-18deg); - } - 12%, 28% { - -webkit-transform: rotate(18deg); - transform: rotate(18deg); - } - 16% { - -webkit-transform: rotate(-22deg); - transform: rotate(-22deg); - } - 20% { - -webkit-transform: rotate(22deg); - transform: rotate(22deg); - } - 32% { - -webkit-transform: rotate(-12deg); - transform: rotate(-12deg); - } - 36% { - -webkit-transform: rotate(12deg); - transform: rotate(12deg); - } - 40%, 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.fa-rotate-90 { - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.fa-rotate-180 { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} - -.fa-rotate-270 { - -webkit-transform: rotate(270deg); - transform: rotate(270deg); -} - -.fa-flip-horizontal { - -webkit-transform: scale(-1, 1); - transform: scale(-1, 1); -} - -.fa-flip-vertical { - -webkit-transform: scale(1, -1); - transform: scale(1, -1); -} - -.fa-flip-both, -.fa-flip-horizontal.fa-flip-vertical { - -webkit-transform: scale(-1, -1); - transform: scale(-1, -1); -} - -.fa-rotate-by { - -webkit-transform: rotate(var(--fa-rotate-angle, none)); - transform: rotate(var(--fa-rotate-angle, none)); -} - -.fa-stack { - display: inline-block; - vertical-align: middle; - height: 2em; - position: relative; - width: 2.5em; -} - -.fa-stack-1x, -.fa-stack-2x { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; - z-index: var(--fa-stack-z-index, auto); -} - -.svg-inline--fa.fa-stack-1x { - height: 1em; - width: 1.25em; -} -.svg-inline--fa.fa-stack-2x { - height: 2em; - width: 2.5em; -} - -.fa-inverse { - color: var(--fa-inverse, #fff); -} - -.sr-only, -.fa-sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.sr-only-focusable:not(:focus), -.fa-sr-only-focusable:not(:focus) { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.svg-inline--fa .fa-primary { - fill: var(--fa-primary-color, currentColor); - opacity: var(--fa-primary-opacity, 1); -} - -.svg-inline--fa .fa-secondary { - fill: var(--fa-secondary-color, currentColor); - opacity: var(--fa-secondary-opacity, 0.4); -} - -.svg-inline--fa.fa-swap-opacity .fa-primary { - opacity: var(--fa-secondary-opacity, 0.4); -} - -.svg-inline--fa.fa-swap-opacity .fa-secondary { - opacity: var(--fa-primary-opacity, 1); -} - -.svg-inline--fa mask .fa-primary, -.svg-inline--fa mask .fa-secondary { - fill: black; -} - -.fad.fa-inverse, -.fa-duotone.fa-inverse { - color: var(--fa-inverse, #fff); -}`;function H_(){var t=F_,e=$_,n=ne.cssPrefix,r=ne.replacementClass,i=q2;if(n!==t||r!==e){var s=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),a=new RegExp("\\.".concat(e),"g");i=i.replace(s,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var pg=!1;function Qu(){ne.autoAddCss&&!pg&&($2(H_()),pg=!0)}var H2={mixout:function(){return{dom:{css:H_,insertCss:Qu}}},hooks:function(){return{beforeDOMElementCreation:function(){Qu()},beforeI2svg:function(){Qu()}}}},or=Lr||{};or[sr]||(or[sr]={});or[sr].styles||(or[sr].styles={});or[sr].hooks||(or[sr].hooks={});or[sr].shims||(or[sr].shims=[]);var On=or[sr],z_=[],z2=function t(){qe.removeEventListener("DOMContentLoaded",t),Uc=1,z_.map(function(e){return e()})},Uc=!1;mr&&(Uc=(qe.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(qe.readyState),Uc||qe.addEventListener("DOMContentLoaded",z2));function W2(t){!mr||(Uc?setTimeout(t,0):z_.push(t))}function ea(t){var e=t.tag,n=t.attributes,r=n===void 0?{}:n,i=t.children,s=i===void 0?[]:i;return typeof t=="string"?q_(t):"<".concat(e," ").concat(j2(r),">").concat(s.map(ea).join(""),"")}function mg(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}var K2=function(e,n){return function(r,i,s,o){return e.call(n,r,i,s,o)}},Xu=function(e,n,r,i){var s=Object.keys(e),o=s.length,a=i!==void 0?K2(n,i):n,c,l,u;for(r===void 0?(c=1,u=e[s[0]]):(c=0,u=r);c=55296&&i<=56319&&n=55296&&r<=56319&&n>e+1&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function gg(t){return Object.keys(t).reduce(function(e,n){var r=t[n],i=!!r.icon;return i?e[r.iconName]=r.icon:e[n]=r,e},{})}function Jf(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,s=gg(e);typeof On.hooks.addPack=="function"&&!i?On.hooks.addPack(t,gg(e)):On.styles[t]=Q(Q({},On.styles[t]||{}),s),t==="fas"&&Jf("fa",e)}var ja,Ua,Ba,Xi=On.styles,Q2=On.shims,X2=(ja={},bt(ja,Ue,Object.values(xo[Ue])),bt(ja,tt,Object.values(xo[tt])),ja),Pd=null,W_={},K_={},G_={},Y_={},Q_={},J2=(Ua={},bt(Ua,Ue,Object.keys(Co[Ue])),bt(Ua,tt,Object.keys(Co[tt])),Ua);function Z2(t){return~D2.indexOf(t)}function eC(t,e){var n=e.split("-"),r=n[0],i=n.slice(1).join("-");return r===t&&i!==""&&!Z2(i)?i:null}var X_=function(){var e=function(s){return Xu(Xi,function(o,a,c){return o[c]=Xu(a,s,{}),o},{})};W_=e(function(i,s,o){if(s[3]&&(i[s[3]]=o),s[2]){var a=s[2].filter(function(c){return typeof c=="number"});a.forEach(function(c){i[c.toString(16)]=o})}return i}),K_=e(function(i,s,o){if(i[o]=o,s[2]){var a=s[2].filter(function(c){return typeof c=="string"});a.forEach(function(c){i[c]=o})}return i}),Q_=e(function(i,s,o){var a=s[2];return i[o]=o,a.forEach(function(c){i[c]=o}),i});var n="far"in Xi||ne.autoFetchSvg,r=Xu(Q2,function(i,s){var o=s[0],a=s[1],c=s[2];return a==="far"&&!n&&(a="fas"),typeof o=="string"&&(i.names[o]={prefix:a,iconName:c}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:a,iconName:c}),i},{names:{},unicodes:{}});G_=r.names,Y_=r.unicodes,Pd=Hl(ne.styleDefault,{family:ne.familyDefault})};F2(function(t){Pd=Hl(t.styleDefault,{family:ne.familyDefault})});X_();function Rd(t,e){return(W_[t]||{})[e]}function tC(t,e){return(K_[t]||{})[e]}function gi(t,e){return(Q_[t]||{})[e]}function J_(t){return G_[t]||{prefix:null,iconName:null}}function nC(t){var e=Y_[t],n=Rd("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function jr(){return Pd}var Od=function(){return{prefix:null,iconName:null,rest:[]}};function Hl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.family,r=n===void 0?Ue:n,i=Co[r][t],s=So[r][t]||So[r][i],o=t in On.styles?t:null;return s||o||null}var yg=(Ba={},bt(Ba,Ue,Object.keys(xo[Ue])),bt(Ba,tt,Object.keys(xo[tt])),Ba);function zl(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,s=(e={},bt(e,Ue,"".concat(ne.cssPrefix,"-").concat(Ue)),bt(e,tt,"".concat(ne.cssPrefix,"-").concat(tt)),e),o=null,a=Ue;(t.includes(s[Ue])||t.some(function(l){return yg[Ue].includes(l)}))&&(a=Ue),(t.includes(s[tt])||t.some(function(l){return yg[tt].includes(l)}))&&(a=tt);var c=t.reduce(function(l,u){var f=eC(ne.cssPrefix,u);if(Xi[u]?(u=X2[a].includes(u)?S2[a][u]:u,o=u,l.prefix=u):J2[a].indexOf(u)>-1?(o=u,l.prefix=Hl(u,{family:a})):f?l.iconName=f:u!==ne.replacementClass&&u!==s[Ue]&&u!==s[tt]&&l.rest.push(u),!i&&l.prefix&&l.iconName){var h=o==="fa"?J_(l.iconName):{},m=gi(l.prefix,l.iconName);h.prefix&&(o=null),l.iconName=h.iconName||m||l.iconName,l.prefix=h.prefix||l.prefix,l.prefix==="far"&&!Xi.far&&Xi.fas&&!ne.autoFetchSvg&&(l.prefix="fas")}return l},Od());return(t.includes("fa-brands")||t.includes("fab"))&&(c.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(c.prefix="fad"),!c.prefix&&a===tt&&(Xi.fass||ne.autoFetchSvg)&&(c.prefix="fass",c.iconName=gi(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||o==="fa")&&(c.prefix=jr()||"fas"),c}var rC=function(){function t(){m2(this,t),this.definitions={}}return g2(t,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),s=0;s0&&u.forEach(function(f){typeof f=="string"&&(n[a][f]=l)}),n[a][c]=l}),n}}]),t}(),vg=[],Ji={},ss={},iC=Object.keys(ss);function sC(t,e){var n=e.mixoutsTo;return vg=t,Ji={},Object.keys(ss).forEach(function(r){iC.indexOf(r)===-1&&delete ss[r]}),vg.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),jc(i[o])==="object"&&Object.keys(i[o]).forEach(function(a){n[o]||(n[o]={}),n[o][a]=i[o][a]})}),r.hooks){var s=r.hooks();Object.keys(s).forEach(function(o){Ji[o]||(Ji[o]=[]),Ji[o].push(s[o])})}r.provides&&r.provides(ss)}),n}function Zf(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return mr?(Ai("beforeI2svg",e),ar("pseudoElements2svg",e),ar("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot;ne.autoReplaceSvg===!1&&(ne.autoReplaceSvg=!0),ne.observeMutations=!0,W2(function(){lC({autoReplaceSvgRoot:n}),Ai("watch",e)})}},cC={icon:function(e){if(e===null)return null;if(jc(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:gi(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var n=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],r=Hl(e[0]);return{prefix:r,iconName:gi(r,n)||n}}if(typeof e=="string"&&(e.indexOf("".concat(ne.cssPrefix,"-"))>-1||e.match(x2))){var i=zl(e.split(" "),{skipLookups:!0});return{prefix:i.prefix||jr(),iconName:gi(i.prefix,i.iconName)||i.iconName}}if(typeof e=="string"){var s=jr();return{prefix:s,iconName:gi(s,e)||e}}}},ln={noAuto:oC,config:ne,dom:aC,parse:cC,library:Z_,findIconDefinition:eh,toHtml:ea},lC=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot,r=n===void 0?qe:n;(Object.keys(On.styles).length>0||ne.autoFetchSvg)&&mr&&ne.autoReplaceSvg&&ln.dom.i2svg({node:r})};function Wl(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(r){return ea(r)})}}),Object.defineProperty(t,"node",{get:function(){if(!!mr){var r=qe.createElement("div");return r.innerHTML=t.html,r.children}}}),t}function uC(t){var e=t.children,n=t.main,r=t.mask,i=t.attributes,s=t.styles,o=t.transform;if(xd(o)&&n.found&&!r.found){var a=n.width,c=n.height,l={x:a/c/2,y:.5};i.style=ql(Q(Q({},s),{},{"transform-origin":"".concat(l.x+o.x/16,"em ").concat(l.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}function fC(t){var e=t.prefix,n=t.iconName,r=t.children,i=t.attributes,s=t.symbol,o=s===!0?"".concat(e,"-").concat(ne.cssPrefix,"-").concat(n):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Q(Q({},i),{},{id:o}),children:r}]}]}function kd(t){var e=t.icons,n=e.main,r=e.mask,i=t.prefix,s=t.iconName,o=t.transform,a=t.symbol,c=t.title,l=t.maskId,u=t.titleId,f=t.extra,h=t.watchable,m=h===void 0?!1:h,P=r.found?r:n,v=P.width,A=P.height,E=i==="fak",C=[ne.replacementClass,s?"".concat(ne.cssPrefix,"-").concat(s):""].filter(function(Z){return f.classes.indexOf(Z)===-1}).filter(function(Z){return Z!==""||!!Z}).concat(f.classes).join(" "),D={children:[],attributes:Q(Q({},f.attributes),{},{"data-prefix":i,"data-icon":s,class:C,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(v," ").concat(A)})},F=E&&!~f.classes.indexOf("fa-fw")?{width:"".concat(v/A*16*.0625,"em")}:{};m&&(D.attributes[Ii]=""),c&&(D.children.push({tag:"title",attributes:{id:D.attributes["aria-labelledby"]||"title-".concat(u||Ro())},children:[c]}),delete D.attributes.title);var G=Q(Q({},D),{},{prefix:i,iconName:s,main:n,mask:r,maskId:l,transform:o,symbol:a,styles:Q(Q({},F),f.styles)}),se=r.found&&n.found?ar("generateAbstractMask",G)||{children:[],attributes:{}}:ar("generateAbstractIcon",G)||{children:[],attributes:{}},ge=se.children,te=se.attributes;return G.children=ge,G.attributes=te,a?fC(G):uC(G)}function _g(t){var e=t.content,n=t.width,r=t.height,i=t.transform,s=t.title,o=t.extra,a=t.watchable,c=a===void 0?!1:a,l=Q(Q(Q({},o.attributes),s?{title:s}:{}),{},{class:o.classes.join(" ")});c&&(l[Ii]="");var u=Q({},o.styles);xd(i)&&(u.transform=B2({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=ql(u);f.length>0&&(l.style=f);var h=[];return h.push({tag:"span",attributes:l,children:[e]}),s&&h.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),h}function hC(t){var e=t.content,n=t.title,r=t.extra,i=Q(Q(Q({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),s=ql(r.styles);s.length>0&&(i.style=s);var o=[];return o.push({tag:"span",attributes:i,children:[e]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}var Ju=On.styles;function th(t){var e=t[0],n=t[1],r=t.slice(4),i=Ed(r,1),s=i[0],o=null;return Array.isArray(s)?o={tag:"g",attributes:{class:"".concat(ne.cssPrefix,"-").concat(mi.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ne.cssPrefix,"-").concat(mi.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(ne.cssPrefix,"-").concat(mi.PRIMARY),fill:"currentColor",d:s[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:e,height:n,icon:o}}var dC={found:!1,width:512,height:512};function pC(t,e){!L_&&!ne.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function nh(t,e){var n=e;return e==="fa"&&ne.styleDefault!==null&&(e=jr()),new Promise(function(r,i){if(ar("missingIconAbstract"),n==="fa"){var s=J_(t)||{};t=s.iconName||t,e=s.prefix||e}if(t&&e&&Ju[e]&&Ju[e][t]){var o=Ju[e][t];return r(th(o))}pC(t,e),r(Q(Q({},dC),{},{icon:ne.showMissingIcons&&t?ar("missingIconAbstract")||{}:{}}))})}var bg=function(){},rh=ne.measurePerformance&&Na&&Na.mark&&Na.measure?Na:{mark:bg,measure:bg},Ws='FA "6.4.2"',mC=function(e){return rh.mark("".concat(Ws," ").concat(e," begins")),function(){return eb(e)}},eb=function(e){rh.mark("".concat(Ws," ").concat(e," ends")),rh.measure("".concat(Ws," ").concat(e),"".concat(Ws," ").concat(e," begins"),"".concat(Ws," ").concat(e," ends"))},Dd={begin:mC,end:eb},uc=function(){};function wg(t){var e=t.getAttribute?t.getAttribute(Ii):null;return typeof e=="string"}function gC(t){var e=t.getAttribute?t.getAttribute(Id):null,n=t.getAttribute?t.getAttribute(Ad):null;return e&&n}function yC(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(ne.replacementClass)}function vC(){if(ne.autoReplaceSvg===!0)return fc.replace;var t=fc[ne.autoReplaceSvg];return t||fc.replace}function _C(t){return qe.createElementNS("http://www.w3.org/2000/svg",t)}function bC(t){return qe.createElement(t)}function tb(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.ceFn,r=n===void 0?t.tag==="svg"?_C:bC:n;if(typeof t=="string")return qe.createTextNode(t);var i=r(t.tag);Object.keys(t.attributes||[]).forEach(function(o){i.setAttribute(o,t.attributes[o])});var s=t.children||[];return s.forEach(function(o){i.appendChild(tb(o,{ceFn:r}))}),i}function wC(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var fc={replace:function(e){var n=e[0];if(n.parentNode)if(e[1].forEach(function(i){n.parentNode.insertBefore(tb(i),n)}),n.getAttribute(Ii)===null&&ne.keepOriginalSource){var r=qe.createComment(wC(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(e){var n=e[0],r=e[1];if(~Sd(n).indexOf(ne.replacementClass))return fc.replace(e);var i=new RegExp("".concat(ne.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var s=r[0].attributes.class.split(" ").reduce(function(a,c){return c===ne.replacementClass||c.match(i)?a.toSvg.push(c):a.toNode.push(c),a},{toNode:[],toSvg:[]});r[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",s.toNode.join(" "))}var o=r.map(function(a){return ea(a)}).join(` -`);n.setAttribute(Ii,""),n.innerHTML=o}};function Eg(t){t()}function nb(t,e){var n=typeof e=="function"?e:uc;if(t.length===0)n();else{var r=Eg;ne.mutateApproach===A2&&(r=Lr.requestAnimationFrame||Eg),r(function(){var i=vC(),s=Dd.begin("mutate");t.map(i),s(),n()})}}var Nd=!1;function rb(){Nd=!0}function ih(){Nd=!1}var Bc=null;function Tg(t){if(!!hg&&!!ne.observeMutations){var e=t.treeCallback,n=e===void 0?uc:e,r=t.nodeCallback,i=r===void 0?uc:r,s=t.pseudoElementsCallback,o=s===void 0?uc:s,a=t.observeMutationsRoot,c=a===void 0?qe:a;Bc=new hg(function(l){if(!Nd){var u=jr();As(l).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!wg(f.addedNodes[0])&&(ne.searchPseudoElements&&o(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&ne.searchPseudoElements&&o(f.target.parentNode),f.type==="attributes"&&wg(f.target)&&~k2.indexOf(f.attributeName))if(f.attributeName==="class"&&gC(f.target)){var h=zl(Sd(f.target)),m=h.prefix,P=h.iconName;f.target.setAttribute(Id,m||u),P&&f.target.setAttribute(Ad,P)}else yC(f.target)&&i(f.target)})}}),mr&&Bc.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function EC(){!Bc||Bc.disconnect()}function TC(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce(function(r,i){var s=i.split(":"),o=s[0],a=s.slice(1);return o&&a.length>0&&(r[o]=a.join(":").trim()),r},{})),n}function IC(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),r=t.innerText!==void 0?t.innerText.trim():"",i=zl(Sd(t));return i.prefix||(i.prefix=jr()),e&&n&&(i.prefix=e,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=tC(i.prefix,t.innerText)||Rd(i.prefix,Xf(t.innerText))),!i.iconName&&ne.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=t.firstChild.data)),i}function AC(t){var e=As(t.attributes).reduce(function(i,s){return i.name!=="class"&&i.name!=="style"&&(i[s.name]=s.value),i},{}),n=t.getAttribute("title"),r=t.getAttribute("data-fa-title-id");return ne.autoA11y&&(n?e["aria-labelledby"]="".concat(ne.replacementClass,"-title-").concat(r||Ro()):(e["aria-hidden"]="true",e.focusable="false")),e}function CC(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Un,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Ig(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=IC(t),r=n.iconName,i=n.prefix,s=n.rest,o=AC(t),a=Zf("parseNodeAttributes",{},t),c=e.styleParser?TC(t):[];return Q({iconName:r,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:i,transform:Un,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:c,attributes:o}},a)}var SC=On.styles;function ib(t){var e=ne.autoReplaceSvg==="nest"?Ig(t,{styleParser:!1}):Ig(t);return~e.extra.classes.indexOf(j_)?ar("generateLayersText",t,e):ar("generateSvgReplacementMutation",t,e)}var Ur=new Set;Cd.map(function(t){Ur.add("fa-".concat(t))});Object.keys(Co[Ue]).map(Ur.add.bind(Ur));Object.keys(Co[tt]).map(Ur.add.bind(Ur));Ur=Jo(Ur);function Ag(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!mr)return Promise.resolve();var n=qe.documentElement.classList,r=function(f){return n.add("".concat(dg,"-").concat(f))},i=function(f){return n.remove("".concat(dg,"-").concat(f))},s=ne.autoFetchSvg?Ur:Cd.map(function(u){return"fa-".concat(u)}).concat(Object.keys(SC));s.includes("fa")||s.push("fa");var o=[".".concat(j_,":not([").concat(Ii,"])")].concat(s.map(function(u){return".".concat(u,":not([").concat(Ii,"])")})).join(", ");if(o.length===0)return Promise.resolve();var a=[];try{a=As(t.querySelectorAll(o))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var c=Dd.begin("onTree"),l=a.reduce(function(u,f){try{var h=ib(f);h&&u.push(h)}catch(m){L_||m.name==="MissingIcon"&&console.error(m)}return u},[]);return new Promise(function(u,f){Promise.all(l).then(function(h){nb(h,function(){r("active"),r("complete"),i("pending"),typeof e=="function"&&e(),c(),u()})}).catch(function(h){c(),f(h)})})}function xC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;ib(t).then(function(n){n&&nb([n],e)})}function PC(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(e||{}).icon?e:eh(e||{}),i=n.mask;return i&&(i=(i||{}).icon?i:eh(i||{})),t(r,Q(Q({},n),{},{mask:i}))}}var RC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Un:r,s=n.symbol,o=s===void 0?!1:s,a=n.mask,c=a===void 0?null:a,l=n.maskId,u=l===void 0?null:l,f=n.title,h=f===void 0?null:f,m=n.titleId,P=m===void 0?null:m,v=n.classes,A=v===void 0?[]:v,E=n.attributes,C=E===void 0?{}:E,D=n.styles,F=D===void 0?{}:D;if(!!e){var G=e.prefix,se=e.iconName,ge=e.icon;return Wl(Q({type:"icon"},e),function(){return Ai("beforeDOMElementCreation",{iconDefinition:e,params:n}),ne.autoA11y&&(h?C["aria-labelledby"]="".concat(ne.replacementClass,"-title-").concat(P||Ro()):(C["aria-hidden"]="true",C.focusable="false")),kd({icons:{main:th(ge),mask:c?th(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:G,iconName:se,transform:Q(Q({},Un),i),symbol:o,title:h,maskId:u,titleId:P,extra:{attributes:C,styles:F,classes:A}})})}},OC={mixout:function(){return{icon:PC(RC)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=Ag,n.nodeCallback=xC,n}}},provides:function(e){e.i2svg=function(n){var r=n.node,i=r===void 0?qe:r,s=n.callback,o=s===void 0?function(){}:s;return Ag(i,o)},e.generateSvgReplacementMutation=function(n,r){var i=r.iconName,s=r.title,o=r.titleId,a=r.prefix,c=r.transform,l=r.symbol,u=r.mask,f=r.maskId,h=r.extra;return new Promise(function(m,P){Promise.all([nh(i,a),u.iconName?nh(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(v){var A=Ed(v,2),E=A[0],C=A[1];m([n,kd({icons:{main:E,mask:C},prefix:a,iconName:i,transform:c,symbol:l,maskId:f,title:s,titleId:o,extra:h,watchable:!0})])}).catch(P)})},e.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,s=n.main,o=n.transform,a=n.styles,c=ql(a);c.length>0&&(i.style=c);var l;return xd(o)&&(l=ar("generateAbstractTransformGrouping",{main:s,transform:o,containerWidth:s.width,iconWidth:s.width})),r.push(l||s.icon),{children:r,attributes:i}}}},kC={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,s=i===void 0?[]:i;return Wl({type:"layer"},function(){Ai("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(a){Array.isArray(a)?a.map(function(c){o=o.concat(c.abstract)}):o=o.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(ne.cssPrefix,"-layers")].concat(Jo(s)).join(" ")},children:o}]})}}}},DC={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,s=i===void 0?null:i,o=r.classes,a=o===void 0?[]:o,c=r.attributes,l=c===void 0?{}:c,u=r.styles,f=u===void 0?{}:u;return Wl({type:"counter",content:n},function(){return Ai("beforeDOMElementCreation",{content:n,params:r}),hC({content:n.toString(),title:s,extra:{attributes:l,styles:f,classes:["".concat(ne.cssPrefix,"-layers-counter")].concat(Jo(a))}})})}}}},NC={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,s=i===void 0?Un:i,o=r.title,a=o===void 0?null:o,c=r.classes,l=c===void 0?[]:c,u=r.attributes,f=u===void 0?{}:u,h=r.styles,m=h===void 0?{}:h;return Wl({type:"text",content:n},function(){return Ai("beforeDOMElementCreation",{content:n,params:r}),_g({content:n,transform:Q(Q({},Un),s),title:a,extra:{attributes:f,styles:m,classes:["".concat(ne.cssPrefix,"-layers-text")].concat(Jo(l))}})})}}},provides:function(e){e.generateLayersText=function(n,r){var i=r.title,s=r.transform,o=r.extra,a=null,c=null;if(V_){var l=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();a=u.width/l,c=u.height/l}return ne.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,_g({content:n.innerHTML,width:a,height:c,transform:s,title:i,extra:o,watchable:!0})])}}},MC=new RegExp('"',"ug"),Cg=[1105920,1112319];function VC(t){var e=t.replace(MC,""),n=Y2(e,0),r=n>=Cg[0]&&n<=Cg[1],i=e.length===2?e[0]===e[1]:!1;return{value:Xf(i?e[0]:e),isSecondary:r||i}}function Sg(t,e){var n="".concat(I2).concat(e.replace(":","-"));return new Promise(function(r,i){if(t.getAttribute(n)!==null)return r();var s=As(t.children),o=s.filter(function(ge){return ge.getAttribute(Qf)===e})[0],a=Lr.getComputedStyle(t,e),c=a.getPropertyValue("font-family").match(P2),l=a.getPropertyValue("font-weight"),u=a.getPropertyValue("content");if(o&&!c)return t.removeChild(o),r();if(c&&u!=="none"&&u!==""){var f=a.getPropertyValue("content"),h=~["Sharp"].indexOf(c[2])?tt:Ue,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?So[h][c[2].toLowerCase()]:R2[h][l],P=VC(f),v=P.value,A=P.isSecondary,E=c[0].startsWith("FontAwesome"),C=Rd(m,v),D=C;if(E){var F=nC(v);F.iconName&&F.prefix&&(C=F.iconName,m=F.prefix)}if(C&&!A&&(!o||o.getAttribute(Id)!==m||o.getAttribute(Ad)!==D)){t.setAttribute(n,D),o&&t.removeChild(o);var G=CC(),se=G.extra;se.attributes[Qf]=e,nh(C,m).then(function(ge){var te=kd(Q(Q({},G),{},{icons:{main:ge,mask:Od()},prefix:m,iconName:D,extra:se,watchable:!0})),Z=qe.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(Z,t.firstChild):t.appendChild(Z),Z.outerHTML=te.map(function(oe){return ea(oe)}).join(` -`),t.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function FC(t){return Promise.all([Sg(t,"::before"),Sg(t,"::after")])}function $C(t){return t.parentNode!==document.head&&!~C2.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(Qf)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function xg(t){if(!!mr)return new Promise(function(e,n){var r=As(t.querySelectorAll("*")).filter($C).map(FC),i=Dd.begin("searchPseudoElements");rb(),Promise.all(r).then(function(){i(),ih(),e()}).catch(function(){i(),ih(),n()})})}var LC={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=xg,n}}},provides:function(e){e.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?qe:r;ne.searchPseudoElements&&xg(i)}}},Pg=!1,jC={mixout:function(){return{dom:{unwatch:function(){rb(),Pg=!0}}}},hooks:function(){return{bootstrap:function(){Tg(Zf("mutationObserverCallbacks",{}))},noAuto:function(){EC()},watch:function(n){var r=n.observeMutationsRoot;Pg?ih():Tg(Zf("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Rg=function(e){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(r,i){var s=i.toLowerCase().split("-"),o=s[0],a=s.slice(1).join("-");if(o&&a==="h")return r.flipX=!0,r;if(o&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(o){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},UC={mixout:function(){return{parse:{transform:function(n){return Rg(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=Rg(i)),n}}},provides:function(e){e.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,s=n.containerWidth,o=n.iconWidth,a={transform:"translate(".concat(s/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),l="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),u="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(c," ").concat(l," ").concat(u)},h={transform:"translate(".concat(o/2*-1," -256)")},m={outer:a,inner:f,path:h};return{tag:"g",attributes:Q({},m.outer),children:[{tag:"g",attributes:Q({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Q(Q({},r.icon.attributes),m.path)}]}]}}}},Zu={x:0,y:0,width:"100%",height:"100%"};function Og(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function BC(t){return t.tag==="g"?t.children:[t]}var qC={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),s=i?zl(i.split(" ").map(function(o){return o.trim()})):Od();return s.prefix||(s.prefix=jr()),n.mask=s,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(e){e.generateAbstractMask=function(n){var r=n.children,i=n.attributes,s=n.main,o=n.mask,a=n.maskId,c=n.transform,l=s.width,u=s.icon,f=o.width,h=o.icon,m=U2({transform:c,containerWidth:f,iconWidth:l}),P={tag:"rect",attributes:Q(Q({},Zu),{},{fill:"white"})},v=u.children?{children:u.children.map(Og)}:{},A={tag:"g",attributes:Q({},m.inner),children:[Og(Q({tag:u.tag,attributes:Q(Q({},u.attributes),m.path)},v))]},E={tag:"g",attributes:Q({},m.outer),children:[A]},C="mask-".concat(a||Ro()),D="clip-".concat(a||Ro()),F={tag:"mask",attributes:Q(Q({},Zu),{},{id:C,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[P,E]},G={tag:"defs",children:[{tag:"clipPath",attributes:{id:D},children:BC(h)},F]};return r.push(G,{tag:"rect",attributes:Q({fill:"currentColor","clip-path":"url(#".concat(D,")"),mask:"url(#".concat(C,")")},Zu)}),{children:r,attributes:i}}}},HC={provides:function(e){var n=!1;Lr.matchMedia&&(n=Lr.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Q(Q({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var o=Q(Q({},s),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Q(Q({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Q(Q({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Q(Q({},o),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:Q(Q({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Q(Q({},o),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Q(Q({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Q(Q({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},zC={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),s=i===null?!1:i===""?!0:i;return n.symbol=s,n}}}},WC=[H2,OC,kC,DC,NC,LC,jC,UC,qC,HC,zC];sC(WC,{mixoutsTo:ln});ln.noAuto;var sb=ln.config,KC=ln.library;ln.dom;var qc=ln.parse;ln.findIconDefinition;ln.toHtml;var GC=ln.icon;ln.layer;var YC=ln.text;ln.counter;function kg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pn(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function XC(t,e){if(t==null)return{};var n=QC(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function sh(t){return JC(t)||ZC(t)||eS(t)||tS()}function JC(t){if(Array.isArray(t))return oh(t)}function ZC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function eS(t,e){if(!!t){if(typeof t=="string")return oh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(t,e)}}function oh(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(c){return Md(c)}),i=Object.keys(t.attributes||{}).reduce(function(c,l){var u=t.attributes[l];switch(l){case"class":c.class=oS(u);break;case"style":c.style=sS(u);break;default:c.attrs[l]=u}return c},{attrs:{},class:{},style:{}});n.class;var s=n.style,o=s===void 0?{}:s,a=XC(n,iS);return an(t.tag,Pn(Pn(Pn({},e),{},{class:i.class,style:Pn(Pn({},i.style),o)},i.attrs),a),r)}var ab=!1;try{ab=!0}catch{}function aS(){if(!ab&&console&&typeof console.error=="function"){var t;(t=console).error.apply(t,arguments)}}function co(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Zt({},t,e):{}}function cS(t){var e,n=(e={"fa-spin":t.spin,"fa-pulse":t.pulse,"fa-fw":t.fixedWidth,"fa-border":t.border,"fa-li":t.listItem,"fa-inverse":t.inverse,"fa-flip":t.flip===!0,"fa-flip-horizontal":t.flip==="horizontal"||t.flip==="both","fa-flip-vertical":t.flip==="vertical"||t.flip==="both"},Zt(e,"fa-".concat(t.size),t.size!==null),Zt(e,"fa-rotate-".concat(t.rotation),t.rotation!==null),Zt(e,"fa-pull-".concat(t.pull),t.pull!==null),Zt(e,"fa-swap-opacity",t.swapOpacity),Zt(e,"fa-bounce",t.bounce),Zt(e,"fa-shake",t.shake),Zt(e,"fa-beat",t.beat),Zt(e,"fa-fade",t.fade),Zt(e,"fa-beat-fade",t.beatFade),Zt(e,"fa-flash",t.flash),Zt(e,"fa-spin-pulse",t.spinPulse),Zt(e,"fa-spin-reverse",t.spinReverse),e);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function Dg(t){if(t&&Hc(t)==="object"&&t.prefix&&t.iconName&&t.icon)return t;if(qc.icon)return qc.icon(t);if(t===null)return null;if(Hc(t)==="object"&&t.prefix&&t.iconName)return t;if(Array.isArray(t)&&t.length===2)return{prefix:t[0],iconName:t[1]};if(typeof t=="string")return{prefix:"fas",iconName:t}}var lS=Vl({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(e){return[!0,!1,"horizontal","vertical","both"].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return["right","left"].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(Number.parseInt(e,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(e)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(e,n){var r=n.attrs,i=dn(function(){return Dg(e.icon)}),s=dn(function(){return co("classes",cS(e))}),o=dn(function(){return co("transform",typeof e.transform=="string"?qc.transform(e.transform):e.transform)}),a=dn(function(){return co("mask",Dg(e.mask))}),c=dn(function(){return GC(i.value,Pn(Pn(Pn(Pn({},s.value),o.value),a.value),{},{symbol:e.symbol,title:e.title}))});oc(c,function(u){if(!u)return aS("Could not find one or more icon(s)",i.value,a.value)},{immediate:!0});var l=dn(function(){return c.value?Md(c.value.abstract[0],{},r):null});return function(){return l.value}}});Vl({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(e,n){var r=n.slots,i=sb.familyPrefix,s=dn(function(){return["".concat(i,"-layers")].concat(sh(e.fixedWidth?["".concat(i,"-fw")]:[]))});return function(){return an("div",{class:s.value},r.default?r.default():[])}}});Vl({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(e){return["bottom-left","bottom-right","top-left","top-right"].indexOf(e)>-1}}},setup:function(e,n){var r=n.attrs,i=sb.familyPrefix,s=dn(function(){return co("classes",[].concat(sh(e.counter?["".concat(i,"-layers-counter")]:[]),sh(e.position?["".concat(i,"-layers-").concat(e.position)]:[])))}),o=dn(function(){return co("transform",typeof e.transform=="string"?qc.transform(e.transform):e.transform)}),a=dn(function(){var l=YC(e.value.toString(),Pn(Pn({},o.value),s.value)),u=l.abstract;return e.counter&&(u[0].attributes.class=u[0].attributes.class.replace("fa-layers-text","")),u[0]}),c=dn(function(){return Md(a.value,{},r)});return function(){return c.value}}});var cb={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]},lb={prefix:"fab",iconName:"instagram",icon:[448,512,[],"f16d","M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]},ub={prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"]};KC.add(lb,ub,cb);const uS={components:{GavelLogo:p2,FontAwesomeIcon:lS},data(){return{footer_menus:[{title:"Contact",links:[{text:"Umesha Tilakarathna : +94 77 067 6760",href:"tel: +94 77 067 6760"},{text:"Inodee Fernando : +94 76 603 3004",href:"tel: +94 76 603 3004"},{text:"Email : speecholympiadxv@gmail.com",href:"mailto: speecholympiadxv@gmail.com"}]}],social_media_profiles:[{profile:"instagram",icon:lb,link:"https://www.instagram.com/gavelmora_"},{profile:"facebook",icon:ub,link:"https://www.facebook.com/gavelmora/"},{profile:"linkedin",icon:cb,link:"https://www.linkedin.com/company/gavel-club-of-university-of-moratuwa/"}]}}},Vd=t=>(hr("data-v-b0b4f552"),t=t(),dr(),t),fS={class:"container-fluid app-footer"},hS={class:"row"},dS={class:"col-12 col-md-3 d-flex align-items-center justify-content-center justify-content-md-start my-md-0 my-4"},pS={class:"col-12 col-md-9"},mS={class:"row justify-content-end"},gS={class:"col-md-4 col-12 text-center text-md-start"},yS={class:"footer-menu-title mt-2 mb-1"},vS={class:"row"},_S={class:"col-12"},bS=["href"],wS={class:""},ES=Vd(()=>d("div",{class:"row"},[d("div",{class:"col"},[d("hr")])],-1)),TS={class:"row"},IS=Vd(()=>d("div",{class:"col-md-4 col-12 d-flex justify-content-center justify-content-md-start align-items-center order-last order-md-first my-2 my-lg-0"},[d("span",null,"\xA9 Speech Olympiad 2022")],-1)),AS={class:"col-md-8 col-12 order-first order-md-last"},CS={class:"row"},SS=Vd(()=>d("div",{class:"col-12 col-md-6 my-2 my-md-0 d-flex justify-content-center justify-content-md-end align-items-center"},[d("span",null,"Follow us on")],-1)),xS={class:"col my-2 my-md-0 d-flex justify-content-center"},PS=["href"];function RS(t,e,n,r,i,s){const o=Je("GavelLogo"),a=Je("FontAwesomeIcon");return Y(),ee("div",fS,[d("div",hS,[d("div",dS,[ye(o)]),d("div",pS,[d("div",mS,[(Y(!0),ee(Ve,null,Hn(i.footer_menus,c=>(Y(),ee("div",gS,[d("div",yS,Ye(c.title),1),d("div",vS,[(Y(!0),ee(Ve,null,Hn(c.links,l=>(Y(),ee("div",_S,[d("a",{href:l.href,class:"footer-link"},[d("span",wS,Ye(l.text),1)],8,bS)]))),256))])]))),256))])])]),ES,d("div",TS,[IS,d("div",AS,[d("div",CS,[SS,(Y(!0),ee(Ve,null,Hn(i.social_media_profiles,c=>(Y(),ee("div",xS,[d("a",{href:c.link},[ye(a,{icon:c.icon,size:"2x",class:"icon-color"},null,8,["icon"])],8,PS)]))),256))])])])])}const OS=ze(uS,[["render",RS],["__scopeId","data-v-b0b4f552"]]),Ng=()=>{let t=window.location.hash.slice(1);return["","about","champions-story","technical-tips"].indexOf(t)},kS={data(){return{items:[{name:"Home",url:"#",newTab:!1},{name:"About",url:"#about",newTab:!1},{name:"Champion's Story",url:"#champions-story",newTab:!1},{name:"Technical Tips",url:"#technical-tips",newTab:!1},{name:"Gallery",url:"#gallery",newTab:!1},{name:"Rules & Regulations",url:"https://bit.ly/SOXV_Rules",newTab:!0},{name:"Blogs",url:"#blogs",newTab:!1},{name:"Register",url:"#form2",newTab:!1}],activeItem:Ng()}},methods:{clickHandler(t){window.matchMedia("(max-width: 768px)").matches&&document.querySelector(".navbar-toggler").click()}},mounted(){window.addEventListener("hashchange",()=>{window.location.hash.slice(1),this.activeItem=Ng()})}},DS=["onClick"],NS=["href","target"];function MS(t,e,n,r,i,s){return Y(!0),ee(Ve,null,Hn(i.items,(o,a)=>(Y(),ee("li",{class:"nav-item",key:a,style:{padding:"1px",border:"none"}},[d("div",{onClick:c=>s.clickHandler(a),class:Ti({"font-bold text-gray-400":a===i.activeItem})},[d("a",{class:"nav-link",href:o.url,target:o.newTab?"_blank":""},Ye(o.name),9,NS)],10,DS)]))),128)}const VS=ze(kS,[["render",MS]]),FS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAA5ESURBVHhe7ZsJjFXVGceZ4c0mKqAIIihQFREiVupKalUUVNqapsGNpRq1jUZS0dpapda2MbVRsIaqsVWsimJBI61KsRKQRWlxwwUVBy0WXMBlGEeYfYb+/ud998698+5784ZhRmzPP/nnO+c739nuWe5Z7u3m4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eGRiQKTO4Xm5uYSxNfhK7AYHgabCgoK3oNbCT8Yf01hYeGHSI880KEG2bFjRwEPfRlyIQ99AHJPGiKFbl0qlboJuQazqwlbko7h0RY61CBCbW3t4cXFxStwVtMYR9IoJ+D+OZwIX0A3EDbjVgP2hpfhPBMeArvDDfApeCcNtwXp0NDQcBb+UeYNYWlpxC0m/D9OCWj8k0j7FPNmBfFfI95j2I/C/ixTZwU2G+hc95vXgbhHISbBkVCzxGa4Cs4l7U+QDsQ9CNuL5CbfNwmb7wIMhJUhfopdIeEVhM9Kh3QAJFZMwu/A5bg1YsrgZjgV3mFmyvxguBGbRBBWAcMHivtuC0oE4Q1wupnL/noLygnsHjT7S0yVE9iFoxtvIf4ZsDkdmoFK+D0z71ZfX//NtNql86ipQ6DbBzZY+DvSFbqQDoC0foZ4G6neP5lWrsG/EN5Aqz9sNhqJ9+E/0Pwvw9vgLPiadIT1RjyCv5f8UaDbBrca66TDPgVvpCLfcUYRYNMI65NInEYzC4G+qbVdhKE97huJ/xNYgFsoR72cMgSjoie6efiPNX/Xgsx7k/liqN4/Bj6Grgj5LfgEbjcl4h6E2wH344hwqsRd2NTUNNcFAsIvkR4ZjhDc450xwFuKXw0ZwE0D6MIRgvsHCD20RJp9OEJwX4NItBVlr6kZOzW07DU6p0gvoNIscZfCBNwrpe/yEUJH2cqIGAvfhUvh99E1IFfA76ojmWk/k8KGiF5pNMNbKNNDIqov0iHJwLa2rq7u9+bVwxhizhiURzaaSQxJdgEVznvyYtx65wn3U7855lbcesSVlOUzKPvj9LBdYDvR4SkrH1BgvTvcix1cSmFvh2PRuemJyq2Bmu7Eec4qB0pKSvQyDNBkMor9SX9oAg8lz6Q690mwdcQ+JQPqcLKzTONekyEodw02h+LcH2oh87kLaEE/0hsXJTq9M8PZoktBxebDGChUPXwFzoRaJYUPC390ypoEVSFxOFxkQQpzKyBkmy91bOrgXmaf70s9eO/phR2UOa/eH52y2gJp7pqXejtwIfneAavMr15XBI+EV8FlqJYSnvFSB5oetNT9ELs34BlSqh6I2XJ3NnhgriGBNr615t7l6LIGoRLVDOupyH48yPFU8CakGiD6ztAoudXcIYgjaK0elhe7jxEXkab2QDEQNgOe0ZoE6b2mVWAMhN3b2jYg9m4FhQw6kt4j2nu0C6SlvZbed1EehT5pyu1ckGkhLDbGOkF5eXkJjaP3SrCC2SIbZHQf8jv85xonwOPRubk9ALrYKsvUWYFNbJVl6qzA5nkzl702vxlAPxleCafBsi9lH5IPWNZeitD+oY68r3ZKw9ChQ+vofX/EuUF+3Op9wWrGgThatc0zPgr/hV3GfqIzQRmeMaeg04YYeKADEX+mXBrh1yAbXEA70SUNQmFfNKcqdjl+rV7c6gKp0aN9hlu+4l6/s5WJQKsp9c4MkrdGV+uVzeDWdq2o6VIjNiiXFhnTYZnCkGqMudgEo/YB3F3aYdoFCq0jlYVIB9zaWL3FyFmNDI9TcDdCd76ETNwYZgM2+R6dVCF0AJrXKsuwh+Vxnfkd8H8BN0E37Qi4y+Hest9tpyx6izZL55HvPKhVio49hjH1HIt0y0oKpJfmj9A9Lv/uCMqqhYgaxS0M8Ot0W3sONzLQv4j7NOoQriTbiy7flNTW1h7GrlfnT4dQeA15baBexf0YrHRGgAYagRggN/qX4adyZ0NNTc3BbBh1/9IW1CGWVldXDygrKxtuupzAfgkMV0OUrT/iPHgE1OjRae9ibJ6K2lG3XjA419pCQ71qbgfCiqA2nAWNjY01PJeViQ1ChiUkfKISg9p5agW0iQRXoVcvSFyqYVPIgxlYWlpa2ZFesjuAZ7Afoph6fJDWdB7ISxvNUvKKX+TxQNVSE5nbP8BoB7IBboafwCbTrUPqPiMD6PcmXCsp3Yd8pUE9/g43q5OZqtNAPndDt8oMM1Nj8EB/Qys9xAjQNDIRd2/YH/aFOiDU8lX7hoXwCsVLAol/Oeczux5dUg+etxPOE4AGOZsH2Qyf5mFHD+9isFGwDGrEnGpqBwurY5Rda6qvLLZv3z6Q+uTzTuowyEcj5D3zOsVeKDQ1ba6srGzz4IzG64Ptx/At3OEm7n+pQboS0QYJpqxJDJt+8OZevXpVmC4rsPuUhpiJHIb8tqkzQEb9RfMmgnCttHT3LLkn8kCkLoYKWcfrXmEqDTytoaFBZ0v6ssUBdwrdyYRdgY2OKk5HV2TBDkpH6VVUVPQ0v45uTiOOjjd0xXwqTDyXQr8vTCw7+r5QRzhXKX/KcSbpur1KNhCui7VxVt4f4z8ZxsobAoNnaKFaDHSNmhew/RpxNMWFHwCQTmyEKKytdAn/FdT0NwRejlObxkHIxdKDSqgNmBYUuvrtzUpuiNwKBNHw55FuUyZguwc6bTavh8fjXg+1UNkKt1scLWAyFinoVPb15nUgvRS6m2EtrIdKpwrqOXxMnMTOSYOdTviHlt82qDKrzuvhCbBlhJCJ1sJH415Lj98qZZ7QqkB7g+OcLwGkdz9UDzw7rYmDfDVCdRX6HIsGt8oAGh26i9+DuEeh31ekwBPQjaDwd7JeX4S7ivCRCkPqgulcdPpGLGO6JD2N5Kdx/gPbgyzN/XCfg075/U2j0RnnAHn8AqHPmm4j7gBLR9TXMR+p3Njs64wN+I/B9gmc25Bjoez7QO2z1qlcsGU/xMvrACKp5dzXGO0BcZ6FGgFuhUA6sRGCvjv+jTDjiFzAXr1DxwY/NL/OuVSW14lb6owiQD/Xwl8iPJy+AqCfD982bzhCoHrwnaaOgfSGEqZeu9xUDuhjI0T54VfP/qupYsBe06vqog2jA3H0vcBqWKFFgqlDEK4Rp28SVKf0COnevbubX2m5zyTbCY0ozYOJqzLS1K5YU9poMh2U1raAAk2Guvp8xFQO9J4/oMu4BELndrrEmYVb99gxWHj/tWvXtm4s3cWEnwxFgb6ceHfhPJEyumOcJJDnYISmndg3WhG8adKdLgjE0U5eI+SOHj16vJ/WtgB9I5yGXXjPX8jwd7tudLH7hTzhFgXEzXXJ8gDUiejktDcN4mgEnA+fpFDhkYkh24hy+dCJYr05Ap2wpkaMGBGrC+kvhbmm40WEawFwvPkzoIYj3+FFRUULTBWCumgk6I5cZQz3drhPUro4Yx0uCtJ9A/FW2oe/qqoqOCPKuRrKAsX5gkTdt1JJIEzD/p+UayIFDzc/TGuaT/UZUfj1hqDGhVm/BSZMIyPnuVYCwgpnQfAFZNYREoD8S7Xio9zX0Qj3QvddFo2VcZpL3bVQaaCeOfMnXN9GOxT27NlTl/ebUR6BjO8Wc4CMNE3pZRQM1awgXY2Sw+GRTgEo7BT0W1KplF7QUWj4hkM4Ae6rQXPnBcpabc5sCKbHjPdSFKSjG8GNlP1JiqBbSU1jm3h2M5BjZBMFNmWEKe3gi5tsCK+VdfGi76KWEHkIVAZ5gZ6h4ahDyKWmygp6jz5m08v/AvmplDafuveYT/xOv8ghjz7mzAb3HqWcWfdglFl7DXUs3VYOxnYYHAP16dJN6FanLVuATt8LaH+V83VAuA4yHdx8R0R95tmdgGlO2wawK6AQ2tw0sVyMTTlJIG3N3/qS8Ryowun712KmrfsU3gUYbTIRPOxvSDIVve4UCaDcOsf7nLqcT90zXtCE9zBnFFowqL4u/STY8wjfXcELSF9/6PPHS3nAx6RV2YGtere+4vhLaWlpuMzMBQqm++YDiHsKvBDVmywo9LtCp4N8R+n2zrwxUBaCC3R7+BEv7BdMnYT+2P2bxthu/tbImLKAnqumWPd5bBII05ctfc0bjhBNW4pUwxB8nMInrjZUeHrTeKQ++XyfwuU1ogTSV+F0nH093tH4darcrnfBzoI8G6nXPZQ9nBoE1Yepdxrl0N3PLchc02c5NodXV1dnvPhJV+9f9/kSz8TpBNzvInQDegE22rjGgE7/1NwOw6kyjE3kcqibvBSF14ZvAREuZhiPgTr/uQy/dpVPYqPbr3FUIO/VDrb68nyOKo+3uaamRvNxV+FPUDvyNdThaqhV0iT8CyjPTOTT1DnnvxnYuQdeUlKyimcxVcchyCk8pznEf5HnMYc0t2EyFr32V26BRLypiA/wz8X2QcLOxm48cjq6NYS/RHjiZtMB435EnAX1j4d2niHRbYC/JqE9zTwGbHoQvhKZ+F0U+pGWTuJCgEpOIOw50k88qCOuLs9WIBM3oui1ctMfXW6Xr3SwD86ydIowA27BHdRnI/IG7DIO+dD/kvDY/oGZ42h0K6DSVPw6uAy324PwkG/Ar8s8nSSEnZ1wPdN74KeKZ3F1jqX3sPZo1+LP2N/EgKF61GAKoR2sdtr9pbPgnQJpjIU7KPjFpupUUN6wQUzl6oW/L1L/s+xUfZQuaeh9mLFMzpWmwoinU+R9djbvXQoezmyon0GTViS7HHpwrRtkd0fLG6iTwUPRP4U6KpnNfJttpfJ/j05vEKYnzY8P01ufxat1/G/TIR5J6IoRoqWtjlj0R64+ImvzRnIXQkcW62B7z748PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PLKgW7f/Aom0nnjYWeTKAAAAAElFTkSuQmCC";const $S={data(){return{logo:{filename:FS,alt:"Speech Olympiad Logo"}}}},LS=["src","alt"];function jS(t,e,n,r,i,s){return Y(),ee("img",{src:i.logo.filename,alt:i.logo.alt,class:"logo"},null,8,LS)}const fb=ze($S,[["render",jS],["__scopeId","data-v-f53a5274"]]);const US={components:{AppHeaderMenu:VS,SOLogo:fb},data(){return{mobileNavOpen:!1}}},hb=t=>(hr("data-v-9047eda8"),t=t(),dr(),t),BS={class:"headerbar"},qS={class:"bg-dark"},HS={class:"container mx-auto px-4 py-2"},zS={class:"flex items-center justify-between"},WS={id:"logo",class:"w-8 h-8 md:w-20 md:h-8"},KS={class:"navbar-brand",href:"/#"},GS=hb(()=>d("span",{class:"sr-only"},"Toggle navigation",-1)),YS=hb(()=>d("svg",{class:"h-6 w-6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor"},[d("path",{d:"M4 6h16M4 12h16m-7 6h7"})],-1)),QS=[GS,YS],XS={class:"hidden md:block"},JS={class:"flex space-x-4"},ZS={class:"px-2 pt-2 pb-4 space-y-2"};function ex(t,e,n,r,i,s){const o=Je("SOLogo"),a=Je("AppHeaderMenu");return Y(),ee("div",BS,[d("nav",qS,[d("div",HS,[d("div",zS,[d("div",WS,[d("a",KS,[ye(o,{class:"w-full h-full"})])]),d("button",{class:"block md:hidden text-white hover:text-gray-300 focus:outline-none",type:"button",onClick:e[0]||(e[0]=c=>i.mobileNavOpen=!i.mobileNavOpen)},QS),d("div",XS,[d("ul",JS,[ye(a)])])])]),d("div",{class:Ti(["md:hidden bg-dark",{block:i.mobileNavOpen,hidden:!i.mobileNavOpen}])},[d("ul",ZS,[ye(a)])],2)])])}const tx=ze(US,[["render",ex],["__scopeId","data-v-9047eda8"]]),nx="/assets/HomePage_carousel1_mobile.b250e0bf.jpg",rx="/assets/HomePage_carousel1_desktop.5161a5a6.jpg",ix="/assets/HomePage_carousel2_mobile.ce3ab877.jpg",sx="/assets/HomePage_carousel2_desktop.de5596f9.jpg",ox="/assets/HomePage_carousel3_mobile.a28d55c7.jpg",ax="/assets/HomePage_carousel3_desktop.fc478a3e.jpg";const cx={data(){return{HomePage_carousel1_mobile:nx,HomePage_carousel1_desktop:rx,HomePage_carousel2_mobile:ix,HomePage_carousel2_desktop:sx,HomePage_carousel3_mobile:ox,HomePage_carousel3_desktop:ax}},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},lx=t=>(hr("data-v-1b8604e1"),t=t(),dr(),t),ux={id:"myCarousel",class:"carousel slide","data-bs-ride":"carousel"},fx=lx(()=>d("div",{class:"carousel-indicators"},[d("button",{type:"button","data-bs-target":"#myCarousel","data-bs-slide-to":"0",class:"active","aria-current":"true","aria-label":"Slide 1"}),d("button",{type:"button","data-bs-target":"#myCarousel","data-bs-slide-to":"1","aria-label":"Slide 2"}),d("button",{type:"button","data-bs-target":"#myCarousel","data-bs-slide-to":"2","aria-label":"Slide 3"})],-1)),hx={class:"carousel-inner"},dx={class:"carousel-item active"},px=["src"],mx={class:"carousel-item"},gx=["src"],yx={class:"carousel-item"},vx=["src"],_x=vd('',2);function bx(t,e,n,r,i,s){return Y(),ee("div",ux,[fx,d("div",hx,[d("div",dx,[d("img",{src:s.isMobile?i.HomePage_carousel1_mobile:i.HomePage_carousel1_desktop,alt:"","aria-hidden":"true",loading:"eager"},null,8,px)]),d("div",mx,[d("img",{src:s.isMobile?i.HomePage_carousel2_mobile:i.HomePage_carousel2_desktop,alt:"","aria-hidden":"true",loading:"lazy"},null,8,gx)]),d("div",yx,[d("img",{src:s.isMobile?i.HomePage_carousel3_mobile:i.HomePage_carousel3_desktop,alt:"","aria-hidden":"true",loading:"lazy"},null,8,vx)])]),_x])}const wx=ze(cx,[["render",bx],["__scopeId","data-v-1b8604e1"]]);const Ex=4,Tx={name:"AppGallery",props:{galleryName:String,images:Array,showLink:Boolean},data(){return{currentImage:""}},computed:{previewImage(){return this.currentImage!==""?this.currentImage:""},isShowModal(){return this.currentImage!==""}},mounted(){},methods:{closeModal(t){t.target.tagName!=="IMG"&&this._setCurrentImage("")},getImages(){return console.log(this.images),this.images},preview(t){this._setCurrentImage(t)},getShowLink(){return console.log(this.showLink),this.showLink==null?!1:this.showLink},getOrder(t){return"--order:"+t%Ex+";"},_setCurrentImage(t){this.currentImage=t}}},db=t=>(hr("data-v-e4372cd0"),t=t(),dr(),t),Ix={class:"row gallery"},Ax=["onClick"],Cx=db(()=>d("h5",{class:"center"},"See full image",-1)),Sx=[Cx],xx=["src"],Px={key:0,class:"col-sm-12 col-md-3 link-container"},Rx=db(()=>d("a",{class:"gallery-link",href:"#gallery"},"View Gallery",-1)),Ox=[Rx],kx={class:"img-modal"},Dx=["src"];function Nx(t,e,n,r,i,s){return Y(),ee(Ve,null,[d("div",Ix,[(Y(!0),ee(Ve,null,Hn(s.getImages(),(o,a)=>(Y(),ee("div",{class:"img-container",style:Pl(s.getOrder(a)),key:a},[d("div",{onClick:c=>s.preview(o),class:"overlay"},Sx,8,Ax),d("img",{src:o,class:"center",alt:"",loading:"lazy"},null,8,xx)],4))),128)),s.getShowLink()?(Y(),ee("div",Px,Ox)):yt("",!0)]),tn(d("div",kx,[d("button",{onClick:e[0]||(e[0]=(...o)=>s.closeModal&&s.closeModal(...o)),type:"button",class:"btn-close btn-close-white","aria-label":"Close"}),d("img",{src:s.previewImage,class:"center",loading:"lazy"},null,8,Dx)],512),[[s2,s.isShowModal]])],64)}const pb=ze(Tx,[["render",Nx],["__scopeId","data-v-e4372cd0"]]);const Mx={name:"AppFeaturette",props:{index:Number,heading:String,headingEnd:String,text:String,image:String,urlString:String},methods:{getOrder(t,e){return t%2===0&&e===0||t%2===1&&e===1?"order-md-first":"order-md-last"}}},Vx=t=>(hr("data-v-1b85b7fd"),t=t(),dr(),t),Fx={class:"row featurette"},$x={class:"featurette-heading"},Lx={class:"nav-link"},jx={class:"text-muted"},Ux={class:"lead"},Bx=["href"],qx=["src"],Hx=Vx(()=>d("hr",{class:"featurette-divider"},null,-1));function zx(t,e,n,r,i,s){return Y(),ee(Ve,null,[d("div",Fx,[d("div",{class:Ti("col-md-7 "+s.getOrder(n.index,0))},[d("h2",$x,[d("div",Lx,[nr(Ye(n.heading)+" ",1),d("span",jx,Ye(n.headingEnd),1)])]),d("p",Ux,Ye(n.text),1),d("div",null,[d("a",{class:"read-more btn btn-secondary mb-3",href:n.urlString},"Read more",8,Bx)])],2),d("div",{class:Ti("col-md-5 "+s.getOrder(n.index,1))},[d("img",{class:"bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto w-1/2",src:n.image,alt:"",loading:"lazy"},null,8,qx)],2)]),Hx],64)}const mb=ze(Mx,[["render",zx],["__scopeId","data-v-1b85b7fd"]]);const Wx={name:"TestimonialCard",props:{imageSrc:String,title:String,subtitle:String,body:String}},Kx={class:"card testimonial-card mb-3 md-lg-0"},Gx={class:"row mt-3"},Yx={class:"col d-flex justify-content-center my-4"},Qx=["src"],Xx={class:"card-body"},Jx={class:"card-title text-left testimonial-card-heading"},Zx={class:"card-subtitle mb-2 text-muted"},eP={class:"card-text text-left testimonial-card-body"};function tP(t,e,n,r,i,s){return Y(),ee("div",Kx,[d("div",Gx,[d("div",Yx,[d("img",{alt:"",src:n.imageSrc,class:"testimonial-card-img",loading:"lazy"},null,8,Qx)])]),d("div",Xx,[d("h5",Jx,Ye(this.title),1),d("h6",Zx,Ye(this.subtitle),1),d("p",eP,'"'+Ye(this.body)+'"',1)])])}const gb=ze(Wx,[["render",tP],["__scopeId","data-v-aefe8af5"]]);let nP={name:"Doodle",mounted(){this.setColorScheme(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.colorScheme=t.matches?"dark":"light"}),this.paths=this.$el.querySelectorAll("path"),this.paths.forEach(t=>{this.setPathStrokeColor(t),this.drawPath(t)})},watch:{colorScheme(){this.paths.forEach(t=>this.setPathStrokeColor(t))}},data(){return{colorScheme:null,paths:[]}},methods:{setColorScheme:function(){window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?this.colorScheme="dark":this.colorScheme="light"},setPathStrokeColor:function(t){t.style.stroke=this.colorScheme==="dark"?"white":"black"},drawPath:function(t){let e=t.getTotalLength();t.style.strokeDasharray=e,t.style.strokeDashoffset=e,window.addEventListener("scroll",function(n){let r=(document.documentElement.scrollTop+document.body.scrollTop)/(document.documentElement.scrollHeight-document.documentElement.clientHeight),i=e*r;t.style.strokeDashoffset=e-i,r>=.99?t.style.strokeDasharray=0:t.style.strokeDasharray=e})}}};const rP=nP,iP={id:"doodle"},sP=vd('',1),oP=[sP];function aP(t,e,n,r,i,s){return Y(),ee("div",iP,oP)}const cP=ze(rP,[["render",aP],["__scopeId","data-v-c108975c"]]),lP="/assets/HomePage_About.c100ebcf.jpg",uP="/assets/HomePage_testimonial_sirimevan.c43b09f7.jpg",fP="/assets/HomePage_testimonial_malindi.518dfdf3.jpeg",hP="/assets/HomePage_testimonial_amaya.3226fc94.jpg",dP="/assets/HomePage_testimonial_asitha.589462e3.jpg",yb="/assets/prelis1.c5d4e42a.jpg",vb="/assets/prelis2.0d38f998.jpg",_b="/assets/prelis3.96cac351.jpg";function pP(t){const e=new IntersectionObserver(r=>{r.forEach(i=>{i.isIntersecting?i.target.classList.add("animated-show"):i.target.classList.remove("animated-show")})});document.querySelectorAll(t).forEach(r=>e.observe(r))}const mP="modulepreload",gP=function(t){return"/"+t},Mg={},yP=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=gP(s),s in Mg)return;Mg[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":mP,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((u,f)=>{l.addEventListener("load",u),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},vP=typeof navigator>"u"?!1:navigator.product==="ReactNative",bb={timeout:vP?6e4:12e4},_P=function(e){const n={...bb,...typeof e=="string"?{url:e}:e},{searchParams:r}=new URL(n.url,"http://localhost");if(n.timeout=wb(n.timeout),n.query){for(const[o,a]of Object.entries(n.query))if(a!==void 0)if(Array.isArray(a))for(const c of a)r.append(o,c);else r.append(o,a)}const[i]=n.url.split("?"),s=r.toString();return s&&(n.url="".concat(i,"?").concat(s)),n.method=n.body&&!n.method?"POST":(n.method||"GET").toUpperCase(),n};function wb(t){if(t===!1||t===0)return!1;if(t.connect||t.socket)return t;const e=Number(t);return isNaN(e)?wb(bb.timeout):{connect:e,socket:e}}const bP=/^https?:\/\//i,wP=function(e){if(!bP.test(e.url))throw new Error('"'.concat(e.url,'" is not a valid URL'))};var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ef=function(t){return t.replace(/^\s+|\s+$/g,"")},EP=function(t){return Object.prototype.toString.call(t)==="[object Array]"},Eb=function(t){if(!t)return{};for(var e={},n=ef(t).split(` -`),r=0;r"u"?e[o]=a:EP(e[o])?e[o].push(a):e[o]=[e[o],a]}return e};const TP=t=>function(n,r){const i=n==="onError";let s=r;for(var o=arguments.length,a=new Array(o>2?o-2:0),c=2;c(s[o]=s[o]||[],s),{processOptions:[_P],validateOptions:[wP]});function i(s){const o=(P,v,A)=>{let E=P,C=v;if(!E)try{C=c("onResponse",v,A)}catch(D){C=null,E=D}E=E&&c("onError",E,A),E?a.error.publish(E):C&&a.response.publish(C)},a=AP.reduce((P,v)=>(P[v]=IP(),P),{}),c=TP(r),l=c("processOptions",s);c("validateOptions",l);const u={options:l,channels:a,applyMiddleware:c};let f;const h=a.request.subscribe(P=>{f=e(P,(v,A)=>o(v,A,P))});a.abort.subscribe(()=>{h(),f&&f.abort()});const m=c("onReturn",a,u);return m===a&&a.request.publish(u),m}return i.use=function(o){if(!o)throw new Error("Tried to add middleware that resolved to falsey value");if(typeof o=="function")throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(o.onReturn&&r.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return Vg.forEach(a=>{o[a]&&r[a].push(o[a])}),n.push(o),i},i.clone=()=>Tb(n,e),t.forEach(i.use),i}var CP=Object.defineProperty,SP=(t,e,n)=>e in t?CP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,In=(t,e,n)=>(SP(t,typeof e!="symbol"?e+"":e,n),n),Ib=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},An=(t,e,n)=>(Ib(t,e,"read from private field"),n?n.call(t):e.get(t)),ji=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ei=(t,e,n,r)=>(Ib(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),hc,dc,zi,pc,Er,mc;class Ab{constructor(){In(this,"onabort"),In(this,"onerror"),In(this,"onreadystatechange"),In(this,"ontimeout"),In(this,"readyState",0),In(this,"response"),In(this,"responseText"),In(this,"responseType",""),In(this,"status"),In(this,"statusText"),In(this,"withCredentials"),ji(this,hc,void 0),ji(this,dc,void 0),ji(this,zi,void 0),ji(this,pc,{}),ji(this,Er,void 0),ji(this,mc,{})}open(e,n,r){ei(this,hc,e),ei(this,dc,n),ei(this,zi,""),this.readyState=1,this.onreadystatechange(),ei(this,Er,void 0)}abort(){An(this,Er)&&An(this,Er).abort()}getAllResponseHeaders(){return An(this,zi)}setRequestHeader(e,n){An(this,pc)[e]=n}setInit(e){ei(this,mc,e)}send(e){const n=this.responseType!=="arraybuffer",r={...An(this,mc),method:An(this,hc),headers:An(this,pc),body:e};typeof AbortController=="function"&&(ei(this,Er,new AbortController),typeof EventTarget<"u"&&An(this,Er).signal instanceof EventTarget&&(r.signal=An(this,Er).signal)),typeof document<"u"&&(r.credentials=this.withCredentials?"include":"omit"),fetch(An(this,dc),r).then(i=>(i.headers.forEach((s,o)=>{ei(this,zi,An(this,zi)+"".concat(o,": ").concat(s,`\r -`))}),this.status=i.status,this.statusText=i.statusText,this.readyState=3,n?i.text():i.arrayBuffer())).then(i=>{typeof i=="string"?this.responseText=i:this.response=i,this.readyState=4,this.onreadystatechange()}).catch(i=>{var s;if(i.name==="AbortError"){this.onabort();return}(s=this.onerror)==null||s.call(this,i)})}}hc=new WeakMap;dc=new WeakMap;zi=new WeakMap;pc=new WeakMap;Er=new WeakMap;mc=new WeakMap;const ah=typeof XMLHttpRequest=="function"?"xhr":"fetch",xP=ah==="xhr"?XMLHttpRequest:Ab,PP=(t,e)=>{const n=t.options,r=t.applyMiddleware("finalizeOptions",n),i={},s=t.applyMiddleware("interceptRequest",void 0,{adapter:ah,context:t});if(s){const D=setTimeout(e,0,null,s);return{abort:()=>clearTimeout(D)}}let o=new xP;o instanceof Ab&&typeof r.fetch=="object"&&o.setInit(r.fetch);const a=r.headers,c=r.timeout;let l=!1,u=!1,f=!1;if(o.onerror=D=>{A(new Error("Request error while attempting to reach ".concat(r.url).concat(D.lengthComputable?"(".concat(D.loaded," of ").concat(D.total," bytes transferred)"):"")))},o.ontimeout=D=>{A(new Error("Request timeout while attempting to reach ".concat(r.url).concat(D.lengthComputable?"(".concat(D.loaded," of ").concat(D.total," bytes transferred)"):"")))},o.onabort=()=>{v(!0),l=!0},o.onreadystatechange=()=>{P(),!(l||o.readyState!==4)&&o.status!==0&&C()},o.open(r.method,r.url,!0),o.withCredentials=!!r.withCredentials,a&&o.setRequestHeader)for(const D in a)a.hasOwnProperty(D)&&o.setRequestHeader(D,a[D]);return r.rawBody&&(o.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:r,adapter:ah,request:o,context:t}),o.send(r.body||null),c&&(i.connect=setTimeout(()=>m("ETIMEDOUT"),c.connect)),{abort:h};function h(){l=!0,o&&o.abort()}function m(D){f=!0,o.abort();const F=new Error(D==="ESOCKETTIMEDOUT"?"Socket timed out on request to ".concat(r.url):"Connection timed out on request to ".concat(r.url));F.code=D,t.channels.error.publish(F)}function P(){!c||(v(),i.socket=setTimeout(()=>m("ESOCKETTIMEDOUT"),c.socket))}function v(D){(D||l||o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function A(D){if(u)return;v(!0),u=!0,o=null;const F=D||new Error("Network error while attempting to reach ".concat(r.url));F.isNetworkError=!0,F.request=r,e(F)}function E(){return{body:o.response||(o.responseType===""||o.responseType==="text"?o.responseText:""),url:r.url,method:r.method,headers:Eb(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText}}function C(){if(!(l||u||f)){if(o.status===0){A(new Error("Unknown XHR error"));return}v(),u=!0,e(null,E())}}},RP=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:PP;return Tb(t,e)};var Fg={exports:{}},tf,$g;function OP(){if($g)return tf;$g=1;var t=1e3,e=t*60,n=e*60,r=n*24,i=r*7,s=r*365.25;tf=function(u,f){f=f||{};var h=typeof u;if(h==="string"&&u.length>0)return o(u);if(h==="number"&&isFinite(u))return f.long?c(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function o(u){if(u=String(u),!(u.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(!!f){var h=parseFloat(f[1]),m=(f[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return h*s;case"weeks":case"week":case"w":return h*i;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(u){var f=Math.abs(u);return f>=r?Math.round(u/r)+"d":f>=n?Math.round(u/n)+"h":f>=e?Math.round(u/e)+"m":f>=t?Math.round(u/t)+"s":u+"ms"}function c(u){var f=Math.abs(u);return f>=r?l(u,f,r,"day"):f>=n?l(u,f,n,"hour"):f>=e?l(u,f,e,"minute"):f>=t?l(u,f,t,"second"):u+" ms"}function l(u,f,h,m){var P=f>=h*1.5;return Math.round(u/h)+" "+m+(P?"s":"")}return tf}function kP(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=i,n.enabled=o,n.humanize=OP(),n.destroy=l,Object.keys(t).forEach(u=>{n[u]=t[u]}),n.names=[],n.skips=[],n.formatters={};function e(u){let f=0;for(let h=0;h{if(se==="%%")return"%";F++;const te=n.formatters[ge];if(typeof te=="function"){const Z=A[F];se=te.call(E,Z),A.splice(F,1),F--}return se}),n.formatArgs.call(E,A),(E.log||n.log).apply(E,A)}return v.namespace=u,v.useColors=n.useColors(),v.color=n.selectColor(u),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(m!==n.namespaces&&(m=n.namespaces,P=n.enabled(u)),P),set:A=>{h=A}}),typeof n.init=="function"&&n.init(v),v}function r(u,f){const h=n(this.namespace+(typeof f>"u"?":":f)+u);return h.log=this.log,h}function i(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f;const h=(typeof u=="string"?u:"").split(/[\s,]+/),m=h.length;for(f=0;f"-"+f)].join(",");return n.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let f,h;for(f=0,h=n.skips.length;f{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,f=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(u++,h==="%c"&&(f=u))}),c.splice(f,0,l)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c={}.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=DP(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Fg,Fg.exports);/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */function Lg(t){return Object.prototype.toString.call(t)==="[object Object]"}function NP(t){var e,n;return Lg(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(Lg(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}const MP=typeof Buffer>"u"?()=>!1:t=>Buffer.isBuffer(t),VP=["boolean","string","number"];function FP(){return{processOptions:t=>{const e=t.body;return!e||!(!(typeof e.pipe=="function")&&!MP(e)&&(VP.indexOf(typeof e)!==-1||Array.isArray(e)||NP(e)))?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}}}function $P(t){return{onResponse:n=>{const r=n.headers["content-type"]||"",i=t&&t.force||r.indexOf("application/json")!==-1;return!n.body||!r||!i?n:Object.assign({},n,{body:e(n.body)})},processOptions:n=>Object.assign({},n,{headers:Object.assign({Accept:"application/json"},n.headers)})};function e(n){try{return JSON.parse(n)}catch(r){throw r.message="Failed to parsed response body as JSON: ".concat(r.message),r}}}let Ks={};typeof globalThis<"u"?Ks=globalThis:typeof window<"u"?Ks=window:typeof global<"u"?Ks=global:typeof self<"u"&&(Ks=self);var LP=Ks;function jP(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).implementation||LP.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(n,r)=>new e(i=>(n.error.subscribe(s=>i.error(s)),n.progress.subscribe(s=>i.next(Object.assign({type:"progress"},s))),n.response.subscribe(s=>{i.next(Object.assign({type:"response"},s)),i.complete()}),n.request.publish(r),()=>n.abort.publish()))}}function UP(){return{onRequest:t=>{if(t.adapter!=="xhr")return;const e=t.request,n=t.context;"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=r("upload")),"onprogress"in e&&(e.onprogress=r("download"));function r(i){return s=>{const o=s.lengthComputable?s.loaded/s.total*100:-1;n.channels.progress.publish({stage:i,percent:o,total:s.total,loaded:s.loaded,lengthComputable:s.lengthComputable})}}}}}var BP=Object.defineProperty,qP=(t,e,n)=>e in t?BP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oo=(t,e,n)=>(qP(t,typeof e!="symbol"?e+"":e,n),n);class HP{constructor(e){Oo(this,"__CANCEL__",!0),Oo(this,"message"),this.message=e}toString(){return"Cancel".concat(this.message?": ".concat(this.message):"")}}const jg=class{constructor(e){if(Oo(this,"promise"),Oo(this,"reason"),typeof e!="function")throw new TypeError("executor must be a function.");let n=null;this.promise=new Promise(r=>{n=r}),e(r=>{this.reason||(this.reason=new HP(r),n(this.reason))})}};Oo(jg,"source",()=>{let t;return{token:new jg(n=>{t=n}),cancel:t}});var Cb=(t,e,n)=>n.method!=="GET"&&n.method!=="HEAD"?!1:t.isNetworkError||!1;const zP=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";var WP=t=>{const e=t.maxRetries||5,n=t.retryDelay||KP,r=t.shouldRetry;return{onError:(i,s)=>{const o=s.options,a=o.maxRetries||e,c=o.shouldRetry||r,l=o.attemptNumber||0;if(zP(o.body)||!c(i,l,o)||l>=a)return i;const u=Object.assign({},s,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>s.channels.request.publish(u),n(l)),null}}};function KP(t){return 100*Math.pow(2,t)+Math.random()*100}const Fd=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return WP({shouldRetry:Cb,...t})};Fd.shouldRetry=Cb;var ch=function(t,e){return ch=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ch(t,e)};function $d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ch(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Ug(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function zc(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function Wc(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;re in t?lR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cr=(t,e,n)=>(uR(t,typeof e!="symbol"?e+"":e,n),n);const sf=5;class fR extends Error{constructor(e){const n=Ob(e);super(n.message),Cr(this,"response"),Cr(this,"statusCode",400),Cr(this,"responseBody"),Cr(this,"details"),Object.assign(this,n)}}class hR extends Error{constructor(e){const n=Ob(e);super(n.message),Cr(this,"response"),Cr(this,"statusCode",500),Cr(this,"responseBody"),Cr(this,"details"),Object.assign(this,n)}}function Ob(t){const e=t.body,n={response:t,statusCode:t.statusCode,responseBody:mR(e,t),message:"",details:void 0};if(e.error&&e.message)return n.message="".concat(e.error," - ").concat(e.message),n;if(dR(e)){const r=e.error.items||[],i=r.slice(0,sf).map(o=>{var a;return(a=o.error)==null?void 0:a.description}).filter(Boolean);let s=i.length?`: -- `.concat(i.join(` -- `)):"";return r.length>sf&&(s+=` -...and `.concat(r.length-sf," more")),n.message="".concat(e.error.description).concat(s),n.details=e.error,n}return e.error&&e.error.description?(n.message=e.error.description,n.details=e.error,n):(n.message=e.error||e.message||pR(t),n)}function dR(t){return Wg(t)&&Wg(t.error)&&t.error.type==="mutationError"&&typeof t.error.description=="string"}function Wg(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function pR(t){const e=t.statusMessage?" ".concat(t.statusMessage):"";return"".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)}function mR(t,e){return(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")!==-1?JSON.stringify(t,null,2):t}const gR={onResponse:t=>{if(t.statusCode>=500)throw new hR(t);if(t.statusCode>=400)throw new fR(t);return t}},yR={onResponse:t=>{const e=t.headers["x-sanity-warning"];return(Array.isArray(e)?e:[e]).filter(Boolean).forEach(r=>console.warn(r)),t}};function vR(t,e){let{maxRetries:n=5,retryDelay:r}=e;const i=RP([n>0?Fd({retryDelay:r,maxRetries:n,shouldRetry:_R}):{},...t,yR,FP(),$P(),UP(),gR,jP({implementation:ko})]);function s(o){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:i)({maxRedirects:0,...o})}return s.defaultRequester=i,s}function _R(t,e,n){const r=n.method==="GET"||n.method==="HEAD",s=(n.uri||n.url).startsWith("/data/query"),o=t.response&&(t.response.statusCode===429||t.response.statusCode===502||t.response.statusCode===503);return(r||s)&&o?!0:Fd.shouldRetry(t,e,n)}const bR="https://www.sanity.io/help/";function Bd(t){return bR+t}const Kg=["image","file"],Gg=["before","after","replace"],kb=t=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},wR=t=>{if(!/^[-a-z0-9]+$/i.test(t))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},ER=t=>{if(Kg.indexOf(t)===-1)throw new Error("Invalid asset type: ".concat(t,". Must be one of ").concat(Kg.join(", ")))},lo=(t,e)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new Error("".concat(t,"() takes an object of properties"))},Db=(t,e)=>{if(typeof e!="string"||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(e)||e.includes(".."))throw new Error("".concat(t,'(): "').concat(e,'" is not a valid document ID'))},Kc=(t,e)=>{if(!e._id)throw new Error("".concat(t,'() requires that the document contains an ID ("_id" property)'));Db(t,e._id)},TR=(t,e,n)=>{const r="insert(at, selector, items)";if(Gg.indexOf(t)===-1){const i=Gg.map(s=>'"'.concat(s,'"')).join(", ");throw new Error("".concat(r,' takes an "at"-argument which is one of: ').concat(i))}if(typeof e!="string")throw new Error("".concat(r,' takes a "selector"-argument which must be a string'));if(!Array.isArray(n))throw new Error("".concat(r,' takes an "items"-argument which must be an array'))},Nb=t=>{if(!t.dataset)throw new Error("`dataset` must be provided to perform queries");return t.dataset||""},Mb=t=>{if(typeof t!="string"||!/^[a-z0-9._-]{1,75}$/i.test(t))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t};function IR(t){let e=!1,n;return function(){return e||(n=t(...arguments),e=!0),n}}const Kl=t=>IR(function(){for(var e=arguments.length,n=new Array(e),r=0;rRR.indexOf(t)!==-1,kR=function(e){if(e==="1"||e==="X")return;const n=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&n instanceof Date&&n.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")},Vb=function(e){switch(e){case"previewDrafts":case"published":case"raw":return;default:throw new TypeError("Invalid API perspective string, expected `published`, `previewDrafts` or `raw`")}},Fb=(t,e)=>{const n=Object.assign({},e,t);n.apiVersion||SR();const r=Object.assign({},Gc,n),i=r.useProjectHostname;if(typeof Promise>"u"){const f=Bd("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(f))}if(i&&!r.projectId)throw new Error("Configuration must contain `projectId`");if(typeof r.perspective=="string"&&Vb(r.perspective),"encodeSourceMapAtPath"in r||"encodeSourceMap"in r||"studioUrl"in r||"logger"in r)throw new Error("It looks like you're using options meant for '@sanity/preview-kit/client', such as 'encodeSourceMapAtPath', 'encodeSourceMap', 'studioUrl' and 'logger'. Make sure you're using the right import.");const s=typeof window<"u"&&window.location&&window.location.hostname,o=s&&OR(window.location.hostname);s&&o&&r.token&&r.ignoreBrowserTokenWarning!==!0?CR():typeof r.useCdn>"u"&&AR(),i&&wR(r.projectId),r.dataset&&kb(r.dataset),"requestTagPrefix"in r&&(r.requestTagPrefix=r.requestTagPrefix?Mb(r.requestTagPrefix).replace(/\.+$/,""):void 0),r.apiVersion="".concat(r.apiVersion).replace(/^v/,""),r.isDefaultApi=r.apiHost===Gc.apiHost,r.useCdn=r.useCdn!==!1&&!r.withCredentials,kR(r.apiVersion);const a=r.apiHost.split("://",2),c=a[0],l=a[1],u=r.isDefaultApi?PR:l;return r.useProjectHostname?(r.url="".concat(c,"://").concat(r.projectId,".").concat(l,"/v").concat(r.apiVersion),r.cdnUrl="".concat(c,"://").concat(r.projectId,".").concat(u,"/v").concat(r.apiVersion)):(r.url="".concat(r.apiHost,"/v").concat(r.apiVersion),r.cdnUrl=r.url),r},DR="X-Sanity-Project-ID";function NR(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n={},r=e.token||t.token;r&&(n.Authorization="Bearer ".concat(r)),!e.useGlobalApi&&!t.useProjectHostname&&t.projectId&&(n[DR]=t.projectId);const i=Boolean(typeof e.withCredentials>"u"?t.token||t.withCredentials:e.withCredentials),s=typeof e.timeout>"u"?t.timeout:e.timeout;return Object.assign({},e,{headers:Object.assign({},n,e.headers||{}),timeout:typeof s>"u"?5*60*1e3:s,proxy:e.proxy||t.proxy,json:!0,withCredentials:i,fetch:typeof e.fetch=="object"&&typeof t.fetch=="object"?{...t.fetch,...e.fetch}:e.fetch||t.fetch})}function $b(t){if(typeof t=="string"||Array.isArray(t))return{id:t};if(typeof t=="object"&&t!==null&&"query"in t&&typeof t.query=="string")return"params"in t&&typeof t.params=="object"&&t.params!==null?{query:t.query,params:t.params}:{query:t.query};const e=["* Document ID ()","* Array of document IDs","* Object containing `query`"].join(` -`);throw new Error(`Unknown selection - must be one of: - -`.concat(e))}const Lb=t=>{let{query:e,params:n={},options:r={}}=t;const i=new URLSearchParams,{tag:s,...o}=r;s&&i.append("tag",s),i.append("query",e);for(const[a,c]of Object.entries(n))i.append("$".concat(a),JSON.stringify(c));for(const[a,c]of Object.entries(o))c&&i.append(a,"".concat(c));return"?".concat(i)};var MR=Object.defineProperty,VR=(t,e,n)=>e in t?MR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yg=(t,e,n)=>(VR(t,typeof e!="symbol"?e+"":e,n),n),jb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},os=(t,e,n)=>(jb(t,e,"read from private field"),n?n.call(t):e.get(t)),Ub=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Bb=(t,e,n,r)=>(jb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Wi,Ki;class qb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Yg(this,"selection"),Yg(this,"operations"),this.selection=e,this.operations=n}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return lo("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,n,r){return TR(e,n,r),this._assign("insert",{[e]:n,items:r})}append(e,n){return this.insert("after","".concat(e,"[-1]"),n)}prepend(e,n){return this.insert("before","".concat(e,"[0]"),n)}splice(e,n,r,i){const s=typeof r>"u"||r===-1,o=n<0?n-1:n,a=s?-1:Math.max(0,n+r),c=o<0&&a>=0?"":a,l="".concat(e,"[").concat(o,":").concat(c,"]");return this.insert("replace",l,i||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...$b(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return lo(e,n),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},n)}),this}_set(e,n){return this._assign(e,n,!1)}}const FR=class Hb extends qb{constructor(e,n,r){super(e,n),Ub(this,Wi,void 0),Bb(this,Wi,r)}clone(){return new Hb(this.selection,{...this.operations},os(this,Wi))}commit(e){if(!os(this,Wi))throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");const n=typeof this.selection=="string",r=Object.assign({returnFirst:n,returnDocuments:!0},e);return os(this,Wi).mutate({patch:this.serialize()},r)}};Wi=new WeakMap;let uo=FR;const $R=class zb extends qb{constructor(e,n,r){super(e,n),Ub(this,Ki,void 0),Bb(this,Ki,r)}clone(){return new zb(this.selection,{...this.operations},os(this,Ki))}commit(e){if(!os(this,Ki))throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");const n=typeof this.selection=="string",r=Object.assign({returnFirst:n,returnDocuments:!0},e);return os(this,Ki).mutate({patch:this.serialize()},r)}};Ki=new WeakMap;let fo=$R;var LR=Object.defineProperty,jR=(t,e,n)=>e in t?LR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qg=(t,e,n)=>(jR(t,typeof e!="symbol"?e+"":e,n),n),Wb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Sr=(t,e,n)=>(Wb(t,e,"read from private field"),n?n.call(t):e.get(t)),Kb=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Gb=(t,e,n,r)=>(Wb(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ti,ni;const Yb={returnDocuments:!1};class Qb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;Qg(this,"operations"),Qg(this,"trxId"),this.operations=e,this.trxId=n}create(e){return lo("create",e),this._add({create:e})}createIfNotExists(e){const n="createIfNotExists";return lo(n,e),Kc(n,e),this._add({[n]:e})}createOrReplace(e){const n="createOrReplace";return lo(n,e),Kc(n,e),this._add({[n]:e})}delete(e){return Db("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}const UR=class Xb extends Qb{constructor(e,n,r){super(e,r),Kb(this,ti,void 0),Gb(this,ti,n)}clone(){return new Xb([...this.operations],Sr(this,ti),this.trxId)}commit(e){if(!Sr(this,ti))throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return Sr(this,ti).mutate(this.serialize(),Object.assign({transactionId:this.trxId},Yb,e||{}))}patch(e,n){const r=typeof n=="function";if(typeof e!="string"&&e instanceof fo)return this._add({patch:e.serialize()});if(r){const s=n(new fo(e,{},Sr(this,ti)));if(!(s instanceof fo))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:s.serialize()})}return this._add({patch:{id:e,...n}})}};ti=new WeakMap;let Jb=UR;const BR=class Zb extends Qb{constructor(e,n,r){super(e,r),Kb(this,ni,void 0),Gb(this,ni,n)}clone(){return new Zb([...this.operations],Sr(this,ni),this.trxId)}commit(e){if(!Sr(this,ni))throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return Sr(this,ni).mutate(this.serialize(),Object.assign({transactionId:this.trxId},Yb,e||{}))}patch(e,n){const r=typeof n=="function";if(typeof e!="string"&&e instanceof uo)return this._add({patch:e.serialize()});if(r){const s=n(new uo(e,{},Sr(this,ni)));if(!(s instanceof uo))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:s.serialize()})}return this._add({patch:{id:e,...n}})}};ni=new WeakMap;let e0=BR;const qR=(t,e)=>t===!1?void 0:typeof t>"u"?e:t,HR=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{dryRun:t.dryRun,returnIds:!0,returnDocuments:qR(t.returnDocuments,!0),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}},qd=t=>t.type==="response",zR=t=>t.body,WR=(t,e)=>t.reduce((n,r)=>(n[e(r)]=r,n),Object.create(null)),KR=11264;function t0(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=i.filterResponse===!1?u=>u:u=>u.result,{cache:o,next:a,...c}=i,l=typeof o<"u"||typeof a<"u"?{...c,fetch:{cache:o,next:a}}:c;return na(t,e,"query",{query:n,params:r},l).pipe(Ci(s))}function n0(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i={uri:Cs(t,"doc",n),json:!0,tag:r.tag};return ra(t,e,i).pipe(ta(qd),Ci(s=>s.body.documents&&s.body.documents[0]))}function r0(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i={uri:Cs(t,"doc",n.join(",")),json:!0,tag:r.tag};return ra(t,e,i).pipe(ta(qd),Ci(s=>{const o=WR(s.body.documents||[],a=>a._id);return n.map(a=>o[a]||null)}))}function i0(t,e,n,r){return Kc("createIfNotExists",n),Gl(t,e,n,"createIfNotExists",r)}function s0(t,e,n,r){return Kc("createOrReplace",n),Gl(t,e,n,"createOrReplace",r)}function o0(t,e,n,r){return na(t,e,"mutate",{mutations:[{delete:$b(n)}]},r)}function a0(t,e,n,r){let i;n instanceof fo||n instanceof uo?i={patch:n.serialize()}:n instanceof Jb||n instanceof e0?i=n.serialize():i=n;const s=Array.isArray(i)?i:[i],o=r&&r.transactionId||void 0;return na(t,e,"mutate",{mutations:s,transactionId:o},r)}function na(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s=n==="mutate",o=n==="query",a=s?"":Lb(r),c=!s&&a.length{if(!s)return E;const C=E.results||[];if(i.returnDocuments)return u?C[0]&&C[0].document:C.map(G=>G.document);const D=u?"documentId":"documentIds",F=u?C[0]&&C[0].id:C.map(G=>G.id);return{transactionId:E.transactionId,results:C,[D]:F}}))}function Gl(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};const s={[r]:n},o=Object.assign({returnFirst:!0,returnDocuments:!0},i);return na(t,e,"mutate",{mutations:[s]},o)}function ra(t,e,n){var r;const i=n.url||n.uri,s=t.config(),o=typeof n.canUseCdn>"u"?["GET","HEAD"].indexOf(n.method||"GET")>=0&&i.indexOf("/data/")===0:n.canUseCdn,a=s.useCdn&&o,c=n.tag&&s.requestTagPrefix?[s.requestTagPrefix,n.tag].join("."):n.tag||s.requestTagPrefix;if(c&&(n.query={tag:Mb(c),...n.query}),["GET","HEAD","POST"].indexOf(n.method||"GET")>=0&&i.indexOf("/data/query/")===0){((r=n.resultSourceMap)!=null?r:s.resultSourceMap)&&(n.query={resultSourceMap:!0,...n.query});const f=n.perspective||s.perspective;typeof f=="string"&&f!=="raw"&&(Vb(f),n.query={perspective:f,...n.query})}const l=NR(s,Object.assign({},n,{url:Hd(t,i,a)})),u=new ko(f=>e(l,s.requester).subscribe(f));return n.signal?u.pipe(GR(n.signal)):u}function Nn(t,e,n){return ra(t,e,n).pipe(ta(i=>i.type==="response"),Ci(i=>i.body))}function Cs(t,e,n){const r=t.config(),i=Nb(r),s="/".concat(e,"/").concat(i),o=n?"".concat(s,"/").concat(n):s;return"/data".concat(o).replace(/\/($|\?)/,"$1")}function Hd(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{url:r,cdnUrl:i}=t.config(),s=n?i:r;return"".concat(s,"/").concat(e.replace(/^\//,""))}function GR(t){return e=>new ko(n=>{const r=()=>n.error(QR(t));if(t&&t.aborted){r();return}const i=e.subscribe(n);return t.addEventListener("abort",r),()=>{t.removeEventListener("abort",r),i.unsubscribe()}})}const YR=Boolean(globalThis.DOMException);function QR(t){var e,n;if(YR)return new DOMException((e=t==null?void 0:t.reason)!=null?e:"The operation was aborted.","AbortError");const r=new Error((n=t==null?void 0:t.reason)!=null?n:"The operation was aborted.");return r.name="AbortError",r}var c0=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Yc=(t,e,n)=>(c0(t,e,"read from private field"),n?n.call(t):e.get(t)),Qc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Xc=(t,e,n,r)=>(c0(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),gc,yc,vc,_c;class XR{constructor(e,n){Qc(this,gc,void 0),Qc(this,yc,void 0),Xc(this,gc,e),Xc(this,yc,n)}upload(e,n,r){return l0(Yc(this,gc),Yc(this,yc),e,n,r)}}gc=new WeakMap;yc=new WeakMap;class JR{constructor(e,n){Qc(this,vc,void 0),Qc(this,_c,void 0),Xc(this,vc,e),Xc(this,_c,n)}upload(e,n,r){const i=l0(Yc(this,vc),Yc(this,_c),e,n,r);return Tt(i.pipe(ta(s=>s.type==="response"),Ci(s=>s.body.document)))}}vc=new WeakMap;_c=new WeakMap;function l0(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};ER(n);let s=i.extract||void 0;s&&!s.length&&(s=["none"]);const o=Nb(t.config()),a=n==="image"?"images":"files",c=ZR(i,r),{tag:l,label:u,title:f,description:h,creditLine:m,filename:P,source:v}=c,A={label:u,title:f,description:h,filename:P,meta:s,creditLine:m};return v&&(A.sourceId=v.id,A.sourceName=v.name,A.sourceUrl=v.url),ra(t,e,{tag:l,method:"POST",timeout:c.timeout||0,uri:"/assets/".concat(a,"/").concat(o),headers:c.contentType?{"Content-Type":c.contentType}:{},query:A,body:r})}function ZR(t,e){return typeof File>"u"||!(e instanceof File)?t:Object.assign({filename:t.preserveFilename===!1?void 0:e.name,contentType:e.type},t)}var eO=(t,e)=>Object.keys(e).concat(Object.keys(t)).reduce((n,r)=>(n[r]=typeof t[r]>"u"?e[r]:t[r],n),{});const tO=(t,e)=>e.reduce((n,r)=>(typeof t[r]>"u"||(n[r]=t[r]),n),{}),nO=16e3-1200,rO=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],iO={includeResult:!0};function u0(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{url:r,token:i,withCredentials:s,requestTagPrefix:o}=this.config(),a=n.tag&&o?[o,n.tag].join("."):n.tag,c={...eO(n,iO),tag:a},l=tO(c,rO),u=Lb({query:t,params:e,options:{tag:a,...l}}),f="".concat(r).concat(Cs(this,"listen",u));if(f.length>nO)return new ko(v=>v.error(new Error("Query too large for listener")));const h=c.events?c.events:["mutation"],m=h.indexOf("reconnect")!==-1,P={};return(i||s)&&(P.withCredentials=!0),i&&(P.headers={Authorization:"Bearer ".concat(i)}),new ko(v=>{let A;Z().then(w=>{A=w}).catch(w=>{v.error(w),O()});let E,C=!1;function D(){C||(te(),!C&&A.readyState===A.CLOSED&&(ge(),clearTimeout(E),E=setTimeout(oe,100)))}function F(w){v.error(sO(w))}function G(w){const N=f0(w);return N instanceof Error?v.error(N):v.next(N)}function se(){C=!0,ge(),v.complete()}function ge(){!A||(A.removeEventListener("error",D),A.removeEventListener("channelError",F),A.removeEventListener("disconnect",se),h.forEach(w=>A.removeEventListener(w,G)),A.close())}function te(){m&&v.next({type:"reconnect"})}async function Z(){const{default:w}=await yP(()=>import("./browser.ef1932a4.js").then(R=>R.b),[]),N=new w(f,P);return N.addEventListener("error",D),N.addEventListener("channelError",F),N.addEventListener("disconnect",se),h.forEach(R=>N.addEventListener(R,G)),N}function oe(){Z().then(w=>{A=w}).catch(w=>{v.error(w),O()})}function O(){C=!0,ge()}return O})}function f0(t){try{const e=t.data&&JSON.parse(t.data)||{};return Object.assign({type:t.type},e)}catch(e){return e}}function sO(t){if(t instanceof Error)return t;const e=f0(t);return e instanceof Error?e:new Error(oO(e))}function oO(t){return t.error?t.error.description?t.error.description:typeof t.error=="string"?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error"}var h0=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Vt=(t,e,n)=>(h0(t,e,"read from private field"),n?n.call(t):e.get(t)),Jc=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Zc=(t,e,n,r)=>(h0(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ri,ii,si,oi;class aO{constructor(e,n){Jc(this,ri,void 0),Jc(this,ii,void 0),Zc(this,ri,e),Zc(this,ii,n)}create(e,n){return as(Vt(this,ri),Vt(this,ii),"PUT",e,n)}edit(e,n){return as(Vt(this,ri),Vt(this,ii),"PATCH",e,n)}delete(e){return as(Vt(this,ri),Vt(this,ii),"DELETE",e)}list(){return Nn(Vt(this,ri),Vt(this,ii),{uri:"/datasets"})}}ri=new WeakMap;ii=new WeakMap;class cO{constructor(e,n){Jc(this,si,void 0),Jc(this,oi,void 0),Zc(this,si,e),Zc(this,oi,n)}create(e,n){return Tt(as(Vt(this,si),Vt(this,oi),"PUT",e,n))}edit(e,n){return Tt(as(Vt(this,si),Vt(this,oi),"PATCH",e,n))}delete(e){return Tt(as(Vt(this,si),Vt(this,oi),"DELETE",e))}list(){return Tt(Nn(Vt(this,si),Vt(this,oi),{uri:"/datasets"}))}}si=new WeakMap;oi=new WeakMap;function as(t,e,n,r,i){return kb(r),Nn(t,e,{method:n,uri:"/datasets/".concat(r),body:i})}var d0=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},xr=(t,e,n)=>(d0(t,e,"read from private field"),n?n.call(t):e.get(t)),el=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},tl=(t,e,n,r)=>(d0(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Gs,Ys,Qs,Xs;class lO{constructor(e,n){el(this,Gs,void 0),el(this,Ys,void 0),tl(this,Gs,e),tl(this,Ys,n)}list(e){const n=(e==null?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return Nn(xr(this,Gs),xr(this,Ys),{uri:n})}getById(e){return Nn(xr(this,Gs),xr(this,Ys),{uri:"/projects/".concat(e)})}}Gs=new WeakMap;Ys=new WeakMap;class uO{constructor(e,n){el(this,Qs,void 0),el(this,Xs,void 0),tl(this,Qs,e),tl(this,Xs,n)}list(e){const n=(e==null?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return Tt(Nn(xr(this,Qs),xr(this,Xs),{uri:n}))}getById(e){return Tt(Nn(xr(this,Qs),xr(this,Xs),{uri:"/projects/".concat(e)}))}}Qs=new WeakMap;Xs=new WeakMap;var p0=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},nl=(t,e,n)=>(p0(t,e,"read from private field"),n?n.call(t):e.get(t)),rl=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},il=(t,e,n,r)=>(p0(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),bc,wc,Ec,Tc;class fO{constructor(e,n){rl(this,bc,void 0),rl(this,wc,void 0),il(this,bc,e),il(this,wc,n)}getById(e){return Nn(nl(this,bc),nl(this,wc),{uri:"/users/".concat(e)})}}bc=new WeakMap;wc=new WeakMap;class hO{constructor(e,n){rl(this,Ec,void 0),rl(this,Tc,void 0),il(this,Ec,e),il(this,Tc,n)}getById(e){return Tt(Nn(nl(this,Ec),nl(this,Tc),{uri:"/users/".concat(e)}))}}Ec=new WeakMap;Tc=new WeakMap;var dO=Object.defineProperty,pO=(t,e,n)=>e in t?dO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sn=(t,e,n)=>(pO(t,typeof e!="symbol"?e+"":e,n),n),m0=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},we=(t,e,n)=>(m0(t,e,"read from private field"),n?n.call(t):e.get(t)),sl=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ol=(t,e,n,r)=>(m0(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ai,Et,ci,gt;const mO=class fh{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gc;Sn(this,"assets"),Sn(this,"datasets"),Sn(this,"projects"),Sn(this,"users"),sl(this,ai,void 0),sl(this,Et,void 0),Sn(this,"listen",u0),this.config(n),ol(this,Et,e),this.assets=new XR(this,we(this,Et)),this.datasets=new aO(this,we(this,Et)),this.projects=new lO(this,we(this,Et)),this.users=new fO(this,we(this,Et))}clone(){return new fh(we(this,Et),this.config())}config(e){if(e===void 0)return{...we(this,ai)};if(we(this,ai)&&we(this,ai).allowReconfigure===!1)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return ol(this,ai,Fb(e,we(this,ai)||{})),this}withConfig(e){return new fh(we(this,Et),{...this.config(),...e})}fetch(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t0(this,we(this,Et),e,n,r)}getDocument(e,n){return n0(this,we(this,Et),e,n)}getDocuments(e,n){return r0(this,we(this,Et),e,n)}create(e,n){return Gl(this,we(this,Et),e,"create",n)}createIfNotExists(e,n){return i0(this,we(this,Et),e,n)}createOrReplace(e,n){return s0(this,we(this,Et),e,n)}delete(e,n){return o0(this,we(this,Et),e,n)}mutate(e,n){return a0(this,we(this,Et),e,n)}patch(e,n){return new uo(e,n,this)}transaction(e){return new e0(e,this)}request(e){return Nn(this,we(this,Et),e)}getUrl(e,n){return Hd(this,e,n)}getDataUrl(e,n){return Cs(this,e,n)}};ai=new WeakMap;Et=new WeakMap;let gO=mO;const yO=class hh{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gc;Sn(this,"assets"),Sn(this,"datasets"),Sn(this,"projects"),Sn(this,"users"),Sn(this,"observable"),sl(this,ci,void 0),sl(this,gt,void 0),Sn(this,"listen",u0),this.config(n),ol(this,gt,e),this.assets=new JR(this,we(this,gt)),this.datasets=new cO(this,we(this,gt)),this.projects=new uO(this,we(this,gt)),this.users=new hO(this,we(this,gt)),this.observable=new gO(e,n)}clone(){return new hh(we(this,gt),this.config())}config(e){if(e===void 0)return{...we(this,ci)};if(we(this,ci)&&we(this,ci).allowReconfigure===!1)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),ol(this,ci,Fb(e,we(this,ci)||{})),this}withConfig(e){return new hh(we(this,gt),{...this.config(),...e})}fetch(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Tt(t0(this,we(this,gt),e,n,r))}getDocument(e,n){return Tt(n0(this,we(this,gt),e,n))}getDocuments(e,n){return Tt(r0(this,we(this,gt),e,n))}create(e,n){return Tt(Gl(this,we(this,gt),e,"create",n))}createIfNotExists(e,n){return Tt(i0(this,we(this,gt),e,n))}createOrReplace(e,n){return Tt(s0(this,we(this,gt),e,n))}delete(e,n){return Tt(o0(this,we(this,gt),e,n))}mutate(e,n){return Tt(a0(this,we(this,gt),e,n))}patch(e,n){return new fo(e,n,this)}transaction(e){return new Jb(e,this)}request(e){return Tt(Nn(this,we(this,gt),e))}dataRequest(e,n,r){return Tt(na(this,we(this,gt),e,n,r))}getUrl(e,n){return Hd(this,e,n)}getDataUrl(e,n){return Cs(this,e,n)}};ci=new WeakMap;gt=new WeakMap;let vO=yO;const g0=vR(cR,{});g0.defaultRequester;function _O(t){return xR(),new vO(g0,t)}const al=_O({projectId:"i32b0q2c",dataset:"production",useCdn:!0,apiVersion:"2021-03-25"});var dh={exports:{}};(function(t,e){var n=200,r="__lodash_hash_undefined__",i=800,s=16,o=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",h="[object Error]",m="[object Function]",P="[object GeneratorFunction]",v="[object Map]",A="[object Number]",E="[object Null]",C="[object Object]",D="[object Proxy]",F="[object RegExp]",G="[object Set]",se="[object String]",ge="[object Undefined]",te="[object WeakMap]",Z="[object ArrayBuffer]",oe="[object DataView]",O="[object Float32Array]",w="[object Float64Array]",N="[object Int8Array]",R="[object Int16Array]",he="[object Int32Array]",W="[object Uint8Array]",re="[object Uint8ClampedArray]",ce="[object Uint16Array]",Ne="[object Uint32Array]",We=/[\\^$.*+?()[\]{}|]/g,xe=/^\[object .+?Constructor\]$/,$e=/^(?:0|[1-9]\d*)$/,be={};be[O]=be[w]=be[N]=be[R]=be[he]=be[W]=be[re]=be[ce]=be[Ne]=!0,be[a]=be[c]=be[Z]=be[u]=be[oe]=be[f]=be[h]=be[m]=be[v]=be[A]=be[C]=be[F]=be[G]=be[se]=be[te]=!1;var Pt=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,rn=typeof self=="object"&&self&&self.Object===Object&&self,et=Pt||rn||Function("return this")(),_n=e&&!e.nodeType&&e,Xt=_n&&!0&&t&&!t.nodeType&&t,pt=Xt&&Xt.exports===_n,Jt=pt&&Pt.process,wt=function(){try{var p=Xt&&Xt.require&&Xt.require("util").types;return p||Jt&&Jt.binding&&Jt.binding("util")}catch{}}(),y=wt&&wt.isTypedArray;function b(p,_,x){switch(x.length){case 0:return p.call(_);case 1:return p.call(_,x[0]);case 2:return p.call(_,x[0],x[1]);case 3:return p.call(_,x[0],x[1],x[2])}return p.apply(_,x)}function M(p,_){for(var x=-1,J=Array(p);++x-1}function FE(p,_){var x=this.__data__,J=Ia(x,p);return J<0?(++this.size,x.push([p,_])):x[J][1]=_,this}Le.prototype.clear=mt,Le.prototype.delete=En,Le.prototype.get=Tn,Le.prototype.has=yr,Le.prototype.set=FE;function Fi(p){var _=-1,x=p==null?0:p.length;for(this.clear();++_1?x[Ie-1]:void 0,Ke=Ie>2?x[2]:void 0;for(Me=p.length>3&&typeof Me=="function"?(Ie--,Me):void 0,Ke&&hT(x[0],x[1],Ke)&&(Me=Ie<3?void 0:Me,Ie=1),_=Object(_);++J-1&&p%1==0&&p<_}function hT(p,_,x){if(!Qr(x))return!1;var J=typeof _;return(J=="number"?Lu(x)&&pm(_,x.length):J=="string"&&_ in x)?Sa(x[_],p):!1}function dT(p){var _=typeof p;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?p!=="__proto__":p===null}function pT(p){return!!B&&B in p}function mm(p){var _=p&&p.constructor,x=typeof _=="function"&&_.prototype||V;return p===x}function mT(p){var _=[];if(p!=null)for(var x in Object(p))_.push(x);return _}function gT(p){return H.call(p)}function yT(p,_,x){return _=Vi(_===void 0?p.length-1:_,0),function(){for(var J=arguments,Ie=-1,Me=Vi(J.length-_,0),Ke=Array(Me);++Ie0){if(++_>=i)return arguments[0]}else _=0;return p.apply(void 0,arguments)}}function bT(p){if(p!=null){try{return L.call(p)}catch{}try{return p+""}catch{}}return""}function Sa(p,_){return p===_||p!==p&&_!==_}var Fu=hm(function(){return arguments}())?hm:function(p){return Ms(p)&&U.call(p,"callee")&&!bn.call(p,"callee")},$u=Array.isArray;function Lu(p){return p!=null&&ym(p.length)&&!ju(p)}function wT(p){return Ms(p)&&Lu(p)}var gm=Rt||CT;function ju(p){if(!Qr(p))return!1;var _=Aa(p);return _==m||_==P||_==l||_==D}function ym(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=o}function Qr(p){var _=typeof p;return p!=null&&(_=="object"||_=="function")}function Ms(p){return p!=null&&typeof p=="object"}function ET(p){if(!Ms(p)||Aa(p)!=C)return!1;var _=rt(p);if(_===null)return!0;var x=U.call(_,"constructor")&&_.constructor;return typeof x=="function"&&x instanceof x&&L.call(x)==X}var vm=y?$(y):JE;function TT(p){return aT(p,_m(p))}function _m(p){return Lu(p)?GE(p,!0):ZE(p)}var IT=cT(function(p,_,x){dm(p,_,x)});function AT(p){return function(){return p}}function bm(p){return p}function CT(){return!1}t.exports=IT})(dh,dh.exports);const bO=dh.exports;/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */function wO(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function EO(t,e){for(var n=0,r=e.length,i=t.length;n1;)n.splice(r,0,e.hardBreak());return n},Ic=function(t,e,n,r){var i=y0(e),s=i[0],o=i.slice(1);if(!s)return AO(t.text,n);var a=s in n.marks?{_type:s,_key:""}:r.find(function(u){return u._key===s}),c=a?n.marks[a._type]:"span";if(b0(c)){var l=ph(a);return an(c,l,function(){return Ic(t,o,n,r)})}return typeof c=="function"?c(a||{},Ic(t,o,n,r)):an(c,ph(a),Ic(t,o,n,r))},w0=function(t,e,n){var r=["em","strong","code"],i=EO([],y0(t.marks)).sort(function(s,o){return r.includes(s)?1:r.includes(o)?-1:0});return Ic(t,i,e,n)},CO=function(t,e){var n=t.children.flatMap(function(r){return w0(r,e,t.markDefs)});return v0(t,e,n)},SO=function(t,e){return an("span",{style:"text-decoration: underline;"},e)},xO=function(t,e){return an("a",{href:t.href,target:t.newtab?"_blank":void 0},e)},PO=function(t,e){var n=t.listItem==="number"?"ol":"ul";return an(n,{},zd(t.children,e,t.level))},RO=function(t,e){var n=zd(t.children,e,t.level),r=t.style&&t.style!=="normal";return an("li",{},r?v0(t,e,n):n)},ph=function(t){if(t){t._key,t._type;var e=wO(t,["_key","_type"]);return e}return{}},OO=function(t,e){var n=IO(t,e);if(!n)return null;if(b0(n)){var r=ph(t);return an(n,r)}return typeof n=="function"?_0(t)?n(t,e,[]):n(t,e):an(n,{})},Xg=function(t){return{_type:"list",_key:t._key+"-parent",level:t.level,listItem:t.listItem,children:[t]}},kO=function(t,e){e===void 0&&(e=0);var n=function(s){return"level"in s},r=function(s){return s&&"children"in s},i=[];return t.forEach(function(s){if(!n(s)){i.push(s);return}var o=i[i.length-1];if(s.level===e){i.push(s);return}s.level&&s.level>e&&(!r(o)||!n(o)||o.level&&o.level>s.level||o.level===s.level&&o.listItem!==s.listItem?i.push(Xg(s)):o.children.push(s))}),i},zd=function(t,e,n){n===void 0&&(n=0);var r=kO(t,n);return r.map(function(i){return OO(i,e)}).filter(TO)},DO={types:{image:"image",block:CO},marks:{strong:"strong",em:"em",link:xO,underline:SO},styles:{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",normal:"p"},hardBreak:function(){return an("br")},span:w0,list:PO,listItem:RO},NO=Vl({functional:!0,props:{blocks:{type:Array,default:function(){return[]}},serializers:{type:Object,default:function(){return{}}}},setup:function(t){var e=bO({},DO,t.serializers);return function(){return zd(t.blocks,e)}}}),E0={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ut,function(){function n(){return n=Object.assign||function(O){for(var w=1;wO.length)&&(w=O.length);for(var N=0,R=new Array(w);N=O.length?{done:!0}:{done:!1,value:O[R++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function a(O){var w=O.split("-"),N=w[1],R=w[2],he=w[3];if(!N||!R||!he)throw new Error("Malformed asset _ref '"+O+`'. Expected an id like "`+o+'".');var W=R.split("x"),re=W[0],ce=W[1],Ne=+re,We=+ce,xe=isFinite(Ne)&&isFinite(We);if(!xe)throw new Error("Malformed asset _ref '"+O+`'. Expected an id like "`+o+'".');return{id:N,width:Ne,height:We,format:he}}var c=function(w){var N=w;return N?typeof N._ref=="string":!1},l=function(w){var N=w;return N?typeof N._id=="string":!1},u=function(w){var N=w;return N&&N.asset?typeof N.asset.url=="string":!1};function f(O){if(!O)return null;var w;if(typeof O=="string"&&h(O))w={asset:{_ref:m(O)}};else if(typeof O=="string")w={asset:{_ref:O}};else if(c(O))w={asset:O};else if(l(O))w={asset:{_ref:O._id||""}};else if(u(O))w={asset:{_ref:m(O.asset.url)}};else if(typeof O.asset=="object")w=n({},O);else return null;var N=O;return N.crop&&(w.crop=N.crop),N.hotspot&&(w.hotspot=N.hotspot),P(w)}function h(O){return/^https?:\/\//.test(""+O)}function m(O){var w=O.split("/").slice(-1);return("image-"+w[0]).replace(/\.([a-z]+)$/,"-$1")}function P(O){if(O.crop&&O.hotspot)return O;var w=n({},O);return w.crop||(w.crop={left:0,top:0,bottom:0,right:0}),w.hotspot||(w.hotspot={x:.5,y:.5,height:1,width:1}),w}var v=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"]];function A(O){var w=n({},O||{}),N=w.source;delete w.source;var R=f(N);if(!R)throw new Error("Unable to resolve image URL from source ("+JSON.stringify(N)+")");var he=R.asset._ref||R.asset._id||"",W=a(he),re=Math.round(R.crop.left*W.width),ce=Math.round(R.crop.top*W.height),Ne={left:re,top:ce,width:Math.round(W.width-R.crop.right*W.width-re),height:Math.round(W.height-R.crop.bottom*W.height-ce)},We=R.hotspot.height*W.height/2,xe=R.hotspot.width*W.width/2,$e=R.hotspot.x*W.width,be=R.hotspot.y*W.height,Pt={left:$e-xe,top:be-We,right:$e+xe,bottom:be+We};return w.rect||w.focalPoint||w.ignoreImageParams||w.crop||(w=n({},w,C({crop:Ne,hotspot:Pt},w))),E(n({},w,{asset:W}))}function E(O){var w=(O.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),N=O.asset.id+"-"+O.asset.width+"x"+O.asset.height+"."+O.asset.format,R=w+"/images/"+O.projectId+"/"+O.dataset+"/"+N,he=[];if(O.rect){var W=O.rect,re=W.left,ce=W.top,Ne=W.width,We=W.height,xe=re!==0||ce!==0||We!==O.asset.height||Ne!==O.asset.width;xe&&he.push("rect="+re+","+ce+","+Ne+","+We)}O.bg&&he.push("bg="+O.bg),O.focalPoint&&(he.push("fp-x="+O.focalPoint.x),he.push("fp-y="+O.focalPoint.y));var $e=[O.flipHorizontal&&"h",O.flipVertical&&"v"].filter(Boolean).join("");return $e&&he.push("flip="+$e),v.forEach(function(be){var Pt=be[0],rn=be[1];typeof O[Pt]<"u"?he.push(rn+"="+encodeURIComponent(O[Pt])):typeof O[rn]<"u"&&he.push(rn+"="+encodeURIComponent(O[rn]))}),he.length===0?R:R+"?"+he.join("&")}function C(O,w){var N,R=w.width,he=w.height;if(!(R&&he))return{width:R,height:he,rect:O.crop};var W=O.crop,re=O.hotspot,ce=R/he,Ne=W.width/W.height;if(Ne>ce){var We=Math.round(W.height),xe=Math.round(We*ce),$e=Math.max(0,Math.round(W.top)),be=Math.round((re.right-re.left)/2+re.left),Pt=Math.max(0,Math.round(be-xe/2));PtW.left+W.width&&(Pt=W.left+W.width-xe),N={left:Pt,top:$e,width:xe,height:We}}else{var rn=W.width,et=Math.round(rn/ce),_n=Math.max(0,Math.round(W.left)),Xt=Math.round((re.bottom-re.top)/2+re.top),pt=Math.max(0,Math.round(Xt-et/2));ptW.top+W.height&&(pt=W.top+W.height-et),N={left:_n,top:pt,width:rn,height:et}}return{width:R,height:he,rect:N}}var D=["clip","crop","fill","fillmax","max","scale","min"],F=["top","bottom","left","right","center","focalpoint","entropy"],G=["format"];function se(O){return O&&"config"in O?typeof O.config=="function":!1}function ge(O){return O&&"clientConfig"in O?typeof O.clientConfig=="object":!1}function te(O){for(var w=v,N=s(w),R;!(R=N()).done;){var he=R.value,W=he[0],re=he[1];if(O===W||O===re)return W}return O}function Z(O){if(se(O)){var w=O.config(),N=w.apiHost,R=w.projectId,he=w.dataset,W=N||"https://api.sanity.io";return new oe(null,{baseUrl:W.replace(/^https:\/\/api\./,"https://cdn."),projectId:R,dataset:he})}var re=O;if(ge(re)){var ce=re.clientConfig,Ne=ce.apiHost,We=ce.projectId,xe=ce.dataset,$e=Ne||"https://api.sanity.io";return new oe(null,{baseUrl:$e.replace(/^https:\/\/api\./,"https://cdn."),projectId:We,dataset:xe})}return new oe(null,O)}var oe=function(){function O(N,R){this.options=void 0,this.options=N?n({},N.options||{},R||{}):n({},R||{})}var w=O.prototype;return w.withOptions=function(R){var he=R.baseUrl||this.options.baseUrl,W={baseUrl:he};for(var re in R)if(R.hasOwnProperty(re)){var ce=te(re);W[ce]=R[re]}return new O(this,n({baseUrl:he},W))},w.image=function(R){return this.withOptions({source:R})},w.dataset=function(R){return this.withOptions({dataset:R})},w.projectId=function(R){return this.withOptions({projectId:R})},w.bg=function(R){return this.withOptions({bg:R})},w.dpr=function(R){return this.withOptions(R&&R!==1?{dpr:R}:{})},w.width=function(R){return this.withOptions({width:R})},w.height=function(R){return this.withOptions({height:R})},w.focalPoint=function(R,he){return this.withOptions({focalPoint:{x:R,y:he}})},w.maxWidth=function(R){return this.withOptions({maxWidth:R})},w.minWidth=function(R){return this.withOptions({minWidth:R})},w.maxHeight=function(R){return this.withOptions({maxHeight:R})},w.minHeight=function(R){return this.withOptions({minHeight:R})},w.size=function(R,he){return this.withOptions({width:R,height:he})},w.blur=function(R){return this.withOptions({blur:R})},w.sharpen=function(R){return this.withOptions({sharpen:R})},w.rect=function(R,he,W,re){return this.withOptions({rect:{left:R,top:he,width:W,height:re}})},w.format=function(R){return this.withOptions({format:R})},w.invert=function(R){return this.withOptions({invert:R})},w.orientation=function(R){return this.withOptions({orientation:R})},w.quality=function(R){return this.withOptions({quality:R})},w.forceDownload=function(R){return this.withOptions({download:R})},w.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},w.flipVertical=function(){return this.withOptions({flipVertical:!0})},w.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},w.fit=function(R){if(D.indexOf(R)===-1)throw new Error('Invalid fit mode "'+R+'"');return this.withOptions({fit:R})},w.crop=function(R){if(F.indexOf(R)===-1)throw new Error('Invalid crop mode "'+R+'"');return this.withOptions({crop:R})},w.saturation=function(R){return this.withOptions({saturation:R})},w.auto=function(R){if(G.indexOf(R)===-1)throw new Error('Invalid auto mode "'+R+'"');return this.withOptions({auto:R})},w.pad=function(R){return this.withOptions({pad:R})},w.url=function(){return A(this.options)},w.toString=function(){return this.url()},O}();return Z})})(E0);const Wd=E0.exports;const MO=Wd(al),VO={name:"Home",props:{limit:Number},data(){return{loading:!0,loading2:!0,loadBlog:!0,slug:"",posts:[],post:[],blocks:[],limit:50}},created(){this.fetchData()},components:{AppTestimonialCard:gb,AppFeaturette:mb,SanityBlocks:NO},methods:{imageUrlFor(t){return MO.image(t)},convertImageUrl(t){let e=t.replace("image-","");return e=e.replace("-jpg",".jpg"),e=e.replace("-png",".png"),console.log("https://cdn.sanity.io/images/i32b0q2c/production/"+e),"https://cdn.sanity.io/images/i32b0q2c/production/"+e},handleReadmore(t){console.log("button clicked"+t),console.log(t);const e=`*[slug.current == $slug] { - _id, - title, - slug, - body, - "image": mainImage{ - asset->{ - _id, - url - } - }, - "coverImage": coverImage{ - asset->{ - _id, - url - } - }, - "name":author->name, - images, - "authorImage":author->image - }[0] - `;this.slug=t,this.loadBlog=!1,al.fetch(e,{slug:this.slug}).then(n=>{this.loading2=!1,this.post=n,this.blocks=n.body,console.log(n.images[1].image.asset._ref)},n=>{this.error=n})},fetchData(){let t=`*[_type == "post"]{ - _id, - title, - slug, - description, - "image": mainImage{ - asset->{ - _id, - url - } -}, - -"name":author->name, - - excerpt - }[0..${this.limit}]`;console.log(this.limit),this.error=this.post=null,this.loading=!0,al.fetch(t).then(e=>{this.loading=!1,this.posts=e,console.log(e)},e=>{this.error=e})}}},FO={class:"home"},$O=d("br",null,null,-1),LO={key:0},jO={key:0,class:"loading"},UO={key:1,class:"error"},BO={key:2,class:"content px-2 py-4"},qO=["src"],HO=d("br",null,null,-1),zO={class:"text-5xl"},WO=d("br",null,null,-1),KO={class:"flex items-center"},GO=["src"],YO={class:"grid grid-cols-3 md:grid-cols-3 lg:grid-cols-3 gap-4"},QO=["src"],XO={key:1,class:"grid grid-cols-2 md:grid-cols- lg:grid-cols-3 gap-2 px-4 w-full"},JO={class:"max-w-sm border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"},ZO={href:"#"},ek=["src"],tk={class:"p-2"},nk={href:"#"},rk={class:"mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"},ik={class:"mb-3 font-normal text-gray-700 dark:text-gray-400"},sk=["onClick"],ok=d("svg",{class:"w-3.5 h-3.5 ml-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 10"},[d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5h12m0 0L9 1m4 4L9 9"})],-1);function ak(t,e,n,r,i,s){const o=Je("SanityBlocks");return Y(),ee("div",FO,[$O,i.slug?(Y(),ee("div",LO,[i.loading2?(Y(),ee("div",jO,"Loading...")):yt("",!0),t.error?(Y(),ee("div",UO,Ye(t.error),1)):yt("",!0),i.post?(Y(),ee("div",BO,[i.post.coverImage?(Y(),ee("img",{key:0,src:s.imageUrlFor(i.post.coverImage),class:"w-full h-auto"},null,8,qO)):yt("",!0),HO,d("h1",zO,Ye(i.post.title),1),WO,ye(o,{blocks:i.blocks},null,8,["blocks"]),d("h6",KO,[i.post.authorImage?(Y(),ee("img",{key:0,src:s.imageUrlFor(i.post.authorImage),class:"w-16 h-16 rounded-full mr-2"},null,8,GO)):yt("",!0),nr(" Compiled By: "+Ye(i.post.name),1)]),d("div",YO,[(Y(!0),ee(Ve,null,Hn(i.post.images,(a,c)=>(Y(),ee("div",{key:c,class:"image-container"},[d("img",{src:s.convertImageUrl(a.image.asset._ref),class:"w-full h-auto rounded"},null,8,QO)]))),128))])])):yt("",!0)])):yt("",!0),i.loadBlog?(Y(),ee("div",XO,[(Y(!0),ee(Ve,null,Hn(i.posts,a=>(Y(),ee("div",{key:a._id,class:"post-item"},[d("div",JO,[d("a",ZO,[d("img",{class:"w-full h-auto",src:s.imageUrlFor(a.image),alt:""},null,8,ek)]),d("div",tk,[d("a",nk,[d("h5",rk,Ye(a.title),1)]),d("p",ik,Ye(a.description),1),d("a",{onClick:c=>s.handleReadmore(a.slug.current),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[nr(" Read more "),ok],8,sk)])])]))),128))])):yt("",!0)])}const T0=ze(VO,[["render",ak]]);const ck={components:{AppFeaturette:mb,AppTestimonialCard:gb,AppCarousel:wx,Doodle:cP,AppGallery:pb,Blogs:T0},mounted(){var t=null;pP(".hidden"),window.matchMedia("(max-width: 768px)").matches||(t=this.$data.testimonials.pop(),setInterval(()=>{let n=t;t=this.$data.testimonials.shift(),this.$data.testimonials.push(n)},1e4))},data(){return{galleryImages:[yb,vb,_b],featurettes:[{heading:"What is Speech Olympiad?",headingEnd:"",text:"The Speech Olympiad stands as the flagship occasion hosted by the Gavel Club at the University of Moratuwa. As the sole English language speech competition within the university !",image:lP,urlString:"#about"}],testimonials:[{key:"1",imageSrc:uP,title:"Sirimevan Jayasundera",subtitle:"Champion - SOVI",body:"Speech Olympiad is more than a mere speaking contest, it is a culmination of people, experiences and exposure. I cherish to this date, every moment of the competition which was a gateway to self-reflection that enhanced my capabilities in the corporate world and beyond."},{key:"2",imageSrc:fP,title:"Malindi Jayathunga",subtitle:"1st Runner-Up and Best Prepared Speaker - SOXI",body:"My Speech Olympiad experience has enabled me to become the storyteller I am today. I work in advertising where I get to present new ideas and unique concepts to both my team and clients on a daily basis. I developed my presenting skills thanks to the support and knowledge I got from Speech Olympiad and the Gavel Club of University of Moratuwa."},{key:"3",imageSrc:dP,title:"Asitha Rathnayake",subtitle:"Champion \u2013 SOXII",body:"Speech Olympiad is a good place to win, but more than that, it is a great place to lose. The Gavel Mora family helped me a lot to improve myself as a speaker and a leader during the course of three Speech Olympiads, which helped me become the overall champion at Speech Olympiad XII."},{key:"4",imageSrc:hP,title:"Amaya Dharmasiri",subtitle:"1st Runner-Up and Best Impromptu Speaker \u2013 SOXII",body:"I was not new to the stage, but I was new to public speaking when I took part in Speech Olympiad. Everyone at the Gavel Club was willing to help us become the best version of ourselves. Not only did I become more confident in communicating in English, but I also learnt about my capabilities and understood myself better, thanks to Speech Olympiad."}]}}},ia=t=>(hr("data-v-a6f42418"),t=t(),dr(),t),lk={class:"container marketing"},uk=ia(()=>d("div",{class:"col-12 mb-2"},[d("h1",{class:"featurette-heading mt-0 mb-4"},"Blogs")],-1)),fk=ia(()=>d("br",null,null,-1)),hk=ia(()=>d("br",null,null,-1)),dk={class:"row mb-5"},pk=ia(()=>d("div",{class:"col-12 mb-2"},[d("h1",{class:"featurette-heading mt-0 mb-4"},"Testimonials")],-1)),mk={class:"col-12 mb-2"},gk={class:"row mb-5"},yk=ia(()=>d("div",{class:"col-12 mb-2"},[d("h1",{class:"featurette-heading mt-0 mb-4"},"Gallery")],-1)),vk={class:"col-12 mb-2"};function _k(t,e,n,r,i,s){const o=Je("AppCarousel"),a=Je("Doodle"),c=Je("AppFeaturette"),l=Je("Blogs"),u=Je("AppTestimonialCard"),f=Je("AppGallery");return Y(),ee("main",null,[ye(o),d("div",lk,[ye(a),(Y(!0),ee(Ve,null,Hn(i.featurettes,(h,m)=>(Y(),jl(c,{index:m,key:m,heading:h.heading,"heading-end":h.headingEnd,text:h.text,image:h.image,urlString:h.urlString},null,8,["index","heading","heading-end","text","image","urlString"]))),128)),uk,ye(l,{limit:50}),fk,hk,d("div",dk,[pk,d("div",mk,[ye(YA,{name:"list",tag:"div",class:"row"},{default:kr(()=>[(Y(!0),ee(Ve,null,Hn(i.testimonials,h=>(Y(),ee("div",{class:"col-lg-4 d-flex justify-content-center",key:"testimonial"+h.key},[ye(u,{title:h.title,imageSrc:h.imageSrc,body:h.body,subtitle:h.subtitle},null,8,["title","imageSrc","body","subtitle"])]))),128))]),_:1})])]),d("div",gk,[yk,d("div",vk,[ye(f,{images:i.galleryImages,showLink:!0},null,8,["images"])])])])])}const bk=ze(ck,[["render",_k],["__scopeId","data-v-a6f42418"]]);const wk={name:"AppArticle"},Ek={class:"container-fluid article-container"},Tk={class:"article column pb-2"};function Ik(t,e,n,r,i,s){return Y(),ee("div",Ek,[d("div",Tk,[f_(t.$slots,"default")])])}const Kd=ze(wk,[["render",Ik]]);const Ak={name:"AppHeroSection",props:{heading:String,subHeading:String,imagePath:String,imageMobile:String}},Ck={class:"hero"},Sk=["src"];function xk(t,e,n,r,i,s){return Y(),ee("div",Ck,[f_(t.$slots,"default"),d("img",{class:"hero-img",src:n.imagePath,alt:"",loading:"lazy"},null,8,Sk)])}const Gd=ze(Ak,[["render",xk]]),Pk="/assets/About_title_mobile.2840cc58.jpg",Rk="/assets/About_title_desktop.55003129.jpg",Ok="/assets/about_SO_article_image_1.babdf8b7.jpg",kk={data(){return{About_title_mobile:Pk,About_title_desktop:Rk}},components:{AppArticle:Kd,AppHeroSection:Gd},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},Dk=d("p",{class:"mt-3 first-letter"}," The Speech Olympiad stands as the flagship occasion hosted by the Gavel Club at the University of Moratuwa. As the sole English language speech competition within the university, it garners participants from all five faculties. Since its establishment in 2005, this event has progressively gained momentum, evolving into one of the most highly anticipated highlights on the university calendar. In an era where effective communication is paramount in any industry, the Speech Olympiad championship has become a coveted goal pursued by all young undergraduates. The enthusiasm instilled by faculty members to engage their students in this competition has led to a consistent rise in participation from all academic departments. While the Speech Olympiad certainly boasts prestige, it transcends mere title-seeking; it provides a platform for personal growth and the potential to ignite transformative change not only within oneself but also among peers. ",-1),Nk=d("p",null," Throughout the span of the last 15 Speech Olympiad editions, there has been a consistent demonstration of the event\u2019s ability to unveil hidden talents within the university\u2019s undergraduate population. The recipients of awards and the participants who reach the final stages encompass a broad spectrum of backgrounds, highlighting the event\u2019s widespread appeal that transcends various academic disciplines. Countless champions and finalists not only in the Inter-University Best Speaker Contest and All Island Best Speaker Contest but also in several other esteemed All Island and Inter-University Competitions such as Viva Voce, Eloquence, Speech Weaver, Templanza, and Enliven, have emerged as winners, attributing their recognition to their involvement in preceding Speech Olympiad competitions. ",-1),Mk=d("img",{class:"article-img",alt:"",src:Ok,loading:"lazy"},null,-1);function Vk(t,e,n,r,i,s){const o=Je("AppHeroSection"),a=Je("AppArticle");return Y(),ee("main",null,[ye(o,{imagePath:s.isMobile?i.About_title_mobile:i.About_title_desktop},null,8,["imagePath"]),ye(a,null,{default:kr(()=>[Dk,Nk,Mk]),_:1})])}const Fk=ze(kk,[["render",Vk]]);const $k={name:"ArticleInterview",props:{authorName:String,intervieweeName:String,intervieweeImg:String}},Lk=t=>(hr("data-v-fb599a6a"),t=t(),dr(),t),jk=Lk(()=>d("p",null,"Words by",-1)),Uk={class:"interviewee d-flex"},Bk={class:"interviewee-img"},qk=["src"],Hk={class:"interview-name"};function zk(t,e,n,r,i,s){return Y(),ee(Ve,null,[jk,d("div",Uk,[d("div",Bk,[d("img",{src:n.intervieweeImg,alt:"",loading:"lazy",class:"interviewee-img"},null,8,qk)]),d("div",Hk,Ye(n.intervieweeName),1)]),d("p",null,"Compiled by "+Ye(n.authorName),1)],64)}const I0=ze($k,[["render",zk],["__scopeId","data-v-fb599a6a"]]),Wk="/assets/TechnicalTips_title_mobile.fae846a9.jpg",Kk="/assets/TechnicalTips_title_desktop.951b060a.jpg",Gk="/assets/TechnicalTips_portrait.b97eb5b2.jpeg",Yk="/assets/TechnicalTips_StageMovement.7c954d74.jpg",Qk="/assets/TechnicalTips_Humor.a1907cb5.jpg",Xk="/assets/TechnicalTips_Confidence.20cb5fc8.jpg";const Jk={data(){return{TechnicalTips_title_mobile:Wk,TechnicalTips_title_desktop:Kk,TechnicalTips_portrait:Gk}},components:{AppArticle:Kd,AppHeroSection:Gd,ArticleInterview:I0},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},dt=t=>(hr("data-v-8b777371"),t=t(),dr(),t),Zk=dt(()=>d("p",{class:"mt-3 first-letter"}," A single voice has the power to create a massive impact, it just needs the right opportunity. Speech Olympiad is a stage where revolutionary leaders and revolutionary speakers are discovered. To help you embark on this sensational journey of discovery, we got into conversation with a prestigious and eloquent past champion of Speech Olympiad, who shared some invaluable tips with us. ",-1)),e4=dt(()=>d("div",{class:"row mb-3 border"},[d("div",{class:"col d-flex text-center"},[d("p",null," Dr. Samadhi Poornima, the Champion of Speech Olympiad IX generously joined us for an interview despite her busy schedule working as a Computer Vision Algorithm Researcher at Zebra Technologies. As the crowned champion in 2015 along with the public speaking experience she has accumulated over the years, we are most certain that up-and-coming speakers will definitely have a lot to take home from the answers of Dr. Poornima. ")])],-1)),t4=dt(()=>d("h3",null,"1. What are the key points to focus on when crafting a speech?",-1)),n4=dt(()=>d("ul",null,[d("li",null,[d("b",null,"Take home message")]),d("p",null," The message that the speaker is trying to convey is a crucial aspect of a speech. It adds value to the words you speak and the effort you put in. "),d("li",null,[d("b",null,"Structure of the speech")]),d("p",null," You can structure your speech in several different ways and be creative with it. You can break down your speech into parts and use the stage appropriately for each part. But the most important thing is that your speech is clear and concise. A well-structured speech is easy to follow for the audience and makes it easier to deliver for the speaker. "),d("li",null,[d("b",null,"Stage movements")]),d("img",{class:"article-img article-img-resize",alt:"",src:Yk,loading:"lazy"}),d("p",null," Stage movements keep your speech alive. For example, if you are talking about two friends you divide the stage into two, left and right for each one. "),d("li",null,[d("b",null,"Humour")]),d("img",{class:"article-img article-img-resize",alt:"",src:Qk,loading:"lazy"}),d("p",null," Humour is what keeps your audience entertained and engaged. It is one of the best things to include in a speech. To bring out some humour does not mean you need to make your audience roll on the floor laughing. A simple smile is enough to make a difference. "),d("li",null,[d("b",null,"Gestures and vocal variations")]),d("p",null," These make your speech livelier. It shows the speaker is confident and adds some colour to your speech. One of the easiest ways to bring out some natural variations is by adding some dialogues to your speech. ")],-1)),r4=dt(()=>d("h3",null,"2. How should one decide on what he/she is going to speak on?",-1)),i4=dt(()=>d("p",null," One of the best ways to come up with a good speech is to speak about your own experiences. Especially if you learnt something out of it, it certainly is worth sharing. This has three advantages ",-1)),s4=dt(()=>d("ul",null,[d("li",null,"You will never forget what you are going to say."),d("li",null,"You can say it the best. After all, it is your story!"),d("li",null," You are the only one in the whole world who has gone through it. And it is worth sharing. ")],-1)),o4=dt(()=>d("p",null," Another classic approach to a good speech is to talk about something relatable, something universal. The audience would find this quite interesting and feel more connected to you. You don\u2019t need extraordinary facts or stories to make an interesting story. Simplicity itself can be quite attractive ",-1)),a4=dt(()=>d("h3",null,"3. How important is it to use stories in our speeches?",-1)),c4=dt(()=>d("p",null," Stories can be interesting to add to a speech. We all love to hear stories. But it does not mean that you need to narrate lengthy tales. Something you saw on your way to university when put into the right words can be an interesting story. ",-1)),l4=dt(()=>d("h3",null,"4. Can you give some tips on impromptu speaking?",-1)),u4=dt(()=>d("p",null," Impromptu speaking requires a lot of practice and experience. You need to have 3 qualities mastered when doing an impromptu speech. ",-1)),f4=dt(()=>d("ul",null,[d("li",null,[d("b",null,"Time management")]),d("p",null," Practise how to deliver some message within the given time. Time management is something you can achieve with enough practice. A well-practised speaker will have an idea of what 1-minute feels like. "),d("li",null,[d("b",null,"Confidence")]),d("img",{class:"article-img article-img-resize",alt:"",src:Xk,loading:"lazy"}),d("p",null," Impromptu speakers require a lot of confidence. If you are nervous you might not be able to bring out the best speech you can. And through practice, you build up meaningful confidence. In this practice, you need to put yourself into a real situation instead of being flexible and relaxed. "),d("li",null,[d("b",null,"Thinking on the stage")]),d("p",null," Practically, you might not be able to work out all the details of your speech before going on to the stage. So it is likely that you might have to figure out certain things while you are speaking. Figure out a few things you can do to buy some thinking time on the stage. A couple of things I did was purposeful repetition and asking a question from the audience. Meaningful repetition can be used at any point in your speech. For example, if you are talking about how your parents wanted you to be a doctor you can say something like "),d("ul",null,[d("li",null,"\u2018The girl next door was a doctor\u2019"),d("li",null,"\u2018The girl next next door was a doctor\u2019"),d("li",null,"\u2018The girl next next next door was a doctor\u2019"),d("li",null,"\u2018So my mama wanted me to be a doctor\u2019")]),d("p",null," Instead of simply saying \u2018my mama wanted me to be a doctor\u2019, when you use a simple phrase and repeat it, it gives you time to think without making the audience feel you are struggling. And when you ask a question, the general practice is you give a few seconds for the audience to react. When you ask a rhetorical question, you don\u2019t need to respond to their reaction. Instead, you can take this time to think and focus on what you are going to say next. ")],-1)),h4=dt(()=>d("h3",null,"5. Do you have any tips on practising a speech?",-1)),d4=dt(()=>d("p",null," Practice is key for both prepared speeches and impromptu speeches. You need to practise until you feel at home on a stage. Practice is what brings you confidence. For prepared speeches, it is good if you first have a basic structure of the speech organised and then practise with words that come to you naturally. In this way, you would be more comfortable with the language you use for your speech. ",-1)),p4=dt(()=>d("p",null,"A couple of things you can do to fine-tune a prepared speech are,",-1)),m4=dt(()=>d("ul",null,[d("li",null,[d("b",null,"Remove repetitions")]),d("p",null," Think carefully of each sentence, and each phrase. Think what value it would add to the speech. And think if the same thing is being repeated (not purposeful repetition) somewhere else in the speech unintentionally. "),d("li",null,[d("b",null,"Balance your speech")]),d("p",null," Add a balance to your speech with a bit of humour and a bit of seriousness. Even if the speech is about a sad story, it is good to have some appropriate humour at least once. And even if the speech is a humorous speech, it is great if there is an important take-home message. "),d("li",null,[d("b",null,"Make it simple, clear and concise")]),d("p",null," In a prepared speech it is very important to have a clear structure to your speech. It should be easy-to-follow and meaningful to what you say. Something I personally followed for practising a prepared speech was to watch some world championship speeches. When I say watch it, I mean \u2018watch it watch it\u2019 where you notice the structure, notice the way they start, take transitions and bring out the message. ")],-1)),g4=dt(()=>d("p",null," Practising an impromptu speech can be a bit tricky. Because even if you practise 1000 speeches, the next one could be an entirely different experience. These are some ways of practising impromptu speeches that I personally followed. ",-1)),y4=dt(()=>d("ul",null,[d("li",null," Have some generic stories ready. These could be targeted for some common impromptu topics such as never giving up, little things matter in life and being true to yourself etc. "),d("li",null," Have some facts ready. It is good to have some general knowledge facts ready when you are practising for an impromptu speech. You don\u2019t need to memorise a whole list but 5 key facts from different areas can be helpful if you can\u2019t think of a story related to the topic you got. This could be about areas like economy, education or some great sayings etc. "),d("li",null," Be ready to think of something entirely new then and there. This is an example I heard from someone when I was practising. So this guy has got the topic \u2018Michael Jordan\u2019 as the title for his impromptu speech. He started the speech with \u201CI don\u2019t know who Michael Jordan is but I know a guy named Michael and another guy named Jordan\u201D, and went on to deliver a very interesting speech which was completely unexpected. "),d("li",null," Practise coming up with an impromptu speech response within 2 minutes. And if you could not, just deliver whatever that you manage to come up with then and there. Experience how you work under pressure. With each practice, you will improve. And once you feel confident, try lowering this time, now try to come up with an impromptu speech in 1 and half minutes. And next, try 1 minute. When you practice like this, even if nothing comes to your mind in the first minute, you would still be able to remain calm and think clearly because you know you can come up with something successful even in the last few seconds. "),d("li",null," It is okay to practise on the same topic several times. No need to have a new topic each time you practise. But practise facing completely unheard of topics as well, just to broaden your thinking. "),d("li",null," No need to practise for long hours. So do not exhaust yourself. You might get tired and lose interest. ")],-1)),v4=dt(()=>d("p",null," From deciding on what to speak, crafting your speech, practising your speech, to finally delivering your speech, each and every aspect needed for a good public speaker was insightfully addressed in detail by Dr. Poornima Take in and practise what you have learnt. Showcase your progress at Speech Olympiad. Get onto that stage and speak your heart out, because the speech you deliver today can be the reason for a changed world tomorrow. ",-1));function _4(t,e,n,r,i,s){const o=Je("AppHeroSection"),a=Je("ArticleInterview"),c=Je("AppArticle");return Y(),ee("main",null,[ye(o,{imagePath:s.isMobile?i.TechnicalTips_title_mobile:i.TechnicalTips_title_desktop},null,8,["imagePath"]),ye(c,null,{default:kr(()=>[Zk,e4,t4,n4,r4,i4,s4,o4,a4,c4,l4,u4,f4,h4,d4,p4,m4,g4,y4,v4,ye(a,{"author-name":"Udesh Dangalla","interviewee-name":"Dr. Samadhi Poornima",intervieweeImg:i.TechnicalTips_portrait},null,8,["intervieweeImg"])]),_:1})])}const b4=ze(Jk,[["render",_4],["__scopeId","data-v-8b777371"]]);const w4="/assets/prelis4.9270c5ef.jpg",E4="/assets/prelis5.492e8603.jpg",T4="/assets/prelis6.9e3344fc.jpg",I4="/assets/prelis7.9637c075.jpg",A4="/assets/prelis8.754f06d4.jpg",C4="/assets/prelis9.3f3d09cb.jpg",S4="/assets/prelis10.618eb0c8.jpg",x4="/assets/prelis11.79b2289e.jpg",P4="/assets/judges.4cff70b3.jpg",R4="/assets/group_pic_1.7dc32d4e.jpg",O4="/assets/crowd_1.92bdcae5.jpg";const k4={components:{AppGallery:pb},data(){return{images:[yb,vb,_b,w4,E4,T4,I4,A4,C4,S4,x4,O4,R4,P4]}}},D4={class:"container"},N4={class:"row mb-5"};function M4(t,e,n,r,i,s){const o=Je("AppGallery");return Y(),ee("main",null,[d("div",D4,[d("div",N4,[ye(o,{images:i.images},null,8,["images"])])])])}const V4=ze(k4,[["render",M4],["__scopeId","data-v-f5afcb38"]]);const F4={};function $4(t,e){return Y(),ee("main",null,"Page Not Found")}const L4=ze(F4,[["render",$4],["__scopeId","data-v-147157fb"]]),j4="/assets/PathOfChampion_title_mobile.1d5e1775.jpg",U4="/assets/PathOfChampion_title_desktop.273035c9.jpg",B4="/assets/PathOfChampion_image1_mobile.f116adc3.jpg",q4="/assets/PathOfChampion_image1_desktop.5eb979c0.jpg",H4="/assets/PathOfChampion_image2_mobile.8d1c7b14.jpg",z4="/assets/PathOfChampion_image2_desktop.ead73ac0.jpg",W4="/assets/PathOfChampion_portrait.adc4344f.jpg",K4={data(){return{PathOfChampion_title_mobile:j4,PathOfChampion_title_desktop:U4,PathOfChampion_image1_mobile:B4,PathOfChampion_image1_desktop:q4,PathOfChampion_image2_mobile:H4,PathOfChampion_image2_desktop:z4,PathOfChampion_portrait:W4}},components:{AppArticle:Kd,AppHeroSection:Gd,ArticleInterview:I0},computed:{isMobile(){return window.matchMedia("(max-width: 768px)").matches}}},G4=d("p",{class:"mt-3 first-letter"}," Walking the journey through the shadows of my past, during my school days, just like most students, I was always reluctant to opt in speech contests. Perturbed by the fear of failure and embarrassment, I never wanted to perform before an audience. I remember being forced to do a speech in grade 11 at the assembly which surprisingly turned out well. That was when I realized that I had a potential towards public speaking. Thus, I started my public speaking journey. Following this, I grabbed a few chances to compere at school functions and gradually established myself as a decent public speaker. ",-1),Y4=d("p",null," I geared my public speaking drive during the twilight of my school career, but I did not have many opportunities to explore. Right from the moment I joined university, I told the inner me that I am going to try as many extracurricular activities as possible. Taking part in a speech contest was the ultimate challenge since delivering a speech under pressure was a monumental task. The very minute I stepped into my university life, I eagerly joined Speech Olympiad, embarking on a quest to expand my comfort zone. ",-1),Q4=["src"],X4=d("p",null," I was excited for my very first experience at Speech Olympiad which was also the first speech contest I took part in. I was, however, under-prepared with a very short speech lasting merely 2 minutes, not to mention getting tongue-tied somewhere mid-speech as well. ",-1),J4=d("p",null," Leaving the hall, I realized that I needed help from someone who was experienced and proficient in public speaking, which was my driving intention to join the Gavel Club. ",-1),Z4=d("p",null,[nr(" The following year was all about learning the basics of public speaking, getting the exposure and being mentored by senior Gaveliers. With their guidance, I came up with a solid speech for the following Speech Olympiad, and with a huge effort put in from my end, I emerged as the "),d("b",null,"first runner-up"),nr(". ")],-1),eD=["src"],tD=d("p",null," Motivated by the success of that year\u2019s competition, I wanted to compete in the upcoming competition as well. But along with being a past winner and the experience gained through Gavel, I became overconfident in myself and my abilities. I prioritized other commitments over Speech Olympiad practices and mentoring sessions with the belief that I would be able to manage on my own. It was only after emerging second runner-up that year, I realized the fault in my approach. ",-1),nD=d("p",null," The final Speech Olympiad during my undergraduate life was the last shot at giving my best. I went back to square one and started my journey once again. This time, I reinforced myself with past Gavel experiences along with the understanding that I will always be able to improve with others' help. ",-1),rD=d("p",{class:"box"},[nr(" Similar to my second Speech Olympiad experience, I worked hard, carefully focusing on the specifics such as time management and coming up with the best approach for table topics while sharpening my speaking skills and refining my speech with the help of practice and impactful mentoring sessions; which finally made me the "),d("b",null,[d("br"),nr("Champion of Speech Olympiad VIII in 2014")]),nr(". ")],-1),iD=d("p",null," The surreal moment when I emerged as the champion is something I will cherish forever! I will never forget the warm big proud smiles my parents, friends and my Gavel family were projecting at me from the audience. Engulfing the feelings of this successful achievement was the appreciation I had towards my mentors who guided me to this achievement; some of whom had even gone beyond their university life but still showed up to support me and all my fellow Gaveliers. ",-1),sD=d("p",null," Unfortunately, till then I did not have a long-sighted personality that focused on developing leadership qualities, rather I was only improving my public speaking skills through the Gavel Club. On that day, I promised myself to become a better team player and that was the vibrant rainbow that coloured the path for me to become a Toastmaster. Currently working as the Assistant Division Director of Toastmaster District 82 - Division F, I am very proud to say that I have taken what I learnt from Gavel, through to Toastmasters, not only in becoming a sound Toastmaster, but perhaps in nurturing myself as an encouraging mentor as well. ",-1),oD=d("p",null," I believe that regardless of where you stand, if you are passionate about something, it is important to expose and challenge yourself to grow as an individual. Speech Olympiad taught me that compering and delivering a speech are not the same thing, especially when it comes to a contest where the delivery is done under a lot of pressure. Some core lessons I learnt were that commitment, along with self-evaluation, learning from others and being humble, goes a long way. Reflecting on my voyage of public speaking, the moral is to remind oneself to never shy away from opportunities. It is not necessarily about winning or losing, but the experience and exposure you gain by pushing your limits to become better at what you do and the way you define yourself. ",-1),aD=d("p",{class:"box"}," Being a champion does not only mean that you will be celebrating, but rather exploring the deep end and investing in yourself more. Grow up to every dawn of sunrise and bloom wherever life plants you, for enjoying what you do matters the most. I cherish the journey, not the end result. ",-1);function cD(t,e,n,r,i,s){const o=Je("AppHeroSection"),a=Je("ArticleInterview"),c=Je("AppArticle");return Y(),ee("main",null,[ye(o,{imagePath:s.isMobile?i.PathOfChampion_title_mobile:i.PathOfChampion_title_desktop},null,8,["imagePath"]),ye(c,null,{default:kr(()=>[G4,Y4,d("img",{class:"article-img",alt:"",src:s.isMobile?i.PathOfChampion_image1_mobile:i.PathOfChampion_image1_desktop,loading:"lazy"},null,8,Q4),X4,J4,Z4,d("img",{class:"article-img",src:s.isMobile?i.PathOfChampion_image2_mobile:i.PathOfChampion_image2_desktop,loading:"lazy"},null,8,eD),tD,nD,rD,iD,sD,oD,aD,ye(a,{"author-name":"Chemini Mallikarachchi","interviewee-name":"Mohamed Yasir",intervieweeImg:i.PathOfChampion_portrait},null,8,["intervieweeImg"])]),_:1})])}const lD=ze(K4,[["render",cD]]);/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var Jg=Object.getOwnPropertySymbols,uD=Object.prototype.hasOwnProperty,fD=Object.prototype.propertyIsEnumerable;function hD(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function dD(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(s){return e[s]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(s){i[s]=s}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var St=dD()?Object.assign:function(t,e){for(var n,r=hD(t),i,s=1;s)","* Array of document IDs","* Object containing `query`"].join(` -`);throw new Error(`Unknown selection - must be one of: - -`.concat(n))},zr={};(function(t){function e(i){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},e(i)}var n=["image","file"],r=["before","after","replace"];t.dataset=function(i){if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(i))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},t.projectId=function(i){if(!/^[-a-z0-9]+$/i.test(i))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},t.validateAssetType=function(i){if(n.indexOf(i)===-1)throw new Error("Invalid asset type: ".concat(i,". Must be one of ").concat(n.join(", ")))},t.validateObject=function(i,s){if(s===null||e(s)!=="object"||Array.isArray(s))throw new Error("".concat(i,"() takes an object of properties"))},t.requireDocumentId=function(i,s){if(!s._id)throw new Error("".concat(i,'() requires that the document contains an ID ("_id" property)'));t.validateDocumentId(i,s._id)},t.validateDocumentId=function(i,s){if(typeof s!="string"||!/^[a-z0-9_.-]+$/i.test(s))throw new Error("".concat(i,'(): "').concat(s,'" is not a valid document ID'))},t.validateInsert=function(i,s,o){var a="insert(at, selector, items)";if(r.indexOf(i)===-1){var c=r.map(function(l){return'"'.concat(l,'"')}).join(", ");throw new Error("".concat(a,' takes an "at"-argument which is one of: ').concat(c))}if(typeof s!="string")throw new Error("".concat(a,' takes a "selector"-argument which must be a string'));if(!Array.isArray(o))throw new Error("".concat(a,' takes an "items"-argument which must be an array'))},t.hasDataset=function(i){if(!i.dataset)throw new Error("`dataset` must be provided to perform queries");return i.dataset||""},t.requestTag=function(i){if(typeof i!="string"||!/^[a-z0-9._-]{1,75}$/i.test(i))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return i}})(zr);function cf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tr=St,ZD=P0,R0=zr,lf=R0.validateObject,e3=R0.validateInsert;function yh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.selection=t,this.operations=Tr({},e),this.client=n}Tr(yh.prototype,{clone:function(){return new yh(this.selection,Tr({},this.operations),this.client)},set:function(e){return this._assign("set",e)},diffMatchPatch:function(e){return lf("diffMatchPatch",e),this._assign("diffMatchPatch",e)},unset:function(e){if(!Array.isArray(e))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Tr({},this.operations,{unset:e}),this},setIfMissing:function(e){return this._assign("setIfMissing",e)},replace:function(e){return lf("replace",e),this._set("set",{$:e})},inc:function(e){return this._assign("inc",e)},dec:function(e){return this._assign("dec",e)},insert:function(e,n,r){var i;return e3(e,n,r),this._assign("insert",(i={},cf(i,e,n),cf(i,"items",r),i))},append:function(e,n){return this.insert("after","".concat(e,"[-1]"),n)},prepend:function(e,n){return this.insert("before","".concat(e,"[0]"),n)},splice:function(e,n,r,i){var s=typeof r>"u"||r===-1,o=n<0?n-1:n,a=s?-1:Math.max(0,n+r),c=o<0&&a>=0?"":a,l="".concat(e,"[").concat(o,":").concat(c,"]");return this.insert("replace",l,i||[])},ifRevisionId:function(e){return this.operations.ifRevisionID=e,this},serialize:function(){return Tr(ZD(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.client)throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var n=typeof this.selection=="string",r=Tr({returnFirst:n,returnDocuments:!0},e);return this.client.mutate({patch:this.serialize()},r)},reset:function(){return this.operations={},this},_set:function(e,n){return this._assign(e,n,!1)},_assign:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return lf(e,n),this.operations=Tr({},this.operations,cf({},e,Tr({},r&&this.operations[e]||{},n))),this}});var op=yh;function ry(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var uf=St,Bi=zr,ff=op,t3={returnDocuments:!1};function vh(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.trxId=n,this.operations=t,this.client=e}uf(vh.prototype,{clone:function(){return new vh(this.operations.slice(0),this.client,this.trxId)},create:function(e){return Bi.validateObject("create",e),this._add({create:e})},createIfNotExists:function(e){var n="createIfNotExists";return Bi.validateObject(n,e),Bi.requireDocumentId(n,e),this._add(ry({},n,e))},createOrReplace:function(e){var n="createOrReplace";return Bi.validateObject(n,e),Bi.requireDocumentId(n,e),this._add(ry({},n,e))},delete:function(e){return Bi.validateDocumentId("delete",e),this._add({delete:{id:e}})},patch:function(e,n){var r=typeof n=="function",i=e instanceof ff;if(i)return this._add({patch:e.serialize()});if(r){var s=n(new ff(e,{},this.client));if(!(s instanceof ff))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:s.serialize()})}return this._add({patch:uf({id:e},n)})},transactionId:function(e){return e?(this.trxId=e,this):this.trxId},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(e){if(!this.client)throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),uf({transactionId:this.trxId},t3,e||{}))},reset:function(){return this.operations=[],this},_add:function(e){return this.operations.push(e),this}});var O0=vh,n3=["tag"];function r3(t,e){if(t==null)return{};var n=i3(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}function i3(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s=0)&&(n[i]=t[i]);return n}var qi=encodeURIComponent,k0=function(t){var e=t.query,n=t.params,r=n===void 0?{}:n,i=t.options,s=i===void 0?{}:i,o=s.tag,a=r3(s,n3),c="query=".concat(qi(e)),l=o?"?tag=".concat(qi(o),"&").concat(c):"?".concat(c),u=Object.keys(r).reduce(function(f,h){return"".concat(f,"&").concat(qi("$".concat(h)),"=").concat(qi(JSON.stringify(r[h])))},l);return Object.keys(a).reduce(function(f,h){return s[h]?"".concat(f,"&").concat(qi(h),"=").concat(qi(s[h])):f},u)},_h={exports:{}};/** @license - * eventsource.js - * Available under MIT License (MIT) - * https://github.com/Yaffle/EventSource/ - */(function(t,e){(function(n){var r=n.setTimeout,i=n.clearTimeout,s=n.XMLHttpRequest,o=n.XDomainRequest,a=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,f=n.fetch,h=n.Response,m=n.TextDecoder,P=n.TextEncoder,v=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(g){l.readyState="complete"},!1)),s==null&&a!=null&&(s=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(g){function I(){}return I.prototype=g,new I}),Date.now||(Date.now=function(){return new Date().getTime()}),v==null){var A=f;f=function(g,I){var k=I.signal;return A(g,{headers:I.headers,credentials:I.credentials,cache:I.cache}).then(function(T){var V=T.body.getReader();return k._reader=V,k._aborted&&k._reader.cancel(),{status:T.status,statusText:T.statusText,headers:T.headers,body:{getReader:function(){return V}}}})},v=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function E(){this.bitsNeeded=0,this.codePoint=0}E.prototype.decode=function(g){function I(H,X,K){if(K===1)return H>=128>>X&&H<=2048>>X&&H<=57344>>X&&H<=65536>>X&&H<>6>15?3:X>31?2:1;if(H===6*2)return X>15?3:2;if(H===6*3)return 3;throw new Error}for(var T=65533,V="",S=this.bitsNeeded,L=this.codePoint,U=0;U191||!I(L<<6|B&63,S-6,k(S,L)))&&(S=0,L=T,V+=String.fromCharCode(L)),S===0?(B>=0&&B<=127?(S=0,L=B):B>=192&&B<=223?(S=6*1,L=B&31):B>=224&&B<=239?(S=6*2,L=B&15):B>=240&&B<=247?(S=6*3,L=B&7):(S=0,L=T),S!==0&&!I(L,S,k(S,L))&&(S=0,L=T)):(S-=6,L=L<<6|B&63),S===0&&(L<=65535?V+=String.fromCharCode(L):(V+=String.fromCharCode(55296+(L-65535-1>>10)),V+=String.fromCharCode(56320+(L-65535-1&1023))))}return this.bitsNeeded=S,this.codePoint=L,V};var C=function(){try{return new m().decode(new P().encode("test"),{stream:!0})==="test"}catch(g){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+g)}return!1};(m==null||P==null||!C())&&(m=E);var D=function(){};function F(g){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=D,this.onload=D,this.onerror=D,this.onreadystatechange=D,this._contentType="",this._xhr=g,this._sendTimeout=0,this._abort=D}F.prototype.open=function(g,I){this._abort(!0);var k=this,T=this._xhr,V=1,S=0;this._abort=function(K){k._sendTimeout!==0&&(i(k._sendTimeout),k._sendTimeout=0),(V===1||V===2||V===3)&&(V=4,T.onload=D,T.onerror=D,T.onabort=D,T.onprogress=D,T.onreadystatechange=D,T.abort(),S!==0&&(i(S),S=0),K||(k.readyState=4,k.onabort(null),k.onreadystatechange())),V=0};var L=function(){if(V===1){var K=0,ae="",Ce=void 0;if("contentType"in T)K=200,ae="OK",Ce=T.contentType;else try{K=T.status,ae=T.statusText,Ce=T.getResponseHeader("Content-Type")}catch{K=0,ae="",Ce=void 0}K!==0&&(V=2,k.readyState=2,k.status=K,k.statusText=ae,k._contentType=Ce,k.onreadystatechange())}},U=function(){if(L(),V===2||V===3){V=3;var K="";try{K=T.responseText}catch{}k.readyState=3,k.responseText=K,k.onprogress()}},B=function(K,ae){if((ae==null||ae.preventDefault==null)&&(ae={preventDefault:D}),U(),V===1||V===2||V===3){if(V=4,S!==0&&(i(S),S=0),k.readyState=4,K==="load")k.onload(ae);else if(K==="error")k.onerror(ae);else if(K==="abort")k.onabort(ae);else throw new TypeError;k.onreadystatechange()}},H=function(K){T!=null&&(T.readyState===4?(!("onload"in T)||!("onerror"in T)||!("onabort"in T))&&B(T.responseText===""?"error":"load",K):T.readyState===3?"onprogress"in T||U():T.readyState===2&&L())},X=function(){S=r(function(){X()},500),T.readyState===3&&U()};"onload"in T&&(T.onload=function(K){B("load",K)}),"onerror"in T&&(T.onerror=function(K){B("error",K)}),"onabort"in T&&(T.onabort=function(K){B("abort",K)}),"onprogress"in T&&(T.onprogress=U),"onreadystatechange"in T&&(T.onreadystatechange=function(K){H(K)}),("contentType"in T||!("ontimeout"in s.prototype))&&(I+=(I.indexOf("?")===-1?"?":"&")+"padding=true"),T.open(g,I,!0),"readyState"in T&&(S=r(function(){X()},0))},F.prototype.abort=function(){this._abort(!1)},F.prototype.getResponseHeader=function(g){return this._contentType},F.prototype.setRequestHeader=function(g,I){var k=this._xhr;"setRequestHeader"in k&&k.setRequestHeader(g,I)},F.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},F.prototype.send=function(){if((!("ontimeout"in s.prototype)||!("sendAsBinary"in s.prototype)&&!("mozAnon"in s.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var g=this;g._sendTimeout=r(function(){g._sendTimeout=0,g.send()},4);return}var I=this._xhr;"withCredentials"in I&&(I.withCredentials=this.withCredentials);try{I.send(void 0)}catch(k){throw k}};function G(g){return g.replace(/[A-Z]/g,function(I){return String.fromCharCode(I.charCodeAt(0)+32)})}function se(g){for(var I=Object.create(null),k=g.split(`\r -`),T=0;T"u"?typeof window<"u"?window:typeof self<"u"?self:Ut:globalThis)})(_h,_h.exports);var s3=_h.exports.EventSourcePolyfill,o3=function(t,e){return e.reduce(function(n,r){return typeof t[r]>"u"||(n[r]=t[r]),n},{})},a3=function(t,e){return Object.keys(e).concat(Object.keys(t)).reduce(function(n,r){return n[r]=typeof t[r]>"u"?e[r]:t[r],n},{})};function iy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sy(t){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:{},i=this.clientConfig,s=i.url,o=i.token,a=i.withCredentials,c=i.requestTagPrefix,l=r.tag&&c?[c,r.tag].join("."):r.tag,u=sy(sy({},d3(r,y3)),{},{tag:l}),f=h3(u,g3),h=p3({query:e,params:n,options:f,tag:l}),m="".concat(s).concat(this.getDataUrl("listen",h));if(m.length>m3)return new oy(function(E){return E.error(new Error("Query too large for listener"))});var P=u.events?u.events:["mutation"],v=P.indexOf("reconnect")!==-1,A={};return(o||a)&&(A.withCredentials=!0),o&&(A.headers={Authorization:"Bearer ".concat(o)}),new oy(function(E){var C=O(),D,F=!1;function G(){F||(oe(),!F&&C.readyState===ay.CLOSED&&(Z(),clearTimeout(D),D=setTimeout(w,100)))}function se(R){E.error(_3(R))}function ge(R){var he=D0(R);return he instanceof Error?E.error(he):E.next(he)}function te(R){F=!0,Z(),E.complete()}function Z(){C.removeEventListener("error",G,!1),C.removeEventListener("channelError",se,!1),C.removeEventListener("disconnect",te,!1),P.forEach(function(R){return C.removeEventListener(R,ge,!1)}),C.close()}function oe(){v&&E.next({type:"reconnect"})}function O(){var R=new ay(m,A);return R.addEventListener("error",G,!1),R.addEventListener("channelError",se,!1),R.addEventListener("disconnect",te,!1),P.forEach(function(he){return R.addEventListener(he,ge,!1)}),R}function w(){C=O()}function N(){F=!0,Z()}return N})};function D0(t){try{var e=t.data&&JSON.parse(t.data)||{};return l3({type:t.type},e)}catch(n){return n}}function _3(t){if(t instanceof Error)return t;var e=D0(t);return e instanceof Error?e:new Error(b3(e))}function b3(t){return t.error?t.error.description?t.error.description:typeof t.error=="string"?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error"}function cy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w3=St,N0=oa,js=N0.map,hf=N0.filter,df=zr,E3=P0,T3=k0,ly=O0,uy=op,I3=v3,A3=function(e,n){var r=typeof e>"u"?n:e;return e===!1?void 0:r},C3=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{dryRun:e.dryRun,returnIds:!0,returnDocuments:A3(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}},pf=function(e){return e.type==="response"},S3=function(e){return e.body},x3=function(e,n){return e.reduce(function(r,i){return r[n(i)]=i,r},Object.create(null))},Wa=function(e){return e.toPromise()},P3=11264,R3={listen:I3,getDataUrl:function(e,n){var r=this.clientConfig,i=df.hasDataset(r),s="/".concat(e,"/").concat(i),o=n?"".concat(s,"/").concat(n):s;return"/data".concat(o).replace(/\/($|\?)/,"$1")},fetch:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.filterResponse===!1?function(o){return o}:function(o){return o.result},s=this._dataRequest("query",{query:e,params:n},r).pipe(js(i));return this.isPromiseAPI()?Wa(s):s},getDocument:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={uri:this.getDataUrl("doc",e),json:!0,tag:n.tag},i=this._requestObservable(r).pipe(hf(pf),js(function(s){return s.body.documents&&s.body.documents[0]}));return this.isPromiseAPI()?Wa(i):i},getDocuments:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={uri:this.getDataUrl("doc",e.join(",")),json:!0,tag:n.tag},i=this._requestObservable(r).pipe(hf(pf),js(function(s){var o=x3(s.body.documents||[],function(a){return a._id});return e.map(function(a){return o[a]||null})}));return this.isPromiseAPI()?Wa(i):i},create:function(e,n){return this._create(e,"create",n)},createIfNotExists:function(e,n){return df.requireDocumentId("createIfNotExists",e),this._create(e,"createIfNotExists",n)},createOrReplace:function(e,n){return df.requireDocumentId("createOrReplace",e),this._create(e,"createOrReplace",n)},patch:function(e,n){return new uy(e,n,this)},delete:function(e,n){return this.dataRequest("mutate",{mutations:[{delete:E3(e)}]},n)},mutate:function(e,n){var r=e instanceof uy||e instanceof ly?e.serialize():e,i=Array.isArray(r)?r:[r],s=n&&n.transactionId;return this.dataRequest("mutate",{mutations:i,transactionId:s},n)},transaction:function(e){return new ly(e,this)},dataRequest:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this._dataRequest(e,n,r);return this.isPromiseAPI()?Wa(i):i},_dataRequest:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=e==="mutate",s=e==="query",o=!i&&T3(n),a=!i&&o.length2&&arguments[2]!==void 0?arguments[2]:{},i=cy({},n,e),s=w3({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[i]},s)}},O3=St,k3=zr;function M0(t){this.request=t.request.bind(t)}O3(M0.prototype,{create:function(e,n){return this._modify("PUT",e,n)},edit:function(e,n){return this._modify("PATCH",e,n)},delete:function(e){return this._modify("DELETE",e)},list:function(){return this.request({uri:"/datasets"})},_modify:function(e,n,r){return k3.dataset(n),this.request({method:e,uri:"/datasets/".concat(n),body:r})}});var D3=M0,N3=St;function V0(t){this.client=t}N3(V0.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(e){return this.client.request({uri:"/projects/".concat(e)})}});var M3=V0,V3=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t[n])));return e.length>0?"?".concat(e.join("&")):""};function F3(t,e){return U3(t)||j3(t,e)||L3(t,e)||$3()}function $3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L3(t,e){if(!!t){if(typeof t=="string")return fy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fy(t,e)}}function fy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!(e instanceof window.File)?t:F0({filename:t.preserveFilename===!1?void 0:e.name,contentType:e.type},t)}F0(L0.prototype,{upload:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ka.validateAssetType(e);var i=r.extract||void 0;i&&!i.length&&(i=["none"]);var s=Ka.hasDataset(this.client.clientConfig),o=e==="image"?"images":"files",a=z3(r,n),c=a.tag,l=a.label,u=a.title,f=a.description,h=a.creditLine,m=a.filename,P=a.source,v={label:l,title:u,description:f,filename:m,meta:i,creditLine:h};P&&(v.sourceId=P.id,v.sourceName=P.name,v.sourceUrl=P.url);var A=this.client._requestObservable({tag:c,method:"POST",timeout:a.timeout||0,uri:"/assets/".concat(o,"/").concat(s),headers:a.contentType?{"Content-Type":a.contentType}:{},query:v,body:n});return this.client.isPromiseAPI()?A.pipe(q3(function(E){return E.type==="response"}),B3(function(E){return E.body.document})).toPromise():A},delete:function(e,n){console.warn("client.assets.delete() is deprecated, please use client.delete()");var r=n||"";return/^(image|file)-/.test(r)?e._id&&(r=e._id):r="".concat(e,"-").concat(r),Ka.hasDataset(this.client.clientConfig),this.client.delete(r)},getImageUrl:function(e,n){var r=e._ref||e;if(typeof r!="string")throw new Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9_]+-\d+x\d+-[a-z]{1,5}$/.test(r))throw new Error('Unsupported asset ID "'.concat(r,'". URL generation only works for auto-generated IDs.'));var i=r.split("-"),s=F3(i,4),o=s[1],a=s[2],c=s[3];Ka.hasDataset(this.client.clientConfig);var l=this.client.clientConfig,u=l.projectId,f=l.dataset,h=n?H3(n):"";return"https://cdn.sanity.io/images/".concat(u,"/").concat(f,"/").concat(o,"-").concat(a,".").concat(c).concat(h)}});var W3=L0,K3=St;function j0(t){this.client=t}K3(j0.prototype,{getById:function(e){return this.client.request({uri:"/users/".concat(e)})}});var G3=j0,Y3=St;function U0(t){this.client=t}Y3(U0.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}});var Q3=U0,B0={exports:{}},X3=function(){var e=[];return{subscribe:n,publish:r};function n(i){return e.push(i),function(){var o=e.indexOf(i);o>-1&&e.splice(o,1)}}function r(){for(var i=0;i2?a-2:0),l=2;l=2&&(a=a.slice(2)):Wn(r)?a=n[4]:r?i&&(a=a.slice(2)):o>=2&&Wn(e.protocol)&&(a=n[4]),{protocol:r,slashes:i||Wn(r),slashesCount:o,rest:a}}function cN(t,e){if(t==="")return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],s=!1,o=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),o++):o&&(r===0&&(s=!0),n.splice(r,1),o--);return s&&n.unshift(""),(i==="."||i==="..")&&n.push(""),n.join("/")}function Yn(t,e,n){if(t=cp(t),t=t.replace(H0,""),!(this instanceof Yn))return new Yn(t,e,n);var r,i,s,o,a,c,l=bh.slice(),u=typeof e,f=this,h=0;for(u!=="object"&&u!=="string"&&(n=e,e=null),n&&typeof n!="function"&&(n=eu.parse),e=W0(e),i=K0(t||"",e),r=!i.protocol&&!i.slashes,f.slashes=i.slashes||r&&e.slashes,f.protocol=i.protocol||e.protocol||"",t=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||aN.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!Wn(f.protocol)))&&(l[3]=[/(.*)/,"pathname"]);h"u"?!1:navigator.product==="ReactNative",pN=Object.prototype.hasOwnProperty,wh={timeout:dN?6e4:12e4},mN=function(t){var e=typeof t=="string"?mf({url:t},wh):mf({},wh,t),n=hN(e.url,{},!0);return e.timeout=G0(e.timeout),e.query&&(n.query=mf({},n.query,yN(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=n.toString(gN),e};function gN(t){var e=[];for(var n in t)pN.call(t,n)&&r(n,t[n]);return e.length?e.join("&"):"";function r(i,s){Array.isArray(s)?s.forEach(function(o){return r(i,o)}):e.push([i,s].map(encodeURIComponent).join("="))}}function G0(t){if(t===!1||t===0)return!1;if(t.connect||t.socket)return t;var e=Number(t);return isNaN(e)?G0(wh.timeout):{connect:e,socket:e}}function yN(t){var e={};for(var n in t)t[n]!==void 0&&(e[n]=t[n]);return e}var vN=/^https?:\/\//i,_N=function(t){if(!vN.test(t.url))throw new Error('"'.concat(t.url,'" is not a valid URL'))},Y0={exports:{}},my=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/,bN={regex:my,parse:function(t){var e=my.exec(t);return e?{protocol:(e[1]||"").toLowerCase()||void 0,hostname:(e[5]||"").toLowerCase()||void 0,port:e[6]||void 0}:{}}},gy=bN,wN=function(t,e,n){if(t===e)return!0;var r=gy.parse(t,!1,!0),i=gy.parse(e,!1,!0),s=r.port|0||(r.protocol==="https"?443:80),o=i.port|0||(i.protocol==="https"?443:80),a={proto:r.protocol===i.protocol,hostname:r.hostname===i.hostname,port:s===o};return a.proto&&a.hostname&&(a.port||n)};function Ss(){this.readyState=0}Ss.prototype.open=function(t,e){this._method=t,this._url=e,this._resHeaders="",this.readyState=1,this.onreadystatechange()};Ss.prototype.abort=function(){this._controller&&this._controller.abort()};Ss.prototype.getAllResponseHeaders=function(){return this._resHeaders};Ss.prototype.setRequestHeader=function(t,e){this._headers=this._headers||{},this._headers[t]=e};Ss.prototype.send=function(t){var e=this,n=this._controller=typeof AbortController=="function"&&new AbortController,r=this.responseType!=="arraybuffer",i={method:this._method,headers:this._headers,signal:n&&n.signal,body:t};typeof window<"u"&&(i.credentials=this.withCredentials?"include":"omit"),fetch(this._url,i).then(function(s){return s.headers.forEach(function(o,a){e._resHeaders+="".concat(a,": ").concat(o,`\r -`)}),e.status=s.status,e.statusText=s.statusText,e.readyState=3,r?s.text():s.arrayBuffer()}).then(function(s){r?e.responseText=s:e.response=s,e.readyState=4,e.onreadystatechange()}).catch(function(s){if(s.name==="AbortError"){e.onabort();return}e.onerror(s)})};var EN=Ss,TN=wN,IN=Eb,yy=EN,AN=function(){},Ar=typeof window>"u"?void 0:window,vy=Ar?"xhr":"fetch",tu=typeof XMLHttpRequest=="function"?XMLHttpRequest:AN,CN="withCredentials"in new tu,SN=typeof XDomainRequest>"u"?void 0:XDomainRequest,Q0=CN?tu:SN;Ar||(tu=yy,Q0=yy);var xN=function(t,e){var n=t.options,r=t.applyMiddleware("finalizeOptions",n),i={},s=Ar&&Ar.location&&!TN(Ar.location.href,r.url),o=t.applyMiddleware("interceptRequest",void 0,{adapter:vy,context:t});if(o){var a=setTimeout(e,0,null,o),c=function(){return clearTimeout(a)};return{abort:c}}var l=s?new Q0:new tu,u=Ar&&Ar.XDomainRequest&&l instanceof Ar.XDomainRequest,f=r.headers,h=r.timeout,m=!1,P=!1,v=!1;l.onerror=se,l.ontimeout=se,l.onabort=function(){G(!0),m=!0},l.onprogress=function(){};var A=u?"onload":"onreadystatechange";if(l[A]=function(){F(),!(m||l.readyState!==4&&!u)&&l.status!==0&&te()},l.open(r.method,r.url,!0),l.withCredentials=!!r.withCredentials,f&&l.setRequestHeader)for(var E in f)f.hasOwnProperty(E)&&l.setRequestHeader(E,f[E]);else if(f&&u)throw new Error("Headers cannot be set on an XDomainRequest object");return r.rawBody&&(l.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:r,adapter:vy,request:l,context:t}),l.send(r.body||null),h&&(i.connect=setTimeout(function(){return D("ETIMEDOUT")},h.connect)),{abort:C};function C(){m=!0,l&&l.abort()}function D(Z){v=!0,l.abort();var oe=new Error(Z==="ESOCKETTIMEDOUT"?"Socket timed out on request to ".concat(r.url):"Connection timed out on request to ".concat(r.url));oe.code=Z,t.channels.error.publish(oe)}function F(){!h||(G(),i.socket=setTimeout(function(){return D("ESOCKETTIMEDOUT")},h.socket))}function G(Z){(Z||m||l.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function se(Z){if(!P){G(!0),P=!0,l=null;var oe=Z||new Error("Network error while attempting to reach ".concat(r.url));oe.isNetworkError=!0,oe.request=r,e(oe)}}function ge(){var Z=l.status,oe=l.statusText;if(u&&Z===void 0)Z=200;else{if(Z>12e3&&Z<12156)return se();Z=l.status===1223?204:l.status,oe=l.status===1223?"No Content":oe}return{body:l.response||l.responseText,url:r.url,method:r.method,headers:u?{}:IN(l.getAllResponseHeaders()),statusCode:Z,statusMessage:oe}}function te(){if(!(m||P||v)){if(l.status===0){se(new Error("Unknown XHR error"));return}G(),P=!0,e(null,ge())}}};(function(t){t.exports=xN})(Y0);var PN=X3,RN=J3,ON=mN,kN=_N,DN=Y0.exports,NN=["request","response","progress","error","abort"],_y=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"],MN=function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DN,r=[],i=_y.reduce(function(o,a){return o[a]=o[a]||[],o},{processOptions:[ON],validateOptions:[kN]});function s(o){var a=NN.reduce(function(v,A){return v[A]=PN(),v},{}),c=RN(i),l=c("processOptions",o);c("validateOptions",l);var u={options:l,channels:a,applyMiddleware:c},f=null,h=a.request.subscribe(function(v){f=n(v,function(A,E){return P(A,E,v)})});a.abort.subscribe(function(){h(),f&&f.abort()});var m=c("onReturn",a,u);return m===a&&a.request.publish(u),m;function P(v,A,E){var C=v,D=A;if(!C)try{D=c("onResponse",A,E)}catch(F){D=null,C=F}C=C&&c("onError",C,E),C?a.error.publish(C):D&&a.response.publish(D)}}return s.use=function(a){if(!a)throw new Error("Tried to add middleware that resolved to falsey value");if(typeof a=="function")throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(a.onReturn&&i.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return _y.forEach(function(c){a[c]&&i[c].push(a[c])}),r.push(a),s},s.clone=function(){return t(r)},e.forEach(s.use),s};(function(t){t.exports=MN})(B0);var Gi={exports:{}};typeof globalThis<"u"?Gi.exports=globalThis:typeof window<"u"?Gi.exports=window:typeof Ut<"u"?Gi.exports=Ut:typeof self<"u"?Gi.exports=self:Gi.exports={};var VN=Gi.exports,by=St,FN=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.implementation||VN.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(r,i){return new e(function(s){return r.error.subscribe(function(o){return s.error(o)}),r.progress.subscribe(function(o){return s.next(by({type:"progress"},o))}),r.response.subscribe(function(o){s.next(by({type:"response"},o)),s.complete()}),r.request.publish(i),function(){return r.abort.publish()}})}}};/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var $N=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var LN=$N;function wy(t){return LN(t)===!0&&Object.prototype.toString.call(t)==="[object Object]"}var jN=function(e){var n,r;return!(wy(e)===!1||(n=e.constructor,typeof n!="function")||(r=n.prototype,wy(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};function Eh(t){return Eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eh(t)}var Ey=St,UN=jN,BN=["boolean","string","number"],qN=function(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)},HN=function(){return{processOptions:function(e){var n=e.body;if(!n)return e;var r=typeof n.pipe=="function",i=!r&&!qN(n)&&(BN.indexOf(Eh(n))!==-1||Array.isArray(n)||UN(n));return i?Ey({},e,{body:JSON.stringify(e.body),headers:Ey({},e.headers,{"Content-Type":"application/json"})}):e}}},gf=St,zN=function(t){return{onResponse:function(n){var r=n.headers["content-type"]||"",i=t&&t.force||r.indexOf("application/json")!==-1;return!n.body||!r||!i?n:gf({},n,{body:WN(n.body)})},processOptions:function(n){return gf({},n,{headers:gf({Accept:"application/json"},n.headers)})}}};function WN(t){try{return JSON.parse(t)}catch(e){throw e.message="Failed to parsed response body as JSON: ".concat(e.message),e}}var X0={exports:{}},KN=function(){return{onRequest:function(e){if(e.adapter!=="xhr")return;var n=e.request,r=e.context;"upload"in n&&"onprogress"in n.upload&&(n.upload.onprogress=i("upload")),"onprogress"in n&&(n.onprogress=i("download"));function i(s){return function(o){var a=o.lengthComputable?o.loaded/o.total*100:-1;r.channels.progress.publish({stage:s,percent:a,total:o.total,loaded:o.loaded,lengthComputable:o.lengthComputable})}}}}};(function(t){t.exports=KN})(X0);var lp={},Th={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,i=Error.captureStackTrace;i===void 0&&(i=function(l){var u=new Error;r(l,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(l,"stack",{configurable:!0,value:h,writable:!0})}})});function s(c){c!==void 0&&r(this,"message",{configurable:!0,value:c,writable:!0});var l=this.constructor.name;l!==void 0&&l!==this.name&&r(this,"name",{configurable:!0,value:l,writable:!0}),i(this,this.constructor)}s.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:s,writable:!0}});var o=function(){function c(u,f){return r(u,"name",{configurable:!0,value:f})}try{var l=function(){};if(c(l,"foo"),l.name==="foo")return c}catch{}}();function a(c,l){if(l==null||l===Error)l=s;else if(typeof l!="function")throw new TypeError("super_ should be a function");var u;if(typeof c=="string")u=c,c=n!==void 0?function(){return n(l,arguments,this.constructor)}:function(){l.apply(this,arguments)},o!==void 0&&(o(c,u),u=void 0);else if(typeof c!="function")throw new TypeError("constructor should be either a string or a function");c.super_=c.super=l;var f={constructor:{configurable:!0,value:c,writable:!0}};return u!==void 0&&(f.name={configurable:!0,value:u,writable:!0}),c.prototype=Object.create(l.prototype,f),c}e=t.exports=a,e.BaseError=s})(Th,Th.exports);var J0=Th.exports,Z0=St;function up(t){var e=ew(t);up.super.call(this,e.message),Z0(this,e)}function fp(t){var e=ew(t);fp.super.call(this,e.message),Z0(this,e)}function ew(t){var e=t.body,n={response:t,statusCode:t.statusCode,responseBody:YN(e,t)};return e.error&&e.message?(n.message="".concat(e.error," - ").concat(e.message),n):e.error&&e.error.description?(n.message=e.error.description,n.details=e.error,n):(n.message=e.error||e.message||GN(t),n)}function GN(t){var e=t.statusMessage?" ".concat(t.statusMessage):"";return"".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)}function YN(t,e){var n=(e.headers["content-type"]||"").toLowerCase(),r=n.indexOf("application/json")!==-1;return r?JSON.stringify(t,null,2):t}J0(up);J0(fp);lp.ClientError=up;lp.ServerError=fp;var QN=[],XN=B0.exports,JN=St,ZN=FN,eM=HN,tM=zN,nM=X0.exports,rM=oa,iM=rM.Observable,tw=lp,nw=tw.ClientError,rw=tw.ServerError,sM={onResponse:function(e){if(e.statusCode>=500)throw new rw(e);if(e.statusCode>=400)throw new nw(e);return e}},oM={onResponse:function(e){var n=e.headers["x-sanity-warning"],r=Array.isArray(n)?n:[n];return r.filter(Boolean).forEach(function(i){return console.warn(i)}),e}},aM=QN,cM=aM.concat([oM,eM(),tM(),nM(),sM,ZN({implementation:iM})]),iw=XN(cM);function nu(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:iw;return e(JN({maxRedirects:0},t))}nu.defaultRequester=iw;nu.ClientError=nw;nu.ServerError=rw;var lM=nu,Ty=St,uM="X-Sanity-Project-ID",fM=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={},r=e.token||t.token;r&&(n.Authorization="Bearer ".concat(r)),!e.useGlobalApi&&!t.useProjectHostname&&t.projectId&&(n[uM]=t.projectId);var i=Boolean(typeof e.withCredentials>"u"?t.token||t.withCredentials:e.withCredentials),s=typeof e.timeout>"u"?t.timeout:e.timeout;return Ty({},e,{headers:Ty({},n,e.headers||{}),timeout:typeof s>"u"?5*60*1e3:s,proxy:e.proxy||t.proxy,json:!0,withCredentials:i})},sw={},hM="https://docs.sanity.io/help/",ow=function(e){return hM+e},ru={},dM=function(t){var e=!1,n;return function(){return e||(n=t.apply(void 0,arguments),e=!0),n}},hp=ow,pM=dM,dp=function(e){return pM(function(){for(var n,r=arguments.length,i=new Array(r),s=0;s"u"){var P=n("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(P))}if(m&&!h.projectId)throw new Error("Configuration must contain `projectId`");var v=typeof window<"u"&&window.location&&window.location.hostname,A=v&&c(window.location.hostname);v&&A&&h.token&&h.ignoreBrowserTokenWarning!==!0?i.printBrowserTokenWarning():typeof h.useCdn>"u"&&i.printCdnWarning(),m&&r.projectId(h.projectId),h.dataset&&r.dataset(h.dataset),"requestTagPrefix"in h&&(h.requestTagPrefix=h.requestTagPrefix?r.requestTag(h.requestTagPrefix).replace(/\.+$/,""):void 0),h.apiVersion="".concat(h.apiVersion).replace(/^v/,""),h.isDefaultApi=h.apiHost===o.apiHost,h.useCdn=Boolean(h.useCdn)&&!h.withCredentials,t.validateApiVersion(h.apiVersion);var E=h.apiHost.split("://",2),C=E[0],D=E[1],F=h.isDefaultApi?s:D;return h.useProjectHostname?(h.url="".concat(C,"://").concat(h.projectId,".").concat(D,"/v").concat(h.apiVersion),h.cdnUrl="".concat(C,"://").concat(h.projectId,".").concat(F,"/v").concat(h.apiVersion)):(h.url="".concat(h.apiHost,"/v").concat(h.apiVersion),h.cdnUrl=h.url),h},t.validateApiVersion=function(u){if(!(u==="1"||u==="X")){var f=new Date(u),h=/^\d{4}-\d{2}-\d{2}$/.test(u)&&f instanceof Date&&f.getTime()>0;if(!h)throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}}})(sw);function Iy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yf(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:xM;if(!(this instanceof on))return new on(t);if(this.config(t),this.assets=new IM(this),this.datasets=new EM(this),this.projects=new TM(this),this.users=new AM(this),this.auth=new CM(this),this.clientConfig.isPromiseAPI){var e=Zi({},this.clientConfig,{isPromiseAPI:!1});this.observable=new on(e)}}Zi(on.prototype,wM);Zi(on.prototype,{clone:function(){return new on(this.config())},config:function(e){if(typeof e>"u")return Zi({},this.clientConfig);if(this.clientConfig&&this.clientConfig.allowReconfigure===!1)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");if(this.observable){var n=Zi({},e,{isPromiseAPI:!1});this.observable.config(n)}return this.clientConfig=PM(e,this.clientConfig||{}),this},withConfig:function(e){return new on(yf(yf({},this.config()),e))},getUrl:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(r,"/").concat(e.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(e){var n=this,r=e.url||e.uri,i=typeof e.canUseCdn>"u"?["GET","HEAD"].indexOf(e.method||"GET")>=0&&r.indexOf("/data/")===0:e.canUseCdn,s=this.clientConfig.useCdn&&i,o=e.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,e.tag].join("."):e.tag||this.clientConfig.requestTagPrefix;o&&(e.query=yf({tag:RM.requestTag(o)},e.query));var a=SM(this.clientConfig,Zi({},e,{url:this.getUrl(r,s)}));return new gM(function(c){return iu(a,n.clientConfig.requester).subscribe(c)})},request:function(e){var n=this._requestObservable(e).pipe(vM(function(r){return r.type==="response"}),yM(function(r){return r.body}));return this.isPromiseAPI()?OM(n):n}});on.Patch=_M;on.Transaction=bM;on.ClientError=iu.ClientError;on.ServerError=iu.ServerError;on.requester=iu.defaultRequester;var Ay=on;kl({});function kM(){const t=bd();if(!t)throw new Error("You must call this from within a component");return t.proxy}const DM=Symbol("Sanity image URL builder"),NM=Symbol("Sanity client"),MM=Symbol("Sanity client for previews"),VM=Symbol("Default query options");function FM(t,e=!1,n={}){kM();const r=Ay(t),i=Wd(t);if(zs(NM,r),zs(DM,i),zs(VM,n),e){const s=Ay({...t,useCdn:!1,token:void 0,withCredentials:!0});zs(MM,s)}}Wd(al);/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *//** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const cw=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},$M=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],a=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},lw={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,f=(s&3)<<4|a>>4;let h=(a&15)<<2|l>>6,m=l&63;c||(m=64,o||(h=64)),r.push(n[u],n[f],n[h],n[m])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(cw(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):$M(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(h),l!==64){const m=a<<4&240|l>>2;if(r.push(m),f!==64){const P=l<<6&192|f;r.push(P)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class LM extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const jM=function(t){const e=cw(t);return lw.encodeByteArray(e,!0)},cl=function(t){return jM(t).replace(/\./g,"")},UM=function(t){try{return lw.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function BM(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const qM=()=>BM().__FIREBASE_DEFAULTS__,HM=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t={}.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},zM=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&UM(t[1]);return e&&JSON.parse(e)},uw=()=>{try{return qM()||HM()||zM()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},WM=t=>{var e,n;return(n=(e=uw())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},KM=t=>{const e=WM(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},fw=()=>{var t;return(t=uw())===null||t===void 0?void 0:t.config};/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class GM{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function YM(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t),a="";return[cl(JSON.stringify(n)),cl(JSON.stringify(o)),a].join(".")}function QM(){try{return typeof indexedDB=="object"}catch{return!1}}function XM(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const JM="FirebaseError";class xs extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=JM,Object.setPrototypeOf(this,xs.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,hw.prototype.create)}}class hw{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?ZM(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new xs(i,a,r)}}function ZM(t,e){return t.replace(e9,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const e9=/\{\$([^}]+)}/g;function Ih(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(Cy(s)&&Cy(o)){if(!Ih(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function Cy(t){return t!==null&&typeof t=="object"}/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function Do(t){return t&&t._delegate?t._delegate:t}class No{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const li="[DEFAULT]";/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class t9{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new GM;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(r9(e))try{this.getOrInitializeService({instanceIdentifier:li})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=li){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=li){return this.instances.has(e)}getOptions(e=li){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(!!r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:n9(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=li){return this.component?this.component.multipleInstances?e:li:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function n9(t){return t===li?void 0:t}function r9(t){return t.instantiationMode==="EAGER"}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class i9{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new t9(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var Oe;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Oe||(Oe={}));const s9={debug:Oe.DEBUG,verbose:Oe.VERBOSE,info:Oe.INFO,warn:Oe.WARN,error:Oe.ERROR,silent:Oe.SILENT},o9=Oe.INFO,a9={[Oe.DEBUG]:"log",[Oe.VERBOSE]:"log",[Oe.INFO]:"info",[Oe.WARN]:"warn",[Oe.ERROR]:"error"},c9=(t,e,...n)=>{if(ee.some(n=>t instanceof n);let Sy,xy;function u9(){return Sy||(Sy=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function f9(){return xy||(xy=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const pw=new WeakMap,Ah=new WeakMap,mw=new WeakMap,vf=new WeakMap,mp=new WeakMap;function h9(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(Dr(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&pw.set(n,t)}).catch(()=>{}),mp.set(e,t),e}function d9(t){if(Ah.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Ah.set(t,e)}let Ch={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Ah.get(t);if(e==="objectStoreNames")return t.objectStoreNames||mw.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Dr(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function p9(t){Ch=t(Ch)}function m9(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(_f(this),e,...n);return mw.set(r,e.sort?e.sort():[e]),Dr(r)}:f9().includes(t)?function(...e){return t.apply(_f(this),e),Dr(pw.get(this))}:function(...e){return Dr(t.apply(_f(this),e))}}function g9(t){return typeof t=="function"?m9(t):(t instanceof IDBTransaction&&d9(t),l9(t,u9())?new Proxy(t,Ch):t)}function Dr(t){if(t instanceof IDBRequest)return h9(t);if(vf.has(t))return vf.get(t);const e=g9(t);return e!==t&&(vf.set(t,e),mp.set(e,t)),e}const _f=t=>mp.get(t);function y9(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Dr(o);return r&&o.addEventListener("upgradeneeded",c=>{r(Dr(o.result),c.oldVersion,c.newVersion,Dr(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const v9=["get","getKey","getAll","getAllKeys","count"],_9=["put","add","delete","clear"],bf=new Map;function Py(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(bf.get(e))return bf.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=_9.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||v9.includes(n)))return;const s=async function(o,...a){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),i&&c.done]))[0]};return bf.set(e,s),s}p9(t=>({...t,get:(e,n,r)=>Py(e,n)||t.get(e,n,r),has:(e,n)=>!!Py(e,n)||t.has(e,n)}));/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class b9{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(w9(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function w9(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Sh="@firebase/app",Ry="0.9.15";/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Si=new dw("@firebase/app"),E9="@firebase/app-compat",T9="@firebase/analytics-compat",I9="@firebase/analytics",A9="@firebase/app-check-compat",C9="@firebase/app-check",S9="@firebase/auth",x9="@firebase/auth-compat",P9="@firebase/database",R9="@firebase/database-compat",O9="@firebase/functions",k9="@firebase/functions-compat",D9="@firebase/installations",N9="@firebase/installations-compat",M9="@firebase/messaging",V9="@firebase/messaging-compat",F9="@firebase/performance",$9="@firebase/performance-compat",L9="@firebase/remote-config",j9="@firebase/remote-config-compat",U9="@firebase/storage",B9="@firebase/storage-compat",q9="@firebase/firestore",H9="@firebase/firestore-compat",z9="firebase",W9="10.1.0";/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const xh="[DEFAULT]",K9={[Sh]:"fire-core",[E9]:"fire-core-compat",[I9]:"fire-analytics",[T9]:"fire-analytics-compat",[C9]:"fire-app-check",[A9]:"fire-app-check-compat",[S9]:"fire-auth",[x9]:"fire-auth-compat",[P9]:"fire-rtdb",[R9]:"fire-rtdb-compat",[O9]:"fire-fn",[k9]:"fire-fn-compat",[D9]:"fire-iid",[N9]:"fire-iid-compat",[M9]:"fire-fcm",[V9]:"fire-fcm-compat",[F9]:"fire-perf",[$9]:"fire-perf-compat",[L9]:"fire-rc",[j9]:"fire-rc-compat",[U9]:"fire-gcs",[B9]:"fire-gcs-compat",[q9]:"fire-fst",[H9]:"fire-fst-compat","fire-js":"fire-js",[z9]:"fire-js-all"};/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const ll=new Map,Ph=new Map;function G9(t,e){try{t.container.addComponent(e)}catch(n){Si.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function ul(t){const e=t.name;if(Ph.has(e))return Si.debug(`There were multiple attempts to register component ${e}.`),!1;Ph.set(e,t);for(const n of ll.values())G9(n,t);return!0}function Y9(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Q9={["no-app"]:"No Firebase App '{$appName}' has been created - call initializeApp() first",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},Nr=new hw("app","Firebase",Q9);/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class X9{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new No("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Nr.create("app-deleted",{appName:this._name})}}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const J9=W9;function su(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:xh,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw Nr.create("bad-app-name",{appName:String(i)});if(n||(n=fw()),!n)throw Nr.create("no-options");const s=ll.get(i);if(s){if(Ih(n,s.options)&&Ih(r,s.config))return s;throw Nr.create("duplicate-app",{appName:i})}const o=new i9(i);for(const c of Ph.values())o.addComponent(c);const a=new X9(n,r,o);return ll.set(i,a),a}function Z9(t=xh){const e=ll.get(t);if(!e&&t===xh&&fw())return su();if(!e)throw Nr.create("no-app",{appName:t});return e}function cs(t,e,n){var r;let i=(r=K9[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const a=[`Unable to register library "${i}" with version "${e}":`];s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Si.warn(a.join(" "));return}ul(new No(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const eV="firebase-heartbeat-database",tV=1,Mo="firebase-heartbeat-store";let wf=null;function gw(){return wf||(wf=y9(eV,tV,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(Mo)}}}).catch(t=>{throw Nr.create("idb-open",{originalErrorMessage:t.message})})),wf}async function nV(t){try{return await(await gw()).transaction(Mo).objectStore(Mo).get(yw(t))}catch(e){if(e instanceof xs)Si.warn(e.message);else{const n=Nr.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Si.warn(n.message)}}}async function Oy(t,e){try{const r=(await gw()).transaction(Mo,"readwrite");await r.objectStore(Mo).put(e,yw(t)),await r.done}catch(n){if(n instanceof xs)Si.warn(n.message);else{const r=Nr.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Si.warn(r.message)}}}function yw(t){return`${t.name}!${t.options.appId}`}/** - * @license - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const rV=1024,iV=30*24*60*60*1e3;class sV{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new aV(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=ky();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const s=new Date(i.date).valueOf();return Date.now()-s<=iV}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=ky(),{heartbeatsToSend:n,unsentEntries:r}=oV(this._heartbeatsCache.heartbeats),i=cl(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function ky(){return new Date().toISOString().substring(0,10)}function oV(t,e=rV){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),Dy(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Dy(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class aV{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return QM()?XM().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await nV(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Oy(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Oy(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function Dy(t){return cl(JSON.stringify({version:2,heartbeats:t})).length}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function cV(t){ul(new No("platform-logger",e=>new b9(e),"PRIVATE")),ul(new No("heartbeat",e=>new sV(e),"PRIVATE")),cs(Sh,Ry,t),cs(Sh,Ry,"esm2017"),cs("fire-js","")}cV("");var lV="firebase",uV="10.1.0";/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */cs(lV,uV,"app");var fV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},z,gp=gp||{},pe=fV||self;function ou(t){var e=typeof t;return e=e!="object"?e:t?Array.isArray(t)?"array":e:"null",e=="array"||e=="object"&&typeof t.length=="number"}function aa(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function hV(t){return Object.prototype.hasOwnProperty.call(t,Ef)&&t[Ef]||(t[Ef]=++dV)}var Ef="closure_uid_"+(1e9*Math.random()>>>0),dV=0;function pV(t,e,n){return t.call.apply(t.bind,arguments)}function mV(t,e,n){if(!t)throw Error();if(2{},e),pe.removeEventListener("test",()=>{},e)}catch{}return t}();function Vo(t){return/^[\s\xa0]*$/.test(t)}function au(){var t=pe.navigator;return t&&(t=t.userAgent)?t:""}function jn(t){return au().indexOf(t)!=-1}function vp(t){return vp[" "](t),t}vp[" "]=function(){};function vV(t,e){var n=u5;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}var _V=jn("Opera"),ms=jn("Trident")||jn("MSIE"),_w=jn("Edge"),Rh=_w||ms,bw=jn("Gecko")&&!(au().toLowerCase().indexOf("webkit")!=-1&&!jn("Edge"))&&!(jn("Trident")||jn("MSIE"))&&!jn("Edge"),bV=au().toLowerCase().indexOf("webkit")!=-1&&!jn("Edge");function ww(){var t=pe.document;return t?t.documentMode:void 0}var Oh;e:{var Tf="",If=function(){var t=au();if(bw)return/rv:([^\);]+)(\)|;)/.exec(t);if(_w)return/Edge\/([\d\.]+)/.exec(t);if(ms)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(bV)return/WebKit\/(\S+)/.exec(t);if(_V)return/(?:Version)[ \/]?(\S+)/.exec(t)}();if(If&&(Tf=If?If[1]:""),ms){var Af=ww();if(Af!=null&&Af>parseFloat(Tf)){Oh=String(Af);break e}}Oh=Tf}var kh;if(pe.document&&ms){var My=ww();kh=My||parseInt(Oh,10)||void 0}else kh=void 0;var wV=kh;function Fo(t,e){if(qt.call(this,t?t.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(bw){e:{try{vp(e.nodeName);var i=!0;break e}catch{}i=!1}i||(e=null)}}else n=="mouseover"?e=t.fromElement:n=="mouseout"&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=r.clientX!==void 0?r.clientX:r.pageX,this.clientY=r.clientY!==void 0?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=t.clientX!==void 0?t.clientX:t.pageX,this.clientY=t.clientY!==void 0?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=typeof t.pointerType=="string"?t.pointerType:EV[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&Fo.$.h.call(this)}}xt(Fo,qt);var EV={2:"touch",3:"pen",4:"mouse"};Fo.prototype.h=function(){Fo.$.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var ca="closure_listenable_"+(1e6*Math.random()|0),TV=0;function IV(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.la=i,this.key=++TV,this.fa=this.ia=!1}function cu(t){t.fa=!0,t.listener=null,t.proxy=null,t.src=null,t.la=null}function _p(t,e,n){for(const r in t)e.call(n,t[r],r,t)}function AV(t,e){for(const n in t)e.call(void 0,t[n],n,t)}function Ew(t){const e={};for(const n in t)e[n]=t[n];return e}const Vy="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Tw(t,e){let n,r;for(let i=1;i>>0);function Tp(t){return typeof t=="function"?t:(t[Sf]||(t[Sf]=function(e){return t.handleEvent(e)}),t[Sf])}function Ct(){Wr.call(this),this.i=new lu(this),this.S=this,this.J=null}xt(Ct,Wr);Ct.prototype[ca]=!0;Ct.prototype.removeEventListener=function(t,e,n,r){Sw(this,t,e,n,r)};function Nt(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,typeof e=="string")e=new qt(e,t);else if(e instanceof qt)e.target=e.target||t;else{var i=e;e=new qt(r,t),Tw(e,i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=e.g=n[s];i=Ya(o,r,!0,e)&&i}if(o=e.g=t,i=Ya(o,r,!0,e)&&i,i=Ya(o,r,!1,e)&&i,n)for(s=0;snew OV,t=>t.reset());class OV{constructor(){this.next=this.g=this.h=null}set(e,n){this.h=e,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function kV(t){var e=1;t=t.split(":");const n=[];for(;0{throw t},0)}let $o,Lo=!1,Ap=new RV,Rw=()=>{const t=pe.Promise.resolve(void 0);$o=()=>{t.then(NV)}};var NV=()=>{for(var t;t=PV();){try{t.h.call(t.g)}catch(n){DV(n)}var e=Pw;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}Lo=!1};function uu(t,e){Ct.call(this),this.h=t||1,this.g=e||pe,this.j=Bt(this.qb,this),this.l=Date.now()}xt(uu,Ct);z=uu.prototype;z.ga=!1;z.T=null;z.qb=function(){if(this.ga){var t=Date.now()-this.l;0{t.g=null,t.i&&(t.i=!1,Ow(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class MV extends Wr{constructor(e,n){super(),this.m=e,this.j=n,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:Ow(this)}N(){super.N(),this.g&&(pe.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function jo(t){Wr.call(this),this.h=t,this.g={}}xt(jo,Wr);var Fy=[];function kw(t,e,n,r){Array.isArray(n)||(n&&(Fy[0]=n.toString()),n=Fy);for(var i=0;ir.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if(s!="noop"&&s!="stop"&&s!="close")for(var o=1;ou)&&(u!=3||Rh||this.g&&(this.h.h||this.g.ja()||qy(this.g)))){this.J||u!=4||e==7||(e==8||0>=f?Uo(3):Uo(2)),mu(this);var n=this.g.da();this.ca=n;t:if(Uw(this)){var r=qy(this.g);t="";var i=r.length,s=Bn(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){yi(this),ho(this);var o="";break t}this.h.i=new pe.TextDecoder}for(e=0;ee.length?fl:(e=e.slice(r,r+n),t.C=r+n,e)))}z.cancel=function(){this.J=!0,yi(this)};function ha(t){t.Y=Date.now()+t.P,qw(t,t.P)}function qw(t,e){if(t.B!=null)throw Error("WatchDog timer not null");t.B=la(Bt(t.lb,t),e)}function mu(t){t.B&&(pe.clearTimeout(t.B),t.B=null)}z.lb=function(){this.B=null;const t=Date.now();0<=t-this.Y?($V(this.j,this.A),this.L!=2&&(Uo(),Qt(17)),yi(this),this.o=2,ho(this)):qw(this,this.Y-t)};function ho(t){t.l.H==0||t.J||f1(t.l,t)}function yi(t){mu(t);var e=t.M;e&&typeof e.sa=="function"&&e.sa(),t.M=null,Cp(t.V),Dw(t.U),t.g&&(e=t.g,t.g=null,e.abort(),e.sa())}function $h(t,e){try{var n=t.l;if(n.H!=0&&(n.g==t||Lh(n.i,t))){if(!t.K&&Lh(n.i,t)&&n.H==3){try{var r=n.Ja.g.parse(e)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3i[2]&&n.G&&n.A==0&&!n.v&&(n.v=la(Bt(n.ib,n),6e3));if(1>=Xw(n.i)&&n.oa){try{n.oa()}catch{}n.oa=void 0}}else vi(n,11)}else if((t.K||n.g==t)&&pl(n),!Vo(e))for(i=n.Ja.g.parse(e),e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function jy(t,e,n){e instanceof Bo?(t.i=e,QV(t.i,t.h)):(n||(e=Zs(e,GV)),t.i=new Bo(e,t.h))}function Be(t,e,n){t.i.set(e,n)}function gu(t){return Be(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function Js(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Zs(t,e,n){return typeof t=="string"?(t=encodeURI(t).replace(e,zV),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function zV(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var Uy=/[#\/\?@]/g,WV=/[#\?:]/g,KV=/[#\?]/g,GV=/[#\?@]/g,YV=/#/g;function Bo(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function Kr(t){t.g||(t.g=new Map,t.h=0,t.i&&HV(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}z=Bo.prototype;z.add=function(t,e){Kr(this),this.i=null,t=Ps(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this};function Ww(t,e){Kr(t),e=Ps(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function Kw(t,e){return Kr(t),e=Ps(t,e),t.g.has(e)}z.forEach=function(t,e){Kr(this),this.g.forEach(function(n,r){n.forEach(function(i){t.call(e,i,r,this)},this)},this)};z.ta=function(){Kr(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r=t.j:!1}function Xw(t){return t.h?1:t.g?t.g.size:0}function Lh(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function Op(t,e){t.g?t.g.add(e):t.h=e}function Jw(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}Yw.prototype.cancel=function(){if(this.i=Zw(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const t of this.g.values())t.cancel();this.g.clear()}};function Zw(t){if(t.h!=null)return t.i.concat(t.h.F);if(t.g!=null&&t.g.size!==0){let e=t.i;for(const n of t.g.values())e=e.concat(n.F);return e}return yp(t.i)}var ZV=class{stringify(t){return pe.JSON.stringify(t,void 0)}parse(t){return pe.JSON.parse(t,void 0)}};function e5(){this.g=new ZV}function t5(t,e,n){const r=n||"";try{Hw(t,function(i,s){let o=i;aa(i)&&(o=Ip(i)),e.push(r+s+"="+encodeURIComponent(o))})}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function n5(t,e){const n=new fu;if(pe.Image){const r=new Image;r.onload=Ga(Qa,n,r,"TestLoadImage: loaded",!0,e),r.onerror=Ga(Qa,n,r,"TestLoadImage: error",!1,e),r.onabort=Ga(Qa,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=Ga(Qa,n,r,"TestLoadImage: timeout",!1,e),pe.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}function Qa(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch{}}function da(t){this.l=t.fc||null,this.j=t.ob||!1}xt(da,xp);da.prototype.g=function(){return new yu(this.l,this.j)};da.prototype.i=function(t){return function(){return t}}({});function yu(t,e){Ct.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=kp,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}xt(yu,Ct);var kp=0;z=yu.prototype;z.open=function(t,e){if(this.readyState!=kp)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,qo(this)};z.send=function(t){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||pe).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))};z.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,pa(this)),this.readyState=kp};z.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,qo(this)),this.g&&(this.readyState=3,qo(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof pe.ReadableStream<"u"&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;e1(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))};function e1(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}z.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?pa(this):qo(this),this.readyState==3&&e1(this)}};z.Za=function(t){this.g&&(this.response=this.responseText=t,pa(this))};z.Ya=function(t){this.g&&(this.response=t,pa(this))};z.ka=function(){this.g&&pa(this)};function pa(t){t.readyState=4,t.l=null,t.j=null,t.A=null,qo(t)}z.setRequestHeader=function(t,e){this.v.append(t,e)};z.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};z.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join(`\r -`)};function qo(t){t.onreadystatechange&&t.onreadystatechange.call(t)}Object.defineProperty(yu.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(t){this.m=t?"include":"same-origin"}});var r5=pe.JSON.parse;function nt(t){Ct.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=t1,this.L=this.M=!1}xt(nt,Ct);var t1="",i5=/^https?$/i,s5=["POST","PUT"];z=nt.prototype;z.Oa=function(t){this.M=t};z.ha=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+t);e=e?e.toUpperCase():"GET",this.I=t,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():Mh.g(),this.C=this.u?Ly(this.u):Ly(Mh),this.g.onreadystatechange=Bt(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(s){By(this,s);return}if(t=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if(typeof r.keys=="function"&&typeof r.get=="function")for(const s of r.keys())n.set(s,r.get(s));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(s=>s.toLowerCase()=="content-type"),i=pe.FormData&&t instanceof pe.FormData,!(0<=vw(s5,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[s,o]of n)this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{i1(this),0{}:null;t.g=null,t.C=null,e||Nt(t,"ready");try{n.onreadystatechange=r}catch{}}}function i1(t){t.g&&t.L&&(t.g.ontimeout=null),t.A&&(pe.clearTimeout(t.A),t.A=null)}z.isActive=function(){return!!this.g};function Bn(t){return t.g?t.g.readyState:0}z.da=function(){try{return 2=t.i.j-(t.m?1:0)?!1:t.m?(t.j=e.F.concat(t.j),!0):t.H==1||t.H==2||t.C>=(t.cb?0:t.eb)?!1:(t.m=la(Bt(t.Na,t,e),h1(t,t.C)),t.C++,!0)}z.Na=function(t){if(this.m)if(this.m=null,this.H==1){if(!t){this.W=Math.floor(1e5*Math.random()),t=this.W++;const i=new fa(this,this.l,t);let s=this.s;if(this.U&&(s?(s=Ew(s),Tw(s,this.U)):s=this.U),this.o!==null||this.O||(i.I=s,s=null),this.P)e:{for(var e=0,n=0;nl)s=Math.max(0,i[c].g-100),a=!1;else try{t5(u,o,"req"+l+"_")}catch{r&&r(u)}}if(a){r=o.join("&");break e}}}return t=t.j.splice(0,n),e.F=t,r}function l1(t){if(!t.g&&!t.u){t.ba=1;var e=t.Ma;$o||Rw(),Lo||($o(),Lo=!0),Ap.add(e,t),t.A=0}}function Mp(t){return t.g||t.u||3<=t.A?!1:(t.ba++,t.u=la(Bt(t.Ma,t),h1(t,t.A)),t.A++,!0)}z.Ma=function(){if(this.u=null,u1(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var t=2*this.S;this.l.info("BP detection timer enabled: "+t),this.B=la(Bt(this.jb,this),t)}};z.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,Qt(10),_u(this),u1(this))};function Vp(t){t.B!=null&&(pe.clearTimeout(t.B),t.B=null)}function u1(t){t.g=new fa(t,t.l,"rpc",t.ba),t.o===null&&(t.g.I=t.s),t.g.O=0;var e=cr(t.wa);Be(e,"RID","rpc"),Be(e,"SID",t.K),Be(e,"AID",t.V),Be(e,"CI",t.G?"0":"1"),!t.G&&t.qa&&Be(e,"TO",t.qa),Be(e,"TYPE","xmlhttp"),ma(t,e),t.o&&t.s&&Dp(e,t.o,t.s),t.L&&t.g.setTimeout(t.L);var n=t.g;t=t.pa,n.L=1,n.v=gu(cr(e)),n.s=null,n.S=!0,jw(n,t)}z.ib=function(){this.v!=null&&(this.v=null,_u(this),Mp(this),Qt(19))};function pl(t){t.v!=null&&(pe.clearTimeout(t.v),t.v=null)}function f1(t,e){var n=null;if(t.g==e){pl(t),Vp(t),t.g=null;var r=2}else if(Lh(t.i,e))n=e.F,Jw(t.i,e),r=1;else return;if(t.H!=0){if(e.i)if(r==1){n=e.s?e.s.length:0,e=Date.now()-e.G;var i=t.C;r=hu(),Nt(r,new Vw(r,n)),bu(t)}else l1(t);else if(i=e.o,i==3||i==0&&0i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var s=t.g[3],o=e+(s^n&(i^s))+r[0]+3614090360&4294967295;e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[1]+3905402710&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[2]+606105819&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[3]+3250441966&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[4]+4118548399&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[5]+1200080426&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[6]+2821735955&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[7]+4249261313&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[8]+1770035416&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[9]+2336552879&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[10]+4294925233&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[11]+2304563134&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[12]+1804603682&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[13]+4254626195&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[14]+2792965006&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(i^s&(n^i))+r[1]+4129170786&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[6]+3225465664&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[5]+3593408605&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[10]+38016083&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[9]+568446438&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[14]+3275163606&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[13]+2850285829&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[2]+4243563512&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[12]+2368359562&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(n^i^s)+r[5]+4294588738&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[8]+2272392833&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[11]+1839030562&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[14]+4259657740&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[1]+2763975236&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[4]+1272893353&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[7]+4139469664&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[10]+3200236656&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[13]+681279174&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[0]+3936430074&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[3]+3572445317&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[6]+76029189&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[9]+3654602809&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[12]+3873151461&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[15]+530742520&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(i^(n|~s))+r[0]+4096336452&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[7]+1126891415&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[12]+1700485571&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[3]+2399980690&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[8]+1873313359&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[15]+4264355552&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[4]+4149444226&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[11]+3174756917&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+s&4294967295}Mn.prototype.j=function(t,e){e===void 0&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,s=0;sthis.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;ee;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};function ke(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var s=t[i]|0;r&&s==e||(n[i]=s,r=!1)}this.g=n}var u5={};function Fp(t){return-128<=t&&128>t?vV(t,function(e){return new ke([e|0],0>e?-1:0)}):new ke([t|0],0>t?-1:0)}function qn(t){if(isNaN(t)||!isFinite(t))return ls;if(0>t)return kt(qn(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=jh;return new ke(e,0)}function _1(t,e){if(t.length==0)throw Error("number format error: empty string");if(e=e||10,2>e||36s?(s=qn(Math.pow(e,s)),r=r.R(s).add(qn(o))):(r=r.R(n),r=r.add(qn(o)))}return r}var jh=4294967296,ls=Fp(0),Uh=Fp(1),zy=Fp(16777216);z=ke.prototype;z.ea=function(){if(pn(this))return-kt(this).ea();for(var t=0,e=1,n=0;nt||36>>0).toString(t);if(n=i,tr(n))return s+r;for(;6>s.length;)s="0"+s;r=s+r}};z.D=function(t){return 0>t?0:t>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new ke(n,n[n.length-1]&-2147483648?-1:0)};function gl(t,e){return t.add(kt(e))}z.R=function(t){if(tr(this)||tr(t))return ls;if(pn(this))return pn(t)?kt(this).R(kt(t)):kt(kt(this).R(t));if(pn(t))return kt(this.R(kt(t)));if(0>this.X(zy)&&0>t.X(zy))return qn(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r>>16,o=this.D(r)&65535,a=t.D(i)>>>16,c=t.D(i)&65535;n[2*r+2*i]+=o*c,Xa(n,2*r+2*i),n[2*r+2*i+1]+=s*c,Xa(n,2*r+2*i+1),n[2*r+2*i+1]+=o*a,Xa(n,2*r+2*i+1),n[2*r+2*i+2]+=s*a,Xa(n,2*r+2*i+2)}for(r=0;r>>16,t[e]&=65535,e++}function Bs(t,e){this.g=t,this.h=e}function yl(t,e){if(tr(e))throw Error("division by zero");if(tr(t))return new Bs(ls,ls);if(pn(t))return e=yl(kt(t),e),new Bs(kt(e.g),kt(e.h));if(pn(e))return e=yl(t,kt(e)),new Bs(kt(e.g),e.h);if(30=r.X(t);)n=Wy(n),r=Wy(r);var i=Hi(n,1),s=Hi(r,1);for(r=Hi(r,2),n=Hi(n,2);!tr(r);){var o=s.add(r);0>=o.X(t)&&(i=i.add(n),s=o),r=Hi(r,1),n=Hi(n,1)}return e=gl(t,i.R(e)),new Bs(i,e)}for(i=ls;0<=t.X(e);){for(n=Math.max(1,Math.floor(t.ea()/e.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),s=qn(n),o=s.R(e);pn(o)||0>>31;return new ke(n,t.h)}function Hi(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],s=0;s>>e|t.D(s+n+1)<<32-e:t.D(s+n);return new ke(i,t.h)}ml.prototype.createWebChannel=ml.prototype.g;cn.prototype.send=cn.prototype.u;cn.prototype.open=cn.prototype.m;cn.prototype.close=cn.prototype.close;du.NO_ERROR=0;du.TIMEOUT=8;du.HTTP_ERROR=6;Fw.COMPLETE="complete";$w.EventType=ua;ua.OPEN="a";ua.CLOSE="b";ua.ERROR="c";ua.MESSAGE="d";Ct.prototype.listen=Ct.prototype.O;nt.prototype.listenOnce=nt.prototype.P;nt.prototype.getLastError=nt.prototype.Sa;nt.prototype.getLastErrorCode=nt.prototype.Ia;nt.prototype.getStatus=nt.prototype.da;nt.prototype.getResponseJson=nt.prototype.Wa;nt.prototype.getResponseText=nt.prototype.ja;nt.prototype.send=nt.prototype.ha;nt.prototype.setWithCredentials=nt.prototype.Oa;Mn.prototype.digest=Mn.prototype.l;Mn.prototype.reset=Mn.prototype.reset;Mn.prototype.update=Mn.prototype.j;ke.prototype.add=ke.prototype.add;ke.prototype.multiply=ke.prototype.R;ke.prototype.modulo=ke.prototype.gb;ke.prototype.compare=ke.prototype.X;ke.prototype.toNumber=ke.prototype.ea;ke.prototype.toString=ke.prototype.toString;ke.prototype.getBits=ke.prototype.D;ke.fromNumber=qn;ke.fromString=_1;var f5=function(){return new ml},h5=function(){return hu()},Pf=du,d5=Fw,p5=Di,Ky={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},m5=da,Ja=$w,g5=nt,y5=Mn,us=ke;const Gy="@firebase/firestore";/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Ft{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Ft.UNAUTHENTICATED=new Ft(null),Ft.GOOGLE_CREDENTIALS=new Ft("google-credentials-uid"),Ft.FIRST_PARTY=new Ft("first-party-uid"),Ft.MOCK_USER=new Ft("mock-user");/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */let Os="10.1.0";/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const xi=new dw("@firebase/firestore");function Yy(){return xi.logLevel}function ie(t,...e){if(xi.logLevel<=Oe.DEBUG){const n=e.map($p);xi.debug(`Firestore (${Os}): ${t}`,...n)}}function lr(t,...e){if(xi.logLevel<=Oe.ERROR){const n=e.map($p);xi.error(`Firestore (${Os}): ${t}`,...n)}}function gs(t,...e){if(xi.logLevel<=Oe.WARN){const n=e.map($p);xi.warn(`Firestore (${Os}): ${t}`,...n)}}function $p(t){if(typeof t=="string")return t;try{/** -* @license -* Copyright 2020 Google LLC -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function de(t="Unexpected state"){const e=`FIRESTORE (${Os}) INTERNAL ASSERTION FAILED: `+t;throw lr(e),new Error(e)}function He(t,e){t||de()}function ve(t,e){return t}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const j={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class le extends xs{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Mr{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class b1{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class v5{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Ft.UNAUTHENTICATED))}shutdown(){}}class _5{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class b5{constructor(e){this.t=e,this.currentUser=Ft.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){let r=this.i;const i=c=>this.i!==r?(r=this.i,n(c)):Promise.resolve();let s=new Mr;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new Mr,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const c=s;e.enqueueRetryable(async()=>{await c.promise,await i(this.currentUser)})},a=c=>{ie("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit(c=>a(c)),setTimeout(()=>{if(!this.auth){const c=this.t.getImmediate({optional:!0});c?a(c):(ie("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Mr)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(ie("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(He(typeof r.accessToken=="string"),new b1(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return He(e===null||typeof e=="string"),new Ft(e)}}class w5{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Ft.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class E5{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new w5(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Ft.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class T5{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class I5{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){const r=s=>{s.error!=null&&ie("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,ie("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{ie("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):ie("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(He(typeof n.token=="string"),this.R=n.token,new T5(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function A5(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;re?1:0}function ys(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class _t{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new le(j.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new le(j.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new le(j.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new le(j.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return _t.fromMillis(Date.now())}static fromDate(e){return _t.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new _t(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Pe(this.nanoseconds,e.nanoseconds):Pe(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class me{constructor(e){this.timestamp=e}static fromTimestamp(e){return new me(e)}static min(){return new me(new _t(0,0))}static max(){return new me(new _t(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Ho{constructor(e,n,r){n===void 0?n=0:n>e.length&&de(),r===void 0?r=e.length-n:r>e.length-n&&de(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return Ho.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Ho?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.lengtho)return 1}return e.lengthn.length?1:0}}class Qe extends Ho{construct(e,n,r){return new Qe(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new le(j.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new Qe(n)}static emptyPath(){return new Qe([])}}const C5=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class jt extends Ho{construct(e,n,r){return new jt(e,n,r)}static isValidIdentifier(e){return C5.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),jt.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new jt(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new le(j.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Qe.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return Qe.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new fe(new Qe(e.slice()))}}function S5(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=me.fromTimestamp(r===1e9?new _t(n+1,0):new _t(n,r));return new Br(i,fe.empty(),e)}function x5(t){return new Br(t.readTime,t.key,-1)}class Br{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Br(me.min(),fe.empty(),-1)}static max(){return new Br(me.max(),fe.empty(),-1)}}function P5(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=fe.comparator(t.documentKey,e.documentKey),n!==0?n:Pe(t.largestBatchId,e.largestBatchId))}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const R5="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class O5{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */async function ga(t){if(t.code!==j.FAILED_PRECONDITION||t.message!==R5)throw t;ie("LocalStore","Unexpectedly lost primary lease")}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class q{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&de(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new q((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof q?n:q.resolve(n)}catch(n){return q.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):q.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):q.reject(n)}static resolve(e){return new q((n,r)=>{n(e)})}static reject(e){return new q((n,r)=>{r(e)})}static waitFor(e){return new q((n,r)=>{let i=0,s=0,o=!1;e.forEach(a=>{++i,a.next(()=>{++s,o&&s===i&&n()},c=>r(c))}),o=!0,s===i&&n()})}static or(e){let n=q.resolve(!1);for(const r of e)n=n.next(i=>i?q.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new q((r,i)=>{const s=e.length,o=new Array(s);let a=0;for(let c=0;c{o[l]=u,++a,a===s&&r(o)},u=>i(u))}})}static doWhile(e,n){return new q((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function ya(t){return t.name==="IndexedDbTransactionError"}/** - * @license - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Lp{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.oe(r),this._e=r=>n.writeSequenceNumber(r))}oe(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this._e&&this._e(e),e}}Lp.ae=-1;function wu(t){return t==null}function vl(t){return t===0&&1/t==-1/0}function k5(t){return typeof t=="number"&&Number.isInteger(t)&&!vl(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function Qy(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function ks(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function E1(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Ze{constructor(e,n){this.comparator=e,this.root=n||Ot.EMPTY}insert(e,n){return new Ze(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Ot.BLACK,null,null))}remove(e){return new Ze(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Ot.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Za(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Za(this.root,e,this.comparator,!1)}getReverseIterator(){return new Za(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Za(this.root,e,this.comparator,!0)}}class Za{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Ot{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r!=null?r:Ot.RED,this.left=i!=null?i:Ot.EMPTY,this.right=s!=null?s:Ot.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new Ot(e!=null?e:this.key,n!=null?n:this.value,r!=null?r:this.color,i!=null?i:this.left,s!=null?s:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Ot.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return Ot.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Ot.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Ot.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw de();const e=this.left.check();if(e!==this.right.check())throw de();return e+(this.isRed()?0:1)}}Ot.EMPTY=null,Ot.RED=!0,Ot.BLACK=!1;Ot.EMPTY=new class{constructor(){this.size=0}get key(){throw de()}get value(){throw de()}get color(){throw de()}get left(){throw de()}get right(){throw de()}copy(e,n,r,i,s){return this}insert(e,n,r){return new Ot(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Ht{constructor(e){this.comparator=e,this.data=new Ze(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new Xy(this.data.getIterator())}getIteratorFrom(e){return new Xy(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size{n=n.add(r)}),n}isEqual(e){if(!(e instanceof Ht)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new Ht(this.comparator);return n.data=e,n}}class Xy{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class kn{constructor(e){this.fields=e,e.sort(jt.comparator)}static empty(){return new kn([])}unionWith(e){let n=new Ht(jt.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new kn(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return ys(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** - * @license - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class T1 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class zt{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new T1("Invalid base64 string: "+s):s}}(e);return new zt(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;oeQn(n,e))!==void 0}function vs(t,e){if(t===e)return 0;const n=Ri(t),r=Ri(e);if(n!==r)return Pe(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Pe(t.booleanValue,e.booleanValue);case 2:return function(s,o){const a=ht(s.integerValue||s.doubleValue),c=ht(o.integerValue||o.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(t,e);case 3:return Jy(t.timestampValue,e.timestampValue);case 4:return Jy(zo(t),zo(e));case 5:return Pe(t.stringValue,e.stringValue);case 6:return function(s,o){const a=Pi(s),c=Pi(o);return a.compareTo(c)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),c=o.split("/");for(let l=0;le.mapValue.fields[n]=po(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=po(t.arrayValue.values[n]);return e}return Object.assign({},t)}function M5(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class mn{constructor(e){this.value=e}static empty(){return new mn({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r{if(!n.isImmediateParentOf(a)){const c=this.getFieldsMap(n);this.applyChanges(c,r,i),r={},i=[],n=a.popLast()}o?r[a.lastSegment()]=po(o):i.push(a.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());Sc(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Qn(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;re[i]=s);for(const i of r)delete e[i]}clone(){return new mn(po(this.value))}}function I1(t){const e=[];return ks(t.fields,(n,r)=>{const i=new jt([n]);if(Sc(r)){const s=I1(r.mapValue).fields;if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new kn(e)}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class $t{constructor(e,n,r,i,s,o,a){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new $t(e,0,me.min(),me.min(),me.min(),mn.empty(),0)}static newFoundDocument(e,n,r,i){return new $t(e,1,n,me.min(),r,i,0)}static newNoDocument(e,n){return new $t(e,2,n,me.min(),me.min(),mn.empty(),0)}static newUnknownDocument(e,n){return new $t(e,3,n,me.min(),me.min(),mn.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(me.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=mn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=mn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=me.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof $t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new $t(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class _l{constructor(e,n){this.position=e,this.inclusive=n}}function tv(t,e,n){let r=0;for(let i=0;i":return e>0;case">=":return e>=0;default:return de()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class Xn extends A1{constructor(e,n){super(),this.filters=e,this.op=n,this.ce=null}static create(e,n){return new Xn(e,n)}matches(e){return C1(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ce!==null||(this.ce=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ce}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){const e=this.le(n=>n.isInequality());return e!==null?e.field:null}le(e){for(const n of this.getFlattenedFilters())if(e(n))return n;return null}}function C1(t){return t.op==="and"}function S1(t){return F5(t)&&C1(t)}function F5(t){for(const e of t.filters)if(e instanceof Xn)return!1;return!0}function Hh(t){if(t instanceof vt)return t.field.canonicalString()+t.op.toString()+_s(t.value);if(S1(t))return t.filters.map(e=>Hh(e)).join(",");{const e=t.filters.map(n=>Hh(n)).join(",");return`${t.op}(${e})`}}function x1(t,e){return t instanceof vt?function(r,i){return i instanceof vt&&r.op===i.op&&r.field.isEqual(i.field)&&Qn(r.value,i.value)}(t,e):t instanceof Xn?function(r,i){return i instanceof Xn&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,a)=>s&&x1(o,i.filters[a]),!0):!1}(t,e):void de()}function P1(t){return t instanceof vt?function(n){return`${n.field.canonicalString()} ${n.op} ${_s(n.value)}`}(t):t instanceof Xn?function(n){return n.op.toString()+" {"+n.getFilters().map(P1).join(" ,")+"}"}(t):"Filter"}class $5 extends vt{constructor(e,n,r){super(e,n,r),this.key=fe.fromName(r.referenceValue)}matches(e){const n=fe.comparator(e.key,this.key);return this.matchesComparison(n)}}class L5 extends vt{constructor(e,n){super(e,"in",n),this.keys=R1("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class j5 extends vt{constructor(e,n){super(e,"not-in",n),this.keys=R1("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function R1(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>fe.fromName(r.referenceValue))}class U5 extends vt{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Bp(n)&&Ko(n.arrayValue,this.value)}}class B5 extends vt{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Ko(this.value.arrayValue,n)}}class q5 extends vt{constructor(e,n){super(e,"not-in",n)}matches(e){if(Ko(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!Ko(this.value.arrayValue,n)}}class H5 extends vt{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!Bp(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Ko(this.value.arrayValue,r))}}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class z5{constructor(e,n=null,r=[],i=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=a,this.he=null}}function rv(t,e=null,n=[],r=[],i=null,s=null,o=null){return new z5(t,e,n,r,i,s,o)}function qp(t){const e=ve(t);if(e.he===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>Hh(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),wu(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>_s(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>_s(r)).join(",")),e.he=n}return e.he}function Hp(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n0?t.explicitOrderBy[0].field:null}function G5(t){for(const e of t.filters){const n=e.getFirstInequalityField();if(n!==null)return n}return null}function Y5(t){return t.collectionGroup!==null}function fs(t){const e=ve(t);if(e.Pe===null){e.Pe=[];const n=G5(e),r=K5(e);if(n!==null&&r===null)n.isKeyField()||e.Pe.push(new mo(n)),e.Pe.push(new mo(jt.keyField(),"asc"));else{let i=!1;for(const s of e.explicitOrderBy)e.Pe.push(s),s.field.isKeyField()&&(i=!0);if(!i){const s=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.Pe.push(new mo(jt.keyField(),s))}}}return e.Pe}function ur(t){const e=ve(t);if(!e.Ie)if(e.limitType==="F")e.Ie=rv(e.path,e.collectionGroup,fs(e),e.filters,e.limit,e.startAt,e.endAt);else{const n=[];for(const s of fs(e)){const o=s.dir==="desc"?"asc":"desc";n.push(new mo(s.field,o))}const r=e.endAt?new _l(e.endAt.position,e.endAt.inclusive):null,i=e.startAt?new _l(e.startAt.position,e.startAt.inclusive):null;e.Ie=rv(e.path,e.collectionGroup,n,e.filters,e.limit,r,i)}return e.Ie}function Wh(t,e,n){return new Eu(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Tu(t,e){return Hp(ur(t),ur(e))&&t.limitType===e.limitType}function k1(t){return`${qp(ur(t))}|lt:${t.limitType}`}function Kh(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>P1(i)).join(", ")}]`),wu(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>_s(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>_s(i)).join(",")),`Target(${r})`}(ur(t))}; limitType=${t.limitType})`}function Iu(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):fe.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of fs(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,a,c){const l=tv(o,a,c);return o.inclusive?l<=0:l<0}(r.startAt,fs(r),i)||r.endAt&&!function(o,a,c){const l=tv(o,a,c);return o.inclusive?l>=0:l>0}(r.endAt,fs(r),i))}(t,e)}function Q5(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function D1(t){return(e,n)=>{let r=!1;for(const i of fs(t)){const s=X5(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function X5(t,e,n){const r=t.field.isKeyField()?fe.comparator(e.key,n.key):function(s,o,a){const c=o.data.field(s),l=a.data.field(s);return c!==null&&l!==null?vs(c,l):de()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return de()}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Ds{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s{for(const[i,s]of r)e(i,s)})}isEmpty(){return E1(this.inner)}size(){return this.innerSize}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const J5=new Ze(fe.comparator);function fr(){return J5}const N1=new Ze(fe.comparator);function eo(...t){let e=N1;for(const n of t)e=e.insert(n.key,n);return e}function M1(t){let e=N1;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function _i(){return go()}function V1(){return go()}function go(){return new Ds(t=>t.toString(),(t,e)=>t.isEqual(e))}const Z5=new Ze(fe.comparator),e6=new Ht(fe.comparator);function Ee(...t){let e=e6;for(const n of t)e=e.add(n);return e}const t6=new Ht(Pe);function n6(){return t6}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function F1(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:vl(e)?"-0":e}}function $1(t){return{integerValue:""+t}}function r6(t,e){return k5(e)?$1(e):F1(t,e)}/** - * @license - * Copyright 2018 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Au{constructor(){this._=void 0}}function i6(t,e,n){return t instanceof bl?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&jp(s)&&(s=Up(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof Go?j1(t,e):t instanceof Yo?U1(t,e):function(i,s){const o=L1(i,s),a=sv(o)+sv(i.Te);return qh(o)&&qh(i.Te)?$1(a):F1(i.serializer,a)}(t,e)}function s6(t,e,n){return t instanceof Go?j1(t,e):t instanceof Yo?U1(t,e):n}function L1(t,e){return t instanceof wl?function(r){return qh(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class bl extends Au{}class Go extends Au{constructor(e){super(),this.elements=e}}function j1(t,e){const n=B1(e);for(const r of t.elements)n.some(i=>Qn(i,r))||n.push(r);return{arrayValue:{values:n}}}class Yo extends Au{constructor(e){super(),this.elements=e}}function U1(t,e){let n=B1(e);for(const r of t.elements)n=n.filter(i=>!Qn(i,r));return{arrayValue:{values:n}}}class wl extends Au{constructor(e,n){super(),this.serializer=e,this.Te=n}}function sv(t){return ht(t.integerValue||t.doubleValue)}function B1(t){return Bp(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function o6(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Go&&i instanceof Go||r instanceof Yo&&i instanceof Yo?ys(r.elements,i.elements,Qn):r instanceof wl&&i instanceof wl?Qn(r.Te,i.Te):r instanceof bl&&i instanceof bl}(t.transform,e.transform)}class a6{constructor(e,n){this.version=e,this.transformResults=n}}class rr{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new rr}static exists(e){return new rr(void 0,e)}static updateTime(e){return new rr(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function xc(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class Cu{}function q1(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new z1(t.key,rr.none()):new va(t.key,t.data,rr.none());{const n=t.data,r=mn.empty();let i=new Ht(jt.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new Ni(t.key,r,new kn(i.toArray()),rr.none())}}function c6(t,e,n){t instanceof va?function(i,s,o){const a=i.value.clone(),c=av(i.fieldTransforms,s,o.transformResults);a.setAll(c),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof Ni?function(i,s,o){if(!xc(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=av(i.fieldTransforms,s,o.transformResults),c=s.data;c.setAll(H1(i)),c.setAll(a),s.convertToFoundDocument(o.version,c).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function yo(t,e,n,r){return t instanceof va?function(s,o,a,c){if(!xc(s.precondition,o))return a;const l=s.value.clone(),u=cv(s.fieldTransforms,c,o);return l.setAll(u),o.convertToFoundDocument(o.version,l).setHasLocalMutations(),null}(t,e,n,r):t instanceof Ni?function(s,o,a,c){if(!xc(s.precondition,o))return a;const l=cv(s.fieldTransforms,c,o),u=o.data;return u.setAll(H1(s)),u.setAll(l),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(f=>f.field))}(t,e,n,r):function(s,o,a){return xc(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function l6(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=L1(r.transform,i||null);s!=null&&(n===null&&(n=mn.empty()),n.set(r.field,s))}return n||null}function ov(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&ys(r,i,(s,o)=>o6(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class va extends Cu{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class Ni extends Cu{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function H1(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function av(t,e,n){const r=new Map;He(t.length===n.length);for(let i=0;i{const s=e.get(i.key),o=s.overlayedDocument;let a=this.applyToLocalView(o,s.mutatedFields);a=n.has(i.key)?null:a;const c=q1(o,a);c!==null&&r.set(i.key,c),o.isValidDocument()||o.convertToNoDocument(me.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),Ee())}isEqual(e){return this.batchId===e.batchId&&ys(this.mutations,e.mutations,(n,r)=>ov(n,r))&&ys(this.baseMutations,e.baseMutations,(n,r)=>ov(n,r))}}class zp{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){He(e.mutations.length===r.length);let i=function(){return Z5}();const s=e.mutations;for(let o=0;othis.onExistenceFilterMismatchCallbacks.delete(n)}notifyOnExistenceFilterMismatch(e){this.onExistenceFilterMismatchCallbacks.forEach(n=>n(e))}}let tc=null;/** - * @license - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function m6(){return new TextEncoder}/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const g6=new us([4294967295,4294967295],0);function lv(t){const e=m6().encode(t),n=new y5;return n.update(e),new Uint8Array(n.digest())}function uv(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new us([n,r],0),new us([i,s],0)]}class Kp{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new to(`Invalid padding: ${n}`);if(r<0)throw new to(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new to(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new to(`Invalid padding when bitmap length is 0: ${n}`);this.de=8*e.length-n,this.Ae=us.fromNumber(this.de)}Re(e,n,r){let i=e.add(n.multiply(us.fromNumber(r)));return i.compare(g6)===1&&(i=new us([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Ae).toNumber()}Ve(e){return(this.bitmap[Math.floor(e/8)]&1<o.insert(a)),o}insert(e){if(this.de===0)return;const n=lv(e),[r,i]=uv(n);for(let s=0;s0&&(this.De=!0,this.Se=e)}Me(){let e=Ee(),n=Ee(),r=Ee();return this.we.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:de()}}),new _a(this.Se,this.be,e,n,r)}xe(){this.De=!1,this.we=dv()}Oe(e,n){this.De=!0,this.we=this.we.insert(e,n)}Ne(e){this.De=!0,this.we=this.we.remove(e)}Be(){this.ye+=1}Le(){this.ye-=1}ke(){this.De=!0,this.be=!0}}class y6{constructor(e){this.qe=e,this.Qe=new Map,this.Ke=fr(),this.$e=hv(),this.Ue=new Ze(Pe)}We(e){for(const n of e.fe)e.ge&&e.ge.isFoundDocument()?this.Ge(n,e.ge):this.ze(n,e.key,e.ge);for(const n of e.removedTargetIds)this.ze(n,e.key,e.ge)}je(e){this.forEachTarget(e,n=>{const r=this.He(n);switch(e.state){case 0:this.Je(n)&&r.Fe(e.resumeToken);break;case 1:r.Le(),r.ve||r.xe(),r.Fe(e.resumeToken);break;case 2:r.Le(),r.ve||this.removeTarget(n);break;case 3:this.Je(n)&&(r.ke(),r.Fe(e.resumeToken));break;case 4:this.Je(n)&&(this.Ye(n),r.Fe(e.resumeToken));break;default:de()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Qe.forEach((r,i)=>{this.Je(i)&&n(i)})}Ze(e){var n,r;const i=e.targetId,s=e.pe.count,o=this.Xe(i);if(o){const a=o.target;if(zh(a))if(s===0){const c=new fe(a.path);this.ze(i,c,$t.newNoDocument(c,me.min()))}else He(s===1);else{const c=this.et(i);if(c!==s){const l=this.tt(e,c);if(l.status!==0){this.Ye(i);const u=l.status===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ue=this.Ue.insert(i,u)}(n=Wp.instance)===null||n===void 0||n.notifyOnExistenceFilterMismatch(function(f,h,m,P){var v,A,E,C,D,F;const G={localCacheCount:m,existenceFilterCount:P.count},se=P.unchangedNames;return se&&(G.bloomFilter={applied:f===0,hashCount:(v=se==null?void 0:se.hashCount)!==null&&v!==void 0?v:0,bitmapLength:(C=(E=(A=se==null?void 0:se.bits)===null||A===void 0?void 0:A.bitmap)===null||E===void 0?void 0:E.length)!==null&&C!==void 0?C:0,padding:(F=(D=se==null?void 0:se.bits)===null||D===void 0?void 0:D.padding)!==null&&F!==void 0?F:0},h&&(G.bloomFilter.mightContain=h)),G}(l.status,(r=l.nt)!==null&&r!==void 0?r:null,c,e.pe))}}}}tt(e,n){const{unchangedNames:r,count:i}=e.pe;if(!r||!r.bits)return{status:1};const{bits:{bitmap:s="",padding:o=0},hashCount:a=0}=r;let c,l;try{c=Pi(s).toUint8Array()}catch(f){if(f instanceof T1)return gs("Decoding the base64 bloom filter in existence filter failed ("+f.message+"); ignoring the bloom filter and falling back to full re-query."),{status:1};throw f}try{l=new Kp(c,o,a)}catch(f){return gs(f instanceof to?"BloomFilter error: ":"Applying bloom filter failed: ",f),{status:1}}const u=f=>{const h=this.qe.rt();return l.mightContain(`projects/${h.projectId}/databases/${h.database}/documents/${f}`)};return l.de===0?{status:1}:{status:i===n-this.it(e.targetId,u)?0:2,nt:u}}it(e,n){const r=this.qe.getRemoteKeysForTarget(e);let i=0;return r.forEach(s=>{n(s.path.canonicalString())||(this.ze(e,s,null),i++)}),i}st(e){const n=new Map;this.Qe.forEach((s,o)=>{const a=this.Xe(o);if(a){if(s.current&&zh(a.target)){const c=new fe(a.target.path);this.Ke.get(c)!==null||this.ot(o,c)||this.ze(o,c,$t.newNoDocument(c,e))}s.Ce&&(n.set(o,s.Me()),s.xe())}});let r=Ee();this.$e.forEach((s,o)=>{let a=!0;o.forEachWhile(c=>{const l=this.Xe(c);return!l||l.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(s))}),this.Ke.forEach((s,o)=>o.setReadTime(e));const i=new Su(e,n,this.Ue,this.Ke,r);return this.Ke=fr(),this.$e=hv(),this.Ue=new Ze(Pe),i}Ge(e,n){if(!this.Je(e))return;const r=this.ot(e,n.key)?2:0;this.He(e).Oe(n.key,r),this.Ke=this.Ke.insert(n.key,n),this.$e=this.$e.insert(n.key,this._t(n.key).add(e))}ze(e,n,r){if(!this.Je(e))return;const i=this.He(e);this.ot(e,n)?i.Oe(n,1):i.Ne(n),this.$e=this.$e.insert(n,this._t(n).delete(e)),r&&(this.Ke=this.Ke.insert(n,r))}removeTarget(e){this.Qe.delete(e)}et(e){const n=this.He(e).Me();return this.qe.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Be(e){this.He(e).Be()}He(e){let n=this.Qe.get(e);return n||(n=new fv,this.Qe.set(e,n)),n}_t(e){let n=this.$e.get(e);return n||(n=new Ht(Pe),this.$e=this.$e.insert(e,n)),n}Je(e){const n=this.Xe(e)!==null;return n||ie("WatchChangeAggregator","Detected inactive target",e),n}Xe(e){const n=this.Qe.get(e);return n&&n.ve?null:this.qe.ut(e)}Ye(e){this.Qe.set(e,new fv),this.qe.getRemoteKeysForTarget(e).forEach(n=>{this.ze(e,n,null)})}ot(e,n){return this.qe.getRemoteKeysForTarget(e).has(n)}}function hv(){return new Ze(fe.comparator)}function dv(){return new Ze(fe.comparator)}const v6=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),_6=(()=>({"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"}))(),b6=(()=>({and:"AND",or:"OR"}))();class w6{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Gh(t,e){return t.useProto3Json||wu(e)?e:{value:e}}function El(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Y1(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function E6(t,e){return El(t,e.toTimestamp())}function Kn(t){return He(!!t),me.fromTimestamp(function(n){const r=qr(n);return new _t(r.seconds,r.nanos)}(t))}function Gp(t,e){return function(r){return new Qe(["projects",r.projectId,"databases",r.database])}(t).child("documents").child(e).canonicalString()}function Q1(t){const e=Qe.fromString(t);return He(eE(e)),e}function Yh(t,e){return Gp(t.databaseId,e.path)}function Rf(t,e){const n=Q1(e);if(n.get(1)!==t.databaseId.projectId)throw new le(j.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new le(j.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new fe(X1(n))}function Qh(t,e){return Gp(t.databaseId,e)}function T6(t){const e=Q1(t);return e.length===4?Qe.emptyPath():X1(e)}function Xh(t){return new Qe(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function X1(t){return He(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function pv(t,e,n){return{name:Yh(t,e),fields:n.value.mapValue.fields}}function I6(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(l){return l==="NO_CHANGE"?0:l==="ADD"?1:l==="REMOVE"?2:l==="CURRENT"?3:l==="RESET"?4:de()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(l,u){return l.useProto3Json?(He(u===void 0||typeof u=="string"),zt.fromBase64String(u||"")):(He(u===void 0||u instanceof Uint8Array),zt.fromUint8Array(u||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(l){const u=l.code===void 0?j.UNKNOWN:W1(l.code);return new le(u,l.message||"")}(o);n=new G1(r,i,s,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=Rf(t,r.document.name),s=Kn(r.document.updateTime),o=r.document.createTime?Kn(r.document.createTime):me.min(),a=new mn({mapValue:{fields:r.document.fields}}),c=$t.newFoundDocument(i,s,o,a),l=r.targetIds||[],u=r.removedTargetIds||[];n=new Pc(l,u,c.key,c)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=Rf(t,r.document),s=r.readTime?Kn(r.readTime):me.min(),o=$t.newNoDocument(i,s),a=r.removedTargetIds||[];n=new Pc([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=Rf(t,r.document),s=r.removedTargetIds||[];n=new Pc([],s,i,null)}else{if(!("filter"in e))return de();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new d6(i,s),a=r.targetId;n=new K1(a,o)}}return n}function A6(t,e){let n;if(e instanceof va)n={update:pv(t,e.key,e.value)};else if(e instanceof z1)n={delete:Yh(t,e.key)};else if(e instanceof Ni)n={update:pv(t,e.key,e.data),updateMask:N6(e.fieldMask)};else{if(!(e instanceof u6))return de();n={verify:Yh(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const a=o.transform;if(a instanceof bl)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Go)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof Yo)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof wl)return{fieldPath:o.field.canonicalString(),increment:a.Te};throw de()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:E6(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:de()}(t,e.precondition)),n}function C6(t,e){return t&&t.length>0?(He(e!==void 0),t.map(n=>function(i,s){let o=i.updateTime?Kn(i.updateTime):Kn(s);return o.isEqual(me.min())&&(o=Kn(s)),new a6(o,i.transformResults||[])}(n,e))):[]}function S6(t,e){return{documents:[Qh(t,e.path)]}}function x6(t,e){const n={structuredQuery:{}},r=e.path;e.collectionGroup!==null?(n.parent=Qh(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Qh(t,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(c){if(c.length!==0)return Z1(Xn.create(c,"and"))}(e.filters);i&&(n.structuredQuery.where=i);const s=function(c){if(c.length!==0)return c.map(l=>function(f){return{field:Yi(f.field),direction:O6(f.dir)}}(l))}(e.orderBy);s&&(n.structuredQuery.orderBy=s);const o=Gh(t,e.limit);return o!==null&&(n.structuredQuery.limit=o),e.startAt&&(n.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),n}function P6(t){let e=T6(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){He(r===1);const u=n.from[0];u.allDescendants?i=u.collectionId:e=e.child(u.collectionId)}let s=[];n.where&&(s=function(f){const h=J1(f);return h instanceof Xn&&S1(h)?h.getFilters():[h]}(n.where));let o=[];n.orderBy&&(o=function(f){return f.map(h=>function(P){return new mo(Qi(P.field),function(A){switch(A){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(P.direction))}(h))}(n.orderBy));let a=null;n.limit&&(a=function(f){let h;return h=typeof f=="object"?f.value:f,wu(h)?null:h}(n.limit));let c=null;n.startAt&&(c=function(f){const h=!!f.before,m=f.values||[];return new _l(m,h)}(n.startAt));let l=null;return n.endAt&&(l=function(f){const h=!f.before,m=f.values||[];return new _l(m,h)}(n.endAt)),W5(e,i,o,s,a,"F",c,l)}function R6(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return de()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function J1(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Qi(n.unaryFilter.field);return vt.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=Qi(n.unaryFilter.field);return vt.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Qi(n.unaryFilter.field);return vt.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Qi(n.unaryFilter.field);return vt.create(o,"!=",{nullValue:"NULL_VALUE"});default:return de()}}(t):t.fieldFilter!==void 0?function(n){return vt.create(Qi(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return de()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return Xn.create(n.compositeFilter.filters.map(r=>J1(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return de()}}(n.compositeFilter.op))}(t):de()}function O6(t){return v6[t]}function k6(t){return _6[t]}function D6(t){return b6[t]}function Yi(t){return{fieldPath:t.canonicalString()}}function Qi(t){return jt.fromServerFormat(t.fieldPath)}function Z1(t){return t instanceof vt?function(n){if(n.op==="=="){if(ev(n.value))return{unaryFilter:{field:Yi(n.field),op:"IS_NAN"}};if(Zy(n.value))return{unaryFilter:{field:Yi(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(ev(n.value))return{unaryFilter:{field:Yi(n.field),op:"IS_NOT_NAN"}};if(Zy(n.value))return{unaryFilter:{field:Yi(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Yi(n.field),op:k6(n.op),value:n.value}}}(t):t instanceof Xn?function(n){const r=n.getFilters().map(i=>Z1(i));return r.length===1?r[0]:{compositeFilter:{op:D6(n.op),filters:r}}}(t):de()}function N6(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function eE(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Pr{constructor(e,n,r,i,s=me.min(),o=me.min(),a=zt.EMPTY_BYTE_STRING,c=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=c}withSequenceNumber(e){return new Pr(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new Pr(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Pr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Pr(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class M6{constructor(e){this.ct=e}}function V6(t){const e=P6({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?Wh(e,e.limit,"L"):e}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class F6{constructor(){this.sn=new $6}addToCollectionParentIndex(e,n){return this.sn.add(n),q.resolve()}getCollectionParents(e,n){return q.resolve(this.sn.getEntries(n))}addFieldIndex(e,n){return q.resolve()}deleteFieldIndex(e,n){return q.resolve()}getDocumentsMatchingTarget(e,n){return q.resolve(null)}getIndexType(e,n){return q.resolve(0)}getFieldIndexes(e,n){return q.resolve([])}getNextCollectionGroupToUpdate(e){return q.resolve(null)}getMinOffset(e,n){return q.resolve(Br.min())}getMinOffsetFromCollectionGroup(e,n){return q.resolve(Br.min())}updateCollectionGroup(e,n,r){return q.resolve()}updateIndexEntries(e,n){return q.resolve()}}class $6{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new Ht(Qe.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new Ht(Qe.comparator)).toArray()}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class bs{constructor(e){this.Mn=e}next(){return this.Mn+=2,this.Mn}static xn(){return new bs(0)}static On(){return new bs(-1)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class L6{constructor(){this.changes=new Ds(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,$t.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?q.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *//** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class j6{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class U6{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&yo(r.mutation,i,kn.empty(),_t.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Ee()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Ee()){const i=_i();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=eo();return s.forEach((a,c)=>{o=o.insert(a,c.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=_i();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Ee()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,r,i){let s=fr();const o=go(),a=function(){return go()}();return n.forEach((c,l)=>{const u=r.get(l.key);i.has(l.key)&&(u===void 0||u.mutation instanceof Ni)?s=s.insert(l.key,l):u!==void 0?(o.set(l.key,u.mutation.getFieldMask()),yo(u.mutation,l,u.mutation.getFieldMask(),_t.now())):o.set(l.key,kn.empty())}),this.recalculateAndSaveOverlays(e,s).next(c=>(c.forEach((l,u)=>o.set(l,u)),n.forEach((l,u)=>{var f;return a.set(l,new j6(u,(f=o.get(l))!==null&&f!==void 0?f:null))}),a))}recalculateAndSaveOverlays(e,n){const r=go();let i=new Ze((o,a)=>o-a),s=Ee();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const a of o)a.keys().forEach(c=>{const l=n.get(c);if(l===null)return;let u=r.get(c)||kn.empty();u=a.applyToLocalView(l,u),r.set(c,u);const f=(i.get(a.batchId)||Ee()).add(c);i=i.insert(a.batchId,f)})}).next(()=>{const o=[],a=i.getReverseIterator();for(;a.hasNext();){const c=a.getNext(),l=c.key,u=c.value,f=V1();u.forEach(h=>{if(!s.has(h)){const m=q1(n.get(h),r.get(h));m!==null&&f.set(h,m),s=s.add(h)}}),o.push(this.documentOverlayCache.saveOverlays(e,l,f))}return q.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r){return function(s){return fe.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):Y5(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r):this.getDocumentsMatchingCollectionQuery(e,n,r)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):q.resolve(_i());let a=-1,c=s;return o.next(l=>q.forEach(l,(u,f)=>(a{c=c.insert(u,h)}))).next(()=>this.populateOverlays(e,l,s)).next(()=>this.computeViews(e,c,l,Ee())).next(u=>({batchId:a,changes:M1(u)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new fe(n)).next(r=>{let i=eo();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r){const i=n.collectionGroup;let s=eo();return this.indexManager.getCollectionParents(e,i).next(o=>q.forEach(o,a=>{const c=function(u,f){return new Eu(f,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt)}(n,a.child(i));return this.getDocumentsMatchingCollectionQuery(e,c,r).next(l=>{l.forEach((u,f)=>{s=s.insert(u,f)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(e,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,i))).next(s=>{i.forEach((a,c)=>{const l=c.getKey();s.get(l)===null&&(s=s.insert(l,$t.newInvalidDocument(l)))});let o=eo();return s.forEach((a,c)=>{const l=i.get(a);l!==void 0&&yo(l.mutation,c,kn.empty(),_t.now()),Iu(n,c)&&(o=o.insert(a,c))}),o})}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class B6{constructor(e){this.serializer=e,this.ar=new Map,this.ur=new Map}getBundleMetadata(e,n){return q.resolve(this.ar.get(n))}saveBundleMetadata(e,n){return this.ar.set(n.id,function(i){return{id:i.id,version:i.version,createTime:Kn(i.createTime)}}(n)),q.resolve()}getNamedQuery(e,n){return q.resolve(this.ur.get(n))}saveNamedQuery(e,n){return this.ur.set(n.name,function(i){return{name:i.name,query:V6(i.bundledQuery),readTime:Kn(i.readTime)}}(n)),q.resolve()}}/** - * @license - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class q6{constructor(){this.overlays=new Ze(fe.comparator),this.cr=new Map}getOverlay(e,n){return q.resolve(this.overlays.get(n))}getOverlays(e,n){const r=_i();return q.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.ht(e,n,s)}),q.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.cr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.cr.delete(r)),q.resolve()}getOverlaysForCollection(e,n,r){const i=_i(),s=n.length+1,o=new fe(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const c=a.getNext().value,l=c.getKey();if(!n.isPrefixOf(l.path))break;l.path.length===s&&c.largestBatchId>r&&i.set(c.getKey(),c)}return q.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Ze((l,u)=>l-u);const o=this.overlays.getIterator();for(;o.hasNext();){const l=o.getNext().value;if(l.getKey().getCollectionGroup()===n&&l.largestBatchId>r){let u=s.get(l.largestBatchId);u===null&&(u=_i(),s=s.insert(l.largestBatchId,u)),u.set(l.getKey(),l)}}const a=_i(),c=s.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((l,u)=>a.set(l,u)),!(a.size()>=i)););return q.resolve(a)}ht(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.cr.get(i.largestBatchId).delete(r.key);this.cr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new h6(n,r));let s=this.cr.get(n);s===void 0&&(s=Ee(),this.cr.set(n,s)),this.cr.set(n,s.add(r.key))}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Yp{constructor(){this.lr=new Ht(It.hr),this.Pr=new Ht(It.Ir)}isEmpty(){return this.lr.isEmpty()}addReference(e,n){const r=new It(e,n);this.lr=this.lr.add(r),this.Pr=this.Pr.add(r)}Tr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.Er(new It(e,n))}dr(e,n){e.forEach(r=>this.removeReference(r,n))}Ar(e){const n=new fe(new Qe([])),r=new It(n,e),i=new It(n,e+1),s=[];return this.Pr.forEachInRange([r,i],o=>{this.Er(o),s.push(o.key)}),s}Rr(){this.lr.forEach(e=>this.Er(e))}Er(e){this.lr=this.lr.delete(e),this.Pr=this.Pr.delete(e)}Vr(e){const n=new fe(new Qe([])),r=new It(n,e),i=new It(n,e+1);let s=Ee();return this.Pr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new It(e,0),r=this.lr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class It{constructor(e,n){this.key=e,this.mr=n}static hr(e,n){return fe.comparator(e.key,n.key)||Pe(e.mr,n.mr)}static Ir(e,n){return Pe(e.mr,n.mr)||fe.comparator(e.key,n.key)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class H6{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.gr=1,this.pr=new Ht(It.hr)}checkEmpty(e){return q.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.gr;this.gr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new f6(s,n,r,i);this.mutationQueue.push(o);for(const a of i)this.pr=this.pr.add(new It(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return q.resolve(o)}lookupMutationBatch(e,n){return q.resolve(this.yr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.wr(r),s=i<0?0:i;return q.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return q.resolve(this.mutationQueue.length===0?-1:this.gr-1)}getAllMutationBatches(e){return q.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new It(n,0),i=new It(n,Number.POSITIVE_INFINITY),s=[];return this.pr.forEachInRange([r,i],o=>{const a=this.yr(o.mr);s.push(a)}),q.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new Ht(Pe);return n.forEach(i=>{const s=new It(i,0),o=new It(i,Number.POSITIVE_INFINITY);this.pr.forEachInRange([s,o],a=>{r=r.add(a.mr)})}),q.resolve(this.Sr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;fe.isDocumentKey(s)||(s=s.child(""));const o=new It(new fe(s),0);let a=new Ht(Pe);return this.pr.forEachWhile(c=>{const l=c.key.path;return!!r.isPrefixOf(l)&&(l.length===i&&(a=a.add(c.mr)),!0)},o),q.resolve(this.Sr(a))}Sr(e){const n=[];return e.forEach(r=>{const i=this.yr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){He(this.br(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.pr;return q.forEach(n.mutations,i=>{const s=new It(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.pr=r})}Cn(e){}containsKey(e,n){const r=new It(n,0),i=this.pr.firstAfterOrEqual(r);return q.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,q.resolve()}br(e,n){return this.wr(e)}wr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}yr(e){const n=this.wr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class z6{constructor(e){this.Dr=e,this.docs=function(){return new Ze(fe.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.Dr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return q.resolve(r?r.document.mutableCopy():$t.newInvalidDocument(n))}getEntries(e,n){let r=fr();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():$t.newInvalidDocument(i))}),q.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=fr();const o=n.path,a=new fe(o.child("")),c=this.docs.getIteratorFrom(a);for(;c.hasNext();){const{key:l,value:{document:u}}=c.getNext();if(!o.isPrefixOf(l.path))break;l.path.length>o.length+1||P5(x5(u),r)<=0||(i.has(u.key)||Iu(n,u))&&(s=s.insert(u.key,u.mutableCopy()))}return q.resolve(s)}getAllFromCollectionGroup(e,n,r,i){de()}vr(e,n){return q.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new W6(this)}getSize(e){return q.resolve(this.size)}}class W6 extends L6{constructor(e){super(),this.sr=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.sr.addEntry(e,i)):this.sr.removeEntry(r)}),q.waitFor(n)}getFromCache(e,n){return this.sr.getEntry(e,n)}getAllFromCache(e,n){return this.sr.getEntries(e,n)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class K6{constructor(e){this.persistence=e,this.Cr=new Ds(n=>qp(n),Hp),this.lastRemoteSnapshotVersion=me.min(),this.highestTargetId=0,this.Fr=0,this.Mr=new Yp,this.targetCount=0,this.Or=bs.xn()}forEachTarget(e,n){return this.Cr.forEach((r,i)=>n(i)),q.resolve()}getLastRemoteSnapshotVersion(e){return q.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return q.resolve(this.Fr)}allocateTargetId(e){return this.highestTargetId=this.Or.next(),q.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Fr&&(this.Fr=n),q.resolve()}Ln(e){this.Cr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Or=new bs(n),this.highestTargetId=n),e.sequenceNumber>this.Fr&&(this.Fr=e.sequenceNumber)}addTargetData(e,n){return this.Ln(n),this.targetCount+=1,q.resolve()}updateTargetData(e,n){return this.Ln(n),q.resolve()}removeTargetData(e,n){return this.Cr.delete(n.target),this.Mr.Ar(n.targetId),this.targetCount-=1,q.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Cr.forEach((o,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Cr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),q.waitFor(s).next(()=>i)}getTargetCount(e){return q.resolve(this.targetCount)}getTargetData(e,n){const r=this.Cr.get(n)||null;return q.resolve(r)}addMatchingKeys(e,n,r){return this.Mr.Tr(n,r),q.resolve()}removeMatchingKeys(e,n,r){this.Mr.dr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),q.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Mr.Ar(n),q.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Mr.Vr(n);return q.resolve(r)}containsKey(e,n){return q.resolve(this.Mr.containsKey(n))}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class G6{constructor(e,n){this.Nr={},this.overlays={},this.Br=new Lp(0),this.Lr=!1,this.Lr=!0,this.referenceDelegate=e(this),this.kr=new K6(this),this.indexManager=new F6,this.remoteDocumentCache=function(i){return new z6(i)}(r=>this.referenceDelegate.qr(r)),this.serializer=new M6(n),this.Qr=new B6(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Lr=!1,Promise.resolve()}get started(){return this.Lr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new q6,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Nr[e.toKey()];return r||(r=new H6(n,this.referenceDelegate),this.Nr[e.toKey()]=r),r}getTargetCache(){return this.kr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Qr}runTransaction(e,n,r){ie("MemoryPersistence","Starting transaction:",e);const i=new Y6(this.Br.next());return this.referenceDelegate.Kr(),r(i).next(s=>this.referenceDelegate.$r(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Ur(e,n){return q.or(Object.values(this.Nr).map(r=>()=>r.containsKey(e,n)))}}class Y6 extends O5{constructor(e){super(),this.currentSequenceNumber=e}}class Qp{constructor(e){this.persistence=e,this.Wr=new Yp,this.Gr=null}static zr(e){return new Qp(e)}get jr(){if(this.Gr)return this.Gr;throw de()}addReference(e,n,r){return this.Wr.addReference(r,n),this.jr.delete(r.toString()),q.resolve()}removeReference(e,n,r){return this.Wr.removeReference(r,n),this.jr.add(r.toString()),q.resolve()}markPotentiallyOrphaned(e,n){return this.jr.add(n.toString()),q.resolve()}removeTarget(e,n){this.Wr.Ar(n.targetId).forEach(i=>this.jr.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.jr.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}Kr(){this.Gr=new Set}$r(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return q.forEach(this.jr,r=>{const i=fe.fromPath(r);return this.Hr(e,i).next(s=>{s||n.removeEntry(i,me.min())})}).next(()=>(this.Gr=null,n.apply(e)))}updateLimboDocument(e,n){return this.Hr(e,n).next(r=>{r?this.jr.delete(n.toString()):this.jr.add(n.toString())})}qr(e){return 0}Hr(e,n){return q.or([()=>q.resolve(this.Wr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Ur(e,n)])}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Xp{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.Li=r,this.ki=i}static qi(e,n){let r=Ee(),i=Ee();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new Xp(e,n.fromCache,r,i)}}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Q6{constructor(){this.Qi=!1}initialize(e,n){this.Ki=e,this.indexManager=n,this.Qi=!0}getDocumentsMatchingQuery(e,n,r,i){return this.$i(e,n).next(s=>s||this.Ui(e,n,i,r)).next(s=>s||this.Wi(e,n))}$i(e,n){if(iv(n))return q.resolve(null);let r=ur(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=Wh(n,null,"F"),r=ur(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=Ee(...s);return this.Ki.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(c=>{const l=this.Gi(n,a);return this.zi(n,l,o,c.readTime)?this.$i(e,Wh(n,null,"F")):this.ji(e,l,n,c)}))})))}Ui(e,n,r,i){return iv(n)||i.isEqual(me.min())?this.Wi(e,n):this.Ki.getDocuments(e,r).next(s=>{const o=this.Gi(n,s);return this.zi(n,o,r,i)?this.Wi(e,n):(Yy()<=Oe.DEBUG&&ie("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Kh(n)),this.ji(e,o,n,S5(i,-1)))})}Gi(e,n){let r=new Ht(D1(e));return n.forEach((i,s)=>{Iu(e,s)&&(r=r.add(s))}),r}zi(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Wi(e,n){return Yy()<=Oe.DEBUG&&ie("QueryEngine","Using full collection scan to execute query:",Kh(n)),this.Ki.getDocumentsMatchingQuery(e,n,Br.min())}ji(e,n,r,i){return this.Ki.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class X6{constructor(e,n,r,i){this.persistence=e,this.Hi=n,this.serializer=i,this.Ji=new Ze(Pe),this.Yi=new Ds(s=>qp(s),Hp),this.Zi=new Map,this.Xi=e.getRemoteDocumentCache(),this.kr=e.getTargetCache(),this.Qr=e.getBundleCache(),this.es(r)}es(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new U6(this.Xi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Xi.setIndexManager(this.indexManager),this.Hi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.Ji))}}function J6(t,e,n,r){return new X6(t,e,n,r)}async function tE(t,e){const n=ve(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n.es(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],a=[];let c=Ee();for(const l of i){o.push(l.batchId);for(const u of l.mutations)c=c.add(u.key)}for(const l of s){a.push(l.batchId);for(const u of l.mutations)c=c.add(u.key)}return n.localDocuments.getDocuments(r,c).next(l=>({ts:l,removedBatchIds:o,addedBatchIds:a}))})})}function Z6(t,e){const n=ve(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=n.Xi.newChangeBuffer({trackRemovals:!0});return function(a,c,l,u){const f=l.batch,h=f.keys();let m=q.resolve();return h.forEach(P=>{m=m.next(()=>u.getEntry(c,P)).next(v=>{const A=l.docVersions.get(P);He(A!==null),v.version.compareTo(A)<0&&(f.applyToRemoteDocument(v,l),v.isValidDocument()&&(v.setReadTime(l.commitVersion),u.addEntry(v)))})}),m.next(()=>a.mutationQueue.removeMutationBatch(c,f))}(n,r,e,s).next(()=>s.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let c=Ee();for(let l=0;l0&&(c=c.add(a.batch.mutations[l].key));return c}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function nE(t){const e=ve(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.kr.getLastRemoteSnapshotVersion(n))}function eF(t,e){const n=ve(t),r=e.snapshotVersion;let i=n.Ji;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.Xi.newChangeBuffer({trackRemovals:!0});i=n.Ji;const a=[];e.targetChanges.forEach((u,f)=>{const h=i.get(f);if(!h)return;a.push(n.kr.removeMatchingKeys(s,u.removedDocuments,f).next(()=>n.kr.addMatchingKeys(s,u.addedDocuments,f)));let m=h.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(f)!==null?m=m.withResumeToken(zt.EMPTY_BYTE_STRING,me.min()).withLastLimboFreeSnapshotVersion(me.min()):u.resumeToken.approximateByteSize()>0&&(m=m.withResumeToken(u.resumeToken,r)),i=i.insert(f,m),function(v,A,E){return v.resumeToken.approximateByteSize()===0||A.snapshotVersion.toMicroseconds()-v.snapshotVersion.toMicroseconds()>=3e8?!0:E.addedDocuments.size+E.modifiedDocuments.size+E.removedDocuments.size>0}(h,m,u)&&a.push(n.kr.updateTargetData(s,m))});let c=fr(),l=Ee();if(e.documentUpdates.forEach(u=>{e.resolvedLimboDocuments.has(u)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(s,u))}),a.push(tF(s,o,e.documentUpdates).next(u=>{c=u.ns,l=u.rs})),!r.isEqual(me.min())){const u=n.kr.getLastRemoteSnapshotVersion(s).next(f=>n.kr.setTargetsMetadata(s,s.currentSequenceNumber,r));a.push(u)}return q.waitFor(a).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,c,l)).next(()=>c)}).then(s=>(n.Ji=i,s))}function tF(t,e,n){let r=Ee(),i=Ee();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=fr();return n.forEach((a,c)=>{const l=s.get(a);c.isFoundDocument()!==l.isFoundDocument()&&(i=i.add(a)),c.isNoDocument()&&c.version.isEqual(me.min())?(e.removeEntry(a,c.readTime),o=o.insert(a,c)):!l.isValidDocument()||c.version.compareTo(l.version)>0||c.version.compareTo(l.version)===0&&l.hasPendingWrites?(e.addEntry(c),o=o.insert(a,c)):ie("LocalStore","Ignoring outdated watch update for ",a,". Current version:",l.version," Watch version:",c.version)}),{ns:o,rs:i}})}function nF(t,e){const n=ve(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function rF(t,e){const n=ve(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.kr.getTargetData(r,e).next(s=>s?(i=s,q.resolve(i)):n.kr.allocateTargetId(r).next(o=>(i=new Pr(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.kr.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.Ji.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Ji=n.Ji.insert(r.targetId,r),n.Yi.set(e,r.targetId)),r})}async function Jh(t,e,n){const r=ve(t),i=r.Ji.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!ya(o))throw o;ie("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.Ji=r.Ji.remove(e),r.Yi.delete(i.target)}function mv(t,e,n){const r=ve(t);let i=me.min(),s=Ee();return r.persistence.runTransaction("Execute query","readonly",o=>function(c,l,u){const f=ve(c),h=f.Yi.get(u);return h!==void 0?q.resolve(f.Ji.get(h)):f.kr.getTargetData(l,u)}(r,o,ur(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.kr.getMatchingKeysForTargetId(o,a.targetId).next(c=>{s=c})}).next(()=>r.Hi.getDocumentsMatchingQuery(o,e,n?i:me.min(),n?s:Ee())).next(a=>(iF(r,Q5(e),a),{documents:a,ss:s})))}function iF(t,e,n){let r=t.Zi.get(e)||me.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.Zi.set(e,r)}class gv{constructor(){this.activeTargetIds=n6()}hs(e){this.activeTargetIds=this.activeTargetIds.add(e)}Ps(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ls(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class sF{constructor(){this.Hs=new gv,this.Js={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.Hs.hs(e),this.Js[e]||"not-current"}updateQueryState(e,n,r){this.Js[e]=n}removeLocalQueryTarget(e){this.Hs.Ps(e)}isLocalQueryTarget(e){return this.Hs.activeTargetIds.has(e)}clearQueryState(e){delete this.Js[e]}getAllActiveQueryTargets(){return this.Hs.activeTargetIds}isActiveQueryTarget(e){return this.Hs.activeTargetIds.has(e)}start(){return this.Hs=new gv,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class oF{Ys(e){}shutdown(){}}/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class yv{constructor(){this.Zs=()=>this.Xs(),this.eo=()=>this.no(),this.ro=[],this.io()}Ys(e){this.ro.push(e)}shutdown(){window.removeEventListener("online",this.Zs),window.removeEventListener("offline",this.eo)}io(){window.addEventListener("online",this.Zs),window.addEventListener("offline",this.eo)}Xs(){ie("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.ro)e(0)}no(){ie("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.ro)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** - * @license - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */let nc=null;function Of(){return nc===null?nc=function(){return 268435456+Math.round(2147483648*Math.random())}():nc++,"0x"+nc.toString(16)}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const aF={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class cF{constructor(e){this.so=e.so,this.oo=e.oo}_o(e){this.ao=e}uo(e){this.co=e}onMessage(e){this.lo=e}close(){this.oo()}send(e){this.so(e)}ho(){this.ao()}Po(e){this.co(e)}Io(e){this.lo(e)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Mt="WebChannelConnection";class lF extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.To=r+"://"+n.host,this.Eo=`projects/${i}/databases/${s}`,this.Ao=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}get Ro(){return!1}Vo(n,r,i,s,o){const a=Of(),c=this.mo(n,r);ie("RestConnection",`Sending RPC '${n}' ${a}:`,c,i);const l={"google-cloud-resource-prefix":this.Eo,"x-goog-request-params":this.Ao};return this.fo(l,s,o),this.po(n,c,l,i).then(u=>(ie("RestConnection",`Received RPC '${n}' ${a}: `,u),u),u=>{throw gs("RestConnection",`RPC '${n}' ${a} failed with error: `,u,"url: ",c,"request:",i),u})}yo(n,r,i,s,o,a){return this.Vo(n,r,i,s,o)}fo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Os}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>n[o]=s),i&&i.headers.forEach((s,o)=>n[o]=s)}mo(n,r){const i=aF[n];return`${this.To}/v1/${r}:${i}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}po(e,n,r,i){const s=Of();return new Promise((o,a)=>{const c=new g5;c.setWithCredentials(!0),c.listenOnce(d5.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case Pf.NO_ERROR:const u=c.getResponseJson();ie(Mt,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(u)),o(u);break;case Pf.TIMEOUT:ie(Mt,`RPC '${e}' ${s} timed out`),a(new le(j.DEADLINE_EXCEEDED,"Request time out"));break;case Pf.HTTP_ERROR:const f=c.getStatus();if(ie(Mt,`RPC '${e}' ${s} failed with status:`,f,"response text:",c.getResponseText()),f>0){let h=c.getResponseJson();Array.isArray(h)&&(h=h[0]);const m=h==null?void 0:h.error;if(m&&m.status&&m.message){const P=function(A){const E=A.toLowerCase().replace(/_/g,"-");return Object.values(j).indexOf(E)>=0?E:j.UNKNOWN}(m.status);a(new le(P,m.message))}else a(new le(j.UNKNOWN,"Server responded with status "+c.getStatus()))}else a(new le(j.UNAVAILABLE,"Connection failed."));break;default:de()}}finally{ie(Mt,`RPC '${e}' ${s} completed.`)}});const l=JSON.stringify(i);ie(Mt,`RPC '${e}' ${s} sending request:`,i),c.send(n,"POST",l,r,15)})}wo(e,n,r){const i=Of(),s=[this.To,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=f5(),a=h5(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;l!==void 0&&(c.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(c.xmlHttpFactory=new m5({})),this.fo(c.initMessageHeaders,n,r),c.encodeInitMessageHeaders=!0;const u=s.join("");ie(Mt,`Creating RPC '${e}' stream ${i}: ${u}`,c);const f=o.createWebChannel(u,c);let h=!1,m=!1;const P=new cF({so:A=>{m?ie(Mt,`Not sending because RPC '${e}' stream ${i} is closed:`,A):(h||(ie(Mt,`Opening RPC '${e}' stream ${i} transport.`),f.open(),h=!0),ie(Mt,`RPC '${e}' stream ${i} sending:`,A),f.send(A))},oo:()=>f.close()}),v=(A,E,C)=>{A.listen(E,D=>{try{C(D)}catch(F){setTimeout(()=>{throw F},0)}})};return v(f,Ja.EventType.OPEN,()=>{m||ie(Mt,`RPC '${e}' stream ${i} transport opened.`)}),v(f,Ja.EventType.CLOSE,()=>{m||(m=!0,ie(Mt,`RPC '${e}' stream ${i} transport closed`),P.Po())}),v(f,Ja.EventType.ERROR,A=>{m||(m=!0,gs(Mt,`RPC '${e}' stream ${i} transport errored:`,A),P.Po(new le(j.UNAVAILABLE,"The operation could not be completed")))}),v(f,Ja.EventType.MESSAGE,A=>{var E;if(!m){const C=A.data[0];He(!!C);const D=C,F=D.error||((E=D[0])===null||E===void 0?void 0:E.error);if(F){ie(Mt,`RPC '${e}' stream ${i} received error:`,F);const G=F.status;let se=function(Z){const oe=ft[Z];if(oe!==void 0)return W1(oe)}(G),ge=F.message;se===void 0&&(se=j.INTERNAL,ge="Unknown error status: "+G+" with message "+F.message),m=!0,P.Po(new le(se,ge)),f.close()}else ie(Mt,`RPC '${e}' stream ${i} received:`,C),P.Io(C)}}),v(a,p5.STAT_EVENT,A=>{A.stat===Ky.PROXY?ie(Mt,`RPC '${e}' stream ${i} detected buffering proxy`):A.stat===Ky.NOPROXY&&ie(Mt,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{P.ho()},0),P}}function kf(){return typeof document<"u"?document:null}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function xu(t){return new w6(t,!0)}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class rE{constructor(e,n,r=1e3,i=1.5,s=6e4){this.ii=e,this.timerId=n,this.So=r,this.bo=i,this.Do=s,this.vo=0,this.Co=null,this.Fo=Date.now(),this.reset()}reset(){this.vo=0}Mo(){this.vo=this.Do}xo(e){this.cancel();const n=Math.floor(this.vo+this.Oo()),r=Math.max(0,Date.now()-this.Fo),i=Math.max(0,n-r);i>0&&ie("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.vo} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Co=this.ii.enqueueAfterDelay(this.timerId,i,()=>(this.Fo=Date.now(),e())),this.vo*=this.bo,this.vothis.Do&&(this.vo=this.Do)}No(){this.Co!==null&&(this.Co.skipDelay(),this.Co=null)}cancel(){this.Co!==null&&(this.Co.cancel(),this.Co=null)}Oo(){return(Math.random()-.5)*this.vo}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class iE{constructor(e,n,r,i,s,o,a,c){this.ii=e,this.Bo=r,this.Lo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=c,this.state=0,this.ko=0,this.qo=null,this.Qo=null,this.stream=null,this.Ko=new rE(e,n)}$o(){return this.state===1||this.state===5||this.Uo()}Uo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Wo()}async stop(){this.$o()&&await this.close(0)}Go(){this.state=0,this.Ko.reset()}zo(){this.Uo()&&this.qo===null&&(this.qo=this.ii.enqueueAfterDelay(this.Bo,6e4,()=>this.jo()))}Ho(e){this.Jo(),this.stream.send(e)}async jo(){if(this.Uo())return this.close(0)}Jo(){this.qo&&(this.qo.cancel(),this.qo=null)}Yo(){this.Qo&&(this.Qo.cancel(),this.Qo=null)}async close(e,n){this.Jo(),this.Yo(),this.Ko.cancel(),this.ko++,e!==4?this.Ko.reset():n&&n.code===j.RESOURCE_EXHAUSTED?(lr(n.toString()),lr("Using maximum backoff delay to prevent overloading the backend."),this.Ko.Mo()):n&&n.code===j.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.Zo(),this.stream.close(),this.stream=null),this.state=e,await this.listener.uo(n)}Zo(){}auth(){this.state=1;const e=this.Xo(this.ko),n=this.ko;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.ko===n&&this.e_(r,i)},r=>{e(()=>{const i=new le(j.UNKNOWN,"Fetching auth token failed: "+r.message);return this.t_(i)})})}e_(e,n){const r=this.Xo(this.ko);this.stream=this.n_(e,n),this.stream._o(()=>{r(()=>(this.state=2,this.Qo=this.ii.enqueueAfterDelay(this.Lo,1e4,()=>(this.Uo()&&(this.state=3),Promise.resolve())),this.listener._o()))}),this.stream.uo(i=>{r(()=>this.t_(i))}),this.stream.onMessage(i=>{r(()=>this.onMessage(i))})}Wo(){this.state=5,this.Ko.xo(async()=>{this.state=0,this.start()})}t_(e){return ie("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Xo(e){return n=>{this.ii.enqueueAndForget(()=>this.ko===e?n():(ie("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class uF extends iE{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}n_(e,n){return this.connection.wo("Listen",e,n)}onMessage(e){this.Ko.reset();const n=I6(this.serializer,e),r=function(s){if(!("targetChange"in s))return me.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?me.min():o.readTime?Kn(o.readTime):me.min()}(e);return this.listener.r_(n,r)}i_(e){const n={};n.database=Xh(this.serializer),n.addTarget=function(s,o){let a;const c=o.target;if(a=zh(c)?{documents:S6(s,c)}:{query:x6(s,c)},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=Y1(s,o.resumeToken);const l=Gh(s,o.expectedCount);l!==null&&(a.expectedCount=l)}else if(o.snapshotVersion.compareTo(me.min())>0){a.readTime=El(s,o.snapshotVersion.toTimestamp());const l=Gh(s,o.expectedCount);l!==null&&(a.expectedCount=l)}return a}(this.serializer,e);const r=R6(this.serializer,e);r&&(n.labels=r),this.Ho(n)}s_(e){const n={};n.database=Xh(this.serializer),n.removeTarget=e,this.Ho(n)}}class fF extends iE{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s,this.o_=!1}get __(){return this.o_}start(){this.o_=!1,this.lastStreamToken=void 0,super.start()}Zo(){this.o_&&this.a_([])}n_(e,n){return this.connection.wo("Write",e,n)}onMessage(e){if(He(!!e.streamToken),this.lastStreamToken=e.streamToken,this.o_){this.Ko.reset();const n=C6(e.writeResults,e.commitTime),r=Kn(e.commitTime);return this.listener.u_(r,n)}return He(!e.writeResults||e.writeResults.length===0),this.o_=!0,this.listener.c_()}l_(){const e={};e.database=Xh(this.serializer),this.Ho(e)}a_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>A6(this.serializer,r))};this.Ho(n)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class hF extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.h_=!1}P_(){if(this.h_)throw new le(j.FAILED_PRECONDITION,"The client has already been terminated.")}Vo(e,n,r){return this.P_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.Vo(e,n,r,i,s)).catch(i=>{throw i.name==="FirebaseError"?(i.code===j.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),i):new le(j.UNKNOWN,i.toString())})}yo(e,n,r,i){return this.P_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.yo(e,n,r,s,o,i)).catch(s=>{throw s.name==="FirebaseError"?(s.code===j.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new le(j.UNKNOWN,s.toString())})}terminate(){this.h_=!0}}class dF{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.T_=0,this.E_=null,this.d_=!0}A_(){this.T_===0&&(this.R_("Unknown"),this.E_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.E_=null,this.V_("Backend didn't respond within 10 seconds."),this.R_("Offline"),Promise.resolve())))}m_(e){this.state==="Online"?this.R_("Unknown"):(this.T_++,this.T_>=1&&(this.f_(),this.V_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.R_("Offline")))}set(e){this.f_(),this.T_=0,e==="Online"&&(this.d_=!1),this.R_(e)}R_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}V_(e){const n=`Could not reach Cloud Firestore backend. ${e} -This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.d_?(lr(n),this.d_=!1):ie("OnlineStateTracker",n)}f_(){this.E_!==null&&(this.E_.cancel(),this.E_=null)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class pF{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.g_=[],this.p_=new Map,this.y_=new Set,this.w_=[],this.S_=s,this.S_.Ys(o=>{r.enqueueAndForget(async()=>{Mi(this)&&(ie("RemoteStore","Restarting streams for network reachability change."),await async function(c){const l=ve(c);l.y_.add(4),await ba(l),l.b_.set("Unknown"),l.y_.delete(4),await Pu(l)}(this))})}),this.b_=new dF(r,i)}}async function Pu(t){if(Mi(t))for(const e of t.w_)await e(!0)}async function ba(t){for(const e of t.w_)await e(!1)}function sE(t,e){const n=ve(t);n.p_.has(e.targetId)||(n.p_.set(e.targetId,e),em(n)?Zp(n):Ns(n).Uo()&&Jp(n,e))}function oE(t,e){const n=ve(t),r=Ns(n);n.p_.delete(e),r.Uo()&&aE(n,e),n.p_.size===0&&(r.Uo()?r.zo():Mi(n)&&n.b_.set("Unknown"))}function Jp(t,e){if(t.D_.Be(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(me.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Ns(t).i_(e)}function aE(t,e){t.D_.Be(e),Ns(t).s_(e)}function Zp(t){t.D_=new y6({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ut:e=>t.p_.get(e)||null,rt:()=>t.datastore.serializer.databaseId}),Ns(t).start(),t.b_.A_()}function em(t){return Mi(t)&&!Ns(t).$o()&&t.p_.size>0}function Mi(t){return ve(t).y_.size===0}function cE(t){t.D_=void 0}async function mF(t){t.p_.forEach((e,n)=>{Jp(t,e)})}async function gF(t,e){cE(t),em(t)?(t.b_.m_(e),Zp(t)):t.b_.set("Unknown")}async function yF(t,e,n){if(t.b_.set("Online"),e instanceof G1&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.p_.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.p_.delete(a),i.D_.removeTarget(a))}(t,e)}catch(r){ie("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Tl(t,r)}else if(e instanceof Pc?t.D_.We(e):e instanceof K1?t.D_.Ze(e):t.D_.je(e),!n.isEqual(me.min()))try{const r=await nE(t.localStore);n.compareTo(r)>=0&&await function(s,o){const a=s.D_.st(o);return a.targetChanges.forEach((c,l)=>{if(c.resumeToken.approximateByteSize()>0){const u=s.p_.get(l);u&&s.p_.set(l,u.withResumeToken(c.resumeToken,o))}}),a.targetMismatches.forEach((c,l)=>{const u=s.p_.get(c);if(!u)return;s.p_.set(c,u.withResumeToken(zt.EMPTY_BYTE_STRING,u.snapshotVersion)),aE(s,c);const f=new Pr(u.target,c,l,u.sequenceNumber);Jp(s,f)}),s.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){ie("RemoteStore","Failed to raise snapshot:",r),await Tl(t,r)}}async function Tl(t,e,n){if(!ya(e))throw e;t.y_.add(1),await ba(t),t.b_.set("Offline"),n||(n=()=>nE(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ie("RemoteStore","Retrying IndexedDB access"),await n(),t.y_.delete(1),await Pu(t)})}function lE(t,e){return e().catch(n=>Tl(t,n,e))}async function Ru(t){const e=ve(t),n=Hr(e);let r=e.g_.length>0?e.g_[e.g_.length-1].batchId:-1;for(;vF(e);)try{const i=await nF(e.localStore,r);if(i===null){e.g_.length===0&&n.zo();break}r=i.batchId,_F(e,i)}catch(i){await Tl(e,i)}uE(e)&&fE(e)}function vF(t){return Mi(t)&&t.g_.length<10}function _F(t,e){t.g_.push(e);const n=Hr(t);n.Uo()&&n.__&&n.a_(e.mutations)}function uE(t){return Mi(t)&&!Hr(t).$o()&&t.g_.length>0}function fE(t){Hr(t).start()}async function bF(t){Hr(t).l_()}async function wF(t){const e=Hr(t);for(const n of t.g_)e.a_(n.mutations)}async function EF(t,e,n){const r=t.g_.shift(),i=zp.from(r,e,n);await lE(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await Ru(t)}async function TF(t,e){e&&Hr(t).__&&await async function(r,i){if(function(o){return p6(o)&&o!==j.ABORTED}(i.code)){const s=r.g_.shift();Hr(r).Go(),await lE(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await Ru(r)}}(t,e),uE(t)&&fE(t)}async function vv(t,e){const n=ve(t);n.asyncQueue.verifyOperationInProgress(),ie("RemoteStore","RemoteStore received new credentials");const r=Mi(n);n.y_.add(3),await ba(n),r&&n.b_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.y_.delete(3),await Pu(n)}async function IF(t,e){const n=ve(t);e?(n.y_.delete(2),await Pu(n)):e||(n.y_.add(2),await ba(n),n.b_.set("Unknown"))}function Ns(t){return t.v_||(t.v_=function(n,r,i){const s=ve(n);return s.P_(),new uF(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{_o:mF.bind(null,t),uo:gF.bind(null,t),r_:yF.bind(null,t)}),t.w_.push(async e=>{e?(t.v_.Go(),em(t)?Zp(t):t.b_.set("Unknown")):(await t.v_.stop(),cE(t))})),t.v_}function Hr(t){return t.C_||(t.C_=function(n,r,i){const s=ve(n);return s.P_(),new fF(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{_o:bF.bind(null,t),uo:TF.bind(null,t),c_:wF.bind(null,t),u_:EF.bind(null,t)}),t.w_.push(async e=>{e?(t.C_.Go(),await Ru(t)):(await t.C_.stop(),t.g_.length>0&&(ie("RemoteStore",`Stopping write stream with ${t.g_.length} pending writes`),t.g_=[]))})),t.C_}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class tm{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Mr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,a=new tm(e,n,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new le(j.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function nm(t,e){if(lr("AsyncQueue",`${e}: ${t}`),ya(t))return new le(j.UNAVAILABLE,`${e}: ${t}`);throw t}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class hs{constructor(e){this.comparator=e?(n,r)=>e(n,r)||fe.comparator(n.key,r.key):(n,r)=>fe.comparator(n.key,r.key),this.keyedMap=eo(),this.sortedSet=new Ze(this.comparator)}static emptySet(e){return new hs(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof hs)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( - `+e.join(` -`)+` -)`}copy(e,n){const r=new hs;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class _v{constructor(){this.F_=new Ze(fe.comparator)}track(e){const n=e.doc.key,r=this.F_.get(n);r?e.type!==0&&r.type===3?this.F_=this.F_.insert(n,e):e.type===3&&r.type!==1?this.F_=this.F_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.F_=this.F_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.F_=this.F_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.F_=this.F_.remove(n):e.type===1&&r.type===2?this.F_=this.F_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.F_=this.F_.insert(n,{type:2,doc:e.doc}):de():this.F_=this.F_.insert(n,e)}M_(){const e=[];return this.F_.inorderTraversal((n,r)=>{e.push(r)}),e}}class ws{constructor(e,n,r,i,s,o,a,c,l){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=c,this.hasCachedResults=l}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new ws(e,n,hs.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Tu(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;ik1(e),Tu),this.onlineState="Unknown",this.O_=new Set}}async function SF(t,e){const n=ve(t),r=e.query;let i=!1,s=n.queries.get(r);if(s||(i=!0,s=new AF),i)try{s.x_=await n.onListen(r)}catch(o){const a=nm(o,`Initialization of query '${Kh(e.query)}' failed`);return void e.onError(a)}n.queries.set(r,s),s.listeners.push(e),e.N_(n.onlineState),s.x_&&e.B_(s.x_)&&rm(n)}async function xF(t,e){const n=ve(t),r=e.query;let i=!1;const s=n.queries.get(r);if(s){const o=s.listeners.indexOf(e);o>=0&&(s.listeners.splice(o,1),i=s.listeners.length===0)}if(i)return n.queries.delete(r),n.onUnlisten(r)}function PF(t,e){const n=ve(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const a of o.listeners)a.B_(i)&&(r=!0);o.x_=i}}r&&rm(n)}function RF(t,e,n){const r=ve(t),i=r.queries.get(e);if(i)for(const s of i.listeners)s.onError(n);r.queries.delete(e)}function rm(t){t.O_.forEach(e=>{e.next()})}class OF{constructor(e,n,r){this.query=e,this.L_=n,this.k_=!1,this.q_=null,this.onlineState="Unknown",this.options=r||{}}B_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new ws(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.k_?this.Q_(e)&&(this.L_.next(e),n=!0):this.K_(e,this.onlineState)&&(this.U_(e),n=!0),this.q_=e,n}onError(e){this.L_.error(e)}N_(e){this.onlineState=e;let n=!1;return this.q_&&!this.k_&&this.K_(this.q_,e)&&(this.U_(this.q_),n=!0),n}K_(e,n){if(!e.fromCache)return!0;const r=n!=="Offline";return(!this.options.W_||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}Q_(e){if(e.docChanges.length>0)return!0;const n=this.q_&&this.q_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}U_(e){e=ws.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.k_=!0,this.L_.next(e)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class hE{constructor(e){this.key=e}}class dE{constructor(e){this.key=e}}class kF{constructor(e,n){this.query=e,this.X_=n,this.ea=null,this.hasCachedResults=!1,this.current=!1,this.ta=Ee(),this.mutatedKeys=Ee(),this.na=D1(e),this.ra=new hs(this.na)}get ia(){return this.X_}sa(e,n){const r=n?n.oa:new _v,i=n?n.ra:this.ra;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,a=!1;const c=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,l=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((u,f)=>{const h=i.get(u),m=Iu(this.query,f)?f:null,P=!!h&&this.mutatedKeys.has(h.key),v=!!m&&(m.hasLocalMutations||this.mutatedKeys.has(m.key)&&m.hasCommittedMutations);let A=!1;h&&m?h.data.isEqual(m.data)?P!==v&&(r.track({type:3,doc:m}),A=!0):this._a(h,m)||(r.track({type:2,doc:m}),A=!0,(c&&this.na(m,c)>0||l&&this.na(m,l)<0)&&(a=!0)):!h&&m?(r.track({type:0,doc:m}),A=!0):h&&!m&&(r.track({type:1,doc:h}),A=!0,(c||l)&&(a=!0)),A&&(m?(o=o.add(m),s=v?s.add(u):s.delete(u)):(o=o.delete(u),s=s.delete(u)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const u=this.query.limitType==="F"?o.last():o.first();o=o.delete(u.key),s=s.delete(u.key),r.track({type:1,doc:u})}return{ra:o,oa:r,zi:a,mutatedKeys:s}}_a(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r){const i=this.ra;this.ra=e.ra,this.mutatedKeys=e.mutatedKeys;const s=e.oa.M_();s.sort((l,u)=>function(h,m){const P=v=>{switch(v){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return de()}};return P(h)-P(m)}(l.type,u.type)||this.na(l.doc,u.doc)),this.aa(r);const o=n?this.ua():[],a=this.ta.size===0&&this.current?1:0,c=a!==this.ea;return this.ea=a,s.length!==0||c?{snapshot:new ws(this.query,e.ra,i,s,e.mutatedKeys,a===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),ca:o}:{ca:o}}N_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({ra:this.ra,oa:new _v,mutatedKeys:this.mutatedKeys,zi:!1},!1)):{ca:[]}}la(e){return!this.X_.has(e)&&!!this.ra.has(e)&&!this.ra.get(e).hasLocalMutations}aa(e){e&&(e.addedDocuments.forEach(n=>this.X_=this.X_.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.X_=this.X_.delete(n)),this.current=e.current)}ua(){if(!this.current)return[];const e=this.ta;this.ta=Ee(),this.ra.forEach(r=>{this.la(r.key)&&(this.ta=this.ta.add(r.key))});const n=[];return e.forEach(r=>{this.ta.has(r)||n.push(new dE(r))}),this.ta.forEach(r=>{e.has(r)||n.push(new hE(r))}),n}ha(e){this.X_=e.ss,this.ta=Ee();const n=this.sa(e.documents);return this.applyChanges(n,!0)}Pa(){return ws.fromInitialDocuments(this.query,this.ra,this.mutatedKeys,this.ea===0,this.hasCachedResults)}}class DF{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class NF{constructor(e){this.key=e,this.Ia=!1}}class MF{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Ta={},this.Ea=new Ds(a=>k1(a),Tu),this.da=new Map,this.Aa=new Set,this.Ra=new Ze(fe.comparator),this.Va=new Map,this.ma=new Yp,this.fa={},this.ga=new Map,this.pa=bs.On(),this.onlineState="Unknown",this.ya=void 0}get isPrimaryClient(){return this.ya===!0}}async function VF(t,e){const n=WF(t);let r,i;const s=n.Ea.get(e);if(s)r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.Pa();else{const o=await rF(n.localStore,ur(e)),a=n.sharedClientState.addLocalQueryTarget(o.targetId);r=o.targetId,i=await FF(n,e,r,a==="current",o.resumeToken),n.isPrimaryClient&&sE(n.remoteStore,o)}return i}async function FF(t,e,n,r,i){t.wa=(f,h,m)=>async function(v,A,E,C){let D=A.view.sa(E);D.zi&&(D=await mv(v.localStore,A.query,!1).then(({documents:se})=>A.view.sa(se,D)));const F=C&&C.targetChanges.get(A.targetId),G=A.view.applyChanges(D,v.isPrimaryClient,F);return wv(v,A.targetId,G.ca),G.snapshot}(t,f,h,m);const s=await mv(t.localStore,e,!0),o=new kF(e,s.ss),a=o.sa(s.documents),c=_a.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),l=o.applyChanges(a,t.isPrimaryClient,c);wv(t,n,l.ca);const u=new DF(e,n,o);return t.Ea.set(e,u),t.da.has(n)?t.da.get(n).push(e):t.da.set(n,[e]),l.snapshot}async function $F(t,e){const n=ve(t),r=n.Ea.get(e),i=n.da.get(r.targetId);if(i.length>1)return n.da.set(r.targetId,i.filter(s=>!Tu(s,e))),void n.Ea.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Jh(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),oE(n.remoteStore,r.targetId),Zh(n,r.targetId)}).catch(ga)):(Zh(n,r.targetId),await Jh(n.localStore,r.targetId,!0))}async function LF(t,e,n){const r=KF(t);try{const i=await function(o,a){const c=ve(o),l=_t.now(),u=a.reduce((m,P)=>m.add(P.key),Ee());let f,h;return c.persistence.runTransaction("Locally write mutations","readwrite",m=>{let P=fr(),v=Ee();return c.Xi.getEntries(m,u).next(A=>{P=A,P.forEach((E,C)=>{C.isValidDocument()||(v=v.add(E))})}).next(()=>c.localDocuments.getOverlayedDocuments(m,P)).next(A=>{f=A;const E=[];for(const C of a){const D=l6(C,f.get(C.key).overlayedDocument);D!=null&&E.push(new Ni(C.key,D,I1(D.value.mapValue),rr.exists(!0)))}return c.mutationQueue.addMutationBatch(m,l,E,a)}).next(A=>{h=A;const E=A.applyToLocalDocumentSet(f,v);return c.documentOverlayCache.saveOverlays(m,A.batchId,E)})}).then(()=>({batchId:h.batchId,changes:M1(f)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,a,c){let l=o.fa[o.currentUser.toKey()];l||(l=new Ze(Pe)),l=l.insert(a,c),o.fa[o.currentUser.toKey()]=l}(r,i.batchId,n),await wa(r,i.changes),await Ru(r.remoteStore)}catch(i){const s=nm(i,"Failed to persist write");n.reject(s)}}async function pE(t,e){const n=ve(t);try{const r=await eF(n.localStore,e);e.targetChanges.forEach((i,s)=>{const o=n.Va.get(s);o&&(He(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.Ia=!0:i.modifiedDocuments.size>0?He(o.Ia):i.removedDocuments.size>0&&(He(o.Ia),o.Ia=!1))}),await wa(n,r,e)}catch(r){await ga(r)}}function bv(t,e,n){const r=ve(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.Ea.forEach((s,o)=>{const a=o.view.N_(e);a.snapshot&&i.push(a.snapshot)}),function(o,a){const c=ve(o);c.onlineState=a;let l=!1;c.queries.forEach((u,f)=>{for(const h of f.listeners)h.N_(a)&&(l=!0)}),l&&rm(c)}(r.eventManager,e),i.length&&r.Ta.r_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function jF(t,e,n){const r=ve(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Va.get(e),s=i&&i.key;if(s){let o=new Ze(fe.comparator);o=o.insert(s,$t.newNoDocument(s,me.min()));const a=Ee().add(s),c=new Su(me.min(),new Map,new Ze(Pe),o,a);await pE(r,c),r.Ra=r.Ra.remove(s),r.Va.delete(e),im(r)}else await Jh(r.localStore,e,!1).then(()=>Zh(r,e,n)).catch(ga)}async function UF(t,e){const n=ve(t),r=e.batch.batchId;try{const i=await Z6(n.localStore,e);gE(n,r,null),mE(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await wa(n,i)}catch(i){await ga(i)}}async function BF(t,e,n){const r=ve(t);try{const i=await function(o,a){const c=ve(o);return c.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let u;return c.mutationQueue.lookupMutationBatch(l,a).next(f=>(He(f!==null),u=f.keys(),c.mutationQueue.removeMutationBatch(l,f))).next(()=>c.mutationQueue.performConsistencyCheck(l)).next(()=>c.documentOverlayCache.removeOverlaysForBatchId(l,u,a)).next(()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,u)).next(()=>c.localDocuments.getDocuments(l,u))})}(r.localStore,e);gE(r,e,n),mE(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await wa(r,i)}catch(i){await ga(i)}}function mE(t,e){(t.ga.get(e)||[]).forEach(n=>{n.resolve()}),t.ga.delete(e)}function gE(t,e,n){const r=ve(t);let i=r.fa[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.fa[r.currentUser.toKey()]=i}}function Zh(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.da.get(e))t.Ea.delete(r),n&&t.Ta.Sa(r,n);t.da.delete(e),t.isPrimaryClient&&t.ma.Ar(e).forEach(r=>{t.ma.containsKey(r)||yE(t,r)})}function yE(t,e){t.Aa.delete(e.path.canonicalString());const n=t.Ra.get(e);n!==null&&(oE(t.remoteStore,n),t.Ra=t.Ra.remove(e),t.Va.delete(n),im(t))}function wv(t,e,n){for(const r of n)r instanceof hE?(t.ma.addReference(r.key,e),qF(t,r)):r instanceof dE?(ie("SyncEngine","Document no longer in limbo: "+r.key),t.ma.removeReference(r.key,e),t.ma.containsKey(r.key)||yE(t,r.key)):de()}function qF(t,e){const n=e.key,r=n.path.canonicalString();t.Ra.get(n)||t.Aa.has(r)||(ie("SyncEngine","New document in limbo: "+n),t.Aa.add(r),im(t))}function im(t){for(;t.Aa.size>0&&t.Ra.size{o.push(r.wa(c,e,n).then(l=>{if((l||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(c.targetId,l!=null&&l.fromCache?"not-current":"current"),l){i.push(l);const u=Xp.qi(c.targetId,l);s.push(u)}}))}),await Promise.all(o),r.Ta.r_(i),await async function(c,l){const u=ve(c);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>q.forEach(l,h=>q.forEach(h.Li,m=>u.persistence.referenceDelegate.addReference(f,h.targetId,m)).next(()=>q.forEach(h.ki,m=>u.persistence.referenceDelegate.removeReference(f,h.targetId,m)))))}catch(f){if(!ya(f))throw f;ie("LocalStore","Failed to update sequence numbers: "+f)}for(const f of l){const h=f.targetId;if(!f.fromCache){const m=u.Ji.get(h),P=m.snapshotVersion,v=m.withLastLimboFreeSnapshotVersion(P);u.Ji=u.Ji.insert(h,v)}}}(r.localStore,s))}async function HF(t,e){const n=ve(t);if(!n.currentUser.isEqual(e)){ie("SyncEngine","User change. New user:",e.toKey());const r=await tE(n.localStore,e);n.currentUser=e,function(s,o){s.ga.forEach(a=>{a.forEach(c=>{c.reject(new le(j.CANCELLED,o))})}),s.ga.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await wa(n,r.ts)}}function zF(t,e){const n=ve(t),r=n.Va.get(e);if(r&&r.Ia)return Ee().add(r.key);{let i=Ee();const s=n.da.get(e);if(!s)return i;for(const o of s){const a=n.Ea.get(o);i=i.unionWith(a.view.ia)}return i}}function WF(t){const e=ve(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=pE.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=zF.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=jF.bind(null,e),e.Ta.r_=PF.bind(null,e.eventManager),e.Ta.Sa=RF.bind(null,e.eventManager),e}function KF(t){const e=ve(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=UF.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=BF.bind(null,e),e}class Ev{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=xu(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return J6(this.persistence,new Q6,e.initialUser,this.serializer)}createPersistence(e){return new G6(Qp.zr,this.serializer)}createSharedClientState(e){return new sF}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class GF{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>bv(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=HF.bind(null,this.syncEngine),await IF(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new CF}()}createDatastore(e){const n=xu(e.databaseInfo.databaseId),r=function(s){return new lF(s)}(e.databaseInfo);return function(s,o,a,c){return new hF(s,o,a,c)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,a){return new pF(r,i,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>bv(this.syncEngine,n,0),function(){return yv.v()?new yv:new oF}())}createSyncEngine(e,n){return function(i,s,o,a,c,l,u){const f=new MF(i,s,o,a,c,l);return u&&(f.ya=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}terminate(){return async function(n){const r=ve(n);ie("RemoteStore","RemoteStore shutting down."),r.y_.add(5),await ba(r),r.S_.shutdown(),r.b_.set("Unknown")}(this.remoteStore)}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *//** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class YF{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.va(this.observer.next,e)}error(e){this.observer.error?this.va(this.observer.error,e):lr("Uncaught Error in snapshot listener:",e.toString())}Ca(){this.muted=!0}va(e,n){this.muted||setTimeout(()=>{this.muted||e(n)},0)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class QF{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Ft.UNAUTHENTICATED,this.clientId=w1.V(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async s=>{ie("FirestoreClient","Received user=",s.uid),await this.authCredentialListener(s),this.user=s}),this.appCheckCredentials.start(r,s=>(ie("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new le(j.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Mr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=nm(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Df(t,e){t.asyncQueue.verifyOperationInProgress(),ie("FirestoreClient","Initializing OfflineComponentProvider");const n=await t.getConfiguration();await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await tE(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function Tv(t,e){t.asyncQueue.verifyOperationInProgress();const n=await JF(t);ie("FirestoreClient","Initializing OnlineComponentProvider");const r=await t.getConfiguration();await e.initialize(n,r),t.setCredentialChangeListener(i=>vv(e.remoteStore,i)),t.setAppCheckTokenChangeListener((i,s)=>vv(e.remoteStore,s)),t._onlineComponents=e}function XF(t){return t.name==="FirebaseError"?t.code===j.FAILED_PRECONDITION||t.code===j.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function JF(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ie("FirestoreClient","Using user provided OfflineComponentProvider");try{await Df(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!XF(n))throw n;gs("Error using user provided cache. Falling back to memory cache: "+n),await Df(t,new Ev)}}else ie("FirestoreClient","Using default OfflineComponentProvider"),await Df(t,new Ev);return t._offlineComponents}async function vE(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ie("FirestoreClient","Using user provided OnlineComponentProvider"),await Tv(t,t._uninitializedComponentsProvider._online)):(ie("FirestoreClient","Using default OnlineComponentProvider"),await Tv(t,new GF))),t._onlineComponents}function ZF(t){return vE(t).then(e=>e.syncEngine)}async function e$(t){const e=await vE(t),n=e.eventManager;return n.onListen=VF.bind(null,e.syncEngine),n.onUnlisten=$F.bind(null,e.syncEngine),n}function t$(t,e,n={}){const r=new Mr;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,a,c,l){const u=new YF({next:h=>{o.enqueueAndForget(()=>xF(s,f)),h.fromCache&&c.source==="server"?l.reject(new le(j.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(h)},error:h=>l.reject(h)}),f=new OF(a,u,{includeMetadataChanges:!0,W_:!0});return SF(s,f)}(await e$(t),t.asyncQueue,e,n,r)),r.promise}/** - * @license - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function _E(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Iv=new Map;/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function bE(t,e,n){if(!n)throw new le(j.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function n$(t,e,n,r){if(e===!0&&r===!0)throw new le(j.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function Av(t){if(!fe.isDocumentKey(t))throw new le(j.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function Cv(t){if(fe.isDocumentKey(t))throw new le(j.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function sm(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":de()}function Qo(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new le(j.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=sm(t);throw new le(j.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Sv{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new le(j.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new le(j.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}n$("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=_E((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new le(j.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new le(j.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new le(j.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Ou{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Sv({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new le(j.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(e){if(this._settingsFrozen)throw new le(j.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Sv(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new v5;switch(r.type){case"firstParty":return new E5(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new le(j.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=Iv.get(n);r&&(ie("ComponentProvider","Removing Datastore"),Iv.delete(n),r.terminate())}(this),Promise.resolve()}}function r$(t,e,n,r={}){var i;const s=(t=Qo(t,Ou))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&gs("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let a,c;if(typeof r.mockUserToken=="string")a=r.mockUserToken,c=Ft.MOCK_USER;else{a=YM(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const l=r.mockUserToken.sub||r.mockUserToken.user_id;if(!l)throw new le(j.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Ft(l)}t._authCredentials=new _5(new b1(a,c))}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class ku{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new ku(this.firestore,e,this._query)}}class vn{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Vr(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new vn(this.firestore,e,this._key)}}class Vr extends ku{constructor(e,n,r){super(e,n,O1(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new vn(this.firestore,null,new fe(e))}withConverter(e){return new Vr(this.firestore,e,this._path)}}function om(t,e,...n){if(t=Do(t),bE("collection","path",e),t instanceof Ou){const r=Qe.fromString(e,...n);return Cv(r),new Vr(t,null,r)}{if(!(t instanceof vn||t instanceof Vr))throw new le(j.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Qe.fromString(e,...n));return Cv(r),new Vr(t.firestore,null,r)}}function wE(t,e,...n){if(t=Do(t),arguments.length===1&&(e=w1.V()),bE("doc","path",e),t instanceof Ou){const r=Qe.fromString(e,...n);return Av(r),new vn(t,null,new fe(r))}{if(!(t instanceof vn||t instanceof Vr))throw new le(j.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(Qe.fromString(e,...n));return Av(r),new vn(t.firestore,t instanceof Vr?t.converter:null,new fe(r))}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class i${constructor(){this.Wa=Promise.resolve(),this.Ga=[],this.za=!1,this.ja=[],this.Ha=null,this.Ja=!1,this.Ya=!1,this.Za=[],this.Ko=new rE(this,"async_queue_retry"),this.Xa=()=>{const n=kf();n&&ie("AsyncQueue","Visibility state changed to "+n.visibilityState),this.Ko.No()};const e=kf();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.Xa)}get isShuttingDown(){return this.za}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.eu(),this.tu(e)}enterRestrictedMode(e){if(!this.za){this.za=!0,this.Ya=e||!1;const n=kf();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.Xa)}}enqueue(e){if(this.eu(),this.za)return new Promise(()=>{});const n=new Mr;return this.tu(()=>this.za&&this.Ya?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Ga.push(e),this.nu()))}async nu(){if(this.Ga.length!==0){try{await this.Ga[0](),this.Ga.shift(),this.Ko.reset()}catch(e){if(!ya(e))throw e;ie("AsyncQueue","Operation failed with retryable error: "+e)}this.Ga.length>0&&this.Ko.xo(()=>this.nu())}}tu(e){const n=this.Wa.then(()=>(this.Ja=!0,e().catch(r=>{this.Ha=r,this.Ja=!1;const i=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+` -`+o.stack),a}(r);throw lr("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.Ja=!1,r))));return this.Wa=n,n}enqueueAfterDelay(e,n,r){this.eu(),this.Za.indexOf(e)>-1&&(n=0);const i=tm.createAndSchedule(this,e,n,r,s=>this.ru(s));return this.ja.push(i),i}eu(){this.Ha&&de()}verifyOperationInProgress(){}async iu(){let e;do e=this.Wa,await e;while(e!==this.Wa)}su(e){for(const n of this.ja)if(n.timerId===e)return!0;return!1}ou(e){return this.iu().then(()=>{this.ja.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.ja)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.iu()})}_u(e){this.Za.push(e)}ru(e){const n=this.ja.indexOf(e);this.ja.splice(n,1)}}class am extends Ou{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=function(){return new i$}(),this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||TE(this),this._firestoreClient.terminate()}}function cm(t,e){const n=typeof t=="object"?t:Z9(),r=typeof t=="string"?t:e||"(default)",i=Y9(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=KM("firestore");s&&r$(i,...s)}return i}function EE(t){return t._firestoreClient||TE(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function TE(t){var e,n,r;const i=t._freezeSettings(),s=function(a,c,l,u){return new N5(a,c,l,u.host,u.ssl,u.experimentalForceLongPolling,u.experimentalAutoDetectLongPolling,_E(u.experimentalLongPollingOptions),u.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._firestoreClient=new QF(t._authCredentials,t._appCheckCredentials,t._queue,s),((n=i.localCache)===null||n===void 0?void 0:n._offlineComponentProvider)&&((r=i.localCache)===null||r===void 0?void 0:r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Es{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Es(zt.fromBase64String(e))}catch(n){throw new le(j.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new Es(zt.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class lm{constructor(...e){for(let n=0;n90)throw new le(j.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new le(j.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Pe(this._lat,e._lat)||Pe(this._long,e._long)}}/** - * @license - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const s$=/^__.*__$/;class o${constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new Ni(e,this.data,this.fieldMask,n,this.fieldTransforms):new va(e,this.data,n,this.fieldTransforms)}}function AE(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw de()}}class fm{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.au(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get uu(){return this.settings.uu}cu(e){return new fm(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}lu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.cu({path:r,hu:!1});return i.Pu(e),i}Iu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.cu({path:r,hu:!1});return i.au(),i}Tu(e){return this.cu({path:void 0,hu:!0})}Eu(e){return Il(e,this.settings.methodName,this.settings.du||!1,this.path,this.settings.Au)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}au(){if(this.path)for(let e=0;ec.covers(f.field))}else c=null,l=o.fieldTransforms;return new o$(new mn(a),c,l)}function CE(t,e){if(xE(t=Do(t)))return PE("Unsupported field value:",e,t),SE(t,e);if(t instanceof IE)return function(r,i){if(!AE(i.uu))throw i.Eu(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.Eu(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.hu&&e.uu!==4)throw e.Eu("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let c=CE(a,i.Tu(o));c==null&&(c={nullValue:"NULL_VALUE"}),s.push(c),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=Do(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return r6(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=_t.fromDate(r);return{timestampValue:El(i.serializer,s)}}if(r instanceof _t){const s=new _t(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:El(i.serializer,s)}}if(r instanceof um)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Es)return{bytesValue:Y1(i.serializer,r._byteString)};if(r instanceof vn){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.Eu(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:Gp(r.firestore._databaseId||i.databaseId,r._key.path)}}throw i.Eu(`Unsupported field value: ${sm(r)}`)}(t,e)}function SE(t,e){const n={};return E1(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):ks(t,(r,i)=>{const s=CE(i,e.lu(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function xE(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof _t||t instanceof um||t instanceof Es||t instanceof vn||t instanceof IE)}function PE(t,e,n){if(!xE(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=sm(n);throw r==="an object"?e.Eu(t+" a custom object"):e.Eu(t+" "+r)}}function u$(t,e,n){if((e=Do(e))instanceof lm)return e._internalPath;if(typeof e=="string")return RE(t,e);throw Il("Field path arguments must be of type string or ",t,!1,void 0,n)}const f$=new RegExp("[~\\*/\\[\\]]");function RE(t,e,n){if(e.search(f$)>=0)throw Il(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new lm(...e.split("."))._internalPath}catch{throw Il(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function Il(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(s||o)&&(c+=" (found",s&&(c+=` in field ${r}`),o&&(c+=` in document ${i}`),c+=")"),new le(j.INVALID_ARGUMENT,a+t+c)}function h$(t,e){return t.some(n=>n.isEqual(e))}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class OE{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new vn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new d$(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(kE("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class d$ extends OE{data(){return super.data()}}function kE(t,e){return typeof e=="string"?RE(t,e):e instanceof lm?e._internalPath:e._delegate._internalPath}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function p$(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new le(j.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class m${convertValue(e,n="none"){switch(Ri(e)){case 0:return null;case 1:return e.booleanValue;case 2:return ht(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Pi(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw de()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return ks(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertGeoPoint(e){return new um(ht(e.latitude),ht(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Up(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(zo(e));default:return null}}convertTimestamp(e){const n=qr(e);return new _t(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=Qe.fromString(e);He(eE(r));const i=new Wo(r.get(1),r.get(3)),s=new fe(r.popFirst(5));return i.isEqual(n)||lr(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */function g$(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class rc{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class y$ extends OE{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new Rc(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(kE("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class Rc extends y${data(e={}){return super.data(e)}}class v${constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new rc(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new Rc(this._firestore,this._userDataWriter,r.key,r,new rc(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new le(j.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>{const c=new Rc(i._firestore,i._userDataWriter,a.doc.key,a.doc,new rc(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:c,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const c=new Rc(i._firestore,i._userDataWriter,a.doc.key,a.doc,new rc(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let l=-1,u=-1;return a.type!==0&&(l=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),u=o.indexOf(a.doc.key)),{type:_$(a.type),doc:c,oldIndex:l,newIndex:u}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function _$(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return de()}}class b$ extends m${constructor(e){super(),this.firestore=e}convertBytes(e){return new Es(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new vn(this.firestore,null,n)}}function w$(t){t=Qo(t,ku);const e=Qo(t.firestore,am),n=EE(e),r=new b$(e);return p$(t._query),t$(n,t._query).then(i=>new v$(e,r,t,i))}function DE(t,e,n){t=Qo(t,vn);const r=Qo(t.firestore,am),i=g$(t.converter,e,n);return E$(r,[l$(c$(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,rr.none())])}function E$(t,e){return function(r,i){const s=new Mr;return r.asyncQueue.enqueueAndForget(async()=>LF(await ZF(r),i,s)),s.promise}(EE(t),e)}(function(e,n=!0){(function(i){Os=i})(J9),ul(new No("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new am(new b5(r.getProvider("auth-internal")),new I5(r.getProvider("app-check-internal")),function(l,u){if(!Object.prototype.hasOwnProperty.apply(l.options,["projectId"]))throw new le(j.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Wo(l.options.projectId,u)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),cs(Gy,"4.1.0",e),cs(Gy,"4.1.0","esm2017")})();const T$={components:{SOLogo:fb},data(){return{fullName:"",universityId:"",phoneNumber:"",email:"",faculty:"",department:"",batch:"",showMessage:!1}},methods:{closeMessage(){this.showMessage=!1},async submitForm(){console.log("formRan"),su({apiKey:"AIzaSyBMOiTpc_PPERG4ZhPbTQIZ8uAHnNzsKos",authDomain:"speech-olympiad.firebaseapp.com",projectId:"speech-olympiad",storageBucket:"speech-olympiad.appspot.com",messagingSenderId:"718732602589",appId:"1:718732602589:web:d2b3a682106d06fc773f34",measurementId:"G-T1D958J5EE"});const e=cm(),n=wE(om(e,"registrations")),r={fullName:this.fullName,universityId:this.universityId,phoneNumber:this.phoneNumber,email:this.email,faculty:this.faculty,department:this.department,batch:this.batch,time:new Date};console.log("efewf"),await DE(n,r),console.log("efewf");try{this.fullName="",this.universityId="",this.phoneNumber="",this.email="",this.faculty="",this.department="",this.batch="",this.showMessage=!0}catch(i){console.error("Error adding document: ",i)}console.log("efewf")}}},I$={class:"flex items-center justify-center"},A$={class:"rounded-lg mt-12 bg-gray-600 p-2 shadow-md"},C$={class:"flex flex-wrap -mx-3 mb-6"},S$={class:"w-full md:w-1/2 px-3 mb-6 md:mb-0"},x$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-first-name"}," Full Name ",-1),P$={class:"w-full md:w-1/2 px-3"},R$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-last-name"}," University Id ",-1),O$={class:"flex flex-wrap -mx-3 mb-6"},k$={class:"w-full md:w-1/2 px-3 mb-6 md:mb-0"},D$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-first-name"}," Phone Number ",-1),N$={class:"w-full md:w-1/2 px-3"},M$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-last-name"}," Email ",-1),V$={class:"flex flex-wrap -mx-3 mb-2"},F$=vd('
c
',1),$$={class:"w-full md:w-1/3 px-3 mb-6 md:mb-0"},L$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-city"}," Department ",-1),j$={class:"w-full md:w-1/3 px-3 mb-6 md:mb-0"},U$=d("label",{class:"block uppercase tracking-wide text-gray-300 text-xs font-bold mb-2",for:"grid-state"}," Batch ",-1),B$={class:"relative"},q$=d("option",null,"2019",-1),H$=d("option",null,"2020",-1),z$=d("option",null,"2021",-1),W$=d("option",null,"2022",-1),K$=[q$,H$,z$,W$],G$=d("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700"},[d("svg",{class:"fill-current h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[d("path",{d:"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"})])],-1),Y$=d("br",null,null,-1),Q$=d("div",{class:"flex flex-wrap -mx-3 mb-6"},[d("div",{class:"w-full justify-center px-3"},[d("button",{type:"submit",class:"bg-gray-800 w-full hover:bg-gray-900 text-gray-300 border-gray-200 font-bold py-2 px-4 outline-1 rounded focus:outline-none focus:shadow-outline"}," Register ")])],-1),X$={class:"flex justify-center items-center"},J$={key:0,class:"bg-pink-900 w-full rounded-lg p-6 shadow-md"},Z$=d("p",{class:"text-white text-lg font-semibold mb-2"},"Success!",-1),eL=d("p",{class:"text-white text-sm"},"Congragulations for taking this step \u{1F973}.",-1);function tL(t,e,n,r,i,s){const o=Je("SOLogo");return Y(),ee("div",I$,[d("div",A$,[ye(o,{class:"w-24 items-center justify-cente"}),d("form",{class:"w-full max-w-lg",onSubmit:e[6]||(e[6]=r2((...a)=>s.submitForm&&s.submitForm(...a),["prevent"]))},[d("div",C$,[d("div",S$,[x$,tn(d("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>i.fullName=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-red-300 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-gray-900",id:"grid-first-name",type:"text",placeholder:"Pavan Pitiwaduge"},null,512),[[Ln,i.fullName]])]),d("div",P$,[R$,tn(d("input",{"onUpdate:modelValue":e[1]||(e[1]=a=>i.universityId=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-last-name",type:"text",placeholder:"210454I"},null,512),[[Ln,i.universityId]])])]),d("div",O$,[d("div",k$,[D$,tn(d("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>i.phoneNumber=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-gray-900",id:"grid-first-name",type:"mobile",placeholder:"718456734"},null,512),[[Ln,i.phoneNumber]])]),d("div",N$,[M$,tn(d("input",{"onUpdate:modelValue":e[3]||(e[3]=a=>i.email=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-last-name",type:"email",placeholder:"example@gmail.com"},null,512),[[Ln,i.email]])])]),d("div",V$,[F$,d("div",$$,[L$,tn(d("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>i.department=a),class:"appearance-none block w-full bg-gray-800 text-gray-300 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-city",type:"text",placeholder:"CSE"},null,512),[[Ln,i.department]])]),d("div",j$,[U$,d("div",B$,[tn(d("select",{"onUpdate:modelValue":e[5]||(e[5]=a=>i.batch=a),class:"block appearance-none w-full bg-gray-800 border border-gray-200 text-gray-300 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500",id:"grid-state"},K$,512),[[Kf,i.batch]]),G$])])]),Y$,Q$],32),d("div",X$,[i.showMessage?(Y(),ee("div",J$,[Z$,eL,d("button",{onClick:e[7]||(e[7]=(...a)=>s.closeMessage&&s.closeMessage(...a)),class:"mt-4 text-sm text-white underline cursor-pointer focus:outline-none"},"Close")])):yt("",!0)])])])}const nL=ze(T$,[["render",tL]]),rL={data(){return{registrations:[]}},methods:{downloadCsvFile(){let t="RegistrationData.csv",e=this.convertJsonToCsv(this.registrations);const n=new Blob([e],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},convertJsonToCsv(t){const e=",",n=Object.keys(t[0]).join(e),r=t.map(s=>Object.values(s).map(o=>typeof o=="string"&&o.includes(e)?`"${o}"`:o).join(e));return[n,...r].join(` -`)}},async mounted(){su({apiKey:"AIzaSyBMOiTpc_PPERG4ZhPbTQIZ8uAHnNzsKos",authDomain:"speech-olympiad.firebaseapp.com",projectId:"speech-olympiad",storageBucket:"speech-olympiad.appspot.com",messagingSenderId:"718732602589",appId:"1:718732602589:web:d2b3a682106d06fc773f34",measurementId:"G-T1D958J5EE"});const e=cm(),n=await w$(om(e,"registrations"));this.registrations=n.docs.map(r=>{const i=r.data();return{id:r.id,fullName:i.fullName,universityId:i.universityId,phoneNumber:i.phoneNumber,email:i.email,faculty:i.faculty,department:i.department,batch:i.batch,time:i.time.toDate()}})}},iL=d("h1",{class:"text-2xl font-semibold mb-4"},"Registrations",-1),sL={class:"overflow-x-auto"},oL={class:"min-w-full border divide-y divide-gray-300"},aL=d("thead",{class:"bg-gray-100 text-black"},[d("tr",null,[d("th",{class:"py-2 px-4"},"Full Name"),d("th",{class:"py-2 px-4"},"University ID"),d("th",{class:"py-2 px-4"},"Email"),d("th",{class:"py-2 px-4"},"Faculty"),d("th",{class:"py-2 px-4"},"Department"),d("th",{class:"py-2 px-4"},"Batch"),d("th",{class:"py-2 px-4"},"Phone Number"),d("th",{class:"py-2 px-4"},"Time")])],-1),cL={class:"py-2 px-4"},lL={class:"py-2 px-4"},uL={class:"py-2 px-4"},fL={class:"py-2 px-4"},hL={class:"py-2 px-4"},dL={class:"py-2 px-4"},pL={class:"py-2 px-4"},mL={class:"py-2 px-4"};function gL(t,e,n,r,i,s){return Y(),ee("div",null,[iL,d("button",{class:"bg-gray-500 w-64 m-3 hover:bg-gray-600 text-gray-300 border-gray-200 font-bold py-2 px-4 outline-1 rounded focus:outline-none focus:shadow-outline",onClick:e[0]||(e[0]=(...o)=>s.downloadCsvFile&&s.downloadCsvFile(...o))}," Download Data "),d("div",sL,[d("table",oL,[aL,d("tbody",null,[(Y(!0),ee(Ve,null,Hn(i.registrations,o=>(Y(),ee("tr",{key:o.id},[d("td",cL,Ye(o.fullName),1),d("td",lL,Ye(o.universityId),1),d("td",uL,Ye(o.email),1),d("td",fL,Ye(o.faculty),1),d("td",hL,Ye(o.department),1),d("td",dL,Ye(o.batch),1),d("td",pL,Ye(o.phoneNumber),1),d("td",mL,Ye(o.time),1)]))),128))])])])])}const yL=ze(rL,[["render",gL]]),NE="/assets/dragon1.6691882b.png",ME="/assets/dragon2.50d07c9f.png",vL="/assets/gavelium2.c1c19a0f.jpg",xv="/assets/SOXVI.c0a933a3.jpg";const _L={data(){return{currentImage:NE}},methods:{switchImage(){setTimeout(()=>{this.currentImage=ME},1500)}},mounted(){this.switchImage()}},bL={class:"w-full"},wL=["src"];function EL(t,e,n,r,i,s){return Y(),ee("div",bL,[(Y(),ee("img",{src:i.currentImage,key:i.currentImage,class:"image"},null,8,wL))])}const VE=ze(_L,[["render",EL]]);const TL={name:"AnimatedText",components:{imageAnimation:VE},data(){return{Background:{filename:vL,alt:"Alt Text for Image"},firstV:!0,secondV:!1,thirdV:!1,fourthV:!1,fifthV:!1,sixthV:!1,seventhV:!1,eightV:!1,fullName:"",universityId:"",phoneNumber:"",email:"",faculty:"",department:"",batch:"",showMessage:!1,fadeAnimation:!1,currentImage:NE,sologo:xv,first:{typedText:"",fullText:"Hi Contestant \u{1F44B}
What is your name?",currentIndex:0},second:{typedText:"",fullText:"Hi, what is your university id? ",currentIndex:0},third:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},fourth:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},fifth:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},sixth:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},seventh:{typedText:"",fullText:"Hi, what is your university id?",currentIndex:0},eight:{typedText:"",fullText:"Your journey is about to begin \u{1F973}",currentIndex:0}}},methods:{typeText(t){t.currentIndex<=t.fullText.length&&(t.typedText=t.fullText.slice(0,t.currentIndex),t.currentIndex++,setTimeout(()=>this.typeText(t),50))},closeMessage(){this.showMessage=!1},firstB(t){switch(t){case 2:this.firstV=!1,this.secondV=!0,this.second.fullText=this.fullName.split(" ")[1]+", What is your University ID ? \u{1F393}",this.typeText(this.second);break;case 3:this.secondV=!1,this.thirdV=!0,this.third.fullText=this.fullName.split(" ")[1]+", We need your phone number \u260E\uFE0F
(whatsapp preferred)",this.typeText(this.third);break;case 4:this.thirdV=!1,this.fourthV=!0,this.fourth.fullText=" What is your Email \u{1F4E7} ?",this.typeText(this.fourth);break;case 5:this.fourthV=!1,this.fifthV=!0,this.fifth.fullText=this.fullName.split(" ")[1]+", In which faculty do you study ?",this.typeText(this.fifth);break;case 6:this.fifthV=!1,this.sixthV=!0,this.sixth.fullText="What is your department ?",this.typeText(this.sixth);break;case 7:this.sixthV=!1,this.seventhV=!0,this.seventh.fullText="Final question \u{1F62E}\u200D\u{1F4A8}
"+this.fullName.split(" ")[1]+", Select your batch",this.typeText(this.seventh);break;case 8:this.seventhV=!1,this.eightV=!0,this.typeText(this.eight),this.switchImage(),setTimeout(()=>{this.fadeAnimation=!0,this.eight.fullText="Your journey is about to begin \u{1F973}",this.sologo=xv},1500)}},finish(){this.seventhV=!1,this.submitForm(),this.firstB(8)},async submitForm(){console.log("formRan"),su({apiKey:"AIzaSyBMOiTpc_PPERG4ZhPbTQIZ8uAHnNzsKos",authDomain:"speech-olympiad.firebaseapp.com",projectId:"speech-olympiad",storageBucket:"speech-olympiad.appspot.com",messagingSenderId:"718732602589",appId:"1:718732602589:web:d2b3a682106d06fc773f34",measurementId:"G-T1D958J5EE"});const e=cm(),n=wE(om(e,"registrations")),r={fullName:this.fullName,universityId:this.universityId,phoneNumber:this.phoneNumber,email:this.email,faculty:this.faculty,department:this.department,batch:this.batch,time:new Date};console.log("efewf"),await DE(n,r),console.log("efewf");try{this.fullName="",this.universityId="",this.phoneNumber="",this.email="",this.faculty="",this.department="",this.batch="",this.showMessage=!0}catch(i){console.error("Error adding document: ",i)}console.log("efewf")},switchImage(){setTimeout(()=>{this.currentImage=ME},1500)}},mounted(){this.typeText(this.first)}},gr=t=>(hr("data-v-e306ec9e"),t=t(),dr(),t),IL={class:"relative min-h-screen bg-black"},AL=["src","alt"],CL={key:0,class:"absolute md:top-1/2 i top-1/2 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center flex"},SL=["src"],xL={class:"flex flex-col items-center justify-center ml-4 w-1/2"},PL=["innerHTML"],RL=["src"],OL={key:1,class:"absolute md:top-1/3 i top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},kL=["innerHTML"],DL={class:"relative flex items-center mt-4"},NL={key:2,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},ML=["innerHTML"],VL={class:"relative flex items-center mt-4"},FL={key:3,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},$L=["innerHTML"],LL={class:"relative flex items-center mt-4"},jL={key:4,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},UL=["innerHTML"],BL={class:"relative flex items-center mt-4"},qL={key:5,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},HL=["innerHTML"],zL={class:"relative flex items-center mt-4"},WL=gr(()=>d("option",null,"Faculty of Engineering",-1)),KL=gr(()=>d("option",null,"Faculty of Information Technology",-1)),GL=gr(()=>d("option",null,"Faculty of Architecture",-1)),YL=gr(()=>d("option",null,"Faculty of Business",-1)),QL=gr(()=>d("option",null,"Faculty of Medicine",-1)),XL=[WL,KL,GL,YL,QL],JL={key:6,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},ZL=["innerHTML"],ej={class:"relative flex items-center mt-4"},tj={key:7,class:"absolute md:top-1/3 top-1/3 bg-black md:left-1/2 w-full sm:w-[50%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center"},nj=["innerHTML"],rj={class:"relative flex items-center mt-4"},ij=gr(()=>d("option",null,"2019",-1)),sj=gr(()=>d("option",null,"2020",-1)),oj=gr(()=>d("option",null,"2021",-1)),aj=gr(()=>d("option",null,"2022",-1)),cj=[ij,sj,oj,aj];function lj(t,e,n,r,i,s){return Y(),ee("div",IL,[d("img",{src:i.Background.filename,alt:i.Background.alt,class:"w-full sm:w-1/2 mx-auto"},null,8,AL),i.eightV?(Y(),ee("div",CL,[ye(so,{name:"bon",mode:"out-in"},{default:kr(()=>[(Y(),ee("img",{src:i.currentImage,key:i.currentImage,class:"image"},null,8,SL))]),_:1}),d("div",xL,[ye(so,{name:"bounce",mode:"out-in"},{default:kr(()=>[i.fadeAnimation?(Y(),ee("p",{class:"text-white text-3xl ml-2",innerHTML:i.eight.fullText,key:i.fadeAnimation},null,8,PL)):yt("",!0)]),_:1}),ye(so,{name:"slide-fade",mode:"out-in"},{default:kr(()=>[i.fadeAnimation?(Y(),ee("img",{src:i.sologo,class:"w-32",key:i.fadeAnimation},null,8,RL)):yt("",!0)]),_:1})])])):yt("",!0),i.firstV?(Y(),ee("div",OL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.first.typedText},null,8,kL),d("div",DL,[tn(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"text",placeholder:"Enter your full name here","onUpdate:modelValue":e[0]||(e[0]=o=>i.fullName=o),onKeyup:e[1]||(e[1]=$s(o=>s.firstB(2),["enter"]))},null,544),[[Ln,i.fullName]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[2]||(e[2]=o=>s.firstB(2))}," \u2192 ")])])):yt("",!0),i.secondV?(Y(),ee("div",NL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.second.typedText},null,8,ML),d("div",VL,[tn(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"text",placeholder:"Enter your Uni id here","onUpdate:modelValue":e[3]||(e[3]=o=>i.universityId=o),onKeyup:e[4]||(e[4]=$s(o=>s.firstB(3),["enter"]))},null,544),[[Ln,i.universityId]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[5]||(e[5]=o=>s.firstB(3))}," \u2192 ")])])):yt("",!0),i.thirdV?(Y(),ee("div",FL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.third.typedText},null,8,$L),d("div",LL,[tn(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"mobile",placeholder:"Enter your mobile number","onUpdate:modelValue":e[6]||(e[6]=o=>i.phoneNumber=o),onKeyup:e[7]||(e[7]=$s(o=>s.firstB(4),["enter"]))},null,544),[[Ln,i.phoneNumber]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[8]||(e[8]=o=>s.firstB(4))}," \u2192 ")])])):yt("",!0),i.fourthV?(Y(),ee("div",jL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.fourth.typedText},null,8,UL),d("div",BL,[tn(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"email",placeholder:"Enter your email","onUpdate:modelValue":e[9]||(e[9]=o=>i.email=o),onKeyup:e[10]||(e[10]=$s(o=>s.firstB(5),["enter"]))},null,544),[[Ln,i.email]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[11]||(e[11]=o=>s.firstB(5))}," \u2192 ")])])):yt("",!0),i.fifthV?(Y(),ee("div",qL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.fifth.typedText},null,8,HL),d("div",zL,[tn(d("select",{"onUpdate:modelValue":e[12]||(e[12]=o=>i.faculty=o),class:"block appearance-none w-full border border-gray-200 py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500 placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14",id:"grid-state"},XL,512),[[Kf,i.faculty]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[13]||(e[13]=o=>s.firstB(6))}," \u2192 ")])])):yt("",!0),i.sixthV?(Y(),ee("div",JL,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.sixth.typedText},null,8,ZL),d("div",ej,[tn(d("input",{class:"w-full placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14 focus:outline-none",type:"email",placeholder:"Ex : CSE","onUpdate:modelValue":e[14]||(e[14]=o=>i.department=o),onKeyup:e[15]||(e[15]=$s(o=>s.firstB(7),["enter"]))},null,544),[[Ln,i.department]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[16]||(e[16]=o=>s.firstB(7))}," \u2192 ")])])):yt("",!0),i.seventhV?(Y(),ee("div",tj,[d("p",{class:"text-3xl text-gray-200 bg-black",innerHTML:i.seventh.typedText},null,8,nj),d("div",rj,[tn(d("select",{"onUpdate:modelValue":e[17]||(e[17]=o=>i.batch=o),class:"block appearance-none w-full border border-gray-200 py-3 px-4 leading-tight focus:outline-none focus:bg-gray-900 focus:border-gray-500 placeholder-gray-200::placeholder text-xl bg-black text-gray-200 p-4 rounded-md pr-14",id:"grid-state"},cj,512),[[Kf,i.batch]]),d("button",{class:"absolute right-0 top-0 h-full px-4 bg-gray-200 text-black hover:bg-gray-300",onClick:e[18]||(e[18]=(...o)=>s.finish&&s.finish(...o))}," \u2192 ")])])):yt("",!0)])}const uj=ze(TL,[["render",lj],["__scopeId","data-v-e306ec9e"]]),fj={"/":bk,"/about":Fk,"/champions-story":lD,"/technical-tips":b4,"/gallery":V4,"/blogs":T0,"/form":nL,"/admin":yL,"/form2":uj,"/rr":VE},hj={data(){return{currentPath:window.location.hash}},components:{AppHeader:tx,AppFooter:OS},computed:{currentView(){return window.scrollTo({top:0,behavior:"auto"}),fj["/"+this.currentPath.slice(1)]||L4}},mounted(){window.addEventListener("hashchange",()=>{this.currentPath=window.location.hash})},setup(){FM({projectId:"i32b0q2c",dataset:"production",useCdn:!0},!0)}};function dj(t,e,n,r,i,s){const o=Je("AppHeader"),a=Je("AppFooter");return Y(),ee(Ve,null,[ye(o),(Y(),jl(YI(s.currentView))),ye(a)],64)}const pj=ze(hj,[["render",dj]]);const mj=c2(pj);mj.mount("#app");export{_h as e}; diff --git a/index.html b/index.html index 11619af..29fe114 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous" /> - +