PageSourceSearch

https://rafutabi.vercel.app/_nuxt/entry.DGj7SBwL.js

js rafutabi.vercel.app collected 2026-10-03 07:34:25 UTC 825,585 bytes, 3,407 lines download raw bytes

1function __vite__mapDeps(indexes) {
2  if (!__vite__mapDeps.viteFileDeps) {
3    __vite__mapDeps.viteFileDeps = ["./sendEmail.BKUZgSnk.js","./Button.vue.bRIeAcE5.js","./signin.BPxejY1W.js","./nuxt-link.BGTWpojZ.js","./Loading.vue.Cs7NNgCe.js","./Google.B1Wds5iK.js","./signup.BDlJ5UWU.js","./generateAI.ixJ4VNlu.js","./BackButton.vue.CecQPr7h.js","./PageHeader.ty8J-3t-.js","./List.vue.fKT7YspE.js","./useDestinations.DwVZXPOU.js","./fetch.BEyBK8B4.js","./index.CDYAPtLU.js","./RoundedButton.DDT1huhe.js","./index.4jWVXNZH.js","./inviteCode.1ePUmdZn.js","./index.CkHNWqL8.js","./index.Dr3Rrogw.js","./search.CG5GWzpH.js","./PhotoIcon.PxvQ5gyE.js","./search.Be-Bwh61.css","./new.CvAoyVcq.js","./client-only.Cnju3vcy.js","./usePosition.mulTSHmm.js","./generate.DsvmnvoL.js","./mapbox-gl.DchGgKb_.js","./mapbox-gl.DJxZTDa8.css","./index.DiqhOkln.js","./nuxt-img.BSsS0pM_.js","./vue.f36acd1f.g4cpaAqm.js","./TrashIcon.DDdX3fIS.js","./index.BGL4-BZL.css","./new.CnYoTT_2.js","./index.C-zHQdtc.js","./index.sWhYSvnk.js","./app.DOjU5M-N.js","./error-404.T8ioau2q.js","./error-404.CoUbADi5.css","./error-500.CMU239qL.js","./error-500.BXQ_YkC0.css"]
4  }
5  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
6}
7/**
8* @vue/shared v3.4.21
9* (c) 2018-present Yuxi (Evan) You and Vue contributors
10* @license MIT
vendor: 15,668 bytes, lines 11-18
11**/function hh(t,e){const n=new Set(t.split(","));return e?r=>n.has(r.toLowerCase()):r=>n.has(r)}const We={},no=[],an=()=>{},UC=()=>!1,Ol=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),tm=t=>t.startsWith("onUpdate:"),lt=Object.assign,nm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},BC=Object.prototype.hasOwnProperty,$e=(t,e)=>BC.call(t,e),he=Array.isArray,ro=t=>Wo(t)==="[object Map]",Mi=t=>Wo(t)==="[object Set]",Dv=t=>Wo(t)==="[object Date]",HC=t=>Wo(t)==="[object RegExp]",_e=t=>typeof t=="function",ct=t=>typeof t=="string",Ds=t=>typeof t=="symbol",Qe=t=>t!==null&&typeof t=="object",rm=t=>(Qe(t)||_e(t))&&_e(t.then)&&_e(t.catch),db=Object.prototype.toString,Wo=t=>db.call(t),jC=t=>Wo(t).slice(8,-1),pb=t=>Wo(t)==="[object Object]",sm=t=>ct(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,so=hh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fh=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},WC=/-(\w)/g,cn=fh(t=>t.replace(WC,(e,n)=>n?n.toUpperCase():"")),YC=/\B([A-Z])/g,Dn=fh(t=>t.replace(YC,"-$1").toLowerCase()),dh=fh(t=>t.charAt(0).toUpperCase()+t.slice(1)),Kc=fh(t=>t?`on${dh(t)}`:""),nr=(t,e)=>!Object.is(t,e),io=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},du=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},Xa=t=>{const e=parseFloat(t);return isNaN(e)?t:e},pu=t=>{const e=ct(t)?Number(t):NaN;return isNaN(e)?t:e};let kv;const mb=()=>kv||(kv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),qC="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",KC=hh(qC);function jr(t){if(he(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],s=ct(r)?XC(r):jr(r);if(s)for(const i in s)e[i]=s[i]}return e}else if(ct(t)||Qe(t))return t}const zC=/;(?![^(]*\))/g,GC=/:([^]+)/,QC=/\/\*[^]*?\*\//g;function XC(t){const e={};return t.replace(QC,"").split(zC).forEach(n=>{if(n){const r=n.split(GC);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Je(t){let e="";if(ct(t))e=t;else if(he(t))for(let n=0;n<t.length;n++){const r=Je(t[n]);r&&(e+=r+" ")}else if(Qe(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function oo(t){if(!t)return null;let{class:e,style:n}=t;return e&&!ct(e)&&(t.class=Je(e)),n&&(t.style=jr(n)),t}const JC="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ZC=hh(JC);function gb(t){return!!t||t===""}function eS(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=ks(t[r],e[r]);return n}function ks(t,e){if(t===e)return!0;let n=Dv(t),r=Dv(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Ds(t),r=Ds(e),n||r)return t===e;if(n=he(t),r=he(e),n||r)return n&&r?eS(t,e):!1;if(n=Qe(t),r=Qe(e),n||r){if(!n||!r)return!1;const s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(const o in t){const a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!ks(t[o],e[o]))return!1}}return String(t)===String(e)}function ph(t,e){return t.findIndex(n=>ks(n,e))}const Jt=t=>ct(t)?t:t==null?"":he(t)||Qe(t)&&(t.toString===db||!_e(t.toString))?JSON.stringify(t,vb,2):String(t),vb=(t,e)=>e&&e.__v_isRef?vb(t,e.value):ro(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[Tf(r,i)+" =>"]=s,n),{})}:Mi(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Tf(n))}:Ds(e)?Tf(e):Qe(e)&&!he(e)&&!pb(e)?String(e):e,Tf=(t,e="")=>{var n;return Ds(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
12* @vue/reactivity v3.4.21
13* (c) 2018-present Yuxi (Evan) You and Vue contributors
14* @license MIT
15**/let Pn;class yb{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Pn,!e&&Pn&&(this.index=(Pn.scopes||(Pn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Pn;try{return Pn=this,e()}finally{Pn=n}}}on(){Pn=this}off(){Pn=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function tS(t){return new yb(t)}function _b(t,e=Pn){e&&e.active&&e.effects.push(t)}function nS(){return Pn}function wZ(t){Pn&&Pn.cleanups.push(t)}let ui;class Ja{constructor(e,n,r,s){this.fn=e,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,_b(this,s)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Ni();for(let e=0;e<this._depsLength;e++){const n=this.deps[e];if(n.computed&&(rS(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Li()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=As,n=ui;try{return As=!0,ui=this,this._runnings++,Ov(this),this.fn()}finally{Mv(this),this._runnings--,ui=n,As=e}}stop(){var e;this.active&&(Ov(this),Mv(this),(e=this.onStop)==null||e.call(this),this.active=!1)}}function rS(t){return t.value}function Ov(t){t._trackId++,t._depsLength=0}function Mv(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)wb(t.deps[e],t);t.deps.length=t._depsLength}}function wb(t,e){const n=t.get(e);n!==void 0&&e._trackId!==n&&(t.delete(e),t.size===0&&t.cleanup())}function EZ(t,e){t.effect instanceof Ja&&(t=t.effect.fn);const n=new Ja(t,an,()=>{n.dirty&&n.run()});e&&(lt(n,e),e.scope&&_b(n,e.scope)),(!e||!e.lazy)&&n.run();const r=n.run.bind(n);return r.effect=n,r}function bZ(t){t.effect.stop()}let As=!0,Rd=0;const Eb=[];function Ni(){Eb.push(As),As=!1}function Li(){const t=Eb.pop();As=t===void 0?!0:t}function im(){Rd++}function om(){for(Rd--;!Rd&&Pd.length;)Pd.shift()()}function bb(t,e,n){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const r=t.deps[t._depsLength];r!==e?(r&&wb(r,t),t.deps[t._depsLength++]=e):t._depsLength++}}const Pd=[];function Tb(t,e,n){im();for(const r of t.keys()){let s;r._dirtyLevel<e&&(s??(s=t.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=e),r._shouldSchedule&&(s??(s=t.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Pd.push(r.scheduler)))}om()}const Ib=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},mu=new WeakMap,hi=Symbol(""),Cd=Symbol("");function fn(t,e,n){if(As&&ui){let r=mu.get(t);r||mu.set(t,r=new Map);let s=r.get(n);s||r.set(n,s=Ib(()=>r.delete(n))),bb(ui,s)}}function Wr(t,e,n,r,s,i){const o=mu.get(t);if(!o)return;let a=[];if(e==="clear")a=[...o.values()];else if(n==="length"&&he(t)){const l=Number(r);o.forEach((c,u)=>{(u==="length"||!Ds(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(o.get(n)),e){case"add":he(t)?sm(n)&&a.push(o.get("length")):(a.push(o.get(hi)),ro(t)&&a.push(o.get(Cd)));break;case"delete":he(t)||(a.push(o.get(hi)),ro(t)&&a.push(o.get(Cd)));break;case"set":ro(t)&&a.push(o.get(hi));break}im();for(const l of a)l&&Tb(l,4);om()}function sS(t,e){var n;return(n=mu.get(t))==null?void 0:n.get(e)}const iS=hh("__proto__,__v_isRef,__isVue"),Ab=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ds)),Nv=oS();function oS(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Ve(this);for(let i=0,o=this.length;i<o;i++)fn(r,"get",i+"");const s=r[e](...n);return s===-1||s===!1?r[e](...n.map(Ve)):s}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){Ni(),im();const r=Ve(this)[e].apply(this,n);return om(),Li(),r}}),t}function aS(t){const e=Ve(this);return fn(e,"has",t),e.hasOwnProperty(t)}class Rb{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Ob:kb:i?Db:Sb).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const o=he(e);if(!s){if(o&&$e(Nv,n))return Reflect.get(Nv,n,r);if(n==="hasOwnProperty")return aS}const a=Reflect.get(e,n,r);return(Ds(n)?Ab.has(n):iS(n))||(s||fn(e,"get",n),i)?a:dt(a)?o&&sm(n)?a:a.value:Qe(a)?s?Mb(a):Kn(a):a}}class Pb extends Rb{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];if(!this._isShallow){const l=vi(i);if(!gu(r)&&!vi(r)&&(i=Ve(i),r=Ve(r)),!he(e)&&dt(i)&&!dt(r))return l?!1:(i.value=r,!0)}const o=he(e)&&sm(n)?Number(n)<e.length:$e(e,n),a=Reflect.set(e,n,r,s);return e===Ve(s)&&(o?nr(r,i)&&Wr(e,"set",n,r):Wr(e,"add",n,r)),a}deleteProperty(e,n){const r=$e(e,n);e[n];const s=Reflect.deleteProperty(e,n);return s&&r&&Wr(e,"delete",n,void 0),s}has(e,n){const r=Reflect.has(e,n);return(!Ds(n)||!Ab.has(n))&&fn(e,"has",n),r}ownKeys(e){return fn(e,"iterate",he(e)?"length":hi),Reflect.ownKeys(e)}}class Cb extends Rb{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const lS=new Pb,cS=new Cb,uS=new Pb(!0),hS=new Cb(!0),am=t=>t,mh=t=>Reflect.getPrototypeOf(t);function gc(t,e,n=!1,r=!1){t=t.__v_raw;const s=Ve(t),i=Ve(e);n||(nr(e,i)&&fn(s,"get",e),fn(s,"get",i));const{has:o}=mh(s),a=r?am:n?lm:Za;if(o.call(s,e))return a(t.get(e));if(o.call(s,i))return a(t.get(i));t!==s&&t.get(e)}function vc(t,e=!1){const n=this.__v_raw,r=Ve(n),s=Ve(t);return e||(nr(t,s)&&fn(r,"has",t),fn(r,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function yc(t,e=!1){return t=t.__v_raw,!e&&fn(Ve(t),"iterate",hi),Reflect.get(t,"size",t)}function Lv(t){t=Ve(t);const e=Ve(this);return mh(e).has.call(e,t)||(e.add(t),Wr(e,"add",t,t)),this}function xv(t,e){e=Ve(e);const n=Ve(this),{has:r,get:s}=mh(n);let i=r.call(n,t);i||(t=Ve(t),i=r.call(n,t));const o=s.call(n,t);return n.set(t,e),i?nr(e,o)&&Wr(n,"set",t,e):Wr(n,"add",t,e),this}function Vv(t){const e=Ve(this),{has:n,get:r}=mh(e);let s=n.call(e,t);s||(t=Ve(t),s=n.call(e,t)),r&&r.call(e,t);const i=e.delete(t);return s&&Wr(e,"delete",t,void 0),i}function $v(){const t=Ve(this),e=t.size!==0,n=t.clear();return e&&Wr(t,"clear",void 0,void 0),n}function _c(t,e){return function(r,s){const i=this,o=i.__v_raw,a=Ve(o),l=e?am:t?lm:Za;return!t&&fn(a,"iterate",hi),o.forEach((c,u)=>r.call(s,l(c),l(u),i))}}function wc(t,e,n){return function(...r){const s=this.__v_raw,i=Ve(s),o=ro(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...r),u=n?am:e?lm:Za;return!e&&fn(i,"iterate",l?Cd:hi),{next(){const{value:h,done:f}=c.next();return f?{value:h,done:f}:{value:a?[u(h[0]),u(h[1])]:u(h),done:f}},[Symbol.iterator](){return this}}}}function ss(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function fS(){const t={get(i){return gc(this,i)},get size(){return yc(this)},has:vc,add:Lv,set:xv,delete:Vv,clear:$v,forEach:_c(!1,!1)},e={get(i){return gc(this,i,!1,!0)},get size(){return yc(this)},has:vc,add:Lv,set:xv,delete:Vv,clear:$v,forEach:_c(!1,!0)},n={get(i){return gc(this,i,!0)},get size(){return yc(this,!0)},has(i){return vc.call(this,i,!0)},add:ss("add"),set:ss("set"),delete:ss("delete"),clear:ss("clear"),forEach:_c(!0,!1)},r={get(i){return gc(this,i,!0,!0)},get size(){return yc(this,!0)},has(i){return vc.call(this,i,!0)},add:ss("add"),set:ss("set"),delete:ss("delete"),clear:ss("clear"),forEach:_c(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{t[i]=wc(i,!1,!1),n[i]=wc(i,!0,!1),e[i]=wc(i,!1,!0),r[i]=wc(i,!0,!0)}),[t,n,e,r]}const[dS,pS,mS,gS]=fS();function gh(t,e){const n=e?t?gS:mS:t?pS:dS;return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get($e(n,s)&&s in r?n:r,s,i)}const vS={get:gh(!1,!1)},yS={get:gh(!1,!0)},_S={get:gh(!0,!1)},wS={get:gh(!0,!0)},Sb=new WeakMap,Db=new WeakMap,kb=new WeakMap,Ob=new WeakMap;function ES(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bS(t){return t.__v_skip||!Object.isExtensible(t)?0:ES(jC(t))}function Kn(t){return vi(t)?t:vh(t,!1,lS,vS,Sb)}function Ml(t){return vh(t,!1,uS,yS,Db)}function Mb(t){return vh(t,!0,cS,_S,kb)}function TZ(t){return vh(t,!0,hS,wS,Ob)}function vh(t,e,n,r,s){if(!Qe(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=s.get(t);if(i)return i;const o=bS(t);if(o===0)return t;const a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function ao(t){return vi(t)?ao(t.__v_raw):!!(t&&t.__v_isReactive)}function vi(t){return!!(t&&t.__v_isReadonly)}function gu(t){return!!(t&&t.__v_isShallow)}function Nb(t){return ao(t)||vi(t)}function Ve(t){const e=t&&t.__v_raw;return e?Ve(e):t}function Lb(t){return Object.isExtensible(t)&&du(t,"__v_skip",!0),t}const Za=t=>Qe(t)?Kn(t):t,lm=t=>Qe(t)?Mb(t):t;class xb{constructor(e,n,r,s){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ja(()=>e(this._value),()=>lo(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const e=Ve(this);return(!e._cacheable||e.effect.dirty)&&nr(e._value,e._value=e.effect.run())&&lo(e,4),cm(e),e.effect._dirtyLevel>=2&&lo(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function TS(t,e,n=!1){let r,s;const i=_e(t);return i?(r=t,s=an):(r=t.get,s=t.set),new xb(r,s,i||!s,n)}function cm(t){var e;As&&ui&&(t=Ve(t),bb(ui,(e=t.dep)!=null?e:t.dep=Ib(()=>t.dep=void 0,t instanceof xb?t:void 0)))}function lo(t,e=4,n){t=Ve(t);const r=t.dep;r&&Tb(r,e)}function dt(t){return!!(t&&t.__v_isRef===!0)}function He(t){return Vb(t,!1)}function el(t){return Vb(t,!0)}function Vb(t,e){return dt(t)?t:new IS(t,e)}class IS{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Ve(e),this._value=n?e:Za(e)}get value(){return cm(this),this._value}set value(e){const n=this.__v_isShallow||gu(e)||vi(e);e=n?e:Ve(e),nr(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:Za(e),lo(this,4))}}function IZ(t){lo(t,4)}function N(t){return dt(t)?t.value:t}function AZ(t){return _e(t)?t():N(t)}const AS={get:(t,e,n)=>N(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const s=t[e];return dt(s)&&!dt(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function $b(t){return ao(t)?t:new Proxy(t,AS)}class RS{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=e(()=>cm(this),()=>lo(this));this._get=n,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function PS(t){return new RS(t)}function CS(t){const e=he(t)?new Array(t.length):{};for(const n in t)e[n]=Fb(t,n);return e}class SS{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return sS(Ve(this._object),this._key)}}class DS{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function co(t,e,n){return dt(t)?t:_e(t)?new DS(t):Qe(t)&&arguments.length>1?Fb(t,e,n):He(t)}function Fb(t,e,n){const r=t[e];return dt(r)?r:new SS(t,e,n)}const RZ={GET:"get",HAS:"has",ITERATE:"iterate"},PZ={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/**
16* @vue/runtime-core v3.4.21
17* (c) 2018-present Yuxi (Evan) You and Vue contributors
18* @license MIT
19**/function CZ(t,e){}const SZ={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},kS={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Rs(t,e,n,r){try{return r?t(...r):t()}catch(s){Yo(s,e,n)}}function Un(t,e,n,r){if(_e(t)){const i=Rs(t,e,n,r);return i&&rm(i)&&i.catch(o=>{Yo(o,e,n)}),i}const s=[];for(let i=0;i<t.length;i++)s.push(Un(t[i],e,n,r));return s}function Yo(t,e,n,r=!0){const s=e?e.vnode:null;if(e){let i=e.parent;const o=e.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const c=i.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,o,a)===!1)return}i=i.parent}const l=e.appContext.config.errorHandler;if(l){Rs(l,null,10,[t,o,a]);return}}OS(t,n,s,r)}function OS(t,e,n,r=!0){console.error(t)}let tl=!1,Sd=!1;const Bt=[];let dr=0;const uo=[];let fs=null,ti=0;const Ub=Promise.resolve();let um=null;function kn(t){const e=um||Ub;return t?e.then(this?t.bind(this):t):e}function MS(t){let e=dr+1,n=Bt.length;for(;e<n;){const r=e+n>>>1,s=Bt[r],i=nl(s);i<t||i===t&&s.pre?e=r+1:n=r}return e}function yh(t){(!Bt.length||!Bt.includes(t,tl&&t.allowRecurse?dr+1:dr))&&(t.id==null?Bt.push(t):Bt.splice(MS(t.id),0,t),Bb())}function Bb(){!tl&&!Sd&&(Sd=!0,um=Ub.then(Hb))}function NS(t){const e=Bt.indexOf(t);e>dr&&Bt.splice(e,1)}function Dd(t){he(t)?uo.push(...t):(!fs||!fs.includes(t,t.allowRecurse?ti+1:ti))&&uo.push(t),Bb()}function Fv(t,e,n=tl?dr+1:0){for(;n<Bt.length;n++){const r=Bt[n];if(r&&r.pre){if(t&&r.id!==t.uid)continue;Bt.splice(n,1),n--,r()}}}function vu(t){if(uo.length){const e=[...new Set(uo)].sort((n,r)=>nl(n)-nl(r));if(uo.length=0,fs){fs.push(...e);return}for(fs=e,ti=0;ti<fs.length;ti++)fs[ti]();fs=null,ti=0}}const nl=t=>t.id==null?1/0:t.id,LS=(t,e)=>{const n=nl(t)-nl(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function Hb(t){Sd=!1,tl=!0,Bt.sort(LS);try{for(dr=0;dr<Bt.length;dr++){const e=Bt[dr];e&&e.active!==!1&&Rs(e,null,14)}}finally{dr=0,Bt.length=0,vu(),tl=!1,um=null,(Bt.length||uo.length)&&Hb()}}let Ki,Ec=[];function jb(t,e){var n,r;Ki=t,Ki?(Ki.enabled=!0,Ec.forEach(({event:s,args:i})=>Ki.emit(s,...i)),Ec=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{jb(i,e)}),setTimeout(()=>{Ki||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ec=[])},3e3)):Ec=[]}function xS(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||We;let s=n;const i=e.startsWith("update:"),o=i&&e.slice(7);if(o&&o in r){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:h,trim:f}=r[u]||We;f&&(s=n.map(d=>ct(d)?d.trim():d)),h&&(s=n.map(Xa))}let a,l=r[a=Kc(e)]||r[a=Kc(cn(e))];!l&&i&&(l=r[a=Kc(Dn(e))]),l&&Un(l,t,6,s);const c=r[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Un(c,t,6,s)}}function Wb(t,e,n=!1){const r=e.emitsCache,s=r.get(t);if(s!==void 0)return s;const i=t.emits;let o={},a=!1;if(!_e(t)){const l=c=>{const u=Wb(c,e,!0);u&&(a=!0,lt(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}
vendor: 5,967 bytes, line 19
19return!i&&!a?(Qe(t)&&r.set(t,null),null):(he(i)?i.forEach(l=>o[l]=null):lt(o,i),Qe(t)&&r.set(t,o),o)}function _h(t,e){return!t||!Ol(e)?!1:(e=e.slice(2).replace(/Once$/,""),$e(t,e[0].toLowerCase()+e.slice(1))||$e(t,Dn(e))||$e(t,e))}let Et=null,wh=null;function rl(t){const e=Et;return Et=t,wh=t&&t.type.__scopeId||null,e}function DZ(t){wh=t}function kZ(){wh=null}const OZ=t=>ht;function ht(t,e=Et,n){if(!e||t._n)return t;const r=(...s)=>{r._d&&ey(-1);const i=rl(e);let o;try{o=t(...s)}finally{rl(i),r._d&&ey(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function zc(t){const{type:e,vnode:n,proxy:r,withProxy:s,props:i,propsOptions:[o],slots:a,attrs:l,emit:c,render:u,renderCache:h,data:f,setupState:d,ctx:p,inheritAttrs:v}=t;let m,g;const E=rl(t);try{if(n.shapeFlag&4){const w=s||r,I=w;m=Sn(u.call(I,w,h,i,d,f,p)),g=l}else{const w=e;m=Sn(w.length>1?w(i,{attrs:l,slots:a,emit:c}):w(i,null)),g=e.props?l:$S(l)}}catch(w){xa.length=0,Yo(w,t,1),m=de(en)}let y=m;if(g&&v!==!1){const w=Object.keys(g),{shapeFlag:I}=y;w.length&&I&7&&(o&&w.some(tm)&&(g=FS(g,o)),y=Yr(y,g))}return n.dirs&&(y=Yr(y),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),m=y,rl(E),m}function VS(t,e=!0){let n;for(let r=0;r<t.length;r++){const s=t[r];if(_i(s)){if(s.type!==en||s.children==="v-if"){if(n)return;n=s}}else return}return n}const $S=t=>{let e;for(const n in t)(n==="class"||n==="style"||Ol(n))&&((e||(e={}))[n]=t[n]);return e},FS=(t,e)=>{const n={};for(const r in t)(!tm(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function US(t,e,n){const{props:r,children:s,component:i}=t,{props:o,children:a,patchFlag:l}=e,c=i.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Uv(r,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let h=0;h<u.length;h++){const f=u[h];if(o[f]!==r[f]&&!_h(c,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?Uv(r,o,c):!0:!!o;return!1}function Uv(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(e[i]!==t[i]&&!_h(n,i))return!0}return!1}function hm({vnode:t,parent:e},n){for(;e;){const r=e.subTree;if(r.suspense&&r.suspense.activeBranch===t&&(r.el=t.el),r===t)(t=e.vnode).el=n,e=e.parent;else break}}const fm="components",BS="directives";function xr(t,e){return pm(fm,t,!0,e)||t}const Yb=Symbol.for("v-ndc");function dm(t){return ct(t)?pm(fm,t,!1)||t:t||Yb}function HS(t){return pm(BS,t)}function pm(t,e,n=!0,r=!1){const s=Et||At;if(s){const i=s.type;if(t===fm){const a=Hd(i,!1);if(a&&(a===e||a===cn(e)||a===dh(cn(e))))return i}const o=Bv(s[t]||i[t],e)||Bv(s.appContext[t],e);return!o&&r?i:o}}function Bv(t,e){return t&&(t[e]||t[cn(e)]||t[dh(cn(e))])}const qb=t=>t.__isSuspense;let kd=0;const jS={name:"Suspense",__isSuspense:!0,process(t,e,n,r,s,i,o,a,l,c){if(t==null)WS(e,n,r,s,i,o,a,l,c);else{if(i&&i.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}YS(t,e,n,r,s,o,a,l,c)}},hydrate:qS,create:gm,normalize:KS},mm=jS;function sl(t,e){const n=t.props&&t.props[e];_e(n)&&n()}function WS(t,e,n,r,s,i,o,a,l){const{p:c,o:{createElement:u}}=l,h=u("div"),f=t.suspense=gm(t,s,r,e,h,n,i,o,a,l);c(null,f.pendingBranch=t.ssContent,h,null,r,f,i,o),f.deps>0?(sl(t,"onPending"),sl(t,"onFallback"),c(null,t.ssFallback,e,n,r,null,i,o),ho(f,t.ssFallback)):f.resolve(!1,!0)}function YS(t,e,n,r,s,i,o,a,{p:l,um:c,o:{createElement:u}}){const h=e.suspense=t.suspense;h.vnode=e,e.el=t.el;const f=e.ssContent,d=e.ssFallback,{activeBranch:p,pendingBranch:v,isInFallback:m,isHydrating:g}=h;if(v)h.pendingBranch=f,tr(f,v)?(l(v,f,h.hiddenContainer,null,s,h,i,o,a),h.deps<=0?h.resolve():m&&(g||(l(p,d,n,r,s,null,i,o,a),ho(h,d)))):(h.pendingId=kd++,g?(h.isHydrating=!1,h.activeBranch=v):c(v,s,h),h.deps=0,h.effects.length=0,h.hiddenContainer=u("div"),m?(l(null,f,h.hiddenContainer,null,s,h,i,o,a),h.deps<=0?h.resolve():(l(p,d,n,r,s,null,i,o,a),ho(h,d))):p&&tr(f,p)?(l(p,f,n,r,s,h,i,o,a),h.resolve(!0)):(l(null,f,h.hiddenContainer,null,s,h,i,o,a),h.deps<=0&&h.resolve()));else if(p&&tr(f,p))l(p,f,n,r,s,h,i,o,a),ho(h,f);else if(sl(e,"onPending"),h.pendingBranch=f,f.shapeFlag&512?h.pendingId=f.component.suspenseId:h.pendingId=kd++,l(null,f,h.hiddenContainer,null,s,h,i,o,a),h.deps<=0)h.resolve();else{const{timeout:E,pendingId:y}=h;E>0?setTimeout(()=>{h.pendingId===y&&h.fallback(d)},E):E===0&&h.fallback(d)}}function gm(t,e,n,r,s,i,o,a,l,c,u=!1){const{p:h,m:f,um:d,n:p,o:{parentNode:v,remove:m}}=c;let g;const E=zS(t);E&&e!=null&&e.pendingBranch&&(g=e.pendingId,e.deps++);const y=t.props?pu(t.props.timeout):void 0,w=i,I={vnode:t,parent:e,parentComponent:n,namespace:o,container:r,hiddenContainer:s,deps:0,pendingId:kd++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(A=!1,R=!1){const{vnode:P,activeBranch:C,pendingBranch:D,pendingId:$,effects:S,parentComponent:V,container:oe}=I;let J=!1;I.isHydrating?I.isHydrating=!1:A||(J=C&&D.transition&&D.transition.mode==="out-in",J&&(C.transition.afterLeave=()=>{$===I.pendingId&&(f(D,oe,i===w?p(C):i,0),Dd(S))}),C&&(v(C.el)!==I.hiddenContainer&&(i=p(C)),d(C,V,I,!0)),J||f(D,oe,i,0)),ho(I,D),I.pendingBranch=null,I.isInFallback=!1;let W=I.parent,se=!1;for(;W;){if(W.pendingBranch){W.effects.push(...S),se=!0;break}W=W.parent}!se&&!J&&Dd(S),I.effects=[],E&&e&&e.pendingBranch&&g===e.pendingId&&(e.deps--,e.deps===0&&!R&&e.resolve()),sl(P,"onResolve")},fallback(A){if(!I.pendingBranch)return;const{vnode:R,activeBranch:P,parentComponent:C,container:D,namespace:$}=I;sl(R,"onFallback");const S=p(P),V=()=>{I.isInFallback&&(h(null,A,D,S,C,null,$,a,l),ho(I,A))},oe=A.transition&&A.transition.mode==="out-in";oe&&(P.transition.afterLeave=V),I.isInFallback=!0,d(P,C,null,!0),oe||V()},move(A,R,P){I.activeBranch&&f(I.activeBranch,A,R,P),I.container=A},next(){return I.activeBranch&&p(I.activeBranch)},registerDep(A,R){const P=!!I.pendingBranch;P&&I.deps++;const C=A.vnode.el;
vendor: 9,180 bytes, line 19
19A.asyncDep.catch(D=>{Yo(D,A,0)}).then(D=>{if(A.isUnmounted||I.isUnmounted||I.pendingId!==A.suspenseId)return;A.asyncResolved=!0;const{vnode:$}=A;Ud(A,D,!1),C&&($.el=C);const S=!C&&A.subTree.el;R(A,$,v(C||A.subTree.el),C?null:p(A.subTree),I,o,l),S&&m(S),hm(A,$.el),P&&--I.deps===0&&I.resolve()})},unmount(A,R){I.isUnmounted=!0,I.activeBranch&&d(I.activeBranch,n,A,R),I.pendingBranch&&d(I.pendingBranch,n,A,R)}};return I}function qS(t,e,n,r,s,i,o,a,l){const c=e.suspense=gm(e,r,n,t.parentNode,document.createElement("div"),null,s,i,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,i,o);return c.deps===0&&c.resolve(!1,!0),u}function KS(t){const{shapeFlag:e,children:n}=t,r=e&32;t.ssContent=Hv(r?n.default:n),t.ssFallback=r?Hv(n.fallback):de(en)}function Hv(t){let e;if(_e(t)){const n=yi&&t._c;n&&(t._d=!1,ee()),t=t(),n&&(t._d=!0,e=ln,gT())}return he(t)&&(t=VS(t)),t=Sn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function Kb(t,e){e&&e.pendingBranch?he(t)?e.effects.push(...t):e.effects.push(t):Dd(t)}function ho(t,e){t.activeBranch=e;const{vnode:n,parentComponent:r}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,r&&r.subTree===n&&(r.vnode.el=s,hm(r,s))}function zS(t){var e;return((e=t.props)==null?void 0:e.suspensible)!=null&&t.props.suspensible!==!1}const GS=Symbol.for("v-scx"),QS=()=>bt(GS);function zb(t,e){return Nl(t,null,e)}function XS(t,e){return Nl(t,null,{flush:"post"})}function JS(t,e){return Nl(t,null,{flush:"sync"})}const bc={};function vt(t,e,n){return Nl(t,e,n)}function Nl(t,e,{immediate:n,deep:r,flush:s,once:i,onTrack:o,onTrigger:a}=We){if(e&&i){const A=e;e=(...R)=>{A(...R),I()}}const l=At,c=A=>r===!0?A:ri(A,r===!1?1:void 0);let u,h=!1,f=!1;if(dt(t)?(u=()=>t.value,h=gu(t)):ao(t)?(u=()=>c(t),h=!0):he(t)?(f=!0,h=t.some(A=>ao(A)||gu(A)),u=()=>t.map(A=>{if(dt(A))return A.value;if(ao(A))return c(A);if(_e(A))return Rs(A,l,2)})):_e(t)?e?u=()=>Rs(t,l,2):u=()=>(d&&d(),Un(t,l,3,[p])):u=an,e&&r){const A=u;u=()=>ri(A())}let d,p=A=>{d=y.onStop=()=>{Rs(A,l,4),d=y.onStop=void 0}},v;if($l)if(p=an,e?n&&Un(e,l,3,[u(),f?[]:void 0,p]):u(),s==="sync"){const A=QS();v=A.__watcherHandles||(A.__watcherHandles=[])}else return an;let m=f?new Array(t.length).fill(bc):bc;const g=()=>{if(!(!y.active||!y.dirty))if(e){const A=y.run();(r||h||(f?A.some((R,P)=>nr(R,m[P])):nr(A,m)))&&(d&&d(),Un(e,l,3,[A,m===bc?void 0:f&&m[0]===bc?[]:m,p]),m=A)}else y.run()};g.allowRecurse=!!e;let E;s==="sync"?E=g:s==="post"?E=()=>kt(g,l&&l.suspense):(g.pre=!0,l&&(g.id=l.uid),E=()=>yh(g));const y=new Ja(u,an,E),w=nS(),I=()=>{y.stop(),w&&nm(w.effects,y)};return e?n?g():m=y.run():s==="post"?kt(y.run.bind(y),l&&l.suspense):y.run(),v&&v.push(I),I}function ZS(t,e,n){const r=this.proxy,s=ct(t)?t.includes(".")?Gb(r,t):()=>r[t]:t.bind(r,r);let i;_e(e)?i=e:(i=e.handler,n=e);const o=wi(this),a=Nl(s,i.bind(r),n);return o(),a}function Gb(t,e){const n=e.split(".");return()=>{let r=t;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}function ri(t,e,n=0,r){if(!Qe(t)||t.__v_skip)return t;if(e&&e>0){if(n>=e)return t;n++}if(r=r||new Set,r.has(t))return t;if(r.add(t),dt(t))ri(t.value,e,n,r);else if(he(t))for(let s=0;s<t.length;s++)ri(t[s],e,n,r);else if(Mi(t)||ro(t))t.forEach(s=>{ri(s,e,n,r)});else if(pb(t))for(const s in t)ri(t[s],e,n,r);return t}function Qb(t,e){if(Et===null)return t;const n=Th(Et)||Et.proxy,r=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[i,o,a,l=We]=e[s];i&&(_e(i)&&(i={mounted:i,updated:i}),i.deep&&ri(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return t}function fr(t,e,n,r){const s=t.dirs,i=e&&e.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Ni(),Un(l,n,8,[t.el,a,t,e]),Li())}}const ds=Symbol("_leaveCb"),Tc=Symbol("_enterCb");function Xb(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Fs(()=>{t.isMounted=!0}),_m(()=>{t.isUnmounting=!0}),t}const Vn=[Function,Array],Jb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vn,onEnter:Vn,onAfterEnter:Vn,onEnterCancelled:Vn,onBeforeLeave:Vn,onLeave:Vn,onAfterLeave:Vn,onLeaveCancelled:Vn,onBeforeAppear:Vn,onAppear:Vn,onAfterAppear:Vn,onAppearCancelled:Vn},e1={name:"BaseTransition",props:Jb,setup(t,{slots:e}){const n=Zr(),r=Xb();return()=>{const s=e.default&&vm(e.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){for(const f of s)if(f.type!==en){i=f;break}}const o=Ve(t),{mode:a}=o;if(r.isLeaving)return If(i);const l=jv(i);if(!l)return If(i);const c=il(l,o,r,n);To(l,c);const u=n.subTree,h=u&&jv(u);if(h&&h.type!==en&&!tr(l,h)){const f=il(h,o,r,n);if(To(h,f),a==="out-in")return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},If(i);a==="in-out"&&l.type!==en&&(f.delayLeave=(d,p,v)=>{const m=Zb(r,h);m[String(h.key)]=h,d[ds]=()=>{p(),d[ds]=void 0,delete c.delayedLeave},c.delayedLeave=v})}return i}}},t1=e1;function Zb(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 il(t,e,n,r){const{appear:s,mode:i,persisted:o=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:h,onLeave:f,onAfterLeave:d,onLeaveCancelled:p,onBeforeAppear:v,onAppear:m,onAfterAppear:g,onAppearCancelled:E}=e,y=String(t.key),w=Zb(n,t),I=(P,C)=>{P&&Un(P,r,9,C)},A=(P,C)=>{const D=C[1];I(P,C),he(P)?P.every($=>$.length<=1)&&D():P.length<=1&&D()},R={mode:i,persisted:o,beforeEnter(P){let C=a;if(!n.isMounted)if(s)C=v||a;else return;P[ds]&&P[ds](!0);const D=w[y];D&&tr(t,D)&&D.el[ds]&&D.el[ds](),I(C,[P])},enter(P){let C=l,D=c,$=u;if(!n.isMounted)if(s)C=m||l,D=g||c,$=E||u;else return;let S=!1;const V=P[Tc]=oe=>{S||(S=!0,oe?I($,[P]):I(D,[P]),R.delayedLeave&&R.delayedLeave(),P[Tc]=void 0)};C?A(C,[P,V]):V()},leave(P,C){const D=String(t.key);if(P[Tc]&&P[Tc](!0),n.isUnmounting)return C();I(h,[P]);let $=!1;const S=P[ds]=V=>{$||($=!0,C(),V?I(p,[P]):I(d,[P]),P[ds]=void 0,w[D]===t&&delete w[D])};w[D]=t,f?A(f,[P,S]):S()},clone(P){return il(P,e,n,r)}};return R}function If(t){if(Ll(t))return t=Yr(t),t.children=null,t}function jv(t){return Ll(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 vm(t,e=!1,n){let r=[],s=0;for(let i=0;i<t.length;i++){let o=t[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Fe?(o.patchFlag&128&&s++,r=r.concat(vm(o.children,e,a))):(e||o.type!==en)&&r.push(a!=null?Yr(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function et(t,e){return _e(t)?lt({name:t.name},e,{setup:t}):t}const fi=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Wv(t){_e(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:r,delay:s=200,timeout:i,suspensible:o=!0,onError:a}=t;let l=null,c,u=0;const h=()=>(u++,l=null,f()),f=()=>{let d;return l||(d=l=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),a)return new Promise((v,m)=>{a(p,()=>v(h()),()=>m(p),u+1)});throw p}).then(p=>d!==l&&l?l:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),c=p,p)))};return et({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const d=At;if(c)return()=>Af(c,d);const p=E=>{l=null,Yo(E,d,13,!r)};if(o&&d.suspense||$l)return f().then(E=>()=>Af(E,d)).catch(E=>(p(E),()=>r?de(r,{error:E}):null));const v=He(!1),m=He(),g=He(!!s);return s&&setTimeout(()=>{g.value=!1},s),i!=null&&setTimeout(()=>{if(!v.value&&!m.value){const E=new Error(`Async component timed out after ${i}ms.`);p(E),m.value=E}},i),f().then(()=>{v.value=!0,d.parent&&Ll(d.parent.vnode)&&(d.parent.effect.dirty=!0,yh(d.parent.update))}).catch(E=>{p(E),m.value=E}),()=>{if(v.value&&c)return Af(c,d);if(m.value&&r)return de(r,{error:m.value});if(n&&!g.value)return de(n)}}})}function Af(t,e){const{ref:n,props:r,children:s,ce:i}=e.vnode,o=de(t,r,s);return o.ref=n,o.ce=i,delete e.vnode.ce,o}const Ll=t=>t.type.__isKeepAlive,n1={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=Zr(),r=n.ctx;if(!r.renderer)return()=>{const E=e.default&&e.default();return E&&E.length===1?E[0]:E};const s=new Map,i=new Set;let o=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:h}}}=r,f=h("div");r.activate=(E,y,w,I,A)=>{const R=E.component;c(E,y,w,0,a),l(R.vnode,E,y,w,R,a,I,E.slotScopeIds,A),kt(()=>{R.isDeactivated=!1,R.a&&io(R.a);const P=E.props&&E.props.onVnodeMounted;P&&rn(P,R.parent,E)},a)},r.deactivate=E=>{const y=E.component;c(E,f,null,1,a),kt(()=>{y.da&&io(y.da);const w=E.props&&E.props.onVnodeUnmounted;w&&rn(w,y.parent,E),y.isDeactivated=!0},a)};function d(E){Rf(E),u(E,n,a,!0)}function p(E){s.forEach((y,w)=>{const I=Hd(y.type);I&&(!E||!E(I))&&v(w)})}function v(E){const y=s.get(E);!o||!tr(y,o)?d(y):o&&Rf(o),s.delete(E),i.delete(E)}vt(()=>[t.include,t.exclude],([E,y])=>{E&&p(w=>Ta(E,w)),y&&p(w=>!Ta(y,w))},{flush:"post",deep:!0});let m=null;const g=()=>{m!=null&&s.set(m,Pf(n.subTree))};return Fs(g),ym(g),_m(()=>
vendor: 30,218 bytes, line 19
19{s.forEach(E=>{const{subTree:y,suspense:w}=n,I=Pf(y);if(E.type===I.type&&E.key===I.key){Rf(I);const A=I.component.da;A&&kt(A,w);return}d(E)})}),()=>{if(m=null,!e.default)return null;const E=e.default(),y=E[0];if(E.length>1)return o=null,E;if(!_i(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let w=Pf(y);const I=w.type,A=Hd(fi(w)?w.type.__asyncResolved||{}:I),{include:R,exclude:P,max:C}=t;if(R&&(!A||!Ta(R,A))||P&&A&&Ta(P,A))return o=w,y;const D=w.key==null?I:w.key,$=s.get(D);return w.el&&(w=Yr(w),y.shapeFlag&128&&(y.ssContent=w)),m=D,$?(w.el=$.el,w.component=$.component,w.transition&&To(w,w.transition),w.shapeFlag|=512,i.delete(D),i.add(D)):(i.add(D),C&&i.size>parseInt(C,10)&&v(i.values().next().value)),w.shapeFlag|=256,o=w,qb(y.type)?y:w}}},r1=n1;function Ta(t,e){return he(t)?t.some(n=>Ta(n,e)):ct(t)?t.split(",").includes(e):HC(t)?t.test(e):!1}function s1(t,e){eT(t,"a",e)}function i1(t,e){eT(t,"da",e)}function eT(t,e,n=At){const r=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Eh(e,r,n),n){let s=n.parent;for(;s&&s.parent;)Ll(s.parent.vnode)&&o1(r,e,n,s),s=s.parent}}function o1(t,e,n,r){const s=Eh(e,t,r,!0);qo(()=>{nm(r[e],s)},n)}function Rf(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Pf(t){return t.shapeFlag&128?t.ssContent:t}function Eh(t,e,n=At,r=!1){if(n){const s=n[t]||(n[t]=[]),i=e.__weh||(e.__weh=(...o)=>{if(n.isUnmounted)return;Ni();const a=wi(n),l=Un(e,n,t,o);return a(),Li(),l});return r?s.unshift(i):s.push(i),i}}const Jr=t=>(e,n=At)=>(!$l||t==="sp")&&Eh(t,(...r)=>e(...r),n),a1=Jr("bm"),Fs=Jr("m"),l1=Jr("bu"),ym=Jr("u"),_m=Jr("bum"),qo=Jr("um"),c1=Jr("sp"),u1=Jr("rtg"),h1=Jr("rtc");function tT(t,e=At){Eh("ec",t,e)}function Bn(t,e,n,r){let s;const i=n&&n[r];if(he(t)||ct(t)){s=new Array(t.length);for(let o=0,a=t.length;o<a;o++)s[o]=e(t[o],o,void 0,i&&i[o])}else if(typeof t=="number"){s=new Array(t);for(let o=0;o<t;o++)s[o]=e(o+1,o,void 0,i&&i[o])}else if(Qe(t))if(t[Symbol.iterator])s=Array.from(t,(o,a)=>e(o,a,void 0,i&&i[a]));else{const o=Object.keys(t);s=new Array(o.length);for(let a=0,l=o.length;a<l;a++){const c=o[a];s[a]=e(t[c],c,a,i&&i[a])}}else s=[];return n&&(n[r]=s),s}function MZ(t,e){for(let n=0;n<e.length;n++){const r=e[n];if(he(r))for(let s=0;s<r.length;s++)t[r[s].name]=r[s].fn;else r&&(t[r.name]=r.key?(...s)=>{const i=r.fn(...s);return i&&(i.key=r.key),i}:r.fn)}return t}function xl(t,e,n={},r,s){if(Et.isCE||Et.parent&&fi(Et.parent)&&Et.parent.isCE)return e!=="default"&&(n.name=e),de("slot",n,r&&r());let i=t[e];i&&i._c&&(i._d=!1),ee();const o=i&&nT(i(n)),a=at(Fe,{key:n.key||o&&o.key||`_${e}`},o||(r?r():[]),o&&t._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function nT(t){return t.some(e=>_i(e)?!(e.type===en||e.type===Fe&&!nT(e.children)):!0)?t:null}function f1(t,e){const n={};for(const r in t)n[e&&/[A-Z]/.test(r)?`on:${r}`:Kc(r)]=t[r];return n}const Od=t=>t?wT(t)?Th(t)||t.proxy:Od(t.parent):null,Na=lt(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=>Od(t.parent),$root:t=>Od(t.root),$emit:t=>t.emit,$options:t=>wm(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,yh(t.update)}),$nextTick:t=>t.n||(t.n=kn.bind(t.proxy)),$watch:t=>ZS.bind(t)}),Cf=(t,e)=>t!==We&&!t.__isScriptSetup&&$e(t,e),Md={get({_:t},e){const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return r[e];case 2:return s[e];case 4:return n[e];case 3:return i[e]}else{if(Cf(r,e))return o[e]=1,r[e];if(s!==We&&$e(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&$e(c,e))return o[e]=3,i[e];if(n!==We&&$e(n,e))return o[e]=4,n[e];Nd&&(o[e]=0)}}const u=Na[e];let h,f;if(u)return e==="$attrs"&&fn(t,"get",e),u(t);if((h=a.__cssModules)&&(h=h[e]))return h;if(n!==We&&$e(n,e))return o[e]=4,n[e];if(f=l.config.globalProperties,$e(f,e))return f[e]},set({_:t},e,n){const{data:r,setupState:s,ctx:i}=t;return Cf(s,e)?(s[e]=n,!0):r!==We&&$e(r,e)?(r[e]=n,!0):$e(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!n[o]||t!==We&&$e(t,o)||Cf(e,o)||(a=i[0])&&$e(a,o)||$e(r,o)||$e(Na,o)||$e(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:$e(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},d1=lt({},Md,{get(t,e){if(e!==Symbol.unscopables)return Md.get(t,e,t)},has(t,e){return e[0]!=="_"&&!KC(e)}});function NZ(){return null}function LZ(){return null}function xZ(t){}function VZ(t){}function $Z(){return null}function FZ(){}function UZ(t,e){return null}function BZ(){return rT().slots}function HZ(){return rT().attrs}function rT(){const t=Zr();return t.setupContext||(t.setupContext=TT(t))}function ol(t){return he(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function jZ(t,e){const n=ol(t);for(const r in e){if(r.startsWith("__skip"))continue;let s=n[r];s?he(s)||_e(s)?s=n[r]={type:s,default:e[r]}:s.default=e[r]:s===null&&(s=n[r]={default:e[r]}),s&&e[`__skip_${r}`]&&(s.skipFactory=!0)}return n}function WZ(t,e){return!t||!e?t||e:he(t)&&he(e)?t.concat(e):lt({},ol(t),ol(e))}function YZ(t,e){const n={};for(const r in t)e.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>t[r]});return n}function qZ(t){const e=Zr();let n=t();return Fd(),rm(n)&&(n=n.catch(r=>{throw wi(e),r})),[n,()=>wi(e)]}let Nd=!0;function p1(t){const e=wm(t),n=t.proxy,r=t.ctx;Nd=!1,e.beforeCreate&&Yv(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:f,beforeUpdate:d,updated:p,activated:v,deactivated:m,beforeDestroy:g,beforeUnmount:E,destroyed:y,unmounted:w,render:I,renderTracked:A,renderTriggered:R,errorCaptured:P,serverPrefetch:C,expose:D,inheritAttrs:$,components:S,directives:V,filters:oe}=e;if(c&&m1(c,r,null),o)for(const se in o){const Z=o[se];_e(Z)&&(r[se]=Z.bind(n))}if(s){const se=s.call(n,n);Qe(se)&&(t.data=Kn(se))}if(Nd=!0,i)for(const se in i){const Z=i[se],De=_e(Z)?Z.bind(n,n):_e(Z.get)?Z.get.bind(n,n):an,Y=!_e(Z)&&_e(Z.set)?Z.set.bind(n):an,we=L({get:De,set:Y});Object.defineProperty(r,se,{enumerable:!0,configurable:!0,get:()=>we.value,set:ae=>we.value=ae})}if(a)for(const se in a)sT(a[se],r,n,se);if(l){const se=_e(l)?l.call(n):l;Reflect.ownKeys(se).forEach(Z=>{Hn(Z,se[Z])})}u&&Yv(u,t,"c");function W(se,Z){he(Z)?Z.forEach(De=>se(De.bind(n))):Z&&se(Z.bind(n))}if(W(a1,h),W(Fs,f),W(l1,d),W(ym,p),W(s1,v),W(i1,m),W(tT,P),W(h1,A),W(u1,R),W(_m,E),W(qo,w),W(c1,C),he(D))if(D.length){const se=t.exposed||(t.exposed={});D.forEach(Z=>{Object.defineProperty(se,Z,{get:()=>n[Z],set:De=>n[Z]=De})})}else t.exposed||(t.exposed={});I&&t.render===an&&(t.render=I),$!=null&&(t.inheritAttrs=$),S&&(t.components=S),V&&(t.directives=V)}function m1(t,e,n=an){he(t)&&(t=Ld(t));for(const r in t){const s=t[r];let i;Qe(s)?"default"in s?i=bt(s.from||r,s.default,!0):i=bt(s.from||r):i=bt(s),dt(i)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):e[r]=i}}function Yv(t,e,n){Un(he(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function sT(t,e,n,r){const s=r.includes(".")?Gb(n,r):()=>n[r];if(ct(t)){const i=e[t];_e(i)&&vt(s,i)}else if(_e(t))vt(s,t.bind(n));else if(Qe(t))if(he(t))t.forEach(i=>sT(i,e,n,r));else{const i=_e(t.handler)?t.handler.bind(n):e[t.handler];_e(i)&&vt(s,i,t)}}function wm(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=t.appContext,a=i.get(e);let l;return a?l=a:!s.length&&!n&&!r?l=e:(l={},s.length&&s.forEach(c=>yu(l,c,o,!0)),yu(l,e,o)),Qe(e)&&i.set(e,l),l}function yu(t,e,n,r=!1){const{mixins:s,extends:i}=e;i&&yu(t,i,n,!0),s&&s.forEach(o=>yu(t,o,n,!0));for(const o in e)if(!(r&&o==="expose")){const a=g1[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const g1={data:qv,props:Kv,emits:Kv,methods:Ia,computed:Ia,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:Ia,directives:Ia,watch:y1,provide:qv,inject:v1};function qv(t,e){return e?t?function(){return lt(_e(t)?t.call(this,this):t,_e(e)?e.call(this,this):e)}:e:t}function v1(t,e){return Ia(Ld(t),Ld(e))}function Ld(t){if(he(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Gt(t,e){return t?[...new Set([].concat(t,e))]:e}function Ia(t,e){return t?lt(Object.create(null),t,e):e}function Kv(t,e){return t?he(t)&&he(e)?[...new Set([...t,...e])]:lt(Object.create(null),ol(t),ol(e??{})):e}function y1(t,e){if(!t)return e;if(!e)return t;const n=lt(Object.create(null),t);for(const r in e)n[r]=Gt(t[r],e[r]);return n}function iT(){return{app:null,config:{isNativeTag:UC,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 _1=0;function w1(t,e){return function(r,s=null){_e(r)||(r=lt({},r)),s!=null&&!Qe(s)&&(s=null);const i=iT(),o=new WeakSet;let a=!1;const l=i.app={_uid:_1++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:IT,get config(){return i.config},set config(c){},use(c,...u){return o.has(c)||(c&&_e(c.install)?(o.add(c),c.install(l,...u)):_e(c)&&(o.add(c),c(l,...u))),l},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),l},component(c,u){return u?(i.components[c]=u,l):i.components[c]},directive(c,u){return u?(i.directives[c]=u,l):i.directives[c]},mount(c,u,h){if(!a){const f=de(r,s);return f.appContext=i,h===!0?h="svg":h===!1&&(h=void 0),u&&e?e(f,c):t(f,c,h),a=!0,l._container=c,c.__vue_app__=l,Th(f.component)||f.component.proxy}},unmount(){a&&(t(null,l._container),delete l._container.__vue_app__)},provide(c,u){return i.provides[c]=u,l},runWithContext(c){const u=fo;fo=l;try{return c()}finally{fo=u}}};return l}}let fo=null;function Hn(t,e){if(At){let n=At.provides;const r=At.parent&&At.parent.provides;r===n&&(n=At.provides=Object.create(r)),n[t]=e}}function bt(t,e,n=!1){const r=At||Et;if(r||fo){const s=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:fo._context.provides;if(s&&t in s)return s[t];if(arguments.length>1)return n&&_e(e)?e.call(r&&r.proxy):e}}function oT(){return!!(At||Et||fo)}function E1(t,e,n,r=!1){const s={},i={};du(i,bh,1),t.propsDefaults=Object.create(null),aT(t,e,s,i);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=r?s:Ml(s):t.type.props?t.props=s:t.props=i,t.attrs=i}function b1(t,e,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=t,a=Ve(s),[l]=t.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let h=0;h<u.length;h++){let f=u[h];if(_h(t.emitsOptions,f))continue;const d=e[f];if(l)if($e(i,f))d!==i[f]&&(i[f]=d,c=!0);else{const p=cn(f);s[p]=xd(l,a,p,d,t,!1)}else d!==i[f]&&(i[f]=d,c=!0)}}}else{aT(t,e,s,i)&&(c=!0);let u;for(const h in a)(!e||!$e(e,h)&&((u=Dn(h))===h||!$e(e,u)))&&(l?n&&(n[h]!==void 0||n[u]!==void 0)&&(s[h]=xd(l,a,h,void 0,t,!0)):delete s[h]);if(i!==a)for(const h in i)(!e||!$e(e,h))&&(delete i[h],c=!0)}c&&Wr(t,"set","$attrs")}function aT(t,e,n,r){const[s,i]=t.propsOptions;let o=!1,a;if(e)for(let l in e){if(so(l))continue;const c=e[l];let u;s&&$e(s,u=cn(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:_h(t.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,o=!0)}if(i){const l=Ve(n),c=a||We;for(let u=0;u<i.length;u++){const h=i[u];n[h]=xd(s,l,h,c[h],t,!$e(c,h))}}return o}function xd(t,e,n,r,s,i){const o=t[n];if(o!=null){const a=$e(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&_e(l)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=wi(s);r=c[n]=l.call(null,e),u()}}else r=l}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===Dn(n))&&(r=!0))}return r}function lT(t,e,n=!1){const r=e.propsCache,s=r.get(t);if(s)return s;const i=t.props,o={},a=[];let l=!1;if(!_e(t)){const u=h=>{l=!0;const[f,d]=lT(h,e,!0);lt(o,f),d&&a.push(...d)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!i&&!l)return Qe(t)&&r.set(t,no),no;if(he(i))for(let u=0;u<i.length;u++){const h=cn(i[u]);zv(h)&&(o[h]=We)}else if(i)for(const u in i){const h=cn(u);if(zv(h)){const f=i[u],d=o[h]=he(f)||_e(f)?{type:f}:lt({},f);if(d){const p=Xv(Boolean,d.type),v=Xv(String,d.type);d[0]=p>-1,d[1]=v<0||p<v,(p>-1||$e(d,"default"))&&a.push(h)}}}const c=[o,a];return Qe(t)&&r.set(t,c),c}function zv(t){return t[0]!=="$"&&!so(t)}function Gv(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function Qv(t,e){return Gv(t)===Gv(e)}function Xv(t,e){return he(e)?e.findIndex(n=>Qv(n,t)):_e(e)&&Qv(e,t)?0:-1}const cT=t=>t[0]==="_"||t==="$stable",Em=t=>he(t)?t.map(Sn):[Sn(t)],T1=(t,e,n)=>{if(e._n)return e;const r=ht((...s)=>Em(e(...s)),n);return r._c=!1,r},uT=(t,e,n)=>{const r=t._ctx;for(const s in t){if(cT(s))continue;const i=t[s];if(_e(i))e[s]=T1(s,i,r);else if(i!=null){const o=Em(i);e[s]=()=>o}}},hT=(t,e)=>{const n=Em(e);t.slots.default=()=>n},I1=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=Ve(e),du(e,"_",n)):uT(e,t.slots={})}else t.slots={},e&&hT(t,e);du(t.slots,bh,1)},A1=(t,e,n)=>{const{vnode:r,slots:s}=t;let i=!0,o=We;if(r.shapeFlag&32){const a=e._;a?n&&a===1?i=!1:(lt(s,e),!n&&a===1&&delete s._):(i=!e.$stable,uT(e,s)),o=e}else e&&(hT(t,e),o={default:1});if(i)for(const a in s)!cT(a)&&o[a]==null&&delete s[a]};function _u(t,e,n,r,s=!1){if(he(t)){t.forEach((f,d)=>_u(f,e&&(he(e)?e[d]:e),n,r,s));return}if(fi(r)&&!s)return;const i=r.shapeFlag&4?Th(r.component)||r.component.proxy:r.el,o=s?null:i,{i:a,r:l}=t,c=e&&e.r,u=a.refs===We?a.refs={}:a.refs,h=a.setupState;if(c!=null&&c!==l&&(ct(c)?(u[c]=null,$e(h,c)&&(h[c]=null)):dt(c)&&(c.value=null)),_e(l))Rs(l,a,12,[o,u]);else{const f=ct(l),d=dt(l);if(f||d){const p=()=>{if(t.f){const v=f?$e(h,l)?h[l]:u[l]:l.value;s?he(v)&&nm(v,i):he(v)?v.includes(i)||v.push(i):f?(u[l]=[i],$e(h,l)&&(h[l]=u[l])):(l.value=[i],t.k&&(u[t.k]=l.value))}else f?(u[l]=o,$e(h,l)&&(h[l]=o)):d&&(l.value=o,t.k&&(u[t.k]=o))};o?(p.id=-1,kt(p,n)):p()}}}let is=!1;const R1=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",P1=t=>t.namespaceURI.includes("MathML"),Ic=t=>{if(R1(t))return"svg";if(P1(t))return"mathml"},Ac=t=>t.nodeType===8;function C1(t){const{mt:e,p:n,o:{patchProp:r,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:c}}=t,u=(y,w)=>{if(!w.hasChildNodes()){n(null,y,w),vu(),w._vnode=y;return}is=!1,h(w.firstChild,y,null,null,null),vu(),w._vnode=y,is&&console.error("Hydration completed but contains mismatches.")},h=(y,w,I,A,R,P=!1)=>{const C=Ac(y)&&y.data==="[",D=()=>v(y,w,I,A,R,C),{type:$,ref:S,shapeFlag:V,patchFlag:oe}=w;let J=y.nodeType;w.el=y,oe===-2&&(P=!1,w.dynamicChildren=null);let W=null;switch($){case Io:J!==3?w.children===""?(l(w.el=s(""),o(y),y),W=y):W=D():(y.data!==w.children&&(is=!0,y.data=w.children),W=i(y));break;case en:E(y)?(W=i(y),g(w.el=y.content.firstChild,y,I)):J!==8||C?W=D():W=i(y);break;case po:if(C&&(y=i(y),J=y.nodeType),J===1||J===3){W=y;const se=!w.children.length;for(let Z=0;Z<w.staticCount;Z++)se&&(w.children+=W.nodeType===1?W.outerHTML:W.data),Z===w.staticCount-1&&(w.anchor=W),W=i(W);return C?i(W):W}else D();break;case Fe:C?W=p(y,w,I,A,R,P):W=D();break;default:if(V&1)(J!==1||w.type.toLowerCase()!==y.tagName.toLowerCase())&&!E(y)?W=D():W=f(y,w,I,A,R,P);else if(V&6){w.slotScopeIds=R;const se=o(y);if(C?W=m(y):Ac(y)&&y.data==="teleport start"?W=m(y,y.data,"teleport end"):W=i(y),e(w,se,null,I,A,Ic(se),P),fi(w)){let Z;C?(Z=de(Fe),Z.anchor=W?W.previousSibling:se.lastChild):Z=y.nodeType===3?Vl(""):de("div"),Z.el=y,w.component.subTree=Z}}else V&64?J!==8?W=D():W=w.type.hydrate(y,w,I,A,R,P,t,d):V&128&&(W=w.type.hydrate(y,w,I,A,Ic(o(y)),R,P,t,h))}return S!=null&&_u(S,null,A,w),W},f=(y,w,I,A,R,P)=>{P=P||!!w.dynamicChildren;const{type:C,props:D,patchFlag:$,shapeFlag:S,dirs:V,transition:oe}=w,J=C==="input"||C==="option";if(J||$!==-1){V&&fr(w,null,I,"created");let W=!1;if(E(y)){W=dT(A,oe)&&I&&I.vnode.props&&I.vnode.props.appear;const Z=y.content.firstChild;W&&oe.beforeEnter(Z),g(Z,y,I),w.el=y=Z}if(S&16&&!(D&&(D.innerHTML||D.textContent))){let Z=d(y.firstChild,w,y,I,A,R,P);for(;Z;){is=!0;const De=Z;Z=Z.nextSibling,a(De)}}else S&8&&y.textContent!==w.children&&(is=!0,y.textContent=w.children);if(D)if(J||!P||$&48)for(const Z in D)(J&&(Z.endsWith("value")||Z==="indeterminate")||Ol(Z)&&!so(Z)||Z[0]===".")&&r(y,Z,null,D[Z],void 0,void 0,I);else D.onClick&&r(y,"onClick",null,D.onClick,void 0,void 0,I);let se;(se=D&&D.onVnodeBeforeMount)&&rn(se,I,w),V&&fr(w,null,I,"beforeMount"),((se=D&&D.onVnodeMounted)||V||W)&&Kb(()=>{se&&rn(se,I,w),W&&oe.enter(y),V&&fr(w,null,I,"mounted")},A)}return y.nextSibling},d=(y,w,I,A,R,P,C)=>{C=C||!!w.dynamicChildren;const D=w.children,$=D.length;for(let S=0;S<$;S++){const V=C?D[S]:D[S]=Sn(D[S]);if(y)y=h(y,V,A,R,P,C);else{if(V.type===Io&&!V.children)continue;is=!0,n(null,V,I,null,A,R,Ic(I),P)}}return y},p=(y,w,I,A,R,P)=>{const{slotScopeIds:C}=w;C&&(R=R?R.concat(C):C);const D=o(y),$=d(i(y),w,D,I,A,R,P);return $&&Ac($)&&$.data==="]"?i(w.anchor=$):(is=!0,l(w.anchor=c("]"),D,$),$)},v=(y,w,I,A,R,P)=>{if(is=!0,w.el=null,P){const $=m(y);for(;;){const S=i(y);if(S&&S!==$)a(S);else break}}const C=i(y),D=o(y);return a(y),n(null,w,D,C,I,A,Ic(D),R),C},m=(y,w="[",I="]")=>{let A=0;for(;y;)if(y=i(y),y&&Ac(y)&&(y.data===w&&A++,y.data===I)){if(A===0)return i(y);A--}return y},g=(y,w,I)=>{const A=w.parentNode;A&&A.replaceChild(y,w);let R=I;for(;R;)R.vnode.el===w&&(R.vnode.el=R.subTree.el=y),R=R.parent},E=y=>y.nodeType===1&&y.tagName.toLowerCase()==="template";return[u,h]}const kt=Kb;function S1(t){return fT(t)}function D1(t){return fT(t,C1)}function fT(t,e){const n=mb();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:f,setScopeId:d=an,insertStaticContent:p}=t,v=(_,b,k,x=null,M=null,K=null,X=void 0,q=null,Q=!!b.dynamicChildren)=>{if(_===b)return;_&&!tr(_,b)&&(x=O(_),ae(_,M,K,!0),_=null),b.patchFlag===-2&&(Q=!1,b.dynamicChildren=null);const{type:j,ref:te,shapeFlag:fe}=b;switch(j){case Io:m(_,b,k,x);break;case en:g(_,b,k,x);break;case po:_==null&&E(b,k,x,X);break;case Fe:S(_,b,k,x,M,K,X,q,Q);break;default:fe&1?I(_,b,k,x,M,K,X,q,Q):fe&6?V(_,b,k,x,M,K,X,q,Q):(fe&64||fe&128)&&j.process(_,b,k,x,M,K,X,q,Q,le)}te!=null&&M&&_u(te,_&&_.ref,K,b||_,!b)},m=(_,b,k,x)=>{if(_==null)r(b.el=a(b.children),k,x);else{const M=b.el=_.el;b.children!==_.children&&c(M,b.children)}},g=(_,b,k,x)=>{_==null?r(b.el=l(b.children||""),k,x):b.el=_.el},E=(_,b,k,x)=>{[_.el,_.anchor]=p(_.children,b,k,x,_.el,_.anchor)},y=({el:_,anchor:b},k,x)=>{let M;for(;_&&_!==b;)M=f(_),r(_,k,x),_=M;r(b,k,x)},w=({el:_,anchor:b})=>{let k;for(;_&&_!==b;)k=f(_),s(_),_=k;s(b)},I=(_,b,k,x,M,K,X,q,Q)=>{b.type==="svg"?X="svg":b.type==="math"&&(X="mathml"),_==null?A(b,k,x,M,K,X,q,Q):C(_,b,M,K,X,q,Q)},A=(_,b,k,x,M,K,X,q)=>{let Q,j;const{props:te,shapeFlag:fe,transition:ue,dirs:ge}=_;if(Q=_.el=o(_.type,K,te&&te.is,te),fe&8?u(Q,_.children):fe&16&&P(_.children,Q,null,x,M,Sf(_,K),X,q),ge&&fr(_,null,x,"created"),R(Q,_,_.scopeId,X,x),te){for(const Me in te)Me!=="value"&&!so(Me)&&i(Q,Me,null,te[Me],K,_.children,x,M,ke);"value"in te&&i(Q,"value",null,te.value,K),(j=te.onVnodeBeforeMount)&&rn(j,x,_)}ge&&fr(_,null,x,"beforeMount");const Ie=dT(M,ue);Ie&&ue.beforeEnter(Q),r(Q,b,k),((j=te&&te.onVnodeMounted)||Ie||ge)&&kt(()=>{j&&rn(j,x,_),Ie&&ue.enter(Q),ge&&fr(_,null,x,"mounted")},M)},R=(_,b,k,x,M)=>{if(k&&d(_,k),x)for(let K=0;K<x.length;K++)d(_,x[K]);if(M){let K=M.subTree;if(b===K){const X=M.vnode;R(_,X,X.scopeId,X.slotScopeIds,M.parent)}}},P=(_,b,k,x,M,K,X,q,Q=0)=>{for(let j=Q;j<_.length;j++){const te=_[j]=q?ps(_[j]):Sn(_[j]);v(null,te,b,k,x,M,K,X,q)}},C=(_,b,k,x,M,K,X)=>{const q=b.el=_.el;let{patchFlag:Q,dynamicChildren:j,dirs:te}=b;Q|=_.patchFlag&16;const fe=_.props||We,ue=b.props||We;let ge;if(k&&zs(k,!1),(ge=ue.onVnodeBeforeUpdate)&&rn(ge,k,b,_),te&&fr(b,_,k,"beforeUpdate"),k&&zs(k,!0),j?D(_.dynamicChildren,j,q,k,x,Sf(b,M),K):X||Z(_,b,q,null,k,x,Sf(b,M),K,!1),Q>0){if(Q&16)$(q,b,fe,ue,k,x,M);else if(Q&2&&fe.class!==ue.class&&i(q,"class",null,ue.class,M),Q&4&&i(q,"style",fe.style,ue.style,M),Q&8){const Ie=b.dynamicProps;for(let Me=0;Me<Ie.length;Me++){const Ke=Ie[Me],ot=fe[Ke],qt=ue[Ke];(qt!==ot||Ke==="value")&&i(q,Ke,ot,qt,M,_.children,k,x,ke)}}Q&1&&_.children!==b.children&&u(q,b.children)}else!X&&j==null&&$(q,b,fe,ue,k,x,M);((ge=ue.onVnodeUpdated)||te)&&kt(()=>{ge&&rn(ge,k,b,_),te&&fr(b,_,k,"updated")},x)},D=(_,b,k,x,M,K,X)=>{for(let q=0;q<b.length;q++){const Q=_[q],j=b[q],te=Q.el&&(Q.type===Fe||!tr(Q,j)||Q.shapeFlag&70)?h(Q.el):k;v(Q,j,te,null,x,M,K,X,!0)}},$=(_,b,k,x,M,K,X)=>{if(k!==x){if(k!==We)for(const q in k)!so(q)&&!(q in x)&&i(_,q,k[q],null,X,b.children,M,K,ke);for(const q in x){if(so(q))continue;const Q=x[q],j=k[q];Q!==j&&q!=="value"&&i(_,q,j,Q,X,b.children,M,K,ke)}"value"in x&&i(_,"value",k.value,x.value,X)}},S=(_,b,k,x,M,K,X,q,Q)=>{const j=b.el=_?_.el:a(""),te=b.anchor=_?_.anchor:a("");let{patchFlag:fe,dynamicChildren:ue,slotScopeIds:ge}=b;ge&&(q=q?q.concat(ge):ge),_==null?(r(j,k,x),r(te,k,x),P(b.children||[],k,te,M,K,X,q,Q)):fe>0&&fe&64&&ue&&_.dynamicChildren?(D(_.dynamicChildren,ue,k,M,K,X,q),(b.key!=null||M&&b===M.subTree)&&bm(_,b,!0)):Z(_,b,k,te,M,K,X,q,Q)},V=(_,b,k,x,M,K,X,q,Q)=>{b.slotScopeIds=q,_==null?b.shapeFlag&512?M.ctx.activate(b,k,x,X,Q):oe(b,k,x,M,K,X,Q):J(_,b,Q)},oe=(_,b,k,x,M,K,X)=>{const q=_.component=_T(_,x,M);if(Ll(_)&&(q.ctx.renderer=le),ET(q),q.asyncDep){if(M&&M.registerDep(q,W),!_.el){const Q=q.subTree=de(en);g(null,Q,b,k)}}else W(q,_,b,k,M,K,X)},J=(_,b,k)=>{const x=b.component=_.component;if(US(_,b,k))if(x.asyncDep&&!x.asyncResolved){se(x,b,k);return}else x.next=b,NS(x.update),x.effect.dirty=!0,x.update();else b.el=_.el,x.vnode=b},W=(_,b,k,x,M,K,X)=>{const q=()=>{if(_.isMounted){let{next:te,bu:fe,u:ue,parent:ge,vnode:Ie}=_;{const Zn=pT(_);if(Zn){te&&(te.el=Ie.el,se(_,te,X)),Zn.asyncDep.then(()=>{_.isUnmounted||q()});return}}let Me=te,Ke;zs(_,!1),te?(te.el=Ie.el,se(_,te,X)):te=Ie,fe&&io(fe),(Ke=te.props&&te.props.onVnodeBeforeUpdate)&&rn(Ke,ge,te,Ie),zs(_,!0);const ot=zc(_),qt=_.subTree;_.subTree=ot,v(qt,ot,h(qt.el),O(qt),_,M,K),te.el=ot.el,Me===null&&hm(_,ot.el),ue&&kt(ue,M),(Ke=te.props&&te.props.onVnodeUpdated)&&kt(()=>rn(Ke,ge,te,Ie),M)}else{let te;const{el:fe,props:ue}=b,{bm:ge,m:Ie,parent:Me}=_,Ke=fi(b);if(zs(_,!1),ge&&io(ge),!Ke&&(te=ue&&ue.onVnodeBeforeMount)&&rn(te,Me,b),zs(_,!0),fe&&Se){const ot=()=>{_.subTree=zc(_),Se(fe,_.subTree,_,M,null)};Ke?b.type.__asyncLoader().then(()=>!_.isUnmounted&&ot()):ot()}else{const ot=_.subTree=zc(_);v(null,ot,k,x,_,M,K),b.el=ot.el}if(Ie&&kt(Ie,M),!Ke&&(te=ue&&ue.onVnodeMounted)){const ot=b;kt(()=>rn(te,Me,ot),M)}(b.shapeFlag&256||Me&&fi(Me.vnode)&&Me.vnode.shapeFlag&256)&&_.a&&kt(_.a,M),_.isMounted=!0,b=k=x=null}},Q=_.effect=new Ja(q,an,()=>yh(j),_.scope),j=_.update=()=>{Q.dirty&&Q.run()};j.id=_.uid,zs(_,!0),j()},se=(_,b,k)=>{b.component=_;const x=_.vnode.props;_.vnode=b,_.next=null,b1(_,b.props,x,k),A1(_,b.children,k),Ni(),Fv(_),Li()},Z=(_,b,k,x,M,K,X,q,Q=!1)=>{const j=_&&_.children,te=_?_.shapeFlag:0,fe=b.children,{patchFlag:ue,shapeFlag:ge}=b;if(ue>0){if(ue&128){Y(j,fe,k,x,M,K,X,q,Q);return}else if(ue&256){De(j,fe,k,x,M,K,X,q,Q);return}}ge&8?(te&16&&ke(j,M,K),fe!==j&&u(k,fe)):te&16?ge&16?Y(j,fe,k,x,M,K,X,q,Q):ke(j,M,K,!0):(te&8&&u(k,""),ge&16&&P(fe,k,x,M,K,X,q,Q))},De=(_,b,k,x,M,K,X,q,Q)=>{_=_||no,b=b||no;const j=_.length,te=b.length,fe=Math.min(j,te);let ue;for(ue=0;ue<fe;ue++){const ge=b[ue]=Q?ps(b[ue]):Sn(b[ue]);v(_[ue],ge,k,null,M,K,X,q,Q)}j>te?ke(_,M,K,!0,!1,fe):P(b,k,x,M,K,X,q,Q,fe)},Y=(_,b,k,x,M,K,X,q,Q)=>{let j=0;const te=b.length;let fe=_.length-1,ue=te-1;for(;j<=fe&&j<=ue;){const ge=_[j],Ie=b[j]=Q?ps(b[j]):Sn(b[j]);if(tr(ge,Ie))v(ge,Ie,k,null,M,K,X,q,Q);else break;j++}for(;j<=fe&&j<=ue;){const ge=_[fe],Ie=b[ue]=Q?ps(b[ue]):Sn(b[ue]);if(tr(ge,Ie))v(ge,Ie,k,null,M,K,X,q,Q);else break;fe--,ue--}if(j>fe){if(j<=ue){const ge=ue+1,Ie=ge<te?b[ge].el:x;for(;j<=ue;)v(null,b[j]=Q?ps(b[j]):Sn(b[j]),k,Ie,M,K,X,q,Q),j++}}else if(j>ue)for(;j<=fe;)ae(_[j],M,K,!0),j++;else{const ge=j,Ie=j,Me=new Map;for(j=Ie;j<=ue;j++){const Pt=b[j]=Q?ps(b[j]):Sn(b[j]);Pt.key!=null&&Me.set(Pt.key,j)}let Ke,ot=0;const qt=ue-Ie+1;let Zn=!1,qs=0;const Mr=new Array(qt);for(j=0;j<qt;j++)Mr[j]=0;for(j=ge;j<=fe;j++){const Pt=_[j];if(ot>=qt){ae(Pt,M,K,!0);continue}let U;if(Pt.key!=null)U=Me.get(Pt.key);else for(Ke=Ie;Ke<=ue;Ke++)if(Mr[Ke-Ie]===0&&tr(Pt,b[Ke])){U=Ke;break}U===void 0?ae(Pt,M,K,!0):(Mr[U-Ie]=j+1,U>=qs?qs=U:Zn=!0,v(Pt,b[U],k,null,M,K,X,q,Q),ot++)}const Ks=Zn?k1(Mr):no;for(Ke=Ks.length-1,j=qt-1;j>=0;j--){const Pt=Ie+j,U=b[Pt],T=Pt+1<te?b[Pt+1].el:x;Mr[j]===0?v(null,U,k,T,M,K,X,q,Q):Zn&&(Ke<0||j!==Ks[Ke]?we(U,k,T,2):Ke--)}}},we=(_,b,k,x,M=null)=>{const{el:K,type:X,transition:q,children:Q,shapeFlag:j}=_;if(j&6){we(_.component.subTree,b,k,x);return}if(j&128){_.suspense.move(b,k,x);return}if(j&64){X.move(_,b,k,le);return}if(X===Fe){r(K,b,k);for(let fe=0;fe<Q.length;fe++)we(Q[fe],b,k,x);r(_.anchor,b,k);return}if(X===po){y(_,b,k);return}if(x!==2&&j&1&&q)if(x===0)q.beforeEnter(K),r(K,b,k),kt(()=>q.enter(K),M);else{const{leave:fe,delayLeave:ue,afterLeave:ge}=q,Ie=()=>r(K,b,k),Me=()=>{fe(K,()=>{Ie(),ge&&ge()})};ue?ue(K,Ie,Me):Me()}else r(K,b,k)},ae=(_,b,k,x=!1,M=!1)=>{const{type:K,props:X,ref:q,children:Q,dynamicChildren:j,shapeFlag:te,patchFlag:fe,dirs:ue}=_;if(q!=null&&_u(q,null,k,_,!0),te&256){b.ctx.deactivate(_);return}const ge=te&1&&ue,Ie=!fi(_);let Me;if(Ie&&(Me=X&&X.onVnodeBeforeUnmount)&&rn(Me,b,_),te&6)qe(_.component,k,x);else{if(te&128){_.suspense.unmount(k,x);return}ge&&fr(_,null,b,"beforeUnmount"),te&64?_.type.remove(_,b,k,M,le,x):j&&(K!==Fe||fe>0&&fe&64)?ke(j,b,k,!1,!0):(K===Fe&&fe&384||!M&&te&16)&&ke(Q,b,k),x&&Ue(_)}(Ie&&(Me=X&&X.onVnodeUnmounted)||ge)&&kt(()=>{Me&&rn(Me,b,_),ge&&fr(_,null,b,"unmounted")},k)},Ue=_=>{const{type:b,el:k,anchor:x,transition:M}=_;if(b===Fe){Ce(k,x);return}if(b===po){w(_);return}const K=()=>{s(k),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(_.shapeFlag&1&&M&&!M.persisted){const{leave:X,delayLeave:q}=M,Q=()=>X(k,K);q?q(_.el,K,Q):Q()}else K()},Ce=(_,b)=>{let k;for(;_!==b;)k=f(_),s(_),_=k;s(b)},qe=(_,b,k)=>{const{bum:x,scope:M,update:K,subTree:X,um:q}=_;x&&io(x),M.stop(),K&&(K.active=!1,ae(X,_,b,k)),q&&kt(q,b),kt(()=>{_.isUnmounted=!0},b),b&&b.pendingBranch&&!b.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===b.pendingId&&(b.deps--,b.deps===0&&b.resolve())},ke=(_,b,k,x=!1,M=!1,K=0)=>{for(let X=K;X<_.length;X++)ae(_[X],b,k,x,M)},O=_=>_.shapeFlag&6?O(_.component.subTree):_.shapeFlag&128?_.suspense.next():f(_.anchor||_.el);let G=!1;const z=(_,b,k)=>{_==null?b._vnode&&ae(b._vnode,null,null,!0):v(b._vnode||null,_,b,null,null,null,k),G||(G=!0,Fv(),vu(),G=!1),b._vnode=_},le={p:v,um:ae,m:we,r:Ue,mt:oe,mc:P,pc:Z,pbc:D,n:O,o:t};let be,Se;return e&&([be,Se]=e(le)),{render:z,hydrate:be,createApp:w1(z,be)}}function Sf({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function zs({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function dT(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function bm(t,e,n=!1){const r=t.children,s=e.children;if(he(r)&&he(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=ps(s[i]),a.el=o.el),n||bm(o,a)),a.type===Io&&(a.el=o.el)}}function k1(t){const e=t.slice(),n=[0];let r,s,i,o,a;const l=t.length;for(r=0;r<l;r++){const c=t[r];if(c!==0){if(s=n[n.length-1],t[s]<c){e[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,t[n[a]]<c?i=a+1:o=a;c<t[n[i]]&&(i>0&&(e[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=e[o];return n}function pT(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:pT(e)}const O1=t=>t.__isTeleport,La=t=>t&&(t.disabled||t.disabled===""),Jv=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Zv=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Vd=(t,e)=>{const n=t&&t.to;return ct(n)?e?e(n):null:n},M1={name:"Teleport",__isTeleport:!0,process(t,e,n,r,s,i,o,a,l,c){const{mc:u,pc:h,pbc:f,o:{insert:d,querySelector:p,createText:v,createComment:m}}=c,g=La(e.props);let{shapeFlag:E,children:y,dynamicChildren:w}=e;if(t==null){const I=e.el=v(""),A=e.anchor=v("");d(I,n,r),d(A,n,r);const R=e.target=Vd(e.props,p),P=e.targetAnchor=v("");R&&(d(P,R),o==="svg"||Jv(R)?o="svg":(o==="mathml"||Zv(R))&&(o="mathml"));const C=(D,$)=>{E&16&&u(y,D,$,s,i,o,a,l)};g?C(n,A):R&&C(R,P)}else{e.el=t.el;const I=e.anchor=t.anchor,A=e.target=t.target,R=e.targetAnchor=t.targetAnchor,P=La(t.props),C=P?n:A,D=P?I:R;if(o==="svg"||Jv(A)?o="svg":(o==="mathml"||Zv(A))&&(o="mathml"),w?(f(t.dynamicChildren,w,C,s,i,o,a),bm(t,e,!0)):l||h(t,e,C,D,s,i,o,a,!1),g)P?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Rc(e,n,I,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const $=e.target=Vd(e.props,p);$&&Rc(e,$,null,c,0)}else P&&Rc(e,A,R,c,1)}mT(e)},remove(t,e,n,r,{um:s,o:{remove:i}},o){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:h,props:f}=t;if(h&&i(u),o&&i(c),a&16){const d=o||!La(f);for(let p=0;p<l.length;p++){const v=l[p];s(v,e,n,d,!!v.dynamicChildren)}}},move:Rc,hydrate:N1};function Rc(t,e,n,{o:{insert:r},m:s},i=2){i===0&&r(t.targetAnchor,e,n);const{el:o,anchor:a,shapeFlag:l,children:c,props:u}=t,h=i===2;if(h&&r(o,e,n),(!h||La(u))&&l&16)for(let f=0;f<c.length;f++)s(c[f],e,n,2);h&&r(a,e,n)}function N1(t,e,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l}},c){const u=e.target=Vd(e.props,l);if(u){const h=u._lpa||u.firstChild;if(e.shapeFlag&16)if(La(e.props))e.anchor=c(o(t),e,a(t),n,r,s,i),e.targetAnchor=h;else{e.anchor=o(t);let f=h;for(;f;)if(f=o(f),f&&f.nodeType===8&&f.data==="teleport anchor"){e.targetAnchor=f,u._lpa=e.targetAnchor&&o(e.targetAnchor);break}c(h,e,u,n,r,s,i)}mT(e)}return e.anchor&&o(e.anchor)}const KZ=M1;function mT(t){const e=t.ctx;
vendor: 4,563 bytes, line 19
19if(e&&e.ut){let n=t.children[0].el;for(;n&&n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}const Fe=Symbol.for("v-fgt"),Io=Symbol.for("v-txt"),en=Symbol.for("v-cmt"),po=Symbol.for("v-stc"),xa=[];let ln=null;function ee(t=!1){xa.push(ln=t?null:[])}function gT(){xa.pop(),ln=xa[xa.length-1]||null}let yi=1;function ey(t){yi+=t}function vT(t){return t.dynamicChildren=yi>0?ln||no:null,gT(),yi>0&&ln&&ln.push(t),t}function ve(t,e,n,r,s,i){return vT(xe(t,e,n,r,s,i,!0))}function at(t,e,n,r,s){return vT(de(t,e,n,r,s,!0))}function _i(t){return t?t.__v_isVNode===!0:!1}function tr(t,e){return t.type===e.type&&t.key===e.key}function zZ(t){}const bh="__vInternal",yT=({key:t})=>t??null,Gc=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?ct(t)||dt(t)||_e(t)?{i:Et,r:t,k:e,f:!!n}:t:null);function xe(t,e=null,n=null,r=0,s=null,i=t===Fe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&yT(e),ref:e&&Gc(e),scopeId:wh,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:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Et};return a?(Tm(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=ct(n)?8:16),yi>0&&!o&&ln&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&ln.push(l),l}const de=L1;function L1(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===Yb)&&(t=en),_i(t)){const a=Yr(t,e,!0);return n&&Tm(a,n),yi>0&&!i&&ln&&(a.shapeFlag&6?ln[ln.indexOf(t)]=a:ln.push(a)),a.patchFlag|=-2,a}if(U1(t)&&(t=t.__vccOpts),e){e=al(e);let{class:a,style:l}=e;a&&!ct(a)&&(e.class=Je(a)),Qe(l)&&(Nb(l)&&!he(l)&&(l=lt({},l)),e.style=jr(l))}const o=ct(t)?1:qb(t)?128:O1(t)?64:Qe(t)?4:_e(t)?2:0;return xe(t,e,n,r,s,o,i,!0)}function al(t){return t?Nb(t)||bh in t?lt({},t):t:null}function Yr(t,e,n=!1){const{props:r,ref:s,patchFlag:i,children:o}=t,a=e?Us(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:a,key:a&&yT(a),ref:e&&e.ref?n&&s?he(s)?s.concat(Gc(e)):[s,Gc(e)]:Gc(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fe?i===-1?16:i|16:i,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Yr(t.ssContent),ssFallback:t.ssFallback&&Yr(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function Vl(t=" ",e=0){return de(Io,null,t,e)}function GZ(t,e){const n=de(po,null,t);return n.staticCount=e,n}function It(t="",e=!1){return e?(ee(),at(en,null,t)):de(en,null,t)}function Sn(t){return t==null||typeof t=="boolean"?de(en):he(t)?de(Fe,null,t.slice()):typeof t=="object"?ps(t):de(Io,null,String(t))}function ps(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Yr(t)}function Tm(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(he(e))n=16;else if(typeof e=="object")if(r&65){const s=e.default;s&&(s._c&&(s._d=!1),Tm(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!(bh in e)?e._ctx=Et:s===3&&Et&&(Et.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else _e(e)?(e={default:e,_ctx:Et},n=32):(e=String(e),r&64?(n=16,e=[Vl(e)]):n=8);t.children=e,t.shapeFlag|=n}function Us(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const s in r)if(s==="class")e.class!==r.class&&(e.class=Je([e.class,r.class]));else if(s==="style")e.style=jr([e.style,r.style]);else if(Ol(s)){const i=e[s],o=r[s];o&&i!==o&&!(he(i)&&i.includes(o))&&(e[s]=i?[].concat(i,o):o)}else s!==""&&(e[s]=r[s])}return e}function rn(t,e,n,r=null){Un(t,e,7,[n,r])}const x1=iT();let V1=0;function _T(t,e,n){const r=t.type,s=(e?e.appContext:t.appContext)||x1,i={uid:V1++,vnode:t,type:r,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new yb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:lT(r,s),emitsOptions:Wb(r,s),emit:null,emitted:null,propsDefaults:We,inheritAttrs:r.inheritAttrs,ctx:We,data:We,props:We,attrs:We,slots:We,refs:We,setupState:We,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,
vendor: 3,365 bytes, lines 19-22
19sp:null};return i.ctx={_:i},i.root=e?e.root:i,i.emit=xS.bind(null,i),t.ce&&t.ce(i),i}let At=null;const Zr=()=>At||Et;let wu,$d;{const t=mb(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};wu=e("__VUE_INSTANCE_SETTERS__",n=>At=n),$d=e("__VUE_SSR_SETTERS__",n=>$l=n)}const wi=t=>{const e=At;return wu(t),t.scope.on(),()=>{t.scope.off(),wu(e)}},Fd=()=>{At&&At.scope.off(),wu(null)};function wT(t){return t.vnode.shapeFlag&4}let $l=!1;function ET(t,e=!1){e&&$d(e);const{props:n,children:r}=t.vnode,s=wT(t);E1(t,n,s,e),I1(t,r);const i=s?$1(t,e):void 0;return e&&$d(!1),i}function $1(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Lb(new Proxy(t.ctx,Md));const{setup:r}=n;if(r){const s=t.setupContext=r.length>1?TT(t):null,i=wi(t);Ni();const o=Rs(r,t,0,[t.props,s]);if(Li(),i(),rm(o)){if(o.then(Fd,Fd),e)return o.then(a=>{Ud(t,a,e)}).catch(a=>{Yo(a,t,0)});t.asyncDep=o}else Ud(t,o,e)}else bT(t,e)}function Ud(t,e,n){_e(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Qe(e)&&(t.setupState=$b(e)),bT(t,n)}let Eu,Bd;function QZ(t){Eu=t,Bd=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,d1))}}const XZ=()=>!Eu;function bT(t,e,n){const r=t.type;if(!t.render){if(!e&&Eu&&!r.render){const s=r.template||wm(t).template;if(s){const{isCustomElement:i,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=r,c=lt(lt({isCustomElement:i,delimiters:a},o),l);r.render=Eu(s,c)}}t.render=r.render||an,Bd&&Bd(t)}{const s=wi(t);Ni();try{p1(t)}finally{Li(),s()}}}function F1(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,n){return fn(t,"get","$attrs"),e[n]}}))}function TT(t){const e=n=>{t.exposed=n||{}};return{get attrs(){return F1(t)},slots:t.slots,emit:t.emit,expose:e}}function Th(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy($b(Lb(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Na)return Na[n](t)},has(e,n){return n in e||n in Na}}))}function Hd(t,e=!0){return _e(t)?t.displayName||t.name:t.name||e&&t.__name}function U1(t){return _e(t)&&"__vccOpts"in t}const L=(t,e)=>TS(t,e,$l);function JZ(t,e,n=We){const r=Zr(),s=cn(e),i=Dn(e),o=PS((l,c)=>{let u;return JS(()=>{const h=t[e];nr(u,h)&&(u=h,c())}),{get(){return l(),n.get?n.get(u):u},set(h){const f=r.vnode.props;!(f&&(e in f||s in f||i in f)&&(`onUpdate:${e}`in f||`onUpdate:${s}`in f||`onUpdate:${i}`in f))&&nr(h,u)&&(u=h,c()),r.emit(`update:${e}`,n.set?n.set(h):h)}}}),a=e==="modelValue"?"modelModifiers":`${e}Modifiers`;return o[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?t[a]||{}:o,done:!1}:{done:!0}}}},o}function Nn(t,e,n){const r=arguments.length;return r===2?Qe(e)&&!he(e)?_i(e)?de(t,null,[e]):de(t,e):de(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&_i(n)&&(n=[n]),de(t,e,n))}function ZZ(){}function eee(t,e,n,r){const s=n[r];if(s&&B1(s,t))return s;const i=e();return i.memo=t.slice(),n[r]=i}function B1(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(nr(n[r],e[r]))return!1;return yi>0&&ln&&ln.push(t),!0}const IT="3.4.21",tee=an,nee=kS,ree=Ki,see=jb,H1={createComponentInstance:_T,setupComponent:ET,renderComponentRoot:zc,setCurrentRenderingInstance:rl,isVNode:_i,normalizeVNode:Sn},iee=H1,oee=null,aee=null,lee=null;/**
20* @vue/runtime-dom v3.4.21
21* (c) 2018-present Yuxi (Evan) You and Vue contributors
22* @license MIT
23**/const j1="http://www.w3.org/2000/svg",W1="http://www.w3.org/1998/Math/MathML",ms=typeof document<"u"?document:null,ty=ms&&ms.createElement("template"),Y1={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 s=e==="svg"?ms.createElementNS(j1,t):e==="mathml"?ms.createElementNS(W1,t):ms.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:t=>ms.createTextNode(t),createComment:t=>ms.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ms.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,s,i){const o=n?n.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{ty.innerHTML=r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t;const a=ty.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},os="transition",ha="animation",Ao=Symbol("_vtc"),Ko=(t,{slots:e})=>Nn(t1,RT(t),e);Ko.displayName="Transition";const AT={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},q1=Ko.props=lt({},Jb,AT),Gs=(t,e=[])=>{he(t)?t.forEach(n=>n(...e)):t&&t(...e)},ny=t=>t?he(t)?t.some(e=>e.length>1):t.length>1:!1;function RT(t){const e={};for(const S in t)S in AT||(e[S]=t[S]);if(t.css===!1)return e;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=t,p=K1(s),v=p&&p[0],m=p&&p[1],{onBeforeEnter:g,onEnter:E,onEnterCancelled:y,onLeave:w,onLeaveCancelled:I,onBeforeAppear:A=g,onAppear:R=E,onAppearCancelled:P=y}=e,C=(S,V,oe)=>{hs(S,V?u:a),hs(S,V?c:o),oe&&oe()},D=(S,V)=>{S._isLeaving=!1,hs(S,h),hs(S,d),hs(S,f),V&&V()},$=S=>(V,oe)=>{const J=S?R:E,W=()=>C(V,S,oe);Gs(J,[V,W]),ry(()=>{hs(V,S?l:i),Lr(V,S?u:a),ny(J)||sy(V,r,v,W)})};return lt(e,{onBeforeEnter(S){Gs(g,[S]),Lr(S,i),Lr(S,o)},onBeforeAppear(S){Gs(A,[S]),Lr(S,l),Lr(S,c)},onEnter:$(!1),onAppear:$(!0),onLeave(S,V){S._isLeaving=!0;const oe=()=>D(S,V);Lr(S,h),CT(),Lr(S,f),ry(()=>{S._isLeaving&&(hs(S,h),Lr(S,d),ny(w)||sy(S,r,m,oe))}),Gs(w,[S,oe])},onEnterCancelled(S){C(S,!1),Gs(y,[S])},onAppearCancelled(S){C(S,!0),Gs(P,[S])},onLeaveCancelled(S){D(S),Gs(I,[S])}})}function K1(t){if(t==null)return null;if(Qe(t))return[Df(t.enter),Df(t.leave)];{const e=Df(t);return[e,e]}}function Df(t){return pu(t)}function Lr(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Ao]||(t[Ao]=new Set)).add(e)}function hs(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const n=t[Ao];n&&(n.delete(e),n.size||(t[Ao]=void 0))}function ry(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let z1=0;function sy(t,e,n,r){const s=t._endId=++z1,i=()=>{s===t._endId&&r()};if(n)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=PT(t,e);if(!o)return r();const c=o+"end";let u=0;const h=()=>{t.removeEventListener(c,f),i()},f=d=>{d.target===t&&++u>=l&&h()};setTimeout(()=>{u<l&&h()},a+1),t.addEventListener(c,f)}function PT(t,e){const n=window.getComputedStyle(t),r=p=>(n[p]||"").split(", "),s=r(`${os}Delay`),i=r(`${os}Duration`),o=iy(s,i),a=r(`${ha}Delay`),l=r(`${ha}Duration`),c=iy(a,l);let u=null,h=0,f=0;e===os?o>0&&(u=os,h=o,f=i.length):e===ha?c>0&&(u=ha,h=c,f=l.length):(h=Math.max(o,c),u=h>0?o>c?os:ha:null,f=u?u===os?i.length:l.length:0);const d=u===os&&/\b(transform|all)(,|$)/.test(r(`${os}Property`).toString());return{type:u,timeout:h,propCount:f,hasTransform:d}}function iy(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,r)=>oy(n)+oy(t[r])))}function oy(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function CT(){return document.body.offsetHeight}function G1(t,e,n){const r=t[Ao];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const bu=Symbol("_vod"),ST=Symbol("_vsh"),Q1={beforeMount(t,{value:e},{transition:n}){t[bu]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):fa(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),fa(t,!0),r.enter(t)):r.leave(t,()=>{fa(t,!1)}):fa(t,e))},beforeUnmount(t,{value:e}){fa(t,e)}};function fa(t,e){t.style.display=e?t[bu]:"none",t[ST]=!e}function X1(){Q1.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const DT=Symbol("");function cee(t){const e=Zr();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}
23"]`)).forEach(i=>Wd(i,s))},r=()=>{const s=t(e.proxy);jd(e.subTree,s),n(s)};XS(r),Fs(()=>{const s=new MutationObserver(r);s.observe(e.subTree.el.parentNode,{childList:!0}),qo(()=>s.disconnect())})}function jd(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{jd(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Wd(t.el,e);else if(t.type===Fe)t.children.forEach(n=>jd(n,e));else if(t.type===po){let{el:n,anchor:r}=t;for(;n&&(Wd(n,e),n!==r);)n=n.nextSibling}}function Wd(t,e){if(t.nodeType===1){const n=t.style;let r="";for(const s in e)n.setProperty(`--${s}`,e[s]),r+=`--${s}: ${e[s]};`;n[DT]=r}}const J1=/(^|;)\s*display\s*:/;function Z1(t,e,n){const r=t.style,s=ct(n);let i=!1;if(n&&!s){if(e)if(ct(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Qc(r,a,"")}else for(const o in e)n[o]==null&&Qc(r,o,"");for(const o in n)o==="display"&&(i=!0),Qc(r,o,n[o])}else if(s){if(e!==n){const o=r[DT];o&&(n+=";"+o),r.cssText=n,i=J1.test(n)}}else e&&t.removeAttribute("style");bu in t&&(t[bu]=i?r.display:"",t[ST]&&(r.display="none"))}const ay=/\s*!important$/;function Qc(t,e,n){if(he(n))n.forEach(r=>Qc(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=eD(t,e);ay.test(n)?t.setProperty(Dn(r),n.replace(ay,""),"important"):t[r]=n}}const ly=["Webkit","Moz","ms"],kf={};function eD(t,e){const n=kf[e];if(n)return n;let r=cn(e);if(r!=="filter"&&r in t)return kf[e]=r;r=dh(r);for(let s=0;s<ly.length;s++){const i=ly[s]+r;if(i in t)return kf[e]=i}return e}const cy="http://www.w3.org/1999/xlink";function tD(t,e,n,r,s){if(r&&e.startsWith("xlink:"))n==null?t.removeAttributeNS(cy,e.slice(6,e.length)):t.setAttributeNS(cy,e,n);else{const i=ZC(e);n==null||i&&!gb(n)?t.removeAttribute(e):t.setAttribute(e,i?"":n)}}function nD(t,e,n,r,s,i,o){if(e==="innerHTML"||e==="textContent"){r&&o(r,s,i),t[e]=n??"";return}const a=t.tagName;if(e==="value"&&a!=="PROGRESS"&&!a.includes("-")){const c=a==="OPTION"?t.getAttribute("value")||"":t.value,u=n??"";(c!==u||!("_value"in t))&&(t.value=u),n==null&&t.removeAttribute(e),t._value=n;return}let l=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=gb(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{t[e]=n}catch{}l&&t.removeAttribute(e)}function Vr(t,e,n,r){t.addEventListener(e,n,r)}function rD(t,e,n,r){t.removeEventListener(e,n,r)}const uy=Symbol("_vei");function sD(t,e,n,r,s=null){const i=t[uy]||(t[uy]={}),o=i[e];if(r&&o)o.value=r;else{const[a,l]=iD(e);if(r){const c=i[e]=lD(r,s);Vr(t,a,c,l)}else o&&(rD(t,a,o,l),i[e]=void 0)}}const hy=/(?:Once|Passive|Capture)$/;function iD(t){let e;if(hy.test(t)){e={};let r;for(;r=t.match(hy);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Dn(t.slice(2)),e]}let Of=0;const oD=Promise.resolve(),aD=()=>Of||(oD.then(()=>Of=0),Of=Date.now());function lD(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Un(cD(r,n.value),e,5,[r])};return n.value=t,n.attached=aD(),n}function cD(t,e){if(he(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>s=>!s._stopped&&r&&r(s))}else return e}const fy=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,uD=(t,e,n,r,s,i,o,a,l)=>{const c=s==="svg";e==="class"?G1(t,r,c):e==="style"?Z1(t,n,r):Ol(e)?tm(e)||sD(t,e,n,r,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):hD(t,e,r,c))?nD(t,e,r,i,o,a,l):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),tD(t,e,r,c))};function hD(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&fy(e)&&_e(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return fy(e)&&ct(n)?!1:e in t}/*! #__NO_SIDE_EFFECTS__ */function fD(t,e){const n=et(t);class r extends Im{constructor(i){super(n,i,e)}}return r.def=n,r}/*! #__NO_SIDE_EFFECTS__ */const uee=t=>fD(t,PD),dD=typeof HTMLElement<"u"?HTMLElement:class{};class Im extends dD{constructor(e,n={},r){super(),this._def=e,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),kn(()=>{this._connected||(_y(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const s of r)this._setAttr(s.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(r,s=!1)=>{const{props:i,styles:o}=r;let a;if(i&&!he(i))for(const l in i){const c=i[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=pu(this._props[l])),(a||(a=Object.create(null)))[
vendor: 5,240 bytes, line 23
23cn(l)]=!0)}this._numberProps=a,s&&this._resolveProps(r),this._applyStyles(o),this._update()},n=this._def.__asyncLoader;n?n().then(r=>e(r,!0)):e(this._def)}_resolveProps(e){const{props:n}=e,r=he(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&r.includes(s)&&this._setProp(s,this[s],!0,!1);for(const s of r.map(cn))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i)}})}_setAttr(e){let n=this.getAttribute(e);const r=cn(e);this._numberProps&&this._numberProps[r]&&(n=pu(n)),this._setProp(r,n,!1)}_getProp(e){return this._props[e]}_setProp(e,n,r=!0,s=!0){n!==this._props[e]&&(this._props[e]=n,s&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(Dn(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Dn(e),n+""):n||this.removeAttribute(Dn(e))))}_update(){_y(this._createVNode(),this.shadowRoot)}_createVNode(){const e=de(this._def,lt({},this._props));return this._instance||(e.ce=n=>{this._instance=n,n.isCE=!0;const r=(i,o)=>{this.dispatchEvent(new CustomEvent(i,{detail:o}))};n.emit=(i,...o)=>{r(i,o),Dn(i)!==i&&r(Dn(i),o)};let s=this;for(;s=s&&(s.parentNode||s.host);)if(s instanceof Im){n.parent=s._instance,n.provides=s._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function hee(t="$style"){{const e=Zr();if(!e)return We;const n=e.type.__cssModules;if(!n)return We;const r=n[t];return r||We}}const kT=new WeakMap,OT=new WeakMap,Tu=Symbol("_moveCb"),dy=Symbol("_enterCb"),MT={name:"TransitionGroup",props:lt({},q1,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Zr(),r=Xb();let s,i;return ym(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!yD(s[0].el,n.vnode.el,o))return;s.forEach(mD),s.forEach(gD);const a=s.filter(vD);CT(),a.forEach(l=>{const c=l.el,u=c.style;Lr(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const h=c[Tu]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",h),c[Tu]=null,hs(c,o))};c.addEventListener("transitionend",h)})}),()=>{const o=Ve(t),a=RT(o);let l=o.tag||Fe;s=i,i=e.default?vm(e.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&To(u,il(u,a,r,n))}if(s)for(let c=0;c<s.length;c++){const u=s[c];To(u,il(u,a,r,n)),kT.set(u,u.el.getBoundingClientRect())}return de(l,null,i)}}},pD=t=>delete t.mode;MT.props;const fee=MT;function mD(t){const e=t.el;e[Tu]&&e[Tu](),e[dy]&&e[dy]()}function gD(t){OT.set(t,t.el.getBoundingClientRect())}function vD(t){const e=kT.get(t),n=OT.get(t),r=e.left-n.left,s=e.top-n.top;if(r||s){const i=t.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${s}px)`,i.transitionDuration="0s",t}}function yD(t,e,n){const r=t.cloneNode(),s=t[Ao];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(r);const{hasTransform:o}=PT(r);return i.removeChild(r),o}const Os=t=>{const e=t.props["onUpdate:modelValue"]||!1;return he(e)?n=>io(e,n):e};function _D(t){t.target.composing=!0}function py(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const jn=Symbol("_assign"),Yd={created(t,{modifiers:{lazy:e,trim:n,number:r}},s){t[jn]=Os(s);const i=r||s.props&&s.props.type==="number";Vr(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),i&&(a=Xa(a)),t[jn](a)}),n&&Vr(t,"change",()=>{t.value=t.value.trim()}),e||(Vr(t,"compositionstart",_D),Vr(t,"compositionend",py),Vr(t,"change",py))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:s}},i){if(t[jn]=Os(i),t.composing)return;const o=s||t.type==="number"?Xa(t.value):t.value,a=e??"";o!==a&&(document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===a)||(t.value=a))}},NT={deep:!0,created(t,e,n){t[jn]=Os(n),Vr(t,"change",()=>{const r=t._modelValue,s=Ro(t),i=t.checked,o=t[jn];if(he(r)){const a=ph(r,s),l=a!==-1;if(i&&!l)o(r.concat(s));else if(!i&&l){const c=[...r];c.splice(a,1),o(c)}}else if(Mi(r)){const a=new Set(r);i?a.add(s):a.delete(s),o(a)}else o(xT(t,i))})},mounted:my,beforeUpdate(t,e,n){t[jn]=Os(n),my(t,e,n)}};function my(t,{value:e,oldValue:n},r){t._modelValue=e,he(e)?t.checked=ph(e,r.props.value)>-1:Mi(e)?t.checked=e.has(r.props.value):e!==n&&(t.checked=ks(e,xT(t,!0)))}const LT={created(t,{value:e},n){t.checked=ks(e,n.props.value),t[jn]=Os(n),Vr(t,"change",()=>{t[jn](Ro(t))})},beforeUpdate(t,{value:e,oldValue:n},r){t[jn]=Os(r),e!==n&&(t.checked=ks(e,r.props.value))}},wD={deep:!0,created(t,{value:e,modifiers:{number:n}},r){const s=Mi(e);Vr(t,"change",()=>{const i=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?Xa(Ro(o)):Ro(o));t[jn](t.multiple?s?new Set(i):i:i[0]),t._assigning=!0,kn(()=>{t._assigning=!1})}),t[jn]=Os(r)},mounted(t,{value:e,modifiers:{number:n}}){gy(t,e,n)},beforeUpdate(t,e,n){t[jn]=Os(n)},updated(t,{value:e,modifiers:{number:n}}){t._assigning||gy(t,e,n)}};function gy(t,e,n){const r=t.multiple,s=he(e);if(!(r&&!s&&!Mi(e))){for(let i=0,o=t.options.length;i<o;i++){const a=t.options[i],l=Ro(a);if(r)if(s){const c=typeof l;
23c==="string"||c==="number"?a.selected=e.includes(n?Xa(l):l):a.selected=ph(e,l)>-1}else a.selected=e.has(l);else if(ks(Ro(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Ro(t){return"_value"in t?t._value:t.value}function xT(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const ED={created(t,e,n){Pc(t,e,n,null,"created")},mounted(t,e,n){Pc(t,e,n,null,"mounted")},beforeUpdate(t,e,n,r){Pc(t,e,n,r,"beforeUpdate")},updated(t,e,n,r){Pc(t,e,n,r,"updated")}};function VT(t,e){switch(t){case"SELECT":return wD;case"TEXTAREA":return Yd;default:switch(e){case"checkbox":return NT;case"radio":return LT;default:return Yd}}}function Pc(t,e,n,r,s){const o=VT(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,r)}function bD(){Yd.getSSRProps=({value:t})=>({value:t}),LT.getSSRProps=({value:t},e)=>{if(e.props&&ks(e.props.value,t))return{checked:!0}},NT.getSSRProps=({value:t},e)=>{if(he(t)){if(e.props&&ph(t,e.props.value)>-1)return{checked:!0}}else if(Mi(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},ED.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=VT(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const TD=["ctrl","shift","alt","meta"],ID={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)=>TD.some(n=>t[`${n}Key`]&&!e.includes(n))},AD=(t,e)=>{const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<e.length;o++){const a=ID[e[o]];if(a&&a(s,e))return}return t(s,...i)})},RD={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},vy=(t,e)=>{const n=t._withKeys||(t._withKeys={}),r=e.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Dn(s.key);if(e.some(o=>o===i||RD[o]===i))return t(s)})},$T=lt({patchProp:uD},Y1);let Va,yy=!1;function FT(){return Va||(Va=S1($T))}function UT(){return Va=yy?Va:D1($T),yy=!0,Va}const _y=(...t)=>{FT().render(...t)},PD=(...t)=>{UT().hydrate(...t)},CD=(...t)=>{const e=FT().createApp(...t),{mount:n}=e;return e.mount=r=>{const s=HT(r);if(!s)return;const i=e._component;!_e(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.innerHTML="";const o=n(s,!1,BT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e},SD=(...t)=>{const e=UT().createApp(...t),{mount:n}=e;return e.mount=r=>{const s=HT(r);if(s)return n(s,!0,BT(s))},e};function BT(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function HT(t){return ct(t)?document.querySelector(t):t}let wy=!1;const dee=()=>{wy||(wy=!0,bD(),X1())},DD=/#/g,kD=/&/g,OD=/\//g,MD=/=/g,Am=/\+/g,ND=/%5e/gi,LD=/%60/gi,xD=/%7c/gi,VD=/%20/gi;function $D(t){return encodeURI(""+t).replace(xD,"|")}function qd(t){return $D(typeof t=="string"?t:JSON.stringify(t)).replace(Am,"%2B").replace(VD,"+").replace(DD,"%23").replace(kD,"%26").replace(LD,"`").replace(ND,"^").replace(OD,"%2F")}function Mf(t){return qd(t).replace(MD,"%3D")}function Iu(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function FD(t){return Iu(t.replace(Am," "))}function UD(t){return Iu(t.replace(Am," "))}function BD(t=""){const e={};t[0]==="?"&&(t=t.slice(1));for(const n of t.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const s=FD(r[1]);if(s==="__proto__"||s==="constructor")continue;const i=UD(r[2]||"");e[s]===void 0?e[s]=i:Array.isArray(e[s])?e[s].push(i):e[s]=[e[s],i]}return e}function HD(t,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(n=>`${Mf(t)}=${qd(n)}`).join("&"):`${Mf(t)}=${qd(e)}`:Mf(t)}function jD(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>HD(e,t[e])).filter(Boolean).join("&")}const WD=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,YD=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,qD=/^([/\\]\s*){2,}[^/\\]/,KD=/^[\s\0]*(blob|data|javascript|vbscript):$/i,zD=/\/$|\/\?|\/#/,GD=/^\.?\//;function Fl(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?WD.test(t):YD.test(t)||(e.acceptRelative?qD.test(t):!1)}function QD(t){return!!t&&KD.test(t)}function Kd(t="",e){return e?zD.test(t):t.endsWith("/")}function Rm(t="",e){if(!e)return(Kd(t)?t.slice(0,-1):t)||"/";if(!Kd(t,!0))return t||"/";let n=t,r="";const s=t.indexOf("#");s>=0&&(n=t.slice(0,s),r=t.slice(s));const[i,...o]=n.split("?");return(i.slice(0,-1)||"/")+(o.length>0?`?${o.join("?")}`:"")+r}function zd(t="",e){if(!e)return t.endsWith("/")?t:t+"/";if(Kd(t,!0))return t||"/";let n=t,r="";const s=t.indexOf("#");if(s>=0&&(n=t.slice(0,s),r=t.slice(s),!n))return r;const[i,...o]=n.split("?");return i+"/"+(o.length>0?`?${o.join("?")}`:"")+r}function XD(t=""){return t.startsWith("/")}
23function Ey(t=""){return XD(t)?t:"/"+t}function JD(t,e){if(WT(e)||Fl(t))return t;const n=Rm(e);return t.startsWith(n)?t:Ul(n,t)}function by(t,e){if(WT(e))return t;const n=Rm(e);if(!t.startsWith(n))return t;const r=t.slice(n.length);return r[0]==="/"?r:"/"+r}function jT(t,e){const n=Ih(t),r={...BD(n.search),...e};return n.search=jD(r),tk(n)}function WT(t){return!t||t==="/"}function ZD(t){return t&&t!=="/"}function Ul(t,...e){let n=t||"";for(const r of e.filter(s=>ZD(s)))if(n){const s=r.replace(GD,"");n=zd(n)+s}else n=r;return n}function ek(t,e,n={}){return n.trailingSlash||(t=zd(t),e=zd(e)),n.leadingSlash||(t=Ey(t),e=Ey(e)),n.encoding||(t=Iu(t),e=Iu(e)),t===e}const YT=Symbol.for("ufo:protocolRelative");function Ih(t="",e){const n=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,h,f=""]=n;return{protocol:h.toLowerCase(),pathname:f,href:h+f,auth:"",host:"",search:"",hash:""}}if(!Fl(t,{acceptRelative:!0}))return e?Ih(e+t):Ty(t);const[,r="",s,i=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o="",a=""]=i.match(/([^#/?]*)(.*)?/)||[],{pathname:l,search:c,hash:u}=Ty(a.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:r.toLowerCase(),auth:s?s.slice(0,Math.max(0,s.length-1)):"",host:o,pathname:l,search:c,hash:u,[YT]:!r}}function Ty(t=""){const[e="",n="",r=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:n,hash:r}}function tk(t){const e=t.pathname||"",n=t.search?(t.search.startsWith("?")?"":"?")+t.search:"",r=t.hash||"",s=t.auth?t.auth+"@":"",i=t.host||"";return(t.protocol||t[YT]?(t.protocol||"")+"//":"")+s+i+e+n+r}const nk=()=>{var t;return((t=window==null?void 0:window.__NUXT__)==null?void 0:t.config)||{}},Au=nk().app,rk=()=>Au.baseURL,sk=()=>Au.buildAssetsDir,Pm=(...t)=>Ul(qT(),sk(),...t),qT=(...t)=>{const e=Au.cdnURL||Au.baseURL;return t.length?Ul(e,...t):e};globalThis.__buildAssetsURL=Pm,globalThis.__publicAssetsURL=qT;const ik=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,ok=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,ak=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function lk(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){ck(t);return}return e}function ck(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function Ru(t,e={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!ak.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(ik.test(t)||ok.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,lk)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}class uk extends Error{constructor(e,n){super(e,n),this.name="FetchError",n!=null&&n.cause&&!this.cause&&(this.cause=n.cause)}}function hk(t){var l,c,u,h,f;const e=((l=t.error)==null?void 0:l.message)||((c=t.error)==null?void 0:c.toString())||"",n=((u=t.request)==null?void 0:u.method)||((h=t.options)==null?void 0:h.method)||"GET",r=((f=t.request)==null?void 0:f.url)||String(t.request)||"/",s=`[${n}] ${JSON.stringify(r)}`,i=t.response?`${t.response.status} ${t.response.statusText}`:"<no response>",o=`${s}: ${i}${e?` ${e}`:""}`,a=new uk(o,t.error?{cause:t.error}:void 0);for(const d of["request","options","response"])Object.defineProperty(a,d,{get(){return t[d]}});for(const[d,p]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,d,{get(){return t.response&&t.response[p]}});return a}const fk=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Iy(t="GET"){return fk.has(t.toUpperCase())}function dk(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}const pk=new Set(["image/svg","application/xml","application/xhtml","application/html"]),mk=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function gk(t=""){if(!t)return"json";const e=t.split(";").shift()||"";return mk.test(e)?"json":pk.has(e)||e.startsWith("text/")?"text":"blob"}function vk(t,e,n=globalThis.Headers){const r={...e,...t};if(e!=null&&e.params&&(t!=null&&t.params)&&(r.params={...e==null?void 0:e.params,...t==null?void 0:t.params}),e!=null&&e.query&&(t!=null&&t.query)&&(r.query={...e==null?void 0:e.query,...t==null?void 0:t.query}),e!=null&&e.headers&&(t!=null&&t.headers)){r.headers=new n((e==null?void 0:e.headers)||{});for(const[s,i]of new n((t==null?void 0:t.headers)||{}))r.headers.set(s,i)}return r}const yk=new Set([408,409,425,429,500,502,503,504]),_k=new Set([101,204,205,304]);function KT(t={}){const{fetch:e=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=t;async function s(a){const l=a.error&&a.error.name==="AbortError"&&!a.options.timeout||!1;if(a.options.retry!==!1&&!l){let u;typeof a.options.retry=="number"?u=a.options.retry:u=Iy(a.options.method)?0:1;const h=a.response&&a.response.status||500;if(u>0&&(Array.isArray(a.options.retryStatusCodes)?a.options.retryStatusCodes.includes(h):yk.has(h))){const f=a.options.retryDelay||0;return f>0&&await new Promise(d=>setTimeout(d,f)),i(a.request,{...a.options,retry:u-1,timeout:a.options.timeout})}}const c=hk(a);throw Error.captureStackTrace&&Error.captureStackTrace(c,i),c}const i=async function(l,c={}){var f;const u={request:l,options:vk(c,t.defaults,n),response:void 0,error:void 0};if(u.options.method=(f=u.options.method)==null?void 0:f.toUpperCase(),u.options.onRequest&&await u.options.onRequest(u),typeof u.request=="string"&&(u.options.baseURL&&(u.request=JD(u.request,u.options.baseURL)),(u.options.query||u.options.params)&&(u.request=jT(u.request,{...u.options.params,...u.options.query}))),u.options.body&&Iy(u.options.method)&&(dk(u.options.body)?(u.options.body=typeof u.options.body=="str
23ing"?u.options.body:JSON.stringify(u.options.body),u.options.headers=new n(u.options.headers||{}),u.options.headers.has("content-type")||u.options.headers.set("content-type","application/json"),u.options.headers.has("accept")||u.options.headers.set("accept","application/json")):("pipeTo"in u.options.body&&typeof u.options.body.pipeTo=="function"||typeof u.options.body.pipe=="function")&&("duplex"in u.options||(u.options.duplex="half"))),!u.options.signal&&u.options.timeout){const d=new r;setTimeout(()=>d.abort(),u.options.timeout),u.options.signal=d.signal}try{u.response=await e(u.request,u.options)}catch(d){return u.error=d,u.options.onRequestError&&await u.options.onRequestError(u),await s(u)}if(u.response.body&&!_k.has(u.response.status)&&u.options.method!=="HEAD"){const d=(u.options.parseResponse?"json":u.options.responseType)||gk(u.response.headers.get("content-type")||"");switch(d){case"json":{const p=await u.response.text(),v=u.options.parseResponse||Ru;u.response._data=v(p);break}case"stream":{u.response._data=u.response.body;break}default:u.response._data=await u.response[d]()}}return u.options.onResponse&&await u.options.onResponse(u),!u.options.ignoreResponseError&&u.response.status>=400&&u.response.status<600?(u.options.onResponseError&&await u.options.onResponseError(u),await s(u)):u.response},o=async function(l,c){return(await i(l,c))._data};return o.raw=i,o.native=(...a)=>e(...a),o.create=(a={})=>KT({...t,defaults:{...t.defaults,...a}}),o}const Cm=function(){if(typeof globalThis<"u")return globalThis;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")}(),wk=Cm.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),Ek=Cm.Headers,bk=Cm.AbortController,Tk=KT({fetch:wk,Headers:Ek,AbortController:bk}),Ik=Tk;globalThis.$fetch||(globalThis.$fetch=Ik.create({baseURL:rk()}));function Gd(t,e={},n){for(const r in t){const s=t[r],i=n?`${n}:${r}`:r;typeof s=="object"&&s!==null?Gd(s,e,i):typeof s=="function"&&(e[i]=s)}return e}const Ak={run:t=>t()},Rk=()=>Ak,zT=typeof console.createTask<"u"?console.createTask:Rk;function Pk(t,e){const n=e.shift(),r=zT(n);return t.reduce((s,i)=>s.then(()=>r.run(()=>i(...e))),Promise.resolve())}function Ck(t,e){const n=e.shift(),r=zT(n);return Promise.all(t.map(s=>r.run(()=>s(...e))))}function Nf(t,e){for(const n of[...t])n(e)}class Sk{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,n,r={}){if(!e||typeof n!="function")return()=>{};const s=e;let i;for(;this._deprecatedHooks[e];)i=this._deprecatedHooks[e],e=i.to;if(i&&!r.allowDeprecated){let o=i.message;o||(o=`${s} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(o)||(console.warn(o),this._deprecatedMessages.add(o))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(n),()=>{n&&(this.removeHook(e,n),n=void 0)}}hookOnce(e,n){let r,s=(...i)=>(typeof r=="function"&&r(),r=void 0,s=void 0,n(...i));return r=this.hook(e,s),r}removeHook(e,n){if(this._hooks[e]){const r=this._hooks[e].indexOf(n);r!==-1&&this._hooks[e].splice(r,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,n){this._deprecatedHooks[e]=typeof n=="string"?{to:n}:n;const r=this._hooks[e]||[];delete this._hooks[e];for(const s of r)this.hook(e,s)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const n in e)this.deprecateHook(n,e[n])}addHooks(e){const n=Gd(e),r=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of r.splice(0,r.length))s()}}removeHooks(e){const n=Gd(e);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...n){return n.unshift(e),this.callHookWith(Pk,e,...n)}callHookParallel(e,...n){return n.unshift(e),this.callHookWith(Ck,e,...n)}callHookWith(e,n,...r){const s=this._before||this._after?{name:n,args:r,context:{}}:void 0;
23this._before&&Nf(this._before,s);const i=e(n in this._hooks?[...this._hooks[n]]:[],r);return i instanceof Promise?i.finally(()=>{this._after&&s&&Nf(this._after,s)}):(this._after&&s&&Nf(this._after,s),i)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const n=this._before.indexOf(e);n!==-1&&this._before.splice(n,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const n=this._after.indexOf(e);n!==-1&&this._after.splice(n,1)}}}}function GT(){return new Sk}function Dk(t={}){let e,n=!1;const r=o=>{if(e&&e!==o)throw new Error("Context conflict")};let s;if(t.asyncContext){const o=t.AsyncLocalStorage||globalThis.AsyncLocalStorage;o?s=new o:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const i=()=>{if(s&&e===void 0){const o=s.getStore();if(o!==void 0)return o}return e};return{use:()=>{const o=i();if(o===void 0)throw new Error("Context is not available");return o},tryUse:()=>i(),set:(o,a)=>{a||r(o),e=o,n=!0},unset:()=>{e=void 0,n=!1},call:(o,a)=>{r(o),e=o;try{return s?s.run(o,a):a()}finally{n||(e=void 0)}},async callAsync(o,a){e=o;const l=()=>{e=o},c=()=>e===o?l:void 0;Qd.add(c);try{const u=s?s.run(o,a):a();return n||(e=void 0),await u}finally{Qd.delete(c)}}}}function kk(t={}){const e={};return{get(n,r={}){return e[n]||(e[n]=Dk({...t,...r})),e[n],e[n]}}}const Pu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},Ay="__unctx__",Ok=Pu[Ay]||(Pu[Ay]=kk()),Mk=(t,e={})=>Ok.get(t,e),Ry="__unctx_async_handlers__",Qd=Pu[Ry]||(Pu[Ry]=new Set);function ll(t){const e=[];for(const s of Qd){const i=s();i&&e.push(i)}const n=()=>{for(const s of e)s()};let r=t();return r&&typeof r=="object"&&"catch"in r&&(r=r.catch(s=>{throw n(),s})),[r,n]}const QT=Mk("nuxt-app",{asyncContext:!1}),Nk="__nuxt_plugin";function Lk(t){let e=0;const n={_scope:tS(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.10.3"},get vue(){return n.vueApp.version}},payload:Kn({data:{},state:{},once:new Set,_errors:{},...window.__NUXT__??{}}),static:{data:{}},runWithContext:s=>n._scope.run(()=>$k(n,s)),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};e++;let s=!1;return()=>{if(!s&&(s=!0,e--,e===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},_payloadRevivers:{},...t};n.hooks=GT(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(s,i)=>{const o="$"+s;Cc(n,o,i),Cc(n.vueApp.config.globalProperties,o,i)},Cc(n.vueApp,"$nuxt",n),Cc(n.vueApp.config.globalProperties,"$nuxt",n);{window.addEventListener("nuxt.preloadError",i=>{n.callHook("app:chunkError",{error:i.payload})}),window.useNuxtApp=window.useNuxtApp||Ge;const s=n.hook("app:error",(...i)=>{console.error("[nuxt] error caught during app initialization",...i)});n.hook("app:mounted",s)}const r=Kn(n.payload.config);return n.provide("config",r),n}async function xk(t,e){if(e.hooks&&t.hooks.addHooks(e.hooks),typeof e=="function"){const{provide:n}=await t.runWithContext(()=>e(t))||{};if(n&&typeof n=="object")for(const r in n)t.provide(r,n[r])}}async function Vk(t,e){const n=[],r=[],s=[],i=[];let o=0;async function a(l){var u;const c=((u=l.dependsOn)==null?void 0:u.filter(h=>e.some(f=>f._name===h)&&!n.includes(h)))??[];if(c.length>0)r.push([new Set(c),l]);else{const h=xk(t,l).then(async()=>{l._name&&(n.push(l._name),await Promise.all(r.map(async([f,d])=>{f.has(l._name)&&(f.delete(l._name),f.size===0&&(o++,await a(d)))})))});l.parallel?s.push(h.catch(f=>i.push(f))):await h}}for(const l of e)await a(l);if(await Promise.all(s),o)for(let l=0;l<o;l++)await Promise.all(s);if(i.length)throw i[0]}function Xn(t){if(typeof t=="function")return t;const e=t._name||t.name;return delete t.name,Object.assign(t.setup||(()=>{}),t,{[Nk]:!0,_name:e})}function $k(t,e,n){const r=()=>n?e(...n):e();return QT.set(t),t.vueApp.runWithContext(r)}function Fk(){var e;let t;return oT()&&(t=(e=Zr())==null?void 0:e.appContext.app.$nuxt),t=t||QT.tryUse(),t||null}function Ge(){const t=Fk();if(!t)throw new Error("[nuxt] instance unavailable");return t}function Ei(t){return Ge().$config}function Cc(t,e,n){Object.defineProperty(t,e,{get:()=>n})}function Uk(t){return{ctx:{table:t},matchAll:e=>JT(e,t)}}function XT(t){const e={};for(const n in t)e[n]=n==="dynamic"?new Map(Object.entries(t[n]).map(([r,s])=>[r,XT(s)])):new Map(Object.entries(t[n]));return e}function Bk(t){return Uk(XT(t))}function JT(t,e){const n=[];for(const[s,i]of Py(e.wildcard))t.startsWith(s)&&n.push(i);for(const[s,i]of Py(e.dynamic))if(t.startsWith(s+"/")){const o="/"+t.slice(s.length).split("/").splice(2).join("/");n.push(...JT(o,i))}const r=e.static.get(t);
23return r&&n.push(r),n.filter(Boolean)}function Py(t){return[...t.entries()].sort((e,n)=>e[0].length-n[0].length)}function Lf(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Xd(t,e,n=".",r){if(!Lf(e))return Xd(t,{},n,r);const s=Object.assign({},e);for(const i in t){if(i==="__proto__"||i==="constructor")continue;const o=t[i];o!=null&&(r&&r(s,i,o,n)||(Array.isArray(o)&&Array.isArray(s[i])?s[i]=[...o,...s[i]]:Lf(o)&&Lf(s[i])?s[i]=Xd(o,s[i],(n?`${n}.`:"")+i.toString(),r):s[i]=o))}return s}function ZT(t){return(...e)=>e.reduce((n,r)=>Xd(n,r,"",t),{})}const e0=ZT(),Hk=ZT((t,e,n)=>{if(t[e]!==void 0&&typeof n=="function")return t[e]=n(t[e]),!0});function jk(t,e){try{return e in t}catch{return!1}}var Wk=Object.defineProperty,Yk=(t,e,n)=>e in t?Wk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xs=(t,e,n)=>(Yk(t,typeof e!="symbol"?e+"":e,n),n);
23class Jd extends Error{constructor(e,n={}){super(e,n),Xs(this,"statusCode",500),Xs(this,"fatal",!1),Xs(this,"unhandled",!1),Xs(this,"statusMessage"),Xs(this,"data"),Xs(this,"cause"),n.cause&&!this.cause&&(this.cause=n.cause)}toJSON(){const e={message:this.message,statusCode:ep(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=t0(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}}Xs(Jd,"__h3_error__",!0);function Zd(t){if(typeof t=="string")return new Jd(t);if(qk(t))return t;const e=new Jd(t.message??t.statusMessage??"",{cause:t.cause||t});if(jk(t,"stack"))try{Object.defineProperty(e,"stack",{get(){return t.stack}})}catch{try{e.stack=t.stack}catch{}}if(t.data&&(e.data=t.data),t.statusCode?e.statusCode=ep(t.statusCode,e.statusCode):t.status&&(e.statusCode=ep(t.status,e.statusCode)),t.statusMessage?e.statusMessage=t.statusMessage:t.statusText&&(e.statusMessage=t.statusText),e.statusMessage){const n=e.statusMessage;t0(e.statusMessage)!==n&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return t.fatal!==void 0&&(e.fatal=t.fatal),t.unhandled!==void 0&&(e.unhandled=t.unhandled),e}function qk(t){var e;return((e=t==null?void 0:t.constructor)==null?void 0:e.__h3_error__)===!0}const Kk=/[^\u0009\u0020-\u007E]/g;function t0(t=""){return t.replace(Kk,"")}function ep(t,e=200){return!t||(typeof t=="string"&&(t=Number.parseInt(t,10)),t<100||t>999)?e:t}const n0=Symbol("layout-meta"),Bl=Symbol("route"),Jn=()=>{var t;return(t=Ge())==null?void 0:t.$router},Sm=()=>oT()?bt(Bl,Ge()._route):Ge()._route;function pee(t){return t}const zk=()=>{try{if(Ge()._processingMiddleware)return!0}catch{return!0}return!1},mee=(t,e)=>{t||(t="/");const n=typeof t=="string"?t:jT(t.path||"/",t.query||{})+(t.hash||"");if(e!=null&&e.open){{const{target:a="_blank",windowFeatures:l={}}=e.open,c=Object.entries(l).filter(([u,h])=>h!==void 0).map(([u,h])=>`${u.toLowerCase()}=${h}`).join(", ");open(n,a,c)}return Promise.resolve()}const r=(e==null?void 0:e.external)||Fl(n,{acceptRelative:!0});if(r){if(!(e!=null&&e.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const a=Ih(n).protocol;if(a&&QD(a))throw new Error(`Cannot navigate to a URL with '${a}' protocol.`)}const s=zk();if(!r&&s)return t;const i=Jn(),o=Ge();return r?(o._scope.stop(),e!=null&&e.replace?location.replace(n):location.href=n,s?o.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):e!=null&&e.replace?i.replace(t):i.push(t)},r0="__nuxt_error",Ah=()=>co(Ge().payload,"error"),Zi=t=>{const e=Rh(t);try{const n=Ge(),r=Ah();n.hooks.callHook("app:error",e),r.value=r.value||e}catch{throw e}return e},Gk=async(t={})=>{const e=Ge(),n=Ah();e.callHook("app:error:cleared",t),t.redirect&&await Jn().replace(t.redirect),n.value=null},Qk=t=>!!t&&typeof t=="object"&&r0 in t,Rh=t=>{const e=Zd(t);return Object.defineProperty(e,r0,{value:!0,configurable:!1,writable:!1}),e},Xk="modulepreload",Jk=function(t,e){return t[0]==="."?new URL(t,e).href:t},Cy={},Zk=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link");s=Promise.all(n.map(o=>{if(o=Jk(o,r),o in Cy)return;Cy[o]=!0;const a=o.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!r)for(let h=i.length-1;h>=0;h--){const f=i[h];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Xk,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((h,f)=>{u.addEventListener("load",h),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})}))}return s.then(()=>e()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},tt=(...t)=>Zk(...t).catch(e=>{const n=new Event("nuxt.preloadError");throw n.payload=e,window.dispatchEvent(n),e}),eO=-1,tO=-2,nO=-3,rO=-4,sO=-5,iO=-6;function oO(t,e){return aO(JSON.parse(t),e)}function aO(t,e){if(typeof t=="number")return s(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function s(i,o=!1){if(i===eO)return;if(i===nO)return NaN;if(i===rO)return 1/0;if(i===sO)return-1/0;if(i===iO)return-0;if(o)throw new Error("Invalid input");if(i in r)return r[i];const a=n[i];if(!a||typeof a!="object")r[i]=a;else if(Array.isArray(a))if(typeof a[0]=="string"){const l=a[0],c=e==null?void 0:e[l];
23if(c)return r[i]=c(s(a[1]));switch(l){case"Date":r[i]=new Date(a[1]);break;case"Set":const u=new Set;r[i]=u;for(let d=1;d<a.length;d+=1)u.add(s(a[d]));break;case"Map":const h=new Map;r[i]=h;for(let d=1;d<a.length;d+=2)h.set(s(a[d]),s(a[d+1]));break;case"RegExp":r[i]=new RegExp(a[1],a[2]);break;case"Object":r[i]=Object(a[1]);break;case"BigInt":r[i]=BigInt(a[1]);break;case"null":const f=Object.create(null);r[i]=f;for(let d=1;d<a.length;d+=2)f[a[d]]=s(a[d+1]);break;default:throw new Error(`Unknown type ${l}`)}}else{const l=new Array(a.length);r[i]=l;for(let c=0;c<a.length;c+=1){const u=a[c];u!==tO&&(l[c]=s(u))}}else{const l={};r[i]=l;for(const c in a){const u=a[c];l[c]=s(u)}}return r[i]}return s(0)}function lO(t){return Array.isArray(t)?t:[t]}const cO=["title","titleTemplate","script","style","noscript"],Xc=["base","meta","link","style","script","noscript"],uO=["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"],hO=["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"],s0=["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"],fO=typeof window<"u";function Dm(t){let e=9;for(let n=0;n<t.length;)e=Math.imul(e^t.charCodeAt(n++),9**9);return((e^e>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Sy(t){return t._h||Dm(t._d?t._d:`${t.tag}:${t.textContent||t.innerHTML||""}:${Object.entries(t.props).map(([e,n])=>`${e}:${String(n)}`).join(",")}`)}function i0(t,e){const{props:n,tag:r}=t;if(hO.includes(r))return r;if(r==="link"&&n.rel==="canonical")return"canonical";if(n.charset)return"charset";const s=["id"];r==="meta"&&s.push("name","property","http-equiv");for(const i of s)if(typeof n[i]<"u"){const o=String(n[i]);return e&&!e(o)?!1:`${r}:${i}:${o}`}return!1}function Dy(t,e){return t==null?e||null:typeof t=="function"?t(e):t}async function dO(t,e,n){const r={tag:t,props:await o0(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[["script","noscript","style"].includes(t)?"innerHTML":"textContent"]:e},["templateParams","titleTemplate"].includes(t))};return s0.forEach(s=>{const i=typeof r.props[s]<"u"?r.props[s]:n[s];typeof i<"u"&&((!["innerHTML","textContent","children"].includes(s)||cO.includes(r.tag))&&(r[s==="children"?"innerHTML":s]=i),delete r.props[s])}),r.props.body&&(r.tagPosition="bodyClose",delete r.props.body),r.tag==="script"&&typeof r.innerHTML=="object"&&(r.innerHTML=JSON.stringify(r.innerHTML),r.props.type=r.props.type||"application/json"),Array.isArray(r.props.content)?r.props.content.map(s=>({...r,props:{...r.props,content:s}})):r}function pO(t){return typeof t=="object"&&!Array.isArray(t)&&(t=Object.keys(t).filter(e=>t[e])),(Array.isArray(t)?t.join(" "):t).split(" ").filter(e=>e.trim()).filter(Boolean).join(" ")}async function o0(t,e){for(const n of Object.keys(t)){if(n==="class"){t[n]=pO(t[n]);continue}if(t[n]instanceof Promise&&(t[n]=await t[n]),!e&&!s0.includes(n)){const r=String(t[n]),s=n.startsWith("data-");r==="true"||r===""?t[n]=s?"true":!0:t[n]||(s&&r==="false"?t[n]="false":delete t[n])}}return t}const mO=10;async function gO(t){const e=[];return Object.entries(t.resolvedInput).filter(([n,r])=>typeof r<"u"&&uO.includes(n)).forEach(([n,r])=>{const s=lO(r);e.push(...s.map(i=>dO(n,i,t)).flat())}),(await Promise.all(e)).flat().filter(Boolean).map((n,r)=>(n._e=t._i,t.mode&&(n._m=t.mode),n._p=(t._i<<mO)+r,n))}const ky={base:-10,title:10},Oy={critical:-80,high:-10,low:20};function Cu(t){let e=100;const n=t.tagPriority;return typeof n=="number"?n:(t.tag==="meta"?(t.props["http-equiv"]==="content-security-policy"&&(e=-30),t.props.charset&&(e=-20),t.props.name==="viewport"&&(e=-15)):t.tag==="link"&&t.props.rel==="preconnect"?e=20:t.tag in ky&&(e=ky[t.tag]),typeof n=="string"&&n in Oy?e+Oy[n]:e)}const vO=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],a0=["onload","onerror","onabort","onprogress","onloadstart"],as="%separator";function Jc(t,e,n){if(typeof t!="string"||!t.includes("%"))return t;function r(o){let a;return["s","pageTitle"].includes(o)?a=e.pageTitle:o.includes(".")?a=o.split(".").reduce((l,c)=>l&&l[c]||void 0,e):a=e[o],typeof a<"u"?(a||"").replace(/"/g,'\\"'):!1}let s=t;try{s=decodeURI(t)}catch{}return(s.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEac
23h(o=>{const a=r(o.slice(1));typeof a=="string"&&(t=t.replace(new RegExp(`\\${o}(\\W|$)`,"g"),(l,c)=>`${a}${c}`).trim())}),t.includes(as)&&(t.endsWith(as)&&(t=t.slice(0,-as.length).trim()),t.startsWith(as)&&(t=t.slice(as.length).trim()),t=t.replace(new RegExp(`\\${as}\\s*\\${as}`,"g"),as),t=Jc(t,{separator:n},n)),t}async function l0(t,e={}){var u;const n=e.document||t.resolvedOptions.document;if(!n)return;const r={shouldRender:t.dirty,tags:[]};if(await t.hooks.callHook("dom:beforeRender",r),!r.shouldRender)return;const s=(await t.resolveTags()).map(h=>({tag:h,id:Xc.includes(h.tag)?Sy(h):h.tag,shouldRender:!0}));let i=t._dom;if(!i){i={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};for(const h of["body","head"]){const f=(u=n==null?void 0:n[h])==null?void 0:u.children,d=[];for(const p of[...f].filter(v=>Xc.includes(v.tagName.toLowerCase()))){const v={tag:p.tagName.toLowerCase(),props:await o0(p.getAttributeNames().reduce((E,y)=>({...E,[y]:p.getAttribute(y)}),{})),innerHTML:p.innerHTML};let m=1,g=i0(v);for(;g&&d.find(E=>E._d===g);)g=`${g}:${m++}`;v._d=g||void 0,d.push(v),i.elMap[p.getAttribute("data-hid")||Sy(v)]=p}}}i.pendingSideEffects={...i.sideEffects||{}},i.sideEffects={};function o(h,f,d){const p=`${h}:${f}`;i.sideEffects[p]=d,delete i.pendingSideEffects[p]}function a({id:h,$el:f,tag:d}){const p=d.tag.endsWith("Attrs");i.elMap[h]=f,p||(["textContent","innerHTML"].forEach(v=>{d[v]&&d[v]!==f[v]&&(f[v]=d[v])}),o(h,"el",()=>{var v;(v=i.elMap[h])==null||v.remove(),delete i.elMap[h]})),Object.entries(d.props).forEach(([v,m])=>{const g=`attr:${v}`;if(v==="class")for(const E of(m||"").split(" ").filter(Boolean))p&&o(h,`${g}:${E}`,()=>f.classList.remove(E)),!f.classList.contains(E)&&f.classList.add(E);else if(v==="style")for(const E of m.split(";").filter(Boolean)){const[y,w]=E.split(":").map(I=>I.trim());o(h,`${g}:${E}:${y}`,()=>{f.style.removeProperty(y)}),f.style.setProperty(y,w)}else f.getAttribute(v)!==m&&f.setAttribute(v,m===!0?"":String(m)),p&&o(h,g,()=>f.removeAttribute(v))})}const l=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const h of s){const{tag:f,shouldRender:d,id:p}=h;if(d){if(f.tag==="title"){n.title=f.textContent;continue}h.$el=h.$el||i.elMap[p],h.$el?a(h):Xc.includes(f.tag)&&l.push(h)}}for(const h of l){const f=h.tag.tagPosition||"head";h.$el=n.createElement(h.tag.tag),a(h),c[f]=c[f]||n.createDocumentFragment(),c[f].appendChild(h.$el)}for(const h of s)await t.hooks.callHook("dom:renderTag",h,n,o);c.head&&n.head.appendChild(c.head),c.bodyOpen&&n.body.insertBefore(c.bodyOpen,n.body.firstChild),c.bodyClose&&n.body.appendChild(c.bodyClose),Object.values(i.pendingSideEffects).forEach(h=>h()),t._dom=i,t.dirty=!1,await t.hooks.callHook("dom:rendered",{renders:s})}async function yO(t,e={}){const n=e.delayFn||(r=>setTimeout(r,10));return t._domUpdatePromise=t._domUpdatePromise||new Promise(r=>n(async()=>{await l0(t,e),delete t._domUpdatePromise,r()}))}function _O(t){return e=>{var r,s;const n=((s=(r=e.resolvedOptions.document)==null?void 0:r.head.querySelector('script[id="unhead:payload"]'))==null?void 0:s.innerHTML)||!1;return n&&e.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":function(i){yO(i,t)}}}}}const wO=["templateParams","htmlAttrs","bodyAttrs"],EO={hooks:{"tag:normalise":function({tag:t}){["hid","vmid","key"].forEach(r=>{t.props[r]&&(t.key=t.props[r],delete t.props[r])});const n=i0(t)||(t.key?`${t.tag}:${t.key}`:!1);n&&(t._d=n)},"tags:resolve":function(t){const e={};t.tags.forEach(r=>{const s=(r.key?`${r.tag}:${r.key}`:r._d)||r._p,i=e[s];if(i){let a=r==null?void 0:r.tagDuplicateStrategy;if(!a&&wO.includes(r.tag)&&(a="merge"),a==="merge"){const l=i.props;["class","style"].forEach(c=>{l[c]&&(r.props[c]?(c==="style"&&!l[c].endsWith(";")&&(l[c]+=";"),r.props[c]=`${l[c]} ${r.props[c]}`):r.props[c]=l[c])}),e[s].props={...l,...r.props};return}else if(r._e===i._e){i._duped=i._duped||[],r._d=`${i._d}:${i._duped.length+1}`,i._duped.push(r);return}else if(Cu(r)>Cu(i))return}const o=Object.keys(r.props).length+(r.innerHTML?1:0)+(r.textContent?1:0);if(Xc.includes(r.tag)&&o===0){delete e[s];return}e[s]=r});const n=[];Object.values(e).forEach(r=>{const s=r._duped;delete r._duped,n.push(r),s&&n.push(...s)}),t.tags=n,t.tags=t.tags.filter(r=>!(r.tag==="meta"&&(r.props.name||r.props.property)&&!r.props.content))}}},bO={mode:"server",hooks:{"tags:resolve":function(t){const e={};t.tags.filter(n=>["titleTemplate","templateParams","title"].includes(n.tag)&&n._m==="server").forEach(n=>{e[n.tag]=n.tag.startsWith("title")?n.textContent:n.props}),Object.keys(e).length&&t.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},TO=["script","link","bodyAttrs"];function IO(t){const e={},n={};
23return Object.entries(t.props).forEach(([r,s])=>{r.startsWith("on")&&typeof s=="function"?(a0.includes(r)&&(e[r]=`this.dataset.${r} = true`),n[r]=s):e[r]=s}),{props:e,eventHandlers:n}}const AO=t=>({hooks:{"tags:resolve":function(e){for(const n of e.tags)if(TO.includes(n.tag)){const{props:r,eventHandlers:s}=IO(n);n.props=r,Object.keys(s).length&&((n.props.src||n.props.href)&&(n.key=n.key||Dm(n.props.src||n.props.href)),n._eventHandlers=s)}},"dom:renderTag":function(e,n,r){if(!e.tag._eventHandlers)return;const s=e.tag.tag==="bodyAttrs"?n.defaultView:e.$el;Object.entries(e.tag._eventHandlers).forEach(([i,o])=>{const a=`${e.tag._d||e.tag._p}:${i}`,l=i.slice(2).toLowerCase(),c=`data-h-${l}`;if(r(e.id,a,()=>{}),e.$el.hasAttribute(c))return;e.$el.setAttribute(c,"");let u;const h=f=>{o(f),u==null||u.disconnect()};i in e.$el.dataset?h(new Event(i.replace("on",""))):a0.includes(i)&&typeof MutationObserver<"u"?(u=new MutationObserver(f=>{f.some(p=>p.attributeName===`data-${i}`)&&(h(new Event(i.replace("on",""))),u==null||u.disconnect())}),u.observe(e.$el,{attributes:!0})):s.addEventListener(l,h),r(e.id,a,()=>{u==null||u.disconnect(),s.removeEventListener(l,h),e.$el.removeAttribute(c)})})}}}),RO=["link","style","script","noscript"],PO={hooks:{"tag:normalise":({tag:t})=>{t.key&&RO.includes(t.tag)&&(t.props["data-hid"]=t._h=Dm(t.key))}}},CO={hooks:{"tags:resolve":t=>{const e=n=>{var r;return(r=t.tags.find(s=>s._d===n))==null?void 0:r._p};for(const{prefix:n,offset:r}of vO)for(const s of t.tags.filter(i=>typeof i.tagPriority=="string"&&i.tagPriority.startsWith(n))){const i=e(s.tagPriority.replace(n,""));typeof i<"u"&&(s._p=i+r)}t.tags.sort((n,r)=>n._p-r._p).sort((n,r)=>Cu(n)-Cu(r))}}},SO={meta:"content",link:"href",htmlAttrs:"lang"},DO=t=>({hooks:{"tags:resolve":e=>{var a;const{tags:n}=e,r=(a=n.find(l=>l.tag==="title"))==null?void 0:a.textContent,s=n.findIndex(l=>l.tag==="templateParams"),i=s!==-1?n[s].props:{},o=i.separator||"|";delete i.separator,i.pageTitle=Jc(i.pageTitle||r||"",i,o);for(const l of n.filter(c=>c.processTemplateParams!==!1)){const c=SO[l.tag];c&&typeof l.props[c]=="string"?l.props[c]=Jc(l.props[c],i,o):(l.processTemplateParams===!0||["titleTemplate","title"].includes(l.tag))&&["innerHTML","textContent"].forEach(u=>{typeof l[u]=="string"&&(l[u]=Jc(l[u],i,o))})}t._templateParams=i,t._separator=o,e.tags=n.filter(l=>l.tag!=="templateParams")}}}),kO={hooks:{"tags:resolve":t=>{const{tags:e}=t;let n=e.findIndex(s=>s.tag==="titleTemplate");const r=e.findIndex(s=>s.tag==="title");if(r!==-1&&n!==-1){const s=Dy(e[n].textContent,e[r].textContent);s!==null?e[r].textContent=s||e[r].textContent:delete e[r]}else if(n!==-1){const s=Dy(e[n].textContent);s!==null&&(e[n].textContent=s,e[n].tag="title",n=-1)}n!==-1&&delete e[n],t.tags=e.filter(Boolean)}}},OO={hooks:{"tags:afterResolve":function(t){for(const e of t.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&["application/ld+json","application/json"].includes(e.props.type)?e.innerHTML=e.innerHTML.replace(/</g,"\\u003C"):e.innerHTML=e.innerHTML.replace(new RegExp(`</${e.tag}`,"g"),`<\\/${e.tag}`))}}};let c0;function MO(t={}){const e=NO(t);return e.use(_O()),c0=e}function My(t,e){return!t||t==="server"&&e||t==="client"&&!e}function NO(t={}){const e=GT();e.addHooks(t.hooks||{}),t.document=t.document||(fO?document:void 0);const n=!t.document,r=()=>{a.dirty=!0,e.callHook("entries:updated",a)};let s=0,i=[];const o=[],a={plugins:o,dirty:!1,resolvedOptions:t,hooks:e,headEntries(){return i},use(l){const c=typeof l=="function"?l(a):l;(!c.key||!o.some(u=>u.key===c.key))&&(o.push(c),My(c.mode,n)&&e.addHooks(c.hooks||{}))},push(l,c){c==null||delete c.head;const u={_i:s++,input:l,...c};return My(u.mode,n)&&(i.push(u),r()),{dispose(){i=i.filter(h=>h._i!==u._i),e.callHook("entries:updated",a),r()},patch(h){i=i.map(f=>(f._i===u._i&&(f.input=u.input=h),f)),r()}}},async resolveTags(){const l={tags:[],entries:[...i]};await e.callHook("entries:resolve",l);for(const c of l.entries){const u=c.resolvedInput||c.input;if(c.resolvedInput=await(c.transform?c.transform(u):u),c.resolvedInput)for(const h of await gO(c)){const f={tag:h,entry:c,resolvedOptions:a.resolvedOptions};await e.callHook("tag:normalise",f),l.tags.push(f.tag)}}return await e.callHook("tags:beforeResolve",l),await e.callHook("tags:resolve",l),await e.callHook("tags:afterResolve",l),l.tags},ssr:n};return[EO,bO,AO,PO,CO,DO,kO,OO,...(t==null?void 0:t.plugins)||[]].forEac
23h(l=>a.use(l)),a.hooks.callHook("init",a),a}function LO(){return c0}const xO=IT.startsWith("3");function VO(t){return typeof t=="function"?t():N(t)}function tp(t,e=""){if(t instanceof Promise)return t;const n=VO(t);return!t||!n?n:Array.isArray(n)?n.map(r=>tp(r,e)):typeof n=="object"?Object.fromEntries(Object.entries(n).map(([r,s])=>r==="titleTemplate"||r.startsWith("on")?[r,N(s)]:[r,tp(s,r)])):n}const $O={hooks:{"entries:resolve":function(t){for(const e of t.entries)e.resolvedInput=tp(e.input)}}},u0="usehead";function FO(t){return{install(n){xO&&(n.config.globalProperties.$unhead=t,n.config.globalProperties.$head=t,n.provide(u0,t))}}.install}function UO(t={}){t.domDelayFn=t.domDelayFn||(n=>kn(()=>setTimeout(()=>n(),0)));const e=MO(t);return e.use($O),e.install=FO(e),e}const np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},rp="__unhead_injection_handler__";function BO(t){np[rp]=t}function gee(){if(rp in np)return np[rp]();const t=bt(u0);return t||LO()}const HO={nuxt:{buildId:"33d72854-8a4d-4b69-8ffb-5671f175527b"}},jO=Hk(HO);
23function WO(){const t=Ge();return t._appConfig||(t._appConfig=Kn(jO)),t._appConfig}const YO=!1,sp=!1,qO=!1,vee={componentName:"NuxtLink"},yee={deep:!0},_ee={},KO="#__nuxt";let Zc,h0;function zO(){var e;const t=(e=WO().nuxt)==null?void 0:e.buildId;return Zc=$fetch(Pm(`builds/meta/${t}.json`)),Zc.then(n=>{h0=Bk(n.matcher)}),Zc}function Ph(){return Zc||zO()}async function f0(t){return await Ph(),e0({},...h0.matchAll(t).reverse())}function Ny(t,e={}){const n=GO(t,e),r=Ge(),s=r._payloadCache=r._payloadCache||{};return n in s||(s[n]=QO(t).then(i=>i?d0(n).then(o=>o||(delete s[n],null)):(s[n]=null,null))),s[n]}const Ly="json";function GO(t,e={}){const n=new URL(t,"http://localhost");if(n.host!=="localhost"||Fl(n.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+t);const r=e.hash||(e.fresh?Date.now():"");return Ul(Ei().app.baseURL,n.pathname,r?`_payload.${r}.${Ly}`:`_payload.${Ly}`)}async function d0(t){const e=fetch(t).then(n=>n.text().then(p0));try{return await e}catch(n){console.warn("[nuxt] Cannot load payload ",t,n)}return null}async function QO(t=Sm().path){if(t=Rm(t),(await Ph()).prerendered.includes(t))return!0;const n=await f0(t);return!!n.prerender&&!n.redirect}let Sc=null;async function XO(){if(Sc)return Sc;const t=document.getElementById("__NUXT_DATA__");if(!t)return{};const e=await p0(t.textContent||""),n=t.dataset.src?await d0(t.dataset.src):void 0;return Sc={...e,...n,...window.__NUXT__},Sc}async function p0(t){return await oO(t,Ge()._payloadRevivers)}function JO(t,e){Ge()._payloadRevivers[t]=e}const xy={NuxtError:t=>Rh(t),EmptyShallowRef:t=>el(t==="_"?void 0:t==="0n"?BigInt(0):Ru(t)),EmptyRef:t=>He(t==="_"?void 0:t==="0n"?BigInt(0):Ru(t)),ShallowRef:t=>el(t),ShallowReactive:t=>Ml(t),Ref:t=>He(t),Reactive:t=>Kn(t)},ZO=Xn({name:"nuxt:revive-payload:client",order:-30,async setup(t){let e,n;for(const r in xy)JO(r,xy[r]);Object.assign(t.payload,([e,n]=ll(()=>t.runWithContext(XO)),e=await e,n(),e)),window.__NUXT__=t.payload}}),eM=[],tM=Xn({name:"nuxt:head",enforce:"pre",setup(t){const e=UO({plugins:eM});BO(()=>Ge().vueApp._context.provides.usehead),t.vueApp.use(e);{let n=!0;const r=async()=>{n=!1,await l0(e)};e.hooks.hook("dom:beforeRender",s=>{s.shouldRender=!n}),t.hooks.hook("page:start",()=>{n=!0}),t.hooks.hook("page:finish",()=>{t.isHydrating||r()}),t.hooks.hook("app:error",r),t.hooks.hook("app:suspense:resolve",r)}}});/*!
24  * vue-router v4.3.0
25  * (c) 2024 Eduardo San Martin Morote
26  * @license MIT
27  */const zi=typeof document<"u";function nM(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const je=Object.assign;function xf(t,e){const n={};for(const r in e){const s=e[r];n[r]=rr(s)?s.map(t):t(s)}return n}const $a=()=>{},rr=Array.isArray,m0=/#/g,rM=/&/g,sM=/\//g,iM=/=/g,oM=/\?/g,g0=/\+/g,aM=/%5B/g,lM=/%5D/g,v0=/%5E/g,cM=/%60/g,y0=/%7B/g,uM=/%7C/g,_0=/%7D/g,hM=/%20/g;function km(t){return encodeURI(""+t).replace(uM,"|").replace(aM,"[").replace(lM,"]")}function fM(t){return km(t).replace(y0,"{").replace(_0,"}").replace(v0,"^")}function ip(t){return km(t).replace(g0,"%2B").replace(hM,"+").replace(m0,"%23").replace(rM,"%26").replace(cM,"`").replace(y0,"{").replace(_0,"}").replace(v0,"^")}function dM(t){return ip(t).replace(iM,"%3D")}function pM(t){return km(t).replace(m0,"%23").replace(oM,"%3F")}function mM(t){return t==null?"":pM(t).replace(sM,"%2F")}function cl(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const gM=/\/$/,vM=t=>t.replace(gM,"");function Vf(t,e,n="/"){let r,s={},i="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=e.slice(0,l),i=e.slice(l+1,a>-1?a:e.length),s=t(i)),a>-1&&(r=r||e.slice(0,a),o=e.slice(a,e.length)),r=EM(r??e,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:cl(o)}}function yM(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Vy(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function _M(t,e,n){const r=e.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Po(e.matched[r],n.matched[s])&&w0(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Po(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function w0(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!wM(t[n],e[n]))return!1;return!0}function wM(t,e){return rr(t)?$y(t,e):rr(e)?$y(e,t):t===e}function $y(t,e){return rr(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t.length===1&&t[0]===e}function EM(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o).join("/")}var ul;(function(t){t.pop="pop",t.push="push"})(ul||(ul={}));var Fa;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Fa||(Fa={}));function bM(t){if(!t)if(zi){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),vM(t)}const TM=/^[^#]+#/;function IM(t,e){return t.replace(TM,"#")+e}function AM(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const Ch=()=>({left:window.scrollX,top:window.scrollY});function RM(t){let e;if("el"in t){const n=t.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=AM(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}
vendor: 4,701 bytes, line 27
27function Fy(t,e){return(history.state?history.state.position-e:-1)+t}const op=new Map;function PM(t,e){op.set(t,e)}function CM(t){const e=op.get(t);return op.delete(t),e}let SM=()=>location.protocol+"//"+location.host;function E0(t,e){const{pathname:n,search:r,hash:s}=e,i=t.indexOf("#");if(i>-1){let a=s.includes(t.slice(i))?t.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Vy(l,"")}return Vy(n,t)+r+s}function DM(t,e,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const d=E0(t,location),p=n.value,v=e.value;let m=0;if(f){if(n.value=d,e.value=f,o&&o===p){o=null;return}m=v?f.position-v.position:0}else r(d);s.forEach(g=>{g(n.value,p,{delta:m,type:ul.pop,direction:m?m>0?Fa.forward:Fa.back:Fa.unknown})})};function l(){o=n.value}function c(f){s.push(f);const d=()=>{const p=s.indexOf(f);p>-1&&s.splice(p,1)};return i.push(d),d}function u(){const{history:f}=window;f.state&&f.replaceState(je({},f.state,{scroll:Ch()}),"")}function h(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:h}}function Uy(t,e,n,r=!1,s=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:s?Ch():null}}function kM(t){const{history:e,location:n}=window,r={value:E0(t,n)},s={value:e.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const h=t.indexOf("#"),f=h>-1?(n.host&&document.querySelector("base")?t:t.slice(h))+l:SM()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),s.value=c}catch(d){console.error(d),n[u?"replace":"assign"](f)}}function o(l,c){const u=je({},e.state,Uy(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});i(l,u,!0),r.value=l}function a(l,c){const u=je({},s.value,e.state,{forward:l,scroll:Ch()});i(u.current,u,!0);const h=je({},Uy(r.value,l,null),{position:u.position+1},c);i(l,h,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function b0(t){t=bM(t);const e=kM(t),n=DM(t,e.state,e.location,e.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=je({location:"",base:t,go:r,createHref:IM.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function OM(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),b0(t)}function MM(t){return typeof t=="string"||t&&typeof t=="object"}function T0(t){return typeof t=="string"||typeof t=="symbol"}const er={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},I0=Symbol("");var By;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(By||(By={}));function Co(t,e){return je(new Error,{type:t,[I0]:!0},e)}function Nr(t,e){return t instanceof Error&&I0 in t&&(e==null||!!(t.type&e))}const Hy="[^/]+?",NM={sensitive:!1,strict:!1,start:!0,end:!0},LM=/[.+*?^${}()[\]/\\]/g;function xM(t,e){const n=je({},NM,e),r=[];let s=n.start?"^":"";const i=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let h=0;h<c.length;h++){const f=c[h];let d=40+(n.sensitive?.25:0);if(f.type===0)h||(s+="/"),s+=f.value.replace(LM,"\\$&"),d+=40;else if(f.type===1){const{value:p,repeatable:v,optional:m,regexp:g}=f;i.push({name:p,repeatable:v,optional:m});const E=g||Hy;if(E!==Hy){d+=10;try{new RegExp(`(${E})`)}catch(w){throw new Error(`Invalid custom RegExp for param "${p}" (${E}): `+w.message)}}let y=v?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;h||(y=m&&c.length<2?`(?:/${y})`:"/"+y),m&&(y+="?"),s+=y,d+=20,m&&(d+=-8),v&&(d+=-20),E===".*"&&(d+=-50)}u.push(d)}r.push(u)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(c){const u=c.match(o),h={};if(!u)return null;for(let f=1;f<u.length;f++){const d=u[f]||"",p=i[f-1];h[p.name]=d&&p.repeatable?d.split("/"):d}return h}function l(c){let u="",h=!1;for(const f of t){(!h||!u.endsWith("/"))&&(u+="/"),h=!1;for(const d of f)if(d.type===0)u+=d.value;else if(d.type===1){const{value:p,repeatable:v,optional:m}=d,g=p in c?c[p]:"";if(rr(g)&&!v)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const E=rr(g)?g.join("/"):g;if(!E)if(m)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):h=!0);else throw new Error(`Missing required param "${p}"`);u+=E}}return u||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}
vendor: 4,983 bytes, line 27
27function VM(t,e){let n=0;for(;n<t.length&&n<e.length;){const r=e[n]-t[n];if(r)return r;n++}return t.length<e.length?t.length===1&&t[0]===80?-1:1:t.length>e.length?e.length===1&&e[0]===80?1:-1:0}function $M(t,e){let n=0;const r=t.score,s=e.score;for(;n<r.length&&n<s.length;){const i=VM(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(jy(r))return 1;if(jy(s))return-1}return s.length-r.length}function jy(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const FM={type:0,value:""},UM=/[a-zA-Z0-9_]/;function BM(t){if(!t)return[[]];if(t==="/")return[[FM]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(d){throw new Error(`ERR (${n})/"${c}": ${d}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,c="",u="";function h(){c&&(n===0?i.push({type:0,value:c}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(c&&h(),o()):l===":"?(h(),n=1):f();break;case 4:f(),n=r;break;case 1:l==="("?n=2:UM.test(l)?f():(h(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:h(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),h(),o(),s}function HM(t,e,n){const r=xM(BM(t.path),n),s=je(r,{record:t,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function jM(t,e){const n=[],r=new Map;e=qy({strict:!1,end:!0,sensitive:!1},e);function s(u){return r.get(u)}function i(u,h,f){const d=!f,p=WM(u);p.aliasOf=f&&f.record;const v=qy(e,u),m=[p];if("alias"in u){const y=typeof u.alias=="string"?[u.alias]:u.alias;for(const w of y)m.push(je({},p,{components:f?f.record.components:p.components,path:w,aliasOf:f?f.record:p}))}let g,E;for(const y of m){const{path:w}=y;if(h&&w[0]!=="/"){const I=h.record.path,A=I[I.length-1]==="/"?"":"/";y.path=h.record.path+(w&&A+w)}if(g=HM(y,h,v),f?f.alias.push(g):(E=E||g,E!==g&&E.alias.push(g),d&&u.name&&!Yy(g)&&o(u.name)),p.children){const I=p.children;for(let A=0;A<I.length;A++)i(I[A],g,f&&f.children[A])}f=f||g,(g.record.components&&Object.keys(g.record.components).length||g.record.name||g.record.redirect)&&l(g)}return E?()=>{o(E)}:$a}function o(u){if(T0(u)){const h=r.get(u);h&&(r.delete(u),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(u);h>-1&&(n.splice(h,1),u.record.name&&r.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function a(){return n}function l(u){let h=0;for(;h<n.length&&$M(u,n[h])>=0&&(u.record.path!==n[h].record.path||!A0(u,n[h]));)h++;n.splice(h,0,u),u.record.name&&!Yy(u)&&r.set(u.record.name,u)}function c(u,h){let f,d={},p,v;if("name"in u&&u.name){if(f=r.get(u.name),!f)throw Co(1,{location:u});v=f.record.name,d=je(Wy(h.params,f.keys.filter(E=>!E.optional).concat(f.parent?f.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),u.params&&Wy(u.params,f.keys.map(E=>E.name))),p=f.stringify(d)}else if(u.path!=null)p=u.path,f=n.find(E=>E.re.test(p)),f&&(d=f.parse(p),v=f.record.name);else{if(f=h.name?r.get(h.name):n.find(E=>E.re.test(h.path)),!f)throw Co(1,{location:u,currentLocation:h});v=f.record.name,d=je({},h.params,u.params),p=f.stringify(d)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:v,path:p,params:d,matched:m,meta:qM(m)}}return t.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:o,getRoutes:a,getRecordMatcher:s}}function Wy(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}function WM(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:YM(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function YM(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const r in t.components)e[r]=typeof n=="object"?n[r]:n;return e}function Yy(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function qM(t){return t.reduce((e,n)=>je(e,n.meta),{})}function qy(t,e){const n={};for(const r in t)n[r]=r in e?e[r]:t[r];return n}function A0(t,e){return e.children.some(n=>n===t||A0(t,n))}function KM(t){const e={};if(t===""||t==="?")return e;const r=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;s<r.length;++s){const i=r[s].replace(g0," "),o=i.indexOf("="),a=cl(o<0?i:i.slice(0,o)),l=o<0?null:cl(i.slice(o+1));if(a in e){let c=e[a];rr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function Ky(t){let e="";for(let n in t){const r=t[n];if(n=dM(n),r==null){r!==void 0&&(e+=(e.length?"&":"")+n);continue}(rr(r)?r.map(i=>
vendor: 6,363 bytes, line 27
27i&&ip(i)):[r&&ip(r)]).forEach(i=>{i!==void 0&&(e+=(e.length?"&":"")+n,i!=null&&(e+="="+i))})}return e}function zM(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=rr(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return e}const GM=Symbol(""),zy=Symbol(""),Om=Symbol(""),Mm=Symbol(""),ap=Symbol("");function da(){let t=[];function e(r){return t.push(r),()=>{const s=t.indexOf(r);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function gs(t,e,n,r,s,i=o=>o()){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(Co(4,{from:n,to:e})):f instanceof Error?l(f):MM(f)?l(Co(2,{from:e,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},u=i(()=>t.call(r&&r.instances[s],e,n,c));let h=Promise.resolve(u);t.length<3&&(h=h.then(c)),h.catch(f=>l(f))})}function $f(t,e,n,r,s=i=>i()){const i=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(QM(l)){const u=(l.__vccOpts||l)[e];u&&i.push(gs(u,n,r,o,a,s))}else{let c=l();i.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const h=nM(u)?u.default:u;o.components[a]=h;const d=(h.__vccOpts||h)[e];return d&&gs(d,n,r,o,a,s)()}))}}return i}function QM(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Gy(t){const e=bt(Om),n=bt(Mm),r=L(()=>e.resolve(N(t.to))),s=L(()=>{const{matched:l}=r.value,{length:c}=l,u=l[c-1],h=n.matched;if(!u||!h.length)return-1;const f=h.findIndex(Po.bind(null,u));if(f>-1)return f;const d=Qy(l[c-2]);return c>1&&Qy(u)===d&&h[h.length-1].path!==d?h.findIndex(Po.bind(null,l[c-2])):f}),i=L(()=>s.value>-1&&eN(n.params,r.value.params)),o=L(()=>s.value>-1&&s.value===n.matched.length-1&&w0(n.params,r.value.params));function a(l={}){return ZM(l)?e[N(t.replace)?"replace":"push"](N(t.to)).catch($a):Promise.resolve()}return{route:r,href:L(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}const XM=et({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Gy,setup(t,{slots:e}){const n=Kn(Gy(t)),{options:r}=bt(Om),s=L(()=>({[Xy(t.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Xy(t.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=e.default&&e.default(n);return t.custom?i:Nn("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),JM=XM;function ZM(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function eN(t,e){for(const n in e){const r=e[n],s=t[n];if(typeof r=="string"){if(r!==s)return!1}else if(!rr(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function Qy(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const Xy=(t,e,n)=>t??e??n,tN=et({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const r=bt(ap),s=L(()=>t.route||r.value),i=bt(zy,0),o=L(()=>{let c=N(i);const{matched:u}=s.value;let h;for(;(h=u[c])&&!h.components;)c++;return c}),a=L(()=>s.value.matched[o.value]);Hn(zy,L(()=>o.value+1)),Hn(GM,a),Hn(ap,s);const l=He();return vt(()=>[l.value,a.value,t.name],([c,u,h],[f,d,p])=>{u&&(u.instances[h]=c,d&&d!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Po(u,d)||!f)&&(u.enterCallbacks[h]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,h=a.value,f=h&&h.components[u];if(!f)return Jy(n.default,{Component:f,route:c});const d=h.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,m=Nn(f,je({},p,e,{onVnodeUnmounted:g=>{g.component.isUnmounted&&(h.instances[u]=null)},ref:l}));return Jy(n.default,{Component:m,route:c})||m}}});function Jy(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const R0=tN;function nN(t){const e=jM(t.routes,t),n=t.parseQuery||KM,r=t.stringifyQuery||Ky,s=t.history,i=da(),o=da(),a=da(),l=el(er);let c=er;zi&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=xf.bind(null,O=>""+O),h=xf.bind(null,mM),f=xf.bind(null,cl);function d(O,G){let z,le;return T0(O)?(z=e.getRecordMatcher(O),le=G):le=O,e.addRoute(le,z)}function p(O){const G=e.getRecordMatcher(O);G&&e.removeRoute(G)}function v(){return e.getRoutes().map(O=>O.record)}function m(O){return!!e.getRecordMatcher(O)}function g(O,G){if(G=je({},G||l.value),typeof O=="string"){const b=Vf(n,O,G.path),k=e.resolve({path:b.path},G),x=s.createHref(b.fullPath);return je(b,k,{params:f(k.params),hash:cl(b.hash),redirectedFrom:void 0,href:x})}let z;if(O.path!=null)z=je({},O,{path:Vf(n,O.path,G.path).path});else{const b=je({},O.params);for(const k in b)b[k]==null&&delete b[k];z=je({},O,{params:h(b)}),G.params=h(G.params)}const le=e.resolve(z,G),be=O.hash||"";le.params=u(f(le.params));const Se=yM(r,je({},O,{hash:fM(be),path:le.path})),_=s.createHref(Se);return je({fullPath:Se,hash:be,query:r===Ky?zM(O.query):O.query||{}},le,{redirectedFrom:void 0,href:_})}function E(O){return typeof O=="string"?Vf(n,O,l.value.path):je({},O)}function y(O,G){if(c!==O)return Co(8,{from:G,to:O})}function w(O){return R(O)}function I(O){return w(je(E(O),{replace:!0}))}function A(O){const G=O.matched[O.matched.length-1];if(G&&G.redirect){const{redirect:z}=G;let le=typeof z=="function"?z(O):z;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=E(le):{path:le},le.params={}),je({query:O.query,hash:O.hash,params:le.path!=null?{}:O.params},le)}}function R(O,G){const z=c=g(O),le=l.value,be=O.state,Se=O.force,_=O.replace===!0,b=A(z);if(b)return R(je(E(b),{state:typeof b=="object"?je({},be,b.state):be,force:Se,replace:_}),G||z);const k=z;k.redirectedFrom=G;let x;return!Se&&_M(r,le,z)&&(x=Co(16,{to:k,from:le}),we(le,le,!0,!1)),(x?Promise.resolve(x):D(k,le)).catch(M=>Nr(M)?Nr(M,2)?M:Y(M):Z(M,k,le)).then(M=>
27{if(M){if(Nr(M,2))return R(je({replace:_},E(M.to),{state:typeof M.to=="object"?je({},be,M.to.state):be,force:Se}),G||k)}else M=S(k,le,!0,_,be);return $(k,le,M),M})}function P(O,G){const z=y(O,G);return z?Promise.reject(z):Promise.resolve()}function C(O){const G=Ce.values().next().value;return G&&typeof G.runWithContext=="function"?G.runWithContext(O):O()}function D(O,G){let z;const[le,be,Se]=rN(O,G);z=$f(le.reverse(),"beforeRouteLeave",O,G);for(const b of le)b.leaveGuards.forEach(k=>{z.push(gs(k,O,G))});const _=P.bind(null,O,G);return z.push(_),ke(z).then(()=>{z=[];for(const b of i.list())z.push(gs(b,O,G));return z.push(_),ke(z)}).then(()=>{z=$f(be,"beforeRouteUpdate",O,G);for(const b of be)b.updateGuards.forEach(k=>{z.push(gs(k,O,G))});return z.push(_),ke(z)}).then(()=>{z=[];for(const b of Se)if(b.beforeEnter)if(rr(b.beforeEnter))for(const k of b.beforeEnter)z.push(gs(k,O,G));else z.push(gs(b.beforeEnter,O,G));return z.push(_),ke(z)}).then(()=>(O.matched.forEach(b=>b.enterCallbacks={}),z=$f(Se,"beforeRouteEnter",O,G,C),z.push(_),ke(z))).then(()=>{z=[];for(const b of o.list())z.push(gs(b,O,G));return z.push(_),ke(z)}).catch(b=>Nr(b,8)?b:Promise.reject(b))}function $(O,G,z){a.list().forEach(le=>C(()=>le(O,G,z)))}function S(O,G,z,le,be){const Se=y(O,G);if(Se)return Se;const _=G===er,b=zi?history.state:{};z&&(le||_?s.replace(O.fullPath,je({scroll:_&&b&&b.scroll},be)):s.push(O.fullPath,be)),l.value=O,we(O,G,z,_),Y()}let V;function oe(){V||(V=s.listen((O,G,z)=>{if(!qe.listening)return;const le=g(O),be=A(le);if(be){R(je(be,{replace:!0}),le).catch($a);return}c=le;const Se=l.value;zi&&PM(Fy(Se.fullPath,z.delta),Ch()),D(le,Se).catch(_=>Nr(_,12)?_:Nr(_,2)?(R(_.to,le).then(b=>{Nr(b,20)&&!z.delta&&z.type===ul.pop&&s.go(-1,!1)}).catch($a),Promise.reject()):(z.delta&&s.go(-z.delta,!1),Z(_,le,Se))).then(_=>{_=_||S(le,Se,!1),_&&(z.delta&&!Nr(_,8)?s.go(-z.delta,!1):z.type===ul.pop&&Nr(_,20)&&s.go(-1,!1)),$(le,Se,_)}).catch($a)}))}let J=da(),W=da(),se;function Z(O,G,z){Y(O);const le=W.list();return le.length?le.forEach(be=>be(O,G,z)):console.error(O),Promise.reject(O)}function De(){return se&&l.value!==er?Promise.resolve():new Promise((O,G)=>{J.add([O,G])})}function Y(O){return se||(se=!O,oe(),J.list().forEach(([G,z])=>O?z(O):G()),J.reset()),O}function we(O,G,z,le){const{scrollBehavior:be}=t;if(!zi||!be)return Promise.resolve();const Se=!z&&CM(Fy(O.fullPath,0))||(le||!z)&&history.state&&history.state.scroll||null;return kn().then(()=>be(O,G,Se)).then(_=>_&&RM(_)).catch(_=>Z(_,O,G))}const ae=O=>s.go(O);let Ue;const Ce=new Set,qe={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,hasRoute:m,getRoutes:v,resolve:g,options:t,push:w,replace:I,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:W.add,isReady:De,install(O){const G=this;O.component("RouterLink",JM),O.component("RouterView",R0),O.config.globalProperties.$router=G,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>N(l)}),zi&&!Ue&&l.value===er&&(Ue=!0,w(s.location).catch(be=>{}));const z={};for(const be in er)Object.defineProperty(z,be,{get:()=>l.value[be],enumerable:!0});O.provide(Om,G),O.provide(Mm,Ml(z)),O.provide(ap,l);const le=O.unmount;Ce.add(O),O.unmount=function(){Ce.delete(O),Ce.size<1&&(c=er,V&&V(),V=null,l.value=er,Ue=!1,se=!1),le()}}};function ke(O){return O.reduce((G,z)=>G.then(()=>C(z)),Promise.resolve())}return qe}function rN(t,e){const n=[],r=[],s=[],i=Math.max(e.matched.length,t.matched.length);for(let o=0;o<i;o++){const a=e.matched[o];a&&(t.matched.find(c=>Po(c,a))?r.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>Po(c,l))||s.push(l))}return[n,r,s]}function sN(){return bt(Mm)}const iN=(t,e)=>e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=t.params[n.slice(1)])==null?void 0:r.toString())||""}),lp=(t,e)=>{const n=t.route.matched.find(s=>{var i;return((i=s.components)==null?void 0:i.default)===t.Component.type}),r=e??(n==null?void 0:n.meta.key)??(n&&iN(t.route,n));return typeof r=="function"?r(t.route):r},oN=(t,e)=>({default:()=>t?Nn(r1,t===!0?{}:t,e):e});function Nm(t){return Array.isArray(t)?t:[t]}const Ff=null,Uf=null,pn={middleware:"auth"},Bf=null,Hf=null,mn={middleware:"auth"},gn={middleware:"auth"},vn={middleware:"auth"},jf=null,yn={middleware:"auth"},_n={middleware:"auth"},Wf=null,wn={middleware:"auth"},En={middleware:"auth"},bn={middleware:"auth"},Tn={middleware:"auth"},Yf=null,In={middleware:"auth"},qf=null,An={middleware:"auth"},Kf=null,Zy=[{name:"auth-resetPassword",path:"/auth/resetPassword",meta:{},alias:[],redirect:Ff==null?void 0:Ff.redirect,component:()=>tt(()=>import("./resetPassword.B017iXO9.js"),__vite__mapDeps([]),import.meta.url).then(t=>t.default||t)},{name:"auth-sendEmail",path:"/auth/sendEmail",meta:{},alias:[],redirect:Uf==null?void 0:Uf.redirect,component:()=>tt(()=>import("./sendEmail.BKUZgSnk.js"),__vite__mapDeps([0,1]),import.meta.url).then(t=>t.default||t)},{name:(pn==null?void 0:pn.name)??"auth-signin",path:(pn==null?void 0:pn.path)??"/auth/signin",meta:pn||{},alias:(pn==null?void 0:pn.alias)||[],redirect:pn==null?void 0:pn.redirect,component:()=>tt(()=>import("./signin.BPxejY1W.js"),__vite__mapDeps([2,3,4,5]),import.meta.url).then(t=>t.default||t)},{name:"auth-signup",path:"/auth/signup",meta:{},alias:[],redirect:Bf==null?void 0:Bf.redirect,component:()=>tt(()=>import("./signup.BDlJ5UWU.js"),__vite__mapDeps([6,5]),import.meta.url).then(t=>t.default||t)},{name:"home-generateAI",path:"/home/generateAI",meta:{},alias:[],redirect:Hf==null?void 0:Hf.redirect,component:()=>tt(()=>import("./generateAI.ixJ4VNlu.js"),__vite__mapDeps([7,8,9,4,10,1,11,12]),import.meta.url).then(t=>t.default||t)},{name:(mn==null?void 0:mn.name)??"home",path:(mn==null?void 0:mn.path)??"/home",meta:mn||{},alias:(mn==null?void 0:mn.alias)||[],redirect:mn==null?void 0:mn.redirect,component:()=>tt(()=>import("./index.CDYAPtLU.js"),__vite__mapDeps([13,9,3,14]),import.meta.url).then(t=>t.default||t)},{name:(gn==null?void 0:gn.name)??"home-invite",path:(gn==null?void 0:gn.path)??"/home/invite",meta:gn||{},alias:(gn==null?void 0:gn.alias)||[],redirect:gn==null?void 0:gn.redirect,component:()=>tt(()=>
27import("./index.4jWVXNZH.js"),__vite__mapDeps([15,4]),import.meta.url).then(t=>t.default||t)},{name:(vn==null?void 0:vn.name)??"home-inviteCode",path:(vn==null?void 0:vn.path)??"/home/inviteCode",meta:vn||{},alias:(vn==null?void 0:vn.alias)||[],redirect:vn==null?void 0:vn.redirect,component:()=>tt(()=>import("./inviteCode.1ePUmdZn.js"),__vite__mapDeps([16,9]),import.meta.url).then(t=>t.default||t)},{name:"home-profile-changeEmail",path:"/home/profile/changeEmail",meta:{},alias:[],redirect:jf==null?void 0:jf.redirect,component:()=>tt(()=>import("./changeEmail.jJ5hUQMI.js"),__vite__mapDeps([]),import.meta.url).then(t=>t.default||t)},{name:(yn==null?void 0:yn.name)??"home-profile",path:(yn==null?void 0:yn.path)??"/home/profile",meta:yn||{},alias:(yn==null?void 0:yn.alias)||[],redirect:yn==null?void 0:yn.redirect,component:()=>tt(()=>import("./index.CkHNWqL8.js"),__vite__mapDeps([17,1,11,18]),import.meta.url).then(t=>t.default||t)},{name:(_n==null?void 0:_n.name)??"home-search",path:(_n==null?void 0:_n.path)??"/home/search",meta:_n||{},alias:(_n==null?void 0:_n.alias)||[],redirect:_n==null?void 0:_n.redirect,component:()=>tt(()=>import("./search.CG5GWzpH.js"),__vite__mapDeps([19,8,9,1,3,11,20,21]),import.meta.url).then(t=>t.default||t)},{name:"home-trips-tripId-destination-edit-id",path:"/home/trips/:tripId()/destination/edit/:id()",meta:{},alias:[],redirect:Wf==null?void 0:Wf.redirect,component:()=>tt(()=>import("./_id_.D3QSnbKH.js"),__vite__mapDeps([]),import.meta.url).then(t=>t.default||t)},{name:(wn==null?void 0:wn.name)??"home-trips-tripId-destination-new",path:(wn==null?void 0:wn.path)??"/home/trips/:tripId()/destination/new",meta:wn||{},alias:(wn==null?void 0:wn.alias)||[],redirect:wn==null?void 0:wn.redirect,component:()=>tt(()=>import("./new.CvAoyVcq.js"),__vite__mapDeps([22,9,4,23,11,24,12,20]),import.meta.url).then(t=>t.default||t)},{name:(En==null?void 0:En.name)??"home-trips-tripId-generate",path:(En==null?void 0:En.path)??"/home/trips/:tripId()/generate",meta:En||{},alias:(En==null?void 0:En.alias)||[],redirect:En==null?void 0:En.redirect,component:()=>tt(()=>import("./generate.DsvmnvoL.js"),__vite__mapDeps([25,8,9,10,1,11,26,27]),import.meta.url).then(t=>t.default||t)},{name:(bn==null?void 0:bn.name)??"home-trips-tripId",path:(bn==null?void 0:bn.path)??"/home/trips/:tripId()",meta:bn||{},alias:(bn==null?void 0:bn.alias)||[],redirect:bn==null?void 0:bn.redirect,component:()=>tt(()=>import("./index.DiqhOkln.js"),__vite__mapDeps([28,8,1,23,4,24,12,20,29,30,26,27,14,11,31,32]),import.meta.url).then(t=>t.default||t)},{name:(Tn==null?void 0:Tn.name)??"home-trips-tripId-new",path:(Tn==null?void 0:Tn.path)??"/home/trips/:tripId()/new",meta:Tn||{},alias:(Tn==null?void 0:Tn.alias)||[],redirect:Tn==null?void 0:Tn.redirect,component:()=>tt(()=>import("./new.CnYoTT_2.js"),__vite__mapDeps([33,9,4]),import.meta.url).then(t=>t.default||t)},{name:"home-trips-tripId-routes",path:"/home/trips/:tripId()/routes",meta:{},alias:[],redirect:Yf==null?void 0:Yf.redirect,component:()=>tt(()=>import("./routes.S_cIpKuN.js"),__vite__mapDeps([]),import.meta.url).then(t=>t.default||t)},{name:(In==null?void 0:In.name)??"home-trips-tripId-setting",path:(In==null?void 0:In.path)??"/home/trips/:tripId()/setting",meta:In||{},alias:(In==null?void 0:In.alias)||[],redirect:In==null?void 0:In.redirect,component:()=>tt(()=>import("./index.C-zHQdtc.js"),__vite__mapDeps([34,9,4,23,18,31]),import.meta.url).then(t=>t.default||t)},{name:"home-trips-edit-id",path:"/home/trips/edit/:id()",meta:{},alias:[],redirect:qf==null?void 0:qf.redirect,component:()=>tt(()=>import("./_id_.CpetxEXx.js"),__vite__mapDeps([]),import.meta.url).then(t=>t.default||t)},{name:(An==null?void 0:An.name)??"home-trips-new",path:(An==null?void 0:An.path)??"/home/trips/new",meta:An||{},alias:(An==null?void 0:An.alias)||[],redirect:An==null?void 0:An.redirect,component:()=>tt(()=>import("./new.BwvCSfOM.js"),__vite__mapDeps([]),import.meta.url).then(t=>t.default||t)},{name:"index",path:"/",meta:{},alias:[],redirect:Kf==null?void 0:Kf.redirect,component:()=>tt(()=>import("./index.sWhYSvnk.js"),__vite__mapDeps([35,3]),import.meta.url).then(t=>t.default||t)}],P0=(t,e,n)=>(e=e===!0?{}:e,{default:()=>{var r;return e?Nn(t,e,n):(r=n.default)==null?void 0:r.call(n)}});function e_(t){const e=(t==null?void 0:t.meta.key)??t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=t.params[n.slice(1)])==null?void 0:r.toString())||""});return typeof e=="function"?e(t):e}
27function aN(t,e){return t===e||e===er?!1:e_(t)!==e_(e)?!0:!t.matched.every((r,s)=>{var i,o;return r.components&&r.components.default===((o=(i=e.matched[s])==null?void 0:i.components)==null?void 0:o.default)})}const lN={scrollBehavior(t,e,n){var c;const r=Ge(),s=((c=Jn().options)==null?void 0:c.scrollBehaviorType)??"auto";let i=n||void 0;const o=typeof t.meta.scrollToTop=="function"?t.meta.scrollToTop(t,e):t.meta.scrollToTop;if(!i&&e&&t&&o!==!1&&aN(t,e)&&(i={left:0,top:0}),t.path===e.path)return e.hash&&!t.hash?{left:0,top:0}:t.hash?{el:t.hash,top:t_(t.hash),behavior:s}:!1;const a=u=>!!(u.meta.pageTransition??sp),l=a(e)&&a(t)?"page:transition:finish":"page:finish";return new Promise(u=>{r.hooks.hookOnce(l,async()=>{await new Promise(h=>setTimeout(h,0)),t.hash&&(i={el:t.hash,top:t_(t.hash),behavior:s}),u(i)})})}};function t_(t){try{const e=document.querySelector(t);if(e)return parseFloat(getComputedStyle(e).scrollMarginTop)}catch{}return 0}const cN={hashMode:!1,scrollBehaviorType:"auto"},Rn={...cN,...lN},uN=async t=>{var l;let e,n;if(!((l=t.meta)!=null&&l.validate))return;const r=Ge(),s=Jn();if(([e,n]=ll(()=>Promise.resolve(t.meta.validate(t))),e=await e,n(),e)===!0)return;const o=Rh({statusCode:404,statusMessage:`Page Not Found: ${t.fullPath}`,data:{path:t.fullPath}}),a=s.beforeResolve(c=>{if(a(),c===t){const u=s.afterEach(async()=>{u(),await r.runWithContext(()=>Zi(o)),window.history.pushState({},"",t.fullPath)});return!1}})};var n_={};/**
28 * @license
29 * Copyright 2017 Google LLC
30 *
31 * Licensed under the Apache License, Version 2.0 (the "License");
32 * you may not use this file except in compliance with the License.
33 * You may obtain a copy of the License at
34 *
35 *   http://www.apache.org/licenses/LICENSE-2.0
36 *
37 * Unless required by applicable law or agreed to in writing, software
38 * distributed under the License is distributed on an "AS IS" BASIS,
39 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40 * See the License for the specific language governing permissions and
41 * limitations under the License.
42 */const C0=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);s<128?e[n++]=s:s<2048?(e[n++]=s>>6|192,e[n++]=s&63|128):(s&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(s=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=s>>18|240,e[n++]=s>>12&63|128,e[n++]=s>>6&63|128,e[n++]=s&63|128):(e[n++]=s>>12|224,e[n++]=s>>6&63|128,e[n++]=s&63|128)}return e},hN=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n++];if(s<128)e[r++]=String.fromCharCode(s);else if(s>191&&s<224){const i=t[n++];e[r++]=String.fromCharCode((s&31)<<6|i&63)}else if(s>239&&s<365){const i=t[n++],o=t[n++],a=t[n++],l=((s&7)<<18|(i&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const i=t[n++],o=t[n++];e[r++]=String.fromCharCode((s&15)<<12|(i&63)<<6|o&63)}}return e.join("")},S0={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 s=0;s<t.length;s+=3){const i=t[s],o=s+1<t.length,a=o?t[s+1]:0,l=s+2<t.length,c=l?t[s+2]:0,u=i>>2,h=(i&3)<<4|a>>4;let f=(a&15)<<2|c>>6,d=c&63;l||(d=64,o||(f=64)),r.push(n[u],n[h],n[f],n[d])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(C0(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):hN(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let s=0;s<t.length;){const i=n[t.charAt(s++)],a=s<t.length?n[t.charAt(s)]:0;++s;const c=s<t.length?n[t.charAt(s)]:64;++s;const h=s<t.length?n[t.charAt(s)]:64;if(++s,i==null||a==null||c==null||h==null)throw new fN;const f=i<<2|a>>4;if(r.push(f),c!==64){const d=a<<4&240|c>>2;if(r.push(d),h!==64){const p=c<<6&192|h;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.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};
42class fN extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const dN=function(t){const e=C0(t);return S0.encodeByteArray(e,!0)},Su=function(t){return dN(t).replace(/\./g,"")},D0=function(t){try{return S0.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
43 * @license
44 * Copyright 2022 Google LLC
45 *
46 * Licensed under the Apache License, Version 2.0 (the "License");
47 * you may not use this file except in compliance with the License.
48 * You may obtain a copy of the License at
49 *
50 *   http://www.apache.org/licenses/LICENSE-2.0
51 *
52 * Unless required by applicable law or agreed to in writing, software
53 * distributed under the License is distributed on an "AS IS" BASIS,
54 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55 * See the License for the specific language governing permissions and
56 * limitations under the License.
57 */function pN(){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.")}/**
58 * @license
59 * Copyright 2022 Google LLC
60 *
61 * Licensed under the Apache License, Version 2.0 (the "License");
62 * you may not use this file except in compliance with the License.
63 * You may obtain a copy of the License at
64 *
65 *   http://www.apache.org/licenses/LICENSE-2.0
66 *
67 * Unless required by applicable law or agreed to in writing, software
68 * distributed under the License is distributed on an "AS IS" BASIS,
69 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
70 * See the License for the specific language governing permissions and
71 * limitations under the License.
72 */const mN=()=>pN().__FIREBASE_DEFAULTS__,gN=()=>{if(typeof process>"u"||typeof n_>"u")return;const t=n_.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},vN=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&D0(t[1]);return e&&JSON.parse(e)},Sh=()=>{try{return mN()||gN()||vN()}catch(t){`${t}`;return}},k0=t=>{var e,n;return(n=(e=Sh())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},O0=t=>{const e=k0(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]},M0=()=>{var t;return(t=Sh())===null||t===void 0?void 0:t.config},N0=t=>{var e;return(e=Sh())===null||e===void 0?void 0:e[`_${t}`]};/**
73 * @license
74 * Copyright 2017 Google LLC
75 *
76 * Licensed under the Apache License, Version 2.0 (the "License");
77 * you may not use this file except in compliance with the License.
78 * You may obtain a copy of the License at
79 *
80 *   http://www.apache.org/licenses/LICENSE-2.0
81 *
82 * Unless required by applicable law or agreed to in writing, software
83 * distributed under the License is distributed on an "AS IS" BASIS,
84 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
85 * See the License for the specific language governing permissions and
86 * limitations under the License.
87 */class yN{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))}}}/**
88 * @license
89 * Copyright 2021 Google LLC
90 *
91 * Licensed under the Apache License, Version 2.0 (the "License");
92 * you may not use this file except in compliance with the License.
93 * You may obtain a copy of the License at
94 *
95 *   http://www.apache.org/licenses/LICENSE-2.0
96 *
97 * Unless required by applicable law or agreed to in writing, software
98 * distributed under the License is distributed on an "AS IS" BASIS,
99 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
100 * See the License for the specific language governing permissions and
101 * limitations under the License.
102 */function L0(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",s=t.iat||0,i=t.sub||t.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:s,exp:s+3600,auth_time:s,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},t);return[Su(JSON.stringify(n)),Su(JSON.stringify(o)),""].join(".")}/**
103 * @license
104 * Copyright 2017 Google LLC
105 *
106 * Licensed under the Apache License, Version 2.0 (the "License");
107 * you may not use this file except in compliance with the License.
108 * You may obtain a copy of the License at
109 *
110 *   http://www.apache.org/licenses/LICENSE-2.0
111 *
112 * Unless required by applicable law or agreed to in writing, software
113 * distributed under the License is distributed on an "AS IS" BASIS,
114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115 * See the License for the specific language governing permissions and
116 * limitations under the License.
117 */function Tt(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function _N(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Tt())}function wN(){var t;const e=(t=Sh())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(globalThis.process)==="[object process]"}catch{return!1}}function EN(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function bN(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function TN(){const t=Tt();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function IN(){return!wN()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function x0(){try{return typeof indexedDB=="object"}catch{return!1}}function AN(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(r);s.onsuccess=()=>{s.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},s.onupgradeneeded=()=>{n=!1},s.onerror=()=>{var i;e(((i=s.error)===null||i===void 0?void 0:i.message)||"")}}catch(n){e(n)}})}/**
118 * @license
119 * Copyright 2017 Google LLC
120 *
121 * Licensed under the Apache License, Version 2.0 (the "License");
122 * you may not use this file except in compliance with the License.
123 * You may obtain a copy of the License at
124 *
125 *   http://www.apache.org/licenses/LICENSE-2.0
126 *
127 * Unless required by applicable law or agreed to in writing, software
128 * distributed under the License is distributed on an "AS IS" BASIS,
129 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130 * See the License for the specific language governing permissions and
131 * limitations under the License.
132 */const RN="FirebaseError";class Dr extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=RN,Object.setPrototypeOf(this,Dr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Hl.prototype.create)}}class Hl{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},s=`${this.service}/${e}`,i=this.errors[e],o=i?PN(i,r):"Error",a=`${this.serviceName}: ${o} (${s}).`;return new Dr(s,a,r)}}function PN(t,e){return t.replace(CN,(n,r)=>{const s=e[r];return s!=null?String(s):`<${r}?>`})}const CN=/\{\$([^}]+)}/g;function SN(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Du(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const s of n){if(!r.includes(s))return!1;const i=t[s],o=e[s];if(r_(i)&&r_(o)){if(!Du(i,o))return!1}else if(i!==o)return!1}for(const s of r)if(!n.includes(s))return!1;return!0}function r_(t){return t!==null&&typeof t=="object"}/**
133 * @license
134 * Copyright 2017 Google LLC
135 *
136 * Licensed under the Apache License, Version 2.0 (the "License");
137 * you may not use this file except in compliance with the License.
138 * You may obtain a copy of the License at
139 *
140 *   http://www.apache.org/licenses/LICENSE-2.0
141 *
142 * Unless required by applicable law or agreed to in writing, software
143 * distributed under the License is distributed on an "AS IS" BASIS,
144 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
145 * See the License for the specific language governing permissions and
146 * limitations under the License.
147 */function jl(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(s=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(s))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function Aa(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[s,i]=r.split("=");e[decodeURIComponent(s)]=decodeURIComponent(i)}}),e}function Ra(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function DN(t,e){const n=new kN(t,e);return n.subscribe.bind(n)}class kN{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
147ise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let s;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");ON(e,["next","error","complete"])?s=e:s={next:e,error:n,complete:r},s.next===void 0&&(s.next=zf),s.error===void 0&&(s.error=zf),s.complete===void 0&&(s.complete=zf);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),i}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function ON(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function zf(){}/**
148 * @license
149 * Copyright 2021 Google LLC
150 *
151 * Licensed under the Apache License, Version 2.0 (the "License");
152 * you may not use this file except in compliance with the License.
153 * You may obtain a copy of the License at
154 *
155 *   http://www.apache.org/licenses/LICENSE-2.0
156 *
157 * Unless required by applicable law or agreed to in writing, software
158 * distributed under the License is distributed on an "AS IS" BASIS,
159 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
160 * See the License for the specific language governing permissions and
161 * limitations under the License.
162 */function it(t){return t&&t._delegate?t._delegate:t}class Ms{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}}/**
163 * @license
164 * Copyright 2019 Google LLC
165 *
166 * Licensed under the Apache License, Version 2.0 (the "License");
167 * you may not use this file except in compliance with the License.
168 * You may obtain a copy of the License at
169 *
170 *   http://www.apache.org/licenses/LICENSE-2.0
171 *
172 * Unless required by applicable law or agreed to in writing, software
173 * distributed under the License is distributed on an "AS IS" BASIS,
174 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
175 * See the License for the specific language governing permissions and
176 * limitations under the License.
177 */const Js="[DEFAULT]";/**
178 * @license
179 * Copyright 2019 Google LLC
180 *
181 * Licensed under the Apache License, Version 2.0 (the "License");
182 * you may not use this file except in compliance with the License.
183 * You may obtain a copy of the License at
184 *
185 *   http://www.apache.org/licenses/LICENSE-2.0
186 *
187 * Unless required by applicable law or agreed to in writing, software
188 * distributed under the License is distributed on an "AS IS" BASIS,
189 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190 * See the License for the specific language governing permissions and
191 * limitations under the License.
192 */class MN{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 yN;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:n});s&&r.resolve(s)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),s=(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(i){if(s)return null;throw i}else{if(s)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(LN(e))try{this.getOrInitializeService({instanceIdentifier:Js})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:s});r.resolve(i)}catch{}}}}clearInstance(e=Js){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=Js){return this.instances.has(e)}getOptions(e=Js){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 s=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[i,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(i);r===a&&o.resolve(s)}return s}onInit(e,n){var r;const s=this.normalizeInstanceIdentifier(n),i=(r=this.onInitCallbacks.get(s))!==null&&r!==void 0?r:new Set;i.add(e),this.onInitCallbacks.set(s,i);const o=this.instances.get(s);return o&&e(o,s),()=>{i.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const s of r)try{s(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:NN(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=Js){return this.component?this.component.multipleInstances?e:Js:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function NN(t){return t===Js?void 0:t}function LN(t){return t.instantiationMode==="EAGER"}/**
193 * @license
194 * Copyright 2019 Google LLC
195 *
196 * Licensed under the Apache License, Version 2.0 (the "License");
197 * you may not use this file except in compliance with the License.
198 * You may obtain a copy of the License at
199 *
200 *   http://www.apache.org/licenses/LICENSE-2.0
201 *
202 * Unless required by applicable law or agreed to in writing, software
203 * distributed under the License is distributed on an "AS IS" BASIS,
204 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205 * See the License for the specific language governing permissions and
206 * limitations under the License.
207 */class xN{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 MN(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
208 * @license
209 * Copyright 2017 Google LLC
210 *
211 * Licensed under the Apache License, Version 2.0 (the "License");
212 * you may not use this file except in compliance with the License.
213 * You may obtain a copy of the License at
214 *
215 *   http://www.apache.org/licenses/LICENSE-2.0
216 *
217 * Unless required by applicable law or agreed to in writing, software
218 * distributed under the License is distributed on an "AS IS" BASIS,
219 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220 * See the License for the specific language governing permissions and
221 * limitations under the License.
222 */var Ne;(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"})(Ne||(Ne={}));const VN={debug:Ne.DEBUG,verbose:Ne.VERBOSE,info:Ne.INFO,warn:Ne.WARN,error:Ne.ERROR,silent:Ne.SILENT},$N=Ne.INFO,FN={[Ne.DEBUG]:"log",[Ne.VERBOSE]:"log",[Ne.INFO]:"info",[Ne.WARN]:"warn",[Ne.ERROR]:"error"},UN=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),s=FN[e];if(s)console[s](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Lm{constructor(e){this.name=e,this._logLevel=$N,this._logHandler=UN,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Ne))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?VN[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Ne.DEBUG,...e),this._logHandler(this,Ne.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Ne.VERBOSE,...e),this._logHandler(this,Ne.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Ne.INFO,...e),this._logHandler(this,Ne.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Ne.WARN,...e),this._logHandler(this,Ne.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Ne.ERROR,...e),this._logHandler(this,Ne.ERROR,...e)}}const BN=(t,e)=>e.some(n=>t instanceof n);let s_,i_;function HN(){return s_||(s_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function jN(){return i_||(i_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V0=new WeakMap,cp=new WeakMap,$0=new WeakMap,Gf=new WeakMap,xm=new WeakMap;function WN(t){const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{n(Ps(t.result)),s()},o=()=>{r(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&V0.set(n,t)}).catch(()=>{}),xm.set(e,t),e}function YN(t){if(cp.has(t))return;const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{n(),s()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});cp.set(t,e)}let up={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return cp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||$0.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ps(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 qN(t){up=t(up)}function KN(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Qf(this),e,...n);return $0.set(r,e.sort?e.sort():[e]),Ps(r)}:jN().includes(t)?function(...e){return t.apply(Qf(this),e),Ps(V0.get(this))}:function(...e){return Ps(t.apply(Qf(this),e))}}function zN(t){return typeof t=="function"?KN(t):(t instanceof IDBTransaction&&YN(t),BN(t,HN())?new Proxy(t,up):t)}function Ps(t){if(t instanceof IDBRequest)return WN(t);if(Gf.has(t))return Gf.get(t);const e=zN(t);return e!==t&&(Gf.set(t,e),xm.set(e,t)),e}const Qf=t=>xm.get(t);function GN(t,e,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ps(o);return r&&o.addEventListener("upgradeneeded",l=>{r(Ps(o.result),l.oldVersion,l.newVersion,Ps(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),s&&l.addEventListener("versionchange",c=>s(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const QN=["get","getKey","getAll","getAllKeys","count"],XN=["put","add","delete","clear"],Xf=new Map;function o_(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Xf.get(e))return Xf.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,s=XN.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||QN.includes(n)))return;const i=async function(o,...a){const l=this.transaction(o,s?"readwrite":"readonly");let c=l.store;
222return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),s&&l.done]))[0]};return Xf.set(e,i),i}qN(t=>({...t,get:(e,n,r)=>o_(e,n)||t.get(e,n,r),has:(e,n)=>!!o_(e,n)||t.has(e,n)}));/**
223 * @license
224 * Copyright 2019 Google LLC
225 *
226 * Licensed under the Apache License, Version 2.0 (the "License");
227 * you may not use this file except in compliance with the License.
228 * You may obtain a copy of the License at
229 *
230 *   http://www.apache.org/licenses/LICENSE-2.0
231 *
232 * Unless required by applicable law or agreed to in writing, software
233 * distributed under the License is distributed on an "AS IS" BASIS,
234 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
235 * See the License for the specific language governing permissions and
236 * limitations under the License.
237 */class JN{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(ZN(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function ZN(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const hp="@firebase/app",a_="0.9.28";/**
238 * @license
239 * Copyright 2019 Google LLC
240 *
241 * Licensed under the Apache License, Version 2.0 (the "License");
242 * you may not use this file except in compliance with the License.
243 * You may obtain a copy of the License at
244 *
245 *   http://www.apache.org/licenses/LICENSE-2.0
246 *
247 * Unless required by applicable law or agreed to in writing, software
248 * distributed under the License is distributed on an "AS IS" BASIS,
249 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
250 * See the License for the specific language governing permissions and
251 * limitations under the License.
252 */const bi=new Lm("@firebase/app"),eL="@firebase/app-compat",tL="@firebase/analytics-compat",nL="@firebase/analytics",rL="@firebase/app-check-compat",sL="@firebase/app-check",iL="@firebase/auth",oL="@firebase/auth-compat",aL="@firebase/database",lL="@firebase/database-compat",cL="@firebase/functions",uL="@firebase/functions-compat",hL="@firebase/installations",fL="@firebase/installations-compat",dL="@firebase/messaging",pL="@firebase/messaging-compat",mL="@firebase/performance",gL="@firebase/performance-compat",vL="@firebase/remote-config",yL="@firebase/remote-config-compat",_L="@firebase/storage",wL="@firebase/storage-compat",EL="@firebase/firestore",bL="@firebase/firestore-compat",TL="firebase",IL="10.8.1";/**
253 * @license
254 * Copyright 2019 Google LLC
255 *
256 * Licensed under the Apache License, Version 2.0 (the "License");
257 * you may not use this file except in compliance with the License.
258 * You may obtain a copy of the License at
259 *
260 *   http://www.apache.org/licenses/LICENSE-2.0
261 *
262 * Unless required by applicable law or agreed to in writing, software
263 * distributed under the License is distributed on an "AS IS" BASIS,
264 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
265 * See the License for the specific language governing permissions and
266 * limitations under the License.
267 */const fp="[DEFAULT]",AL={[hp]:"fire-core",[eL]:"fire-core-compat",[nL]:"fire-analytics",[tL]:"fire-analytics-compat",[sL]:"fire-app-check",[rL]:"fire-app-check-compat",[iL]:"fire-auth",[oL]:"fire-auth-compat",[aL]:"fire-rtdb",[lL]:"fire-rtdb-compat",[cL]:"fire-fn",[uL]:"fire-fn-compat",[hL]:"fire-iid",[fL]:"fire-iid-compat",[dL]:"fire-fcm",[pL]:"fire-fcm-compat",[mL]:"fire-perf",[gL]:"fire-perf-compat",[vL]:"fire-rc",[yL]:"fire-rc-compat",[_L]:"fire-gcs",[wL]:"fire-gcs-compat",[EL]:"fire-fst",[bL]:"fire-fst-compat","fire-js":"fire-js",[TL]:"fire-js-all"};/**
268 * @license
269 * Copyright 2019 Google LLC
270 *
271 * Licensed under the Apache License, Version 2.0 (the "License");
272 * you may not use this file except in compliance with the License.
273 * You may obtain a copy of the License at
274 *
275 *   http://www.apache.org/licenses/LICENSE-2.0
276 *
277 * Unless required by applicable law or agreed to in writing, software
278 * distributed under the License is distributed on an "AS IS" BASIS,
279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
280 * See the License for the specific language governing permissions and
281 * limitations under the License.
282 */const ku=new Map,dp=new Map;function RL(t,e){try{t.container.addComponent(e)}catch(n){bi.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Ti(t){const e=t.name;if(dp.has(e))return bi.debug(`There were multiple attempts to register component ${e}.`),!1;dp.set(e,t);for(const n of ku.values())RL(n,t);return!0}function Dh(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/**
283 * @license
284 * Copyright 2019 Google LLC
285 *
286 * Licensed under the Apache License, Version 2.0 (the "License");
287 * you may not use this file except in compliance with the License.
288 * You may obtain a copy of the License at
289 *
290 *   http://www.apache.org/licenses/LICENSE-2.0
291 *
292 * Unless required by applicable law or agreed to in writing, software
293 * distributed under the License is distributed on an "AS IS" BASIS,
294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
295 * See the License for the specific language governing permissions and
296 * limitations under the License.
297 */const PL={"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}."},Cs=new Hl("app","Firebase",PL);/**
298 * @license
299 * Copyright 2019 Google LLC
300 *
301 * Licensed under the Apache License, Version 2.0 (the "License");
302 * you may not use this file except in compliance with the License.
303 * You may obtain a copy of the License at
304 *
305 *   http://www.apache.org/licenses/LICENSE-2.0
306 *
307 * Unless required by applicable law or agreed to in writing, software
308 * distributed under the License is distributed on an "AS IS" BASIS,
309 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
310 * See the License for the specific language governing permissions and
311 * limitations under the License.
312 */class CL{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 Ms("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 Cs.create("app-deleted",{appName:this._name})}}/**
313 * @license
314 * Copyright 2019 Google LLC
315 *
316 * Licensed under the Apache License, Version 2.0 (the "License");
317 * you may not use this file except in compliance with the License.
318 * You may obtain a copy of the License at
319 *
320 *   http://www.apache.org/licenses/LICENSE-2.0
321 *
322 * Unless required by applicable law or agreed to in writing, software
323 * distributed under the License is distributed on an "AS IS" BASIS,
324 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
325 * See the License for the specific language governing permissions and
326 * limitations under the License.
327 */const xi=IL;function F0(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:fp,automaticDataCollectionEnabled:!1},e),s=r.name;if(typeof s!="string"||!s)throw Cs.create("bad-app-name",{appName:String(s)});if(n||(n=M0()),!n)throw Cs.create("no-options");const i=ku.get(s);if(i){if(Du(n,i.options)&&Du(r,i.config))return i;throw Cs.create("duplicate-app",{appName:s})}const o=new xN(s);for(const l of dp.values())o.addComponent(l);const a=new CL(n,r,o);return ku.set(s,a),a}function Vm(t=fp){const e=ku.get(t);if(!e&&t===fp&&M0())return F0();if(!e)throw Cs.create("no-app",{appName:t});return e}function wr(t,e,n){var r;let s=(r=AL[t])!==null&&r!==void 0?r:t;n&&(s+=`-${n}`);const i=s.match(/\s|\//),o=e.match(/\s|\//);if(i||o){const a=[`Unable to register library "${s}" with version "${e}":`];i&&a.push(`library name "${s}" contains illegal characters (whitespace or "/")`),i&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),bi.warn(a.join(" "));return}Ti(new Ms(`${s}-version`,()=>({library:s,version:e}),"VERSION"))}/**
328 * @license
329 * Copyright 2021 Google LLC
330 *
331 * Licensed under the Apache License, Version 2.0 (the "License");
332 * you may not use this file except in compliance with the License.
333 * You may obtain a copy of the License at
334 *
335 *   http://www.apache.org/licenses/LICENSE-2.0
336 *
337 * Unless required by applicable law or agreed to in writing, software
338 * distributed under the License is distributed on an "AS IS" BASIS,
339 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
340 * See the License for the specific language governing permissions and
341 * limitations under the License.
342 */const SL="firebase-heartbeat-database",DL=1,hl="firebase-heartbeat-store";let Jf=null;function U0(){return Jf||(Jf=GN(SL,DL,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(hl)}catch(n){console.warn(n)}}}}).catch(t=>{throw Cs.create("idb-open",{originalErrorMessage:t.message})})),Jf}async function kL(t){try{const n=(await U0()).transaction(hl),r=await n.objectStore(hl).get(B0(t));return await n.done,r}catch(e){if(e instanceof Dr)bi.warn(e.message);else{const n=Cs.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});bi.warn(n.message)}}}async function l_(t,e){try{const r=(await U0()).transaction(hl,"readwrite");await r.objectStore(hl).put(e,B0(t)),await r.done}catch(n){if(n instanceof Dr)bi.warn(n.message);else{const r=Cs.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});bi.warn(r.message)}}}function B0(t){return`${t.name}!${t.options.appId}`}/**
343 * @license
344 * Copyright 2021 Google LLC
345 *
346 * Licensed under the Apache License, Version 2.0 (the "License");
347 * you may not use this file except in compliance with the License.
348 * You may obtain a copy of the License at
349 *
350 *   http://www.apache.org/licenses/LICENSE-2.0
351 *
352 * Unless required by applicable law or agreed to in writing, software
353 * distributed under the License is distributed on an "AS IS" BASIS,
354 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
355 * See the License for the specific language governing permissions and
356 * limitations under the License.
357 */const OL=1024,ML=30*24*60*60*1e3;class NL{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new xL(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;const s=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=c_();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(o=>o.date===i)))return this._heartbeatsCache.heartbeats.push({date:i,agent:s}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const a=new Date(o.date).valueOf();return Date.now()-a<=ML}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=c_(),{heartbeatsToSend:r,unsentEntries:s}=LL(this._heartbeatsCache.heartbeats),i=Su(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function c_(){return new Date().toISOString().substring(0,10)}function LL(t,e=OL){const n=[];let r=t.slice();for(const s of t){const i=n.find(o=>o.agent===s.agent);if(i){if(i.dates.push(s.date),u_(n)>e){i.dates.pop();break}}else if(n.push({agent:s.agent,dates:[s.date]}),u_(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class xL{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return x0()?AN().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await kL(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const s=await this.read();return l_(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:s.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const s=await this.read();return l_(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...e.heartbeats]})}else return}}function u_(t){return Su(JSON.stringify({version:2,heartbeats:t})).length}/**
358 * @license
359 * Copyright 2019 Google LLC
360 *
361 * Licensed under the Apache License, Version 2.0 (the "License");
362 * you may not use this file except in compliance with the License.
363 * You may obtain a copy of the License at
364 *
365 *   http://www.apache.org/licenses/LICENSE-2.0
366 *
367 * Unless required by applicable law or agreed to in writing, software
368 * distributed under the License is distributed on an "AS IS" BASIS,
369 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
370 * See the License for the specific language governing permissions and
371 * limitations under the License.
372 */function VL(t){Ti(new Ms("platform-logger",e=>new JN(e),"PRIVATE")),Ti(new Ms("heartbeat",e=>new NL(e),"PRIVATE")),wr(hp,a_,t),wr(hp,a_,"esm2017"),wr("fire-js","")}VL("");var $L="firebase",FL="10.8.1";/**
373 * @license
374 * Copyright 2020 Google LLC
375 *
376 * Licensed under the Apache License, Version 2.0 (the "License");
377 * you may not use this file except in compliance with the License.
378 * You may obtain a copy of the License at
379 *
380 *   http://www.apache.org/licenses/LICENSE-2.0
381 *
382 * Unless required by applicable law or agreed to in writing, software
383 * distributed under the License is distributed on an "AS IS" BASIS,
384 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
385 * See the License for the specific language governing permissions and
386 * limitations under the License.
387 */wr($L,FL,"app");const UL=()=>{const t=Ei();F0({apiKey:t.public.FIREBASE_API_KEY,authDomain:t.public.FIREBASE_AUTH_DOMAIN,projectId:t.public.FIREBASE_PROJECT_ID,storageBucket:t.public.FIREBASE_STORAGE_BUCKET,messagingSenderId:t.public.FIREBASE_MESSAGING_SENDER_ID,appId:t.public.FIREBASE_APP_ID})},BL=async t=>{let e,n;const r=([e,n]=ll(()=>f0(t.path)),e=await e,n(),e);if(r.redirect)return r.redirect},HL=[uN,UL,BL],Ua={auth:()=>tt(()=>import("./auth.BVPoLM5U.js"),__vite__mapDeps([]),import.meta.url)};function jL(t,e,n){const{pathname:r,search:s,hash:i}=e,o=t.indexOf("#");if(o>-1){const c=i.includes(t.slice(o))?t.slice(o).length:1;let u=i.slice(c);return u[0]!=="/"&&(u="/"+u),by(u,"")}const a=by(r,t),l=!n||ek(a,n,{trailingSlash:!0})?a:n;return l+(l.includes("?")?"":s)+i}const WL=Xn({name:"nuxt:router",enforce:"pre",async setup(t){var v,m;let e,n,r=Ei().app.baseURL;Rn.hashMode&&!r.includes("#")&&(r+="#");const s=((v=Rn.history)==null?void 0:v.call(Rn,r))??(Rn.hashMode?OM(r):b0(r)),i=((m=Rn.routes)==null?void 0:m.call(Rn,Zy))??Zy;let o;const a=jL(r,window.location,t.payload.path),l=nN({...Rn,scrollBehavior:(g,E,y)=>{if(E===er){o=y;return}if(Rn.scrollBehavior){if(l.options.scrollBehavior=Rn.scrollBehavior,"scrollRestoration"in window.history){const w=l.beforeEach(()=>{w(),window.history.scrollRestoration="manual"})}return Rn.scrollBehavior(g,er,o||y)}},history:s,routes:i});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),t.vueApp.use(l);const c=el(l.currentRoute.value);l.afterEach((g,E)=>{c.value=E}),Object.defineProperty(t.vueApp.config.globalProperties,"previousRoute",{get:()=>c.value});const u=el(l.resolve(a)),h=()=>{u.value=l.currentRoute.value};t.hook("page:finish",h),l.afterEach((g,E)=>{var y,w,I,A;((w=(y=g.matched[0])==null?void 0:y.components)==null?void 0:w.default)===((A=(I=E.matched[0])==null?void 0:I.components)==null?void 0:A.default)&&h()});const f={};for(const g in u.value)Object.defineProperty(f,g,{get:()=>u.value[g]});t._route=Ml(f),t._middleware=t._middleware||{global:[],named:{}};const d=Ah();try{[e,n]=ll(()=>l.isReady()),await e,n()}catch(g){[e,n]=ll(()=>t.runWithContext(()=>Zi(g))),await e,n()}const p=t.payload.state._layout;return l.beforeEach(async(g,E)=>{var y;await t.callHook("page:loading:start"),g.meta=Kn(g.meta),t.isHydrating&&p&&!vi(g.meta.layout)&&(g.meta.layout=p),t._processingMiddleware=!0;{const w=new Set([...HL,...t._middleware.global]);for(const I of g.matched){const A=I.meta.middleware;if(A)for(const R of Nm(A))w.add(R)}for(const I of w){const A=typeof I=="string"?t._middleware.named[I]||await((y=Ua[I])==null?void 0:y.call(Ua).then(P=>P.default||P)):I;if(!A)throw new Error(`Unknown route middleware: '${I}'.`);const R=await t.runWithContext(()=>A(g,E));if(!t.payload.serverRendered&&t.isHydrating&&(R===!1||R instanceof Error)){const P=R||Zd({statusCode:404,statusMessage:`Page Not Found: ${a}`});return await t.runWithContext(()=>Zi(P)),!1}if(R!==!0&&(R||R===!1))return R}}}),l.onError(async()=>{delete t._processingMiddleware,await t.callHook("page:loading:end")}),l.afterEach(async(g,E,y)=>{delete t._processingMiddleware,!t.isHydrating&&d.value&&await t.runWithContext(Gk),y&&await t.callHook("page:loading:end"),g.matched.length===0&&await t.runWithContext(()=>Zi(Zd({statusCode:404,fatal:!1,statusMessage:`Page not found: ${g.fullPath}`,data:{path:g.fullPath}})))}),t.hooks.hookOnce("app:created",async()=>{try{const g=l.resolve(a);"name"in g&&(g.name=void 0),await l.replace({...g,force:!0}),l.options.scrollBehavior=Rn.scrollBehavior}catch(g){await t.runWithContext(()=>Zi(g))}}),{provide:{router:l}}}}),h_=globalThis.requestIdleCallback||(t=>{const e=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))};return setTimeout(()=>{t(n)}
387,1)}),wee=globalThis.cancelIdleCallback||(t=>{clearTimeout(t)}),H0=t=>{const e=Ge();e.isHydrating?e.hooks.hookOnce("app:suspense:resolve",()=>{h_(t)}):h_(t)},YL=Xn({name:"nuxt:payload",setup(t){Jn().beforeResolve(async(e,n)=>{if(e.path===n.path)return;const r=await Ny(e.path);r&&Object.assign(t.static.data,r.data)}),H0(()=>{var e;t.hooks.hook("link:prefetch",async n=>{Ih(n).protocol||await Ny(n)}),((e=navigator.connection)==null?void 0:e.effectiveType)!=="slow-2g"&&setTimeout(Ph,1e3)})}}),qL=Xn(t=>{let e;async function n(){const r=await Ph();e&&clearTimeout(e),e=setTimeout(n,1e3*60*60);const s=await $fetch(Pm("builds/latest.json")+`?${Date.now()}`);s.id!==r.id&&t.hooks.callHook("app:manifest:update",s)}H0(()=>{e=setTimeout(n,1e3*60*60)})}),KL=Xn({name:"nuxt:global-components"}),Ts={app:()=>tt(()=>import("./app.DOjU5M-N.js"),__vite__mapDeps([36,3,29,30]),import.meta.url).then(t=>t.default||t)},zL=Xn({name:"nuxt:prefetch",setup(t){const e=Jn();t.hooks.hook("app:mounted",()=>{e.beforeEach(async n=>{var s;const r=(s=n==null?void 0:n.meta)==null?void 0:s.layout;r&&typeof Ts[r]=="function"&&await Ts[r]()})}),t.hooks.hook("link:prefetch",n=>{if(Fl(n))return;const r=e.resolve(n);if(!r)return;const s=r.meta.layout;let i=Nm(r.meta.middleware);i=i.filter(o=>typeof o=="string");for(const o of i)typeof Ua[o]=="function"&&Ua[o]();s&&typeof Ts[s]=="function"&&Ts[s]()})}}),GL="$s";function hr(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[n,r]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const s=GL+n,i=Ge(),o=co(i.payload.state,s);if(o.value===void 0&&r){const a=r();if(dt(a))return i.payload.state[s]=a,a;o.value=a}return o}function QL(t={}){const e=t.path||window.location.pathname;let n={};try{n=Ru(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(t.force||(n==null?void 0:n.path)!==e||(n==null?void 0:n.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:e,expires:Date.now()+(t.ttl??1e4)}))}catch{}if(t.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:Ge().payload.state}))}catch{}window.location.pathname!==e?window.location.href=e:window.location.reload()}}var un="top",zn="bottom",Gn="right",hn="left",$m="auto",Wl=[un,zn,Gn,hn],So="start",fl="end",XL="clippingParents",j0="viewport",pa="popper",JL="reference",f_=Wl.reduce(function(t,e){return t.concat([e+"-"+So,e+"-"+fl])},[]),W0=[].concat(Wl,[$m]).reduce(function(t,e){return t.concat([e,e+"-"+So,e+"-"+fl])},[]),ZL="beforeRead",ex="read",tx="afterRead",nx="beforeMain",rx="main",sx="afterMain",ix="beforeWrite",ox="write",ax="afterWrite",lx=[ZL,ex,tx,nx,rx,sx,ix,ox,ax];function Pr(t){return t?(t.nodeName||"").toLowerCase():null}function Ln(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ii(t){var e=Ln(t).Element;return t instanceof e||t instanceof Element}function Wn(t){var e=Ln(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Fm(t){if(typeof ShadowRoot>"u")return!1;var e=Ln(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function cx(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},s=e.attributes[n]||{},i=e.elements[n];!Wn(i)||!Pr(i)||(Object.assign(i.style,r),Object.keys(s).forEach(function(o){var a=s[o];a===!1?i.removeAttribute(o):i.setAttribute(o,a===!0?"":a)}))})}function ux(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var s=e.elements[r],i=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=o.reduce(function(l,c){return l[c]="",l},{});
vendor: 17,907 bytes, line 387
387!Wn(s)||!Pr(s)||(Object.assign(s.style,a),Object.keys(i).forEach(function(l){s.removeAttribute(l)}))})}}const hx={name:"applyStyles",enabled:!0,phase:"write",fn:cx,effect:ux,requires:["computeStyles"]};function Er(t){return t.split("-")[0]}var di=Math.max,Ou=Math.min,Do=Math.round;function pp(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Y0(){return!/^((?!chrome|android).)*safari/i.test(pp())}function ko(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),s=1,i=1;e&&Wn(t)&&(s=t.offsetWidth>0&&Do(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Do(r.height)/t.offsetHeight||1);var o=Ii(t)?Ln(t):window,a=o.visualViewport,l=!Y0()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/s,u=(r.top+(l&&a?a.offsetTop:0))/i,h=r.width/s,f=r.height/i;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c,x:c,y:u}}function Um(t){var e=ko(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function q0(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Fm(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qr(t){return Ln(t).getComputedStyle(t)}function fx(t){return["table","td","th"].indexOf(Pr(t))>=0}function Bs(t){return((Ii(t)?t.ownerDocument:t.document)||window.document).documentElement}function kh(t){return Pr(t)==="html"?t:t.assignedSlot||t.parentNode||(Fm(t)?t.host:null)||Bs(t)}function d_(t){return!Wn(t)||qr(t).position==="fixed"?null:t.offsetParent}function dx(t){var e=/firefox/i.test(pp()),n=/Trident/i.test(pp());if(n&&Wn(t)){var r=qr(t);if(r.position==="fixed")return null}var s=kh(t);for(Fm(s)&&(s=s.host);Wn(s)&&["html","body"].indexOf(Pr(s))<0;){var i=qr(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function Yl(t){for(var e=Ln(t),n=d_(t);n&&fx(n)&&qr(n).position==="static";)n=d_(n);return n&&(Pr(n)==="html"||Pr(n)==="body"&&qr(n).position==="static")?e:n||dx(t)||e}function Bm(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ba(t,e,n){return di(t,Ou(e,n))}function px(t,e,n){var r=Ba(t,e,n);return r>n?n:r}function K0(){return{top:0,right:0,bottom:0,left:0}}function z0(t){return Object.assign({},K0(),t)}function G0(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var mx=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,z0(typeof e!="number"?e:G0(e,Wl))};function gx(t){var e,n=t.state,r=t.name,s=t.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Er(n.placement),l=Bm(a),c=[hn,Gn].indexOf(a)>=0,u=c?"height":"width";if(!(!i||!o)){var h=mx(s.padding,n),f=Um(i),d=l==="y"?un:hn,p=l==="y"?zn:Gn,v=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],m=o[l]-n.rects.reference[l],g=Yl(i),E=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,y=v/2-m/2,w=h[d],I=E-f[u]-h[p],A=E/2-f[u]/2+y,R=Ba(w,A,I),P=l;n.modifiersData[r]=(e={},e[P]=R,e.centerOffset=R-A,e)}}function vx(t){var e=t.state,n=t.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||q0(e.elements.popper,s)&&(e.elements.arrow=s))}const yx={name:"arrow",enabled:!0,phase:"main",fn:gx,effect:vx,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oo(t){return t.split("-")[1]}var _x={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wx(t,e){var n=t.x,r=t.y,s=e.devicePixelRatio||1;return{x:Do(n*s)/s||0,y:Do(r*s)/s||0}}function p_(t){var e,n=t.popper,r=t.popperRect,s=t.placement,i=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,h=t.isFixed,f=o.x,d=f===void 0?0:f,p=o.y,v=p===void 0?0:p,m=typeof u=="function"?u({x:d,y:v}):{x:d,y:v};d=m.x,v=m.y;var g=o.hasOwnProperty("x"),E=o.hasOwnProperty("y"),y=hn,w=un,I=window;if(c){var A=Yl(n),R="clientHeight",P="clientWidth";if(A===Ln(n)&&(A=Bs(n),qr(A).position!=="static"&&a==="absolute"&&(R="scrollHeight",P="scrollWidth")),A=A,s===un||(s===hn||s===Gn)&&i===fl){w=zn;var C=h&&A===I&&I.visualViewport?I.visualViewport.height:A[R];v-=C-r.height,v*=l?1:-1}if(s===hn||(s===un||s===zn)&&i===fl){y=Gn;var D=h&&A===I&&I.visualViewport?I.visualViewport.width:A[P];d-=D-r.width,d*=l?1:-1}}var $=Object.assign({position:a},c&&_x),S=u===!0?wx({x:d,y:v},Ln(n)):{x:d,y:v};if(d=S.x,v=S.y,l){var V;return Object.assign({},$,(V={},V[w]=E?"0":"",V[y]=g?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+d+"px, "+v+"px)":"translate3d("+d+"px, "+v+"px, 0)",V))}return Object.assign({},$,(e={},e[w]=E?v+"px":"",e[y]=g?d+"px":"",e.transform="",e))}function Ex(t){var e=t.state,n=t.options,r=n.gpuAcceleration,s=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Er(e.placement),variation:Oo(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,p_(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,p_(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const bx={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ex,data:{}};var Dc={passive:!0};function Tx(t){var e=t.state,n=t.instance,r=t.options,s=r.scroll,i=s===void 0?!0:s,o=r.resize,a=o===void 0?!0:o,l=Ln(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Dc)}),a&&l.addEventListener("resize",n.update,Dc),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Dc)}),a&&l.removeEventListener("resize",n.update,Dc)}}const Ix={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Tx,data:{}};var Ax={left:"right",right:"left",bottom:"top",top:"bottom"};function eu(t){return t.replace(/left|right|bottom|top/g,function(e){return Ax[e]})}var Rx={start:"end",end:"start"};function m_(t){return t.replace(/start|end/g,function(e){return Rx[e]})}function Hm(t){var e=Ln(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function jm(t){return ko(Bs(t)).left+Hm(t).scrollLeft}function Px(t,e){var n=Ln(t),r=Bs(t),s=n.visualViewport,i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;var c=Y0();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a+jm(t),y:l}}function Cx(t){var e,n=Bs(t),r=Hm(t),s=(e=t.ownerDocument)==null?void 0:e.body,i=di(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=di(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-r.scrollLeft+jm(t),l=-r.scrollTop;return qr(s||n).direction==="rtl"&&(a+=di(n.clientWidth,s?s.clientWidth:0)-i),{width:i,height:o,x:a,y:l}}function Wm(t){var e=qr(t),n=e.overflow,r=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function Q0(t){return["html","body","#document"].indexOf(Pr(t))>=0?t.ownerDocument.body:Wn(t)&&Wm(t)?t:Q0(kh(t))}function Ha(t,e){var n;e===void 0&&(e=[]);var r=Q0(t),s=r===((n=t.ownerDocument)==null?void 0:n.body),i=Ln(r),o=s?[i].concat(i.visualViewport||[],Wm(r)?r:[]):r,a=e.concat(o);return s?a:a.concat(Ha(kh(o)))}function mp(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Sx(t,e){var n=ko(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function g_(t,e,n){return e===j0?mp(Px(t,n)):Ii(e)?Sx(e,n):mp(Cx(Bs(t)))}function Dx(t){var e=Ha(kh(t)),n=["absolute","fixed"].indexOf(qr(t).position)>=0,r=n&&Wn(t)?Yl(t):t;return Ii(r)?e.filter(function(s){return Ii(s)&&q0(s,r)&&Pr(s)!=="body"}):[]}function kx(t,e,n,r){var s=e==="clippingParents"?Dx(t):[].concat(e),i=[].concat(s,[n]),o=i[0],a=i.reduce(function(l,c){var u=g_(t,c,r);return l.top=di(u.top,l.top),l.right=Ou(u.right,l.right),l.bottom=Ou(u.bottom,l.bottom),l.left=di(u.left,l.left),l},g_(t,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function X0(t){var e=t.reference,n=t.element,r=t.placement,s=r?Er(r):null,i=r?Oo(r):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case un:l={x:o,y:e.y-n.height};break;case zn:l={x:o,y:e.y+e.height};break;case Gn:l={x:e.x+e.width,y:a};break;case hn:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?Bm(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case So:l[c]=l[c]-(e[u]/2-n[u]/2);break;case fl:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function dl(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=r===void 0?t.placement:r,i=n.strategy,o=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?XL:a,c=n.rootBoundary,u=c===void 0?j0:c,h=n.elementContext,f=h===void 0?pa:h,d=n.altBoundary,p=d===void 0?!1:d,v=n.padding,m=v===void 0?0:v,g=z0(typeof m!="number"?m:G0(m,Wl)),E=f===pa?JL:pa,y=t.rects.popper,w=t.elements[p?E:f],I=kx(Ii(w)?w:w.contextElement||Bs(t.elements.popper),l,u,o),A=ko(t.elements.reference),R=X0({reference:A,element:y,strategy:"absolute",placement:s}),P=mp(Object.assign({},y,R)),C=f===pa?P:A,D={top:I.top-C.top+g.top,bottom:C.bottom-I.bottom+g.bottom,left:I.left-C.left+g.left,right:C.right-I.right+g.right},$=t.modifiersData.offset;if(f===pa&&$){var S=$[s];Object.keys(D).forEach(function(V){var oe=[Gn,zn].indexOf(V)>=0?1:-1,J=[un,zn].indexOf(V)>=0?"y":"x";D[V]+=S[J]*oe})}return D}function Ox(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=n.boundary,i=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?W0:l,u=Oo(r),h=u?a?f_:f_.filter(function(p){return Oo(p)===u}):Wl,f=h.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=h);var d=f.reduce(function(p,v){return p[v]=dl(t,{placement:v,boundary:s,rootBoundary:i,padding:o})[Er(v)],p},{});return Object.keys(d).sort(function(p,v){return d[p]-d[v]})}function Mx(t){if(Er(t)===$m)return[];var e=eu(t);return[m_(t),e,m_(e)]}function Nx(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,p=d===void 0?!0:d,v=n.allowedAutoPlacements,m=e.options.placement,g=Er(m),E=g===m,y=l||(E||!p?[eu(m)]:Mx(m)),w=[m].concat(y).reduce(function(Ce,qe){return Ce.concat(Er(qe)===$m?Ox(e,{placement:qe,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:v}):qe)},[]),I=e.rects.reference,A=e.rects.popper,R=new Map,P=!0,C=w[0],D=0;D<w.length;D++){var $=w[D],S=Er($),V=Oo($)===So,oe=[un,zn].indexOf(S)>=0,J=oe?"width":"height",W=dl(e,{placement:$,boundary:u,rootBoundary:h,altBoundary:f,padding:c}),se=oe?V?Gn:hn:V?zn:un;I[J]>A[J]&&(se=eu(se));var Z=eu(se),De=[];if(i&&De.push(W[S]<=0),a&&De.push(W[se]<=0,W[Z]<=0),De.every(function(Ce){return Ce})){C=$,P=!1;break}R.set($,De)}if(P)for(var Y=p?3:1,we=function(qe){var ke=w.find(function(O){var G=R.get(O);if(G)return G.slice(0,qe).every(function(z){return z})});if(ke)return C=ke,"break"},ae=Y;ae>0;ae--){var Ue=we(ae);if(Ue==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const Lx={name:"flip",enabled:!0,phase:"main",fn:Nx,requiresIfExists:["offset"],data:{_skip:!1}};function v_(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function y_(t){return[un,Gn,zn,hn].some(function(e){return t[e]>=0})}function xx(t){var e=t.state,n=t.name,r=e.rects.reference,s=e.rects.popper,i=e.modifiersData.preventOverflow,o=dl(e,{elementContext:"reference"}),a=dl(e,{altBoundary:!0}),l=v_(o,r),c=v_(a,s,i),u=y_(l),h=y_(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const Vx={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xx};function $x(t,e,n){var r=Er(t),s=[hn,un].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=i[0],a=i[1];return o=o||0,a=(a||0)*s,[hn,Gn].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function Fx(t){var e=t.state,n=t.options,r=t.name,s=n.offset,i=s===void 0?[0,0]:s,o=W0.reduce(function(u,h){return u[h]=$x(h,e.rects,i),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const Ux={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Fx};function Bx(t){var e=t.state,n=t.name;e.modifiersData[n]=X0({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Hx={name:"popperOffsets",enabled:!0,phase:"read",fn:Bx,data:{}};function jx(t){return t==="x"?"y":"x"}function Wx(t){var e=t.state,n=t.options,r=t.name,s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,h=n.padding,f=n.tether,d=f===void 0?!0:f,p=n.tetherOffset,v=p===void 0?0:p,m=dl(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:u}),g=Er(e.placement),E=Oo(e.placement),y=!E,w=Bm(g),I=jx(w),A=e.modifiersData.popperOffsets,R=e.rects.reference,P=e.rects.popper,C=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,D=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(A){if(i){var V,oe=w==="y"?un:hn,J=w==="y"?zn:Gn,W=w==="y"?"height":"width",se=A[w],Z=se+m[oe],De=se-m[J],Y=d?-P[W]/2:0,we=E===So?R[W]:P[W],ae=E===So?-P[W]:-R[W],Ue=e.elements.arrow,Ce=d&&Ue?Um(Ue):{width:0,height:0},qe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:K0(),ke=qe[oe],O=qe[J],G=Ba(0,R[W],Ce[W]),z=y?R[W]/2-Y-G-ke-D.mainAxis:we-G-ke-D.mainAxis,le=y?-R[W]/2+Y+G+O+D.mainAxis:ae+G+O+D.mainAxis,be=e.elements.arrow&&Yl(e.elements.arrow),Se=be?w==="y"?be.clientTop||0:be.clientLeft||0:0,_=(V=$==null?void 0:$[w])!=null?V:0,b=se+z-_-Se,k=se+le-_,x=Ba(d?Ou(Z,b):Z,se,d?di(De,k):De);A[w]=x,S[w]=x-se}if(a){var M,K=w==="x"?un:hn,X=w==="x"?zn:Gn,q=A[I],Q=I==="y"?"height":"width",j=q+m[K],te=q-m[X],fe=[un,hn].indexOf(g)!==-1,ue=(M=$==null?void 0:$[I])!=null?M:0,ge=fe?j:q-R[Q]-P[Q]-ue+D.altAxis,Ie=fe?q+R[Q]+P[Q]-ue-D.altAxis:te,Me=d&&fe?px(ge,q,Ie):Ba(d?ge:j,q,d?Ie:te);A[I]=Me,S[I]=Me-q}e.modifiersData[r]=S}}const Yx={name:"preventOverflow",enabled:!0,phase:"main",fn:Wx,requiresIfExists:["offset"]};function qx(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Kx(t){return t===Ln(t)||!Wn(t)?Hm(t):qx(t)}function zx(t){var e=t.getBoundingClientRect(),n=Do(e.width)/t.offsetWidth||1,r=Do(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Gx(t,e,n){n===void 0&&(n=!1);var r=Wn(e),s=Wn(e)&&zx(e),i=Bs(e),o=ko(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pr(e)!=="body"||Wm(i))&&(a=Kx(e)),Wn(e)?(l=ko(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=jm(i))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Qx(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function s(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||s(i)}),r}function Xx(t){var e=Qx(t);return lx.reduce(function(n,r){return n.concat(e.filter(function(s){return s.phase===r}))},[])}function Jx(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Zx(t){var e=t.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var __={placement:"bottom",modifiers:[],strategy:"absolute"};function w_(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function eV(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,s=e.defaultOptions,i=s===void 0?__:s;return function(a,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},__,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],f=!1,d={state:u,setOptions:function(g){var E=typeof g=="function"?g(u.options):g;v(),u.options=Object.assign({},i,u.options,E),u.scrollParents={reference:Ii(a)?Ha(a):a.contextElement?Ha(a.contextElement):[],popper:Ha(l)};var y=Xx(Zx([].concat(r,u.options.modifiers)));return u.orderedModifiers=y.filter(function(w){return w.enabled}),p(),d.update()},forceUpdate:function(){if(!f){var g=u.elements,E=g.reference,y=g.popper;if(w_(E,y)){u.rects={reference:Gx(E,Yl(y),u.options.strategy==="fixed"),popper:Um(y)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(D){return u.modifiersData[D.name]=Object.assign({},D.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var I=u.orderedModifiers[w],A=I.fn,R=I.options,P=R===void 0?{}:R,C=I.name;
387typeof A=="function"&&(u=A({state:u,options:P,name:C,instance:d})||u)}}}},update:Jx(function(){return new Promise(function(m){d.forceUpdate(),m(u)})}),destroy:function(){v(),f=!0}};if(!w_(a,l))return d;d.setOptions(c).then(function(m){!f&&c.onFirstUpdate&&c.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var g=m.name,E=m.options,y=E===void 0?{}:E,w=m.effect;if(typeof w=="function"){var I=w({state:u,name:g,instance:d,options:y}),A=function(){};h.push(I||A)}})}function v(){h.forEach(function(m){return m()}),h=[]}return d}}var tV=[Ix,Hx,bx,hx,Ux,Lx,Yx,yx,Vx],nV=eV({defaultModifiers:tV}),rV=Object.defineProperty,sV=(t,e,n)=>e in t?rV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pe=(t,e,n)=>(sV(t,typeof e!="symbol"?e+"":e,n),n),kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iV=Object.prototype,oV=iV.hasOwnProperty;function aV(t,e){return t!=null&&oV.call(t,e)}var lV=aV,cV=Array.isArray,lr=cV,uV=typeof kc=="object"&&kc&&kc.Object===Object&&kc,Z0=uV,hV=Z0,fV=typeof self=="object"&&self&&self.Object===Object&&self,dV=hV||fV||Function("return this")(),kr=dV,pV=kr,mV=pV.Symbol,Oh=mV,E_=Oh,eI=Object.prototype,gV=eI.hasOwnProperty,vV=eI.toString,ma=E_?E_.toStringTag:void 0;function yV(t){var e=gV.call(t,ma),n=t[ma];try{t[ma]=void 0;var r=!0}catch{}var s=vV.call(t);return r&&(e?t[ma]=n:delete t[ma]),s}var _V=yV,wV=Object.prototype,EV=wV.toString;function bV(t){return EV.call(t)}var TV=bV,b_=Oh,IV=_V,AV=TV,RV="[object Null]",PV="[object Undefined]",T_=b_?b_.toStringTag:void 0;function CV(t){return t==null?t===void 0?PV:RV:T_&&T_ in Object(t)?IV(t):AV(t)}var Or=CV;function SV(t){return t!=null&&typeof t=="object"}var cr=SV,DV=Or,kV=cr,OV="[object Symbol]";function MV(t){return typeof t=="symbol"||kV(t)&&DV(t)==OV}var Ym=MV,NV=lr,LV=Ym,xV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VV=/^\w*$/;function $V(t,e){if(NV(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||LV(t)?!0:VV.test(t)||!xV.test(t)||e!=null&&t in Object(e)}var qm=$V;function FV(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var es=FV,UV=Or,BV=es,HV="[object AsyncFunction]",jV="[object Function]",WV="[object GeneratorFunction]",YV="[object Proxy]";function qV(t){if(!BV(t))return!1;var e=UV(t);return e==jV||e==WV||e==HV||e==YV}var Vi=qV,KV=kr,zV=KV["__core-js_shared__"],GV=zV,Zf=GV,I_=function(){var t=/[^.]+$/.exec(Zf&&Zf.keys&&Zf.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function QV(t){return!!I_&&I_ in t}var XV=QV,JV=Function.prototype,ZV=JV.toString;function e$(t){if(t!=null){try{return ZV.call(t)}catch{}try{return t+""}catch{}}return""}var tI=e$,t$=Vi,n$=XV,r$=es,s$=tI,i$=/[\\^$.*+?()[\]{}|]/g,o$=/^\[object .+?Constructor\]$/,a$=Function.prototype,l$=Object.prototype,c$=a$.toString,u$=l$.hasOwnProperty,h$=RegExp("^"+c$.call(u$).replace(i$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f$(t){if(!r$(t)||n$(t))return!1;var e=t$(t)?h$:o$;return e.test(s$(t))}var d$=f$;function p$(t,e){return t==null?void 0:t[e]}var m$=p$,g$=d$,v$=m$;function y$(t,e){var n=v$(t,e);return g$(n)?n:void 0}var $i=y$,_$=$i,w$=_$(Object,"create"),Mh=w$,A_=Mh;function E$(){this.__data__=A_?A_(null):{},this.size=0}var b$=E$;function T$(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var I$=T$,A$=Mh,R$="__lodash_hash_undefined__",P$=Object.prototype,C$=P$.hasOwnProperty;function S$(t){var e=this.__data__;if(A$){var n=e[t];return n===R$?void 0:n}return C$.call(e,t)?e[t]:void 0}var D$=S$,k$=Mh,O$=Object.prototype,M$=O$.hasOwnProperty;function N$(t){var e=this.__data__;return k$?e[t]!==void 0:M$.call(e,t)}var L$=N$,x$=Mh,V$="__lodash_hash_undefined__";function $$(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=x$&&e===void 0?V$:e,this}var F$=$$,U$=b$,B$=I$,H$=D$,j$=L$,W$=F$;function zo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zo.prototype.clear=U$;zo.prototype.delete=B$;zo.prototype.get=H$;zo.prototype.has=j$;zo.prototype.set=W$;var Y$=zo;function q$(){this.__data__=[],this.size=0}var K$=q$;function z$(t,e){return t===e||t!==t&&e!==e}var Go=z$,G$=Go;function Q$(t,e){for(var n=t.length;n--;)if(G$(t[n][0],e))return n;return-1}var Nh=Q$,X$=Nh,J$=Array.prototype,Z$=J$.splice;function e2(t){var e=this.__data__,n=X$(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Z$.call(e,n,1),--this.size,!0}var t2=e2,n2=Nh;function r2(t){var e=this.__data__,n=n2(e,t);return n<0?void 0:e[n][1]}var s2=r2,i2=Nh;function o2(t){return i2(this.__data__,t)>-1}
vendor: 8,119 bytes, line 387
387var a2=o2,l2=Nh;function c2(t,e){var n=this.__data__,r=l2(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var u2=c2,h2=K$,f2=t2,d2=s2,p2=a2,m2=u2;function Qo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Qo.prototype.clear=h2;Qo.prototype.delete=f2;Qo.prototype.get=d2;Qo.prototype.has=p2;Qo.prototype.set=m2;var Lh=Qo,g2=$i,v2=kr,y2=g2(v2,"Map"),Km=y2,R_=Y$,_2=Lh,w2=Km;function E2(){this.size=0,this.__data__={hash:new R_,map:new(w2||_2),string:new R_}}var b2=E2;function T2(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var I2=T2,A2=I2;function R2(t,e){var n=t.__data__;return A2(e)?n[typeof e=="string"?"string":"hash"]:n.map}var xh=R2,P2=xh;function C2(t){var e=P2(this,t).delete(t);return this.size-=e?1:0,e}var S2=C2,D2=xh;function k2(t){return D2(this,t).get(t)}var O2=k2,M2=xh;function N2(t){return M2(this,t).has(t)}var L2=N2,x2=xh;function V2(t,e){var n=x2(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var $2=V2,F2=b2,U2=S2,B2=O2,H2=L2,j2=$2;function Xo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Xo.prototype.clear=F2;Xo.prototype.delete=U2;Xo.prototype.get=B2;Xo.prototype.has=H2;Xo.prototype.set=j2;var zm=Xo,nI=zm,W2="Expected a function";function Gm(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(W2);var n=function(){var r=arguments,s=e?e.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);var o=t.apply(this,r);return n.cache=i.set(s,o)||i,o};return n.cache=new(Gm.Cache||nI),n}Gm.Cache=nI;var Y2=Gm,q2=Y2,K2=500;function z2(t){var e=q2(t,function(r){return n.size===K2&&n.clear(),r}),n=e.cache;return e}var G2=z2,Q2=G2,X2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J2=/\\(\\)?/g,Z2=Q2(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(X2,function(n,r,s,i){e.push(s?i.replace(J2,"$1"):r||n)}),e}),eF=Z2;function tF(t,e){for(var n=-1,r=t==null?0:t.length,s=Array(r);++n<r;)s[n]=e(t[n],n,t);return s}var nF=tF,P_=Oh,rF=nF,sF=lr,iF=Ym,oF=1/0,C_=P_?P_.prototype:void 0,S_=C_?C_.toString:void 0;function rI(t){if(typeof t=="string")return t;if(sF(t))return rF(t,rI)+"";if(iF(t))return S_?S_.call(t):"";var e=t+"";return e=="0"&&1/t==-oF?"-0":e}var aF=rI,lF=aF;function cF(t){return t==null?"":lF(t)}var uF=cF,hF=lr,fF=qm,dF=eF,pF=uF;function mF(t,e){return hF(t)?t:fF(t,e)?[t]:dF(pF(t))}var sI=mF,gF=Or,vF=cr,yF="[object Arguments]";function _F(t){return vF(t)&&gF(t)==yF}var wF=_F,D_=wF,EF=cr,iI=Object.prototype,bF=iI.hasOwnProperty,TF=iI.propertyIsEnumerable,IF=D_(function(){return arguments}())?D_:function(t){return EF(t)&&bF.call(t,"callee")&&!TF.call(t,"callee")},Qm=IF,AF=9007199254740991,RF=/^(?:0|[1-9]\d*)$/;function PF(t,e){var n=typeof t;return e=e??AF,!!e&&(n=="number"||n!="symbol"&&RF.test(t))&&t>-1&&t%1==0&&t<e}var Xm=PF,CF=9007199254740991;function SF(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=CF}var Jm=SF,DF=Ym,kF=1/0;function OF(t){if(typeof t=="string"||DF(t))return t;var e=t+"";return e=="0"&&1/t==-kF?"-0":e}var Vh=OF,MF=sI,NF=Qm,LF=lr,xF=Xm,VF=Jm,$F=Vh;function FF(t,e,n){e=MF(e,t);for(var r=-1,s=e.length,i=!1;++r<s;){var o=$F(e[r]);if(!(i=t!=null&&n(t,o)))break;t=t[o]}return i||++r!=s?i:(s=t==null?0:t.length,!!s&&VF(s)&&xF(o,s)&&(LF(t)||NF(t)))}var oI=FF,UF=lV,BF=oI;function HF(t,e){return t!=null&&BF(t,e,UF)}var aI=HF,jF=Or,WF=cr,YF="[object Date]";function qF(t){return WF(t)&&jF(t)==YF}var KF=qF;function zF(t){return function(e){return t(e)}}var lI=zF,pl={},GF={get exports(){return pl},set exports(t){pl=t}};(function(t,e){var n=Z0,r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===r,o=i&&n.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(GF,pl);var QF=KF,XF=lI,k_=pl,O_=k_&&k_.isDate,JF=O_?XF(O_):QF,ZF=JF,eU=Or,tU=lr,nU=cr,rU="[object String]";function sU(t){return typeof t=="string"||!tU(t)&&nU(t)&&eU(t)==rU}var mr=sU;function iU(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var cI=iU,oU=Lh;function aU(){this.__data__=new oU,this.size=0}var lU=aU;function cU(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var uU=cU;function hU(t){return this.__data__.get(t)}var fU=hU;function dU(t){return this.__data__.has(t)}var pU=dU,mU=Lh,gU=Km,vU=zm,yU=200;function _U(t,e){var n=this.__data__;if(n instanceof mU){var r=n.__data__;if(!gU||r.length<yU-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new vU(r)}return n.set(t,e),this.size=n.size,this}var wU=_U,EU=Lh,bU=lU,TU=uU,IU=fU,AU=pU,RU=wU;function Jo(t){var e=this.__data__=new EU(t);this.size=e.size}Jo.prototype.clear=bU;Jo.prototype.delete=TU;Jo.prototype.get=IU;Jo.prototype.has=AU;Jo.prototype.set=RU;var Zm=Jo,PU="__lodash_hash_undefined__";function CU(t){return this.__data__.set(t,PU),this}var SU=CU;function DU(t){return this.__data__.has(t)}var kU=DU,OU=zm,MU=SU,NU=kU;function Mu(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new OU;++e<n;)this.add(t[e])}Mu.prototype.add=Mu.prototype.push=MU;Mu.prototype.has=NU;var LU=Mu;function xU(t,e){return t.has(e)}var VU=xU,$U=LU,FU=cI,UU=VU,BU=1,HU=2;function jU(t,e,n,r,s,i){var o=n&BU,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var h=-1,f=!0,d=n&HU?new $U:void 0;for(i.set(t,e),i.set(e,t);++h<a;){var p=t[h],v=e[h];if(r)var m=o?r(v,p,h,e,t,i):r(p,v,h,t,e,i);if(m!==void 0){if(m)continue;f=!1;break}if(d){if(!FU(e,function(g,E){if(!UU(d,E)&&(p===g||s(p,g,n,r,i)))return d.push(E)})){f=!1;break}}else if(!(p===v||s(p,v,n,r,i))){f=!1;break}}return i.delete(t),i.delete(e),f}var uI=jU,WU=kr,YU=WU.Uint8Array,hI=YU;function qU(t){var e=-1,n=Array(t.size);return t.forEach(function(r,s){n[++e]=[s,r]}),n}var KU=qU;function zU(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var GU=zU,M_=Oh,N_=hI,QU=Go,XU=uI,JU=KU,ZU=GU,eB=1,tB=2,nB="[object Boolean]",rB="[object Date]",sB="[object Error]",iB="[object Map]",oB="[object Number]",aB="[object RegExp]",lB="[object Set]",cB="[object String]",uB="[object Symbol]",hB="[object ArrayBuffer]",fB="[object DataView]",L_=M_?M_.prototype:void 0,ed=L_?L_.valueOf:void 0;function dB(t,e,n,r,s,i,o){switch(n){case fB:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hB:return!(t.byteLength!=e.byteLength||!i(new N_(t),new N_(e)));case nB:case rB:case oB:return QU(+t,+e);case sB:return t.name==e.name&&t.message==e.message;case aB:case cB:return t==e+"";case iB:var a=JU;case lB:var l=r&eB;if(a||(a=ZU),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;r|=tB,o.set(t,e);var u=XU(a(t),a(e),r,s,i,o);return o.delete(t),u;case uB:if(ed)return ed.call(t)==ed.call(e)}return!1}var pB=dB;function mB(t,e){for(var n=-1,r=e.length,s=t.length;++n<r;)t[s+n]=e[n];return t}var gB=mB,vB=gB,yB=lr;function _B(t,e,n){var r=e(t);return yB(t)?r:vB(r,n(t))}var wB=_B;function EB(t,e){for(var n=-1,r=t==null?0:t.length,s=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[s++]=o)}return i}var bB=EB;function TB(){return[]}var IB=TB,AB=bB,RB=IB,PB=Object.prototype,CB=PB.propertyIsEnumerable,x_=Object.getOwnPropertySymbols,SB=x_?function(t){return t==null?[]:(t=Object(t),AB(x_(t),function(e){return CB.call(t,e)}))}:RB,DB=SB;function kB(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var OB=kB,Mo={},MB={get exports(){return Mo},set exports(t){Mo=t}};function NB(){return!1}var LB=NB;(function(t,e){var n=kr,r=LB,s=e&&!e.nodeType&&e,i=s&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===s,a=o?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;t.exports=c})(MB,Mo);var xB=Or,VB=Jm,$B=cr,FB="[object Arguments]",UB="[object Array]",BB="[object Boolean]",HB="[object Date]",jB="[object Error]",WB="[object Function]",YB="[object Map]",qB="[object Number]",KB="[object Object]",zB="[object RegExp]",GB="[object Set]",QB="[object String]",XB="[object WeakMap]",JB="[object ArrayBuffer]",ZB="[object DataView]",eH="[object Float32Array]",tH="[object Float64Array
387]",nH="[object Int8Array]",rH="[object Int16Array]",sH="[object Int32Array]",iH="[object Uint8Array]",oH="[object Uint8ClampedArray]",aH="[object Uint16Array]",lH="[object Uint32Array]",nt={};nt[eH]=nt[tH]=nt[nH]=nt[rH]=nt[sH]=nt[iH]=nt[oH]=nt[aH]=nt[lH]=!0;nt[FB]=nt[UB]=nt[JB]=nt[BB]=nt[ZB]=nt[HB]=nt[jB]=nt[WB]=nt[YB]=nt[qB]=nt[KB]=nt[zB]=nt[GB]=nt[QB]=nt[XB]=!1;function cH(t){return $B(t)&&VB(t.length)&&!!nt[xB(t)]}var uH=cH,hH=uH,fH=lI,V_=pl,$_=V_&&V_.isTypedArray,dH=$_?fH($_):hH,eg=dH,pH=OB,mH=Qm,gH=lr,vH=Mo,yH=Xm,_H=eg,wH=Object.prototype,EH=wH.hasOwnProperty;function bH(t,e){var n=gH(t),r=!n&&mH(t),s=!n&&!r&&vH(t),i=!n&&!r&&!s&&_H(t),o=n||r||s||i,a=o?pH(t.length,String):[],l=a.length;for(var c in t)(e||EH.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||yH(c,l)))&&a.push(c);return a}var fI=bH,TH=Object.prototype;function IH(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||TH;return t===n}var tg=IH;function AH(t,e){return function(n){return t(e(n))}}var dI=AH,RH=dI,PH=RH(Object.keys,Object),CH=PH,SH=tg,DH=CH,kH=Object.prototype,OH=kH.hasOwnProperty;function MH(t){if(!SH(t))return DH(t);var e=[];for(var n in Object(t))OH.call(t,n)&&n!="constructor"&&e.push(n);return e}var NH=MH,LH=Vi,xH=Jm;function VH(t){return t!=null&&xH(t.length)&&!LH(t)}var ql=VH,$H=fI,FH=NH,UH=ql;function BH(t){return UH(t)?$H(t):FH(t)}var ng=BH,HH=wB,jH=DB,WH=ng;function YH(t){return HH(t,WH,jH)}var qH=YH,F_=qH,KH=1,zH=Object.prototype,GH=zH.hasOwnProperty;function QH(t,e,n,r,s,i){var o=n&KH,a=F_(t),l=a.length,c=F_(e),u=c.length;if(l!=u&&!o)return!1;for(var h=l;h--;){var f=a[h];if(!(o?f in e:GH.call(e,f)))return!1}var d=i.get(t),p=i.get(e);if(d&&p)return d==e&&p==t;var v=!0;i.set(t,e),i.set(e,t);for(var m=o;++h<l;){f=a[h];var g=t[f],E=e[f];if(r)var y=o?r(E,g,f,e,t,i):r(g,E,f,t,e,i);if(!(y===void 0?g===E||s(g,E,n,r,i):y)){v=!1;break}m||(m=f=="constructor")}if(v&&!m){var w=t.constructor,I=e.constructor;w!=I&&"constructor"in t&&"constructor"in e&&!(typeof w=="function"&&w instanceof w&&typeof I=="function"&&I instanceof I)&&(v=!1)}return i.delete(t),i.delete(e),v}var XH=QH,JH=$i,ZH=kr,ej=JH(ZH,"DataView"),tj=ej,nj=$i,rj=kr,sj=nj(rj,"Promise"),ij=sj,oj=$i,aj=kr,lj=oj(aj,"Set"),cj=lj,uj=$i,hj=kr,fj=uj(hj,"WeakMap"),dj=fj,gp=tj,vp=Km,yp=ij,_p=cj,wp=dj,pI=Or,Zo=tI,U_="[object Map]",pj="[object Object]",B_="[object Promise]",H_="[object Set]",j_="[object WeakMap]",W_="[object DataView]",mj=Zo(gp),gj=Zo(vp),vj=Zo(yp),yj=Zo(_p),_j=Zo(wp),Zs=pI;(gp&&Zs(new gp(new ArrayBuffer(1)))!=W_||vp&&Zs(new vp)!=U_||yp&&Zs(yp.resolve())!=B_||_p&&Zs(new _p)!=H_||wp&&Zs(new wp)!=j_)&&(Zs=function(t){var e=pI(t),n=e==pj?t.constructor:void 0,r=n?Zo(n):"";if(r)switch(r){case mj:return W_;case gj:return U_;case vj:return B_;case yj:return H_;case _j:return j_}return e});var wj=Zs,td=Zm,Ej=uI,bj=pB,Tj=XH,Y_=wj,q_=lr,K_=Mo,Ij=eg,Aj=1,z_="[object Arguments]",G_="[object Array]",Oc="[object Object]",Rj=Object.prototype,Q_=Rj.hasOwnProperty;function Pj(t,e,n,r,s,i){var o=q_(t),a=q_(e),l=o?G_:Y_(t),c=a?G_:Y_(e);l=l==z_?Oc:l,c=c==z_?Oc:c;var u=l==Oc,h=c==Oc,f=l==c;if(f&&K_(t)){if(!K_(e))return!1;o=!0,u=!1}if(f&&!u)return i||(i=new td),o||Ij(t)?Ej(t,e,n,r,s,i):bj(t,e,l,n,r,s,i);if(!(n&Aj)){var d=u&&Q_.call(t,"__wrapped__"),p=h&&Q_.call(e,"__wrapped__");
vendor: 4,384 bytes, line 387
387if(d||p){var v=d?t.value():t,m=p?e.value():e;return i||(i=new td),s(v,m,n,r,i)}}return f?(i||(i=new td),Tj(t,e,n,r,s,i)):!1}var Cj=Pj,Sj=Cj,X_=cr;function mI(t,e,n,r,s){return t===e?!0:t==null||e==null||!X_(t)&&!X_(e)?t!==t&&e!==e:Sj(t,e,n,r,mI,s)}var gI=mI,Dj=Zm,kj=gI,Oj=1,Mj=2;function Nj(t,e,n,r){var s=n.length,i=s,o=!r;if(t==null)return!i;for(t=Object(t);s--;){var a=n[s];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++s<i;){a=n[s];var l=a[0],c=t[l],u=a[1];if(o&&a[2]){if(c===void 0&&!(l in t))return!1}else{var h=new Dj;if(r)var f=r(c,u,l,t,e,h);if(!(f===void 0?kj(u,c,Oj|Mj,r,h):f))return!1}}return!0}var Lj=Nj,xj=es;function Vj(t){return t===t&&!xj(t)}var vI=Vj,$j=vI,Fj=ng;function Uj(t){for(var e=Fj(t),n=e.length;n--;){var r=e[n],s=t[r];e[n]=[r,s,$j(s)]}return e}var Bj=Uj;function Hj(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var yI=Hj,jj=Lj,Wj=Bj,Yj=yI;function qj(t){var e=Wj(t);return e.length==1&&e[0][2]?Yj(e[0][0],e[0][1]):function(n){return n===t||jj(n,t,e)}}var Kj=qj,zj=sI,Gj=Vh;function Qj(t,e){e=zj(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Gj(e[n++])];return n&&n==r?t:void 0}var _I=Qj,Xj=_I;function Jj(t,e,n){var r=t==null?void 0:Xj(t,e);return r===void 0?n:r}var si=Jj;function Zj(t,e){return t!=null&&e in Object(t)}var e4=Zj,t4=e4,n4=oI;function r4(t,e){return t!=null&&n4(t,e,t4)}var s4=r4,i4=gI,o4=si,a4=s4,l4=qm,c4=vI,u4=yI,h4=Vh,f4=1,d4=2;function p4(t,e){return l4(t)&&c4(e)?u4(h4(t),e):function(n){var r=o4(n,t);return r===void 0&&r===e?a4(n,t):i4(e,r,f4|d4)}}var m4=p4;function g4(t){return t}var rg=g4;function v4(t){return function(e){return e==null?void 0:e[t]}}var y4=v4,_4=_I;function w4(t){return function(e){return _4(e,t)}}var E4=w4,b4=y4,T4=E4,I4=qm,A4=Vh;function R4(t){return I4(t)?b4(A4(t)):T4(t)}var P4=R4,C4=Kj,S4=m4,D4=rg,k4=lr,O4=P4;function M4(t){return typeof t=="function"?t:t==null?D4:typeof t=="object"?k4(t)?S4(t[0],t[1]):C4(t):O4(t)}var wI=M4;function N4(t){return function(e,n,r){for(var s=-1,i=Object(e),o=r(e),a=o.length;a--;){var l=o[t?a:++s];if(n(i[l],l,i)===!1)break}return e}}var L4=N4,x4=L4,V4=x4(),EI=V4,$4=EI,F4=ng;function U4(t,e){return t&&$4(t,e,F4)}var bI=U4,B4=ql;function H4(t,e){return function(n,r){if(n==null)return n;if(!B4(n))return t(n,r);for(var s=n.length,i=e?s:-1,o=Object(n);(e?i--:++i<s)&&r(o[i],i,o)!==!1;);return n}}var j4=H4,W4=bI,Y4=j4,q4=Y4(W4),K4=q4,z4=K4;function G4(t,e){var n;return z4(t,function(r,s,i){return n=e(r,s,i),!n}),!!n}var Q4=G4,X4=Go,J4=ql,Z4=Xm,e9=es;function t9(t,e,n){if(!e9(n))return!1;var r=typeof e;return(r=="number"?J4(n)&&Z4(e,n.length):r=="string"&&e in n)?X4(n[e],t):!1}var sg=t9,n9=cI,r9=wI,s9=Q4,i9=lr,o9=sg;function a9(t,e,n){var r=i9(t)?n9:s9;return n&&o9(t,e,n)&&(e=void 0),r(t,r9(e))}var l9=a9,c9=Or,u9=cr,h9="[object Boolean]";function f9(t){return t===!0||t===!1||u9(t)&&c9(t)==h9}var d9=f9,p9=Or,m9=cr,g9="[object Number]";function v9(t){return typeof t=="number"||m9(t)&&p9(t)==g9}var sr=v9,y9=$i,_9=function(){try{var t=y9(Object,"defineProperty");return t({},"",{}),t}catch{}}(),TI=_9,J_=TI;function w9(t,e,n){e=="__proto__"&&J_?J_(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var $h=w9,E9=$h,b9=Go,T9=Object.prototype,I9=T9.hasOwnProperty;function A9(t,e,n){var r=t[e];(!(I9.call(t,e)&&b9(r,n))||n===void 0&&!(e in t))&&E9(t,e,n)}var R9=A9,P9=$h,C9=bI,S9=wI;function D9(t,e){var n={};return e=S9(e),C9(t,function(r,s,i){P9(n,s,e(r,s,i))}),n}var k9=D9;function O9(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var II=O9,M9=II,Z_=Math.max;function N9(t,e,n){return e=Z_(e===void 0?t.length-1:e,0),function(){for(var r=arguments,s=-1,i=Z_(r.length-e,0),o=Array(i);++s<i;)o[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=n(o),M9(t,this,a)}}var L9=N9;function x9(t){return function(){return t}}var V9=x9,$9=V9,ew=TI,F9=rg,U9=ew?function(t,e){return ew(t,"toString",{configurable:!0,enumerable:!1,value:$9(e),writable:!0})}:F9,B9=U9,H9=800,j9=16,W9=Date.now;function Y9(t){var e=0,n=0;return function(){var r=W9(),s=j9-(r-n);if(n=r,s>0){if(++e>=H9)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var q9=Y9,K9=B9,z9=q9,G9=z9(K9),Q9=G9,X9=rg,J9=L9,Z9=Q9;function eW(t,e){return Z9(J9(t,e,X9),t+"")}var ig=eW;function tW(t){var e=[];
387if(t!=null)for(var n in Object(t))e.push(n);return e}var nW=tW,rW=es,sW=tg,iW=nW,oW=Object.prototype,aW=oW.hasOwnProperty;function lW(t){if(!rW(t))return iW(t);var e=sW(t),n=[];for(var r in t)r=="constructor"&&(e||!aW.call(t,r))||n.push(r);return n}var cW=lW,uW=fI,hW=cW,fW=ql;function dW(t){return fW(t)?uW(t,!0):hW(t)}var og=dW,pW=ig,mW=Go,gW=sg,vW=og,AI=Object.prototype,yW=AI.hasOwnProperty,_W=pW(function(t,e){t=Object(t);var n=-1,r=e.length,s=r>2?e[2]:void 0;for(s&&gW(e[0],e[1],s)&&(r=1);++n<r;)for(var i=e[n],o=vW(i),a=-1,l=o.length;++a<l;){var c=o[a],u=t[c];(u===void 0||mW(u,AI[c])&&!yW.call(t,c))&&(t[c]=i[c])}return t}),tw=_W,wW=$h,EW=Go;function bW(t,e,n){(n!==void 0&&!EW(t[e],n)||n===void 0&&!(e in t))&&wW(t,e,n)}var RI=bW,Nu={},TW={get exports(){return Nu},set exports(t){Nu=t}};(function(t,e){var n=kr,r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===r,o=i?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var h=c.length,f=a?a(h):new c.constructor(h);return c.copy(f),f}t.exports=l})(TW,Nu);var nw=hI;function IW(t){var e=new t.constructor(t.byteLength);return new nw(e).set(new nw(t)),e}var AW=IW,RW=AW;function PW(t,e){var n=e?RW(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var CW=PW;function SW(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var DW=SW,kW=es,rw=Object.create,OW=function(){function t(){}return function(e){if(!kW(e))return{};if(rw)return rw(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),MW=OW,NW=dI,LW=NW(Object.getPrototypeOf,Object),PI=LW,xW=MW,VW=PI,$W=tg;function FW(t){return typeof t.constructor=="function"&&!$W(t)?xW(VW(t)):{}}var UW=FW,BW=ql,HW=cr;function jW(t){return HW(t)&&BW(t)}var WW=jW,YW=Or,qW=PI,KW=cr,zW="[object Object]",GW=Function.prototype,QW=Object.prototype,CI=GW.toString,XW=QW.hasOwnProperty,JW=CI.call(Object);function ZW(t){if(!KW(t)||YW(t)!=zW)return!1;var e=qW(t);if(e===null)return!0;var n=XW.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&CI.call(n)==JW}var e6=ZW;function t6(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var SI=t6,n6=R9,r6=$h;function s6(t,e,n,r){var s=!n;n||(n={});for(var i=-1,o=e.length;++i<o;){var a=e[i],l=r?r(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),s?r6(n,a,l):n6(n,a,l)}return n}var i6=s6,o6=i6,a6=og;function l6(t){return o6(t,a6(t))}var c6=l6,sw=RI,u6=Nu,h6=CW,f6=DW,d6=UW,iw=Qm,ow=lr,p6=WW,m6=Mo,g6=Vi,v6=es,y6=e6,_6=eg,aw=SI,w6=c6;function E6(t,e,n,r,s,i,o){var a=aw(t,n),l=aw(e,n),c=o.get(l);if(c){sw(t,n,c);return}var u=i?i(a,l,n+"",t,e,o):void 0,h=u===void 0;if(h){var f=ow(l),d=!f&&m6(l),p=!f&&!d&&_6(l);u=l,f||d||p?ow(a)?u=a:p6(a)?u=f6(a):d?(h=!1,u=u6(l,!0)):p?(h=!1,u=h6(l,!0)):u=[]:y6(l)||iw(l)?(u=a,iw(a)?u=w6(a):(!v6(a)||g6(a))&&(u=d6(l))):h=!1}h&&(o.set(l,u),s(u,l,r,i,o),o.delete(l)),sw(t,n,u)}var b6=E6,T6=Zm,I6=RI,A6=EI,R6=b6,P6=es,C6=og,S6=SI;function DI(t,e,n,r,s){t!==e&&A6(e,function(i,o){if(s||(s=new T6),P6(i))R6(t,e,o,n,DI,r,s);else{var a=r?r(S6(t,o),i,o+"",t,e,s):void 0;a===void 0&&(a=i),I6(t,o,a)}},C6)}var kI=DI,D6=kI,lw=es;function OI(t,e,n,r,s,i){return lw(t)&&lw(e)&&(i.set(e,t),D6(t,e,void 0,OI,i),i.delete(e)),t}var k6=OI,O6=ig,M6=sg;function N6(t){return O6(function(e,n){var r=-1,s=n.length,i=s>1?n[s-1]:void 0,o=s>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(s--,i):void 0,o&&M6(n[0],n[1],o)&&(i=s<3?void 0:i,s=1),e=Object(e);++r<s;){var a=n[r];a&&t(e,a,r,i)}return e})}var L6=N6,x6=kI,V6=L6,$6=V6(function(t,e,n,r){x6(t,e,n,r)}),F6=$6,U6=II,B6=ig,H6=k6,j6=F6,W6=B6(function(t){return t.push(void 0,H6),U6(j6,void 0,t)}),No=W6;function Y6(t){return t&&t.length?t[0]:void 0}var MI=Y6;function q6(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var eo=q6;const K6=t=>Object.prototype.toString.call(t).slice(8,-1),mo=t=>ZF(t)&&!isNaN(t.getTime()),Kr=t=>K6(t)==="Object",NI=aI,cw=(t,e)=>l9(e,n=>aI(t,n)),ze=(t,e,n="0")=>{for(t=t!=null?String(t):"",e=e||2;t.length<e;)t=`${n}${t}`;return t},Yn=t=>Array.isArray(t),Fr=t=>Yn(t)&&t.length>0,Lu=t=>t==null?null:document&&mr(t)?document.querySelector(t):t.$el??t,vs=(t,e,n,r=void 0)=>{t.removeEventListener(e,n,r)},ys=(t,e,n,r=void 0)=>(t.addEventListener(e,n,r),()=>vs(t,e,n,r)),tu=(t,e)=>!!t&&!!e&&(t===e||t.contains(e)),Mc=(t,e)=>{(t.key===" "||t.key==="Enter")&&(e(t),t.preventDefault())},LI=(t,...e)=>{const n={};let r;for(r in t)e.includes(r)||(n[r]=t[r]);return n},xI=(t,e)=>{const n={};return e.forEach(r=>{r in t&&(n[r]=t[r])}),n};function z6(t,e,n){return Math.min(Math.max(t,e),n)}var xu={},G6={get exports(){return xu},set exports(t){xu=t}};
387(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(r){if(r===null||r===!0||r===!1)return NaN;var s=Number(r);return isNaN(s)?s:s<0?Math.ceil(s):Math.floor(s)}t.exports=e.default})(G6,xu);const Q6=J0(xu);var Vu={},X6={get exports(){return Vu},set exports(t){Vu=t}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(r){var s=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return s.setUTCFullYear(r.getFullYear()),r.getTime()-s.getTime()}t.exports=e.default})(X6,Vu);const uw=J0(Vu);function J6(t,e){var n=nY(e);return n.formatToParts?eY(n,t):tY(n,t)}var Z6={year:0,month:1,day:2,hour:3,minute:4,second:5};function eY(t,e){try{for(var n=t.formatToParts(e),r=[],s=0;s<n.length;s++){var i=Z6[n[s].type];i>=0&&(r[i]=parseInt(n[s].value,10))}return r}catch(o){if(o instanceof RangeError)return[NaN];throw o}}function tY(t,e){var n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var nd={};function nY(t){if(!nd[t]){var e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=e==="06/25/2014, 00:00:00"||e==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";nd[t]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return nd[t]}function VI(t,e,n,r,s,i,o){var a=new Date(0);return a.setUTCFullYear(t,e,n),a.setUTCHours(r,s,i,o),a}var hw=36e5,rY=6e4,rd={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function sY(t,e,n){var r,s;if(!t||(r=rd.timezoneZ.exec(t),r))return 0;var i;if(r=rd.timezoneHH.exec(t),r)return i=parseInt(r[1],10),fw(i)?-(i*hw):NaN;if(r=rd.timezoneHHMM.exec(t),r){i=parseInt(r[1],10);var o=parseInt(r[2],10);return fw(i,o)?(s=Math.abs(i)*hw+o*rY,i>0?-s:s):NaN}if(aY(t)){e=new Date(e||Date.now());var a=n?e:iY(e),l=Ep(a,t),c=n?l:oY(e,l,t);return-c}return NaN}function iY(t){return VI(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function Ep(t,e){var n=J6(t,e),r=VI(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),s=t.getTime(),i=s%1e3;return s-=i>=0?i:1e3+i,r-s}function oY(t,e,n){var r=t.getTime(),s=r-e,i=Ep(new Date(s),n);if(e===i)return e;s-=i-e;var o=Ep(new Date(s),n);return i===o?i:Math.max(i,o)}function fw(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}var dw={};function aY(t){if(dw[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),dw[t]=!0,!0}catch{return!1}}var lY=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const cY=lY;var sd=36e5,pw=6e4,uY=2,Xt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:cY};function hY(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);var n=e||{},r=n.additionalDigits==null?uY:Q6(n.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var s=fY(t),i=dY(s.date,r),o=i.year,a=i.restDateString,l=pY(a,o);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,h;if(s.time&&(u=mY(s.time),isNaN(u)))return new Date(NaN);if(s.timeZone||n.timeZone){if(h=sY(s.timeZone||n.timeZone,new Date(c+u)),isNaN(h))return new Date(NaN)}else h=uw(new Date(c+u)),h=uw(new Date(c+u+h));return new Date(c+u+h)}else return new Date(NaN)}function fY(t){var e={},n=Xt.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=Xt.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){var s=Xt.timeZone.exec(r);s?(e.time=r.replace(s[1],""),e.timeZone=s[1].trim()):e.time=r}return e}function dY(t,e){var n=Xt.YYY[e],r=Xt.YYYYY[e],s;if(s=Xt.YYYY.exec(t)||r.exec(t),s){var i=s[1];return{year:parseInt(i,10),restDateString:t.slice(i.length)}}if(s=Xt.YY.exec(t)||n.exec(t),s){var o=s[1];return{year:parseInt(o,10)*100,restDateString:t.slice(o.length)}}return{year:null}}function pY(t,e){if(e===null)return null;var n,r,s,i;if(t.length===0)return r=new Date(0),r.setUTCFullYear(e),r;if(n=Xt.MM.exec(t),n)return r=new Date(0),s=parseInt(n[1],10)-1,gw(e,s)?(r.setUTCFullYear(e,s),r):new Date(NaN);if(n=Xt.DDD.exec(t),n){r=new Date(0);var o=parseInt(n[1],10);return yY(e,o)?(r.setUTCFullYear(e,0,o),r):new Date(NaN)}if(n=Xt.MMDD.exec(t),n){r=new Date(0),s=parseInt(n[1],10)-1;var a=parseInt(n[2],10);return gw(e,s,a)?(r.setUTCFullYear(e,s,a),r):new Date(NaN)}if(n=Xt.Www.exec(t),n)return i=parseInt(n[1],10)-1,vw(e,i)?mw(e,i):new Date(NaN);if(n=Xt.WwwD.exec(t),n){i=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return vw(e,i,l)?mw(e,i,l):new Date(NaN)}return null}function mY(t){var e,n,r;if(e=Xt.HH.exec(t),e)return n=parseFloat(e[1].replace(",",".")),id(n)?n%24*sd:NaN;if(e=Xt.HHMM.exec(t),e)return n=parseInt(e[1],10),r=parseFloat(e[2].replace(",",".")),id(n,r)?n%24*sd+r*pw:NaN;
387if(e=Xt.HHMMSS.exec(t),e){n=parseInt(e[1],10),r=parseInt(e[2],10);var s=parseFloat(e[3].replace(",","."));return id(n,r,s)?n%24*sd+r*pw+s*1e3:NaN}return null}function mw(t,e,n){e=e||0,n=n||0;var r=new Date(0);r.setUTCFullYear(t,0,4);var s=r.getUTCDay()||7,i=e*7+n+1-s;return r.setUTCDate(r.getUTCDate()+i),r}var gY=[31,28,31,30,31,30,31,31,30,31,30,31],vY=[31,29,31,30,31,30,31,31,30,31,30,31];function $I(t){return t%400===0||t%4===0&&t%100!==0}function gw(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;var r=$I(t);if(r&&n>vY[e]||!r&&n>gY[e])return!1}return!0}function yY(t,e){if(e<1)return!1;var n=$I(t);return!(n&&e>366||!n&&e>365)}function vw(t,e,n){return!(e<0||e>52||n!=null&&(n<0||n>6))}function id(t,e,n){return!(t!=null&&(t<0||t>=25)||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}function Yt(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function nu(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nu=function(n){return typeof n}:nu=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nu(t)}function ts(t){Yt(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||nu(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ea(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}var _Y={};function ag(){return _Y}function Ai(t,e){var n,r,s,i,o,a,l,c;Yt(1,arguments);var u=ag(),h=ea((n=(r=(s=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(a=o.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&s!==void 0?s:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=ts(t),d=f.getDay(),p=(d<h?7:0)+d-h;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}function yw(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var wY=6048e5;function EY(t,e,n){Yt(2,arguments);var r=Ai(t,n),s=Ai(e,n),i=r.getTime()-yw(r),o=s.getTime()-yw(s);return Math.round((i-o)/wY)}function bY(t){Yt(1,arguments);var e=ts(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(0,0,0,0),e}function TY(t){Yt(1,arguments);var e=ts(t);return e.setDate(1),e.setHours(0,0,0,0),e}function IY(t,e){return Yt(1,arguments),EY(bY(t),TY(t),e)+1}function AY(t,e){var n,r,s,i,o,a,l,c;Yt(1,arguments);var u=ts(t),h=u.getFullYear(),f=ag(),d=ea((n=(r=(s=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(a=o.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&s!==void 0?s:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(h+1,0,d),p.setHours(0,0,0,0);var v=Ai(p,e),m=new Date(0);m.setFullYear(h,0,d),m.setHours(0,0,0,0);var g=Ai(m,e);return u.getTime()>=v.getTime()?h+1:u.getTime()>=g.getTime()?h:h-1}function RY(t,e){var n,r,s,i,o,a,l,c;Yt(1,arguments);var u=ag(),h=ea((n=(r=(s=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(a=o.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&s!==void 0?s:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=AY(t,e),d=new Date(0);d.setFullYear(f,0,h),d.setHours(0,0,0,0);var p=Ai(d,e);return p}var PY=6048e5;function CY(t,e){Yt(1,arguments);var n=ts(t),r=Ai(n,e).getTime()-RY(n,e).getTime();return Math.round(r/PY)+1}function $u(t){return Yt(1,arguments),Ai(t,{weekStartsOn:1}
387)}function SY(t){Yt(1,arguments);var e=ts(t),n=e.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var s=$u(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var o=$u(i);return e.getTime()>=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function DY(t){Yt(1,arguments);var e=SY(t),n=new Date(0);n.setFullYear(e,0,4),n.setHours(0,0,0,0);var r=$u(n);return r}var kY=6048e5;function OY(t){Yt(1,arguments);var e=ts(t),n=$u(e).getTime()-DY(e).getTime();return Math.round(n/kY)+1}function Qt(t,e){Yt(2,arguments);var n=ts(t),r=ea(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Fu(t,e){Yt(2,arguments);var n=ts(t),r=ea(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var s=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var o=i.getDate();return s>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),s),n)}function _w(t,e){Yt(2,arguments);var n=ea(e);return Fu(t,n*12)}const MY={daily:["year","month","day"],weekly:["year","month","week"],monthly:["year","month"]};function NY({monthComps:t,prevMonthComps:e,nextMonthComps:n},r){const s=[],{firstDayOfWeek:i,firstWeekday:o,isoWeeknumbers:a,weeknumbers:l,numDays:c,numWeeks:u}=t,h=o+(o<i?$t:0)-i;let f=!0,d=!1,p=!1,v=0;const m=new Intl.DateTimeFormat(r.id,{weekday:"long",year:"numeric",month:"short",day:"numeric"});let g=e.numDays-h+1,E=e.numDays-g+1,y=Math.floor((g-1)/$t+1),w=1,I=e.numWeeks,A=1,R=e.month,P=e.year;const C=new Date,D=C.getDate(),$=C.getMonth()+1,S=C.getFullYear();for(let V=1;V<=P3;V++){for(let oe=1,J=i;oe<=$t;oe++,J+=J===$t?1-$t:1){f&&J===o&&(g=1,E=t.numDays,y=Math.floor((g-1)/$t+1),w=Math.floor((c-g)/$t+1),I=1,A=u,R=t.month,P=t.year,f=!1,d=!0);const W=r.getDateFromParams(P,R,g,0,0,0,0),se=r.getDateFromParams(P,R,g,12,0,0,0),Z=r.getDateFromParams(P,R,g,23,59,59,999),De=W,Y=`${ze(P,4)}-${ze(R,2)}-${ze(g,2)}`,we=oe,ae=$t-oe,Ue=l[V-1],Ce=a[V-1],qe=g===D&&R===$&&P===S,ke=d&&g===1,O=d&&g===c,G=V===1,z=V===u,le=oe===1,be=oe===$t,Se=QI(P,R,g);s.push({locale:r,id:Y,position:++v,label:g.toString(),ariaLabel:m.format(new Date(P,R-1,g)),day:g,dayFromEnd:E,weekday:J,weekdayPosition:we,weekdayPositionFromEnd:ae,weekdayOrdinal:y,weekdayOrdinalFromEnd:w,week:I,weekFromEnd:A,weekPosition:V,weeknumber:Ue,isoWeeknumber:Ce,month:R,year:P,date:De,startDate:W,endDate:Z,noonDate:se,dayIndex:Se,isToday:qe,isFirstDay:ke,isLastDay:O,isDisabled:!d,isFocusable:!d,isFocused:!1,inMonth:d,inPrevMonth:f,inNextMonth:p,onTop:G,onBottom:z,onLeft:le,onRight:be,classes:[`id-${Y}`,`day-${g}`,`day-from-end-${E}`,`weekday-${J}`,`weekday-position-${we}`,`weekday-ordinal-${y}`,`weekday-ordinal-from-end-${w}`,`week-${I}`,`week-from-end-${A}`,{"is-today":qe,"is-first-day":ke,"is-last-day":O,"in-month":d,"in-prev-month":f,"in-next-month":p,"on-top":G,"on-bottom":z,"on-left":le,"on-right":be}]}),d&&O?(d=!1,p=!0,g=1,E=c,y=1,w=Math.floor((c-g)/$t+1),I=1,A=n.numWeeks,R=n.month,P=n.year):(g++,E--,y=Math.floor((g-1)/$t+1),w=Math.floor((c-g)/$t+1))}I++,A--}return s}function LY(t,e,n,r){const s=t.reduce((i,o,a)=>{const l=Math.floor(a/7);let c=i[l];return c||(c={id:`week-${l+1}`,title:"",week:o.week,weekPosition:o.weekPosition,weeknumber:o.weeknumber,isoWeeknumber:o.isoWeeknumber,weeknumberDis
387play:e?o.weeknumber:n?o.isoWeeknumber:void 0,days:[]},i[l]=c),c.days.push(o),i},Array(t.length/$t));return s.forEach(i=>{const o=i.days[0],a=i.days[i.days.length-1];o.month===a.month?i.title=`${r.formatDate(o.date,"MMMM YYYY")}`:o.year===a.year?i.title=`${r.formatDate(o.date,"MMM")} - ${r.formatDate(a.date,"MMM YYYY")}`:i.title=`${r.formatDate(o.date,"MMM YYYY")} - ${r.formatDate(a.date,"MMM YYYY")}`}),s}function xY(t,e){return t.days.map(n=>({label:e.formatDate(n.date,e.masks.weekdays),weekday:n.weekday}))}function VY(t,e){return`${e}.${ze(t,2)}`}function FI(t,e,n){return xI(n.getDateParts(n.toDate(t)),MY[e])}function UI({day:t,week:e,month:n,year:r},s,i,o){if(i==="daily"&&t){const a=new Date(r,n-1,t),l=Qt(a,s);return{day:l.getDate(),month:l.getMonth()+1,year:l.getFullYear()}}else if(i==="weekly"&&e){const l=o.getMonthParts(n,r).firstDayOfMonth,c=Qt(l,(e-1+s)*7),u=o.getDateParts(c);return{week:u.week,month:u.month,year:u.year}}else{const a=new Date(r,n-1,1),l=Fu(a,s);return{month:l.getMonth()+1,year:l.getFullYear()}}}function gr(t){return t!=null&&t.month!=null&&t.year!=null}function bp(t,e){return!gr(t)||!gr(e)?!1:(t=t,e=e,t.year!==e.year?t.year<e.year:t.month&&e.month&&t.month!==e.month?t.month<e.month:t.week&&e.week&&t.week!==e.week?t.week<e.week:t.day&&e.day&&t.day!==e.day?t.day<e.day:!1)}function Uu(t,e){return!gr(t)||!gr(e)?!1:(t=t,e=e,t.year!==e.year?t.year>e.year:t.month&&e.month&&t.month!==e.month?t.month>e.month:t.week&&e.week&&t.week!==e.week?t.week>e.week:t.day&&e.day&&t.day!==e.day?t.day>e.day:!1)}function $Y(t,e,n){return(t||!1)&&!bp(t,e)&&!Uu(t,n)}function FY(t,e){return!t&&e||t&&!e?!1:!t&&!e?!0:(t=t,e=e,t.year===e.year&&t.month===e.month&&t.week===e.week&&t.day===e.day)}function UY(t,e,n,r){if(!gr(t)||!gr(e))return[];const s=[];for(;!Uu(t,e);)s.push(t),t=UI(t,1,n,r);return s}function BI(t){const{day:e,week:n,month:r,year:s}=t;let i=`${s}-${ze(r,2)}`;return n&&(i=`${i}-w${n}`),e&&(i=`${i}-${ze(e,2)}`),i}function BY(t,e){const{month:n,year:r,showWeeknumbers:s,showIsoWeeknumbers:i}=t,o=new Date(r,n-1,15),a=e.getMonthParts(n,r),l=e.getPrevMonthParts(n,r),c=e.getNextMonthParts(n,r),u=NY({monthComps:a,prevMonthComps:l,nextMonthComps:c},e),h=LY(u,s,i,e),f=xY(h[0],e);return{id:BI(t),month:n,year:r,monthTitle:e.formatDate(o,e.masks.title),shortMonthLabel:e.formatDate(o,"MMM"),monthLabel:e.formatDate(o,"MMMM"),shortYearLabel:r.toString().substring(2),yearLabel:r.toString(),monthComps:a,prevMonthComps:l,nextMonthComps:c,days:u,weeks:h,weekdays:f}}function HY(t,e){const{day:n,week:r,view:s,trimWeeks:i}=t,o={...e,...t,title:"",viewDays:[],viewWeeks:[]};switch(s){case"daily":{let a=o.days.find(c=>c.inMonth);n?a=o.days.find(c=>c.day===n&&c.inMonth)||a:r&&(a=o.days.find(c=>c.week===r&&c.inMonth));const l=o.weeks[a.week-1];o.viewWeeks=[l],o.viewDays=[a],o.week=a.week,o.weekTitle=l.title,o.day=a.day,o.dayTitle=a.ariaLabel,o.title=o.dayTitle;break}case"weekly":{o.week=r||1;const a=o.weeks[o.week-1];o.viewWeeks=[a],o.viewDays=a.days,o.weekTitle=a.title,o.title=o.weekTitle;break}default:{o.title=o.monthTitle,o.viewWeeks=o.weeks.slice(0,i?o.monthComps.numWeeks:void 0),o.viewDays=o.days;break}}return o}class ww{constructor(e,n,r){pe(this,"keys",[]),pe(this,"store",{}),this.size=e,this.createKey=n,this.createItem=r}get(...e){const n=this.createKey(...e);return this.store[n]}getOrSet(...e){const n=this.createKey(...e);if(this.store[n])return this.store[n];const r=this.createItem(...e);if(this.keys.length>=this.size){const s=this.keys.shift();s!=null&&delete this.store[s]}return this.keys.push(n),this.store[n]=r,r}}class go{constructor(e,n=new Bu){pe(this,"order"),pe(this,"locale"),pe(this,"start",null),pe(this,"end",null),pe(this,"repeat",null);var r;this.locale=n;const{start:s,end:i,span:o,order:a,repeat:l}=e;mo(s)&&(this.start=n.getDateParts(s)),mo(i)?this.end=n.getDateParts(i):this.start!=null&&o&&(this.end=n.getDateParts(Qt(this.start.date,o-1))),this.order=a??0,l&&(this.repeat=new Hu({from:(r=this.start)==null?void 0:r.date,...l},{locale:this.locale}))}static fromMany(e,n){return(Yn(e)?e:[e]).filter(r=>r).map(r=>go.from(r,n))}static from(e,n){if(e instanceof go)return e;const r={start:null,end:null};return e!=null&&(Yn(e)?(r.start=e[0]??null,r.end=e[1]??null):Kr(e)?Object.assign(r,e):(r.start=e,r.end=e)),r.start!=null&&(r.start=new Date(r.start)),r.end!=null&&(r.end=new Date(r.end)),new go(r,n)}get opts(){const{order:e,locale:n}=this;return{order:e,locale:n}}get hasRepeat(){return!!this.repeat}get isSingleDay(){const{start:e,end:n}=this;return e&&n&&e.year===n.year&&e.month===n.month&&e.day===n.day}get isMultiDay(){return!this.isSingleDay}get daySpan(){return this.start==null||this.end==null?this.hasRepeat?1:1/0:this.end.dayIndex-this.start.dayIndex}startsOnDay(e){var n,r;return((n=this.start)==null?void 0:n.dayIndex)===e.dayIndex||!!((r=this.repeat)!=null&&r.passes(e))}intersectsDay(e){return this.intersectsDayRange(e,e)}intersectsRange(e){var n,r;return this.intersectsDayRange(((n=e.start)==null?void 0:n.dayIndex)??-1/0,((r=e.end)==null?void 0:r.dayIndex)??1/0)}intersectsDayRange(e,n){return!(this.start&&this.start.dayIndex>n||this.end&&this.end.dayIndex<e)}}class jY{constructor(){pe(this,"records",{})}render(e,n,r){var s,i,o,a;let l=null;const c=r[0].dayIndex,u=r[r.length-1].dayIndex;return n.hasRepeat?r.forEach(h=>{var f,d;
387if(n.startsOnDay(h)){const p=n.daySpan<1/0?n.daySpan:1;l={startDay:h.dayIndex,startTime:((f=n.start)==null?void 0:f.time)??0,endDay:h.dayIndex+p-1,endTime:((d=n.end)==null?void 0:d.time)??ru},this.getRangeRecords(e).push(l)}}):n.intersectsDayRange(c,u)&&(l={startDay:((s=n.start)==null?void 0:s.dayIndex)??-1/0,startTime:((i=n.start)==null?void 0:i.time)??-1/0,endDay:((o=n.end)==null?void 0:o.dayIndex)??1/0,endTime:((a=n.end)==null?void 0:a.time)??1/0},this.getRangeRecords(e).push(l)),l}getRangeRecords(e){let n=this.records[e.key];return n||(n={ranges:[],data:e},this.records[e.key]=n),n.ranges}getCell(e,n){return this.getCells(n).find(i=>i.data.key===e)}cellExists(e,n){const r=this.records[e];return r==null?!1:r.ranges.some(s=>s.startDay<=n&&s.endDay>=n)}getCells(e){const n=Object.values(this.records),r=[],{dayIndex:s}=e;return n.forEach(({data:i,ranges:o})=>{o.filter(a=>a.startDay<=s&&a.endDay>=s).forEach(a=>{const l=s===a.startDay,c=s===a.endDay,u=l?a.startTime:0,h=new Date(e.startDate.getTime()+u),f=c?a.endTime:ru,d=new Date(e.endDate.getTime()+f),p=u===0&&f===ru,v=i.order||0;r.push({...a,data:i,onStart:l,onEnd:c,startTime:u,startDate:h,endTime:f,endDate:d,allDay:p,order:v})})}),r.sort((i,o)=>i.order-o.order),r}}const zr={ar:{dow:7,L:"D/‏M/‏YYYY"},bg:{dow:2,L:"D.MM.YYYY"},ca:{dow:2,L:"DD/MM/YYYY"},"zh-CN":{dow:2,L:"YYYY/MM/DD"},"zh-TW":{dow:1,L:"YYYY/MM/DD"},hr:{dow:2,L:"DD.MM.YYYY"},cs:{dow:2,L:"DD.MM.YYYY"},da:{dow:2,L:"DD.MM.YYYY"},nl:{dow:2,L:"DD-MM-YYYY"},"en-US":{dow:1,L:"MM/DD/YYYY"},"en-AU":{dow:2,L:"DD/MM/YYYY"},"en-CA":{dow:1,L:"YYYY-MM-DD"},"en-GB":{dow:2,L:"DD/MM/YYYY"},"en-IE":{dow:2,L:"DD-MM-YYYY"},"en-NZ":{dow:2,L:"DD/MM/YYYY"},"en-ZA":{dow:1,L:"YYYY/MM/DD"},eo:{dow:2,L:"YYYY-MM-DD"},et:{dow:2,L:"DD.MM.YYYY"},fi:{dow:2,L:"DD.MM.YYYY"},fr:{dow:2,L:"DD/MM/YYYY"},"fr-CA":{dow:1,L:"YYYY-MM-DD"},"fr-CH":{dow:2,L:"DD.MM.YYYY"},de:{dow:2,L:"DD.MM.YYYY"},he:{dow:1,L:"DD.MM.YYYY"},id:{dow:2,L:"DD/MM/YYYY"},it:{dow:2,L:"DD/MM/YYYY"},ja:{dow:1,L:"YYYY年M月D日"},ko:{dow:1,L:"YYYY.MM.DD"},lv:{dow:2,L:"DD.MM.YYYY"},lt:{dow:2,L:"DD.MM.YYYY"},mk:{dow:2,L:"D.MM.YYYY"},nb:{dow:2,L:"D. MMMM YYYY"},nn:{dow:2,L:"D. MMMM YYYY"}
387,pl:{dow:2,L:"DD.MM.YYYY"},pt:{dow:2,L:"DD/MM/YYYY"},ro:{dow:2,L:"DD.MM.YYYY"},ru:{dow:2,L:"DD.MM.YYYY"},sk:{dow:2,L:"DD.MM.YYYY"},"es-ES":{dow:2,L:"DD/MM/YYYY"},"es-MX":{dow:2,L:"DD/MM/YYYY"},sv:{dow:2,L:"YYYY-MM-DD"},th:{dow:1,L:"DD/MM/YYYY"},tr:{dow:2,L:"DD.MM.YYYY"},uk:{dow:2,L:"DD.MM.YYYY"},vi:{dow:2,L:"DD/MM/YYYY"}};zr.en=zr["en-US"];zr.es=zr["es-ES"];zr.no=zr.nb;zr.zh=zr["zh-CN"];const WY=Object.entries(zr).reduce((t,[e,{dow:n,L:r}])=>(t[e]={id:e,firstDayOfWeek:n,masks:{L:r}},t),{}),YY="MMMM YYYY",qY="W",KY="MMM",zY="h A",GY=["L","YYYY-MM-DD","YYYY/MM/DD"],QY=["L h:mm A","YYYY-MM-DD h:mm A","YYYY/MM/DD h:mm A"],XY=["L HH:mm","YYYY-MM-DD HH:mm","YYYY/MM/DD HH:mm"],JY=["h:mm A"],ZY=["HH:mm"],e3="WWW, MMM D, YYYY",t3=["L","YYYY-MM-DD","YYYY/MM/DD"],n3="iso",r3="YYYY-MM-DDTHH:mm:ss.SSSZ",s3={title:YY,weekdays:qY,navMonths:KY,hours:zY,input:GY,inputDateTime:QY,inputDateTime24hr:XY,inputTime:JY,inputTime24hr:ZY,dayPopover:e3,data:t3,model:n3,iso:r3},i3=300,o3=60,a3=80,l3={maxSwipeTime:i3,minHorizontalSwipeDistance:o3,maxVerticalSwipeDistance:a3},c3={componentPrefix:"V",color:"blue",isDark:!1,navVisibility:"click",titlePosition:"center",transition:"slide-h",touch:l3,masks:s3,locales:WY,datePicker:{updateOnInput:!0,inputDebounce:1e3,popover:{visibility:"hover-focus",placement:"bottom-start",isInteractive:!0}}},vo=Kn(c3),u3=L(()=>k9(vo.locales,t=>(t.masks=No(t.masks,vo.masks),t))),Ns=t=>typeof window<"u"&&NI(window.__vcalendar__,t)?si(window.__vcalendar__,t):si(vo,t),h3=(t,e)=>(t.config.globalProperties.$VCalendar=vo,Object.assign(vo,No(e,vo))),f3=12,d3=5;function p3(t,e){const n=new Intl.DateTimeFormat().resolvedOptions().locale;let r;mr(t)?r=t:NI(t,"id")&&(r=t.id),r=(r||n).toLowerCase();const s=Object.keys(e),i=l=>s.find(c=>c.toLowerCase()===l);r=i(r)||i(r.substring(0,2))||n;const o={...e["en-IE"],...e[r],id:r,monthCacheSize:f3,pageCacheSize:d3};return Kr(t)?No(t,o):o}class Bu{constructor(e=void 0,n){pe(this,"id"),pe(this,"daysInWeek"),pe(this,"firstDayOfWeek"),pe(this,"masks"),pe(this,"timezone"),pe(this,"hourLabels"),pe(this,"dayNames"),pe(this,"dayNamesShort"),pe(this,"dayNamesShorter"),pe(this,"dayNamesNarrow"),pe(this,"monthNames"),pe(this,"monthNamesShort"),pe(this,"relativeTimeNames"),pe(this,"amPm",["am","pm"]),pe(this,"monthCache"),pe(this,"pageCache");const{id:r,firstDayOfWeek:s,masks:i,monthCacheSize:o,pageCacheSize:a}=p3(e,u3.value);this.monthCache=new ww(o,x3,V3),this.pageCache=new ww(a,BI,BY),this.id=r,this.daysInWeek=$t,this.firstDayOfWeek=z6(s,1,$t),this.masks=i,this.timezone=n||void 0,this.hourLabels=this.getHourLabels(),this.dayNames=od("long",this.id),this.dayNamesShort=od("short",this.id),this.dayNamesShorter=this.dayNamesShort.map(l=>l.substring(0,2)),this.dayNamesNarrow=od("narrow",this.id),this.monthNames=Rw("long",this.id),this.monthNamesShort=Rw("short",this.id),this.relativeTimeNames=U3(this.id)}formatDate(e,n){return Y3(e,n,this)}parseDate(e,n){return Pw(e,n,this)}toDate(e,n={}){const r=new Date(NaN);let s=r;const{fillDate:i,mask:o,patch:a,rules:l}=n;if(sr(e)?(n.type="number",s=new Date(+e)):mr(e)?(n.type="string",s=e?Pw(e,o||"iso",this):r):mo(e)?(n.type="date",s=new Date(e.getTime())):lg(e)&&(n.type="object",s=this.getDateFromParts(e)),s&&(a||l)){let c=this.getDateParts(s);if(a&&i!=null){const u=this.getDateParts(this.toDate(i));c=this.getDateParts(this.toDate({...u,...xI(c,R3[a])}))}l&&(c=W3(c,l)),s=this.getDateFromParts(c)}return s||r}toDateOrNull(e,n={}){const r=this.toDate(e,n);return isNaN(r.getTime())?null:r}fromDate(e,{type:n,mask:r}={}){switch(n){case"number":return e?e.getTime():NaN;case"string":return e?this.formatDate(e,r||"iso"):"";case"object":return e?this.getDateParts(e):null;default:return e?new Date(e):null}}range(e){return go.from(e,this)}ranges(e){return go.fromMany(e,this)}getDateParts(e){return L3(e,this)}getDateFromParts(e){return JI(e,this.timezone)}getDateFromParams(e,n,r,s,i,o,a){return this.getDateFromParts({year:e,month:n,day:r,hours:s,minutes:i,seconds:o,milliseconds:a})}getPage(e){const n=this.pageCache.getOrSet(e,this);return HY(e,n)}getMonthParts(e,n){const{firstDayOfWeek:r}=this;return this.monthCache.getOrSet(e,n,r)}getThisMonthParts(){const e=new Date;return this.getMonthParts(e.getMonth()+1,e.getFullYear())}getPrevMonthParts(e,n){return e===1?this.getMonthParts(12,n-1):this.getMonthParts(e-1,n)}getNextMonthParts(e,n){return e===12?this.getMonthParts(1,n+1):this.getMonthParts(e+1,n)}getHourLabels(){return F3().map(e=>this.formatDate(e,this.masks.hours))}getDayId(e){return this.formatDate(e,"YYYY-MM-DD")}}var Gi=(t=>(t.Any="any",t.All="all",t))(Gi||{}),HI=(t=>(t.Days="days",t.Weeks="weeks",t.Months="months",t.Years="years",t))(HI||{}),jI=(t=>(t.Days="days",t.Weekdays="weekdays",t.Weeks="weeks",t.Months="months",t.Years="years",t))(jI||{}),WI=(t=>(t.OrdinalWeekdays="ordinalWeekdays",t))(WI||{});class m3{constructor(e,n,r){pe(this,"validated",!0),this.type=e,this.interval=n,this.from=r,this.from||(console.error('A valid "from" date is required for date interval rule. This rule will be skipped.'),this.validated=!1)}passes(e){if(!this.validated)return!0;const{date:n}=e;switch(this.type){case"days":return cg(this.from.date,n)%this.interval===0;case"weeks":return M3(this.from.date,n)%this.interval===0;case"months":return N3(this.from.date,n)%this.interval===0;case"years":return XI(this.from.date,n)%this.interval===0;default:return!1}}}class ta{constructor(e,n,r,s){pe(this,"components",[]),this.type=e,this.validator=r,this.getter=s,this.components=this.normalizeComponents(n)}static create(e,n){switch(e){case"days":return new g3(n);case"weekdays":return new v3(n);case"weeks":return new y3(n);case"months":return new _3(n);case"years":return new w3(n)}}normalizeComponents(e){if(this.validator(e))return[e];if(!Yn(e))return[];const n=[];return e.forEach(r=>{if(!this.validator(r)){console.error(`Component value ${r}
387 in invalid for "${this.type}" rule. This rule will be skipped.`);return}n.push(r)}),n}passes(e){return this.getter(e).some(s=>this.components.includes(s))}}class g3 extends ta{constructor(e){super("days",e,T3,({day:n,dayFromEnd:r})=>[n,-r])}}class v3 extends ta{constructor(e){super("weekdays",e,Tp,({weekday:n})=>[n])}}class y3 extends ta{constructor(e){super("weeks",e,I3,({week:n,weekFromEnd:r})=>[n,-r])}}class _3 extends ta{constructor(e){super("months",e,A3,({month:n})=>[n])}}class w3 extends ta{constructor(e){super("years",e,sr,({year:n})=>[n])}}class E3{constructor(e,n){pe(this,"components"),this.type=e,this.components=this.normalizeComponents(n)}normalizeArrayConfig(e){const n=[];return e.forEach((r,s)=>{if(sr(r)){if(s===0)return;if(!Ew(e[0])){console.error(`Ordinal range for "${this.type}" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`);return}if(!Tp(r)){console.error(`Acceptable range for "${this.type}" rule is from 1 to 5. This rule will be skipped`);return}n.push([e[0],r])}else Yn(r)&&n.push(...this.normalizeArrayConfig(r))}),n}normalizeComponents(e){const n=[];return e.forEach((r,s)=>{if(sr(r)){if(s===0)return;if(!Ew(e[0])){console.error(`Ordinal range for "${this.type}" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`);return}if(!Tp(r)){console.error(`Acceptable range for "${this.type}" rule is from 1 to 5. This rule will be skipped`);return}n.push([e[0],r])}else Yn(r)&&n.push(...this.normalizeArrayConfig(r))}),n}passes(e){const{weekday:n,weekdayOrdinal:r,weekdayOrdinalFromEnd:s}=e;return this.components.some(([i,o])=>(i===r||i===-s)&&n===o)}}class b3{constructor(e){pe(this,"type","function"),pe(this,"validated",!0),this.fn=e,Vi(e)||(console.error("The function rule requires a valid function. This rule will be skipped."),this.validated=!1)}passes(e){return this.validated?this.fn(e):!0}}class Hu{constructor(e,n={},r){pe(this,"validated",!0),pe(this,"config"),pe(this,"type",Gi.Any),pe(this,"from"),pe(this,"until"),pe(this,"rules",[]),pe(this,"locale",new Bu),this.parent=r,n.locale&&(this.locale=n.locale),this.config=e,Vi(e)?(this.type=Gi.All,this.rules=[new b3(e)]):Yn(e)?(this.type=Gi.Any,this.rules=e.map(s=>new Hu(s,n,this))):Kr(e)?(this.type=Gi.All,this.from=e.from?this.locale.getDateParts(e.from):r==null?void 0:r.from,this.until=e.until?this.locale.getDateParts(e.until):r==null?void 0:r.until,this.rules=this.getObjectRules(e)):(console.error("Rule group configuration must be an object or an array."),this.validated=!1)}getObjectRules(e){const n=[];if(e.every&&(mr(e.every)&&(e.every=[1,`${e.every}s`]),Yn(e.every))){const[r=1,s=HI.Days]=e.every;n.push(new m3(s,r,this.from))}return Object.values(jI).forEach(r=>{r in e&&n.push(ta.create(r,e[r]))}),Object.values(WI).forEach(r=>{r in e&&n.push(new E3(r,e[r]))}),e.on!=null&&(Yn(e.on)||(e.on=[e.on]),n.push(new Hu(e.on,{locale:this.locale},this.parent))),n}passes(e){return this.validated?this.from&&e.dayIndex<=this.from.dayIndex||this.until&&e.dayIndex>=this.until.dayIndex?!1:this.type===Gi.Any?this.rules.some(n=>n.passes(e)):this.rules.every(n=>n.passes(e)):!0}}function T3(t){return sr(t)?t>=1&&t<=31:!1}function Tp(t){return sr(t)?t>=1&&t<=7:!1}function I3(t){return sr(t)?t>=-6&&t<=-1||t>=1&&t<=6:!1}function A3(t){return sr(t)?t>=1&&t<=12:!1}function Ew(t){return!(!sr(t)||t<-5||t>5||t===0)}const R3={dateTime:["year","month","day","hours","minutes","seconds","milliseconds"],date:["year","month","day"],time:["hours","minutes","seconds","milliseconds"]},$t=7,P3=6,YI=1e3,qI=YI*60,KI=qI*60,ru=KI*24,C3=[31,28,31,30,31,30,31,31,30,31,30,31],S3=["L","iso"],Pa={milliseconds:[0,999,3],seconds:[0,59,2],minutes:[0,59,2],hours:[0,23,2]},zI=/d{1,2}|W{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|Z{1,4}|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,D3=/\[([^]*?)\]/gm,bw={D(t){return t.day},DD(t){return ze(t.day,2)},d(t){return t.weekday-1},dd(t){return ze(t.weekday-1,2)},W(t,e){return e.dayNamesNarrow[t.weekday-1]},WW(t,e){return e.dayNamesShorter[t.weekday-1]},WWW(t,e){return e.dayNamesShort[t.weekday-1]},WWWW(t,e){return e.dayNames[t.weekday-1]},M(t){return t.month},MM(t){return ze(t.month,2)},MMM(t,e){return e.monthNamesShort[t.month-1]},MMMM(t,e){return e.monthNames[t.month-1]},YY(t){return String(t.year).substr(2)},YYYY(t){return ze(t.year,4)},h(t){return t.hours%12||12},hh(t){return ze(t.hours%12||12,2)},H(t){return t.hours},HH(t){return ze(t.hours,2)},m(t){return t.minutes},mm(t){return ze(t.minutes,2)},s(t){return t.seconds},ss(t){return ze(t.seconds,2)},S(t){return Math.round(t.milliseconds/100)},SS(t){return ze(Math.round(t.milliseconds/10),2)},SSS(t){return ze(t.milliseconds,3)},a(t,e){return t.hours<12?e.amPm[0]:e.amPm[1]},A(t,e){return t.hours<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},Z(){return"Z"},ZZ(t){const e=t.timezoneOffset;return`${e>0?"-":"+"}${ze(Math.floor(Math.abs(e)/60),2)}`},ZZZ(t){const e=t.timezoneOffset;return`${e>0?"-":"+"}${ze(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)}`},ZZZZ(t){const e=t.timezoneOffset;return`${e>0?"-":"+"}${ze(Math.floor(Math.abs(e)/60),2)}:${ze(Math.abs(e)%60,2)}`}},ls=/\d\d?/,k3=/\d{3}/,O3=/\d{4}/,ga=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Tw=()=>{},Iw=t=>(e,n,r)=>{const s=r[t].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(e.month=s)},Xe={D:[ls,(t,e)=>{t.day=e}],Do:[new RegExp(ls.source+ga.source),(t,e)=>{t.day=parseInt(e,10)}],d:[ls,Tw],W:[ga,Tw],M:[ls,(t,e)=>{t.month=e-1}],MMM:[ga,Iw("monthNamesShort")],MMMM:[ga,Iw("monthNames")],YY:[ls,(t,e)=>{const r=+new Date().getFullYear().toString().substr(0,2);t.year=+`${e>68?r-1:r}${e}`}],YYYY:[O3,(t,e)=>{t.year=e}],S:[/\d/,(t,e)=>{t.milliseconds=e*100}],SS:[/\d{2}/,(t,e)=>{t.milliseconds=e*10}],SSS:[k3,(t,e)=>{t.milliseconds=e}],h:[ls,(t,e)=>{t.hours=e}],m:[ls,(t,e)=>{t.minutes=e}],s:[ls,(t,e)=>{t.seconds=e}],a:[ga,(t,e,n)=>{const r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],Z:[/[^\s]*?[+-]\d\d:?\d\d|[^\s]*?Z?/,(t,e)=>{e==="Z"&&(e="+00:00");const n=`${e}`.match(/([+-]|\d\d)/gi);if(n){const r=+n[1]*60+parseInt(n[2],10);t.timezoneOffset=n[0]==="+"?r:-r}}]};Xe.DD=Xe.D;Xe.dd=Xe.d;Xe.WWWW=Xe.WWW=Xe.WW=Xe.W;Xe.MM=Xe.M;Xe.mm=Xe.m;Xe.hh=Xe.H=Xe.HH=Xe.h;Xe.ss=Xe.s;Xe.A=Xe.a;Xe.ZZZZ=Xe.ZZZ=Xe.ZZ=Xe.Z;function GI(t,e){return(Fr(t)&&t||[mr(t)&&t||"YYYY-MM-DD"]).map(n=>S3.reduce((r,s)=>r.replace(s,e.masks[s]||""),n))}function lg(t){return Kr(t)&&"year"in t&&"month"in t&&"day"in t}function Aw(t,e=1){const n=t.getDay()+1,r=n>=e?e-n:-(7-(e-n));return Qt(t,r)}function QI(t,e,n){const r=Date.UTC(t,e-1,n);return cg(new Date(0),new Date(r))}function cg(t,e){return Math.round((e.getTime()-t.getTime())/ru)}function M3(t,e){return Math.ceil(cg(Aw(t),Aw(e))/7)}function XI(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}function N3(t,e){return XI(t,e)*12+(e.getMonth()-t.getMonth())}function JI(t,e=""){const n=new Date,{year:r=n.getFullYear(),month:s=n.getMonth()+1,day:i=n.getDate(),hours:o=0,minutes:a=0,seconds:l=0,milliseconds:c=0}=t;if(e){const u=`${ze(r,4)}-${ze(s,2)}-${ze(i,2)}T${ze(o,2)}:${ze(a,2)}:${ze(l,2)}.${ze(c,3)}`;return hY(u,{timeZone:e})}return new Date(r,s-1,i,o,a,l,c)}function L3(t,e){let n=new Date(t.getTime());
387e.timezone&&(n=new Date(t.toLocaleString("en-US",{timeZone:e.timezone})),n.setMilliseconds(t.getMilliseconds()));const r=n.getMilliseconds(),s=n.getSeconds(),i=n.getMinutes(),o=n.getHours(),a=r+s*YI+i*qI+o*KI,l=n.getMonth()+1,c=n.getFullYear(),u=e.getMonthParts(l,c),h=n.getDate(),f=u.numDays-h+1,d=n.getDay()+1,p=Math.floor((h-1)/7+1),v=Math.floor((u.numDays-h)/7+1),m=Math.ceil((h+Math.abs(u.firstWeekday-u.firstDayOfWeek))/7),g=u.numWeeks-m+1,E=u.weeknumbers[m],y=QI(c,l,h);return{milliseconds:r,seconds:s,minutes:i,hours:o,time:a,day:h,dayFromEnd:f,weekday:d,weekdayOrdinal:p,weekdayOrdinalFromEnd:v,week:m,weekFromEnd:g,weeknumber:E,month:l,year:c,date:n,dateTime:n.getTime(),dayIndex:y,timezoneOffset:0,isValid:!0}}function x3(t,e,n){return`${e}-${t}-${n}`}function V3(t,e,n){const r=e%4===0&&e%100!==0||e%400===0,s=new Date(e,t-1,1),i=s.getDay()+1,o=t===2&&r?29:C3[t-1],a=n-1,l=IY(s,{weekStartsOn:a}),c=[],u=[];for(let h=0;h<l;h++){const f=Qt(s,h*7);c.push(CY(f,{weekStartsOn:a})),u.push(OY(f))}return{firstDayOfWeek:n,firstDayOfMonth:s,inLeapYear:r,firstWeekday:i,numDays:o,numWeeks:l,month:t,year:e,weeknumbers:c,isoWeeknumbers:u}}function $3(){const t=[];for(let s=0;s<$t;s++)t.push(JI({year:2020,month:1,day:5+s,hours:12}));return t}function od(t,e=void 0){const n=new Intl.DateTimeFormat(e,{weekday:t});return $3().map(r=>n.format(r))}function F3(){const t=[];for(let e=0;e<=24;e++)t.push(new Date(2e3,0,1,e));return t}function U3(t=void 0){const e=["second","minute","hour","day","week","month","quarter","year"],n=new Intl.RelativeTimeFormat(t);return e.reduce((r,s)=>{const i=n.formatToParts(100,s);return r[s]=i[1].unit,r},{})}function ZI(){const t=[];for(let e=0;e<12;e++)t.push(new Date(2e3,e,15));return t}function Rw(t,e=void 0){const n=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC"});return ZI().map(r=>n.format(r))}function B3(t,e,n){return sr(e)?e===t:Yn(e)?e.includes(t):Vi(e)?e(t,n):!(e.min!=null&&e.min>t||e.max!=null&&e.max<t||e.interval!=null&&t%e.interval!==0)}function Ca(t,e,n){const r=[],[s,i,o]=e;for(let a=s;a<=i;a++)(n==null||B3(a,n,t))&&r.push({value:a,label:ze(a,o)});return r}function H3(t,e){return{milliseconds:Ca(t,Pa.milliseconds,e.milliseconds),seconds:Ca(t,Pa.seconds,e.seconds),minutes:Ca(t,Pa.minutes,e.minutes),hours:Ca(t,Pa.hours,e.hours)}}function j3(t,e,n,r){const i=Ca(t,e,r).reduce((o,a)=>{if(a.disabled)return o;if(isNaN(o))return a.value;const l=Math.abs(o-n);return Math.abs(a.value-n)<l?a.value:o},NaN);return isNaN(i)?n:i}function W3(t,e){const n={...t};return Object.entries(e).forEach(([r,s])=>{const i=Pa[r],o=t[r];n[r]=j3(t,i,o,s)}),n}function Pw(t,e,n){return GI(e,n).map(s=>{if(typeof s!="string")throw new Error("Invalid mask");let i=t;if(i.length>1e3)return!1;let o=!0;const a={};if(s.replace(zI,u=>{if(Xe[u]){const h=Xe[u],f=i.search(h[0]);~f?i.replace(h[0],d=>(h[1](a,d,n),i=i.substr(f+d.length),d)):o=!1}return Xe[u]?"":u.slice(1,u.length-1)}),!o)return!1;const l=new Date;a.hours!=null&&(a.isPm===!0&&+a.hours!=12?a.hours=+a.hours+12:a.isPm===!1&&+a.hours==12&&(a.hours=0));let c;return a.timezoneOffset!=null?(a.minutes=+(a.minutes||0)-+a.timezoneOffset,c=new Date(Date.UTC(a.year||l.getFullYear(),a.month||0,a.day||1,a.hours||0,a.minutes||0,a.seconds||0,a.milliseconds||0))):c=n.getDateFromParts({year:a.year||l.getFullYear(),month:(a.month||0)+1,day:a.day||1,hours:a.hours||0,minutes:a.minutes||0,seconds:a.seconds||0,milliseconds:a.milliseconds||0}),c}).find(s=>s)||new Date(t)}function Y3(t,e,n){if(t==null)return"";let r=GI(e,n)[0];/Z$/.test(r)&&(n.timezone="utc");const s=[];r=r.replace(D3,(o,a)=>(s.push(a),"??"));const i=n.getDateParts(t);return r=r.replace(zI,o=>o in bw?bw[o](i,n):o.slice(1,o.length-1)),r.replace(/\?\?/g,()=>s.shift())}let q3=0;class eA{constructor(e,n,r){pe(this,"key",""),pe(this,"hashcode",""),pe(this,"highlight",null),pe(this,"content",null),pe(this,"dot",null),pe(this,"bar",null),pe(this,"event",null),pe(this,"popover",null),pe(this,"customData",null),pe(this,"ranges"),pe(this,"hasRanges",!1),pe(this,"order",0),pe(this,"pinPage",!1),pe(this,"maxRepeatSpan",0),pe(this,"locale");const{dates:s}=Object.assign(this,{hashcode:"",order:0,pinPage:!1},e);this.key||(this.key=++q3),this.locale=r,n.normalizeGlyphs(this),this.ranges=r.ranges(s??[]),this.hasRanges=!!Fr(this.ranges),this.maxRepeatSpan=this.ranges.filter(i=>i.hasRepeat).map(i=>i.daySpan).reduce((i,o)=>Math.max(i,o),0)}intersectsRange({start:e,end:n}){if(e==null||n==null)return!1;const r=this.ranges.filter(o=>!o.hasRepeat);for(const o of r)if(o.intersectsDayRange(e.dayIndex,n.dayIndex))return!0;const s=this.ranges.filter(o=>o.hasRepeat);if(!s.length)return!1;let i=e;for(this.maxRepeatSpan>1&&(i=this.locale.getDateParts(Qt(i.date,-this.maxRepeatSpan)));i.dayIndex<=n.dayIndex;){for(const o of s)if(o.startsOnDay(i))return!0;
387i=this.locale.getDateParts(Qt(i.date,1))}return!1}}function Ip(t){document&&document.dispatchEvent(new CustomEvent("show-popover",{detail:t}))}function ml(t){document&&document.dispatchEvent(new CustomEvent("hide-popover",{detail:t}))}function tA(t){document&&document.dispatchEvent(new CustomEvent("toggle-popover",{detail:t}))}function nA(t){const{visibility:e}=t,n=e==="click",r=e==="hover",s=e==="hover-focus",i=e==="focus";t.autoHide=!n;let o=!1,a=!1;const l=p=>{n&&(tA({...t,target:t.target||p.currentTarget}),p.stopPropagation())},c=p=>{o||(o=!0,(r||s)&&Ip({...t,target:t.target||p.currentTarget}))},u=()=>{o&&(o=!1,(r||s&&!a)&&ml(t))},h=p=>{a||(a=!0,(i||s)&&Ip({...t,target:t.target||p.currentTarget}))},f=p=>{a&&!tu(p.currentTarget,p.relatedTarget)&&(a=!1,(i||s&&!o)&&ml(t))},d={};switch(t.visibility){case"click":d.click=l;break;case"hover":d.mousemove=c,d.mouseleave=u;break;case"focus":d.focusin=h,d.focusout=f;break;case"hover-focus":d.mousemove=c,d.mouseleave=u,d.focusin=h,d.focusout=f;break}return d}const Cw=t=>{const e=Lu(t);if(e==null)return;const n=e.popoverHandlers;!n||!n.length||(n.forEach(r=>r()),delete e.popoverHandlers)},Sw=(t,e)=>{const n=Lu(t);if(n==null)return;const r=[],s=nA(e);Object.entries(s).forEach(([i,o])=>{r.push(ys(n,i,o))}),n.popoverHandlers=r},rA={mounted(t,e){const{value:n}=e;n&&Sw(t,n)},updated(t,e){const{oldValue:n,value:r}=e,s=n==null?void 0:n.visibility,i=r==null?void 0:r.visibility;s!==i&&(s&&(Cw(t),i||ml(n)),i&&Sw(t,r))},unmounted(t){Cw(t)}},K3=(t,e,{maxSwipeTime:n,minHorizontalSwipeDistance:r,maxVerticalSwipeDistance:s})=>{if(!t||!t.addEventListener||!Vi(e))return null;let i=0,o=0,a=null,l=!1;function c(h){const f=h.changedTouches[0];i=f.screenX,o=f.screenY,a=new Date().getTime(),l=!0}function u(h){if(!l||!a)return;l=!1;const f=h.changedTouches[0],d=f.screenX-i,p=f.screenY-o;if(new Date().getTime()-a<n&&Math.abs(d)>=r&&Math.abs(p)<=s){const m={toLeft:!1,toRight:!1};d<0?m.toLeft=!0:m.toRight=!0,e(m)}}return ys(t,"touchstart",c,{passive:!0}),ys(t,"touchend",u,{passive:!0}),()=>{vs(t,"touchstart",c),vs(t,"touchend",u)}},su={},z3=(t,e=10)=>{su[t]=Date.now()+e},G3=(t,e)=>{if(t in su){const n=su[t];if(Date.now()<n)return;delete su[t]}e()};function sA(){return typeof window<"u"}function Q3(t){return sA()&&t in window}function X3(t){const e=He(!1),n=L(()=>e.value?"dark":"light");let r,s;function i(d){e.value=d.matches}function o(){Q3("matchMedia")&&(r=window.matchMedia("(prefers-color-scheme: dark)"),r.addEventListener("change",i),e.value=r.matches)}function a(){const{selector:d=":root",darkClass:p="dark"}=t.value,v=document.querySelector(d);e.value=v.classList.contains(p)}function l(d){const{selector:p=":root",darkClass:v="dark"}=d;if(sA()&&p&&v){const m=document.querySelector(p);m&&(s=new MutationObserver(a),s.observe(m,{attributes:!0,attributeFilter:["class"]}),e.value=m.classList.contains(v))}}function c(){h();const d=typeof t.value;d==="string"&&t.value.toLowerCase()==="system"?o():d==="object"?l(t.value):e.value=!!t.value}const u=vt(()=>t.value,()=>c(),{immediate:!0});function h(){r&&(r.removeEventListener("change",i),r=void 0),s&&(s.disconnect(),s=void 0)}function f(){h(),u()}return qo(()=>f()),{isDark:e,displayMode:n,cleanup:f}}const J3=["base","start","end","startEnd"],Z3=["class","wrapperClass","contentClass","style","contentStyle","color","fillMode"],eq={base:{},start:{},end:{}};function ug(t,e,n=eq){let r=t,s={};e===!0||mr(e)?(r=mr(e)?e:r,s={...n}):Kr(e)&&(cw(e,J3)?s={...e}:s={base:{...e},start:{...e},end:{...e}});const i=No(s,{start:s.startEnd,end:s.startEnd},n);return Object.entries(i).forEach(([o,a])=>{let l=r;a===!0||mr(a)?(l=mr(a)?a:l,i[o]={color:l}):Kr(a)&&(cw(a,Z3)?i[o]={...a}:i[o]={}),No(i[o],{color:l})}),i}class tq{constructor(){pe(this,"type","highlight")}normalizeConfig(e,n){return ug(e,n,{base:{fillMode:"light"},start:{fillMode:"solid"},end:{fillMode:"solid"}})}prepareRender(e){e.highlights=[],e.content||(e.content=[])}render({data:e,onStart:n,onEnd:r},s){const{key:i,highlight:o}=e;if(!o)return;const{highlights:a}=s,{base:l,start:c,end:u}=o;n&&r?a.push({...c,key:i,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${c.color}`,class:[`vc-highlight vc-highlight-bg-${c.fillMode}`,c.class],contentClass:[`vc-attr vc-highlight-content-${c.fillMode} vc-${c.color}
387`,c.contentClass]}):n?(a.push({...l,key:`${i}-base`,wrapperClass:`vc-day-layer vc-day-box-right-center vc-attr vc-${l.color}`,class:[`vc-highlight vc-highlight-base-start vc-highlight-bg-${l.fillMode}`,l.class]}),a.push({...c,key:i,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${c.color}`,class:[`vc-highlight vc-highlight-bg-${c.fillMode}`,c.class],contentClass:[`vc-attr vc-highlight-content-${c.fillMode} vc-${c.color}`,c.contentClass]})):r?(a.push({...l,key:`${i}-base`,wrapperClass:`vc-day-layer vc-day-box-left-center vc-attr vc-${l.color}`,class:[`vc-highlight vc-highlight-base-end vc-highlight-bg-${l.fillMode}`,l.class]}),a.push({...u,key:i,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-bg-${u.fillMode}`,u.class],contentClass:[`vc-attr vc-highlight-content-${u.fillMode} vc-${u.color}`,u.contentClass]})):a.push({...l,key:`${i}-middle`,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${l.color}`,class:[`vc-highlight vc-highlight-base-middle vc-highlight-bg-${l.fillMode}`,l.class],contentClass:[`vc-attr vc-highlight-content-${l.fillMode} vc-${l.color}`,l.contentClass]})}}class hg{constructor(e,n){pe(this,"type",""),pe(this,"collectionType",""),this.type=e,this.collectionType=n}normalizeConfig(e,n){return ug(e,n)}prepareRender(e){e[this.collectionType]=[]}render({data:e,onStart:n,onEnd:r},s){const{key:i}=e,o=e[this.type];if(!i||!o)return;const a=s[this.collectionType],{base:l,start:c,end:u}=o;n?a.push({...c,key:i,class:[`vc-${this.type} vc-${this.type}-start vc-${c.color} vc-attr`,c.class]}):r?a.push({...u,key:i,class:[`vc-${this.type} vc-${this.type}-end vc-${u.color} vc-attr`,u.class]}):a.push({...l,key:i,class:[`vc-${this.type} vc-${this.type}-base vc-${l.color} vc-attr`,l.class]})}}class nq extends hg{constructor(){super("content","content")}normalizeConfig(e,n){return ug("base",n)}}class rq extends hg{constructor(){super("dot","dots")}}class sq extends hg{constructor(){super("bar","bars")}}class iq{constructor(e){pe(this,"color"),pe(this,"renderers",[new nq,new tq,new rq,new sq]),this.color=e}normalizeGlyphs(e){this.renderers.forEach(n=>{const r=n.type;e[r]!=null&&(e[r]=n.normalizeConfig(this.color,e[r]))})}prepareRender(e={}){return this.renderers.forEach(n=>{n.prepareRender(e)}),e}render(e,n){this.renderers.forEach(r=>{r.render(e,n)})}}const iA=Symbol("__vc_base_context__"),oA={color:{type:String,default:()=>Ns("color")},isDark:{type:[Boolean,String,Object],default:()=>Ns("isDark")},firstDayOfWeek:Number,masks:Object,locale:[String,Object],timezone:String,minDate:null,maxDate:null,disabledDates:null};function aA(t){const e=L(()=>t.color??""),n=L(()=>t.isDark??!1),{displayMode:r}=X3(n),s=L(()=>new iq(e.value)),i=L(()=>{if(t.locale instanceof Bu)return t.locale;const f=Kr(t.locale)?t.locale:{id:t.locale,firstDayOfWeek:t.firstDayOfWeek,masks:t.masks};return new Bu(f,t.timezone)}),o=L(()=>i.value.masks),a=L(()=>t.minDate),l=L(()=>t.maxDate),c=L(()=>{const f=t.disabledDates?[...t.disabledDates]:[];
387return a.value!=null&&f.push({start:null,end:Qt(i.value.toDate(a.value),-1)}),l.value!=null&&f.push({start:Qt(i.value.toDate(l.value),1),end:null}),i.value.ranges(f)}),u=L(()=>new eA({key:"disabled",dates:c.value,order:100},s.value,i.value)),h={color:e,isDark:n,displayMode:r,theme:s,locale:i,masks:o,minDate:a,maxDate:l,disabledDates:c,disabledAttribute:u};return Hn(iA,h),h}function oq(t){return bt(iA,()=>aA(t),!0)}function lA(t){return`__vc_slot_${t}__`}function cA(t,e={}){Object.keys(t).forEach(n=>{Hn(lA(e[n]??n),t[n])})}function uA(t){return bt(lA(t),null)}const aq={...oA,view:{type:String,default:"monthly",validator(t){return["daily","weekly","monthly"].includes(t)}},rows:{type:Number,default:1},columns:{type:Number,default:1},step:Number,titlePosition:{type:String,default:()=>Ns("titlePosition")},navVisibility:{type:String,default:()=>Ns("navVisibility")},showWeeknumbers:[Boolean,String],showIsoWeeknumbers:[Boolean,String],expanded:Boolean,borderless:Boolean,transparent:Boolean,initialPage:Object,initialPagePosition:{type:Number,default:1},minPage:Object,maxPage:Object,transition:String,attributes:Array,trimWeeks:Boolean,disablePageSwipe:Boolean},lq=["dayclick","daymouseenter","daymouseleave","dayfocusin","dayfocusout","daykeydown","weeknumberclick","transition-start","transition-end","did-move","update:view","update:pages"],hA=Symbol("__vc_calendar_context__");function cq(t,{slots:e,emit:n}){const r=He(null),s=He(null),i=He(new Date().getDate()),o=He(!1),a=He(Symbol()),l=He(Symbol()),c=He(t.view),u=He([]),h=He("");let f=null,d=null;cA(e);const{theme:p,color:v,displayMode:m,locale:g,masks:E,minDate:y,maxDate:w,disabledAttribute:I,disabledDates:A}=oq(t),R=L(()=>t.rows*t.columns),P=L(()=>t.step||R.value),C=L(()=>MI(u.value)??null),D=L(()=>eo(u.value)??null),$=L(()=>t.minPage||(y.value?ae(y.value):null)),S=L(()=>t.maxPage||(w.value?ae(w.value):null)),V=L(()=>t.navVisibility),oe=L(()=>!!t.showWeeknumbers),J=L(()=>!!t.showIsoWeeknumbers),W=L(()=>c.value==="monthly"),se=L(()=>c.value==="weekly"),Z=L(()=>c.value==="daily"),De=()=>{o.value=!0,n("transition-start")},Y=()=>{o.value=!1,n("transition-end"),f&&(f.resolve(!0),f=null)},we=(U,T,B=c.value)=>UI(U,T,B,g.value),ae=U=>FI(U,c.value,g.value),Ue=U=>{!I.value||!z.value||(U.isDisabled=z.value.cellExists(I.value.key,U.dayIndex))},Ce=U=>{U.isFocusable=U.inMonth&&U.day===i.value},qe=(U,T)=>{for(const B of U)for(const ie of B.days)if(T(ie)===!1)return},ke=L(()=>u.value.reduce((U,T)=>(U.push(...T.viewDays),U),[])),O=L(()=>{const U=[];return(t.attributes||[]).forEach((T,B)=>{!T||!T.dates||U.push(new eA({...T,order:T.order||0},p.value,g.value))}),I.value&&U.push(I.value),U}),G=L(()=>Fr(O.value)),z=L(()=>{const U=new jY;return O.value.forEach(T=>{T.ranges.forEach(B=>{U.render(T,B,ke.value)})}),U}),le=L(()=>ke.value.reduce((U,T)=>(U[T.dayIndex]={day:T,cells:[]},U[T.dayIndex].cells.push(...z.value.getCells(T)),U),{})),be=(U,T)=>{const B=t.showWeeknumbers||t.showIsoWeeknumbers;return B==null?"":d9(B)?B?"left":"":B.startsWith("right")?T>1?"right":B:U>1?"left":B},Se=()=>{var U,T;if(!G.value)return null;const B=O.value.find(ut=>ut.pinPage)||O.value[0];if(!B||!B.hasRanges)return null;const[ie]=B.ranges,Re=((U=ie.start)==null?void 0:U.date)||((T=ie.end)==null?void 0:T.date);return Re?ae(Re):null},_=()=>{if(gr(C.value))return C.value;const U=Se();return gr(U)?U:ae(new Date)},b=(U,T={})=>{const{view:B=c.value,position:ie=1,force:Re}=T,ut=ie>0?1-ie:-(R.value+ie);let Kt=we(U,ut,B),dn=we(Kt,R.value-1,B);return Re||(bp(Kt,$.value)?Kt=$.value:Uu(dn,S.value)&&(Kt=we(S.value,1-R.value)),dn=we(Kt,R.value-1)),{fromPage:Kt,toPage:dn}},k=(U,T,B="")=>{if(B==="none"||B==="fade")return B;if((U==null?void 0:U.view)!==(T==null?void 0:T.view))return"fade";const ie=Uu(T,U),Re=bp(T,U);return!ie&&!Re?"fade":B==="slide-v"?Re?"slide-down":"slide-up":Re?"slide-right":"slide-left"},x=(U={})=>new Promise((T,B)=>{const{position:ie=1,force:Re=!1,transition:ut}=U,Kt=gr(U.page)?U.page:_(),{fromPage:dn}=b(Kt,{position:ie,force:Re}),Wi=[];for(let Yi=0;Yi<R.value;Yi++){const Ef=we(dn,Yi),nn=Yi+1,bf=Math.ceil(nn/t.columns),mc=t.rows-bf+1,ca=nn%t.columns||t.columns,ua=t.columns-ca+1,FC=be(ca,ua);Wi.push(g.value.getPage({...Ef,view:c.value,titlePosition:t.titlePosition,trimWeeks:t.trimWeeks,position:nn,row:bf,rowFromEnd:mc,column:ca,columnFromEnd:ua,showWeeknumbers:oe.value,showIsoWeeknumbers:J.value,weeknumberPosition:FC}))}h.value=k(u.value[0],Wi[0],ut),u.value=Wi,h.value&&h.value!=="none"?f={resolve:T,reject:B}:T(!0)}),M=U=>{const T=C.value??ae(new Date);return we(T,U)},K=(U,T={})=>{const B=gr(U)?U:ae(U);return Object.assign(T,b(B,{...T,force:!0})),UY(T.fromPage,T.toPage,c.value,g.value).map(Re=>$Y(Re,$.value,S.value)).some(Re=>Re)},X=(U,T={})=>K(M(U),T),q=L(()=>X(-P.value)),Q=L(()=>X(P.value)),j=async(U,T={})=>!T.force&&!K(U,T)?!1:(T.fromPage&&!FY(T.fromPage,C.value)&&(ml({id:a.value,hideDelay:0}),T.view&&(z3("view",10),c.value=T.view),await x({...T,page:T.fromPage,position:1,force:!0}),n("did-move",u.value)),!0),te=(U,T={})=>j(M(U),T),fe=()=>te(-P.value),ue=()=>te(P.value),ge=U=>{const T=W.value?".in-month":"",B=`.id-${g.value.getDayId(U)}${T}`,ie=`${B}.vc-focusable, ${B} .vc-focusable`,Re=r.value;if(Re){const ut=Re.querySelector(ie);
387if(ut)return ut.focus(),!0}return!1},Ie=async(U,T={})=>ge(U)?!0:(await j(U,T),ge(U)),Me=(U,T)=>{i.value=U.day,n("dayclick",U,T)},Ke=(U,T)=>{n("daymouseenter",U,T)},ot=(U,T)=>{n("daymouseleave",U,T)},qt=(U,T)=>{i.value=U.day,s.value=U,U.isFocused=!0,n("dayfocusin",U,T)},Zn=(U,T)=>{s.value=null,U.isFocused=!1,n("dayfocusout",U,T)},qs=(U,T)=>{n("daykeydown",U,T);const B=U.noonDate;let ie=null;switch(T.key){case"ArrowLeft":{ie=Qt(B,-1);break}case"ArrowRight":{ie=Qt(B,1);break}case"ArrowUp":{ie=Qt(B,-7);break}case"ArrowDown":{ie=Qt(B,7);break}case"Home":{ie=Qt(B,-U.weekdayPosition+1);break}case"End":{ie=Qt(B,U.weekdayPositionFromEnd);break}case"PageUp":{T.altKey?ie=_w(B,-1):ie=Fu(B,-1);break}case"PageDown":{T.altKey?ie=_w(B,1):ie=Fu(B,1);break}}ie&&(T.preventDefault(),Ie(ie).catch())},Mr=U=>{const T=s.value;T!=null&&qs(T,U)},Ks=(U,T)=>{n("weeknumberclick",U,T)};x({page:t.initialPage,position:t.initialPagePosition}),Fs(()=>{!t.disablePageSwipe&&r.value&&(d=K3(r.value,({toLeft:U=!1,toRight:T=!1})=>{U?ue():T&&fe()},Ns("touch")))}),qo(()=>{u.value=[],d&&d()}),vt(()=>g.value,()=>{x()}),vt(()=>R.value,()=>x()),vt(()=>t.view,()=>c.value=t.view),vt(()=>c.value,()=>{G3("view",()=>{x()}),n("update:view",c.value)}),vt(()=>i.value,()=>{qe(u.value,U=>Ce(U))}),zb(()=>{n("update:pages",u.value),qe(u.value,U=>{Ue(U),Ce(U)})});const Pt={emit:n,containerRef:r,focusedDay:s,inTransition:o,navPopoverId:a,dayPopoverId:l,view:c,pages:u,transitionName:h,theme:p,color:v,displayMode:m,locale:g,masks:E,attributes:O,disabledAttribute:I,disabledDates:A,attributeContext:z,days:ke,dayCells:le,count:R,step:P,firstPage:C,lastPage:D,canMovePrev:q,canMoveNext:Q,minPage:$,maxPage:S,isMonthly:W,isWeekly:se,isDaily:Z,navVisibility:V,showWeeknumbers:oe,showIsoWeeknumbers:J,getDateAddress:ae,canMove:K,canMoveBy:X,move:j,moveBy:te,movePrev:fe,moveNext:ue,onTransitionBeforeEnter:De,onTransitionAfterEnter:Y,tryFocusDate:ge,focusDate:Ie,onKeydown:Mr,onDayKeydown:qs,onDayClick:Me,onDayMouseenter:Ke,onDayMouseleave:ot,onDayFocusin:qt,onDayFocusout:Zn,onWeeknumberClick:Ks};return Hn(hA,Pt),Pt}function Fi(){const t=bt(hA);if(t)return t;throw new Error("Calendar context missing. Please verify this component is nested within a valid context provider.")}const uq=et({inheritAttrs:!1,emits:["before-show","after-show","before-hide","after-hide"],props:{id:{type:[Number,String,Symbol],required:!0},showDelay:{type:Number,default:0},hideDelay:{type:Number,default:110},boundarySelector:{type:String}},setup(t,{emit:e}){let n;const r=He();let s=null,i=null;const o=Kn({isVisible:!1,target:null,data:null,transition:"slide-fade",placement:"bottom",direction:"",positionFixed:!1,modifiers:[],isInteractive:!0,visibility:"click",isHovered:!1,isFocused:!1,autoHide:!1,force:!1});function a(Y){Y&&(o.direction=Y.split("-")[0])}function l({placement:Y,options:we}){a(Y||(we==null?void 0:we.placement))}const c=L(()=>({placement:o.placement,strategy:o.positionFixed?"fixed":"absolute",boundary:"",modifiers:[{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:l},...o.modifiers||[]],onFirstUpdate:l})),u=L(()=>{const Y=o.direction==="left"||o.direction==="right";let we="";if(o.placement){const ae=o.placement.split("-");ae.length>1&&(we=ae[1])}return["start","top","left"].includes(we)?Y?"top":"left":["end","bottom","right"].includes(we)?Y?"bottom":"right":Y?"middle":"center"});function h(){i&&(i.destroy(),i=null)}function f(){kn(()=>{const Y=Lu(o.target);!Y||!r.value||(i&&i.state.elements.reference!==Y&&h(),i?i.update():i=nV(Y,r.value,c.value))})}function d(Y){Object.assign(o,LI(Y,"force"))}function p(Y,we){clearTimeout(n),Y>0?n=setTimeout(we,Y):we()}function v(Y){return!Y||!i?!1:Lu(Y)===i.state.elements.reference}async function m(Y={}){o.force||(Y.force&&(o.force=!0),p(Y.showDelay??t.showDelay,()=>{o.isVisible&&(o.force=!1),d({...Y,isVisible:!0}),f()}))}function g(Y={}){i&&(Y.target&&!v(Y.target)||o.force||(Y.force&&(o.force=!0),p(Y.hideDelay??t.hideDelay,()=>{o.isVisible||(o.force=!1),o.isVisible=!1})))}function E(Y={}){Y.target!=null&&(o.isVisible&&v(Y.target)?g(Y):m(Y))}function y(Y){if(!i)return;const we=i.state.elements.reference;if(!r.value||!we)return;const ae=Y.target;tu(r.value,ae)||tu(we,ae)||g({force:!0})}function w(Y){(Y.key==="Esc"||Y.key==="Escape")&&g()}function I({detail:Y}){!Y.id||Y.id!==t.id||m(Y)}
387function A({detail:Y}){!Y.id||Y.id!==t.id||g(Y)}function R({detail:Y}){!Y.id||Y.id!==t.id||E(Y)}function P(){ys(document,"keydown",w),ys(document,"click",y),ys(document,"show-popover",I),ys(document,"hide-popover",A),ys(document,"toggle-popover",R)}function C(){vs(document,"keydown",w),vs(document,"click",y),vs(document,"show-popover",I),vs(document,"hide-popover",A),vs(document,"toggle-popover",R)}function D(Y){e("before-show",Y)}function $(Y){o.force=!1,e("after-show",Y)}function S(Y){e("before-hide",Y)}function V(Y){o.force=!1,h(),e("after-hide",Y)}function oe(Y){Y.stopPropagation()}function J(){o.isHovered=!0,o.isInteractive&&["hover","hover-focus"].includes(o.visibility)&&m()}function W(){if(o.isHovered=!1,!i)return;const Y=i.state.elements.reference;o.autoHide&&!o.isFocused&&(!Y||Y!==document.activeElement)&&["hover","hover-focus"].includes(o.visibility)&&g()}function se(){o.isFocused=!0,o.isInteractive&&["focus","hover-focus"].includes(o.visibility)&&m()}function Z(Y){["focus","hover-focus"].includes(o.visibility)&&(!Y.relatedTarget||!tu(r.value,Y.relatedTarget))&&(o.isFocused=!1,!o.isHovered&&o.autoHide&&g())}function De(){s!=null&&(s.disconnect(),s=null)}return vt(()=>r.value,Y=>{De(),Y&&(s=new ResizeObserver(()=>{i&&i.update()}),s.observe(Y))}),vt(()=>o.placement,a,{immediate:!0}),Fs(()=>{P()}),qo(()=>{h(),De(),C()}),{...CS(o),popoverRef:r,alignment:u,hide:g,setupPopper:f,beforeEnter:D,afterEnter:$,beforeLeave:S,afterLeave:V,onClick:oe,onMouseOver:J,onMouseLeave:W,onFocusIn:se,onFocusOut:Z}}}),Hs=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n};function hq(t,e,n,r,s,i){return ee(),ve("div",{class:Je(["vc-popover-content-wrapper",{"is-interactive":t.isInteractive}]),ref:"popoverRef",onClick:e[0]||(e[0]=(...o)=>t.onClick&&t.onClick(...o)),onMouseover:e[1]||(e[1]=(...o)=>t.onMouseOver&&t.onMouseOver(...o)),onMouseleave:e[2]||(e[2]=(...o)=>t.onMouseLeave&&t.onMouseLeave(...o)),onFocusin:e[3]||(e[3]=(...o)=>t.onFocusIn&&t.onFocusIn(...o)),onFocusout:e[4]||(e[4]=(...o)=>t.onFocusOut&&t.onFocusOut(...o))},[de(Ko,{name:`vc-${t.transition}`,appear:"",onBeforeEnter:t.beforeEnter,onAfterEnter:t.afterEnter,onBeforeLeave:t.beforeLeave,onAfterLeave:t.afterLeave},{default:ht(()=>[t.isVisible?(ee(),ve("div",Us({key:0,tabindex:"-1",class:`vc-popover-content direction-${t.direction}`},t.$attrs),[xl(t.$slots,"default",{direction:t.direction,alignment:t.alignment,data:t.data,hide:t.hide},()=>[Vl(Jt(t.data),1)]),xe("span",{class:Je(["vc-popover-caret",`direction-${t.direction}`,`align-${t.alignment}`])},null,2)],16)):It("",!0)]),_:3},8,["name","onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"])],34)}const fg=Hs(uq,[["render",hq]]),fq={class:"vc-day-popover-row"},dq={key:0,class:"vc-day-popover-row-indicator"},pq={class:"vc-day-popover-row-label"},mq=et({__name:"PopoverRow",props:{attribute:null},setup(t){const e=t,n=L(()=>{const{content:r,highlight:s,dot:i,bar:o,popover:a}=e.attribute;return a&&a.hideIndicator?null:r?{class:`vc-bar vc-day-popover-row-bar vc-attr vc-${r.base.color}`}:s?{class:`vc-highlight-bg-solid vc-day-popover-row-highlight vc-attr vc-${s.base.color}`}:i?{class:`vc-dot vc-attr vc-${i.base.color}`}:o?{class:`vc-bar vc-day-popover-row-bar vc-attr vc-${o.base.color}`}:null});return(r,s)=>(ee(),ve("div",fq,[N(n)?(ee(),ve("div",dq,[xe("span",{class:Je(N(n).class)},null,2)])):It("",!0),xe("div",pq,[xl(r.$slots,"default",{},()=>[Vl(Jt(t.attribute.popover?t.attribute.popover.label:"No content provided"),1)])])]))}}),gq={inheritAttrs:!1},Fn=et({...gq,__name:"CalendarSlot",props:{name:null},setup(t){const n=uA(t.name);return(r,s)=>N(n)?(ee(),at(dm(N(n)),oo(Us({key:0},r.$attrs)),null,16)):xl(r.$slots,"default",{key:1})}}),vq={class:"vc-day-popover-container"},yq={key:0,class:"vc-day-popover-header"},_q=et({__name:"CalendarDayPopover",setup(t){const{dayPopoverId:e,displayMode:n,color:r,masks:s,locale:i}=Fi();function o(l,c){return i.value.formatDate(l,c)}function a(l){return i.value.formatDate(l.date,s.value.dayPopover)}return(l,c)=>(ee(),at(fg,{id:N(e),class:Je([`vc-${N(r)}`,`vc-${N(n)}`])},{default:ht(({data:{day:u,attributes:h},hide:f})=>[de(Fn,{name:"day-popover",day:u,"day-title":a(u),attributes:h,format:o,masks:N(s),hide:f},{default:ht(()=>[xe("div",vq,[N(s).dayPopover?(ee(),ve("div",yq,Jt(a(u)),1)):It("",!0),(ee(!0),ve(Fe,null,Bn(h,d=>(ee(),at(mq,{key:d.key,attribute:d},null,8,["attribute"]))),128))])]),_:2},1032,["day","day-title","attributes","masks","hide"])]),_:1},8,["id","class"]))}}),wq={},Eq={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},bq=xe("polyline",{points:"9 18 15 12 9 6"},null,-1),Tq=[bq];function Iq(t,e){return ee(),ve("svg",Eq,Tq)}const Aq=Hs(wq,[["render",Iq]]),Rq={},Pq={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},Cq=xe("polyline",{points:"15 18 9 12 15 6"},null,-1),Sq=[Cq];function Dq(t,e){return ee(),ve("svg",Pq,Sq)}
387const kq=Hs(Rq,[["render",Dq]]),Oq={},Mq={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},Nq=xe("polyline",{points:"6 9 12 15 18 9"},null,-1),Lq=[Nq];function xq(t,e){return ee(),ve("svg",Mq,Lq)}const Vq=Hs(Oq,[["render",xq]]),$q={},Fq={fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},Uq=xe("path",{d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),Bq=[Uq];function Hq(t,e){return ee(),ve("svg",Fq,Bq)}const jq=Hs($q,[["render",Hq]]),Wq=Object.freeze(Object.defineProperty({__proto__:null,IconChevronDown:Vq,IconChevronLeft:kq,IconChevronRight:Aq,IconClock:jq},Symbol.toStringTag,{value:"Module"})),Lo=et({__name:"BaseIcon",props:{name:{type:String,required:!0},width:{type:String},height:{type:String},size:{type:String,default:"26"},viewBox:{type:String}},setup(t){const e=t,n=L(()=>e.width||e.size),r=L(()=>e.height||e.size),s=L(()=>Wq[`Icon${e.name}`]);return(i,o)=>(ee(),at(dm(N(s)),{width:N(n),height:N(r),class:"vc-base-icon"},null,8,["width","height"]))}}),Yq=["disabled"],qq={key:1,class:"vc-title-wrapper"},Kq={type:"button",class:"vc-title"},zq=["disabled"],fA=et({__name:"CalendarHeader",props:{page:null,layout:null,isLg:{type:Boolean},isXl:{type:Boolean},is2xl:{type:Boolean},hideTitle:{type:Boolean},hideArrows:{type:Boolean}},setup(t){const e=t,{navPopoverId:n,navVisibility:r,canMovePrev:s,movePrev:i,canMoveNext:o,moveNext:a}=Fi(),l=L(()=>{switch(e.page.titlePosition){case"left":return"bottom-start";case"right":return"bottom-end";default:return"bottom"}}),c=L(()=>{const{page:v}=e;return{id:n.value,visibility:r.value,placement:l.value,modifiers:[{name:"flip",options:{fallbackPlacements:["bottom"]}}],data:{page:v},isInteractive:!0}}),u=L(()=>e.page.titlePosition.includes("left")),h=L(()=>e.page.titlePosition.includes("right")),f=L(()=>e.layout?e.layout:u.value?"tu-pn":h.value?"pn-tu":"p-tu-n;"),d=L(()=>({prev:f.value.includes("p")&&!e.hideArrows,title:f.value.includes("t")&&!e.hideTitle,next:f.value.includes("n")&&!e.hideArrows})),p=L(()=>({gridTemplateColumns:f.value.split("").map(m=>{switch(m){case"p":return"[prev] auto";case"n":return"[next] auto";case"t":return"[title] auto";case"-":return"1fr";default:return""}}).join(" ")}));return(v,m)=>(ee(),ve("div",{class:Je(["vc-header",{"is-lg":t.isLg,"is-xl":t.isXl,"is-2xl":t.is2xl}]),style:jr(N(p))},[N(d).prev?(ee(),ve("button",{key:0,type:"button",class:"vc-arrow vc-prev vc-focus",disabled:!N(s),onClick:m[0]||(m[0]=(...g)=>N(i)&&N(i)(...g)),onKeydown:m[1]||(m[1]=vy((...g)=>N(i)&&N(i)(...g),["space","enter"]))},[de(Fn,{name:"header-prev-button",disabled:!N(s)},{default:ht(()=>[de(Lo,{name:"ChevronLeft",size:"24"})]),_:1},8,["disabled"])],40,Yq)):It("",!0),N(d).title?(ee(),ve("div",qq,[de(Fn,{name:"header-title-wrapper"},{default:ht(()=>[Qb((ee(),ve("button",Kq,[de(Fn,{name:"header-title",title:t.page.title},{default:ht(()=>[xe("span",null,Jt(t.page.title),1)]),_:1},8,["title"])])),[[N(rA),N(c)]])]),_:1})])):It("",!0),N(d).next?(ee(),ve("button",{key:2,type:"button",class:"vc-arrow vc-next vc-focus",disabled:!N(o),onClick:m[2]||(m[2]=(...g)=>N(a)&&N(a)(...g)),onKeydown:m[3]||(m[3]=vy((...g)=>N(a)&&N(a)(...g),["space","enter"]))},[de(Fn,{name:"header-next-button",disabled:!N(o)},{default:ht(()=>[de(Lo,{name:"ChevronRight",size:"24"})]),_:1},8,["disabled"])],40,zq)):It("",!0)],6))}}),dA=Symbol("__vc_page_context__");function Gq(t){const{locale:e,getDateAddress:n,canMove:r}=Fi();function s(a,l){const{month:c,year:u}=n(new Date);return ZI().map((h,f)=>{const d=f+1;return{month:d,year:a,id:VY(d,a),label:e.value.formatDate(h,l),ariaLabel:e.value.formatDate(h,"MMMM"),isActive:d===t.value.month&&a===t.value.year,isCurrent:d===c&&a===u,isDisabled:!r({month:d,year:a},{position:t.value.position})}})}function i(a,l){const{year:c}=n(new Date),{position:u}=t.value,h=[];for(let f=a;f<=l;f+=1){const d=[...Array(12).keys()].some(p=>r({month:p+1,year:f},{position:u}));h.push({year:f,id:f.toString(),label:f.toString(),ariaLabel:f.toString(),isActive:f===t.value.year,isCurrent:f===c,isDisabled:!d})}return h}const o={page:t,getMonthItems:s,getYearItems:i};return Hn(dA,o),o}function pA(){const t=bt(dA);if(t)return t;throw new Error("Page context missing. Please verify this component is nested within a valid context provider.")}const Qq={class:"vc-nav-header"},Xq=["disabled"],Jq=["disabled"],Zq={class:"vc-nav-items"},eK=["data-id","aria-label","disabled","onClick","onKeydown"],tK=et({__name:"CalendarNav",setup(t){const{masks:e,move:n}
387=Fi(),{page:r,getMonthItems:s,getYearItems:i}=pA(),o=He(!0),a=12,l=He(r.value.year),c=He(f(r.value.year)),u=He(null);function h(){setTimeout(()=>{if(u.value==null)return;const ae=u.value.querySelector(".vc-nav-item:not(:disabled)");ae&&ae.focus()},10)}function f(ae){return Math.floor(ae/a)}function d(){o.value=!o.value}function p(ae){return ae*a}function v(ae){return a*(ae+1)-1}function m(){se.value&&(o.value&&E(),w())}function g(){Z.value&&(o.value&&y(),I())}function E(){l.value--}function y(){l.value++}function w(){c.value--}function I(){c.value++}const A=L(()=>s(l.value,e.value.navMonths).map(ae=>({...ae,click:()=>n({month:ae.month,year:ae.year},{position:r.value.position})}))),R=L(()=>s(l.value-1,e.value.navMonths)),P=L(()=>R.value.some(ae=>!ae.isDisabled)),C=L(()=>s(l.value+1,e.value.navMonths)),D=L(()=>C.value.some(ae=>!ae.isDisabled)),$=L(()=>i(p(c.value),v(c.value)).map(ae=>({...ae,click:()=>{l.value=ae.year,o.value=!0,h()}}))),S=L(()=>i(p(c.value-1),v(c.value-1))),V=L(()=>S.value.some(ae=>!ae.isDisabled)),oe=L(()=>i(p(c.value+1),v(c.value+1))),J=L(()=>oe.value.some(ae=>!ae.isDisabled)),W=L(()=>o.value?A.value:$.value),se=L(()=>o.value?P.value:V.value),Z=L(()=>o.value?D.value:J.value),De=L(()=>MI($.value.map(ae=>ae.year))),Y=L(()=>eo($.value.map(ae=>ae.year))),we=L(()=>o.value?l.value:`${De.value} - ${Y.value}`);return zb(()=>{l.value=r.value.year,h()}),vt(()=>l.value,ae=>c.value=f(ae)),Fs(()=>h()),(ae,Ue)=>(ee(),ve("div",{class:"vc-nav-container",ref_key:"navContainer",ref:u},[xe("div",Qq,[xe("button",{type:"button",class:"vc-nav-arrow is-left vc-focus",disabled:!N(se),onClick:m,onKeydown:Ue[0]||(Ue[0]=Ce=>N(Mc)(Ce,m))},[de(Fn,{name:"nav-prev-button",move:m,disabled:!N(se)},{default:ht(()=>[de(Lo,{name:"ChevronLeft",width:"22px",height:"24px"})]),_:1},8,["disabled"])],40,Xq),xe("button",{type:"button",class:"vc-nav-title vc-focus",onClick:d,onKeydown:Ue[1]||(Ue[1]=Ce=>N(Mc)(Ce,d))},Jt(N(we)),33),xe("button",{type:"button",class:"vc-nav-arrow is-right vc-focus",disabled:!N(Z),onClick:g,onKeydown:Ue[2]||(Ue[2]=Ce=>N(Mc)(Ce,g))},[de(Fn,{name:"nav-next-button",move:g,disabled:!N(Z)},{default:ht(()=>[de(Lo,{name:"ChevronRight",width:"22px",height:"24px"})]),_:1},8,["disabled"])],40,Jq)]),xe("div",Zq,[(ee(!0),ve(Fe,null,Bn(N(W),Ce=>(ee(),ve("button",{key:Ce.label,type:"button","data-id":Ce.id,"aria-label":Ce.ariaLabel,class:Je(["vc-nav-item vc-focus",[Ce.isActive?"is-active":Ce.isCurrent?"is-current":""]]),disabled:Ce.isDisabled,onClick:Ce.click,onKeydown:qe=>N(Mc)(qe,Ce.click)},Jt(Ce.label),43,eK))),128))])],512))}}),mA=et({__name:"CalendarPageProvider",props:{page:null},setup(t){return Gq(co(t,"page")),(n,r)=>xl(n.$slots,"default")}}),nK=et({__name:"CalendarNavPopover",setup(t){const{navPopoverId:e,color:n,displayMode:r}=Fi();return(s,i)=>(ee(),at(fg,{id:N(e),class:Je(["vc-nav-popover-container",`vc-${N(n)}`,`vc-${N(r)}`])},{default:ht(({data:o})=>[de(mA,{page:o.page},{default:ht(()=>[de(Fn,{name:"nav"},{default:ht(()=>[de(tK)]),_:1})]),_:2},1032,["page"])]),_:1},8,["id","class"]))}}),rK=et({directives:{popover:rA},components:{CalendarSlot:Fn},props:{day:{type:Object,required:!0}},setup(t){const{locale:e,theme:n,attributeContext:r,dayPopoverId:s,onDayClick:i,onDayMouseenter:o,onDayMouseleave:a,onDayFocusin:l,onDayFocusout:c,onDayKeydown:u}=Fi(),h=L(()=>t.day),f=L(()=>r.value.getCells(h.value)),d=L(()=>f.value.map(J=>J.data)),p=L(()=>({...h.value,attributes:d.value,attributeCells:f.value}));function v({data:J},{popovers:W}){const{key:se,customData:Z,popover:De}=J;if(!De)return;const Y=tw({key:se,customData:Z,attribute:J},{...De},{visibility:De.label?"hover":"click",placement:"bottom",isInteractive:!De.label});W.splice(0,0,Y)}const m=L(()=>{const J={...n.value.prepareRender({}),popovers:[]};return f.value.forEach(W=>{n.value.render(W,J),v(W,J)}),J}),g=L(()=>m.value.highlights),E=L(()=>!!Fr(g.value)),y=L(()=>m.value.content),w=L(()=>m.value.dots),I=L(()=>!!Fr(w.value)),A=L(()=>m.value.bars),R=L(()=>!!Fr(A.value)),P=L(()=>m.value.popovers),C=L(()=>P.value.map(J=>J.attribute)),D=uA("day-content"),$=L(()=>["vc-day",...h.value.classes,{"vc-day-box-center-center":!D},{"is-not-in-month":!t.day.inMonth}]),S=L(()=>{let J;h.value.isFocusable?J="0":J="-1";const W=["vc-day-content vc-focusable vc-focus vc-attr",{"vc-disabled":h.value.isDisabled},si(eo(g.value),"contentClass"),si(eo(y.value),"class")||""],se={...si(eo(g.value),"contentStyle"),...si(eo(y.value),"style")};return{class:W,style:se,tabindex:J,"aria-label":h.value.ariaLabel,"aria-disabled":!!h.value.isDisabled,role:"button"}}),V=L(()=>({click(J){i(p.value,J)},mouseenter(J){o(p.value,J)},mouseleave(J){a(p.value,J)},focusin(J){l(p.value,J)},focusout(J){c(p.value,J)}
387,keydown(J){u(p.value,J)}})),oe=L(()=>Fr(P.value)?tw({id:s.value,data:{day:h,attributes:C.value}},...P.value):null);return{attributes:d,attributeCells:f,bars:A,dayClasses:$,dayContentProps:S,dayContentEvents:V,dayPopover:oe,glyphs:m,dots:w,hasDots:I,hasBars:R,highlights:g,hasHighlights:E,locale:e,popovers:P}}}),sK={key:0,class:"vc-highlights vc-day-layer"},iK={key:1,class:"vc-day-layer vc-day-box-center-bottom"},oK={class:"vc-dots"},aK={key:2,class:"vc-day-layer vc-day-box-center-bottom"},lK={class:"vc-bars"};function cK(t,e,n,r,s,i){const o=xr("CalendarSlot"),a=HS("popover");return ee(),ve("div",{class:Je(t.dayClasses)},[t.hasHighlights?(ee(),ve("div",sK,[(ee(!0),ve(Fe,null,Bn(t.highlights,({key:l,wrapperClass:c,class:u,style:h})=>(ee(),ve("div",{key:l,class:Je(c)},[xe("div",{class:Je(u),style:jr(h)},null,6)],2))),128))])):It("",!0),de(o,{name:"day-content",day:t.day,attributes:t.attributes,"attribute-cells":t.attributeCells,dayProps:t.dayContentProps,dayEvents:t.dayContentEvents,locale:t.locale},{default:ht(()=>[Qb((ee(),ve("div",Us(t.dayContentProps,f1(t.dayContentEvents,!0)),[Vl(Jt(t.day.label),1)],16)),[[a,t.dayPopover]])]),_:1},8,["day","attributes","attribute-cells","dayProps","dayEvents","locale"]),t.hasDots?(ee(),ve("div",iK,[xe("div",oK,[(ee(!0),ve(Fe,null,Bn(t.dots,({key:l,class:c,style:u})=>(ee(),ve("span",{key:l,class:Je(c),style:jr(u)},null,6))),128))])])):It("",!0),t.hasBars?(ee(),ve("div",aK,[xe("div",lK,[(ee(!0),ve(Fe,null,Bn(t.bars,({key:l,class:c,style:u})=>(ee(),ve("span",{key:l,class:Je(c),style:jr(u)},null,6))),128))])])):It("",!0)],2)}const uK=Hs(rK,[["render",cK]]),hK={class:"vc-weekdays"},fK=["onClick"],dK={inheritAttrs:!1},pK=et({...dK,__name:"CalendarPage",setup(t){const{page:e}=pA(),{onWeeknumberClick:n}=Fi();return(r,s)=>(ee(),ve("div",{class:Je(["vc-pane",`row-${N(e).row}`,`row-from-end-${N(e).rowFromEnd}`,`column-${N(e).column}`,`column-from-end-${N(e).columnFromEnd}`]),ref:"pane"},[de(fA,{page:N(e),"is-lg":"","hide-arrows":""},null,8,["page"]),xe("div",{class:Je(["vc-weeks",{[`vc-show-weeknumbers-${N(e).weeknumberPosition}`]:N(e).weeknumberPosition}])},[xe("div",hK,[(ee(!0),ve(Fe,null,Bn(N(e).weekdays,({weekday:i,label:o},a)=>(ee(),ve("div",{key:a,class:Je(`vc-weekday vc-weekday-${i}`)},Jt(o),3))),128))]),(ee(!0),ve(Fe,null,Bn(N(e).viewWeeks,i=>(ee(),ve("div",{key:`weeknumber-${i.weeknumber}`,class:"vc-week"},[N(e).weeknumberPosition?(ee(),ve("div",{key:0,class:Je(["vc-weeknumber",`is-${N(e).weeknumberPosition}`])},[xe("span",{class:Je(["vc-weeknumber-content"]),onClick:o=>N(n)(i,o)}
387,Jt(i.weeknumberDisplay),9,fK)],2)):It("",!0),(ee(!0),ve(Fe,null,Bn(i.days,o=>(ee(),at(uK,{key:o.id,day:o},null,8,["day"]))),128))]))),128))],2)],2))}}),mK=et({components:{CalendarHeader:fA,CalendarPage:pK,CalendarNavPopover:nK,CalendarDayPopover:_q,CalendarPageProvider:mA,CalendarSlot:Fn},props:aq,emit:lq,setup(t,{emit:e,slots:n}){return cq(t,{emit:e,slots:n})}}),gK={class:"vc-pane-header-wrapper"};function vK(t,e,n,r,s,i){const o=xr("CalendarHeader"),a=xr("CalendarPage"),l=xr("CalendarSlot"),c=xr("CalendarPageProvider"),u=xr("CalendarDayPopover"),h=xr("CalendarNavPopover");return ee(),ve(Fe,null,[xe("div",Us({"data-helptext":"Press the arrow keys to navigate by day, Home and End to navigate to week ends, PageUp and PageDown to navigate by month, Alt+PageUp and Alt+PageDown to navigate by year"},t.$attrs,{class:["vc-container",`vc-${t.view}`,`vc-${t.color}`,`vc-${t.displayMode}`,{"vc-expanded":t.expanded,"vc-bordered":!t.borderless,"vc-transparent":t.transparent}],onMouseup:e[0]||(e[0]=AD(()=>{},["prevent"])),ref:"containerRef"}),[xe("div",{class:Je(["vc-pane-container",{"in-transition":t.inTransition}])},[xe("div",gK,[t.firstPage?(ee(),at(o,{key:0,page:t.firstPage,"is-lg":"","hide-title":""},null,8,["page"])):It("",!0)]),de(Ko,{name:`vc-${t.transitionName}`,onBeforeEnter:t.onTransitionBeforeEnter,onAfterEnter:t.onTransitionAfterEnter},{default:ht(()=>[(ee(),ve("div",{key:t.pages[0].id,class:"vc-pane-layout",style:jr({gridTemplateColumns:`repeat(${t.columns}, 1fr)`})},[(ee(!0),ve(Fe,null,Bn(t.pages,f=>(ee(),at(c,{key:f.id,page:f},{default:ht(()=>[de(l,{name:"page",page:f},{default:ht(()=>[de(a)]),_:2},1032,["page"])]),_:2},1032,["page"]))),128))],4))]),_:1},8,["name","onBeforeEnter","onAfterEnter"]),de(l,{name:"footer"})],2)],16),de(u),de(h)],64)}const yK=Hs(mK,[["render",vK]]),gA=Symbol("__vc_date_picker_context__"),_K={...oA,mode:{type:String,default:"date"},modelValue:{type:[Number,String,Date,Object]},modelModifiers:{type:Object,default:()=>({})},rules:[String,Object],is24hr:Boolean,hideTimeHeader:Boolean,timeAccuracy:{type:Number,default:2},isRequired:Boolean,isRange:Boolean,updateOnInput:{type:Boolean,default:()=>Ns("datePicker.updateOnInput")},inputDebounce:{type:Number,default:()=>Ns("datePicker.inputDebounce")},popover:{type:[Boolean,Object],default:!0},dragAttribute:Object,selectAttribute:Object,attributes:[Object,Array]},wK=["update:modelValue","drag","dayclick","daykeydown","popover-will-show","popover-did-show","popover-will-hide","popover-did-hide"];function EK(t,{emit:e,slots:n}){cA(n,{footer:"dp-footer"});const r=aA(t),{locale:s,masks:i,disabledAttribute:o}=r,a=He(!1),l=He(Symbol()),c=He(null),u=He(null),h=He(["",""]),f=He(null),d=He(null);let p,v,m=!0;const g=L(()=>t.isRange||t.modelModifiers.range===!0),E=L(()=>g.value&&c.value!=null?c.value.start:null),y=L(()=>g.value&&c.value!=null?c.value.end:null),w=L(()=>t.mode.toLowerCase()==="date"),I=L(()=>t.mode.toLowerCase()==="datetime"),A=L(()=>t.mode.toLowerCase()==="time"),R=L(()=>!!u.value),P=L(()=>{let T="date";t.modelModifiers.number&&(T="number"),t.modelModifiers.string&&(T="string");const B=i.value.modelValue||"iso";return Ue({type:T,mask:B})}),C=L(()=>X(u.value??c.value)),D=L(()=>A.value?t.is24hr?i.value.inputTime24hr:i.value.inputTime:I.value?t.is24hr?i.value.inputDateTime24hr:i.value.inputDateTime:i.value.input),$=L(()=>/[Hh]/g.test(D.value)),S=L(()=>/[dD]{1,2}|Do|W{1,4}|M{1,4}|YY(?:YY)?/g.test(D.value)),V=L(()=>{if($.value&&S.value)return"dateTime";if(S.value)return"date";if($.value)return"time"}),oe=L(()=>{var T;const B=((T=f.value)==null?void 0:T.$el.previousElementSibling)??void 0;return No({},t.popover,Ns("datePicker.popover"),{target:B})}),J=L(()=>nA({...oe.value,id:l.value})),W=L(()=>g.value?{start:h.value[0],end:h.value[1]}:h.value[0]),se=L(()=>{const T=["start","end"].map(B=>({input:x(B),change:M(B),keyup:K,...t.popover&&J.value}));return g.value?{start:T[0],end:T[1]}:T[0]}),Z=L(()=>
387{if(!O(c.value))return null;const T={key:"select-drag",...t.selectAttribute,dates:c.value,pinPage:!0},{dot:B,bar:ie,highlight:Re,content:ut}=T;return!B&&!ie&&!Re&&!ut&&(T.highlight=!0),T}),De=L(()=>{if(!g.value||!O(u.value))return null;const T={key:"select-drag",...t.dragAttribute,dates:u.value},{dot:B,bar:ie,highlight:Re,content:ut}=T;return!B&&!ie&&!Re&&!ut&&(T.highlight={startEnd:{fillMode:"outline"}}),T}),Y=L(()=>{const T=Yn(t.attributes)?[...t.attributes]:[];return De.value?T.unshift(De.value):Z.value&&T.unshift(Z.value),T}),we=L(()=>Ue(t.rules==="auto"?ae():t.rules??{}));function ae(){const T={ms:[0,999],sec:[0,59],min:[0,59],hr:[0,23]},B=w.value?0:t.timeAccuracy;return[0,1].map(ie=>{switch(B){case 0:return{hours:T.hr[ie],minutes:T.min[ie],seconds:T.sec[ie],milliseconds:T.ms[ie]};case 1:return{minutes:T.min[ie],seconds:T.sec[ie],milliseconds:T.ms[ie]};case 3:return{milliseconds:T.ms[ie]};case 4:return{};default:return{seconds:T.sec[ie],milliseconds:T.ms[ie]}}})}function Ue(T){return Yn(T)?T.length===1?[T[0],T[0]]:T:[T,T]}function Ce(T){return Ue(T).map((B,ie)=>({...B,rules:we.value[ie]}))}function qe(T){return T==null?!1:sr(T)?!isNaN(T):mo(T)?!isNaN(T.getTime()):mr(T)?T!=="":lg(T)}function ke(T){return Kr(T)&&"start"in T&&"end"in T&&qe(T.start??null)&&qe(T.end??null)}function O(T){return ke(T)||qe(T)}function G(T,B){if(T==null&&B==null)return!0;if(T==null||B==null)return!1;const ie=mo(T),Re=mo(B);return ie&&Re?T.getTime()===B.getTime():ie||Re?!1:G(T.start,B.start)&&G(T.end,B.end)}function z(T){return!O(T)||!o.value?!1:o.value.intersectsRange(s.value.range(T))}function le(T,B,ie,Re){if(!O(T))return null;if(ke(T)){const ut=s.value.toDate(T.start,{...B[0],fillDate:E.value??void 0,patch:ie}),Kt=s.value.toDate(T.end,{...B[1],fillDate:y.value??void 0,patch:ie});return Zn({start:ut,end:Kt},Re)}return s.value.toDateOrNull(T,{...B[0],fillDate:c.value,patch:ie})}function be(T,B){return ke(T)?{start:s.value.fromDate(T.start,B[0]),end:s.value.fromDate(T.end,B[1])}:g.value?null:s.value.fromDate(T,B[0])}function Se(T,B={}){return clearTimeout(p),new Promise(ie=>{const{debounce:Re=0,...ut}=B;Re>0?p=window.setTimeout(()=>{ie(_(T,ut))},Re):ie(_(T,ut))})}function _(T,{config:B=P.value,patch:ie="dateTime",clearIfEqual:Re=!1,formatInput:ut=!0,hidePopover:Kt=!1,dragging:dn=R.value,targetPriority:Wi,moveToValue:Yi=!1}={}){const Ef=Ce(B);let nn=le(T,Ef,ie,Wi);if(z(nn)){if(dn)return null;nn=c.value,Kt=!1}else nn==null&&t.isRequired?nn=c.value:nn!=null&&G(c.value,nn)&&Re&&(nn=null);const mc=dn?u:c,ca=!G(mc.value,nn);mc.value=nn,dn||(u.value=null);const ua=be(nn,P.value);return ca&&(m=!1,e(dn?"drag":"update:modelValue",ua),kn(()=>m=!0)),Kt&&!dn&&ot(),ut&&b(),Yi&&kn(()=>Ks(Wi??"start")),ua}function b(){kn(()=>{const T=Ce({type:"string",mask:D.value}),B=be(u.value??c.value,T);g.value?h.value=[B&&B.start,B&&B.end]:h.value=[B,""]})}function k(T,B,ie){h.value.splice(B==="start"?0:1,1,T);const Re=g.value?{start:h.value[0],end:h.value[1]||h.value[0]}:T,ut={type:"string",mask:D.value};Se(Re,{...ie,config:ut,patch:V.value,targetPriority:B,moveToValue:!0})}function x(T){return B=>{t.updateOnInput&&k(B.currentTarget.value,T,{formatInput:!1,hidePopover:!1,debounce:t.inputDebounce})}}function M(T){return B=>{k(B.currentTarget.value,T,{formatInput:!0,hidePopover:!1})}}function K(T){T.key==="Escape"&&Se(c.value,{formatInput:!0,hidePopover:!0})}function X(T){return g.value?[T&&T.start?s.value.getDateParts(T.start):null,T&&T.end?s.value.getDateParts(T.end):null]:[T?s.value.getDateParts(T):null]}function q(){u.value=null,b()}function Q(T){e("popover-will-show",T)}function j(T){e("popover-did-show",T)}function te(T){q(),e("popover-will-hide",T)}function fe(T){e("popover-did-hide",T)}function ue(T){const B={patch:"date",formatInput:!0,hidePopover:!0};if(g.value){const ie=!R.value;ie?v={start:T.startDate,end:T.endDate}:v!=null&&(v.end=T.date),Se(v,{...B,dragging:ie})}else Se(T.date,{...B,clearIfEqual:!t.isRequired})}function ge(T,B){ue(T),e("dayclick",T,B)}function Ie(T,B){switch(B.key){case" ":case"Enter":{ue(T),B.preventDefault();break}case"Escape":ot()}e("daykeydown",T,B)}function Me(T,B){!R.value||v==null||(v.end=T.date,Se(Zn(v),{patch:"date",formatInput:!0}))}function Ke(T={}){Ip({...oe.value,...T,isInteractive:!0,id:l.value})}function ot(T={}){ml({hideDelay:10,force:!0,...oe.value,...T,id:l.value})}function qt(T){tA({...oe.value,...T,isInteractive:!0,id:l.value})}function Zn(T,B){const{start:ie,end:Re}=T;if(ie>Re)switch(B){case"start":return{start:ie,end:ie};case"end":return{start:Re,end:Re};default:return{start:Re,end:ie}}return{start:ie,end:Re}}async function qs(T,B={}){return d.value==null?!1:d.value.move(T,B)}async function Mr(T,B={}){return d.value==null?!1:d.value.moveBy(T,B)}async function Ks(T,B={}){const ie=c.value;if(d.value==null||!O(ie))return!1;
387const Re=T!=="end",ut=Re?1:-1,Kt=ke(ie)?Re?ie.start:ie.end:ie,dn=FI(Kt,"monthly",s.value);return d.value.move(dn,{position:ut,...B})}vt(()=>t.isRange,T=>{T&&console.warn("The `is-range` prop will be deprecated in future releases. Please use the `range` modifier.")},{immediate:!0}),vt(()=>g.value,()=>{_(null,{formatInput:!0})}),vt(()=>D.value,()=>b()),vt(()=>t.modelValue,T=>{m&&_(T,{formatInput:!0,hidePopover:!1})}),vt(()=>we.value,()=>{Kr(t.rules)&&_(t.modelValue,{formatInput:!0,hidePopover:!1})}),vt(()=>t.timezone,()=>{_(c.value,{formatInput:!0})});const Pt=Ue(P.value);c.value=le(t.modelValue??null,Pt,"dateTime"),Fs(()=>{_(t.modelValue,{formatInput:!0,hidePopover:!1})}),kn(()=>a.value=!0);const U={...r,showCalendar:a,datePickerPopoverId:l,popoverRef:f,popoverEvents:J,calendarRef:d,isRange:g,isTimeMode:A,isDateTimeMode:I,is24hr:co(t,"is24hr"),hideTimeHeader:co(t,"hideTimeHeader"),timeAccuracy:co(t,"timeAccuracy"),isDragging:R,inputValue:W,inputEvents:se,dateParts:C,attributes:Y,rules:we,move:qs,moveBy:Mr,moveToValue:Ks,updateValue:Se,showPopover:Ke,hidePopover:ot,togglePopover:qt,onDayClick:ge,onDayKeydown:Ie,onDayMouseEnter:Me,onPopoverBeforeShow:Q,onPopoverAfterShow:j,onPopoverBeforeHide:te,onPopoverAfterHide:fe};return Hn(gA,U),U}function dg(){const t=bt(gA);if(t)return t;throw new Error("DatePicker context missing. Please verify this component is nested within a valid context provider.")}const bK=[{value:0,label:"12"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"},{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"},{value:10,label:"10"},{value:11,label:"11"}],TK=[{value:12,label:"12"},{value:13,label:"1"},{value:14,label:"2"},{value:15,label:"3"},{value:16,label:"4"},{value:17,label:"5"},{value:18,label:"6"},{value:19,label:"7"},{value:20,label:"8"},{value:21,label:"9"},{value:22,label:"10"},{value:23,label:"11"}];function IK(t){const e=dg(),{locale:n,isRange:r,isTimeMode:s,dateParts:i,rules:o,is24hr:a,hideTimeHeader:l,timeAccuracy:c,updateValue:u}=e;function h(S){S=Object.assign(d.value,S);let V=null;if(r.value){const oe=f.value?S:i.value[0],J=f.value?i.value[1]:S;V={start:oe,end:J}}else V=S;u(V,{patch:"time",targetPriority:f.value?"start":"end",moveToValue:!0})}const f=L(()=>t.position===0),d=L(()=>i.value[t.position]||{isValid:!1}),p=L(()=>lg(d.value)),v=L(()=>!!d.value.isValid),m=L(()=>!l.value&&v.value),g=L(()=>{if(!p.value)return null;let S=n.value.toDate(d.value);return d.value.hours===24&&(S=new Date(S.getTime()-1)),S}),E=L({get(){return d.value.hours},set(S){h({hours:S})}}),y=L({get(){return d.value.minutes},set(S){h({minutes:S})}}),w=L({get(){return d.value.seconds},set(S){h({seconds:S})}}),I=L({get(){return d.value.milliseconds},set(S){h({milliseconds:S})}}),A=L({get(){return d.value.hours<12},set(S){S=String(S).toLowerCase()=="true";let V=E.value;S&&V>=12?V-=12:!S&&V<12&&(V+=12),h({hours:V})}}),R=L(()=>H3(d.value,o.value[t.position])),P=L(()=>bK.filter(S=>R.value.hours.some(V=>V.value===S.value))),C=L(()=>TK.filter(S=>R.value.hours.some(V=>V.value===S.value))),D=L(()=>a.value?R.value.hours:A.value?P.value:C.value),$=L(()=>{const S=[];return Fr(P.value)&&S.push({value:!0,label:"AM"}),Fr(C.value)&&S.push({value:!1,label:"PM"}),S});return{...e,showHeader:m,timeAccuracy:c,parts:d,isValid:v,date:g,hours:E,minutes:y,seconds:w,milliseconds:I,options:R,hourOptions:D,isAM:A,isAMOptions:$,is24hr:a}}const AK=["value"],RK=["value","disabled"],PK={key:1,class:"vc-base-sizer","aria-hidden":"true"},CK={inheritAttrs:!1},va=et({...CK,__name:"BaseSelect",props:{options:null,modelValue:null,alignRight:{type:Boolean},alignLeft:{type:Boolean},showIcon:{type:Boolean},fitContent:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=L(()=>{const r=e.options.find(s=>s.value===e.modelValue);return r==null?void 0:r.label});return(r,s)=>(ee(),ve("div",{class:Je(["vc-base-select",{"vc-fit-content":t.fitContent,"vc-has-icon":t.showIcon}])},[xe("select",Us(r.$attrs,{value:t.modelValue,class:["vc-focus",{"vc-align-right":t.alignRight,"vc-align-left":t.alignLeft}],onChange:s[0]||(s[0]=i=>r.$emit("update:modelValue",i.target.value))}),[(ee(!0),ve(Fe,null,Bn(t.options,i=>(ee(),ve("option",{key:i.value,value:i.value,disabled:i.disabled},Jt(i.label),9,RK))),128))],16,AK),t.showIcon?(ee(),at(Lo,{key:0,name:"ChevronDown",size:"18"})):It("",!0),t.fitContent?(ee(),ve("div",PK,Jt(N(n)),1)):It("",!0)],2))}}),SK={key:0,class:"vc-time-header"},DK={class:"vc-time-weekday"},kK={class:"vc-time-month"},OK={class:"vc-time-day"},MK={class:"vc-time-year"},NK={class:"vc-time-select-group"},LK=xe("span",{class:"vc-time-colon"},":",-1),xK=xe("span",{class:"vc-time-colon"},":",-1),VK=xe("span",{class:"vc-time-decimal"},".",-1),Dw=et({__name:"TimePicker",props:{position:null},setup(t,{expose:e}){const r=IK(t);e(r);const{locale:s,isValid:i,date:o,hours:a,minutes:l,seconds:c,milliseconds:u,options:h,hourOptions:f,isTimeMode:d,isAM:p,isAMOptions:v,is24hr:m,showHeader:g,timeAccuracy:E}=r;return(y,w)=>
387(ee(),ve("div",{class:Je(["vc-time-picker",[{"vc-invalid":!N(i),"vc-attached":!N(d)}]])},[de(Fn,{name:"time-header"},{default:ht(()=>[N(g)&&N(o)?(ee(),ve("div",SK,[xe("span",DK,Jt(N(s).formatDate(N(o),"WWW")),1),xe("span",kK,Jt(N(s).formatDate(N(o),"MMM")),1),xe("span",OK,Jt(N(s).formatDate(N(o),"D")),1),xe("span",MK,Jt(N(s).formatDate(N(o),"YYYY")),1)])):It("",!0)]),_:1}),xe("div",NK,[de(Lo,{name:"Clock",size:"17"}),de(va,{modelValue:N(a),"onUpdate:modelValue":w[0]||(w[0]=I=>dt(a)?a.value=I:null),modelModifiers:{number:!0},options:N(f),class:"vc-time-select-hours","align-right":""},null,8,["modelValue","options"]),N(E)>1?(ee(),ve(Fe,{key:0},[LK,de(va,{modelValue:N(l),"onUpdate:modelValue":w[1]||(w[1]=I=>dt(l)?l.value=I:null),modelModifiers:{number:!0},options:N(h).minutes,class:"vc-time-select-minutes","align-left":N(E)===2},null,8,["modelValue","options","align-left"])],64)):It("",!0),N(E)>2?(ee(),ve(Fe,{key:1},[xK,de(va,{modelValue:N(c),"onUpdate:modelValue":w[2]||(w[2]=I=>dt(c)?c.value=I:null),modelModifiers:{number:!0},options:N(h).seconds,class:"vc-time-select-seconds","align-left":N(E)===3},null,8,["modelValue","options","align-left"])],64)):It("",!0),N(E)>3?(ee(),ve(Fe,{key:2},[VK,de(va,{modelValue:N(u),"onUpdate:modelValue":w[3]||(w[3]=I=>dt(u)?u.value=I:null),modelModifiers:{number:!0},options:N(h).milliseconds,class:"vc-time-select-milliseconds","align-left":""},null,8,["modelValue","options"])],64)):It("",!0),N(m)?It("",!0):(ee(),at(va,{key:3,modelValue:N(p),"onUpdate:modelValue":w[4]||(w[4]=I=>dt(p)?p.value=I:null),options:N(v)},null,8,["modelValue","options"]))])],2))}}),vA=et({__name:"DatePickerBase",setup(t){const{attributes:e,calendarRef:n,color:r,displayMode:s,isDateTimeMode:i,isTimeMode:o,isRange:a,onDayCl
387ick:l,onDayMouseEnter:c,onDayKeydown:u}=dg(),h=a.value?[0,1]:[0];return(f,d)=>N(o)?(ee(),ve("div",{key:0,class:Je(`vc-container vc-bordered vc-${N(r)} vc-${N(s)}`)},[(ee(!0),ve(Fe,null,Bn(N(h),p=>(ee(),at(Dw,{key:p,position:p},null,8,["position"]))),128))],2)):(ee(),at(yK,{key:1,attributes:N(e),ref_key:"calendarRef",ref:n,onDayclick:N(l),onDaymouseenter:N(c),onDaykeydown:N(u)},{footer:ht(()=>[N(i)?(ee(!0),ve(Fe,{key:0},Bn(N(h),p=>(ee(),at(Dw,{key:p,position:p},null,8,["position"]))),128)):It("",!0),de(Fn,{name:"dp-footer"})]),_:1},8,["attributes","onDayclick","onDaymouseenter","onDaykeydown"]))}}),$K={inheritAttrs:!1},FK=et({...$K,__name:"DatePickerPopover",setup(t){const{datePickerPopoverId:e,color:n,displayMode:r,popoverRef:s,onPopoverBeforeShow:i,onPopoverAfterShow:o,onPopoverBeforeHide:a,onPopoverAfterHide:l}=dg();return(c,u)=>(ee(),at(fg,{id:N(e),placement:"bottom-start",class:Je(`vc-date-picker-content vc-${N(n)} vc-${N(r)}`),ref_key:"popoverRef",ref:s,onBeforeShow:N(i),onAfterShow:N(o),onBeforeHide:N(a),onAfterHide:N(l)},{default:ht(()=>[de(vA,oo(al(c.$attrs)),null,16)]),_:1},8,["id","class","onBeforeShow","onAfterShow","onBeforeHide","onAfterHide"]))}}),UK=et({inheritAttrs:!1,emits:wK,props:_K,components:{DatePickerBase:vA,DatePickerPopover:FK},setup(t,e){const n=EK(t,e),r=Kn(LI(n,"calendarRef","popoverRef"));return{...n,slotCtx:r}}});function BK(t,e,n,r,s,i){const o=xr("DatePickerPopover"),a=xr("DatePickerBase");return t.$slots.default?(ee(),ve(Fe,{key:0},[xl(t.$slots,"default",oo(al(t.slotCtx))),de(o,oo(al(t.$attrs)),null,16)],64)):(ee(),at(a,oo(Us({key:1},t.$attrs)),null,16))}const Eee=Hs(UK,[["render",BK]]),HK=Xn(t=>{const e=t.$config.public.vcalendar;t.vueApp.use(h3,e||{})}),jK=Xn({name:"nuxt:chunk-reload",setup(t){const e=Jn(),n=Ei(),r=new Set;e.beforeEach(()=>{r.clear()}),t.hook("app:chunkError",({error:i})=>{r.add(i)});function s(i){const a="href"in i&&i.href[0]==="#"?n.app.baseURL+i.href:Ul(n.app.baseURL,i.fullPath);QL({path:a,persistState:!0})}t.hook("app:manifest:update",()=>{e.beforeResolve(s)}),e.onError((i,o)=>{r.has(i)&&s(o)})}}),bee="/home/profile",Tee="/home",Iee="/",Aee="/home/trips/:tripId/setting",Ree="/home/trips/new",Pee="/home/trips/:tripId",Cee="/home/trips/:tripId/destination/new",kw="/auth/signin",See="/home/trips/:tripId/generate",Dee="/auth/signup",kee="/auth/resetPassword",Oee="/auth/sendEmail",Mee="/home/search",Nee="/home/generateAI";function pg(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 s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function yA(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const WK=yA,_A=new Hl("auth","Firebase",yA());/**
388 * @license
389 * Copyright 2020 Google LLC
390 *
391 * Licensed under the Apache License, Version 2.0 (the "License");
392 * you may not use this file except in compliance with the License.
393 * You may obtain a copy of the License at
394 *
395 *   http://www.apache.org/licenses/LICENSE-2.0
396 *
397 * Unless required by applicable law or agreed to in writing, software
398 * distributed under the License is distributed on an "AS IS" BASIS,
399 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
400 * See the License for the specific language governing permissions and
401 * limitations under the License.
402 */const ju=new Lm("@firebase/auth");function YK(t,...e){ju.logLevel<=Ne.WARN&&ju.warn(`Auth (${xi}): ${t}`,...e)}function iu(t,...e){ju.logLevel<=Ne.ERROR&&ju.error(`Auth (${xi}): ${t}`,...e)}/**
403 * @license
404 * Copyright 2020 Google LLC
405 *
406 * Licensed under the Apache License, Version 2.0 (the "License");
407 * you may not use this file except in compliance with the License.
408 * You may obtain a copy of the License at
409 *
410 *   http://www.apache.org/licenses/LICENSE-2.0
411 *
412 * Unless required by applicable law or agreed to in writing, softw
412are
413 * distributed under the License is distributed on an "AS IS" BASIS,
414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
415 * See the License for the specific language governing permissions and
416 * limitations under the License.
417 */function Qn(t,...e){throw mg(t,...e)}function br(t,...e){return mg(t,...e)}function wA(t,e,n){const r=Object.assign(Object.assign({},WK()),{[e]:n});return new Hl("auth","Firebase",r).create(e,{appName:t.name})}function qK(t,e,n){const r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&Qn(t,"argument-error"),wA(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function mg(t,...e){if(typeof t!="string"){const n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return _A.create(t,...e)}function ye(t,e,...n){if(!t)throw mg(e,...n)}function Ur(t){const e="INTERNAL ASSERTION FAILED: "+t;throw iu(e),new Error(e)}function Gr(t,e){t||Ur(e)}/**
418 * @license
419 * Copyright 2020 Google LLC
420 *
421 * Licensed under the Apache License, Version 2.0 (the "License");
422 * you may not use this file except in compliance with the License.
423 * You may obtain a copy of the License at
424 *
425 *   http://www.apache.org/licenses/LICENSE-2.0
426 *
427 * Unless required by applicable law or agreed to in writing, software
428 * distributed under the License is distributed on an "AS IS" BASIS,
429 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
430 * See the License for the specific language governing permissions and
431 * limitations under the License.
432 */function Ap(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function KK(){return Ow()==="http:"||Ow()==="https:"}function Ow(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/**
433 * @license
434 * Copyright 2020 Google LLC
435 *
436 * Licensed under the Apache License, Version 2.0 (the "License");
437 * you may not use this file except in compliance with the License.
438 * You may obtain a copy of the License at
439 *
440 *   http://www.apache.org/licenses/LICENSE-2.0
441 *
442 * Unless required by applicable law or agreed to in writing, software
443 * distributed under the License is distributed on an "AS IS" BASIS,
444 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
445 * See the License for the specific language governing permissions and
446 * limitations under the License.
447 */function zK(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(KK()||EN()||"connection"in navigator)?navigator.onLine:!0}function GK(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/**
448 * @license
449 * Copyright 2020 Google LLC
450 *
451 * Licensed under the Apache License, Version 2.0 (the "License");
452 * you may not use this file except in compliance with the License.
453 * You may obtain a copy of the License at
454 *
455 *   http://www.apache.org/licenses/LICENSE-2.0
456 *
457 * Unless required by applicable law or agreed to in writing, software
458 * distributed under the License is distributed on an "AS IS" BASIS,
459 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
460 * See the License for the specific language governing permissions and
461 * limitations under the License.
462 */class Kl{constructor(e,n){this.shortDelay=e,this.longDelay=n,Gr(n>e,"Short delay should be less than long delay!"),this.isMobile=_N()||bN()}get(){return zK()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
463 * @license
464 * Copyright 2020 Google LLC
465 *
466 * Licensed under the Apache License, Version 2.0 (the "License");
467 * you may not use this file except in compliance with the License.
468 * You may obtain a copy of the License at
469 *
470 *   http://www.apache.org/licenses/LICENSE-2.0
471 *
472 * Unless required by applicable law or agreed to in writing, software
473 * distributed under the License is distributed on an "AS IS" BASIS,
474 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
475 * See the License for the specific language governing permissions and
476 * limitations under the License.
477 */function gg(t,e){Gr(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/**
478 * @license
479 * Copyright 2020 Google LLC
480 *
481 * Licensed under the Apache License, Version 2.0 (the "License");
482 * you may not use this file except in compliance with the License.
483 * You may obtain a copy of the License at
484 *
485 *   http://www.apache.org/licenses/LICENSE-2.0
486 *
487 * Unless required by applicable law or agreed to in writing, software
488 * distributed under the License is distributed on an "AS IS" BASIS,
489 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
490 * See the License for the specific language governing permissions and
491 * limitations under the License.
492 */class EA{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Ur("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Ur("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Ur("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
493 * @license
494 * Copyright 2020 Google LLC
495 *
496 * Licensed under the Apache License, Version 2.0 (the "License");
497 * you may not use this file except in compliance with the License.
498 * You may obtain a copy of the License at
499 *
500 *   http://www.apache.org/licenses/LICENSE-2.0
501 *
502 * Unless required by applicable law or agreed to in writing, software
503 * distributed under the License is distributed on an "AS IS" BASIS,
504 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
505 * See the License for the specific language governing permissions and
506 * limitations under the License.
507 */const QK={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
507aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
508 * @license
509 * Copyright 2020 Google LLC
510 *
511 * Licensed under the Apache License, Version 2.0 (the "License");
512 * you may not use this file except in compliance with the License.
513 * You may obtain a copy of the License at
514 *
515 *   http://www.apache.org/licenses/LICENSE-2.0
516 *
517 * Unless required by applicable law or agreed to in writing, software
518 * distributed under the License is distributed on an "AS IS" BASIS,
519 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
520 * See the License for the specific language governing permissions and
521 * limitations under the License.
522 */const XK=new Kl(3e4,6e4);function ns(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function ur(t,e,n,r,s={}){return bA(t,s,async()=>{let i={},o={};r&&(e==="GET"?o=r:i={body:JSON.stringify(r)});const a=jl(Object.assign({key:t.config.apiKey},o)).slice(1),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/json",t.languageCode&&(l["X-Firebase-Locale"]=t.languageCode),EA.fetch()(TA(t,t.config.apiHost,n,a),Object.assign({method:e,headers:l,referrerPolicy:"no-referrer"},i))})}async function bA(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},QK),e);try{const s=new ZK(t),i=await Promise.race([n(),s.promise]);s.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw Nc(t,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const a=i.ok?o.errorMessage:o.error.message,[l,c]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw Nc(t,"credential-already-in-use",o);if(l==="EMAIL_EXISTS")throw Nc(t,"email-already-in-use",o);if(l==="USER_DISABLED")throw Nc(t,"user-disabled",o);const u=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw wA(t,u,c);Qn(t,u)}}catch(s){if(s instanceof Dr)throw s;Qn(t,"network-request-failed",{message:String(s)})}}async function zl(t,e,n,r,s={}){const i=await ur(t,e,n,r,s);return"mfaPendingCredential"in i&&Qn(t,"multi-factor-auth-required",{_serverResponse:i}),i}function TA(t,e,n,r){const s=`${e}${n}?${r}`;return t.config.emulator?gg(t.config,s):`${t.config.apiScheme}://${s}`}function JK(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class ZK{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(br(this.auth,"network-request-failed")),XK.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Nc(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const s=br(t,e,r);return s.customData._tokenResponse=n,s}function Mw(t){return t!==void 0&&t.enterprise!==void 0}class ez{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return JK(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}}async function tz(t,e){return ur(t,"GET","/v2/recaptchaConfig",ns(t,e))}/**
523 * @license
524 * Copyright 2020 Google LLC
525 *
526 * Licensed under the Apache License, Version 2.0 (the "License");
527 * you may not use this file except in compliance with the License.
528 * You may obtain a copy of the License at
529 *
530 *   http://www.apache.org/licenses/LICENSE-2.0
531 *
532 * Unless required by applicable law or agreed to in writing, softw
532are
533 * distributed under the License is distributed on an "AS IS" BASIS,
534 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
535 * See the License for the specific language governing permissions and
536 * limitations under the License.
537 */async function nz(t,e){return ur(t,"POST","/v1/accounts:delete",e)}async function rz(t,e){return ur(t,"POST","/v1/accounts:lookup",e)}/**
538 * @license
539 * Copyright 2020 Google LLC
540 *
541 * Licensed under the Apache License, Version 2.0 (the "License");
542 * you may not use this file except in compliance with the License.
543 * You may obtain a copy of the License at
544 *
545 *   http://www.apache.org/licenses/LICENSE-2.0
546 *
547 * Unless required by applicable law or agreed to in writing, software
548 * distributed under the License is distributed on an "AS IS" BASIS,
549 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
550 * See the License for the specific language governing permissions and
551 * limitations under the License.
552 */function ja(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function sz(t,e=!1){const n=it(t),r=await n.getIdToken(e),s=vg(r);ye(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");const i=typeof s.firebase=="object"?s.firebase:void 0,o=i==null?void 0:i.sign_in_provider;return{claims:s,token:r,authTime:ja(ad(s.auth_time)),issuedAtTime:ja(ad(s.iat)),expirationTime:ja(ad(s.exp)),signInProvider:o||null,signInSecondFactor:(i==null?void 0:i.sign_in_second_factor)||null}}function ad(t){return Number(t)*1e3}function vg(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return iu("JWT malformed, contained fewer than 3 sections"),null;try{const s=D0(n);return s?JSON.parse(s):(iu("Failed to decode base64 JWT payload"),null)}catch(s){return iu("Caught error parsing JWT payload as JSON",s==null?void 0:s.toString()),null}}function iz(t){const e=vg(t);return ye(e,"internal-error"),ye(typeof e.exp<"u","internal-error"),ye(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/**
553 * @license
554 * Copyright 2020 Google LLC
555 *
556 * Licensed under the Apache License, Version 2.0 (the "License");
557 * you may not use this file except in compliance with the License.
558 * You may obtain a copy of the License at
559 *
560 *   http://www.apache.org/licenses/LICENSE-2.0
561 *
562 * Unless required by applicable law or agreed to in writing, software
563 * distributed under the License is distributed on an "AS IS" BASIS,
564 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
565 * See the License for the specific language governing permissions and
566 * limitations under the License.
567 */async function Ri(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Dr&&oz(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function oz({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/**
568 * @license
569 * Copyright 2020 Google LLC
570 *
571 * Licensed under the Apache License, Version 2.0 (the "License");
572 * you may not use this file except in compliance with the License.
573 * You may obtain a copy of the License at
574 *
575 *   http://www.apache.org/licenses/LICENSE-2.0
576 *
577 * Unless required by applicable law or agreed to in writing, software
578 * distributed under the License is distributed on an "AS IS" BASIS,
579 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
580 * See the License for the specific language governing permissions and
581 * limitations under the License.
582 */class az{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const s=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,s)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
583 * @license
584 * Copyright 2020 Google LLC
585 *
586 * Licensed under the Apache License, Version 2.0 (the "License");
587 * you may not use this file except in compliance with the License.
588 * You may obtain a copy of the License at
589 *
590 *   http://www.apache.org/licenses/LICENSE-2.0
591 *
592 * Unless required by applicable law or agreed to in writing, software
593 * distributed under the License is distributed on an "AS IS" BASIS,
594 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
595 * See the License for the specific language governing permissions and
596 * limitations under the License.
597 */class IA{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=ja(this.lastLoginAt),this.creationTime=ja(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
598 * @license
599 * Copyright 2019 Google LLC
600 *
601 * Licensed under the Apache License, Version 2.0 (the "License");
602 * you may not use this file except in compliance with the License.
603 * You may obtain a copy of the License at
604 *
605 *   http://www.apache.org/licenses/LICENSE-2.0
606 *
607 * Unless required by applicable law or agreed to in writing, software
608 * distributed under the License is distributed on an "AS IS" BASIS,
609 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
610 * See the License for the specific language governing permissions and
611 * limitations under the License.
612 */async function Wu(t){var e;const n=t.auth,r=await t.getIdToken(),s=await Ri(t,rz(n,{idToken:r}));ye(s==null?void 0:s.users.length,n,"internal-error");const i=s.users[0];t._notifyReloadListener(i);const o=!((e=i.providerUserInfo)===null||e===void 0)&&e.length?uz(i.providerUserInfo):[],a=cz(t.providerData,o),l=t.isAnonymous,c=!(t.email&&i.passwordHash)&&!(a!=null&&a.length),u=l?c:!1,h={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new IA(i.createdAt,i.lastLoginAt),isAnonymous:u};Object.assign(t,h)}async function lz(t){const e=it(t);await Wu(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function cz(t,e){return[...t.filter(r=>!e.some(s=>s.providerId===r.providerId)),...e]}function uz(t){return t.map(e=>{var{providerId:n}=e,r=pg(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
613 * @license
614 * Copyright 2020 Google LLC
615 *
616 * Licensed under the Apache License, Version 2.0 (the "License");
617 * you may not use this file except in compliance with the License.
618 * You may obtain a copy of the License at
619 *
620 *   http://www.apache.org/licenses/LICENSE-2.0
621 *
622 * Unless required by applicable law or agreed to in writing, software
623 * distributed under the License is distributed on an "AS IS" BASIS,
624 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
625 * See the License for the specific language governing permissions and
626 * limitations under the License.
627 */async function hz(t,e){const n=await bA(t,{},async()=>{const r=jl({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:s,apiKey:i}=t.config,o=TA(t,s,"/v1/token",`key=${i}`),a=await t._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",EA.fetch()(o,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function fz(t,e){return ur(t,"POST","/v2/accounts:revokeToken",ns(t,e))}/**
628 * @license
629 * Copyright 2020 Google LLC
630 *
631 * Licensed under the Apache License, Version 2.0 (the "License");
632 * you may not use this file except in compliance with the License.
633 * You may obtain a copy of the License at
634 *
635 *   http://www.apache.org/licenses/LICENSE-2.0
636 *
637 * Unless required by applicable law or agreed to in writing, software
638 * distributed under the License is distributed on an "AS IS" BASIS,
639 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
640 * See the License for the specific language governing permissions and
641 * limitations under the License.
642 */class gl{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){ye(e.idToken,"internal-error"),ye(typeof e.idToken<"u","internal-error"),ye(typeof e.refreshToken<"u","internal-error");
642const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):iz(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}async getToken(e,n=!1){return ye(!this.accessToken||this.refreshToken,e,"user-token-expired"),!n&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:s,expiresIn:i}=await hz(e,n);this.updateTokensAndExpiration(r,s,Number(i))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:s,expirationTime:i}=n,o=new gl;return r&&(ye(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),s&&(ye(typeof s=="string","internal-error",{appName:e}),o.accessToken=s),i&&(ye(typeof i=="number","internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new gl,this.toJSON())}_performRefresh(){return Ur("not implemented")}}/**
643 * @license
644 * Copyright 2020 Google LLC
645 *
646 * Licensed under the Apache License, Version 2.0 (the "License");
647 * you may not use this file except in compliance with the License.
648 * You may obtain a copy of the License at
649 *
650 *   http://www.apache.org/licenses/LICENSE-2.0
651 *
652 * Unless required by applicable law or agreed to in writing, software
653 * distributed under the License is distributed on an "AS IS" BASIS,
654 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
655 * See the License for the specific language governing permissions and
656 * limitations under the License.
657 */function cs(t,e){ye(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class pi{constructor(e){var{uid:n,auth:r,stsTokenManager:s}=e,i=pg(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new az(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=s,this.accessToken=s.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new IA(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const n=await Ri(this,this.stsTokenManager.getToken(this.auth,e));return ye(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return sz(this,e)}reload(){return lz(this)}_assign(e){this!==e&&(ye(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new pi(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){ye(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await Wu(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Ri(this,nz(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
657nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,s,i,o,a,l,c,u;const h=(r=n.displayName)!==null&&r!==void 0?r:void 0,f=(s=n.email)!==null&&s!==void 0?s:void 0,d=(i=n.phoneNumber)!==null&&i!==void 0?i:void 0,p=(o=n.photoURL)!==null&&o!==void 0?o:void 0,v=(a=n.tenantId)!==null&&a!==void 0?a:void 0,m=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,g=(c=n.createdAt)!==null&&c!==void 0?c:void 0,E=(u=n.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:y,emailVerified:w,isAnonymous:I,providerData:A,stsTokenManager:R}=n;ye(y&&R,e,"internal-error");const P=gl.fromJSON(this.name,R);ye(typeof y=="string",e,"internal-error"),cs(h,e.name),cs(f,e.name),ye(typeof w=="boolean",e,"internal-error"),ye(typeof I=="boolean",e,"internal-error"),cs(d,e.name),cs(p,e.name),cs(v,e.name),cs(m,e.name),cs(g,e.name),cs(E,e.name);const C=new pi({uid:y,auth:e,email:f,emailVerified:w,displayName:h,isAnonymous:I,photoURL:p,phoneNumber:d,tenantId:v,stsTokenManager:P,createdAt:g,lastLoginAt:E});return A&&Array.isArray(A)&&(C.providerData=A.map(D=>Object.assign({},D))),m&&(C._redirectEventId=m),C}static async _fromIdTokenResponse(e,n,r=!1){const s=new gl;s.updateFromServerResponse(n);const i=new pi({uid:n.localId,auth:e,stsTokenManager:s,isAnonymous:r});return await Wu(i),i}}/**
658 * @license
659 * Copyright 2020 Google LLC
660 *
661 * Licensed under the Apache License, Version 2.0 (the "License");
662 * you may not use this file except in compliance with the License.
663 * You may obtain a copy of the License at
664 *
665 *   http://www.apache.org/licenses/LICENSE-2.0
666 *
667 * Unless required by applicable law or agreed to in writing, software
668 * distributed under the License is distributed on an "AS IS" BASIS,
669 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
670 * See the License for the specific language governing permissions and
671 * limitations under the License.
672 */const Nw=new Map;function Br(t){Gr(t instanceof Function,"Expected a class definition");let e=Nw.get(t);return e?(Gr(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,Nw.set(t,e),e)}/**
673 * @license
674 * Copyright 2019 Google LLC
675 *
676 * Licensed under the Apache License, Version 2.0 (the "License");
677 * you may not use this file except in compliance with the License.
678 * You may obtain a copy of the License at
679 *
680 *   http://www.apache.org/licenses/LICENSE-2.0
681 *
682 * Unless required by applicable law or agreed to in writing, software
683 * distributed under the License is distributed on an "AS IS" BASIS,
684 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
685 * See the License for the specific language governing permissions and
686 * limitations under the License.
687 */class AA{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}AA.type="NONE";const Lw=AA;/**
688 * @license
689 * Copyright 2019 Google LLC
690 *
691 * Licensed under the Apache License, Version 2.0 (the "License");
692 * you may not use this file except in compliance with the License.
693 * You may obtain a copy of the License at
694 *
695 *   http://www.apache.org/licenses/LICENSE-2.0
696 *
697 * Unless required by applicable law or agreed to in writing, software
698 * distributed under the License is distributed on an "AS IS" BASIS,
699 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
700 * See the License for the specific language governing permissions and
701 * limitations under the License.
702 */function ou(t,e,n){return`firebase:${t}:${e}:${n}`}class yo{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:s,name:i}=this.auth;this.fullUserKey=ou(this.userKey,s.apiKey,i),this.fullPersistenceKey=ou("persistence",s.apiKey,i),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?pi._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new yo(Br(Lw),e,r);const s=(await Promise.all(n.map(async c=>{if(await c._isAvailable())return c}))).filter(c=>c);let i=s[0]||Br(Lw);const o=ou(r,e.config.apiKey,e.name);let a=null;for(const c of n)try{const u=await c._get(o);if(u){const h=pi._fromJSON(e,u);c!==i&&(a=h),i=c;break}}catch{}const l=s.filter(c=>c._shouldAllowMigration);return!i._shouldAllowMigration||!l.length?new yo(i,e,r):(i=l[0],a&&await i._set(o,a.toJSON()),await Promise.all(n.map(async c=>{if(c!==i)try{await c._remove(o)}catch{}})),new yo(i,e,r))}}/**
703 * @license
704 * Copyright 2020 Google LLC
705 *
706 * Licensed under the Apache License, Version 2.0 (the "License");
707 * you may not use this file except in compliance with the License.
708 * You may obtain a copy of the License at
709 *
710 *   http://www.apache.org/licenses/LICENSE-2.0
711 *
712 * Unless required by applicable law or agreed to in writing, software
713 * distributed under the License is distributed on an "AS IS" BASIS,
714 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
715 * See the License for the specific language governing permissions and
716 * limitations under the License.
717 */function xw(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(CA(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(RA(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(DA(e))return"Blackberry";if(kA(e))return"Webos";if(yg(e))return"Safari";if((e.includes("chrome/")||PA(e))&&!e.includes("edge/"))return"Chrome";if(SA(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function RA(t=Tt()){return/firefox\//i.test(t)}function yg(t=Tt()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}
717function PA(t=Tt()){return/crios\//i.test(t)}function CA(t=Tt()){return/iemobile/i.test(t)}function SA(t=Tt()){return/android/i.test(t)}function DA(t=Tt()){return/blackberry/i.test(t)}function kA(t=Tt()){return/webos/i.test(t)}function Fh(t=Tt()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function dz(t=Tt()){var e;return Fh(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function pz(){return TN()&&document.documentMode===10}function OA(t=Tt()){return Fh(t)||SA(t)||kA(t)||DA(t)||/windows phone/i.test(t)||CA(t)}function mz(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
718 * @license
719 * Copyright 2020 Google LLC
720 *
721 * Licensed under the Apache License, Version 2.0 (the "License");
722 * you may not use this file except in compliance with the License.
723 * You may obtain a copy of the License at
724 *
725 *   http://www.apache.org/licenses/LICENSE-2.0
726 *
727 * Unless required by applicable law or agreed to in writing, software
728 * distributed under the License is distributed on an "AS IS" BASIS,
729 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
730 * See the License for the specific language governing permissions and
731 * limitations under the License.
732 */function MA(t,e=[]){let n;switch(t){case"Browser":n=xw(Tt());break;case"Worker":n=`${xw(Tt())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${xi}/${r}`}/**
733 * @license
734 * Copyright 2022 Google LLC
735 *
736 * Licensed under the Apache License, Version 2.0 (the "License");
737 * you may not use this file except in compliance with the License.
738 * You may obtain a copy of the License at
739 *
740 *   http://www.apache.org/licenses/LICENSE-2.0
741 *
742 * Unless required by applicable law or agreed to in writing, software
743 * distributed under the License is distributed on an "AS IS" BASIS,
744 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
745 * See the License for the specific language governing permissions and
746 * limitations under the License.
747 */class gz{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=i=>new Promise((o,a)=>{try{const l=e(i);o(l)}catch(l){a(l)}});r.onAbort=n,this.queue.push(r);const s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const s of n)try{s()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/**
748 * @license
749 * Copyright 2023 Google LLC
750 *
751 * Licensed under the Apache License, Version 2.0 (the "License");
752 * you may not use this file except in compliance with the License.
753 * You may obtain a copy of the License at
754 *
755 *   http://www.apache.org/licenses/LICENSE-2.0
756 *
757 * Unless required by applicable law or agreed to in writing, software
758 * distributed under the License is distributed on an "AS IS" BASIS,
759 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
760 * See the License for the specific language governing permissions and
761 * limitations under the License.
762 */async function vz(t,e={}){return ur(t,"GET","/v2/passwordPolicy",ns(t,e))}/**
763 * @license
764 * Copyright 2023 Google LLC
765 *
766 * Licensed under the Apache License, Version 2.0 (the "License");
767 * you may not use this file except in compliance with the License.
768 * You may obtain a copy of the License at
769 *
770 *   http://www.apache.org/licenses/LICENSE-2.0
771 *
772 * Unless required by applicable law or agreed to in writing, software
773 * distributed under the License is distributed on an "AS IS" BASIS,
774 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
775 * See the License for the specific language governing permissions and
776 * limitations under the License.
777 */const yz=6;class _z{constructor(e){var n,r,s,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=o.minPasswordLength)!==null&&n!==void 0?n:yz,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(s=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&s!==void 0?s:"",this.forceUpgradeOnSignin=(i=e.forceUpgradeOnSignin)!==null&&i!==void 0?i:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,s,i,o,a;const l={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,l),this.validatePasswordCharacterOptions(e,l),l.isValid&&
777(l.isValid=(n=l.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),l.isValid&&(l.isValid=(r=l.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),l.isValid&&(l.isValid=(s=l.containsLowercaseLetter)!==null&&s!==void 0?s:!0),l.isValid&&(l.isValid=(i=l.containsUppercaseLetter)!==null&&i!==void 0?i:!0),l.isValid&&(l.isValid=(o=l.containsNumericCharacter)!==null&&o!==void 0?o:!0),l.isValid&&(l.isValid=(a=l.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),l}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,s=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),s&&(n.meetsMaxPasswordLength=e.length<=s)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let s=0;s<e.length;s++)r=e.charAt(s),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,s,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=s)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}/**
778 * @license
779 * Copyright 2020 Google LLC
780 *
781 * Licensed under the Apache License, Version 2.0 (the "License");
782 * you may not use this file except in compliance with the License.
783 * You may obtain a copy of the License at
784 *
785 *   http://www.apache.org/licenses/LICENSE-2.0
786 *
787 * Unless required by applicable law or agreed to in writing, software
788 * distributed under the License is distributed on an "AS IS" BASIS,
789 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
790 * See the License for the specific language governing permissions and
791 * limitations under the License.
792 */class wz{constructor(e,n,r,s){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=s,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Vw(this),this.idTokenSubscription=new Vw(this),this.beforeStateQueue=new gz(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_A,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=s.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Br(n)),this._initializationPromise=this.queue(async()=>{var r,s;if(!this._deleted&&(this.persistenceManager=await yo.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((s=this.currentUser)===null||s===void 0?void 0:s.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var n;const r=await this.assertedPersistence.getCurrentUser();let s=r,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=s==null?void 0:s._redirectEventId,l=await this.tryRedirectSignIn(e);(!o||o===a)&&(l!=null&&l.user)&&(s=l.user,i=!0)}if(!s)return this.directlySetCurrentUser(null);
792if(!s._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(s)}catch(o){s=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return s?this.reloadAndSetCurrentUserOrClear(s):this.directlySetCurrentUser(null)}return ye(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===s._redirectEventId?this.directlySetCurrentUser(s):this.reloadAndSetCurrentUserOrClear(s)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await Wu(e)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=GK()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const n=e?it(e):null;return n&&ye(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&ye(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Br(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await vz(this),n=new _z(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Hl("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await fz(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&Br(e)||this._popupRedirectResolver;ye(n,this,"argument-error"),this.redirectPersistenceManager=await yo.create(this,[Br(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,s){if(this._deleted)return()=>{};const i=typeof n=="function"?n:n.next.bind(n);let o=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(ye(a,this,"internal-error"),a.then(()=>{o||i(this.currentUser)}),typeof n=="function"){const l=e.addObserver(n,r,s);return()=>{o=!0,l()}}else{const l=e.addObserver(n);return()=>{o=!0,l()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return ye(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=MA(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const s=await this._getAppCheckToken();return s&&(n["X-Firebase-AppCheck"]=s),n}async _getAppCheckToken(){var e;const n=await((e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken());return n!=null&&n.error&&YK(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function rs(t){return it(t)}class Vw{constructor(e){this.auth=e,this.observer=null,this.addObserver=DN(n=>this.observer=n)}get next(){return ye(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
793 * @license
794 * Copyright 2020 Google LLC
795 *
796 * Licensed under the Apache License, Version 2.0 (the "License");
797 * you may not use this file except in compliance with the License.
798 * You may obtain a copy of the License at
799 *
800 *   http://www.apache.org/licenses/LICENSE-2.0
801 *
802 * Unless required by applicable law or agreed to in writing, software
803 * distributed under the License is distributed on an "AS IS" BASIS,
804 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
805 * See the License for the specific language governing permissions and
806 * limitations under the License.
807 */let Uh={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Ez(t){Uh=t}function NA(t){return Uh.loadJS(t)}function bz(){return Uh.recaptchaEnterpriseScript}function Tz(){return Uh.gapiScript}function Iz(t){return`__${t}${Math.floor(Math.random()*1e6)}`}const Az="recaptcha-enterprise",Rz="NO_RECAPTCHA";class Pz{constructor(e){this.type=Az,this.auth=rs(e)}async verify(e="verify",n=!1){async function r(i){if(!n){if(i.tenantId==null&&i._agentRecaptchaConfig!=null)return i._agentRecaptchaConfig.siteKey;if(i.tenantId!=null&&i._tenantRecaptchaConfigs[i.tenantId]!==void 0)return i._tenantRecaptchaConfigs[i.tenantId].siteKey}return new Promise(async(o,a)=>{tz(i,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(l=>{if(l.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{const c=new ez(l);return i.tenantId==null?i._agentRecaptchaConfig=c:i._tenantRecaptchaConfigs[i.tenantId]=c,o(c.siteKey)}}).catch(l=>{a(l)})})}function s(i,o,a){const l=window.grecaptcha;Mw(l)?l.enterprise.ready(()=>{l.enterprise.execute(i,{action:e}).then(c=>{o(c)}).catch(()=>{o(Rz)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((i,o)=>{r(this.auth).then(a=>{if(!n&&Mw(window.grecaptcha))s(a,i,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let l=bz();l.length!==0&&(l+=a),NA(l).then(()=>{s(a,i,o)}).catch(c=>{o(c)})}}).catch(a=>{o(a)})})}}async function $w(t,e,n,r=!1){const s=new Pz(t);let i;try{i=await s.verify(n)}catch{i=await s.verify(n,!0)}const o=Object.assign({},e);return r?Object.assign(o,{captchaResp:i}):Object.assign(o,{captchaResponse:i}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function Yu(t,e,n,r){var s;if(!((s=t._getRecaptchaConfig())===null||s===void 0)&&s.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await $w(t,e,n,n==="getOobCode");return r(t,i)}else return r(t,e).catch(async i=>{if(i.code==="auth/missing-recaptcha-token"){`${n}`;const o=await $w(t,e,n,n==="getOobCode");return r(t,o)}else return Promise.reject(i)})}/**
808 * @license
809 * Copyright 2020 Google LLC
810 *
811 * Licensed under the Apache License, Version 2.0 (the "License");
812 * you may not use this file except in compliance with the License.
813 * You may obtain a copy of the License at
814 *
815 *   http://www.apache.org/licenses/LICENSE-2.0
816 *
817 * Unless required by applicable law or agreed to in writing, software
818 * distributed under the License is distributed on an "AS IS" BASIS,
819 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
820 * See the License for the specific language governing permissions and
821 * limitations under the License.
822 */function Cz(t,e){const n=Dh(t,"auth");if(n.isInitialized()){const s=n.getImmediate(),i=n.getOptions();if(Du(i,e??{}))return s;Qn(s,"already-initialized")}return n.initialize({options:e})}function Sz(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Br);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function Dz(t,e,n){const r=rs(t);ye(r._canInitEmulator,r,"emulator-config-failed"),ye(/^https?:\/\//.test(e),r,"invali
822d-emulator-scheme");const s=!!(n!=null&&n.disableWarnings),i=LA(e),{host:o,port:a}=kz(e),l=a===null?"":`:${a}`;r.config.emulator={url:`${i}//${o}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:a,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:s})}),s||Oz()}function LA(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function kz(t){const e=LA(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",s=/^(\[[^\]]+\])(:|$)/.exec(r);if(s){const i=s[1];return{host:i,port:Fw(r.substr(i.length+1))}}else{const[i,o]=r.split(":");return{host:i,port:Fw(o)}}}function Fw(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function Oz(){function t(){const e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/**
823 * @license
824 * Copyright 2020 Google LLC
825 *
826 * Licensed under the Apache License, Version 2.0 (the "License");
827 * you may not use this file except in compliance with the License.
828 * You may obtain a copy of the License at
829 *
830 *   http://www.apache.org/licenses/LICENSE-2.0
831 *
832 * Unless required by applicable law or agreed to in writing, software
833 * distributed under the License is distributed on an "AS IS" BASIS,
834 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
835 * See the License for the specific language governing permissions and
836 * limitations under the License.
837 */class _g{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Ur("not implemented")}_getIdTokenResponse(e){return Ur("not implemented")}_linkToIdToken(e,n){return Ur("not implemented")}_getReauthenticationResolver(e){return Ur("not implemented")}}async function Mz(t,e){return ur(t,"POST","/v1/accounts:update",e)}async function Nz(t,e){return ur(t,"POST","/v1/accounts:signUp",e)}/**
838 * @license
839 * Copyright 2020 Google LLC
840 *
841 * Licensed under the Apache License, Version 2.0 (the "License");
842 * you may not use this file except in compliance with the License.
843 * You may obtain a copy of the License at
844 *
845 *   http://www.apache.org/licenses/LICENSE-2.0
846 *
847 * Unless required by applicable law or agreed to in writing, software
848 * distributed under the License is distributed on an "AS IS" BASIS,
849 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
850 * See the License for the specific language governing permissions and
851 * limitations under the License.
852 */async function Lz(t,e){return zl(t,"POST","/v1/accounts:signInWithPassword",ns(t,e))}async function xA(t,e){return ur(t,"POST","/v1/accounts:sendOobCode",ns(t,e))}async function xz(t,e){return xA(t,e)}async function Vz(t,e){return xA(t,e)}/**
853 * @license
854 * Copyright 2020 Google LLC
855 *
856 * Licensed under the Apache License, Version 2.0 (the "License");
857 * you may not use this file except in compliance with the License.
858 * You may obtain a copy of the License at
859 *
860 *   http://www.apache.org/licenses/LICENSE-2.0
861 *
862 * Unless required by applicable law or agreed to in writing, software
863 * distributed under the License is distributed on an "AS IS" BASIS,
864 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
865 * See the License for the specific language governing permissions and
866 * limitations under the License.
867 */async function $z(t,e){return zl(t,"POST","/v1/accounts:signInWithEmailLink",ns(t,e))}async function Fz(t,e){return zl(t,"POST","/v1/accounts:signInWithEmailLink",ns(t,e))}/**
868 * @license
869 * Copyright 2020 Google LLC
870 *
871 * Licensed under the Apache License, Version 2.0 (the "License");
872 * you may not use this file except in compliance with the License.
873 * You may obtain a copy of the License at
874 *
875 *   http://www.apache.org/licenses/LICENSE-2.0
876 *
877 * Unless required by applicable law or agreed to in writing, softw
877are
878 * distributed under the License is distributed on an "AS IS" BASIS,
879 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
880 * See the License for the specific language governing permissions and
881 * limitations under the License.
882 */class vl extends _g{constructor(e,n,r,s=null){super("password",r),this._email=e,this._password=n,this._tenantId=s}static _fromEmailAndPassword(e,n){return new vl(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new vl(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Yu(e,n,"signInWithPassword",Lz);case"emailLink":return $z(e,{email:this._email,oobCode:this._password});default:Qn(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Yu(e,r,"signUpPassword",Nz);case"emailLink":return Fz(e,{idToken:n,email:this._email,oobCode:this._password});default:Qn(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
883 * @license
884 * Copyright 2020 Google LLC
885 *
886 * Licensed under the Apache License, Version 2.0 (the "License");
887 * you may not use this file except in compliance with the License.
888 * You may obtain a copy of the License at
889 *
890 *   http://www.apache.org/licenses/LICENSE-2.0
891 *
892 * Unless required by applicable law or agreed to in writing, software
893 * distributed under the License is distributed on an "AS IS" BASIS,
894 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
895 * See the License for the specific language governing permissions and
896 * limitations under the License.
897 */async function _o(t,e){return zl(t,"POST","/v1/accounts:signInWithIdp",ns(t,e))}/**
898 * @license
899 * Copyright 2020 Google LLC
900 *
901 * Licensed under the Apache License, Version 2.0 (the "License");
902 * you may not use this file except in compliance with the License.
903 * You may obtain a copy of the License at
904 *
905 *   http://www.apache.org/licenses/LICENSE-2.0
906 *
907 * Unless required by applicable law or agreed to in writing, software
908 * distributed under the License is distributed on an "AS IS" BASIS,
909 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
910 * See the License for the specific language governing permissions and
911 * limitations under the License.
912 */const Uz="http://localhost";class Pi extends _g{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new Pi(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):Qn("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
912once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:s}=n,i=pg(n,["providerId","signInMethod"]);if(!r||!s)return null;const o=new Pi(r,s);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return _o(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,_o(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,_o(e,n)}buildRequest(){const e={requestUri:Uz,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=jl(n)}return e}}/**
913 * @license
914 * Copyright 2020 Google LLC
915 *
916 * Licensed under the Apache License, Version 2.0 (the "License");
917 * you may not use this file except in compliance with the License.
918 * You may obtain a copy of the License at
919 *
920 *   http://www.apache.org/licenses/LICENSE-2.0
921 *
922 * Unless required by applicable law or agreed to in writing, software
923 * distributed under the License is distributed on an "AS IS" BASIS,
924 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
925 * See the License for the specific language governing permissions and
926 * limitations under the License.
927 */function Bz(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function Hz(t){const e=Aa(Ra(t)).link,n=e?Aa(Ra(e)).deep_link_id:null,r=Aa(Ra(t)).deep_link_id;return(r?Aa(Ra(r)).link:null)||r||n||e||t}class wg{constructor(e){var n,r,s,i,o,a;const l=Aa(Ra(e)),c=(n=l.apiKey)!==null&&n!==void 0?n:null,u=(r=l.oobCode)!==null&&r!==void 0?r:null,h=Bz((s=l.mode)!==null&&s!==void 0?s:null);ye(c&&u&&h,"argument-error"),this.apiKey=c,this.operation=h,this.code=u,this.continueUrl=(i=l.continueUrl)!==null&&i!==void 0?i:null,this.languageCode=(o=l.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(a=l.tenantId)!==null&&a!==void 0?a:null}static parseLink(e){const n=Hz(e);try{return new wg(n)}catch{return null}}}/**
928 * @license
929 * Copyright 2020 Google LLC
930 *
931 * Licensed under the Apache License, Version 2.0 (the "License");
932 * you may not use this file except in compliance with the License.
933 * You may obtain a copy of the License at
934 *
935 *   http://www.apache.org/licenses/LICENSE-2.0
936 *
937 * Unless required by applicable law or agreed to in writing, software
938 * distributed under the License is distributed on an "AS IS" BASIS,
939 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
940 * See the License for the specific language governing permissions and
941 * limitations under the License.
942 */class na{constructor(){this.providerId=na.PROVIDER_ID}static credential(e,n){return vl._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=wg.parseLink(n);return ye(r,"argument-error"),vl._fromEmailAndCode(e,r.code,r.tenantId)}}na.PROVIDER_ID="password";na.EMAIL_PASSWORD_SIGN_IN_METHOD="password";na.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
943 * @license
944 * Copyright 2020 Google LLC
945 *
946 * Licensed under the Apache License, Version 2.0 (the "License");
947 * you may not use this file except in compliance with the License.
948 * You may obtain a copy of the License at
949 *
950 *   http://www.apache.org/licenses/LICENSE-2.0
951 *
952 * Unless required by applicable law or agreed to in writing, software
953 * distributed under the License is distributed on an "AS IS" BASIS,
954 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
955 * See the License for the specific language governing permissions and
956 * limitations under the License.
957 */class Eg{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
958 * @license
959 * Copyright 2019 Google LLC
960 *
961 * Licensed under the Apache License, Version 2.0 (the "License");
962 * you may not use this file except in compliance with the License.
963 * You may obtain a copy of the License at
964 *
965 *   http://www.apache.org/licenses/LICENSE-2.0
966 *
967 * Unless required by applicable law or agreed to in writing, software
968 * distributed under the License is distributed on an "AS IS" BASIS,
969 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
970 * See the License for the specific language governing permissions and
971 * limitations under the License.
972 */class Gl extends Eg{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
973 * @license
974 * Copyright 2020 Google LLC
975 *
976 * Licensed under the Apache License, Version 2.0 (the "License");
977 * you may not use this file except in compliance with the License.
978 * You may obtain a copy of the License at
979 *
980 *   http://www.apache.org/licenses/LICENSE-2.0
981 *
982 * Unless required by applicable law or agreed to in writing, software
983 * distributed under the License is distributed on an "AS IS" BASIS,
984 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
985 * See the License for the specific language governing permissions and
986 * limitations under the License.
987 */class _s extends Gl{constructor(){super("facebook.com")}static credential(e){return Pi._fromParams({providerId:_s.PROVIDER_ID,signInMethod:_s.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return _s.credentialFromTaggedObject(e)}static credentialFromError(e){return _s.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return _s.credential(e.oauthAccessToken)}catch{return null}}}_s.FACEBOOK_SIGN_IN_METHOD="facebook.com";_s.PROVIDER_ID="facebook.com";/**
988 * @license
989 * Copyright 2020 Google LLC
990 *
991 * Licensed under the Apache License, Version 2.0 (the "License");
992 * you may not use this file except in compliance with the License.
993 * You may obtain a copy of the License at
994 *
995 *   http://www.apache.org/licenses/LICENSE-2.0
996 *
997 * Unless required by applicable law or agreed to in writing, software
998 * distributed under the License is distributed on an "AS IS" BASIS,
999 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1000 * See the License for the specific language governing permissions and
1001 * limitations under the License.
1002 */class $r extends Gl{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return Pi._fromParams({providerId:$r.PROVIDER_ID,signInMethod:$r.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return $r.credentialFromTaggedObject(e)}static credentialFromError(e){return $r.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return $r.credential(n,r)}catch{return null}}}$r.GOOGLE_SIGN_IN_METHOD="google.com";$r.PROVIDER_ID="google.com";/**
1003 * @license
1004 * Copyright 2020 Google LLC
1005 *
1006 * Licensed under the Apache License, Version 2.0 (the "License");
1007 * you may not use this file except in compliance with the License.
1008 * You may obtain a copy of the License at
1009 *
1010 *   http://www.apache.org/licenses/LICENSE-2.0
1011 *
1012 * Unless required by applicable law or agreed to in writing, software
1013 * distributed under the License is distributed on an "AS IS" BASIS,
1014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1015 * See the License for the specific language governing permissions and
1016 * limitations under the License.
1017 */class ws extends Gl{constructor(){super("github.com")}static credential(e){return Pi._fromParams({providerId:ws.PROVIDER_ID,signInMethod:ws.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ws.credentialFromTaggedObject(e)}static credentialFromError(e){return ws.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return ws.credential(e.oauthAccessToken)}catch{return null}}}ws.GITHUB_SIGN_IN_METHOD="github.com";ws.PROVIDER_ID="github.com";/**
1018 * @license
1019 * Copyright 2020 Google LLC
1020 *
1021 * Licensed under the Apache License, Version 2.0 (the "License");
1022 * you may not use this file except in compliance with the License.
1023 * You may obtain a copy of the License at
1024 *
1025 *   http://www.apache.org/licenses/LICENSE-2.0
1026 *
1027 * Unless required by applicable law or agreed to in writing, software
1028 * distributed under the License is distributed on an "AS IS" BASIS,
1029 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1030 * See the License for the specific language governing permissions and
1031 * limitations under the License.
1032 */class Es extends Gl{constructor(){super("twitter.com")}static credential(e,n){return Pi._fromParams({providerId:Es.PROVIDER_ID,signInMethod:Es.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Es.credentialFromTaggedObject(e)}static credentialFromError(e){return Es.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Es.credential(n,r)}catch{return null}}}Es.TWITTER_SIGN_IN_METHOD="twitter.com";Es.PROVIDER_ID="twitter.com";/**
1033 * @license
1034 * Copyright 2020 Google LLC
1035 *
1036 * Licensed under the Apache License, Version 2.0 (the "License");
1037 * you may not use this file except in compliance with the License.
1038 * You may obtain a copy of the License at
1039 *
1040 *   http://www.apache.org/licenses/LICENSE-2.0
1041 *
1042 * Unless required by applicable law or agreed to in writing, software
1043 * distributed under the License is distributed on an "AS IS" BASIS,
1044 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1045 * See the License for the specific language governing permissions and
1046 * limitations under the License.
1047 */async function jz(t,e){return zl(t,"POST","/v1/accounts:signUp",ns(t,e))}/**
1048 * @license
1049 * Copyright 2020 Google LLC
1050 *
1051 * Licensed under the Apache License, Version 2.0 (the "License");
1052 * you may not use this file except in compliance with the License.
1053 * You may obtain a copy of the License at
1054 *
1055 *   http://www.apache.org/licenses/LICENSE-2.0
1056 *
1057 * Unless required by applicable law or agreed to in writing, software
1058 * distributed under the License is distributed on an "AS IS" BASIS,
1059 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1060 * See the License for the specific language governing permissions and
1061 * limitations under the License.
1062 */class Ci{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,s=!1){const i=await pi._fromIdTokenResponse(e,r,s),o=Uw(r);return new Ci({user:i,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const s=Uw(r);return new Ci({user:e,providerId:s,_tokenResponse:r,operationType:n})}}function Uw(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/**
1063 * @license
1064 * Copyright 2020 Google LLC
1065 *
1066 * Licensed under the Apache License, Version 2.0 (the "License");
1067 * you may not use this file except in compliance with the License.
1068 * You may obtain a copy of the License at
1069 *
1070 *   http://www.apache.org/licenses/LICENSE-2.0
1071 *
1072 * Unless required by applicable law or agreed to in writing, software
1073 * distributed under the License is distributed on an "AS IS" BASIS,
1074 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1075 * See the License for the specific language governing permissions and
1076 * limitations under the License.
1077 */class qu extends Dr{constructor(e,n,r,s){var i;super(n.code,n.message),this.operationType=r,this.user=s,Object.setPrototypeOf(this,qu.prototype),this.customData={appName:e.name,tenantId:(i=e.tenantId)!==null&&i!==void 0?i:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,s){return new qu(e,n,r,s)}}function VA(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(i=>{throw i.code==="auth/multi-factor-auth-required"?qu._fromErrorAndOperation(t,i,e,r):i})}async function Wz(t,e,n=!1){const r=await Ri(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Ci._forOperation(t,"link",r)}/**
1078 * @license
1079 * Copyright 2019 Google LLC
1080 *
1081 * Licensed under the Apache License, Version 2.0 (the "License");
1082 * you may not use this file except in compliance with the License.
1083 * You may obtain a copy of the License at
1084 *
1085 *   http://www.apache.org/licenses/LICENSE-2.0
1086 *
1087 * Unless required by applicable law or agreed to in writing, software
1088 * distributed under the License is distributed on an "AS IS" BASIS,
1089 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1090 * See the License for the specific language governing permissions and
1091 * limitations under the License.
1092 */async function Yz(t,e,n=!1){const{auth:r}=t,s="reauthenticate";try{const i=await Ri(t,VA(r,s,e,t),n);ye(i.idToken,r,"internal-error");const o=vg(i.idToken);ye(o,r,"internal-error");const{sub:a}=o;return ye(t.uid===a,r,"user-mismatch"),Ci._forOperation(t,s,i)}catch(i){throw(i==null?void 0:i.code)==="auth/user-not-found"&&Qn(r,"user-mismatch"),i}}/**
1093 * @license
1094 * Copyright 2020 Google LLC
1095 *
1096 * Licensed under the Apache License, Version 2.0 (the "License");
1097 * you may not use this file except in compliance with the License.
1098 * You may obtain a copy of the License at
1099 *
1100 *   http://www.apache.org/licenses/LICENSE-2.0
1101 *
1102 * Unless required by applicable law or agreed to in writing, software
1103 * distributed under the License is distributed on an "AS IS" BASIS,
1104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1105 * See the License for the specific language governing permissions and
1106 * limitations under the License.
1107 */async function $A(t,e,n=!1){const r="signIn",s=await VA(t,r,e),i=await Ci._fromIdTokenResponse(t,r,s);return n||await t._updateCurrentUser(i.user),i}async function qz(t,e){return $A(rs(t),e)}/**
1108 * @license
1109 * Copyright 2020 Google LLC
1110 *
1111 * Licensed under the Apache License, Version 2.0 (the "License");
1112 * you may not use this file except in compliance with the License.
1113 * You may obtain a copy of the License at
1114 *
1115 *   http://www.apache.org/licenses/LICENSE-2.0
1116 *
1117 * Unless required by applicable law or agreed to in writing, software
1118 * distributed under the License is distributed on an "AS IS" BASIS,
1119 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1120 * See the License for the specific language governing permissions and
1121 * limitations under the License.
1122 */function FA(t,e,n){var r;ye(((r=n.url)===null||r===void 0?void 0:r.length)>0,t,"invalid-continue-uri"),ye(typeof n.dynamicLinkDomain>"u"||n.dynamicLinkDomain.length>0,t,"invalid-dynamic-link-domain"),e.continueUrl=n.url,e.dynamicLinkDomain=n.dynamicLinkDomain,e.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(ye(n.iOS.bundleId.length>0,t,"missing-ios-bundle-id"),e.iOSBundleId=n.iOS.bundleId),n.android&&(ye(n.android.packageName.length>0,t,"missing-android-pkg-name"),e.androidInstallApp=n.android.installApp,e.androidMinimumVersionCode=n.android.minimumVersion,e.androidPackageName=n.android.packageName)}/**
1123 * @license
1124 * Copyright 2020 Google LLC
1125 *
1126 * Licensed under the Apache License, Version 2.0 (the "License");
1127 * you may not use this file except in compliance with the License.
1128 * You may obtain a copy of the License at
1129 *
1130 *   http://www.apache.org/licenses/LICENSE-2.0
1131 *
1132 * Unless required by applicable law or agreed to in writing, software
1133 * distributed under the License is distributed on an "AS IS" BASIS,
1134 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1135 * See the License for the specific language governing permissions and
1136 * limitations under the License.
1137 */async function UA(t){const e=rs(t);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}async function Kz(t,e,n){const r=rs(t),s={requestType:"PASSWORD_RESET",email:e,clientType:"CLIENT_TYPE_WEB"};n&&FA(r,s,n),await Yu(r,s,"getOobCode",Vz)}async function zz(t,e,n){const r=rs(t),o=await Yu(r,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",jz).catch(l=>{throw l.code==="auth/password-does-not-meet-requirements"&&UA(t),l}),a=await Ci._fromIdTokenResponse(r,"signIn",o);return await r._updateCurrentUser(a.user),a}function Gz(t,e,n){return qz(it(t),na.credential(e,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&UA(t),r})}async function Qz(t,e){const n=it(t),s={requestType:"VERIFY_EMAIL",idToken:await t.getIdToken()};e&&FA(n.auth,s,e);const{email:i}=await xz(n.auth,s);i!==t.email&&await t.reload()}/**
1138 * @license
1139 * Copyright 2020 Google LLC
1140 *
1141 * Licensed under the Apache License, Version 2.0 (the "License");
1142 * you may not use this file except in compliance with the License.
1143 * You may obtain a copy of the License at
1144 *
1145 *   http://www.apache.org/licenses/LICENSE-2.0
1146 *
1147 * Unless required by applicable law or agreed to in writing, software
1148 * distributed under the License is distributed on an "AS IS" BASIS,
1149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1150 * See the License for the specific language governing permissions and
1151 * limitations under the License.
1152 */async function Xz(t,e){return ur(t,"POST","/v1/accounts:update",e)}/**
1153 * @license
1154 * Copyright 2020 Google LLC
1155 *
1156 * Licensed under the Apache License, Version 2.0 (the "License");
1157 * you may not use this file except in compliance with the License.
1158 * You may obtain a copy of the License at
1159 *
1160 *   http://www.apache.org/licenses/LICENSE-2.0
1161 *
1162 * Unless required by applicable law or agreed to in writing, software
1163 * distributed under the License is distributed on an "AS IS" BASIS,
1164 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1165 * See the License for the specific language governing permissions and
1166 * limitations under the License.
1167 */async function Jz(t,{displayName:e,photoURL:n}){if(e===void 0&&n===void 0)return;const r=it(t),i={idToken:await r.getIdToken(),displayName:e,photoUrl:n,returnSecureToken:!0},o=await Ri(r,Xz(r.auth,i));r.displayName=o.displayName||null,r.photoURL=o.photoUrl||null;const a=r.providerData.find(({providerId:l})=>l==="password");a&&(a.displayName=r.displayName,a.photoURL=r.photoURL),await r._updateTokensIfNecessary(o)}function Zz(t,e){return e5(it(t),e,null)}async function e5(t,e,n){const{auth:r}=t,i={idToken:await t.getIdToken(),returnSecureToken:!0};e&&(i.email=e),n&&(i.password=n);const o=await Ri(t,Mz(r,i));await t._updateTokensIfNecessary(o,!0)}function t5(t,e,n,r){return it(t).onIdTokenChanged(e,n,r)}function n5(t,e,n){return it(t).beforeAuthStateChanged(e,n)}function Lee(t,e,n,r){return it(t).onAuthStateChanged(e,n,r)}function r5(t){return it(t).signOut()}const Ku="__sak";/**
1168 * @license
1169 * Copyright 2019 Google LLC
1170 *
1171 * Licensed under the Apache License, Version 2.0 (the "License");
1172 * you may not use this file except in compliance with the License.
1173 * You may obtain a copy of the License at
1174 *
1175 *   http://www.apache.org/licenses/LICENSE-2.0
1176 *
1177 * Unless required by applicable law or agreed to in writing, software
1178 * distributed under the License is distributed on an "AS IS" BASIS,
1179 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1180 * See the License for the specific language governing permissions and
1181 * limitations under the License.
1182 */class BA{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Ku,"1"),this.storage.removeItem(Ku),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
1183 * @license
1184 * Copyright 2020 Google LLC
1185 *
1186 * Licensed under the Apache License, Version 2.0 (the "License");
1187 * you may not use this file except in compliance with the License.
1188 * You may obtain a copy of the License at
1189 *
1190 *   http://www.apache.org/licenses/LICENSE-2.0
1191 *
1192 * Unless required by applicable law or agreed to in writing, software
1193 * distributed under the License is distributed on an "AS IS" BASIS,
1194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1195 * See the License for the specific language governing permissions and
1196 * limitations under the License.
1197 */function s5(){const t=Tt();return yg(t)||Fh(t)}const i5=1e3,o5=10;class HA extends BA{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=s5()&&mz(),this.fallbackToPolling=OA(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),s=this.localCache[n];r!==s&&e(n,s,r)}}
1197onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,a,l)=>{this.notifyListeners(o,l)});return}const r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(r);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}const s=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},i=this.storage.getItem(r);pz()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,o5):s()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const s of Array.from(r))s(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},i5)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1197ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}HA.type="LOCAL";const a5=HA;/**
1198 * @license
1199 * Copyright 2020 Google LLC
1200 *
1201 * Licensed under the Apache License, Version 2.0 (the "License");
1202 * you may not use this file except in compliance with the License.
1203 * You may obtain a copy of the License at
1204 *
1205 *   http://www.apache.org/licenses/LICENSE-2.0
1206 *
1207 * Unless required by applicable law or agreed to in writing, software
1208 * distributed under the License is distributed on an "AS IS" BASIS,
1209 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1210 * See the License for the specific language governing permissions and
1211 * limitations under the License.
1212 */class jA extends BA{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}jA.type="SESSION";const WA=jA;/**
1213 * @license
1214 * Copyright 2019 Google LLC
1215 *
1216 * Licensed under the Apache License, Version 2.0 (the "License");
1217 * you may not use this file except in compliance with the License.
1218 * You may obtain a copy of the License at
1219 *
1220 *   http://www.apache.org/licenses/LICENSE-2.0
1221 *
1222 * Unless required by applicable law or agreed to in writing, software
1223 * distributed under the License is distributed on an "AS IS" BASIS,
1224 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1225 * See the License for the specific language governing permissions and
1226 * limitations under the License.
1227 */function l5(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/**
1228 * @license
1229 * Copyright 2019 Google LLC
1230 *
1231 * Licensed under the Apache License, Version 2.0 (the "License");
1232 * you may not use this file except in compliance with the License.
1233 * You may obtain a copy of the License at
1234 *
1235 *   http://www.apache.org/licenses/LICENSE-2.0
1236 *
1237 * Unless required by applicable law or agreed to in writing, software
1238 * distributed under the License is distributed on an "AS IS" BASIS,
1239 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1240 * See the License for the specific language governing permissions and
1241 * limitations under the License.
1242 */class Bh{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(s=>s.isListeningto(e));if(n)return n;const r=new Bh(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:s,data:i}=n.data,o=this.handlersMap[s];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:s});const a=Array.from(o).map(async c=>c(n.origin,i)),l=await l5(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:l})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Bh.receivers=[];/**
1243 * @license
1244 * Copyright 2020 Google LLC
1245 *
1246 * Licensed under the Apache License, Version 2.0 (the "License");
1247 * you may not use this file except in compliance with the License.
1248 * You may obtain a copy of the License at
1249 *
1250 *   http://www.apache.org/licenses/LICENSE-2.0
1251 *
1252 * Unless required by applicable law or agreed to in writing, software
1253 * distributed under the License is distributed on an "AS IS" BASIS,
1254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1255 * See the License for the specific language governing permissions and
1256 * limitations under the License.
1257 */function bg(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/**
1258 * @license
1259 * Copyright 2019 Google LLC
1260 *
1261 * Licensed under the Apache License, Version 2.0 (the "License");
1262 * you may not use this file except in compliance with the License.
1263 * You may obtain a copy of the License at
1264 *
1265 *   http://www.apache.org/licenses/LICENSE-2.0
1266 *
1267 * Unless required by applicable law or agreed to in writing, software
1268 * distributed under the License is distributed on an "AS IS" BASIS,
1269 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1270 * See the License for the specific language governing permissions and
1271 * limitations under the License.
1272 */class c5{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let i,o;return new Promise((a,l)=>{const c=bg("",20);s.port1.start();const u=setTimeout(()=>{l(new Error("unsupported_event"))},r);o={messageChannel:s,onMessage(h){const f=h;if(f.data.eventId===c)switch(f.data.status){case"ack":clearTimeout(u),i=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(f.data.response);break;default:clearTimeout(u),clearTimeout(i),l(new Error("invalid_response"));break}}},this.handlers.add(o),s.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:n},[s.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
1273 * @license
1274 * Copyright 2020 Google LLC
1275 *
1276 * Licensed under the Apache License, Version 2.0 (the "License");
1277 * you may not use this file except in compliance with the License.
1278 * You may obtain a copy of the License at
1279 *
1280 *   http://www.apache.org/licenses/LICENSE-2.0
1281 *
1282 * Unless required by applicable law or agreed to in writing, software
1283 * distributed under the License is distributed on an "AS IS" BASIS,
1284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1285 * See the License for the specific language governing permissions and
1286 * limitations under the License.
1287 */function Tr(){return window}function u5(t){Tr().location.href=t}/**
1288 * @license
1289 * Copyright 2020 Google LLC.
1290 *
1291 * Licensed under the Apache License, Version 2.0 (the "License");
1292 * you may not use this file except in compliance with the License.
1293 * You may obtain a copy of the License at
1294 *
1295 *   http://www.apache.org/licenses/LICENSE-2.0
1296 *
1297 * Unless required by applicable law or agreed to in writing, software
1298 * distributed under the License is distributed on an "AS IS" BASIS,
1299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1300 * See the License for the specific language governing permissions and
1301 * limitations under the License.
1302 */function YA(){return typeof Tr().WorkerGlobalScope<"u"&&typeof Tr().importScripts=="function"}async function h5(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function f5(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function d5(){return YA()?self:null}/**
1303 * @license
1304 * Copyright 2019 Google LLC
1305 *
1306 * Licensed under the Apache License, Version 2.0 (the "License");
1307 * you may not use this file except in compliance with the License.
1308 * You may obtain a copy of the License at
1309 *
1310 *   http://www.apache.org/licenses/LICENSE-2.0
1311 *
1312 * Unless required by applicable law or agreed to in writing, software
1313 * distributed under the License is distributed on an "AS IS" BASIS,
1314 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1315 * See the License for the specific language governing permissions and
1316 * limitations under the License.
1317 */const qA="firebaseLocalStorageDb",p5=1,zu="firebaseLocalStorage",KA="fbase_key";class Ql{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Hh(t,e){return t.transaction([zu],e?"readwrite":"readonly").objectStore(zu)}function m5(){const t=indexedDB.deleteDatabase(qA);
1317return new Ql(t).toPromise()}function Rp(){const t=indexedDB.open(qA,p5);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(zu,{keyPath:KA})}catch(s){n(s)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(zu)?e(r):(r.close(),await m5(),e(await Rp()))})})}async function Bw(t,e,n){const r=Hh(t,!0).put({[KA]:e,value:n});return new Ql(r).toPromise()}async function g5(t,e){const n=Hh(t,!1).get(e),r=await new Ql(n).toPromise();return r===void 0?null:r.value}function Hw(t,e){const n=Hh(t,!0).delete(e);return new Ql(n).toPromise()}const v5=800,y5=3;class zA{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await Rp(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>y5)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return YA()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Bh._getInstance(d5()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1317)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await h5(),!this.activeServiceWorker)return;this.sender=new c5(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||f5()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Rp();return await Bw(e,Ku,"1"),await Hw(e,Ku),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>Bw(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>g5(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Hw(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(s=>{const i=Hh(s,!1).getAll();return new Ql(i).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:s,value:i}of e)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(i)&&(this.notifyListeners(s,i),n.push(s));for(const s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),n.push(s));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const s of Array.from(r))s(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),v5)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1317ject.keys(this.listeners).length===0&&this.stopPolling()}}zA.type="LOCAL";const _5=zA;new Kl(3e4,6e4);/**
1318 * @license
1319 * Copyright 2021 Google LLC
1320 *
1321 * Licensed under the Apache License, Version 2.0 (the "License");
1322 * you may not use this file except in compliance with the License.
1323 * You may obtain a copy of the License at
1324 *
1325 *   http://www.apache.org/licenses/LICENSE-2.0
1326 *
1327 * Unless required by applicable law or agreed to in writing, software
1328 * distributed under the License is distributed on an "AS IS" BASIS,
1329 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1330 * See the License for the specific language governing permissions and
1331 * limitations under the License.
1332 */function GA(t,e){return e?Br(e):(ye(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/**
1333 * @license
1334 * Copyright 2019 Google LLC
1335 *
1336 * Licensed under the Apache License, Version 2.0 (the "License");
1337 * you may not use this file except in compliance with the License.
1338 * You may obtain a copy of the License at
1339 *
1340 *   http://www.apache.org/licenses/LICENSE-2.0
1341 *
1342 * Unless required by applicable law or agreed to in writing, software
1343 * distributed under the License is distributed on an "AS IS" BASIS,
1344 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1345 * See the License for the specific language governing permissions and
1346 * limitations under the License.
1347 */class Tg extends _g{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return _o(e,this._buildIdpRequest())}_linkToIdToken(e,n){return _o(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return _o(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function w5(t){return $A(t.auth,new Tg(t),t.bypassAuthState)}function E5(t){const{auth:e,user:n}=t;return ye(n,e,"internal-error"),Yz(n,new Tg(t),t.bypassAuthState)}async function b5(t){const{auth:e,user:n}=t;return ye(n,e,"internal-error"),Wz(n,new Tg(t),t.bypassAuthState)}/**
1348 * @license
1349 * Copyright 2020 Google LLC
1350 *
1351 * Licensed under the Apache License, Version 2.0 (the "License");
1352 * you may not use this file except in compliance with the License.
1353 * You may obtain a copy of the License at
1354 *
1355 *   http://www.apache.org/licenses/LICENSE-2.0
1356 *
1357 * Unless required by applicable law or agreed to in writing, software
1358 * distributed under the License is distributed on an "AS IS" BASIS,
1359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1360 * See the License for the specific language governing permissions and
1361 * limitations under the License.
1362 */class QA{constructor(e,n,r,s,i=!1){this.auth=e,this.resolver=r,this.user=s,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:s,tenantId:i,error:o,type:a}=e;if(o){this.reject(o);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:i||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(l))}catch(c){this.reject(c)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return w5;case"linkViaPopup":case"linkViaRedirect":return b5;case"reauthViaPopup":case"reauthViaRedirect":return E5;default:Qn(this.auth,"internal-error")}}resolve(e){Gr(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Gr(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
1363 * @license
1364 * Copyright 2020 Google LLC
1365 *
1366 * Licensed under the Apache License, Version 2.0 (the "License");
1367 * you may not use this file except in compliance with the License.
1368 * You may obtain a copy of the License at
1369 *
1370 *   http://www.apache.org/licenses/LICENSE-2.0
1371 *
1372 * Unless required by applicable law or agreed to in writing, software
1373 * distributed under the License is distributed on an "AS IS" BASIS,
1374 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1375 * See the License for the specific language governing permissions and
1376 * limitations under the License.
1377 */const T5=new Kl(2e3,1e4);async function I5(t,e,n){const r=rs(t);qK(t,e,Eg);const s=GA(r,n);return new ii(r,"signInViaPopup",e,s).executeNotNull()}class ii extends QA{constructor(e,n,r,s,i){super(e,n,s,i),this.provider=r,this.authWindow=null,this.pollId=null,ii.currentPopupAction&&ii.currentPopupAction.cancel(),ii.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return ye(e,this.auth,"internal-error"),e}async onExecution(){Gr(this.filter.length===1,"Popup operations only handle one event");const e=bg();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(br(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(br(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,ii.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(br(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,T5.get())};e()}}ii.currentPopupAction=null;/**
1378 * @license
1379 * Copyright 2020 Google LLC
1380 *
1381 * Licensed under the Apache License, Version 2.0 (the "License");
1382 * you may not use this file except in compliance with the License.
1383 * You may obtain a copy of the License at
1384 *
1385 *   http://www.apache.org/licenses/LICENSE-2.0
1386 *
1387 * Unless required by applicable law or agreed to in writing, software
1388 * distributed under the License is distributed on an "AS IS" BASIS,
1389 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1390 * See the License for the specific language governing permissions and
1391 * limitations under the License.
1392 */const A5="pendingRedirect",au=new Map;class R5 extends QA{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=au.get(this.auth._key());if(!e){try{const r=await P5(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}au.set(this.auth._key(),e)}return this.bypassAuthState||au.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function P5(t,e){const n=D5(e),r=S5(t);if(!await r._isAvailable())return!1;const s=await r._get(n)==="true";return await r._remove(n),s}function C5(t,e){au.set(t._key(),e)}function S5(t){return Br(t._redirectPersistence)}function D5(t){return ou(A5,t.config.apiKey,t.name)}async function k5(t,e,n=!1){const r=rs(t),s=GA(r,e),o=await new R5(r,s,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/**
1393 * @license
1394 * Copyright 2020 Google LLC
1395 *
1396 * Licensed under the Apache License, Version 2.0 (the "License");
1397 * you may not use this file except in compliance with the License.
1398 * You may obtain a copy of the License at
1399 *
1400 *   http://www.apache.org/licenses/LICENSE-2.0
1401 *
1402 * Unless required by applicable law or agreed to in writing, softw
1402are
1403 * distributed under the License is distributed on an "AS IS" BASIS,
1404 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1405 * See the License for the specific language governing permissions and
1406 * limitations under the License.
1407 */const O5=10*60*1e3;class M5{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!N5(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!XA(e)){const s=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(br(this.auth,s))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=O5&&this.cachedEventUids.clear(),this.cachedEventUids.has(jw(e))}saveEventToCache(e){this.cachedEventUids.add(jw(e)),this.lastProcessedEventTime=Date.now()}}function jw(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function XA({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function N5(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return XA(t);default:return!1}}/**
1408 * @license
1409 * Copyright 2020 Google LLC
1410 *
1411 * Licensed under the Apache License, Version 2.0 (the "License");
1412 * you may not use this file except in compliance with the License.
1413 * You may obtain a copy of the License at
1414 *
1415 *   http://www.apache.org/licenses/LICENSE-2.0
1416 *
1417 * Unless required by applicable law or agreed to in writing, software
1418 * distributed under the License is distributed on an "AS IS" BASIS,
1419 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1420 * See the License for the specific language governing permissions and
1421 * limitations under the License.
1422 */async function L5(t,e={}){return ur(t,"GET","/v1/projects",e)}/**
1423 * @license
1424 * Copyright 2020 Google LLC
1425 *
1426 * Licensed under the Apache License, Version 2.0 (the "License");
1427 * you may not use this file except in compliance with the License.
1428 * You may obtain a copy of the License at
1429 *
1430 *   http://www.apache.org/licenses/LICENSE-2.0
1431 *
1432 * Unless required by applicable law or agreed to in writing, software
1433 * distributed under the License is distributed on an "AS IS" BASIS,
1434 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1435 * See the License for the specific language governing permissions and
1436 * limitations under the License.
1437 */const x5=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,V5=/^https?/;async function $5(t){if(t.config.emulator)return;const{authorizedDomains:e}=await L5(t);for(const n of e)try{if(F5(n))return}catch{}Qn(t,"unauthorized-domain")}function F5(t){const e=Ap(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!V5.test(n))return!1;if(x5.test(t))return r===t;const s=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(r)}/**
1438 * @license
1439 * Copyright 2020 Google LLC.
1440 *
1441 * Licensed under the Apache License, Version 2.0 (the "License");
1442 * you may not use this file except in compliance with the License.
1443 * You may obtain a copy of the License at
1444 *
1445 *   http://www.apache.org/licenses/LICENSE-2.0
1446 *
1447 * Unless required by applicable law or agreed to in writing, softw
1447are
1448 * distributed under the License is distributed on an "AS IS" BASIS,
1449 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1450 * See the License for the specific language governing permissions and
1451 * limitations under the License.
1452 */const U5=new Kl(3e4,6e4);function Ww(){const t=Tr().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function B5(t){return new Promise((e,n)=>{var r,s,i;function o(){Ww(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Ww(),n(br(t,"network-request-failed"))},timeout:U5.get()})}if(!((s=(r=Tr().gapi)===null||r===void 0?void 0:r.iframes)===null||s===void 0)&&s.Iframe)e(gapi.iframes.getContext());else if(!((i=Tr().gapi)===null||i===void 0)&&i.load)o();else{const a=Iz("iframefcb");return Tr()[a]=()=>{gapi.load?o():n(br(t,"network-request-failed"))},NA(`${Tz()}?onload=${a}`).catch(l=>n(l))}}).catch(e=>{throw lu=null,e})}let lu=null;function H5(t){return lu=lu||B5(t),lu}/**
1453 * @license
1454 * Copyright 2020 Google LLC.
1455 *
1456 * Licensed under the Apache License, Version 2.0 (the "License");
1457 * you may not use this file except in compliance with the License.
1458 * You may obtain a copy of the License at
1459 *
1460 *   http://www.apache.org/licenses/LICENSE-2.0
1461 *
1462 * Unless required by applicable law or agreed to in writing, software
1463 * distributed under the License is distributed on an "AS IS" BASIS,
1464 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1465 * See the License for the specific language governing permissions and
1466 * limitations under the License.
1467 */const j5=new Kl(5e3,15e3),W5="__/auth/iframe",Y5="emulator/auth/iframe",q5={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},K5=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function z5(t){const e=t.config;ye(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?gg(e,Y5):`https://${t.config.authDomain}/${W5}`,r={apiKey:e.apiKey,appName:t.name,v:xi},s=K5.get(t.config.apiHost);s&&(r.eid=s);const i=t._getFrameworks();return i.length&&(r.fw=i.join(",")),`${n}?${jl(r).slice(1)}`}async function G5(t){const e=await H5(t),n=Tr().gapi;return ye(n,t,"internal-error"),e.open({where:document.body,url:z5(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:q5,dontclear:!0},r=>new Promise(async(s,i)=>{await r.restyle({setHideOnLeave:!1});const o=br(t,"network-request-failed"),a=Tr().setTimeout(()=>{i(o)},j5.get());function l(){Tr().clearTimeout(a),s(r)}r.ping(l).then(l,()=>{i(o)})}))}/**
1468 * @license
1469 * Copyright 2020 Google LLC.
1470 *
1471 * Licensed under the Apache License, Version 2.0 (the "License");
1472 * you may not use this file except in compliance with the License.
1473 * You may obtain a copy of the License at
1474 *
1475 *   http://www.apache.org/licenses/LICENSE-2.0
1476 *
1477 * Unless required by applicable law or agreed to in writing, software
1478 * distributed under the License is distributed on an "AS IS" BASIS,
1479 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1480 * See the License for the specific language governing permissions and
1481 * limitations under the License.
1482 */const Q5={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},X5=500,J5=600,Z5="_blank",eG="http://localhost";class Yw{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function tG(t,e,n,r=X5,s=J5){const i=Math.max((window.screen.availHeight-s)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},Q5),{width:r.toString(),height:s.toString(),top:i,left:o}),c=Tt().toLowerCase();n&&(a=PA(c)?Z5:n),RA(c)&&(e=e||eG,l.scrollbars="yes");const u=Object.entries(l).reduce((f,[d,p])=>`${f}${d}=${p},`,"");if(dz(c)&&a!=="_self")return nG(e||"",a),new Yw(null);const h=window.open(e||"",a,u);ye(h,t,"popup-blocked");try{h.focus()}catch{}return new Yw(h)}function nG(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");
1482r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
1483 * @license
1484 * Copyright 2021 Google LLC
1485 *
1486 * Licensed under the Apache License, Version 2.0 (the "License");
1487 * you may not use this file except in compliance with the License.
1488 * You may obtain a copy of the License at
1489 *
1490 *   http://www.apache.org/licenses/LICENSE-2.0
1491 *
1492 * Unless required by applicable law or agreed to in writing, software
1493 * distributed under the License is distributed on an "AS IS" BASIS,
1494 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1495 * See the License for the specific language governing permissions and
1496 * limitations under the License.
1497 */const rG="__/auth/handler",sG="emulator/auth/handler",iG=encodeURIComponent("fac");async function qw(t,e,n,r,s,i){ye(t.config.authDomain,t,"auth-domain-config-required"),ye(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:xi,eventId:s};if(e instanceof Eg){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",SN(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[u,h]of Object.entries(i||{}))o[u]=h}if(e instanceof Gl){const u=e.getScopes().filter(h=>h!=="");u.length>0&&(o.scopes=u.join(","))}t.tenantId&&(o.tid=t.tenantId);const a=o;for(const u of Object.keys(a))a[u]===void 0&&delete a[u];const l=await t._getAppCheckToken(),c=l?`#${iG}=${encodeURIComponent(l)}`:"";return`${oG(t)}?${jl(a).slice(1)}${c}`}function oG({config:t}){return t.emulator?gg(t,sG):`https://${t.authDomain}/${rG}`}/**
1498 * @license
1499 * Copyright 2020 Google LLC
1500 *
1501 * Licensed under the Apache License, Version 2.0 (the "License");
1502 * you may not use this file except in compliance with the License.
1503 * You may obtain a copy of the License at
1504 *
1505 *   http://www.apache.org/licenses/LICENSE-2.0
1506 *
1507 * Unless required by applicable law or agreed to in writing, software
1508 * distributed under the License is distributed on an "AS IS" BASIS,
1509 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1510 * See the License for the specific language governing permissions and
1511 * limitations under the License.
1512 */const ld="webStorageSupport";class aG{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=WA,this._completeRedirectFn=k5,this._overrideRedirectResult=C5}
1512async _openPopup(e,n,r,s){var i;Gr((i=this.eventManagers[e._key()])===null||i===void 0?void 0:i.manager,"_initialize() not called before _openPopup()");const o=await qw(e,n,r,Ap(),s);return tG(e,o,bg())}async _openRedirect(e,n,r,s){await this._originValidation(e);const i=await qw(e,n,r,Ap(),s);return u5(i),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:s,promise:i}=this.eventManagers[n];return s?Promise.resolve(s):(Gr(i,"If manager is not set, promise should be"),i)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await G5(e),r=new M5(e);return n.register("authEvent",s=>(ye(s==null?void 0:s.authEvent,e,"invalid-auth-event"),{status:r.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(ld,{type:ld},s=>{var i;const o=(i=s==null?void 0:s[0])===null||i===void 0?void 0:i[ld];o!==void 0&&n(!!o),Qn(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=$5(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return OA()||yg()||Fh()}}const lG=aG;var Kw="@firebase/auth",zw="1.6.1";/**
1513 * @license
1514 * Copyright 2020 Google LLC
1515 *
1516 * Licensed under the Apache License, Version 2.0 (the "License");
1517 * you may not use this file except in compliance with the License.
1518 * You may obtain a copy of the License at
1519 *
1520 *   http://www.apache.org/licenses/LICENSE-2.0
1521 *
1522 * Unless required by applicable law or agreed to in writing, software
1523 * distributed under the License is distributed on an "AS IS" BASIS,
1524 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1525 * See the License for the specific language governing permissions and
1526 * limitations under the License.
1527 */class cG{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){ye(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
1528 * @license
1529 * Copyright 2020 Google LLC
1530 *
1531 * Licensed under the Apache License, Version 2.0 (the "License");
1532 * you may not use this file except in compliance with the License.
1533 * You may obtain a copy of the License at
1534 *
1535 *   http://www.apache.org/licenses/LICENSE-2.0
1536 *
1537 * Unless required by applicable law or agreed to in writing, software
1538 * distributed under the License is distributed on an "AS IS" BASIS,
1539 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1540 * See the License for the specific language governing permissions and
1541 * limitations under the License.
1542 */function uG(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function hG(t){Ti(new Ms("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),s=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;ye(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:MA(t)},c=new wz(r,s,i,l);return Sz(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),Ti(new Ms("auth-internal",e=>{const n=rs(e.getProvider("auth").getImmediate());return(r=>new cG(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),wr(Kw,zw,uG(t)),wr(Kw,zw,"esm2017")}/**
1543 * @license
1544 * Copyright 2021 Google LLC
1545 *
1546 * Licensed under the Apache License, Version 2.0 (the "License");
1547 * you may not use this file except in compliance with the License.
1548 * You may obtain a copy of the License at
1549 *
1550 *   http://www.apache.org/licenses/LICENSE-2.0
1551 *
1552 * Unless required by applicable law or agreed to in writing, software
1553 * distributed under the License is distributed on an "AS IS" BASIS,
1554 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1555 * See the License for the specific language governing permissions and
1556 * limitations under the License.
1557 */const fG=5*60,dG=N0("authIdTokenMaxAge")||fG;let Gw=null;const pG=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>dG)return;const s=n==null?void 0:n.token;Gw!==s&&(Gw=s,await fetch(t,{method:s?"POST":"DELETE",headers:s?{Authorization:`Bearer ${s}`}:{}}))};function us(t=Vm()){const e=Dh(t,"auth");if(e.isInitialized())return e.getImmediate();const n=Cz(t,{popupRedirectResolver:lG,persistence:[_5,a5,WA]}),r=N0("authTokenSyncURL");if(r){const i=pG(r);n5(n,i,()=>i(n.currentUser)),t5(n,o=>i(o))}const s=k0("auth");return s&&Dz(n,`http://${s}`),n}function mG(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Ez({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=s=>{const i=br("internal-error");i.customData=s,n(i)},r.type="text/javascript",r.charset="UTF-8",mG().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});hG("Browser");var gG=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},re,Ig=Ig||{},Te=gG||self;function jh(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 Xl(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function vG(t){return Object.prototype.hasOwnProperty.call(t,cd)&&t[cd]||(t[cd]=++yG)}var cd="closure_uid_"+(1e9*Math.random()>>>0),yG=0;function _G(t,e,n){return t.call.apply(t.bind,arguments)}function wG(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var s=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(s,r),t.apply(e,s)}}return function(){return t.apply(e,arguments)}}function Ht(t,e,n){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?Ht=_G:Ht=wG,Ht.apply(null,arguments)}function Lc(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(this,r)}}function Dt(t,e){function n(){}n.prototype=e.prototype,t.$=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.ac=function(r,s,i){for(var o=Array(arguments.length-2),a=2;a<arguments.length;a++)o[a-2]=arguments[a];return e.prototype[s].apply(r,o)}}function js(){this.s=this.s,this.o=this.o}var EG=0;js.prototype.s=!1;js.prototype.sa=function(){!this.s&&(this.s=!0,this.N(),EG!=0)&&vG(this)};js.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const JA=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(typeof t=="string")return typeof e!="string"||e.length!=1?-1:t.indexOf(e,0);for(let n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1};function Ag(t){const e=t.length;if(0<e){const n=Array(e);for(let r=0;r<e;r++)n[r]=t[r];return n}return[]}function Qw(t,e){for(let n=1;n<arguments.length;n++){const r=arguments[n];if(jh(r)){const s=t.length||0,i=r.length||0;t.length=s+i;for(let o=0;o<i;o++)t[s+o]=r[o]}else t.push(r)}}function jt(t,e){this.type=t,this.g=this.target=e,this.defaultPrevented=!1}jt.prototype.h=function(){this.defaultPrevented=!0};var bG=function(){if(!Te.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{const n=()=>{};Te.addEventListener("test",n,e),Te.removeEventListener("test",n,e)}catch{}return t}();function yl(t){return/^[\s\xa0]*$/.test(t)}function Wh(){var t=Te.navigator;return t&&(t=t.userAgent)?t:""}function pr(t){return Wh().indexOf(t)!=-1}function Rg(t){return Rg[" "](t),t}Rg[" "]=function(){};function TG(t,e){var n=m8;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}var IG=pr("Opera"),xo=pr("Trident")||pr("MSIE"),ZA=pr("Edge"),Pp=ZA||xo,eR=pr("Gecko")&&!(Wh().toLowerCase().indexOf("webkit")!=-1&&!pr("Edge"))&&!(pr("Trident")||pr("MSIE"))&&!pr("Edge"),AG=Wh().toLowerCase().indexOf("webkit")!=-1&&!pr("Edge");function tR(){var t=Te.document;return t?t.documentMode:void 0}var Cp;e:{var ud="",hd=function(){var t=Wh();if(eR)return/rv:([^\);]+)(\)|;)/.exec(t);if(ZA)return/Edge\/([\d\.]+)/.exec(t);if(xo)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(AG)return/WebKit\/(\S+)/.exec(t);if(IG)return/(?:Version)[ \/]?(\S+)/.exec(t)}();if(hd&&(ud=hd?hd[1]:""),xo){var fd=tR();if(fd!=null&&fd>parseFloat(ud)){Cp=String(fd);break e}}Cp=ud}var Sp;if(Te.document&&xo){var Xw=tR();Sp=Xw||parseInt(Cp,10)||void 0}else Sp=void 0;var RG=Sp;function _l(t,e){if(jt.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(eR){e:{try{Rg(e.nodeName);var s=!0;break e}catch{}s=!1}s||(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:PG[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&_l.$.h.call(this)}}Dt(_l,jt);var PG={2:"touch",3:"pen",4:"mouse"};_l.prototype.h=function(){_l.$.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var Jl="closure_listenable_"+(1e6*Math.random()|0),CG=0;function SG(t,e,n,r,s){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.la=s,this.key=++CG,this.fa=this.ia=!1}function Yh(t){t.fa=!0,t.listener=null,t.proxy=null,t.src=null,t.la=null}function Pg(t,e,n){for(const r in t)e.call(n,t[r],r,t)}function DG(t,e){for(const n in t)e.call(void 0,t[n],n,t)}function nR(t){const e={};for(const n in t)e[n]=t[n];return e}const Jw="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
1557ing toString valueOf".split(" ");function rR(t,e){let n,r;for(let s=1;s<arguments.length;s++){r=arguments[s];for(n in r)t[n]=r[n];for(let i=0;i<Jw.length;i++)n=Jw[i],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function qh(t){this.src=t,this.g={},this.h=0}qh.prototype.add=function(t,e,n,r,s){var i=t.toString();t=this.g[i],t||(t=this.g[i]=[],this.h++);var o=kp(t,e,r,s);return-1<o?(e=t[o],n||(e.ia=!1)):(e=new SG(e,this.src,i,!!r,s),e.ia=n,t.push(e)),e};function Dp(t,e){var n=e.type;if(n in t.g){var r=t.g[n],s=JA(r,e),i;(i=0<=s)&&Array.prototype.splice.call(r,s,1),i&&(Yh(e),t.g[n].length==0&&(delete t.g[n],t.h--))}}function kp(t,e,n,r){for(var s=0;s<t.length;++s){var i=t[s];if(!i.fa&&i.listener==e&&i.capture==!!n&&i.la==r)return s}return-1}var Cg="closure_lm_"+(1e6*Math.random()|0),dd={};function sR(t,e,n,r,s){if(r&&r.once)return oR(t,e,n,r,s);if(Array.isArray(e)){for(var i=0;i<e.length;i++)sR(t,e[i],n,r,s);return null}return n=kg(n),t&&t[Jl]?t.O(e,n,Xl(r)?!!r.capture:!!r,s):iR(t,e,n,!1,r,s)}function iR(t,e,n,r,s,i){if(!e)throw Error("Invalid event type");var o=Xl(s)?!!s.capture:!!s,a=Dg(t);if(a||(t[Cg]=a=new qh(t)),n=a.add(e,n,r,o,i),n.proxy)return n;if(r=kG(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)bG||(s=o),s===void 0&&(s=!1),t.addEventListener(e.toString(),r,s);else if(t.attachEvent)t.attachEvent(lR(e.toString()),r);else if(t.addListener&&t.removeListener)t.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function kG(){function t(n){return e.call(t.src,t.listener,n)}const e=OG;return t}function oR(t,e,n,r,s){if(Array.isArray(e)){for(var i=0;i<e.length;i++)oR(t,e[i],n,r,s);return null}return n=kg(n),t&&t[Jl]?t.P(e,n,Xl(r)?!!r.capture:!!r,s):iR(t,e,n,!0,r,s)}function aR(t,e,n,r,s){if(Array.isArray(e))for(var i=0;i<e.length;i++)aR(t,e[i],n,r,s);else r=Xl(r)?!!r.capture:!!r,n=kg(n),t&&t[Jl]?(t=t.i,e=String(e).toString(),e in t.g&&(i=t.g[e],n=kp(i,n,r,s),-1<n&&(Yh(i[n]),Array.prototype.splice.call(i,n,1),i.length==0&&(delete t.g[e],t.h--)))):t&&(t=Dg(t))&&(e=t.g[e.toString()],t=-1,e&&(t=kp(e,n,r,s)),(n=-1<t?e[t]:null)&&Sg(n))}function Sg(t){if(typeof t!="number"&&t&&!t.fa){var e=t.src;if(e&&e[Jl])Dp(e.i,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(lR(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=Dg(e))?(Dp(n,t),n.h==0&&(n.src=null,e[Cg]=null)):Yh(t)}}}function lR(t){return t in dd?dd[t]:dd[t]="on"+t}function OG(t,e){if(t.fa)t=!0;else{e=new _l(e,this);var n=t.listener,r=t.la||t.src;t.ia&&Sg(t),t=n.call(r,e)}return t}function Dg(t){return t=t[Cg],t instanceof qh?t:null}var pd="__closure_events_fn_"+(1e9*Math.random()>>>0);function kg(t){return typeof t=="function"?t:(t[pd]||(t[pd]=function(e){return t.handleEvent(e)}),t[pd])}function St(){js.call(this),this.i=new qh(this),this.S=this,this.J=null}Dt(St,js);St.prototype[Jl]=!0;St.prototype.removeEventListener=function(t,e,n,r){aR(this,t,e,n,r)};function Lt(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 jt(e,t);else if(e instanceof jt)e.target=e.target||t;else{var s=e;e=new jt(r,t),rR(e,s)}if(s=!0,n)for(var i=n.length-1;0<=i;i--){var o=e.g=n[i];s=xc(o,r,!0,e)&&s}if(o=e.g=t,s=xc(o,r,!0,e)&&s,s=xc(o,r,!1,e)&&s,n)for(i=0;i<n.length;i++)o=e.g=n[i],s=xc(o,r,!1,e)&&s}St.prototype.N=function(){if(St.$.N.call(this),this.i){var t=this.i,e;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Yh(n[r]);delete t.g[e],t.h--}}this.J=null};St.prototype.O=function(t,e,n,r){return this.i.add(String(t),e,!1,n,r)};St.prototype.P=function(t,e,n,r){return this.i.add(String(t),e,!0,n,r)};function xc(t,e,n,r){if(e=t.i.g[String(e)],!e)return!0;e=e.concat();for(var s=!0,i=0;i<e.length;++i){var o=e[i];if(o&&!o.fa&&o.capture==n){var a=o.listener,l=o.la||o.src;o.ia&&Dp(t.i,o),s=a.call(l,r)!==!1&&s}}return s&&!r.defaultPrevented}var Og=Te.JSON.stringify;class MG{constructor(e,n){this.i=e,this.j=n,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}function NG(){var t=Mg;let e=null;return t.g&&(e=t.g,t.g=t.g.next,t.g||(t.h=null),e.next=null),e}class LG{constructor(){this.h=this.g=null}add(e,n){const r=cR.get();r.set(e,n),this.h?this.h.next=r:this.g=r,this.h=r}}var cR=new MG(()=>new xG,t=>t.reset());class xG{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 VG(t){var e=1;t=t.split(":");const n=[];for(;0<e&&t.length;)n.push(t.shift()),e--;return t.length&&n.push(t.join(":")),n}function $G(t){Te.setTimeout(()=>{throw t},0)}let wl,El=!1,Mg=new LG,uR=()=>{const t=Te.Promise.resolve(void 0);wl=()=>{t.then(FG)}};var FG=()=>{for(var t;t=NG();){try{t.h.call(t.g)}catch(n){$G(n)}var e=cR;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}El=!1};function Kh(t,e){St.call(this),this.h=t||1,this.g=e||Te,this.j=Ht(this.qb,this),this.l=Date.now()}Dt(Kh,St);re=Kh.prototype;re.ga=!1;re.T=null;re.qb=function(){if(this.ga){var t=Date.now()-this.l;0<t&&t<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-t):(this.T&&(this.g.clearTimeout(this.T),this.T=null),Lt(this,"tick"),this.ga&&(Ng(this),this.start()))}};re.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())};function Ng(t){t.ga=!1,t.T&&(t.g.clearTimeout(t.T),t.T=null)}re.N=function(){Kh.$.N.call(this),Ng(this),delete this.g};function Lg(t,e,n){if(typeof t=="function")n&&(t=Ht(t,n));else if(t&&typeof t.handleEvent=="function")t=Ht(t.handleEvent,t);else throw Error("Invalid listener argument");return 2147483647<Number(e)?-1:Te.setTimeout(t,e||0)}function hR(t){t.g=Lg(()=>{t.g=null,t.i&&(t.i=!1,hR(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class UG extends js{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:hR(this)}N(){super.N(),this.g&&(Te.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function bl(t){js.call(this),this.h=t,this.g={}}Dt(bl,js);var Zw=[];function fR(t,e,n,r){Array.isArray(n)||(n&&(Zw[0]=n.toString()),n=Zw);for(var s=0;s<n.length;s++){var i=sR(e,n[s],r||t.handleEvent,!1,t.h||t);if(!i)break;t.g[i.key]=i}}function dR(t){Pg(t.g,function(e,n){this.g.hasOwnProperty(n)&&Sg(e)},t),t.g={}}bl.prototype.N=function(){bl.$.N.call(this),dR(this)};bl.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};function zh(){this.g=!0}zh.prototype.Ea=function(){this.g=!1};function BG(t,e,n,r,s,i){t.info(function(){if(t.g)if(i)for(var o="",a=i.split("&"),l=0;l<a.length;l++){var c=a[l].split("=");if(1<c.length){var u=c[0];c=c[1];var h=u.split("_");o=2<=h.length&&h[1]=="type"?o+(u+"="+c+"&"):o+(u+"=redacted&")}}else o=null;else o=i;return"XMLHTTP REQ ("+r+") [attempt "+s+"]: "+e+`
1558`+n+`
1559`+o})}function HG(t,e,n,r,s,i,o){t.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+s+"]: "+e+`
1560`+n+`
1561`+i+" "+o})}function to(t,e,n,r){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+WG(t,n)+(r?" "+r:"")})}function jG(t,e){t.info(function(){return"TIMEOUT: "+e})}zh.prototype.info=function(){};function WG(t,e){if(!t.g)return e;if(!e)return null;try{var n=JSON.parse(e);if(n){for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(2>r.length)){var s=r[1];if(Array.isArray(s)&&!(1>s.length)){var i=s[0];if(i!="noop"&&i!="stop"&&i!="close")for(var o=1;o<s.length;o++)s[o]=""}}}}return Og(n)}catch{return e}}var Ui={},eE=null;function Gh(){return eE=eE||new St}Ui.Ta="serverreachability";function pR(t){jt.call(this,Ui.Ta,t)}Dt(pR,jt);function Tl(t){const e=Gh();Lt(e,new pR(e))}Ui.STAT_EVENT="statevent";function mR(t,e){jt.call(this,Ui.STAT_EVENT,t),this.stat=e}Dt(mR,jt);function Zt(t){const e=Gh();Lt(e,new mR(e,t))}Ui.Ua="timingevent";function gR(t,e){jt.call(this,Ui.Ua,t),this.size=e}Dt(gR,jt);function Zl(t,e){if(typeof t!="function")throw Error("Fn must not be null and must be a function");return Te.setTimeout(function(){t()},e)}var Qh={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9}
1561,vR={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function xg(){}xg.prototype.h=null;function tE(t){return t.h||(t.h=t.i())}function yR(){}var ec={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function Vg(){jt.call(this,"d")}Dt(Vg,jt);function $g(){jt.call(this,"c")}Dt($g,jt);var Op;function Xh(){}Dt(Xh,xg);Xh.prototype.g=function(){return new XMLHttpRequest};Xh.prototype.i=function(){return{}};Op=new Xh;function tc(t,e,n,r){this.l=t,this.j=e,this.m=n,this.W=r||1,this.U=new bl(this),this.P=YG,t=Pp?125:void 0,this.V=new Kh(t),this.I=null,this.i=!1,this.u=this.B=this.A=this.L=this.G=this.Y=this.C=null,this.F=[],this.g=null,this.o=0,this.s=this.v=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new _R}function _R(){this.i=null,this.g="",this.h=!1}var YG=45e3,wR={},Mp={};re=tc.prototype;re.setTimeout=function(t){this.P=t};function Np(t,e,n){t.L=1,t.A=Zh(Qr(e)),t.u=n,t.S=!0,ER(t,null)}function ER(t,e){t.G=Date.now(),nc(t),t.B=Qr(t.A);var n=t.B,r=t.W;Array.isArray(r)||(r=[String(r)]),SR(n.i,"t",r),t.o=0,n=t.l.J,t.h=new _R,t.g=QR(t.l,n?e:null,!t.u),0<t.O&&(t.M=new UG(Ht(t.Pa,t,t.g),t.O)),fR(t.U,t.g,"readystatechange",t.nb),e=t.I?nR(t.I):{},t.u?(t.v||(t.v="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.g.ha(t.B,t.v,t.u,e)):(t.v="GET",t.g.ha(t.B,t.v,null,e)),Tl(),BG(t.j,t.v,t.B,t.m,t.W,t.u)}re.nb=function(t){t=t.target;const e=this.M;e&&vr(t)==3?e.l():this.Pa(t)};re.Pa=function(t){try{if(t==this.g)e:{const u=vr(this.g);var e=this.g.Ia();const h=this.g.da();if(!(3>u)&&(u!=3||Pp||this.g&&(this.h.h||this.g.ja()||iE(this.g)))){this.J||u!=4||e==7||(e==8||0>=h?Tl(3):Tl(2)),Jh(this);var n=this.g.da();this.ca=n;t:if(bR(this)){var r=iE(this.g);t="";var s=r.length,i=vr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){oi(this),Wa(this);var o="";break t}this.h.i=new Te.TextDecoder}for(e=0;e<s;e++)this.h.h=!0,t+=this.h.i.decode(r[e],{stream:i&&e==s-1});r.length=0,this.h.g+=t,this.o=0,o=this.h.g}else o=this.g.ja();if(this.i=n==200,HG(this.j,this.v,this.B,this.m,this.W,u,n),this.i){if(this.aa&&
1561!this.K){t:{if(this.g){var a,l=this.g;if((a=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!yl(a)){var c=a;break t}}c=null}if(n=c)to(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,Lp(this,n);else{this.i=!1,this.s=3,Zt(12),oi(this),Wa(this);break e}}this.S?(TR(this,u,o),Pp&&this.i&&u==3&&(fR(this.U,this.V,"tick",this.mb),this.V.start())):(to(this.j,this.m,o,null),Lp(this,o)),u==4&&oi(this),this.i&&!this.J&&(u==4?qR(this.l,this):(this.i=!1,nc(this)))}else f8(this.g),n==400&&0<o.indexOf("Unknown SID")?(this.s=3,Zt(12)):(this.s=0,Zt(13)),oi(this),Wa(this)}}}catch{}finally{}};function bR(t){return t.g?t.v=="GET"&&t.L!=2&&t.l.Ha:!1}function TR(t,e,n){let r=!0,s;for(;!t.J&&t.o<n.length;)if(s=qG(t,n),s==Mp){e==4&&(t.s=4,Zt(14),r=!1),to(t.j,t.m,null,"[Incomplete Response]");break}else if(s==wR){t.s=4,Zt(15),to(t.j,t.m,n,"[Invalid Chunk]"),r=!1;break}else to(t.j,t.m,s,null),Lp(t,s);bR(t)&&t.o!=0&&(t.h.g=t.h.g.slice(t.o),t.o=0),e!=4||n.length!=0||t.h.h||(t.s=1,Zt(16),r=!1),t.i=t.i&&r,r?0<n.length&&!t.ba&&(t.ba=!0,e=t.l,e.g==t&&e.ca&&!e.M&&(e.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),Wg(e),e.M=!0,Zt(11))):(to(t.j,t.m,n,"[Invalid Chunked Response]"),oi(t),Wa(t))}re.mb=function(){if(this.g){var t=vr(this.g),e=this.g.ja();this.o<e.length&&(Jh(this),TR(this,t,e),this.i&&t!=4&&nc(this))}};function qG(t,e){var n=t.o,r=e.indexOf(`
1562`,n);return r==-1?Mp:(n=Number(e.substring(n,r)),isNaN(n)?wR:(r+=1,r+n>e.length?Mp:(e=e.slice(r,r+n),t.o=r+n,e)))}re.cancel=function(){this.J=!0,oi(this)};function nc(t){t.Y=Date.now()+t.P,IR(t,t.P)}function IR(t,e){if(t.C!=null)throw Error("WatchDog timer not null");t.C=Zl(Ht(t.lb,t),e)}function Jh(t){t.C&&(Te.clearTimeout(t.C),t.C=null)}re.lb=function(){this.C=null;const t=Date.now();0<=t-this.Y?(jG(this.j,this.B),this.L!=2&&(Tl(),Zt(17)),oi(this),this.s=2,Wa(this)):IR(this,this.Y-t)};function Wa(t){t.l.H==0||t.J||qR(t.l,t)}function oi(t){Jh(t);var e=t.M;e&&typeof e.sa=="function"&&e.sa(),t.M=null,Ng(t.V),dR(t.U),t.g&&(e=t.g,t.g=null,e.abort(),e.sa())}function Lp(t,e){try{var n=t.l;if(n.H!=0&&(n.g==t||xp(n.i,t))){if(!t.K&&xp(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 s=r;if(s[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3<t.G)Xu(n),rf(n);else break e;jg(n),Zt(18)}}else n.Fa=s[1],0<n.Fa-n.V&&37500>s[2]&&n.G&&n.A==0&&!n.v&&(n.v=Zl(Ht(n.ib,n),6e3));if(1>=OR(n.i)&&n.oa){try{n.oa()}catch{}n.oa=void 0}}else ai(n,11)}else if((t.K||n.g==t)&&Xu(n),!yl(e))for(s=n.Ja.g.parse(e),e=0;e<s.length;e++){let c=s[e];if(n.V=c[0],c=c[1],n.H==2)if(c[0]=="c"){n.K=c[1],n.pa=c[2];const u=c[3];u!=null&&(n.ra=u,n.l.info("VER="+n.ra));const h=c[4];h!=null&&(n.Ga=h,n.l.info("SVER="+n.Ga));const f=c[5];f!=null&&typeof f=="number"&&0<f&&(r=1.5*f,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;const d=t.g;if(d){const p=d.g?d.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(p){var i=r.i;i.g||p.indexOf("spdy")==-1&&p.indexOf("quic")==-1&&p.indexOf("h2")==-1||(i.j=i.l,i.g=new Set,i.h&&(Fg(i,i.h),i.h=null))}if(r.F){const v=d.g?d.g.getResponseHeader("X-HTTP-Session-Id"):null;v&&(r.Da=v,rt(r.I,r.F,v))}}n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-t.G,n.l.info("Handshake RTT: "+n.S+"ms")),r=n;var o=t;if(r.wa=GR(r,r.J?r.pa:null,r.Y),o.K){MR(r.i,o);var a=o,l=r.L;l&&a.setTimeout(l),a.C&&(Jh(a),nc(a)),r.g=o}else WR(r);0<n.j.length&&sf(n)}else c[0]!="stop"&&c[0]!="close"||ai(n,7);else n.H==3&&(c[0]=="stop"||c[0]=="close"?c[0]=="stop"?ai(n,7):Hg(n):c[0]!="noop"&&n.h&&n.h.Aa(c),n.A=0)}}Tl(4)}catch{}}function KG(t){if(t.Z&&typeof t.Z=="function")return t.Z();if(typeof Map<"u"&&t instanceof Map||typeof Set<"u"&&t instanceof Set)return Array.from(t.values());if(typeof t=="string")return t.split("");if(jh(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}e=[],n=0;for(r in t)e[n++]=t[r];return e}function zG(t){if(t.ta&&typeof t.ta=="function")return t.ta();if(!t.Z||typeof t.Z!="function"){if(typeof Map<"u"&&t instanceof Map)return Array.from(t.keys());if(!(typeof Set<"u"&&t instanceof Set)){if(jh(t)||typeof t=="string"){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}e=[],n=0;for(const r in t)e[n++]=r;return e}}}function AR(t,e){if(t.forEach&&typeof t.forEach=="function")t.forEach(e,void 0);else if(jh(t)||typeof t=="string")Array.prototype.forEach.call(t,e,void 0);else for(var n=zG(t),r=KG(t),s=r.length,i=0;i<s;i++)e.call(void 0,r[i],n&&n[i],t)}var RR=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function GG(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),s=null;if(0<=r){var i=t[n].substring(0,r);s=t[n].substring(r+1)}else i=t[n];e(i,s?decodeURIComponent(s.replace(/\+/g," ")):"")}}}function mi(t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,t instanceof mi){this.h=t.h,Gu(this,t.j),this.s=t.s,this.g=t.g,Qu(this,t.m),this.l=t.l;var e=t.i,n=new Il;n.i=e.i,e.g&&(n.g=new Map(e.g),n.h=e.h),nE(this,n),this.o=t.o}else t&&(e=String(t).match(RR))?(this.h=!1,Gu(this,e[1]||"",!0),this.s=Sa(e[2]||""),this.g=Sa(e[3]||"",!0),Qu(this,e[4]),this.l=Sa(e[5]||"",!0),nE(this,e[6]||"",!0),this.o=Sa(e[7]||"")):(this.h=!1,this.i=new Il(null,this.h))}mi.prototype.toString=function(){var t=[],e=this.j;e&&t.push(Da(e,rE,!0),":");var n=this.g;
vendor: 2,030 bytes, line 1562
1562return(n||e=="file")&&(t.push("//"),(e=this.s)&&t.push(Da(e,rE,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n=this.m,n!=null&&t.push(":",String(n))),(n=this.l)&&(this.g&&n.charAt(0)!="/"&&t.push("/"),t.push(Da(n,n.charAt(0)=="/"?JG:XG,!0))),(n=this.i.toString())&&t.push("?",n),(n=this.o)&&t.push("#",Da(n,e8)),t.join("")};function Qr(t){return new mi(t)}function Gu(t,e,n){t.j=n?Sa(e,!0):e,t.j&&(t.j=t.j.replace(/:$/,""))}function Qu(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.m=e}else t.m=null}function nE(t,e,n){e instanceof Il?(t.i=e,t8(t.i,t.h)):(n||(e=Da(e,ZG)),t.i=new Il(e,t.h))}function rt(t,e,n){t.i.set(e,n)}function Zh(t){return rt(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function Sa(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Da(t,e,n){return typeof t=="string"?(t=encodeURI(t).replace(e,QG),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function QG(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var rE=/[#\/\?@]/g,XG=/[#\?:]/g,JG=/[#\?]/g,ZG=/[#\?@]/g,e8=/#/g;function Il(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function Ws(t){t.g||(t.g=new Map,t.h=0,t.i&&GG(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}re=Il.prototype;re.add=function(t,e){Ws(this),this.i=null,t=ra(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this};function PR(t,e){Ws(t),e=ra(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function CR(t,e){return Ws(t),e=ra(t,e),t.g.has(e)}re.forEach=function(t,e){Ws(this),this.g.forEach(function(n,r){n.forEach(function(s){t.call(e,s,r,this)},this)},this)};re.ta=function(){Ws(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r<e.length;r++){const s=t[r];for(let i=0;i<s.length;i++)n.push(e[r])}return n};re.Z=function(t){Ws(this);let e=[];
1562if(typeof t=="string")CR(this,t)&&(e=e.concat(this.g.get(ra(this,t))));else{t=Array.from(this.g.values());for(let n=0;n<t.length;n++)e=e.concat(t[n])}return e};re.set=function(t,e){return Ws(this),this.i=null,t=ra(this,t),CR(this,t)&&(this.h-=this.g.get(t).length),this.g.set(t,[e]),this.h+=1,this};re.get=function(t,e){return t?(t=this.Z(t),0<t.length?String(t[0]):e):e};function SR(t,e,n){PR(t,e),0<n.length&&(t.i=null,t.g.set(ra(t,e),Ag(n)),t.h+=n.length)}re.toString=function(){if(this.i)return this.i;if(!this.g)return"";const t=[],e=Array.from(this.g.keys());for(var n=0;n<e.length;n++){var r=e[n];const i=encodeURIComponent(String(r)),o=this.Z(r);for(r=0;r<o.length;r++){var s=i;o[r]!==""&&(s+="="+encodeURIComponent(String(o[r]))),t.push(s)}}return this.i=t.join("&")};function ra(t,e){return e=String(e),t.j&&(e=e.toLowerCase()),e}function t8(t,e){e&&!t.j&&(Ws(t),t.i=null,t.g.forEach(function(n,r){var s=r.toLowerCase();r!=s&&(PR(this,r),SR(this,s,n))},t)),t.j=e}var n8=class{constructor(t,e){this.g=t,this.map=e}};function DR(t){this.l=t||r8,Te.PerformanceNavigationTiming?(t=Te.performance.getEntriesByType("navigation"),t=0<t.length&&(t[0].nextHopProtocol=="hq"||t[0].nextHopProtocol=="h2")):t=!!(Te.g&&Te.g.Ka&&Te.g.Ka()&&Te.g.Ka().dc),this.j=t?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var r8=10;function kR(t){return t.h?!0:t.g?t.g.size>=t.j:!1}function OR(t){return t.h?1:t.g?t.g.size:0}function xp(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function Fg(t,e){t.g?t.g.add(e):t.h=e}function MR(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}DR.prototype.cancel=function(){if(this.i=NR(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 NR(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 Ag(t.i)}var s8=class{stringify(t){return Te.JSON.stringify(t,void 0)}parse(t){return Te.JSON.parse(t,void 0)}};function i8(){this.g=new s8}function o8(t,e,n){const r=n||"";try{AR(t,function(s,i){let o=s;Xl(s)&&(o=Og(s)),e.push(r+i+"="+encodeURIComponent(o))})}catch(s){throw e.push(r+"type="+encodeURIComponent("_badmap")),s}}function a8(t,e){const n=new zh;if(Te.Image){const r=new Image;r.onload=Lc(Vc,n,r,"TestLoadImage: loaded",!0,e),r.onerror=Lc(Vc,n,r,"TestLoadImage: error",!1,e),r.onabort=Lc(Vc,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=Lc(Vc,n,r,"TestLoadImage: timeout",!1,e),Te.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}function Vc(t,e,n,r,s){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,s(r)}catch{}}function ef(t){this.l=t.ec||null,this.j=t.ob||!1}Dt(ef,xg);ef.prototype.g=function(){return new tf(this.l,this.j)};ef.prototype.i=function(t){return function(){return t}}({});function tf(t,e){St.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=Ug,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}Dt(tf,St);var Ug=0;re=tf.prototype;re.open=function(t,e){if(this.readyState!=Ug)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Al(this)};re.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||Te).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))};re.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,rc(this)),this.readyState=Ug};re.$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,Al(this)),this.g&&(this.readyState=3,Al(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof Te.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;LR(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))};function LR(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}re.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?rc(this):Al(this),this.readyState==3&&LR(this)}};re.Za=function(t){this.g&&(this.response=this.responseText=t,rc(this))};re.Ya=function(t){this.g&&(this.response=t,rc(this))};re.ka=function(){this.g&&rc(this)};function rc(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Al(t)}re.setRequestHeader=function(t,e){this.v.append(t,e)};re.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};re.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
1563`)};function Al(t){t.onreadystatechange&&t.onreadystatechange.call(t)}Object.defineProperty(tf.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(t){this.m=t?"include":"same-origin"}});var l8=Te.JSON.parse;function pt(t){St.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=xR,this.L=this.M=!1}Dt(pt,St);var xR="",c8=/^https?$/i,u8=["POST","PUT"];re=pt.prototype;re.Oa=function(t){this.M=t};re.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():Op.g(),this.C=this.u?tE(this.u):tE(Op),this.g.onreadystatechange=Ht(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(i){sE(this,i);return}if(t=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var s in r)n.set(s,r[s]);else if(typeof r.keys=="function"&&typeof r.get=="function")for(const i of r.keys())n.set(i,r.get(i));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(i=>i.toLowerCase()=="content-type"),s=Te.FormData&&t instanceof Te.FormData,!(0<=JA(u8,e))||r||s||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[i,o]of n)this.g.setRequestHeader(i,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{FR(this),0<this.B&&((this.L=h8(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Ht(this.ua,this)):this.A=Lg(this.ua,this.B,this)),this.v=!0,this.g.send(t),this.v=!1}catch(i){sE(this,i)}};function h8(t){return xo&&typeof t.timeout=="number"&&t.ontimeout!==void 0}re.ua=function(){typeof Ig<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Lt(this,"timeout"),this.abort(8))};function sE(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,VR(t),nf(t)}function VR(t){t.F||(t.F=!0,Lt(t,"complete"),Lt(t,"error"))}re.abort=function(t){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=t||7,Lt(this,"complete"),Lt(this,"abort"),nf(this))};re.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),nf(this,!0)),pt.$.N.call(this)};re.La=function(){this.s||(this.G||this.v||this.l?$R(this):this.kb())};re.kb=function(){$R(this)};function $R(t){if(t.h&&typeof Ig<"u"&&(!t.C[1]||vr(t)!=4||t.da()!=2)){if(t.v&&vr(t)==4)Lg(t.La,0,t);else if(Lt(t,"readystatechange"),vr(t)==4){t.h=!1;try{const o=t.da();e:switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var n;if(!(n=e)){var r;if(r=o===0){var s=String(t.I).match(RR)[1]||null;!s&&Te.self&&Te.self.location&&(s=Te.self.location.protocol.slice(0,-1)),r=!c8.test(s?s.toLowerCase():"")}n=r}if(n)Lt(t,"complete"),Lt(t,"success");else{t.m=6;try{var i=2<vr(t)?t.g.statusText:""}catch{i=""}t.j=i+" ["+t.da()+"]",VR(t)}}finally{nf(t)}}}}function nf(t,e){if(t.g){FR(t);const n=t.g,r=t.C[0]?()=>{}:null;t.g=null,t.C=null,e||Lt(t,"ready");try{n.onreadystatechange=r}catch{}}}function FR(t){t.g&&t.L&&(t.g.ontimeout=null),t.A&&(Te.clearTimeout(t.A),t.A=null)}re.isActive=function(){return!!this.g};function vr(t){return t.g?t.g.readyState:0}re.da=function(){try{return 2<vr(this)?this.g.status:-1}catch{return-1}};re.ja=function(){try{return this.g?this.g.responseText:""}catch{return""}};re.Wa=function(t){if(this.g){var e=this.g.responseText;return t&&e.indexOf(t)==0&&(e=e.substring(t.length)),l8(e)}};function iE(t){try{if(!t.g)return null;if("response"in t.g)return t.g.response;switch(t.K){case xR:case"text":return t.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in t.g)return t.g.mozResponseArrayBuffer}return null}catch{return null}}function f8(t){const e={};t=(t.g&&2<=vr(t)&&t.g.getAllResponseHeaders()||"").split(`\r
1564`);for(let r=0;r<t.length;r++){if(yl(t[r]))continue;var n=VG(t[r]);const s=n[0];
vendor: 20,387 bytes, lines 1564-1569
1564if(n=n[1],typeof n!="string")continue;n=n.trim();const i=e[s]||[];e[s]=i,i.push(n)}DG(e,function(r){return r.join(", ")})}re.Ia=function(){return this.m};re.Sa=function(){return typeof this.j=="string"?this.j:String(this.j)};function UR(t){let e="";return Pg(t,function(n,r){e+=r,e+=":",e+=n,e+=`\r
1565`}),e}function Bg(t,e,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=UR(n),typeof t=="string"?n!=null&&encodeURIComponent(String(n)):rt(t,e,n))}function ya(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function BR(t){this.Ga=0,this.j=[],this.l=new zh,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=ya("failFast",!1,t),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=ya("baseRetryDelayMs",5e3,t),this.hb=ya("retryDelaySeedMs",1e4,t),this.eb=ya("forwardChannelMaxRetries",2,t),this.xa=ya("forwardChannelRequestTimeoutMs",2e4,t),this.va=t&&t.xmlHttpFactory||void 0,this.Ha=t&&t.useFetchStreams||!1,this.L=void 0,this.J=t&&t.supportsCrossDomainXhr||!1,this.K="",this.i=new DR(t&&t.concurrentRequestLimit),this.Ja=new i8,this.P=t&&t.fastHandshake||!1,this.O=t&&t.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=t&&t.bc||!1,t&&t.Ea&&this.l.Ea(),t&&t.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&t&&t.detectBufferingProxy||!1,this.qa=void 0,t&&t.longPollingTimeout&&0<t.longPollingTimeout&&(this.qa=t.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}re=BR.prototype;re.ra=8;re.H=1;function Hg(t){if(HR(t),t.H==3){var e=t.W++,n=Qr(t.I);if(rt(n,"SID",t.K),rt(n,"RID",e),rt(n,"TYPE","terminate"),sc(t,n),e=new tc(t,t.l,e),e.L=2,e.A=Zh(Qr(n)),n=!1,Te.navigator&&Te.navigator.sendBeacon)try{n=Te.navigator.sendBeacon(e.A.toString(),"")}catch{}!n&&Te.Image&&(new Image().src=e.A,n=!0),n||(e.g=QR(e.l,null),e.g.ha(e.A)),e.G=Date.now(),nc(e)}zR(t)}function rf(t){t.g&&(Wg(t),t.g.cancel(),t.g=null)}function HR(t){rf(t),t.u&&(Te.clearTimeout(t.u),t.u=null),Xu(t),t.i.cancel(),t.m&&(typeof t.m=="number"&&Te.clearTimeout(t.m),t.m=null)}function sf(t){if(!kR(t.i)&&!t.m){t.m=!0;var e=t.Na;wl||uR(),El||(wl(),El=!0),Mg.add(e,t),t.C=0}}function d8(t,e){return OR(t.i)>=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=Zl(Ht(t.Na,t,e),KR(t,t.C)),t.C++,!0)}re.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 s=new tc(this,this.l,t);let i=this.s;if(this.U&&(i?(i=nR(i),rR(i,this.U)):i=this.U),this.o!==null||this.O||(s.I=i,i=null),this.P)e:{for(var e=0,n=0;n<this.j.length;n++){t:{var r=this.j[n];if("__data__"in r.map&&(r=r.map.__data__,typeof r=="string")){r=r.length;break t}r=void 0}if(r===void 0)break;if(e+=r,4096<e){e=n;break e}if(e===4096||n===this.j.length-1){e=n+1;break e}}e=1e3}else e=1e3;e=jR(this,s,e),n=Qr(this.I),rt(n,"RID",t),rt(n,"CVER",22),this.F&&rt(n,"X-HTTP-Session-Id",this.F),sc(this,n),i&&(this.O?e="headers="+encodeURIComponent(String(UR(i)))+"&"+e:this.o&&Bg(n,this.o,i)),Fg(this.i,s),this.bb&&rt(n,"TYPE","init"),this.P?(rt(n,"$req",e),rt(n,"SID","null"),s.aa=!0,Np(s,n,null)):Np(s,n,e),this.H=2}}else this.H==3&&(t?oE(this,t):this.j.length==0||kR(this.i)||oE(this))};function oE(t,e){var n;e?n=e.m:n=t.W++;const r=Qr(t.I);rt(r,"SID",t.K),rt(r,"RID",n),rt(r,"AID",t.V),sc(t,r),t.o&&t.s&&Bg(r,t.o,t.s),n=new tc(t,t.l,n,t.C+1),t.o===null&&(n.I=t.s),e&&(t.j=e.F.concat(t.j)),e=jR(t,n,1e3),n.setTimeout(Math.round(.5*t.xa)+Math.round(.5*t.xa*Math.random())),Fg(t.i,n),Np(n,r,e)}function sc(t,e){t.na&&Pg(t.na,function(n,r){rt(e,r,n)}),t.h&&AR({},function(n,r){rt(e,r,n)})}function jR(t,e,n){n=Math.min(t.j.length,n);var r=t.h?Ht(t.h.Va,t.h,t):null;e:{var s=t.j;let i=-1;for(;;){const o=["count="+n];i==-1?0<n?(i=s[0].g,o.push("ofs="+i)):i=0:o.push("ofs="+i);let a=!0;for(let l=0;l<n;l++){let c=s[l].g;const u=s[l].map;if(c-=i,0>c)i=Math.max(0,s[l].g-100),a=!1;else try{o8(u,o,"req"+c+"_")}catch{r&&r(u)}}if(a){r=o.join("&");break e}}}return t=t.j.splice(0,n),e.F=t,r}function WR(t){if(!t.g&&!t.u){t.ba=1;var e=t.Ma;wl||uR(),El||(wl(),El=!0),Mg.add(e,t),t.A=0}}function jg(t){return t.g||t.u||3<=t.A?!1:(t.ba++,t.u=Zl(Ht(t.Ma,t),KR(t,t.A)),t.A++,!0)}re.Ma=function(){if(this.u=null,YR(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=Zl(Ht(this.jb,this),t)}};re.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,Zt(10),rf(this),YR(this))};function Wg(t){t.B!=null&&(Te.clearTimeout(t.B),t.B=null)}function YR(t){t.g=new tc(t,t.l,"rpc",t.ba),t.o===null&&(t.g.I=t.s),t.g.O=0;var e=Qr(t.wa);rt(e,"RID","rpc"),rt(e,"SID",t.K),rt(e,"AID",t.V),rt(e,"CI",t.G?"0":"1"),!t.G&&t.qa&&rt(e,"TO",t.qa),rt(e,"TYPE","xmlhttp"),sc(t,e),t.o&&t.s&&Bg(e,t.o,t.s),t.L&&t.g.setTimeout(t.L);var n=t.g;t=t.pa,n.L=1,n.A=Zh(Qr(e)),n.u=null,n.S=!0,ER(n,t)}re.ib=function(){this.v!=null&&(this.v=null,rf(this),jg(this),Zt(19))};function Xu(t){t.v!=null&&(Te.clearTimeout(t.v),t.v=null)}function qR(t,e){var n=null;if(t.g==e){Xu(t),Wg(t),t.g=null;var r=2}else if(xp(t.i,e))n=e.F,MR(t.i,e),r=1;else return;if(t.H!=0){if(e.i)if(r==1){n=e.u?e.u.length:0,e=Date.now()-e.G;var s=t.C;r=Gh(),Lt(r,new gR(r,n)),sf(t)}else WR(t);else if(s=e.s,s==3||s==0&&0<e.ca||!(r==1&&d8(t,e)||r==2&&jg(t)))switch(n&&0<n.length&&(e=t.i,e.i=e.i.concat(n)),s){case 1:ai(t,5);break;case 4:ai(t,10);break;case 3:ai(t,6);break;default:ai(t,2)}}}function KR(t,e){let n=t.ab+Math.floor(Math.random()*t.hb);return t.isActive()||(n*=2),n*e}function ai(t,e){if(t.l.info("Error code "+e),e==2){var n=null;t.h&&(n=null);var r=Ht(t.pb,t);n||(n=new mi("//www.google.com/images/cleardot.gif"),Te.location&&Te.location.protocol=="http"||Gu(n,"https"),Zh(n)),a8(n.toString(),r)}else Zt(2);t.H=0,t.h&&t.h.za(e),zR(t),HR(t)}re.pb=function(t){t?(this.l.info("Successfully pinged google.com"),Zt(2)):(this.l.info("Failed to ping google.com"),Zt(1))};function zR(t){if(t.H=0,t.ma=[],t.h){const e=NR(t.i);(e.length!=0||t.j.length!=0)&&(Qw(t.ma,e),Qw(t.ma,t.j),t.i.i.length=0,Ag(t.j),t.j.length=0),t.h.ya()}}function GR(t,e,n){var r=n instanceof mi?Qr(n):new mi(n);if(r.g!="")e&&(r.g=e+"."+r.g),Qu(r,r.m);else{var s=Te.location;r=s.protocol,e=e?e+"."+s.hostname:s.hostname,s=+s.port;var i=new mi(null);r&&Gu(i,r),e&&(i.g=e),s&&Qu(i,s),n&&(i.l=n),r=i}return n=t.F,e=t.Da,n&&e&&rt(r,n,e),rt(r,"VER",t.ra),sc(t,r),r}function QR(t,e,n){if(e&&!t.J)throw Error("Can't create secondary domain capable XhrIo object.");return e=t.Ha&&!t.va?new pt(new ef({ob:n})):new pt(t.va),e.Oa(t.J),e}re.isActive=function(){return!!this.h&&this.h.isActive(this)};function XR(){}re=XR.prototype;re.Ba=function(){};re.Aa=function(){};re.za=function(){};re.ya=function(){};re.isActive=function(){return!0};re.Va=function(){};function Ju(){if(xo&&!(10<=Number(RG)))throw Error("Environmental error: no available transport.")}Ju.prototype.g=function(t,e){return new xn(t,e)};function xn(t,e){St.call(this),this.g=new BR(e),this.l=t,this.h=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.g.s=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.Ca&&(t?t["X-WebChannel-Client-Profile"]=e.Ca:t={"X-WebChannel-Client-Profile":e.Ca}),this.g.U=t,(t=e&&e.cc)&&!yl(t)&&(this.g.o=t),this.A=e&&e.supportsCrossDomainXhr||!1,this.v=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!yl(e)&&(this.g.F=e,t=this.h,t!==null&&e in t&&(t=this.h,e in t&&delete t[e])),this.j=new sa(this)}Dt(xn,St);xn.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var t=this.g,e=this.l,n=this.h||void 0;Zt(0),t.Y=e,t.na=n||{},t.G=t.aa,t.I=GR(t,null,t.Y),sf(t)};xn.prototype.close=function(){Hg(this.g)};xn.prototype.u=function(t){var e=this.g;if(typeof t=="string"){var n={};n.__data__=t,t=n}else this.v&&(n={},n.__data__=Og(t),t=n);e.j.push(new n8(e.fb++,t)),e.H==3&&sf(e)};xn.prototype.N=function(){this.g.h=null,delete this.j,Hg(this.g),delete this.g,xn.$.N.call(this)};function JR(t){Vg.call(this),t.__headers__&&(this.headers=t.__headers__,this.statusCode=t.__status__,delete t.__headers__,delete t.__status__);var e=t.__sm__;if(e){e:{for(const n in e){t=n;break e}t=void 0}(this.i=t)&&(t=this.i,e=e!==null&&t in e?e[t]:void 0),this.data=e}else this.data=t}Dt(JR,Vg);function ZR(){$g.call(this),this.status=1}Dt(ZR,$g);function sa(t){this.g=t}Dt(sa,XR);sa.prototype.Ba=function(){Lt(this.g,"a")};sa.prototype.Aa=function(t){Lt(this.g,new JR(t))};sa.prototype.za=function(t){Lt(this.g,new ZR)};sa.prototype.ya=function(){Lt(this.g,"b")};function p8(){this.blockSize=-1}function ir(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}Dt(ir,p8);ir.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0};function md(t,e,n){n||(n=0);var r=Array(16);if(typeof e=="string")for(var s=0;16>s;++s)r[s]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(s=0;16>s;++s)r[s]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],s=t.g[2];var i=t.g[3],o=e+(i^n&(s^i))+r[0]+3614090360&4294967295;e=n+(o<<7&4294967295|o>>>25),o=i+(s^e&(n^s))+r[1]+3905402710&4294967295,i=e+(o<<12&4294967295|o>>>20),o=s+(n^i&(e^n))+r[2]+606105819&4294967295,s=i+(o<<17&4294967295|o>>>15),o=n+(e^s&(i^e))+r[3]+3250441966&4294967295,n=s+(o<<22&4294967295|o>>>10),o=e+(i^n&(s^i))+r[4]+4118548399&4294967295,e=n+(o<<7&4294967295|o>>>25),o=i+(s^e&(n^s))+r[5]+1200080426&4294967295,i=e+(o<<12&4294967295|o>>>20),o=s+(n^i&(e^n))+r[6]+2821735955&4294967295,s=i+(o<<17&4294967295|o>>>15),o=n+(e^s&(i^e))+r[7]+4249261313&4294967295,n=s+(o<<22&4294967295|o>>>10),o=e+(i^n&(s^i))+r[8]+1770035416&4294967295,e=n+(o<<7&4294967295|o>>>25),o=i+(s^e&(n^s))+r[9]+2336552879&4294967295,i=e+(o<<12&4294967295|o>>>20),o=s+(n^i&(e^n))+r[10]+4294925233&4294967295,s=i+(o<<17&4294967295|o>>>15),o=n+(e^s&(i^e))+r[11]+2304563134&4294967295,n=s+(o<<22&4294967295|o>>>10),o=e+(i^n&(s^i))+r[12]+1804603682&4294967295,e=n+(o<<7&4294967295|o>>>25),o=i+(s^e&(n^s))+r[13]+4254626195&4294967295,i=e+(o<<12&4294967295|o>>>20),o=s+(n^i&(e^n))+r[14]+2792965006&4294967295,s=i+(o<<17&4294967295|o>>>15),o=n+(e^s&(i^e))+r[15]+1236535329&4294967295,n=s+(o<<22&4294967295|o>>>10),o=e+(s^i&(n^s))+r[1]+4129170786&4294967295,e=n+(o<<5&4294967295|o>>>27),o=i+(n^s&(e^n))+r[6]+3225465664&4294967295,i=e+(o<<9&4294967295|o>>>23),o=s+(e^n&(i^e))+r[11]+643717713&4294967295,s=i+(o<<14&4294967295|o>>>18),o=n+(i^e&(s^i))+r[0]+3921069994&4294967295,n=s+(o<<20&4294967295|o>>>12),o=e+(s^i&(n^s))+r[5]+3593408605&4294967295,e=n+(o<<5&4294967295|o>>>27),o=i+(n^s&(e^n))+r[10]+38016083&4294967295,i=e+(o<<9&4294967295|o>>>23),o=s+(e^n&(i^e))+r[15]+3634488961&4294967295,s=i+(o<<14&4294967295|o>>>18),o=n+(i^e&(s^i))+r[4]+3889429448&4294967295,n=s+(o<<20&4294967295|o>>>12),o=e+(s^i&(n^s))+r[9]+568446438&4294967295,e=n+(o<<5&4294967295|o>>>27),o=i+(n^s&(e^n))+r[14]+3275163606&4294967295,i=e+(o<<9&4294967295|o>>>23),o=s+(e^n&(i^e))+r[3]+4107603335&4294967295,s=i+(o<<14&4294967295|o>>>18),o=n+(i^e&(s^i))+r[8]+1163531501&4294967295,n=s+(o<<20&4294967295|o>>>12),o=e+(s^i&(n^s))+r[13]+2850285829&4294967295,e=n+(o<<5&4294967295|o>>>27),o=i+(n^s&(e^n))+r[2]+4243563512&4294967295,i=e+(o<<9&4294967295|o>>>23),o=s+(e^n&(i^e))+r[7]+1735328473&4294967295,s=i+(o<<14&4294967295|o>>>18),o=n+(i^e&(s^i))+r[12]+2368359562&4294967295,n=s+(o<<20&4294967295|o>>>12),o=e+(n^s^i)+r[5]+4294588738&4294967295,e=n+(o<<4&4294967295|o>>>28),o=i+(e^n^s)+r[8]+2272392833&4294967295,i=e+(o<<11&4294967295|o>>>21),o=s+(i^e^n)+r[11]+1839030562&4294967295,s=i+(o<<16&4294967295|o>>>16),o=n+(s^i^e)+r[14]+4259657740&4294967295,n=s+(o<<23&4294967295|o>>>9),o=e+(n^s^i)+r[1]+2763975236&4294967295,e=n+(o<<4&4294967295|o>>>28),o=i+(e^n^s)+r[4]+1272893353&4294967295,i=e+(o<<11&4294967295|o>>>21),o=s+(i^e^n)+r[7]+4139469664&4294967295,s=i+(o<<16&4294967295|o>>>16),o=n+(s^i^e)+r[10]+3200236656&4294967295,n=s+(o<<23&4294967295|o>>>9),o=e+(n^s^i)+r[13]+681279174&4294967295,e=n+(o<<4&4294967295|o>>>28),o=i+(e^n^s)+r[0]+3936430074&4294967295,i=e+(o<<11&4294967295|o>>>21),o=s+(i^e^n)+r[3]+3572445317&4294967295,s=i+(o<<16&4294967295|o>>>16),o=n+(s^i^e)+r[6]+76029189&4294967295,n=s+(o<<23&4294967295|o>>>9),o=e+(n^s^i)+r[9]+3654602809&4294967295,e=n+(o<<4&4294967295|o>>>28),o=i+(e^n^s)+r[12]+3873151461&4294967295,i=e+(o<<11&4294967295|o>>>21),o=s+(i^e^n)+r[15]+530742520&4294967295,s=i+(o<<16&4294967295|o>>>16),o=n+(s^i^e)+r[2]+3299628645&4294967295,n=s+(o<<23&4294967295|o>>>9),o=e+(s^(n|~i))+r[0]+4096336452&4294967295,e=n+(o<<6&4294967295|o>>>26),o=i+(n^(e|~s))+r[7]+1126891415&4294967295,i=e+(o<<10&4294967295|o>>>22),o=s+(e^(i|~n))+r[14]+2878612391&4294967295,s=i+(o<<15&4294967295|o>>>17),o=n+(i^(s|~e))+r[5]+4237533241&4294967295,n=s+(o<<21&4294967295|o>>>11),o=e+(s^(n|~i))+r[12]+1700485571&4294967295,e=n+(o<<6&4294967295|o>>>26),o=i+(n^(e|~s))+r[3]+2399980690&4294967295,i=e+(o<<10&4294967295|o>>>22),o=s+(e^(i|~n))+r[10]+4293915773&4294967295,s=i+(o<<15&4294967295|o>>>17),o=n+(i^(s|~e))+r[1]+2240044497&4294967295,n=s+(o<<21&4294967295|o>>>11),o=e+(s^(n|~i))+r[8]+1873313359&4294967295,e=n+(o<<6&4294967295|o>>>26),o=i+(n^(e|~s))+r[15]+4264355552&4294967295,i=e+(o<<10&4294967295|o>>>22),o=s+(e^(i|~n))+r[6]+2734768916&4294967295,s=i+(o<<15&4294967295|o>>>17),o=n+(i^(s|~e))+r[13]+1309151649&4294967295,n=s+(o<<21&4294967295|o>>>11),o=e+(s^(n|~i))+r[4]+4149444226&4294967295,e=n+(o<<6&4294967295|o>>>26),o=i+(n^(e|~s))+r[11]+3174756917&4294967295,i=e+(o<<10&4294967295|o>>>22),o=s+(e^(i|~n))+r[2]+718787259&4294967295,s=i+(o<<15&4294967295|o>>>17),o=n+(i^(s|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(s+(o<<21&4294967295|o>>>11))&4294967295,t.g[2]=t.g[2]+s&4294967295,t.g[3]=t.g[3]+i&4294967295}ir.prototype.j=function(t,e){e===void 0&&(e=t.length);for(var n=e-this.blockSize,r=this.m,s=this.h,i=0;i<e;){if(s==0)for(;i<=n;)md(this,t,i),i+=this.blockSize;if(typeof t=="string"){for(;i<e;)if(r[s++]=t.charCodeAt(i++),s==this.blockSize){md(this,r),s=0;break}}else for(;i<e;)if(r[s++]=t[i++],s==this.blockSize){md(this,r),s=0;break}}this.h=s,this.i+=e};ir.prototype.l=function(){var t=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;e<t.length-8;++e)t[e]=0;var n=8*this.i;for(e=t.length-8;e<t.length;++e)t[e]=n&255,n/=256;for(this.j(t),t=Array(16),e=n=0;4>e;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};function Ye(t,e){this.h=e;for(var n=[],r=!0,s=t.length-1;0<=s;s--){var i=t[s]|0;r&&i==e||(n[s]=i,r=!1)}this.g=n}var m8={};function Yg(t){return-128<=t&&128>t?TG(t,function(e){return new Ye([e|0],0>e?-1:0)}):new Ye([t|0],0>t?-1:0)}function yr(t){if(isNaN(t)||!isFinite(t))return wo;if(0>t)return Mt(yr(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=Vp;return new Ye(e,0)}function eP(t,e){if(t.length==0)throw Error("number format error: empty string");if(e=e||10,2>e||36<e)throw Error("radix out of range: "+e);if(t.charAt(0)=="-")return Mt(eP(t.substring(1),e));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var n=yr(Math.pow(e,8)),r=wo,s=0;s<t.length;s+=8){var i=Math.min(8,t.length-s),o=parseInt(t.substring(s,s+i),e);8>i?(i=yr(Math.pow(e,i)),r=r.R(i).add(yr(o))):(r=r.R(n),r=r.add(yr(o)))}return r}var Vp=4294967296,wo=Yg(0),$p=Yg(1),aE=Yg(16777216);re=Ye.prototype;re.ea=function(){if($n(this))return-Mt(this).ea();for(var t=0,e=1,n=0;n<this.g.length;n++){var r=this.D(n);t+=(0<=r?r:Vp+r)*e,e*=Vp}return t};re.toString=function(t){if(t=t||10,2>t||36<t)throw Error("radix out of range: "+t);if(Hr(this))return"0";if($n(this))return"-"+Mt(this).toString(t);for(var e=yr(Math.pow(t,6)),n=this,r="";;){var s=eh(n,e).g;n=Zu(n,s.R(e));var i=((0<n.g.length?n.g[0]:n.h)>>>0).toString(t);if(n=s,Hr(n))return i+r;for(;6>i.length;)i="0"+i;r=i+r}};re.D=function(t){return 0>t?0:t<this.g.length?this.g[t]:this.h};function Hr(t){if(t.h!=0)return!1;for(var e=0;e<t.g.length;e++)if(t.g[e]!=0)return!1;return!0}function $n(t){return t.h==-1}re.X=function(t){return t=Zu(this,t),$n(t)?-1:Hr(t)?0:1};function Mt(t){for(var e=t.g.length,n=[],r=0;r<e;r++)n[r]=~t.g[r];return new Ye(n,~t.h).add($p)}re.abs=function(){return $n(this)?Mt(this):this};re.add=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0,s=0;s<=e;s++){var i=r+(this.D(s)&65535)+(t.D(s)&65535),o=(i>>>16)+(this.D(s)>>>16)+(t.D(s)>>>16);r=o>>>16,i&=65535,o&=65535,n[s]=o<<16|i}return new Ye(n,n[n.length-1]&-2147483648?-1:0)};function Zu(t,e){return t.add(Mt(e))}re.R=function(t){if(Hr(this)||Hr(t))return wo;if($n(this))return $n(t)?Mt(this).R(Mt(t)):Mt(Mt(this).R(t));if($n(t))return Mt(this.R(Mt(t)));if(0>this.X(aE)&&0>t.X(aE))return yr(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<this.g.length;r++)for(var s=0;s<t.g.length;s++){var i=this.D(r)>>>16,o=this.D(r)&65535,a=t.D(s)>>>16,l=t.D(s)&65535;n[2*r+2*s]+=o*l,$c(n,2*r+2*s),n[2*r+2*s+1]+=i*l,$c(n,2*r+2*s+1),n[2*r+2*s+1]+=o*a,$c(n,2*r+2*s+1),n[2*r+2*s+2]+=i*a,$c(n,2*r+2*s+2)}for(r=0;r<e;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=e;r<2*e;r++)n[r]=0;return new Ye(n,0)};function $c(t,e){for(;(t[e]&65535)!=t[e];)t[e+1]+=t[e]>>>16,t[e]&=65535,e++}function _a(t,e){this.g=t,this.h=e}function eh(t,e){if(Hr(e))throw Error("division by zero");if(Hr(t))return new _a(wo,wo);if($n(t))return e=eh(Mt(t),e),new _a(Mt(e.g),Mt(e.h));if($n(e))return e=eh(t,Mt(e)),new _a(Mt(e.g),e.h);if(30<t.g.length){if($n(t)||$n(e))throw Error("slowDivide_ only works with positive integers.");for(var n=$p,r=e;0>=r.X(t);)n=lE(n),r=lE(r);var s=qi(n,1),i=qi(r,1);for(r=qi(r,2),n=qi(n,2);!Hr(r);){var o=i.add(r);0>=o.X(t)&&(s=s.add(n),i=o),r=qi(r,1),n=qi(n,1)}return e=Zu(t,s.R(e)),new _a(s,e)}for(s=wo;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),i=yr(n),o=i.R(e);$n(o)||0<o.X(t);)n-=r,i=yr(n),o=i.R(e);Hr(i)&&(i=$p),s=s.add(i),t=Zu(t,o)}return new _a(s,t)}re.gb=function(t){return eh(this,t).h};re.and=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0;r<e;r++)n[r]=this.D(r)&t.D(r);return new Ye(n,this.h&t.h)};re.or=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0;r<e;r++)n[r]=this.D(r)|t.D(r);return new Ye(n,this.h|t.h)};re.xor=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0;r<e;r++)n[r]=this.D(r)^t.D(r);return new Ye(n,this.h^t.h)};function lE(t){for(var e=t.g.length+1,n=[],r=0;r<e;r++)n[r]=t.D(r)<<1|t.D(r-1)>>>31;return new Ye(n,t.h)}function qi(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,s=[],i=0;i<r;i++)s[i]=0<e?t.D(i+n)>>>e|t.D(i+n+1)<<32-e:t.D(i+n);return new Ye(s,t.h)}Ju.prototype.createWebChannel=Ju.prototype.g;xn.prototype.send=xn.prototype.u;xn.prototype.open=xn.prototype.m;xn.prototype.close=xn.prototype.close;Qh.NO_ERROR=0;Qh.TIMEOUT=8;Qh.HTTP_ERROR=6;vR.COMPLETE="complete";yR.EventType=ec;ec.OPEN="a";ec.CLOSE="b";ec.ERROR="c";ec.MESSAGE="d";St.prototype.listen=St.prototype.O;pt.prototype.listenOnce=pt.prototype.P;pt.prototype.getLastError=pt.prototype.Sa;pt.prototype.getLastErrorCode=pt.prototype.Ia;pt.prototype.getStatus=pt.prototype.da;pt.prototype.getResponseJson=pt.prototype.Wa;pt.prototype.getResponseText=pt.prototype.ja;pt.prototype.send=pt.prototype.ha;pt.prototype.setWithCredentials=pt.prototype.Oa;ir.prototype.digest=ir.prototype.l;ir.prototype.reset=ir.prototype.reset;ir.prototype.update=ir.prototype.j;Ye.prototype.add=Ye.prototype.add;Ye.prototype.multiply=Ye.prototype.R;Ye.prototype.modulo=Ye.prototype.gb;Ye.prototype.compare=Ye.prototype.X;Ye.prototype.toNumber=Ye.prototype.ea;Ye.prototype.toString=Ye.prototype.toString;Ye.prototype.getBits=Ye.prototype.D;Ye.fromNumber=yr;Ye.fromString=eP;var g8=function(){return new Ju},v8=function(){return Gh()},gd=Qh,y8=vR,_8=Ui,cE={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},Fc=yR,w8=pt,E8=ir,Eo=Ye;const uE="@firebase/firestore";/**
1566 * @license
1567 * Copyright 2017 Google LLC
1568 *
1569 * Licensed under the Apache License, Version 2.0 (the "License");
1570 * you may not use this file except in compliance with the License.
1571 * You may obtain a copy of the License at
1572 *
1573 *   http://www.apache.org/licenses/LICENSE-2.0
1574 *
1575 * Unless required by applicable law or agreed to in writing, software
1576 * distributed under the License is distributed on an "AS IS" BASIS,
1577 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1578 * See the License for the specific language governing permissions and
1579 * limitations under the License.
1580 */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");/**
1581 * @license
1582 * Copyright 2017 Google LLC
1583 *
1584 * Licensed under the Apache License, Version 2.0 (the "License");
1585 * you may not use this file except in compliance with the License.
1586 * You may obtain a copy of the License at
1587 *
1588 *   http://www.apache.org/licenses/LICENSE-2.0
1589 *
1590 * Unless required by applicable law or agreed to in writing, software
1591 * distributed under the License is distributed on an "AS IS" BASIS,
1592 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1593 * See the License for the specific language governing permissions and
1594 * limitations under the License.
1595 */let ia="10.8.1";/**
1596 * @license
1597 * Copyright 2017 Google LLC
1598 *
1599 * Licensed under the Apache License, Version 2.0 (the "License");
1600 * you may not use this file except in compliance with the License.
1601 * You may obtain a copy of the License at
1602 *
1603 *   http://www.apache.org/licenses/LICENSE-2.0
1604 *
1605 * Unless required by applicable law or agreed to in writing, software
1606 * distributed under the License is distributed on an "AS IS" BASIS,
1607 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1608 * See the License for the specific language governing permissions and
1609 * limitations under the License.
1610 */const Si=new Lm("@firebase/firestore");function wa(){return Si.logLevel}function ne(t,...e){if(Si.logLevel<=Ne.DEBUG){const n=e.map(qg);Si.debug(`Firestore (${ia}): ${t}`,...n)}}function Cr(t,...e){if(Si.logLevel<=Ne.ERROR){const n=e.map(qg);Si.error(`Firestore (${ia}): ${t}`,...n)}}function Vo(t,...e){if(Si.logLevel<=Ne.WARN){const n=e.map(qg);Si.warn(`Firestore (${ia}): ${t}`,...n)}}function qg(t){if(typeof t=="string")return t;try{/**
1611* @license
1612* Copyright 2020 Google LLC
1613*
1614* Licensed under the Apache License, Version 2.0 (the "License");
1615* you may not use this file except in compliance with the License.
1616* You may obtain a copy of the License at
1617*
1618*   http://www.apache.org/licenses/LICENSE-2.0
1619*
1620* Unless required by applicable law or agreed to in writing, software
1621* distributed under the License is distributed on an "AS IS" BASIS,
1622* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1623* See the License for the specific language governing permissions and
1624* limitations under the License.
1625*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/**
1626 * @license
1627 * Copyright 2017 Google LLC
1628 *
1629 * Licensed under the Apache License, Version 2.0 (the "License");
1630 * you may not use this file except in compliance with the License.
1631 * You may obtain a copy of the License at
1632 *
1633 *   http://www.apache.org/licenses/LICENSE-2.0
1634 *
1635 * Unless required by applicable law or agreed to in writing, software
1636 * distributed under the License is distributed on an "AS IS" BASIS,
1637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1638 * See the License for the specific language governing permissions and
1639 * limitations under the License.
1640 */function Ee(t="Unexpected state"){const e=`FIRESTORE (${ia}) INTERNAL ASSERTION FAILED: `+t;throw Cr(e),new Error(e)}function Ze(t,e){t||Ee()}function Pe(t,e){return t}/**
1641 * @license
1642 * Copyright 2017 Google LLC
1643 *
1644 * Licensed under the Apache License, Version 2.0 (the "License");
1645 * you may not use this file except in compliance with the License.
1646 * You may obtain a copy of the License at
1647 *
1648 *   http://www.apache.org/licenses/LICENSE-2.0
1649 *
1650 * Unless required by applicable law or agreed to in writing, softw
1650are
1651 * distributed under the License is distributed on an "AS IS" BASIS,
1652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1653 * See the License for the specific language governing permissions and
1654 * limitations under the License.
1655 */const F={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 ce extends Dr{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
1656 * @license
1657 * Copyright 2017 Google LLC
1658 *
1659 * Licensed under the Apache License, Version 2.0 (the "License");
1660 * you may not use this file except in compliance with the License.
1661 * You may obtain a copy of the License at
1662 *
1663 *   http://www.apache.org/licenses/LICENSE-2.0
1664 *
1665 * Unless required by applicable law or agreed to in writing, software
1666 * distributed under the License is distributed on an "AS IS" BASIS,
1667 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1668 * See the License for the specific language governing permissions and
1669 * limitations under the License.
1670 */class Ir{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/**
1671 * @license
1672 * Copyright 2017 Google LLC
1673 *
1674 * Licensed under the Apache License, Version 2.0 (the "License");
1675 * you may not use this file except in compliance with the License.
1676 * You may obtain a copy of the License at
1677 *
1678 *   http://www.apache.org/licenses/LICENSE-2.0
1679 *
1680 * Unless required by applicable law or agreed to in writing, software
1681 * distributed under the License is distributed on an "AS IS" BASIS,
1682 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1683 * See the License for the specific language governing permissions and
1684 * limitations under the License.
1685 */class tP{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class b8{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Ft.UNAUTHENTICATED))}shutdown(){}}class T8{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 I8{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 s=l=>this.i!==r?(r=this.i,n(l)):Promise.resolve();let i=new Ir;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new Ir,e.enqueueRetryable(()=>s(this.currentUser))};const o=()=>{const l=i;e.enqueueRetryable(async()=>{await l.promise,await s(this.currentUser)})},a=l=>{ne("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(ne("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new Ir)}},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?(Ze(typeof r.accessToken=="string"),new tP(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 Ze(e===null||typeof e=="string"),new Ft(e)}}class A8{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 R8{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new A8(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Ft.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class P8{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 C8{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){const r=i=>{i.error!=null&&ne("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${i.error.message}`);const o=i.token!==this.R;return this.R=i.token,ne("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(i.token):Promise.resolve()};this.o=i=>{e.enqueueRetryable(()=>r(i))};const s=i=>{ne("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=i,this.appCheck.addTokenListener(this.o)};this.A.onInit(i=>s(i)),setTimeout(()=>{if(!this.appCheck){const i=this.A.getImmediate({optional:!0});i?s(i):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?(Ze(typeof n.token=="string"),this.R=n.token,new P8(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/**
1686 * @license
1687 * Copyright 2020 Google LLC
1688 *
1689 * Licensed under the Apache License, Version 2.0 (the "License");
1690 * you may not use this file except in compliance with the License.
1691 * You may obtain a copy of the License at
1692 *
1693 *   http://www.apache.org/licenses/LICENSE-2.0
1694 *
1695 * Unless required by applicable law or agreed to in writing, software
1696 * distributed under the License is distributed on an "AS IS" BASIS,
1697 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1698 * See the License for the specific language governing permissions and
1699 * limitations under the License.
1700 */function S8(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;r<t;r++)n[r]=Math.floor(256*Math.random());return n}/**
1701 * @license
1702 * Copyright 2017 Google LLC
1703 *
1704 * Licensed under the Apache License, Version 2.0 (the "License");
1705 * you may not use this file except in compliance with the License.
1706 * You may obtain a copy of the License at
1707 *
1708 *   http://www.apache.org/licenses/LICENSE-2.0
1709 *
1710 * Unless required by applicable law or agreed to in writing, software
1711 * distributed under the License is distributed on an "AS IS" BASIS,
1712 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1713 * See the License for the specific language governing permissions and
1714 * limitations under the License.
1715 */class nP{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const s=S8(40);for(let i=0;i<s.length;++i)r.length<20&&s[i]<n&&(r+=e.charAt(s[i]%e.length))}return r}}function Be(t,e){return t<e?-1:t>e?1:0}function $o(t,e,n){return t.length===e.length&&t.every((r,s)=>n(r,e[s]))}/**
1716 * @license
1717 * Copyright 2017 Google LLC
1718 *
1719 * Licensed under the Apache License, Version 2.0 (the "License");
1720 * you may not use this file except in compliance with the License.
1721 * You may obtain a copy of the License at
1722 *
1723 *   http://www.apache.org/licenses/LICENSE-2.0
1724 *
1725 * Unless required by applicable law or agreed to in writing, software
1726 * distributed under the License is distributed on an "AS IS" BASIS,
1727 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1728 * See the License for the specific language governing permissions and
1729 * limitations under the License.
1730 */class Rt{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new ce(F.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new ce(F.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new ce(F.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new ce(F.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Rt.fromMillis(Date.now())}static fromDate(e){return Rt.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new Rt(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Be(this.nanoseconds,e.nanoseconds):Be(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")}}/**
1731 * @license
1732 * Copyright 2017 Google LLC
1733 *
1734 * Licensed under the Apache License, Version 2.0 (the "License");
1735 * you may not use this file except in compliance with the License.
1736 * You may obtain a copy of the License at
1737 *
1738 *   http://www.apache.org/licenses/LICENSE-2.0
1739 *
1740 * Unless required by applicable law or agreed to in writing, software
1741 * distributed under the License is distributed on an "AS IS" BASIS,
1742 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1743 * See the License for the specific language governing permissions and
1744 * limitations under the License.
1745 */class Ae{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Ae(e)}static min(){return new Ae(new Rt(0,0))}static max(){return new Ae(new Rt(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}}/**
1746 * @license
1747 * Copyright 2017 Google LLC
1748 *
1749 * Licensed under the Apache License, Version 2.0 (the "License");
1750 * you may not use this file except in compliance with the License.
1751 * You may obtain a copy of the License at
1752 *
1753 *   http://www.apache.org/licenses/LICENSE-2.0
1754 *
1755 * Unless required by applicable law or agreed to in writing, software
1756 * distributed under the License is distributed on an "AS IS" BASIS,
1757 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1758 * See the License for the specific language governing permissions and
1759 * limitations under the License.
1760 */class Rl{constructor(e,n,r){n===void 0?n=0:n>e.length&&Ee(),r===void 0?r=e.length-n:r>e.length-n&&Ee(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return Rl.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Rl?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.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let s=0;s<r;s++){const i=e.get(s),o=n.get(s);if(i<o)return-1;if(i>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class st extends Rl{construct(e,n,r){return new st(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new ce(F.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(s=>s.length>0))}return new st(n)}static emptyPath(){return new st([])}}const D8=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Nt extends Rl{construct(e,n,r){return new Nt(e,n,r)}static isValidIdentifier(e){return D8.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Nt.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new Nt(["__name__"])}static fromServerFormat(e){const n=[];let r="",s=0;const i=()=>{if(r.length===0)throw new ce(F.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(;s<e.length;){const a=e[s];if(a==="\\"){if(s+1===e.length)throw new ce(F.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const l=e[s+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new ce(F.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=l,s+=2}else a==="`"?(o=!o,s++):a!=="."||o?(r+=a,s++):(i(),s++)}if(i(),o)throw new ce(F.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new Nt(n)}static emptyPath(){return new Nt([])}}/**
1761 * @license
1762 * Copyright 2017 Google LLC
1763 *
1764 * Licensed under the Apache License, Version 2.0 (the "License");
1765 * you may not use this file except in compliance with the License.
1766 * You may obtain a copy of the License at
1767 *
1768 *   http://www.apache.org/licenses/LICENSE-2.0
1769 *
1770 * Unless required by applicable law or agreed to in writing, software
1771 * distributed under the License is distributed on an "AS IS" BASIS,
1772 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1773 * See the License for the specific language governing permissions and
1774 * limitations under the License.
1775 */class me{constructor(e){this.path=e}static fromPath(e){return new me(st.fromString(e))}static fromName(e){return new me(st.fromString(e).popFirst(5))}static empty(){return new me(st.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=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&&st.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return st.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new me(new st(e.slice()))}}function k8(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,s=Ae.fromTimestamp(r===1e9?new Rt(n+1,0):new Rt(n,r));return new Ls(s,me.empty(),e)}function O8(t){return new Ls(t.readTime,t.key,-1)}class Ls{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Ls(Ae.min(),me.empty(),-1)}static max(){return new Ls(Ae.max(),me.empty(),-1)}}function M8(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=me.comparator(t.documentKey,e.documentKey),n!==0?n:Be(t.largestBatchId,e.largestBatchId))}/**
1776 * @license
1777 * Copyright 2020 Google LLC
1778 *
1779 * Licensed under the Apache License, Version 2.0 (the "License");
1780 * you may not use this file except in compliance with the License.
1781 * You may obtain a copy of the License at
1782 *
1783 *   http://www.apache.org/licenses/LICENSE-2.0
1784 *
1785 * Unless required by applicable law or agreed to in writing, software
1786 * distributed under the License is distributed on an "AS IS" BASIS,
1787 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1788 * See the License for the specific language governing permissions and
1789 * limitations under the License.
1790 */const N8="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class L8{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/**
1791 * @license
1792 * Copyright 2017 Google LLC
1793 *
1794 * Licensed under the Apache License, Version 2.0 (the "License");
1795 * you may not use this file except in compliance with the License.
1796 * You may obtain a copy of the License at
1797 *
1798 *   http://www.apache.org/licenses/LICENSE-2.0
1799 *
1800 * Unless required by applicable law or agreed to in writing, software
1801 * distributed under the License is distributed on an "AS IS" BASIS,
1802 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1803 * See the License for the specific language governing permissions and
1804 * limitations under the License.
1805 */async function ic(t){if(t.code!==F.FAILED_PRECONDITION||t.message!==N8)throw t;ne("LocalStore","Unexpectedly lost primary lease")}/**
1806 * @license
1807 * Copyright 2017 Google LLC
1808 *
1809 * Licensed under the Apache License, Version 2.0 (the "License");
1810 * you may not use this file except in compliance with the License.
1811 * You may obtain a copy of the License at
1812 *
1813 *   http://www.apache.org/licenses/LICENSE-2.0
1814 *
1815 * Unless required by applicable law or agreed to in writing, software
1816 * distributed under the License is distributed on an "AS IS" BASIS,
1817 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1818 * See the License for the specific language governing permissions and
1819 * limitations under the License.
1820 */class H{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&&Ee(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new H((r,s)=>{this.nextCallback=i=>{this.wrapSuccess(e,i).next(r,s)},this.catchCallback=i=>{this.wrapFailure(n,i).next(r,s)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof H?n:H.resolve(n)}catch(n){return H.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):H.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):H.reject(n)}static resolve(e){return new H((n,r)=>{n(e)})}static reject(e){return new H((n,r)=>{r(e)})}static waitFor(e){return new H((n,r)=>{let s=0,i=0,o=!1;e.forEach(a=>{++s,a.next(()=>{++i,o&&i===s&&n()},l=>r(l))}),o=!0,i===s&&n()})}static or(e){let n=H.resolve(!1);for(const r of e)n=n.next(s=>s?H.resolve(s):r());return n}static forEach(e,n){const r=[];return e.forEach((s,i)=>{r.push(n.call(this,s,i))}),this.waitFor(r)}static mapArray(e,n){return new H((r,s)=>{const i=e.length,o=new Array(i);let a=0;for(let l=0;l<i;l++){const c=l;n(e[c]).next(u=>{o[c]=u,++a,a===i&&r(o)},u=>s(u))}})}static doWhile(e,n){return new H((r,s)=>{const i=()=>{e()===!0?n().next(()=>{i()},s):r()};i()})}}/**
1821 * @license
1822 * Copyright 2017 Google LLC
1823 *
1824 * Licensed under the Apache License, Version 2.0 (the "License");
1825 * you may not use this file except in compliance with the License.
1826 * You may obtain a copy of the License at
1827 *
1828 *   http://www.apache.org/licenses/LICENSE-2.0
1829 *
1830 * Unless required by applicable law or agreed to in writing, software
1831 * distributed under the License is distributed on an "AS IS" BASIS,
1832 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1833 * See the License for the specific language governing permissions and
1834 * limitations under the License.
1835 */class Kg{constructor(e,n){this.action=e,this.transaction=n,this.aborted=!1,this.V=new Ir,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{n.error?this.V.reject(new Ya(e,n.error)):this.V.resolve()},this.transaction.onerror=r=>{const s=zg(r.target.error);this.V.reject(new Ya(e,s))}}
1835static open(e,n,r,s){try{return new Kg(n,e.transaction(s,r))}catch(i){throw new Ya(n,i)}}get m(){return this.V.promise}abort(e){e&&this.V.reject(e),this.aborted||(ne("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){const e=this.transaction;this.aborted||typeof e.commit!="function"||e.commit()}store(e){const n=this.transaction.objectStore(e);return new V8(n)}}class li{constructor(e,n,r){this.name=e,this.version=n,this.p=r,li.S(Tt())===12.2&&Cr("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return ne("SimpleDb","Removing database:",e),ni(window.indexedDB.deleteDatabase(e)).toPromise()}static D(){if(!x0())return!1;if(li.C())return!0;const e=Tt(),n=li.S(e),r=0<n&&n<10,s=li.v(e),i=0<s&&s<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||r||i)}static C(){var e;return typeof process<"u"&&((e=process.__PRIVATE_env)===null||e===void 0?void 0:e.F)==="YES"}static M(e,n){return e.store(n)}static S(e){const n=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),r=n?n[1].split("_").slice(0,2).join("."):"-1";return Number(r)}static v(e){const n=e.match(/Android ([\d.]+)/i),r=n?n[1].split(".").slice(0,2).join("."):"-1";return Number(r)}async O(e){return this.db||(ne("SimpleDb","Opening database:",this.name),this.db=await new Promise((n,r)=>{const s=indexedDB.open(this.name,this.version);s.onsuccess=i=>{const o=i.target.result;n(o)},s.onblocked=()=>{r(new Ya(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},s.onerror=i=>{const o=i.target.error;o.name==="VersionError"?r(new ce(F.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):o.name==="InvalidStateError"?r(new ce(F.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+o)):r(new Ya(e,o))},s.onupgradeneeded=i=>{ne("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',i.oldVersion);const o=i.target.result;this.p.N(o,s.transaction,i.oldVersion,this.version).next(()=>{ne("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.B&&(this.db.onversionchange=n=>this.B(n)),this.db}L(e){this.B=e,this.db&&(this.db.onversionchange=n=>e(n))}async runTransaction(e,n,r,s){const i=n==="readonly";let o=0;for(;;){++o;try{this.db=await this.O(e);const a=Kg.open(this.db,e,i?"readonly":"readwrite",r),l=s(a).next(c=>(a.g(),c)).catch(c=>(a.abort(c),H.reject(c))).toPromise();return l.catch(()=>{}),await a.m,l}catch(a){const l=a,c=l.name!=="FirebaseError"&&o<3;if(ne("SimpleDb","Transaction failed with error:",l.message,"Retrying:",c),this.close(),!c)return Promise.reject(l)}}}close(){this.db&&this.db.close(),this.db=void 0}}class x8{constructor(e){this.k=e,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(e){this.k=e}done(){this.q=!0}U(e){this.K=e}delete(){return ni(this.k.delete())}}class Ya extends ce{constructor(e,n){super(F.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${n}`),this.name="IndexedDbTransactionError"}}function oc(t){return t.name==="IndexedDbTransactionError"}class V8{constructor(e){this.store=e}put(e,n){let r;return n!==void 0?(ne("SimpleDb","PUT",this.store.name,e,n),r=this.store.put(n,e)):(ne("SimpleDb","PUT",this.store.name,"<auto-key>",e),r=this.store.put(e)),ni(r)}add(e){return ne("SimpleDb","ADD",this.store.name,e,e),ni(this.store.add(e))}get(e){return ni(this.store.get(e)).next(n=>(n===void 0&&(n=null),ne("SimpleDb","GET",this.store.name,e,n),n))}delete(e){return ne("SimpleDb","DELETE",this.store.name,e),ni(this.store.delete(e))}count(){return ne("SimpleDb","COUNT",this.store.name),ni(this.store.count())}W(e,n){const r=this.options(e,n),s=r.index?this.store.index(r.index):this.store;if(typeof s.getAll=="function"){const i=s.getAll(r.range);return new H((o,a)=>{i.onerror=l=>{a(l.target.error)},i.onsuccess=l=>{o(l.target.result)}})}{const i=this.cursor(r),o=[];return this.G(i,(a,l)=>{o.push(l)}).next(()=>o)}}j(e,n){const r=this.store.getAll(e,n===null?void 0:n);return new H((s,i)=>{r.onerror=o=>{i(o.target.error)},r.onsuccess=o=>{s(o.target.result)}})}
1835H(e,n){ne("SimpleDb","DELETE ALL",this.store.name);const r=this.options(e,n);r.J=!1;const s=this.cursor(r);return this.G(s,(i,o,a)=>a.delete())}Y(e,n){let r;n?r=e:(r={},n=e);const s=this.cursor(r);return this.G(s,n)}Z(e){const n=this.cursor({});return new H((r,s)=>{n.onerror=i=>{const o=zg(i.target.error);s(o)},n.onsuccess=i=>{const o=i.target.result;o?e(o.primaryKey,o.value).next(a=>{a?o.continue():r()}):r()}})}G(e,n){const r=[];return new H((s,i)=>{e.onerror=o=>{i(o.target.error)},e.onsuccess=o=>{const a=o.target.result;if(!a)return void s();const l=new x8(a),c=n(a.primaryKey,a.value,l);if(c instanceof H){const u=c.catch(h=>(l.done(),H.reject(h)));r.push(u)}l.isDone?s():l.$===null?a.continue():a.continue(l.$)}}).next(()=>H.waitFor(r))}options(e,n){let r;return e!==void 0&&(typeof e=="string"?r=e:n=e),{index:r,range:n}}cursor(e){let n="next";if(e.reverse&&(n="prev"),e.index){const r=this.store.index(e.index);return e.J?r.openKeyCursor(e.range,n):r.openCursor(e.range,n)}return this.store.openCursor(e.range,n)}}function ni(t){return new H((e,n)=>{t.onsuccess=r=>{const s=r.target.result;e(s)},t.onerror=r=>{const s=zg(r.target.error);n(s)}})}let hE=!1;function zg(t){const e=li.S(Tt());if(e>=12.2&&e<13){const n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){const r=new ce("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${n}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return hE||(hE=!0,setTimeout(()=>{throw r},0)),r}}return t}/**
1836 * @license
1837 * Copyright 2018 Google LLC
1838 *
1839 * Licensed under the Apache License, Version 2.0 (the "License");
1840 * you may not use this file except in compliance with the License.
1841 * You may obtain a copy of the License at
1842 *
1843 *   http://www.apache.org/licenses/LICENSE-2.0
1844 *
1845 * Unless required by applicable law or agreed to in writing, software
1846 * distributed under the License is distributed on an "AS IS" BASIS,
1847 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1848 * See the License for the specific language governing permissions and
1849 * limitations under the License.
1850 */class Gg{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.se(r),this.oe=r=>n.writeSequenceNumber(r))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.oe&&this.oe(e),e}}Gg._e=-1;function of(t){return t==null}function th(t){return t===0&&1/t==-1/0}function $8(t){return typeof t=="number"&&Number.isInteger(t)&&!th(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/**
1851 * @license
1852 * Copyright 2017 Google LLC
1853 *
1854 * Licensed under the Apache License, Version 2.0 (the "License");
1855 * you may not use this file except in compliance with the License.
1856 * You may obtain a copy of the License at
1857 *
1858 *   http://www.apache.org/licenses/LICENSE-2.0
1859 *
1860 * Unless required by applicable law or agreed to in writing, software
1861 * distributed under the License is distributed on an "AS IS" BASIS,
1862 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1863 * See the License for the specific language governing permissions and
1864 * limitations under the License.
1865 */function fE(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Bi(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function rP(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/**
1866 * @license
1867 * Copyright 2017 Google LLC
1868 *
1869 * Licensed under the Apache License, Version 2.0 (the "License");
1870 * you may not use this file except in compliance with the License.
1871 * You may obtain a copy of the License at
1872 *
1873 *   http://www.apache.org/licenses/LICENSE-2.0
1874 *
1875 * Unless required by applicable law or agreed to in writing, software
1876 * distributed under the License is distributed on an "AS IS" BASIS,
1877 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1878 * See the License for the specific language governing permissions and
1879 * limitations under the License.
1880 */class ft{constructor(e,n){this.comparator=e,this.root=n||Ot.EMPTY}insert(e,n){return new ft(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Ot.BLACK,null,
1880null))}remove(e){return new ft(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 s=this.comparator(e,r.key);if(s===0)return n+r.left.size;s<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 Uc(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Uc(this.root,e,this.comparator,!1)}getReverseIterator(){return new Uc(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Uc(this.root,e,this.comparator,!0)}}class Uc{constructor(e,n,r,s){this.isReverse=s,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=n?r(e.key,n):1,n&&s&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(i===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,s,i){this.key=e,this.value=n,this.color=r??Ot.RED,this.left=s??Ot.EMPTY,this.right=i??Ot.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,s,i){return new Ot(e??this.key,n??this.value,r??this.color,s??this.left,i??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 s=this;const i=r(e,s.key);return s=i<0?s.copy(null,null,null,s.left.insert(e,n,r),null):i===0?s.copy(null,n,null,null,null):s.copy(null,null,null,null,s.right.insert(e,n,r)),s.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,s=this;if(n(e,s.key)<0)s.left.isEmpty()||s.left.isRed()||s.left.left.isRed()||(s=s.moveRedLeft()),s=s.copy(null,null,null,s.left.remove(e,n),null);else{if(s.left.isRed()&&(s=s.rotateRight()),s.right.isEmpty()||s.right.isRed()||s.right.left.isRed()||(s=s.moveRedRight()),n(e,s.key)===0){if(s.right.isEmpty())return Ot.EMPTY;r=s.right.min(),s=s.copy(r.key,r.value,null,null,s.right.removeMin())}s=s.copy(null,null,null,null,s.right.remove(e,n))}return s.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 Ee();const e=this.left.check();if(e!==this.right.check())throw Ee();return e+(this.isRed()?0:1)}}Ot.EMPTY=null,Ot.RED=!0,Ot.BLACK=!1;
1880Ot.EMPTY=new class{constructor(){this.size=0}get key(){throw Ee()}get value(){throw Ee()}get color(){throw Ee()}get left(){throw Ee()}get right(){throw Ee()}copy(e,n,r,s,i){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}};/**
1881 * @license
1882 * Copyright 2017 Google LLC
1883 *
1884 * Licensed under the Apache License, Version 2.0 (the "License");
1885 * you may not use this file except in compliance with the License.
1886 * You may obtain a copy of the License at
1887 *
1888 *   http://www.apache.org/licenses/LICENSE-2.0
1889 *
1890 * Unless required by applicable law or agreed to in writing, software
1891 * distributed under the License is distributed on an "AS IS" BASIS,
1892 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1893 * See the License for the specific language governing permissions and
1894 * limitations under the License.
1895 */class xt{constructor(e){this.comparator=e,this.data=new ft(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 s=r.getNext();if(this.comparator(s.key,e[1])>=0)return;n(s.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 dE(this.data.getIterator())}getIteratorFrom(e){return new dE(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<e.size&&(n=e,e=this),e.forEach(r=>{n=n.add(r)}),n}isEqual(e){if(!(e instanceof xt)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const s=n.getNext().key,i=r.getNext().key;if(this.comparator(s,i)!==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 xt(this.comparator);return n.data=e,n}}class dE{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
1896 * @license
1897 * Copyright 2020 Google LLC
1898 *
1899 * Licensed under the Apache License, Version 2.0 (the "License");
1900 * you may not use this file except in compliance with the License.
1901 * You may obtain a copy of the License at
1902 *
1903 *   http://www.apache.org/licenses/LICENSE-2.0
1904 *
1905 * Unless required by applicable law or agreed to in writing, software
1906 * distributed under the License is distributed on an "AS IS" BASIS,
1907 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1908 * See the License for the specific language governing permissions and
1909 * limitations under the License.
1910 */class On{constructor(e){this.fields=e,e.sort(Nt.comparator)}static empty(){return new On([])}unionWith(e){let n=new xt(Nt.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new On(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return $o(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/**
1911 * @license
1912 * Copyright 2023 Google LLC
1913 *
1914 * Licensed under the Apache License, Version 2.0 (the "License");
1915 * you may not use this file except in compliance with the License.
1916 * You may obtain a copy of the License at
1917 *
1918 *   http://www.apache.org/licenses/LICENSE-2.0
1919 *
1920 * Unless required by applicable law or agreed to in writing, software
1921 * distributed under the License is distributed on an "AS IS" BASIS,
1922 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1923 * See the License for the specific language governing permissions and
1924 * limitations under the License.
1925 */class sP extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
1926 * @license
1927 * Copyright 2020 Google LLC
1928 *
1929 * Licensed under the Apache License, Version 2.0 (the "License");
1930 * you may not use this file except in compliance with the License.
1931 * You may obtain a copy of the License at
1932 *
1933 *   http://www.apache.org/licenses/LICENSE-2.0
1934 *
1935 * Unless required by applicable law or agreed to in writing, software
1936 * distributed under the License is distributed on an "AS IS" BASIS,
1937 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1938 * See the License for the specific language governing permissions and
1939 * limitations under the License.
1940 */class Wt{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(s){try{return atob(s)}catch(i){throw typeof DOMException<"u"&&i instanceof DOMException?new sP("Invalid base64 string: "+i):i}}(e);return new Wt(n)}static fromUint8Array(e){const n=function(s){let i="";for(let o=0;o<s.length;++o)i+=String.fromCharCode(s[o]);return i}(e);return new Wt(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){const r=new Uint8Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Be(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Wt.EMPTY_BYTE_STRING=new Wt("");const F8=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function xs(t){if(Ze(!!t),typeof t=="string"){let e=0;const n=F8.exec(t);if(Ze(!!n),n[1]){let s=n[1];s=(s+"000000000").substr(0,9),e=Number(s)}const r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:_t(t.seconds),nanos:_t(t.nanos)}}function _t(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function Di(t){return typeof t=="string"?Wt.fromBase64String(t):Wt.fromUint8Array(t)}/**
1941 * @license
1942 * Copyright 2020 Google LLC
1943 *
1944 * Licensed under the Apache License, Version 2.0 (the "License");
1945 * you may not use this file except in compliance with the License.
1946 * You may obtain a copy of the License at
1947 *
1948 *   http://www.apache.org/licenses/LICENSE-2.0
1949 *
1950 * Unless required by applicable law or agreed to in writing, software
1951 * distributed under the License is distributed on an "AS IS" BASIS,
1952 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1953 * See the License for the specific language governing permissions and
1954 * limitations under the License.
1955 */function Qg(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function Xg(t){const e=t.mapValue.fields.__previous_value__;return Qg(e)?Xg(e):e}function Pl(t){const e=xs(t.mapValue.fields.__local_write_time__.timestampValue);return new Rt(e.seconds,e.nanos)}/**
1956 * @license
1957 * Copyright 2017 Google LLC
1958 *
1959 * Licensed under the Apache License, Version 2.0 (the "License");
1960 * you may not use this file except in compliance with the License.
1961 * You may obtain a copy of the License at
1962 *
1963 *   http://www.apache.org/licenses/LICENSE-2.0
1964 *
1965 * Unless required by applicable law or agreed to in writing, software
1966 * distributed under the License is distributed on an "AS IS" BASIS,
1967 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1968 * See the License for the specific language governing permissions and
1969 * limitations under the License.
1970 */class U8{constructor(e,n,r,s,i,o,a,l,c){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=s,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.longPollingOptions=l,this.useFetchStreams=c}}class Cl{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new Cl("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof Cl&&e.projectId===this.projectId&&e.database===this.database}}/**
1971 * @license
1972 * Copyright 2020 Google LLC
1973 *
1974 * Licensed under the Apache License, Version 2.0 (the "License");
1975 * you may not use this file except in compliance with the License.
1976 * You may obtain a copy of the License at
1977 *
1978 *   http://www.apache.org/licenses/LICENSE-2.0
1979 *
1980 * Unless required by applicable law or agreed to in writing, software
1981 * distributed under the License is distributed on an "AS IS" BASIS,
1982 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1983 * See the License for the specific language governing permissions and
1984 * limitations under the License.
1985 */const Bc={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function ki(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Qg(t)?4:B8(t)?9007199254740991:10:Ee()}function Sr(t,e){if(t===e)return!0;const n=ki(t);if(n!==ki(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Pl(t).isEqual(Pl(e));case 3:return function(s,i){if(typeof s.timestampValue=="string"&&typeof i.timestampValue=="string"&&s.timestampValue.length===i.timestampValue.length)return s.timestampValue===i.timestampValue;const o=xs(s.timestampValue),a=xs(i.timestampValue);return o.seconds===a.seconds&&o.nanos===a.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(s,i){return Di(s.bytesValue).isEqual(Di(i.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(s,i){return _t(s.geoPointValue.latitude)===_t(i.geoPointValue.latitude)&&_t(s.geoPointValue.longitude)===_t(i.geoPointValue.longitude)}(t,e);case 2:return function(s,i){if("integerValue"in s&&"integerValue"in i)return _t(s.integerValue)===_t(i.integerValue);if("doubleValue"in s&&"doubleValue"in i){const o=_t(s.doubleValue),a=_t(i.doubleValue);return o===a?th(o)===th(a):isNaN(o)&&isNaN(a)}return!1}(t,e);case 9:return $o(t.arrayValue.values||[],e.arrayValue.values||[],Sr);case 10:return function(s,i){const o=s.mapValue.fields||{},a=i.mapValue.fields||{};if(fE(o)!==fE(a))return!1;for(const l in o)if(o.hasOwnProperty(l)&&(a[l]===void 0||!Sr(o[l],a[l])))return!1;return!0}(t,e);default:return Ee()}}function Sl(t,e){return(t.values||[]).find(n=>Sr(n,e))!==void 0}function Fo(t,e){if(t===e)return 0;const n=ki(t),r=ki(e);if(n!==r)return Be(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Be(t.booleanValue,e.booleanValue);case 2:return function(i,o){const a=_t(i.integerValue||i.doubleValue),l=_t(o.integerValue||o.doubleValue);return a<l?-1:a>l?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(t,e);case 3:return pE(t.timestampValue,e.timestampValue);case 4:return pE(Pl(t),Pl(e));case 5:return Be(t.stringValue,e.stringValue);case 6:return function(i,o){const a=Di(i),l=Di(o);return a.compareTo(l)}(t.bytesValue,e.bytesValue);case 7:return function(i,o){const a=i.split("/"),l=o.split("/");for(let c=0;c<a.length&&c<l.length;c++){const u=Be(a[c],l[c]);if(u!==0)return u}return Be(a.length,l.length)}(t.referenceValue,e.referenceValue);case 8:return function(i,o){const a=Be(_t(i.latitude),_t(o.latitude));return a!==0?a:Be(_t(i.longitude),_t(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(i,o){const a=i.values||[],l=o.values||[];for(let c=0;c<a.length&&c<l.length;++c){const u=Fo(a[c],l[c]);if(u)return u}return Be(a.length,l.length)}(t.arrayValue,e.arrayValue);case 10:return function(i,o){if(i===Bc.mapValue&&o===Bc.mapValue)return 0;if(i===Bc.mapValue)return 1;if(o===Bc.mapValue)return-1;const a=i.fields||{},l=Object.keys(a),c=o.fields||{},u=Object.keys(c);l.sort(),u.sort();for(let h=0;h<l.length&&h<u.length;++h){const f=Be(l[h],u[h]);if(f!==0)return f;const d=Fo(a[l[h]],c[u[h]]);if(d!==0)return d}return Be(l.length,u.length)}(t.mapValue,e.mapValue);default:throw Ee()}}function pE(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return Be(t,e);const n=xs(t),r=xs(e),s=Be(n.seconds,r.seconds);return s!==0?s:Be(n.nanos,r.nanos)}function Uo(t){return Fp(t)}function Fp(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(n){const r=xs(n);return`time(${r.seconds},${r.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return Di(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return me.fromName(n).toString()}(t.referenceValue):"geoPointValue"in t?function(n){return`geo(${n.latitude},${n.longitude})`}(t.geoPointValue):"arrayValue"in t?function(n){let r="[",s=!0;for(const i of n.values||[])s?s=!1:r+=",",r+=Fp(i);return r+"]"}(t.arrayValue):"mapValue"in t?function(n){const r=Object.keys(n.fields||{}).sort();let s="{",i=!0;for(const o of r)i?i=!1:s+=",",s+=`${o}:${Fp(n.fields[o])}`;return s+"}"}(t.mapValue):Ee()}function mE(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function Up(t){return!!t&&"integerValue"in t}function Jg(t){return!!t&&"arrayValue"in t}function gE(t){return!!t&&"nullValue"in t}function vE(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function cu(t){return!!t&&"mapValue"in t}function qa(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return Bi(t.mapValue.fields,(n,r)=>e.mapValue.fields[n]=qa(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=qa(t.arrayValue.values[n]);return e}return Object.assign({},t)}function B8(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/**
1986 * @license
1987 * Copyright 2017 Google LLC
1988 *
1989 * Licensed under the Apache License, Version 2.0 (the "License");
1990 * you may not use this file except in compliance with the License.
1991 * You may obtain a copy of the License at
1992 *
1993 *   http://www.apache.org/licenses/LICENSE-2.0
1994 *
1995 * Unless required by applicable law or agreed to in writing, software
1996 * distributed under the License is distributed on an "AS IS" BASIS,
1997 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1998 * See the License for the specific language governing permissions and
1999 * limitations under the License.
2000 */class on{constructor(e){this.value=e}static empty(){return new on({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r<e.length-1;++r)if(n=(n.mapValue.fields||{})[e.get(r)],!cu(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=qa(n)}setAll(e){let n=Nt.emptyPath(),r={},s=[];e.forEach((o,a)=>{if(!n.isImmediateParentOf(a)){const l=this.getFieldsMap(n);this.applyChanges(l,r,s),r={},s=[],n=a.popLast()}o?r[a.lastSegment()]=qa(o):s.push(a.lastSegment())});const i=this.getFieldsMap(n);this.applyChanges(i,r,s)}delete(e){const n=this.field(e.popLast());cu(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Sr(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<e.length;++r){let s=n.mapValue.fields[e.get(r)];cu(s)&&s.mapValue.fields||(s={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=s),n=s}return n.mapValue.fields}applyChanges(e,n,r){Bi(n,(s,i)=>e[s]=i);for(const s of r)delete e[s]}clone(){return new on(qa(this.value))}}function iP(t){const e=[];return Bi(t.fields,(n,r)=>{const s=new Nt([n]);if(cu(r)){const i=iP(r.mapValue).fields;
2000if(i.length===0)e.push(s);else for(const o of i)e.push(s.child(o))}else e.push(s)}),new On(e)}/**
2001 * @license
2002 * Copyright 2017 Google LLC
2003 *
2004 * Licensed under the Apache License, Version 2.0 (the "License");
2005 * you may not use this file except in compliance with the License.
2006 * You may obtain a copy of the License at
2007 *
2008 *   http://www.apache.org/licenses/LICENSE-2.0
2009 *
2010 * Unless required by applicable law or agreed to in writing, software
2011 * distributed under the License is distributed on an "AS IS" BASIS,
2012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2013 * See the License for the specific language governing permissions and
2014 * limitations under the License.
2015 */class Ut{constructor(e,n,r,s,i,o,a){this.key=e,this.documentType=n,this.version=r,this.readTime=s,this.createTime=i,this.data=o,this.documentState=a}static newInvalidDocument(e){return new Ut(e,0,Ae.min(),Ae.min(),Ae.min(),on.empty(),0)}static newFoundDocument(e,n,r,s){return new Ut(e,1,n,Ae.min(),r,s,0)}static newNoDocument(e,n){return new Ut(e,2,n,Ae.min(),Ae.min(),on.empty(),0)}static newUnknownDocument(e,n){return new Ut(e,3,n,Ae.min(),Ae.min(),on.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(Ae.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=on.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=on.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ae.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 Ut&&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 Ut(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}})`}}/**
2016 * @license
2017 * Copyright 2022 Google LLC
2018 *
2019 * Licensed under the Apache License, Version 2.0 (the "License");
2020 * you may not use this file except in compliance with the License.
2021 * You may obtain a copy of the License at
2022 *
2023 *   http://www.apache.org/licenses/LICENSE-2.0
2024 *
2025 * Unless required by applicable law or agreed to in writing, software
2026 * distributed under the License is distributed on an "AS IS" BASIS,
2027 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2028 * See the License for the specific language governing permissions and
2029 * limitations under the License.
2030 */class nh{constructor(e,n){this.position=e,this.inclusive=n}}function yE(t,e,n){let r=0;for(let s=0;s<t.position.length;s++){const i=e[s],o=t.position[s];if(i.field.isKeyField()?r=me.comparator(me.fromName(o.referenceValue),n.key):r=Fo(o,n.data.field(i.field)),i.dir==="desc"&&(r*=-1),r!==0)break}return r}function _E(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!Sr(t.position[n],e.position[n]))return!1;return!0}/**
2031 * @license
2032 * Copyright 2022 Google LLC
2033 *
2034 * Licensed under the Apache License, Version 2.0 (the "License");
2035 * you may not use this file except in compliance with the License.
2036 * You may obtain a copy of the License at
2037 *
2038 *   http://www.apache.org/licenses/LICENSE-2.0
2039 *
2040 * Unless required by applicable law or agreed to in writing, softw
2040are
2041 * distributed under the License is distributed on an "AS IS" BASIS,
2042 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2043 * See the License for the specific language governing permissions and
2044 * limitations under the License.
2045 */class rh{constructor(e,n="asc"){this.field=e,this.dir=n}}function H8(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/**
2046 * @license
2047 * Copyright 2022 Google LLC
2048 *
2049 * Licensed under the Apache License, Version 2.0 (the "License");
2050 * you may not use this file except in compliance with the License.
2051 * You may obtain a copy of the License at
2052 *
2053 *   http://www.apache.org/licenses/LICENSE-2.0
2054 *
2055 * Unless required by applicable law or agreed to in writing, software
2056 * distributed under the License is distributed on an "AS IS" BASIS,
2057 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2058 * See the License for the specific language governing permissions and
2059 * limitations under the License.
2060 */class oP{}class wt extends oP{constructor(e,n,r){super(),this.field=e,this.op=n,this.value=r}static create(e,n,r){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,r):new W8(e,n,r):n==="array-contains"?new K8(e,r):n==="in"?new z8(e,r):n==="not-in"?new G8(e,r):n==="array-contains-any"?new Q8(e,r):new wt(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new Y8(e,r):new q8(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(Fo(n,this.value)):n!==null&&ki(this.value)===ki(n)&&this.matchesComparison(Fo(n,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return Ee()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class or extends oP{constructor(e,n){super(),this.filters=e,this.op=n,this.ue=null}static create(e,n){return new or(e,n)}matches(e){return aP(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ue!==null||(this.ue=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function aP(t){return t.op==="and"}function lP(t){return j8(t)&&aP(t)}function j8(t){for(const e of t.filters)if(e instanceof or)return!1;return!0}function Bp(t){if(t instanceof wt)return t.field.canonicalString()+t.op.toString()+Uo(t.value);if(lP(t))return t.filters.map(e=>Bp(e)).join(",");{const e=t.filters.map(n=>Bp(n)).join(",");return`${t.op}(${e})`}}function cP(t,e){return t instanceof wt?function(r,s){return s instanceof wt&&r.op===s.op&&r.field.isEqual(s.field)&&Sr(r.value,s.value)}(t,e):t instanceof or?function(r,s){return s instanceof or&&r.op===s.op&&r.filters.length===s.filters.length?r.filters.reduce((i,o,a)=>i&&cP(o,s.filters[a]),!0):!1}(t,e):void Ee()}function uP(t){return t instanceof wt?function(n){return`${n.field.canonicalString()} ${n.op} ${Uo(n.value)}`}(t):t instanceof or?function(n){return n.op.toString()+" {"+n.getFilters().map(uP).join(" ,")+"}"}(t):"Filter"}class W8 extends wt{constructor(e,n,r){super(e,n,r),this.key=me.fromName(r.referenceValue)}matches(e){const n=me.comparator(e.key,this.key);return this.matchesComparison(n)}}class Y8 extends wt{constructor(e,n){super(e,"in",n),this.keys=hP("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class q8 extends wt{constructor(e,n){super(e,"not-in",n),this.keys=hP("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function hP(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>me.fromName(r.referenceValue))}class K8 extends wt{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Jg(n)&&Sl(n.arrayValue,this.value)}}class z8 extends wt{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Sl(this.value.arrayValue,n)}}class G8 extends wt{constructor(e,n){super(e,"not-in",n)}matches(e){if(Sl(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!Sl(this.value.arrayValue,n)}}class Q8 extends wt{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!Jg(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Sl(this.value.arrayValue,r))}}/**
2061 * @license
2062 * Copyright 2019 Google LLC
2063 *
2064 * Licensed under the Apache License, Version 2.0 (the "License");
2065 * you may not use this file except in compliance with the License.
2066 * You may obtain a copy of the License at
2067 *
2068 *   http://www.apache.org/licenses/LICENSE-2.0
2069 *
2070 * Unless required by applicable law or agreed to in writing, software
2071 * distributed under the License is distributed on an "AS IS" BASIS,
2072 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2073 * See the License for the specific language governing permissions and
2074 * limitations under the License.
2075 */class X8{constructor(e,n=null,r=[],s=[],i=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=s,this.limit=i,this.startAt=o,this.endAt=a,this.ce=null}}function wE(t,e=null,n=[],r=[],s=null,i=null,o=null){return new X8(t,e,n,r,s,i,o)}function Zg(t){const e=Pe(t);if(e.ce===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>Bp(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(i){return i.field.canonicalString()+i.dir}(r)).join(","),of(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>Uo(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>Uo(r)).join(",")),e.ce=n}return e.ce}function ev(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!H8(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!cP(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!_E(t.startAt,e.startAt)&&_E(t.endAt,e.endAt)}function Hp(t){return me.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/**
2076 * @license
2077 * Copyright 2017 Google LLC
2078 *
2079 * Licensed under the Apache License, Version 2.0 (the "License");
2080 * you may not use this file except in compliance with the License.
2081 * You may obtain a copy of the License at
2082 *
2083 *   http://www.apache.org/licenses/LICENSE-2.0
2084 *
2085 * Unless required by applicable law or agreed to in writing, software
2086 * distributed under the License is distributed on an "AS IS" BASIS,
2087 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2088 * See the License for the specific language governing permissions and
2089 * limitations under the License.
2090 */class ac{constructor(e,n=null,r=[],s=[],i=null,o="F",a=null,l=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=s,this.limit=i,this.limitType=o,this.startAt=a,this.endAt=l,this.le=null,this.he=null,this.Pe=null,this.startAt,this.endAt}}function J8(t,e,n,r,s,i,o,a){return new ac(t,e,n,r,s,i,o,a)}function tv(t){return new ac(t)}function EE(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function fP(t){return t.collectionGroup!==null}function Ka(t){const e=Pe(t);if(e.le===null){e.le=[];const n=new Set;for(const i of e.explicitOrderBy)e.le.push(i),n.add(i.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let a=new xt(Nt.comparator);return o.filters.forEach(l=>{l.getFlattenedFilters().forEach(c=>{c.isInequality()&&(a=a.add(c.field))})}),a})(e).forEach(i=>{n.has(i.canonicalString())||i.isKeyField()||e.le.push(new rh(i,r))}),n.has(Nt.keyField().canonicalString())||e.le.push(new rh(Nt.keyField(),r))}return e.le}function Ar(t){const e=Pe(t);return e.he||(e.he=Z8(e,Ka(t))),e.he}function Z8(t,e){if(t.limitType==="F")return wE(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(s=>{const i=s.dir==="desc"?"asc":"desc";return new rh(s.field,i)});const n=t.endAt?new nh(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new nh(t.startAt.position,t.startAt.inclusive):null;return wE(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function jp(t,e){const n=t.filters.concat([e]);return new ac(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function Wp(t,e,n){return new ac(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function af(t,e){return ev(Ar(t),Ar(e))&&t.limitType===e.limitType}function dP(t){return`${Zg(Ar(t))}|lt:${t.limitType}`}function Qi(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(s=>uP(s)).join(", ")}]`),of(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(s=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(s)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(s=>Uo(s)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(s=>Uo(s)).join(",")),`Target(${r})`}(Ar(t))}; limitType=${t.limitType})`}function lf(t,e){return e.isFoundDocument()&&function(r,s){const i=s.key.path;return r.collectionGroup!==null?s.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(i):me.isDocumentKey(r.path)?r.path.isEqual(i):r.path.isImmediateParentOf(i)}(t,e)&&function(r,s){for(const i of Ka(r))if(!i.field.isKeyField()&&s.data.field(i.field)===null)return!1;return!0}(t,e)&&function(r,s){for(const i of r.filters)if(!i.matches(s))return!1;return!0}(t,e)&&function(r,s){return!(r.startAt&&!function(o,a,l){const c=yE(o,a,l);return o.inclusive?c<=0:c<0}(r.startAt,Ka(r),s)||r.endAt&&!function(o,a,l){const c=yE(o,a,l);return o.inclusive?c>=0:c>0}(r.endAt,Ka(r),s))}(t,e)}function e7(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function pP(t){return(e,n)=>{let r=!1;for(const s of Ka(t)){const i=t7(s,e,n);if(i!==0)return i;r=r||s.field.isKeyField()}return 0}}function t7(t,e,n){const r=t.field.isKeyField()?me.comparator(e.key,n.key):function(i,o,a){const l=o.data.field(i),c=a.data.field(i);return l!==null&&c!==null?Fo(l,c):Ee()}
2090(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return Ee()}}/**
2091 * @license
2092 * Copyright 2017 Google LLC
2093 *
2094 * Licensed under the Apache License, Version 2.0 (the "License");
2095 * you may not use this file except in compliance with the License.
2096 * You may obtain a copy of the License at
2097 *
2098 *   http://www.apache.org/licenses/LICENSE-2.0
2099 *
2100 * Unless required by applicable law or agreed to in writing, software
2101 * distributed under the License is distributed on an "AS IS" BASIS,
2102 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2103 * See the License for the specific language governing permissions and
2104 * limitations under the License.
2105 */class oa{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[s,i]of r)if(this.equalsFn(s,e))return i}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),s=this.inner[r];if(s===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let i=0;i<s.length;i++)if(this.equalsFn(s[i][0],e))return void(s[i]=[e,n]);s.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let s=0;s<r.length;s++)if(this.equalsFn(r[s][0],e))return r.length===1?delete this.inner[n]:r.splice(s,1),this.innerSize--,!0;return!1}forEach(e){Bi(this.inner,(n,r)=>{for(const[s,i]of r)e(s,i)})}isEmpty(){return rP(this.inner)}size(){return this.innerSize}}/**
2106 * @license
2107 * Copyright 2017 Google LLC
2108 *
2109 * Licensed under the Apache License, Version 2.0 (the "License");
2110 * you may not use this file except in compliance with the License.
2111 * You may obtain a copy of the License at
2112 *
2113 *   http://www.apache.org/licenses/LICENSE-2.0
2114 *
2115 * Unless required by applicable law or agreed to in writing, software
2116 * distributed under the License is distributed on an "AS IS" BASIS,
2117 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2118 * See the License for the specific language governing permissions and
2119 * limitations under the License.
2120 */const n7=new ft(me.comparator);function Xr(){return n7}const mP=new ft(me.comparator);function ka(...t){let e=mP;for(const n of t)e=e.insert(n.key,n);return e}function gP(t){let e=mP;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function ci(){return za()}function vP(){return za()}function za(){return new oa(t=>t.toString(),(t,e)=>t.isEqual(e))}const r7=new ft(me.comparator),s7=new xt(me.comparator);function Oe(...t){let e=s7;for(const n of t)e=e.add(n);return e}const i7=new xt(Be);function o7(){return i7}/**
2121 * @license
2122 * Copyright 2020 Google LLC
2123 *
2124 * Licensed under the Apache License, Version 2.0 (the "License");
2125 * you may not use this file except in compliance with the License.
2126 * You may obtain a copy of the License at
2127 *
2128 *   http://www.apache.org/licenses/LICENSE-2.0
2129 *
2130 * Unless required by applicable law or agreed to in writing, software
2131 * distributed under the License is distributed on an "AS IS" BASIS,
2132 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2133 * See the License for the specific language governing permissions and
2134 * limitations under the License.
2135 */function yP(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:th(e)?"-0":e}}function _P(t){return{integerValue:""+t}}function a7(t,e){return $8(e)?_P(e):yP(t,e)}/**
2136 * @license
2137 * Copyright 2018 Google LLC
2138 *
2139 * Licensed under the Apache License, Version 2.0 (the "License");
2140 * you may not use this file except in compliance with the License.
2141 * You may obtain a copy of the License at
2142 *
2143 *   http://www.apache.org/licenses/LICENSE-2.0
2144 *
2145 * Unless required by applicable law or agreed to in writing, software
2146 * distributed under the License is distributed on an "AS IS" BASIS,
2147 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2148 * See the License for the specific language governing permissions and
2149 * limitations under the License.
2150 */class cf{constructor(){this._=void 0}}function l7(t,e,n){return t instanceof sh?function(s,i){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:s.seconds,nanos:s.nanoseconds}}}};return i&&Qg(i)&&(i=Xg(i)),i&&(o.fields.__previous_value__=i),{mapValue:o}}
2150(n,e):t instanceof Dl?EP(t,e):t instanceof kl?bP(t,e):function(s,i){const o=wP(s,i),a=bE(o)+bE(s.Ie);return Up(o)&&Up(s.Ie)?_P(a):yP(s.serializer,a)}(t,e)}function c7(t,e,n){return t instanceof Dl?EP(t,e):t instanceof kl?bP(t,e):n}function wP(t,e){return t instanceof ih?function(r){return Up(r)||function(i){return!!i&&"doubleValue"in i}(r)}(e)?e:{integerValue:0}:null}class sh extends cf{}class Dl extends cf{constructor(e){super(),this.elements=e}}function EP(t,e){const n=TP(e);for(const r of t.elements)n.some(s=>Sr(s,r))||n.push(r);return{arrayValue:{values:n}}}class kl extends cf{constructor(e){super(),this.elements=e}}function bP(t,e){let n=TP(e);for(const r of t.elements)n=n.filter(s=>!Sr(s,r));return{arrayValue:{values:n}}}class ih extends cf{constructor(e,n){super(),this.serializer=e,this.Ie=n}}function bE(t){return _t(t.integerValue||t.doubleValue)}function TP(t){return Jg(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function u7(t,e){return t.field.isEqual(e.field)&&function(r,s){return r instanceof Dl&&s instanceof Dl||r instanceof kl&&s instanceof kl?$o(r.elements,s.elements,Sr):r instanceof ih&&s instanceof ih?Sr(r.Ie,s.Ie):r instanceof sh&&s instanceof sh}(t.transform,e.transform)}class h7{constructor(e,n){this.version=e,this.transformResults=n}}class qn{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new qn}static exists(e){return new qn(void 0,e)}static updateTime(e){return new qn(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 uu(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class uf{}function IP(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new nv(t.key,qn.none()):new lc(t.key,t.data,qn.none());{const n=t.data,r=on.empty();let s=new xt(Nt.comparator);for(let i of e.fields)if(!s.has(i)){let o=n.field(i);o===null&&i.length>1&&(i=i.popLast(),o=n.field(i)),o===null?r.delete(i):r.set(i,o),s=s.add(i)}return new Ys(t.key,r,new On(s.toArray()),qn.none())}}function f7(t,e,n){t instanceof lc?function(s,i,o){const a=s.value.clone(),l=IE(s.fieldTransforms,i,o.transformResults);a.setAll(l),i.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof Ys?function(s,i,o){if(!uu(s.precondition,i))return void i.convertToUnknownDocument(o.version);const a=IE(s.fieldTransforms,i,o.transformResults),l=i.data;l.setAll(AP(s)),l.setAll(a),i.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,n):function(s,i,o){i.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function Ga(t,e,n,r){return t instanceof lc?function(i,o,a,l){if(!uu(i.precondition,o))return a;const c=i.value.clone(),u=AE(i.fieldTransforms,l,o);return c.setAll(u),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(t,e,n,r):t instanceof Ys?function(i,o,a,l){if(!uu(i.precondition,o))return a;const c=AE(i.fieldTransforms,l,o),u=o.data;return u.setAll(AP(i)),u.setAll(c),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),a===null?null:a.unionWith(i.fieldMask.fields).unionWith(i.fieldTransforms.map(h=>h.field))}(t,e,n,r):function(i,o,a){return uu(i.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function d7(t,e){let n=null;for(const r of t.fieldTransforms){const s=e.data.field(r.field),i=wP(r.transform,s||null);i!=null&&(n===null&&(n=on.empty()),n.set(r.field,i))}return n||null}function TE(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,s){return r===void 0&&s===void 0||!(!r||!s)&&$o(r,s,(i,o)=>u7(i,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 lc extends uf{constructor(e,n,r,s=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=s,this.type=0}getFieldMask(){return null}}class Ys extends uf{constructor(e,n,r,s,i=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.prec
2150ondition=s,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function AP(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 IE(t,e,n){const r=new Map;Ze(t.length===n.length);for(let s=0;s<n.length;s++){const i=t[s],o=i.transform,a=e.data.field(i.field);r.set(i.field,c7(o,a,n[s]))}return r}function AE(t,e,n){const r=new Map;for(const s of t){const i=s.transform,o=n.data.field(s.field);r.set(s.field,l7(i,o,e))}return r}class nv extends uf{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class p7 extends uf{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
2151 * @license
2152 * Copyright 2017 Google LLC
2153 *
2154 * Licensed under the Apache License, Version 2.0 (the "License");
2155 * you may not use this file except in compliance with the License.
2156 * You may obtain a copy of the License at
2157 *
2158 *   http://www.apache.org/licenses/LICENSE-2.0
2159 *
2160 * Unless required by applicable law or agreed to in writing, software
2161 * distributed under the License is distributed on an "AS IS" BASIS,
2162 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2163 * See the License for the specific language governing permissions and
2164 * limitations under the License.
2165 */class m7{constructor(e,n,r,s){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=s}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let s=0;s<this.mutations.length;s++){const i=this.mutations[s];i.key.isEqual(e.key)&&f7(i,e,r[s])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=Ga(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=Ga(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=vP();return this.mutations.forEach(s=>{const i=e.get(s.key),o=i.overlayedDocument;let a=this.applyToLocalView(o,i.mutatedFields);a=n.has(s.key)?null:a;const l=IP(o,a);l!==null&&r.set(s.key,l),o.isValidDocument()||o.convertToNoDocument(Ae.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),Oe())}isEqual(e){return this.batchId===e.batchId&&$o(this.mutations,e.mutations,(n,r)=>TE(n,r))&&$o(this.baseMutations,e.baseMutations,(n,r)=>TE(n,r))}}class rv{constructor(e,n,r,s){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=s}static from(e,n,r){Ze(e.mutations.length===r.length);let s=function(){return r7}();const i=e.mutations;for(let o=0;o<i.length;o++)s=s.insert(i[o].key,r[o].version);return new rv(e,n,r,s)}}/**
2166 * @license
2167 * Copyright 2022 Google LLC
2168 *
2169 * Licensed under the Apache License, Version 2.0 (the "License");
2170 * you may not use this file except in compliance with the License.
2171 * You may obtain a copy of the License at
2172 *
2173 *   http://www.apache.org/licenses/LICENSE-2.0
2174 *
2175 * Unless required by applicable law or agreed to in writing, software
2176 * distributed under the License is distributed on an "AS IS" BASIS,
2177 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2178 * See the License for the specific language governing permissions and
2179 * limitations under the License.
2180 */class g7{constructor(e,n){this.largestBatchId=e,this.mutation=n}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{
2181      largestBatchId: ${this.largestBatchId},
2182      mutation: ${this.mutation.toString()}
2183    }`}}/**
2184 * @license
2185 * Copyright 2017 Google LLC
2186 *
2187 * Licensed under the Apache License, Version 2.0 (the "License");
2188 * you may not use this file except in compliance with the License.
2189 * You may obtain a copy of the License at
2190 *
2191 *   http://www.apache.org/licenses/LICENSE-2.0
2192 *
2193 * Unless required by applicable law or agreed to in writing, software
2194 * distributed under the License is distributed on an "AS IS" BASIS,
2195 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2196 * See the License for the specific language governing permissions and
2197 * limitations under the License.
2198 */class v7{constructor(e,n){this.count=e,this.unchangedNames=n}}/**
2199 * @license
2200 * Copyright 2017 Google LLC
2201 *
2202 * Licensed under the Apache License, Version 2.0 (the "License");
2203 * you may not use this file except in compliance with the License.
2204 * You may obtain a copy of the License at
2205 *
2206 *   http://www.apache.org/licenses/LICENSE-2.0
2207 *
2208 * Unless required by applicable law or agreed to in writing, software
2209 * distributed under the License is distributed on an "AS IS" BASIS,
2210 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2211 * See the License for the specific language governing permissions and
2212 * limitations under the License.
2213 */var yt,Le;function y7(t){switch(t){default:return Ee();case F.CANCELLED:case F.UNKNOWN:case F.DEADLINE_EXCEEDED:case F.RESOURCE_EXHAUSTED:case F.INTERNAL:case F.UNAVAILABLE:case F.UNAUTHENTICATED:return!1;case F.INVALID_ARGUMENT:case F.NOT_FOUND:case F.ALREADY_EXISTS:case F.PERMISSION_DENIED:case F.FAILED_PRECONDITION:case F.ABORTED:case F.OUT_OF_RANGE:case F.UNIMPLEMENTED:case F.DATA_LOSS:return!0}}function RP(t){if(t===void 0)return Cr("GRPC error has no .code"),F.UNKNOWN;switch(t){case yt.OK:return F.OK;case yt.CANCELLED:return F.CANCELLED;case yt.UNKNOWN:return F.UNKNOWN;case yt.DEADLINE_EXCEEDED:return F.DEADLINE_EXCEEDED;case yt.RESOURCE_EXHAUSTED:return F.RESOURCE_EXHAUSTED;case yt.INTERNAL:return F.INTERNAL;case yt.UNAVAILABLE:return F.UNAVAILABLE;case yt.UNAUTHENTICATED:return F.UNAUTHENTICATED;case yt.INVALID_ARGUMENT:return F.INVALID_ARGUMENT;case yt.NOT_FOUND:return F.NOT_FOUND;case yt.ALREADY_EXISTS:return F.ALREADY_EXISTS;case yt.PERMISSION_DENIED:return F.PERMISSION_DENIED;case yt.FAILED_PRECONDITION:return F.FAILED_PRECONDITION;case yt.ABORTED:return F.ABORTED;case yt.OUT_OF_RANGE:return F.OUT_OF_RANGE;case yt.UNIMPLEMENTED:return F.UNIMPLEMENTED;case yt.DATA_LOSS:return F.DATA_LOSS;default:return Ee()}}(Le=yt||(yt={}))[Le.OK=0]="OK",Le[Le.CANCELLED=1]="CANCELLED",Le[Le.UNKNOWN=2]="UNKNOWN",Le[Le.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Le[Le.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Le[Le.NOT_FOUND=5]="NOT_FOUND",Le[Le.ALREADY_EXISTS=6]="ALREADY_EXISTS",Le[Le.PERMISSION_DENIED=7]="PERMISSION_DENIED",Le[Le.UNAUTHENTICATED=16]="UNAUTHENTICATED",Le[Le.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Le[Le.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Le[Le.ABORTED=10]="ABORTED",Le[Le.OUT_OF_RANGE=11]="OUT_OF_RANGE",Le[Le.UNIMPLEMENTED=12]="UNIMPLEMENTED",Le[Le.INTERNAL=13]="INTERNAL",Le[Le.UNAVAILABLE=14]="UNAVAILABLE",Le[Le.DATA_LOSS=15]="DATA_LOSS";/**
2214 * @license
2215 * Copyright 2023 Google LLC
2216 *
2217 * Licensed under the Apache License, Version 2.0 (the "License");
2218 * you may not use this file except in compliance with the License.
2219 * You may obtain a copy of the License at
2220 *
2221 *   http://www.apache.org/licenses/LICENSE-2.0
2222 *
2223 * Unless required by applicable law or agreed to in writing, software
2224 * distributed under the License is distributed on an "AS IS" BASIS,
2225 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2226 * See the License for the specific language governing permissions and
2227 * limitations under the License.
2228 */function _7(){return new TextEncoder}/**
2229 * @license
2230 * Copyright 2022 Google LLC
2231 *
2232 * Licensed under the Apache License, Version 2.0 (the "License");
2233 * you may not use this file except in compliance with the License.
2234 * You may obtain a copy of the License at
2235 *
2236 *   http://www.apache.org/licenses/LICENSE-2.0
2237 *
2238 * Unless required by applicable law or agreed to in writing, software
2239 * distributed under the License is distributed on an "AS IS" BASIS,
2240 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2241 * See the License for the specific language governing permissions and
2242 * limitations under the License.
2243 */const w7=new Eo([4294967295,4294967295],0);function RE(t){const e=_7().encode(t),n=new E8;return n.update(e),new Uint8Array(n.digest())}function PE(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),s=e.getUint32(8,!0),i=e.getUint32(12,!0);return[new Eo([n,r],0),new Eo([s,i],0)]}class sv{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Oa(`Invalid padding: ${n}`);if(r<0)throw new Oa(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Oa(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Oa(`Invalid padding when bitmap length is 0: ${n}`);this.Te=8*e.length-n,this.Ee=Eo.fromNumber(this.Te)}de(e,n,r){let s=e.add(n.multiply(Eo.fromNumber(r)));return s.compare(w7)===1&&(s=new Eo([s.getBits(0),s.getBits(1)],0)),s.modulo(this.Ee).toNumber()}Ae(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Te===0)return!1;const n=RE(e),[r,s]=PE(n);for(let i=0;i<this.hashCount;i++){const o=this.de(r,s,i);if(!this.Ae(o))return!1}return!0}static create(e,n,r){const s=e%8==0?0:8-e%8,i=new Uint8Array(Math.ceil(e/8)),o=new sv(i,s,n);return r.forEach(a=>o.insert(a)),o}insert(e){if(this.Te===0)return;const n=RE(e),[r,s]=PE(n);for(let i=0;i<this.hashCount;i++){const o=this.de(r,s,i);this.Re(o)}}Re(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}
2243class Oa extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
2244 * @license
2245 * Copyright 2017 Google LLC
2246 *
2247 * Licensed under the Apache License, Version 2.0 (the "License");
2248 * you may not use this file except in compliance with the License.
2249 * You may obtain a copy of the License at
2250 *
2251 *   http://www.apache.org/licenses/LICENSE-2.0
2252 *
2253 * Unless required by applicable law or agreed to in writing, software
2254 * distributed under the License is distributed on an "AS IS" BASIS,
2255 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2256 * See the License for the specific language governing permissions and
2257 * limitations under the License.
2258 */class hf{constructor(e,n,r,s,i){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=s,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const s=new Map;return s.set(e,cc.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new hf(Ae.min(),s,new ft(Be),Xr(),Oe())}}class cc{constructor(e,n,r,s,i){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=s,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new cc(r,n,Oe(),Oe(),Oe())}}/**
2259 * @license
2260 * Copyright 2017 Google LLC
2261 *
2262 * Licensed under the Apache License, Version 2.0 (the "License");
2263 * you may not use this file except in compliance with the License.
2264 * You may obtain a copy of the License at
2265 *
2266 *   http://www.apache.org/licenses/LICENSE-2.0
2267 *
2268 * Unless required by applicable law or agreed to in writing, software
2269 * distributed under the License is distributed on an "AS IS" BASIS,
2270 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2271 * See the License for the specific language governing permissions and
2272 * limitations under the License.
2273 */class hu{constructor(e,n,r,s){this.Ve=e,this.removedTargetIds=n,this.key=r,this.me=s}}class PP{constructor(e,n){this.targetId=e,this.fe=n}}class CP{constructor(e,n,r=Wt.EMPTY_BYTE_STRING,s=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=s}}class CE{constructor(){this.ge=0,this.pe=DE(),this.ye=Wt.EMPTY_BYTE_STRING,this.we=!1,this.Se=!0}get current(){return this.we}get resumeToken(){return this.ye}get be(){return this.ge!==0}get De(){return this.Se}Ce(e){e.approximateByteSize()>0&&(this.Se=!0,this.ye=e)}ve(){let e=Oe(),n=Oe(),r=Oe();return this.pe.forEach((s,i)=>{switch(i){case 0:e=e.add(s);break;case 2:n=n.add(s);break;case 1:r=r.add(s);break;default:Ee()}}),new cc(this.ye,this.we,e,n,r)}Fe(){this.Se=!1,this.pe=DE()}Me(e,n){this.Se=!0,this.pe=this.pe.insert(e,n)}xe(e){this.Se=!0,this.pe=this.pe.remove(e)}Oe(){this.ge+=1}Ne(){this.ge-=1,Ze(this.ge>=0)}Be(){this.Se=!0,this.we=!0}}class E7{constructor(e){this.Le=e,this.ke=new Map,this.qe=Xr(),this.Qe=SE(),this.Ke=new ft(Be)}$e(e){for(const n of e.Ve)e.me&&e.me.isFoundDocument()?this.Ue(n,e.me):this.We(n,e.key,e.me);for(const n of e.removedTargetIds)this.We(n,e.key,e.me)}Ge(e){this.forEachTarget(e,n=>{const r=this.ze(n);switch(e.state){case 0:this.je(n)&&r.Ce(e.resumeToken);break;case 1:r.Ne(),r.be||r.Fe(),r.Ce(e.resumeToken);break;case 2:r.Ne(),r.be||this.removeTarget(n);break;case 3:this.je(n)&&(r.Be(),r.Ce(e.resumeToken));break;case 4:this.je(n)&&(this.He(n),r.Ce(e.resumeToken));break;default:Ee()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.ke.forEach((r,s)=>{this.je(s)&&n(s)})}Je(e){const n=e.targetId,r=e.fe.count,s=this.Ye(n);if(s){const i=s.target;if(Hp(i))if(r===0){const o=new me(i.path);this.We(n,o,Ut.newNoDocument(o,Ae.min()))}else Ze(r===1);else{const o=this.Ze(n);if(o!==r){const a=this.Xe(e),l=a?this.et(a,e,o):1;if(l!==0){this.He(n);const c=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(n,c)}}}}}Xe(e){const n=e.fe.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:s=0},hashCount:i=0}=n;let o,a;try{o=Di(r).toUint8Array()}catch(l){if(l instanceof sP)return Vo("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new sv(o,s,i)}catch(l){return Vo(l instanceof Oa?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.Te===0?null:a}et(e,n,r){return n.fe.count===r-this.rt(e,n.targetId)?0:2}rt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let s=0;return r.forEach(i=>
2273{const o=this.Le.nt(),a=`projects/${o.projectId}/databases/${o.database}/documents/${i.path.canonicalString()}`;e.mightContain(a)||(this.We(n,i,null),s++)}),s}it(e){const n=new Map;this.ke.forEach((i,o)=>{const a=this.Ye(o);if(a){if(i.current&&Hp(a.target)){const l=new me(a.target.path);this.qe.get(l)!==null||this.st(o,l)||this.We(o,l,Ut.newNoDocument(l,e))}i.De&&(n.set(o,i.ve()),i.Fe())}});let r=Oe();this.Qe.forEach((i,o)=>{let a=!0;o.forEachWhile(l=>{const c=this.Ye(l);return!c||c.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(i))}),this.qe.forEach((i,o)=>o.setReadTime(e));const s=new hf(e,n,this.Ke,this.qe,r);return this.qe=Xr(),this.Qe=SE(),this.Ke=new ft(Be),s}Ue(e,n){if(!this.je(e))return;const r=this.st(e,n.key)?2:0;this.ze(e).Me(n.key,r),this.qe=this.qe.insert(n.key,n),this.Qe=this.Qe.insert(n.key,this.ot(n.key).add(e))}We(e,n,r){if(!this.je(e))return;const s=this.ze(e);this.st(e,n)?s.Me(n,1):s.xe(n),this.Qe=this.Qe.insert(n,this.ot(n).delete(e)),r&&(this.qe=this.qe.insert(n,r))}removeTarget(e){this.ke.delete(e)}Ze(e){const n=this.ze(e).ve();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Oe(e){this.ze(e).Oe()}ze(e){let n=this.ke.get(e);return n||(n=new CE,this.ke.set(e,n)),n}ot(e){let n=this.Qe.get(e);return n||(n=new xt(Be),this.Qe=this.Qe.insert(e,n)),n}je(e){const n=this.Ye(e)!==null;return n||ne("WatchChangeAggregator","Detected inactive target",e),n}Ye(e){const n=this.ke.get(e);return n&&n.be?null:this.Le._t(e)}He(e){this.ke.set(e,new CE),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.We(e,n,null)})}st(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function SE(){return new ft(me.comparator)}function DE(){return new ft(me.comparator)}const b7={asc:"ASCENDING",desc:"DESCENDING"},T7={"<":"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"},I7={and:"AND",or:"OR"};class A7{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Yp(t,e){return t.useProto3Json||of(e)?e:{value:e}}function oh(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 SP(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function R7(t,e){return oh(t,e.toTimestamp())}function Rr(t){return Ze(!!t),Ae.fromTimestamp(function(n){const r=xs(n);return new Rt(r.seconds,r.nanos)}(t))}function iv(t,e){return qp(t,e).canonicalString()}function qp(t,e){const n=function(s){return new st(["projects",s.projectId,"databases",s.database])}(t).child("documents");return e===void 0?n:n.child(e)}function DP(t){const e=st.fromString(t);return Ze(LP(e)),e}function Kp(t,e){return iv(t.databaseId,e.path)}function vd(t,e){const n=DP(e);if(n.get(1)!==t.databaseId.projectId)throw new ce(F.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 ce(F.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new me(OP(n))}function kP(t,e){return iv(t.databaseId,e)}function P7(t){const e=DP(t);return e.length===4?st.emptyPath():OP(e)}function zp(t){return new st(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function OP(t){return Ze(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function kE(t,e,n){return{name:Kp(t,e),fields:n.value.mapValue.fields}}function C7(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:Ee()}(e.targetChange.targetChangeType||"NO_CHANGE"),s=e.targetChange.targetIds||[],i=function(c,u){return c.useProto3Json?(Ze(u===void 0||typeof u=="string"),Wt.fromBase64String(u||"")):(Ze(u===void 0||u instanceof Uint8Array),Wt.fromUint8Array(u||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(c){const u=c.code===void 0?F.UNKNOWN:RP(c.co
2273de);return new ce(u,c.message||"")}(o);n=new CP(r,s,i,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const s=vd(t,r.document.name),i=Rr(r.document.updateTime),o=r.document.createTime?Rr(r.document.createTime):Ae.min(),a=new on({mapValue:{fields:r.document.fields}}),l=Ut.newFoundDocument(s,i,o,a),c=r.targetIds||[],u=r.removedTargetIds||[];n=new hu(c,u,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const s=vd(t,r.document),i=r.readTime?Rr(r.readTime):Ae.min(),o=Ut.newNoDocument(s,i),a=r.removedTargetIds||[];n=new hu([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const s=vd(t,r.document),i=r.removedTargetIds||[];n=new hu([],i,s,null)}else{if(!("filter"in e))return Ee();{e.filter;const r=e.filter;r.targetId;const{count:s=0,unchangedNames:i}=r,o=new v7(s,i),a=r.targetId;n=new PP(a,o)}}return n}function S7(t,e){let n;if(e instanceof lc)n={update:kE(t,e.key,e.value)};else if(e instanceof nv)n={delete:Kp(t,e.key)};else if(e instanceof Ys)n={update:kE(t,e.key,e.data),updateMask:$7(e.fieldMask)};else{if(!(e instanceof p7))return Ee();n={verify:Kp(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(i,o){const a=o.transform;if(a instanceof sh)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Dl)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof kl)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof ih)return{fieldPath:o.field.canonicalString(),increment:a.Ie};throw Ee()}(0,r))),e.precondition.isNone||(n.currentDocument=function(s,i){return i.updateTime!==void 0?{updateTime:R7(s,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:Ee()}(t,e.precondition)),n}function D7(t,e){return t&&t.length>0?(Ze(e!==void 0),t.map(n=>function(s,i){let o=s.updateTime?Rr(s.updateTime):Rr(i);return o.isEqual(Ae.min())&&(o=Rr(i)),new h7(o,s.transformResults||[])}(n,e))):[]}function k7(t,e){return{documents:[kP(t,e.path)]}}function O7(t,e){const n={structuredQuery:{}},r=e.path;let s;e.collectionGroup!==null?(s=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(s=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=kP(t,s);const i=function(c){if(c.length!==0)return NP(or.create(c,"and"))}(e.filters);i&&(n.structuredQuery.where=i);const o=function(c){if(c.length!==0)return c.map(u=>function(f){return{field:Xi(f.field),direction:L7(f.dir)}}(u))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const a=Yp(t,e.limit);return a!==null&&(n.structuredQuery.limit=a),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)),{ut:n,parent:s}}function M7(t){let e=P7(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let s=null;if(r>0){Ze(r===1);const u=n.from[0];u.allDescendants?s=u.collectionId:e=e.child(u.collectionId)}let i=[];n.where&&(i=function(h){const f=MP(h);return f instanceof or&&lP(f)?f.getFilters():[f]}(n.where));let o=[];n.orderBy&&(o=function(h){return h.map(f=>function(p){return new rh(Ji(p.field),function(m){switch(m){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(p.direction))}(f))}(n.orderBy));let a=null;n.limit&&(a=function(h){let f;return f=typeof h=="object"?h.value:h,of(f)?null:f}(n.limit));let l=null;n.startAt&&(l=function(h){const f=!!h.before,d=h.values||[];return new nh(d,f)}(n.startAt));let c=null;return n.endAt&&(c=function(h){const f=!h.before,d=h.values||[];return new nh(d,f)}(n.endAt)),J8(e,s,o,i,a,"F",l,c)}function N7(t,e){const n=function(s){switch(s){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Ee()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function MP(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Ji(n.unaryFilter.field);return wt.create(r,"==",{doubleValue:NaN});case"IS_NULL":const s=Ji(n.unaryFilter.field);return wt.create(s,"==",{nullValue:"NULL_VALUE"});
2273case"IS_NOT_NAN":const i=Ji(n.unaryFilter.field);return wt.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Ji(n.unaryFilter.field);return wt.create(o,"!=",{nullValue:"NULL_VALUE"});default:return Ee()}}(t):t.fieldFilter!==void 0?function(n){return wt.create(Ji(n.fieldFilter.field),function(s){switch(s){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 Ee()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return or.create(n.compositeFilter.filters.map(r=>MP(r)),function(s){switch(s){case"AND":return"and";case"OR":return"or";default:return Ee()}}(n.compositeFilter.op))}(t):Ee()}function L7(t){return b7[t]}function x7(t){return T7[t]}function V7(t){return I7[t]}function Xi(t){return{fieldPath:t.canonicalString()}}function Ji(t){return Nt.fromServerFormat(t.fieldPath)}function NP(t){return t instanceof wt?function(n){if(n.op==="=="){if(vE(n.value))return{unaryFilter:{field:Xi(n.field),op:"IS_NAN"}};if(gE(n.value))return{unaryFilter:{field:Xi(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(vE(n.value))return{unaryFilter:{field:Xi(n.field),op:"IS_NOT_NAN"}};if(gE(n.value))return{unaryFilter:{field:Xi(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Xi(n.field),op:x7(n.op),value:n.value}}}(t):t instanceof or?function(n){const r=n.getFilters().map(s=>NP(s));return r.length===1?r[0]:{compositeFilter:{op:V7(n.op),filters:r}}}(t):Ee()}function $7(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function LP(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/**
2274 * @license
2275 * Copyright 2017 Google LLC
2276 *
2277 * Licensed under the Apache License, Version 2.0 (the "License");
2278 * you may not use this file except in compliance with the License.
2279 * You may obtain a copy of the License at
2280 *
2281 *   http://www.apache.org/licenses/LICENSE-2.0
2282 *
2283 * Unless required by applicable law or agreed to in writing, software
2284 * distributed under the License is distributed on an "AS IS" BASIS,
2285 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2286 * See the License for the specific language governing permissions and
2287 * limitations under the License.
2288 */class Is{constructor(e,n,r,s,i=Ae.min(),o=Ae.min(),a=Wt.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=s,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(e){return new Is(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new Is(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Is(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Is(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
2289 * @license
2290 * Copyright 2017 Google LLC
2291 *
2292 * Licensed under the Apache License, Version 2.0 (the "License");
2293 * you may not use this file except in compliance with the License.
2294 * You may obtain a copy of the License at
2295 *
2296 *   http://www.apache.org/licenses/LICENSE-2.0
2297 *
2298 * Unless required by applicable law or agreed to in writing, software
2299 * distributed under the License is distributed on an "AS IS" BASIS,
2300 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2301 * See the License for the specific language governing permissions and
2302 * limitations under the License.
2303 */class F7{constructor(e){this.ct=e}}function U7(t){const e=M7({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?Wp(e,e.limit,"L"):e}/**
2304 * @license
2305 * Copyright 2019 Google LLC
2306 *
2307 * Licensed under the Apache License, Version 2.0 (the "License");
2308 * you may not use this file except in compliance with the License.
2309 * You may obtain a copy of the License at
2310 *
2311 *   http://www.apache.org/licenses/LICENSE-2.0
2312 *
2313 * Unless required by applicable law or agreed to in writing, software
2314 * distributed under the License is distributed on an "AS IS" BASIS,
2315 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2316 * See the License for the specific language governing permissions and
2317 * limitations under the License.
2318 */class B7{constructor(){this._n=new H7}addToCollectionParentIndex(e,n){return this._n.add(n),H.resolve()}getCollectionParents(e,n){return H.resolve(this._n.getEntries(n))}addFieldIndex(e,n){return H.resolve()}deleteFieldIndex(e,n){return H.resolve()}deleteAllFieldIndexes(e){return H.resolve()}createTargetIndexes(e,n){return H.resolve()}getDocumentsMatchingTarget(e,n){return H.resolve(null)}getIndexType(e,n){return H.resolve(0)}getFieldIndexes(e,n){return H.resolve([])}getNextCollectionGroupToUpdate(e){return H.resolve(null)}getMinOffset(e,n){return H.resolve(Ls.min())}getMinOffsetFromCollectionGroup(e,n){return H.resolve(Ls.min())}updateCollectionGroup(e,n,r){return H.resolve()}updateIndexEntries(e,n){return H.resolve()}}class H7{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),s=this.index[n]||new xt(st.comparator),i=!s.has(r);return this.index[n]=s.add(r),i}has(e){const n=e.lastSegment(),r=e.popLast(),s=this.index[n];return s&&s.has(r)}getEntries(e){return(this.index[e]||new xt(st.comparator)).toArray()}}/**
2319 * @license
2320 * Copyright 2017 Google LLC
2321 *
2322 * Licensed under the Apache License, Version 2.0 (the "License");
2323 * you may not use this file except in compliance with the License.
2324 * You may obtain a copy of the License at
2325 *
2326 *   http://www.apache.org/licenses/LICENSE-2.0
2327 *
2328 * Unless required by applicable law or agreed to in writing, software
2329 * distributed under the License is distributed on an "AS IS" BASIS,
2330 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2331 * See the License for the specific language governing permissions and
2332 * limitations under the License.
2333 */class Bo{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new Bo(0)}static Bn(){return new Bo(-1)}}/**
2334 * @license
2335 * Copyright 2017 Google LLC
2336 *
2337 * Licensed under the Apache License, Version 2.0 (the "License");
2338 * you may not use this file except in compliance with the License.
2339 * You may obtain a copy of the License at
2340 *
2341 *   http://www.apache.org/licenses/LICENSE-2.0
2342 *
2343 * Unless required by applicable law or agreed to in writing, software
2344 * distributed under the License is distributed on an "AS IS" BASIS,
2345 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2346 * See the License for the specific language governing permissions and
2347 * limitations under the License.
2348 */class j7{constructor(){this.changes=new oa(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,Ut.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?H.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(){}}/**
2349 * @license
2350 * Copyright 2017 Google LLC
2351 *
2352 * Licensed under the Apache License, Version 2.0 (the "License");
2353 * you may not use this file except in compliance with the License.
2354 * You may obtain a copy of the License at
2355 *
2356 *   http://www.apache.org/licenses/LICENSE-2.0
2357 *
2358 * Unless required by applicable law or agreed to in writing, software
2359 * distributed under the License is distributed on an "AS IS" BASIS,
2360 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2361 * See the License for the specific language governing permissions and
2362 * limitations under the License.
2363 *//**
2364 * @license
2365 * Copyright 2022 Google LLC
2366 *
2367 * Licensed under the Apache License, Version 2.0 (the "License");
2368 * you may not use this file except in compliance with the License.
2369 * You may obtain a copy of the License at
2370 *
2371 *   http://www.apache.org/licenses/LICENSE-2.0
2372 *
2373 * Unless required by applicable law or agreed to in writing, software
2374 * distributed under the License is distributed on an "AS IS" BASIS,
2375 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2376 * See the License for the specific language governing permissions and
2377 * limitations under the License.
2378 */class W7{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/**
2379 * @license
2380 * Copyright 2017 Google LLC
2381 *
2382 * Licensed under the Apache License, Version 2.0 (the "License");
2383 * you may not use this file except in compliance with the License.
2384 * You may obtain a copy of the License at
2385 *
2386 *   http://www.apache.org/licenses/LICENSE-2.0
2387 *
2388 * Unless required by applicable law or agreed to in writing, software
2389 * distributed under the License is distributed on an "AS IS" BASIS,
2390 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2391 * See the License for the specific language governing permissions and
2392 * limitations under the License.
2393 */class Y7{constructor(e,n,r,s){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=s}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(s=>(r=s,this.remoteDocumentCache.getEntry(e,n))).next(s=>(r!==null&&Ga(r.mutation,s,On.empty(),Rt.now()),s))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Oe()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Oe()){const s=ci();return this.populateOverlays(e,s,n).next(()=>this.computeViews(e,n,s,r).next(i=>{let o=ka();return i.forEach((a,l)=>{o=o.insert(a,l.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=ci();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Oe()))}populateOverlays(e,n,r){const s=[];return r.forEach(i=>{n.has(i)||s.push(i)}),this.documentOverlayCache.getOverlays(e,s).next(i=>{i.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,r,s){let i=Xr();const o=za(),a=function(){return za()}();return n.forEach((l,c)=>{const u=r.get(c.key);s.has(c.key)&&(u===void 0||u.mutation instanceof Ys)?i=i.insert(c.key,c):u!==void 0?(o.set(c.key,u.mutation.getFieldMask()),Ga(u.mutation,c,u.mutation.getFieldMask(),Rt.now())):o.set(c.key,On.empty())}),this.recalculateAndSaveOverlays(e,i).next(l=>(l.forEach((c,u)=>o.set(c,u)),n.forEach((c,u)=>{var h;return a.set(c,new W7(u,(h=o.get(c))!==null&&h!==void 0?h:null))}),a))}recalculateAndSaveOverlays(e,n){const r=za();let s=new ft((o,a)=>o-a),i=Oe();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const a of o)a.keys().forEach(l=>{const c=n.get(l);if(c===null)return;let u=r.get(l)||On.empty();u=a.applyToLocalView(c,u),r.set(l,u);const h=(s.get(a.batchId)||Oe()).add(l);s=s.insert(a.batchId,h)})}).next(()=>{const o=[],a=s.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),c=l.key,u=l.value,h=vP();u.forEach(f=>{if(!i.has(f)){const d=IP(n.get(f),r.get(f));d!==null&&h.set(f,d),i=i.add(f)}}),o.push(this.documentOverlayCache.saveOverlays(e,c,h))}return H.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,s){return function(o){return me.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):fP(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,s):this.getDocumentsMatchingCollectionQuery(e,n,r,s)}getNextDocuments(e,n,r,s){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,s).next(i=>{const o=s-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,s-i.size):H.resolve(ci());let a=-1,l=i;return o.next(c=>H.forEach(c,(u,h)=>(a<h.largestBatchId&&(a=h.largestBatchId),i.get(u)?H.resolve():this.remoteDocumentCache.getEntry(e,u).next(f=>{l=l.insert(u,f)}))).next(()=>this.populateOverlays(e,c,i)).next(()=>
2393this.computeViews(e,l,c,Oe())).next(u=>({batchId:a,changes:gP(u)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new me(n)).next(r=>{let s=ka();return r.isFoundDocument()&&(s=s.insert(r.key,r)),s})}getDocumentsMatchingCollectionGroupQuery(e,n,r,s){const i=n.collectionGroup;let o=ka();return this.indexManager.getCollectionParents(e,i).next(a=>H.forEach(a,l=>{const c=function(h,f){return new ac(f,null,h.explicitOrderBy.slice(),h.filters.slice(),h.limit,h.limitType,h.startAt,h.endAt)}(n,l.child(i));return this.getDocumentsMatchingCollectionQuery(e,c,r,s).next(u=>{u.forEach((h,f)=>{o=o.insert(h,f)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r,s){let i;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,i,s))).next(o=>{i.forEach((l,c)=>{const u=c.getKey();o.get(u)===null&&(o=o.insert(u,Ut.newInvalidDocument(u)))});let a=ka();return o.forEach((l,c)=>{const u=i.get(l);u!==void 0&&Ga(u.mutation,c,On.empty(),Rt.now()),lf(n,c)&&(a=a.insert(l,c))}),a})}}/**
2394 * @license
2395 * Copyright 2020 Google LLC
2396 *
2397 * Licensed under the Apache License, Version 2.0 (the "License");
2398 * you may not use this file except in compliance with the License.
2399 * You may obtain a copy of the License at
2400 *
2401 *   http://www.apache.org/licenses/LICENSE-2.0
2402 *
2403 * Unless required by applicable law or agreed to in writing, software
2404 * distributed under the License is distributed on an "AS IS" BASIS,
2405 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2406 * See the License for the specific language governing permissions and
2407 * limitations under the License.
2408 */class q7{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,n){return H.resolve(this.cr.get(n))}saveBundleMetadata(e,n){return this.cr.set(n.id,function(s){return{id:s.id,version:s.version,createTime:Rr(s.createTime)}}(n)),H.resolve()}getNamedQuery(e,n){return H.resolve(this.lr.get(n))}saveNamedQuery(e,n){return this.lr.set(n.name,function(s){return{name:s.name,query:U7(s.bundledQuery),readTime:Rr(s.readTime)}}(n)),H.resolve()}}/**
2409 * @license
2410 * Copyright 2022 Google LLC
2411 *
2412 * Licensed under the Apache License, Version 2.0 (the "License");
2413 * you may not use this file except in compliance with the License.
2414 * You may obtain a copy of the License at
2415 *
2416 *   http://www.apache.org/licenses/LICENSE-2.0
2417 *
2418 * Unless required by applicable law or agreed to in writing, software
2419 * distributed under the License is distributed on an "AS IS" BASIS,
2420 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2421 * See the License for the specific language governing permissions and
2422 * limitations under the License.
2423 */class K7{constructor(){this.overlays=new ft(me.comparator),this.hr=new Map}getOverlay(e,n){return H.resolve(this.overlays.get(n))}getOverlays(e,n){const r=ci();return H.forEach(n,s=>this.getOverlay(e,s).next(i=>{i!==null&&r.set(s,i)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((s,i)=>{this.ht(e,n,i)}),H.resolve()}removeOverlaysForBatchId(e,n,r){const s=this.hr.get(r);return s!==void 0&&(s.forEach(i=>this.overlays=this.overlays.remove(i)),this.hr.delete(r)),H.resolve()}getOverlaysForCollection(e,n,r){const s=ci(),i=n.length+1,o=new me(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const l=a.getNext().value,c=l.getKey();if(!n.isPrefixOf(c.path))break;c.path.length===i&&l.largestBatchId>r&&s.set(l.getKey(),l)}return H.resolve(s)}getOverlaysForCollectionGroup(e,n,r,s){let i=new ft((c,u)=>c-u);const o=this.overlays.getIterator();for(;o.hasNext();){const c=o.getNext().value;if(c.getKey().getCollectionGroup()===n&&c.largestBatchId>r){let u=i.get(c.largestBatchId);u===null&&(u=ci(),i=i.insert(c.largestBatchId,u)),u.set(c.getKey(),c)}}const a=ci(),l=i.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((c,u)=>a.set(c,u)),!(a.size()>=s)););return H.resolve(a)}ht(e,n,r){const s=this.overlays.get(r.key);if(s!==null){const o=this.hr.get(s.largestBatchId).delete(r.key);this.hr.set(s.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new g7(n,r));let i=this.hr.get(n);i===void 0&&(i=Oe(),this.hr.set(n,i)),this.hr.set(n,i.add(r.key))}}/**
2424 * @license
2425 * Copyright 2017 Google LLC
2426 *
2427 * Licensed under the Apache License, Version 2.0 (the "License");
2428 * you may not use this file except in compliance with the License.
2429 * You may obtain a copy of the License at
2430 *
2431 *   http://www.apache.org/licenses/LICENSE-2.0
2432 *
2433 * Unless required by applicable law or agreed to in writing, software
2434 * distributed under the License is distributed on an "AS IS" BASIS,
2435 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2436 * See the License for the specific language governing permissions and
2437 * limitations under the License.
2438 */class ov{constructor(){this.Pr=new xt(Ct.Ir),this.Tr=new xt(Ct.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,n){const r=new Ct(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 Ct(e,n))}Rr(e,n){e.forEach(r=>this.removeReference(r,n))}Vr(e){const n=new me(new st([])),r=new Ct(n,e),s=new Ct(n,e+1),i=[];return this.Tr.forEachInRange([r,s],o=>{this.Ar(o),i.push(o.key)}),i}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 me(new st([])),r=new Ct(n,e),s=new Ct(n,e+1);let i=Oe();return this.Tr.forEachInRange([r,s],o=>{i=i.add(o.key)}),i}containsKey(e){const n=new Ct(e,0),r=this.Pr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class Ct{constructor(e,n){this.key=e,this.pr=n}static Ir(e,n){return me.comparator(e.key,n.key)||Be(e.pr,n.pr)}static Er(e,n){return Be(e.pr,n.pr)||me.comparator(e.key,n.key)}}/**
2439 * @license
2440 * Copyright 2017 Google LLC
2441 *
2442 * Licensed under the Apache License, Version 2.0 (the "License");
2443 * you may not use this file except in compliance with the License.
2444 * You may obtain a copy of the License at
2445 *
2446 *   http://www.apache.org/licenses/LICENSE-2.0
2447 *
2448 * Unless required by applicable law or agreed to in writing, software
2449 * distributed under the License is distributed on an "AS IS" BASIS,
2450 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2451 * See the License for the specific language governing permissions and
2452 * limitations under the License.
2453 */class z7{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.yr=1,this.wr=new xt(Ct.Ir)}checkEmpty(e){return H.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,s){const i=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new m7(i,n,r,s);this.mutationQueue.push(o);for(const a of s)this.wr=this.wr.add(new Ct(a.key,i)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return H.resolve(o)}lookupMutationBatch(e,n){return H.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,s=this.br(r),i=s<0?0:s;return H.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return H.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(e){return H.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new Ct(n,0),s=new Ct(n,Number.POSITIVE_INFINITY),i=[];return this.wr.forEachInRange([r,s],o=>{const a=this.Sr(o.pr);i.push(a)}),H.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new xt(Be);return n.forEach(s=>{const i=new Ct(s,0),o=new Ct(s,Number.POSITIVE_INFINITY);this.wr.forEachInRange([i,o],a=>{r=r.add(a.pr)})}),H.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,s=r.length+1;let i=r;me.isDocumentKey(i)||(i=i.child(""));const o=new Ct(new me(i),0);let a=new xt(Be);return this.wr.forEachWhile(l=>{const c=l.key.path;return!!r.isPrefixOf(c)&&(c.length===s&&(a=a.add(l.pr)),!0)},o),H.resolve(this.Dr(a))}Dr(e){const n=[];return e.forEach(r=>{const s=this.Sr(r);s!==null&&n.push(s)}),n}removeMutationBatch(e,n){Ze(this.Cr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return H.forEach(n.mutations,s=>{const i=new Ct(s.key,n.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,s.key)}).next(()=>{this.wr=r})}Mn(e){}containsKey(e,n){const r=new Ct(n,0),s=this.wr.firstAfterOrEqual(r);return H.resolve(n.isEqual(s&&s.key))}
2453performConsistencyCheck(e){return this.mutationQueue.length,H.resolve()}Cr(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]}}/**
2454 * @license
2455 * Copyright 2017 Google LLC
2456 *
2457 * Licensed under the Apache License, Version 2.0 (the "License");
2458 * you may not use this file except in compliance with the License.
2459 * You may obtain a copy of the License at
2460 *
2461 *   http://www.apache.org/licenses/LICENSE-2.0
2462 *
2463 * Unless required by applicable law or agreed to in writing, software
2464 * distributed under the License is distributed on an "AS IS" BASIS,
2465 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2466 * See the License for the specific language governing permissions and
2467 * limitations under the License.
2468 */class G7{constructor(e){this.vr=e,this.docs=function(){return new ft(me.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,s=this.docs.get(r),i=s?s.size:0,o=this.vr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-i,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 H.resolve(r?r.document.mutableCopy():Ut.newInvalidDocument(n))}getEntries(e,n){let r=Xr();return n.forEach(s=>{const i=this.docs.get(s);r=r.insert(s,i?i.document.mutableCopy():Ut.newInvalidDocument(s))}),H.resolve(r)}getDocumentsMatchingQuery(e,n,r,s){let i=Xr();const o=n.path,a=new me(o.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:c,value:{document:u}}=l.getNext();if(!o.isPrefixOf(c.path))break;c.path.length>o.length+1||M8(O8(u),r)<=0||(s.has(u.key)||lf(n,u))&&(i=i.insert(u.key,u.mutableCopy()))}return H.resolve(i)}getAllFromCollectionGroup(e,n,r,s){Ee()}Fr(e,n){return H.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new Q7(this)}getSize(e){return H.resolve(this.size)}}class Q7 extends j7{constructor(e){super(),this.ar=e}applyChanges(e){const n=[];
2468return this.changes.forEach((r,s)=>{s.isValidDocument()?n.push(this.ar.addEntry(e,s)):this.ar.removeEntry(r)}),H.waitFor(n)}getFromCache(e,n){return this.ar.getEntry(e,n)}getAllFromCache(e,n){return this.ar.getEntries(e,n)}}/**
2469 * @license
2470 * Copyright 2017 Google LLC
2471 *
2472 * Licensed under the Apache License, Version 2.0 (the "License");
2473 * you may not use this file except in compliance with the License.
2474 * You may obtain a copy of the License at
2475 *
2476 *   http://www.apache.org/licenses/LICENSE-2.0
2477 *
2478 * Unless required by applicable law or agreed to in writing, software
2479 * distributed under the License is distributed on an "AS IS" BASIS,
2480 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2481 * See the License for the specific language governing permissions and
2482 * limitations under the License.
2483 */class X7{constructor(e){this.persistence=e,this.Mr=new oa(n=>Zg(n),ev),this.lastRemoteSnapshotVersion=Ae.min(),this.highestTargetId=0,this.Or=0,this.Nr=new ov,this.targetCount=0,this.Br=Bo.Nn()}forEachTarget(e,n){return this.Mr.forEach((r,s)=>n(s)),H.resolve()}getLastRemoteSnapshotVersion(e){return H.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return H.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Br.next(),H.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Or&&(this.Or=n),H.resolve()}qn(e){this.Mr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Br=new Bo(n),this.highestTargetId=n),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,n){return this.qn(n),this.targetCount+=1,H.resolve()}updateTargetData(e,n){return this.qn(n),H.resolve()}removeTargetData(e,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,H.resolve()}removeTargets(e,n,r){let s=0;const i=[];return this.Mr.forEach((o,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Mr.delete(o),i.push(this.removeMatchingKeysForTargetId(e,a.targetId)),s++)}),H.waitFor(i).next(()=>s)}getTargetCount(e){return H.resolve(this.targetCount)}getTargetData(e,n){const r=this.Mr.get(n)||null;return H.resolve(r)}addMatchingKeys(e,n,r){return this.Nr.dr(n,r),H.resolve()}removeMatchingKeys(e,n,r){this.Nr.Rr(n,r);const s=this.persistence.referenceDelegate,i=[];return s&&n.forEach(o=>{i.push(s.markPotentiallyOrphaned(e,o))}),H.waitFor(i)}removeMatchingKeysForTargetId(e,n){return this.Nr.Vr(n),H.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Nr.gr(n);return H.resolve(r)}containsKey(e,n){return H.resolve(this.Nr.containsKey(n))}}/**
2484 * @license
2485 * Copyright 2017 Google LLC
2486 *
2487 * Licensed under the Apache License, Version 2.0 (the "License");
2488 * you may not use this file except in compliance with the License.
2489 * You may obtain a copy of the License at
2490 *
2491 *   http://www.apache.org/licenses/LICENSE-2.0
2492 *
2493 * Unless required by applicable law or agreed to in writing, software
2494 * distributed under the License is distributed on an "AS IS" BASIS,
2495 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2496 * See the License for the specific language governing permissions and
2497 * limitations under the License.
2498 */class J7{constructor(e,n){this.Lr={},this.overlays={},this.kr=new Gg(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new X7(this),this.indexManager=new B7,this.remoteDocumentCache=function(s){return new G7(s)}(r=>this.referenceDelegate.Kr(r)),this.serializer=new F7(n),this.$r=new q7(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 K7,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Lr[e.toKey()];return r||(r=new z7(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 s=new Z7(this.kr.next());return this.referenceDelegate.Ur(),r(s).next(i=>this.referenceDelegate.Wr(s).next(()=>i)).toPromise().then(i=>(s.raiseOnCommittedEvent(),i))}Gr(e,n){return H.or(Object.values(this.Lr).map(r=>()=>r.containsKey(e,n)))}}class Z7 extends L8{constructor(e){super(),this.currentSequenceNumber=e}}class av{constructor(e){this.persistence=e,this.zr=new ov,this.jr=null}static Hr(e){return new av(e)}get Jr(){if(this.jr)return this.jr;throw Ee()}addReference(e,n,r){return this.zr.addReference(r,n),this.Jr.delete(r.toString()),H.resolve()}removeReference(e,n,r){return this.zr.removeReference(r,n),this.Jr.add(r.toString()),H.resolve()}markPotentiallyOrphaned(e,n){return this.Jr.add(n.toString()),H.resolve()}
2498removeTarget(e,n){this.zr.Vr(n.targetId).forEach(s=>this.Jr.add(s.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(s=>{s.forEach(i=>this.Jr.add(i.toString()))}).next(()=>r.removeTargetData(e,n))}Ur(){this.jr=new Set}Wr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return H.forEach(this.Jr,r=>{const s=me.fromPath(r);return this.Yr(e,s).next(i=>{i||n.removeEntry(s,Ae.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 H.or([()=>H.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Gr(e,n)])}}/**
2499 * @license
2500 * Copyright 2017 Google LLC
2501 *
2502 * Licensed under the Apache License, Version 2.0 (the "License");
2503 * you may not use this file except in compliance with the License.
2504 * You may obtain a copy of the License at
2505 *
2506 *   http://www.apache.org/licenses/LICENSE-2.0
2507 *
2508 * Unless required by applicable law or agreed to in writing, software
2509 * distributed under the License is distributed on an "AS IS" BASIS,
2510 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2511 * See the License for the specific language governing permissions and
2512 * limitations under the License.
2513 */class lv{constructor(e,n,r,s){this.targetId=e,this.fromCache=n,this.qi=r,this.Qi=s}static Ki(e,n){let r=Oe(),s=Oe();for(const i of n.docChanges)switch(i.type){case 0:r=r.add(i.doc.key);break;case 1:s=s.add(i.doc.key)}return new lv(e,n.fromCache,r,s)}}/**
2514 * @license
2515 * Copyright 2023 Google LLC
2516 *
2517 * Licensed under the Apache License, Version 2.0 (the "License");
2518 * you may not use this file except in compliance with the License.
2519 * You may obtain a copy of the License at
2520 *
2521 *   http://www.apache.org/licenses/LICENSE-2.0
2522 *
2523 * Unless required by applicable law or agreed to in writing, software
2524 * distributed under the License is distributed on an "AS IS" BASIS,
2525 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2526 * See the License for the specific language governing permissions and
2527 * limitations under the License.
2528 */class eQ{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/**
2529 * @license
2530 * Copyright 2019 Google LLC
2531 *
2532 * Licensed under the Apache License, Version 2.0 (the "License");
2533 * you may not use this file except in compliance with the License.
2534 * You may obtain a copy of the License at
2535 *
2536 *   http://www.apache.org/licenses/LICENSE-2.0
2537 *
2538 * Unless required by applicable law or agreed to in writing, software
2539 * distributed under the License is distributed on an "AS IS" BASIS,
2540 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2541 * See the License for the specific language governing permissions and
2542 * limitations under the License.
2543 */class tQ{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return IN()?8:li.v(Tt())>0?6:4}()}initialize(e,n){this.zi=e,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(e,n,r,s){const i={result:null};return this.ji(e,n).next(o=>{i.result=o}).next(()=>{if(!i.result)return this.Hi(e,n,s,r).next(o=>{i.result=o})}).next(()=>{if(i.result)return;const o=new eQ;return this.Ji(e,n,o).next(a=>{if(i.result=a,this.Ui)return this.Yi(e,n,o,a.size)})}).next(()=>i.result)}Yi(e,n,r,s){return r.documentReadCount<this.Wi?(wa()<=Ne.DEBUG&&ne("QueryEngine","SDK will not create cache indexes for query:",Qi(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Wi,"documents"),H.resolve()):(wa()<=Ne.DEBUG&&ne("QueryEngine","Query:",Qi(n),"scans",r.documentReadCount,"local documents and returns",s,"documents as results."),r.documentReadCount>this.Gi*s?(wa()<=Ne.DEBUG&&ne("QueryEngine","The SDK decides to create cache indexes for query:",Qi(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Ar(n))):H.resolve())}ji(e,n){if(EE(n))return H.resolve(null);let r=Ar(n);return this.indexManager.getIndexType(e,r).next(s=>s===0?null:(n.limit!==null&&s===1&&(n=Wp(n,null,"F"),r=Ar(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(i=>{const o=Oe(...i);return this.zi.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(l=>{const c=this.Zi(n,a);return this.Xi(n,c,o,l.readTime)?this.ji(e,Wp(n,null,"F")):this.es(e,c,n,l)}))})))}
2543Hi(e,n,r,s){return EE(n)||s.isEqual(Ae.min())?H.resolve(null):this.zi.getDocuments(e,r).next(i=>{const o=this.Zi(n,i);return this.Xi(n,o,r,s)?H.resolve(null):(wa()<=Ne.DEBUG&&ne("QueryEngine","Re-using previous result from %s to execute query: %s",s.toString(),Qi(n)),this.es(e,o,n,k8(s,-1)).next(a=>a))})}Zi(e,n){let r=new xt(pP(e));return n.forEach((s,i)=>{lf(e,i)&&(r=r.add(i))}),r}Xi(e,n,r,s){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const i=e.limitType==="F"?n.last():n.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(s)>0)}Ji(e,n,r){return wa()<=Ne.DEBUG&&ne("QueryEngine","Using full collection scan to execute query:",Qi(n)),this.zi.getDocumentsMatchingQuery(e,n,Ls.min(),r)}es(e,n,r,s){return this.zi.getDocumentsMatchingQuery(e,r,s).next(i=>(n.forEach(o=>{i=i.insert(o.key,o)}),i))}}/**
2544 * @license
2545 * Copyright 2020 Google LLC
2546 *
2547 * Licensed under the Apache License, Version 2.0 (the "License");
2548 * you may not use this file except in compliance with the License.
2549 * You may obtain a copy of the License at
2550 *
2551 *   http://www.apache.org/licenses/LICENSE-2.0
2552 *
2553 * Unless required by applicable law or agreed to in writing, software
2554 * distributed under the License is distributed on an "AS IS" BASIS,
2555 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2556 * See the License for the specific language governing permissions and
2557 * limitations under the License.
2558 */class nQ{constructor(e,n,r,s){this.persistence=e,this.ts=n,this.serializer=s,this.ns=new ft(Be),this.rs=new oa(i=>Zg(i),ev),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(r)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new Y7(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.ns))}}function rQ(t,e,n,r){return new nQ(t,e,n,r)}async function xP(t,e){const n=Pe(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let s;
2558return n.mutationQueue.getAllMutationBatches(r).next(i=>(s=i,n._s(e),n.mutationQueue.getAllMutationBatches(r))).next(i=>{const o=[],a=[];let l=Oe();for(const c of s){o.push(c.batchId);for(const u of c.mutations)l=l.add(u.key)}for(const c of i){a.push(c.batchId);for(const u of c.mutations)l=l.add(u.key)}return n.localDocuments.getDocuments(r,l).next(c=>({us:c,removedBatchIds:o,addedBatchIds:a}))})})}function sQ(t,e){const n=Pe(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const s=e.batch.keys(),i=n.os.newChangeBuffer({trackRemovals:!0});return function(a,l,c,u){const h=c.batch,f=h.keys();let d=H.resolve();return f.forEach(p=>{d=d.next(()=>u.getEntry(l,p)).next(v=>{const m=c.docVersions.get(p);Ze(m!==null),v.version.compareTo(m)<0&&(h.applyToRemoteDocument(v,c),v.isValidDocument()&&(v.setReadTime(c.commitVersion),u.addEntry(v)))})}),d.next(()=>a.mutationQueue.removeMutationBatch(l,h))}(n,r,e,i).next(()=>i.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,s,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let l=Oe();for(let c=0;c<a.mutationResults.length;++c)a.mutationResults[c].transformResults.length>0&&(l=l.add(a.batch.mutations[c].key));return l}(e))).next(()=>n.localDocuments.getDocuments(r,s))})}function VP(t){const e=Pe(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Qr.getLastRemoteSnapshotVersion(n))}function iQ(t,e){const n=Pe(t),r=e.snapshotVersion;let s=n.ns;return n.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{const o=n.os.newChangeBuffer({trackRemovals:!0});s=n.ns;const a=[];
2558e.targetChanges.forEach((u,h)=>{const f=s.get(h);if(!f)return;a.push(n.Qr.removeMatchingKeys(i,u.removedDocuments,h).next(()=>n.Qr.addMatchingKeys(i,u.addedDocuments,h)));let d=f.withSequenceNumber(i.currentSequenceNumber);e.targetMismatches.get(h)!==null?d=d.withResumeToken(Wt.EMPTY_BYTE_STRING,Ae.min()).withLastLimboFreeSnapshotVersion(Ae.min()):u.resumeToken.approximateByteSize()>0&&(d=d.withResumeToken(u.resumeToken,r)),s=s.insert(h,d),function(v,m,g){return v.resumeToken.approximateByteSize()===0||m.snapshotVersion.toMicroseconds()-v.snapshotVersion.toMicroseconds()>=3e8?!0:g.addedDocuments.size+g.modifiedDocuments.size+g.removedDocuments.size>0}(f,d,u)&&a.push(n.Qr.updateTargetData(i,d))});let l=Xr(),c=Oe();if(e.documentUpdates.forEach(u=>{e.resolvedLimboDocuments.has(u)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(i,u))}),a.push(oQ(i,o,e.documentUpdates).next(u=>{l=u.cs,c=u.ls})),!r.isEqual(Ae.min())){const u=n.Qr.getLastRemoteSnapshotVersion(i).next(h=>n.Qr.setTargetsMetadata(i,i.currentSequenceNumber,r));a.push(u)}return H.waitFor(a).next(()=>o.apply(i)).next(()=>n.localDocuments.getLocalViewOfDocuments(i,l,c)).next(()=>l)}).then(i=>(n.ns=s,i))}function oQ(t,e,n){let r=Oe(),s=Oe();return n.forEach(i=>r=r.add(i)),e.getEntries(t,r).next(i=>{let o=Xr();return n.forEach((a,l)=>{const c=i.get(a);l.isFoundDocument()!==c.isFoundDocument()&&(s=s.add(a)),l.isNoDocument()&&l.version.isEqual(Ae.min())?(e.removeEntry(a,l.readTime),o=o.insert(a,l)):!c.isValidDocument()||l.version.compareTo(c.version)>0||l.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(l),o=o.insert(a,l)):ne("LocalStore","Ignoring outdated watch update for ",a,". Current version:",c.version," Watch version:",l.version)}),{cs:o,ls:s}})}function aQ(t,e){const n=Pe(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function lQ(t,e){const n=Pe(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let s;return n.Qr.getTargetData(r,e).next(i=>i?(s=i,H.resolve(s)):n.Qr.allocateTargetId(r).next(o=>(s=new Is(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Qr.addTargetData(r,s).next(()=>s))))}).then(r=>{const s=n.ns.get(r.targetId);return(s===null||r.snapshotVersion.compareTo(s.snapshotVersion)>0)&&(n.ns=n.ns.insert(r.targetId,r),n.rs.set(e,r.targetId)),r})}async function Gp(t,e,n){const r=Pe(t),s=r.ns.get(e),i=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",i,o=>r.persistence.referenceDelegate.removeTarget(o,s))}catch(o){if(!oc(o))throw o;ne("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.ns=r.ns.remove(e),r.rs.delete(s.target)}function OE(t,e,n){const r=Pe(t);let s=Ae.min(),i=Oe();return r.persistence.runTransaction("Execute query","readwrite",o=>function(l,c,u){const h=Pe(l),f=h.rs.get(u);return f!==void 0?H.resolve(h.ns.get(f)):h.Qr.getTargetData(c,u)}(r,o,Ar(e)).next(a=>{if(a)return s=a.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(o,a.targetId).next(l=>{i=l})}).next(()=>r.ts.getDocumentsMatchingQuery(o,e,n?s:Ae.min(),n?i:Oe())).next(a=>(cQ(r,e7(e),a),{documents:a,hs:i})))}function cQ(t,e,n){let r=t.ss.get(e)||Ae.min();n.forEach((s,i)=>{i.readTime.compareTo(r)>0&&(r=i.readTime)}),t.ss.set(e,r)}class ME{constructor(){this.activeTargetIds=o7()}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class uQ{constructor(){this.no=new ME,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,n,r){this.ro[e]=n}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new ME,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
2559 * @license
2560 * Copyright 2019 Google LLC
2561 *
2562 * Licensed under the Apache License, Version 2.0 (the "License");
2563 * you may not use this file except in compliance with the License.
2564 * You may obtain a copy of the License at
2565 *
2566 *   http://www.apache.org/licenses/LICENSE-2.0
2567 *
2568 * Unless required by applicable law or agreed to in writing, software
2569 * distributed under the License is distributed on an "AS IS" BASIS,
2570 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2571 * See the License for the specific language governing permissions and
2572 * limitations under the License.
2573 */class hQ{io(e){}shutdown(){}}/**
2574 * @license
2575 * Copyright 2019 Google LLC
2576 *
2577 * Licensed under the Apache License, Version 2.0 (the "License");
2578 * you may not use this file except in compliance with the License.
2579 * You may obtain a copy of the License at
2580 *
2581 *   http://www.apache.org/licenses/LICENSE-2.0
2582 *
2583 * Unless required by applicable law or agreed to in writing, software
2584 * distributed under the License is distributed on an "AS IS" BASIS,
2585 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2586 * See the License for the specific language governing permissions and
2587 * limitations under the License.
2588 */class NE{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){ne("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.uo)e(0)}ao(){ne("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.uo)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
2589 * @license
2590 * Copyright 2023 Google LLC
2591 *
2592 * Licensed under the Apache License, Version 2.0 (the "License");
2593 * you may not use this file except in compliance with the License.
2594 * You may obtain a copy of the License at
2595 *
2596 *   http://www.apache.org/licenses/LICENSE-2.0
2597 *
2598 * Unless required by applicable law or agreed to in writing, software
2599 * distributed under the License is distributed on an "AS IS" BASIS,
2600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2601 * See the License for the specific language governing permissions and
2602 * limitations under the License.
2603 */let Hc=null;function yd(){return Hc===null?Hc=function(){return 268435456+Math.round(2147483648*Math.random())}():Hc++,"0x"+Hc.toString(16)}/**
2604 * @license
2605 * Copyright 2020 Google LLC
2606 *
2607 * Licensed under the Apache License, Version 2.0 (the "License");
2608 * you may not use this file except in compliance with the License.
2609 * You may obtain a copy of the License at
2610 *
2611 *   http://www.apache.org/licenses/LICENSE-2.0
2612 *
2613 * Unless required by applicable law or agreed to in writing, software
2614 * distributed under the License is distributed on an "AS IS" BASIS,
2615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2616 * See the License for the specific language governing permissions and
2617 * limitations under the License.
2618 */const fQ={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
2619 * @license
2620 * Copyright 2017 Google LLC
2621 *
2622 * Licensed under the Apache License, Version 2.0 (the "License");
2623 * you may not use this file except in compliance with the License.
2624 * You may obtain a copy of the License at
2625 *
2626 *   http://www.apache.org/licenses/LICENSE-2.0
2627 *
2628 * Unless required by applicable law or agreed to in writing, software
2629 * distributed under the License is distributed on an "AS IS" BASIS,
2630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2631 * See the License for the specific language governing permissions and
2632 * limitations under the License.
2633 */class dQ{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}onMessage(e){this.Ao=e}close(){this.ho()}send(e){this.lo(e)}Ro(){this.Io()}Vo(e){this.Eo(e)}mo(e){this.Ao(e)}}/**
2634 * @license
2635 * Copyright 2017 Google LLC
2636 *
2637 * Licensed under the Apache License, Version 2.0 (the "License");
2638 * you may not use this file except in compliance with the License.
2639 * You may obtain a copy of the License at
2640 *
2641 *   http://www.apache.org/licenses/LICENSE-2.0
2642 *
2643 * Unless required by applicable law or agreed to in writing, software
2644 * distributed under the License is distributed on an "AS IS" BASIS,
2645 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2646 * See the License for the specific language governing permissions and
2647 * limitations under the License.
2648 */const Vt="WebChannelConnection";class pQ extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",s=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.fo=r+"://"+n.host,this.po=`projects/${s}/databases/${i}`,this.yo=this.databaseId.database==="(default)"?`project_id=${s}`:`project_id=${s}&database_id=${i}`}get wo(){return!1}So(n,r,s,i,o){const a=yd(),l=this.bo(n,r.toUriEncodedString());ne("RestConnection",`Sending RPC '${n}' ${a}:`,l,s);const c={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(c,i,o),this.Co(n,l,c,s).then(u=>(ne("RestConnection",`Received RPC '${n}' ${a}: `,u),u),u=>{throw Vo("RestConnection",`RPC '${n}' ${a} failed with error: `,u,"url: ",l,"request:",s),u})}vo(n,r,s,i,o,a){return this.So(n,r,s,i,o)}Do(n,r,s){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+ia}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((i,o)=>n[o]=i),s&&s.headers.forEach((i,o)=>n[o]=i)}bo(n,r){const s=fQ[n];return`${this.fo}/v1/${r}:${s}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Co(e,n,r,s){const i=yd();return new Promise((o,a)=>{const l=new w8;l.setWithCredentials(!0),l.listenOnce(y8.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case gd.NO_ERROR:const u=l.getResponseJson();ne(Vt,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(u)),o(u);break;case gd.TIMEOUT:ne(Vt,`RPC '${e}' ${i} timed out`),a(new ce(F.DEADLINE_EXCEEDED,"Request time out"));break;case gd.HTTP_ERROR:const h=l.getStatus();if(ne(Vt,`RPC '${e}' ${i} failed with status:`,h,"response text:",l.getResponseText()),h>0){let f=l.getResponseJson();Array.isArray(f)&&(f=f[0]);const d=f==null?void 0:f.error;if(d&&d.status&&d.message){const p=function(m){const g=m.toLowerCase().replace(/_/g,"-");return Object.values(F).indexOf(g)>=0?g:F.UNKNOWN}(d.status);a(new ce(p,d.message))}else a(new ce(F.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new ce(F.UNAVAILABLE,"Connection failed."));break;default:Ee()}}finally{ne(Vt,`RPC '${e}' ${i} completed.`)}});const c=JSON.stringify(s);ne(Vt,`RPC '${e}' ${i} sending request:`,s),l.send(n,"POST",c,r,15)})}Fo(e,n,r){const s=yd(),i=[this.fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=g8(),a=v8(),l={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},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(l.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Do(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const u=i.join("");ne(Vt,`Creating RPC '${e}' stream ${s}: ${u}`,l);const h=o.createWebChannel(u,l);let f=!1,d=!1;const p=new dQ({lo:m=>{d?ne(Vt,`Not sending because RPC '${e}' stream ${s} is closed:`,m):(f||(ne(Vt,`Opening RPC '${e}' stream ${s} transport.`),h.open(),f=!0),ne(Vt,`RPC '${e}' stream ${s} sending:`,m),h.send(m))},ho:()=>h.close()}),v=(m,g,E)=>{m.listen(g,y=>{try{E(y)}catch(w){setTimeout(()=>{throw w},0)}})};return v(h,Fc.EventType.OPEN,()=>{d||ne(Vt,`RPC '${e}' stream ${s} transport opened.`)}),v(h,Fc.EventType.CLOSE,()=>{d||(d=!0,ne(Vt,`RPC '${e}' stream ${s} transport closed`),p.Vo())}
2648),v(h,Fc.EventType.ERROR,m=>{d||(d=!0,Vo(Vt,`RPC '${e}' stream ${s} transport errored:`,m),p.Vo(new ce(F.UNAVAILABLE,"The operation could not be completed")))}),v(h,Fc.EventType.MESSAGE,m=>{var g;if(!d){const E=m.data[0];Ze(!!E);const y=E,w=y.error||((g=y[0])===null||g===void 0?void 0:g.error);if(w){ne(Vt,`RPC '${e}' stream ${s} received error:`,w);const I=w.status;let A=function(C){const D=yt[C];if(D!==void 0)return RP(D)}(I),R=w.message;A===void 0&&(A=F.INTERNAL,R="Unknown error status: "+I+" with message "+w.message),d=!0,p.Vo(new ce(A,R)),h.close()}else ne(Vt,`RPC '${e}' stream ${s} received:`,E),p.mo(E)}}),v(a,_8.STAT_EVENT,m=>{m.stat===cE.PROXY?ne(Vt,`RPC '${e}' stream ${s} detected buffering proxy`):m.stat===cE.NOPROXY&&ne(Vt,`RPC '${e}' stream ${s} detected no buffering proxy`)}),setTimeout(()=>{p.Ro()},0),p}}function _d(){return typeof document<"u"?document:null}/**
2649 * @license
2650 * Copyright 2020 Google LLC
2651 *
2652 * Licensed under the Apache License, Version 2.0 (the "License");
2653 * you may not use this file except in compliance with the License.
2654 * You may obtain a copy of the License at
2655 *
2656 *   http://www.apache.org/licenses/LICENSE-2.0
2657 *
2658 * Unless required by applicable law or agreed to in writing, software
2659 * distributed under the License is distributed on an "AS IS" BASIS,
2660 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2661 * See the License for the specific language governing permissions and
2662 * limitations under the License.
2663 */function ff(t){return new A7(t,!0)}/**
2664 * @license
2665 * Copyright 2017 Google LLC
2666 *
2667 * Licensed under the Apache License, Version 2.0 (the "License");
2668 * you may not use this file except in compliance with the License.
2669 * You may obtain a copy of the License at
2670 *
2671 *   http://www.apache.org/licenses/LICENSE-2.0
2672 *
2673 * Unless required by applicable law or agreed to in writing, software
2674 * distributed under the License is distributed on an "AS IS" BASIS,
2675 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2676 * See the License for the specific language governing permissions and
2677 * limitations under the License.
2678 */class $P{constructor(e,n,r=1e3,s=1.5,i=6e4){this.oi=e,this.timerId=n,this.Mo=r,this.xo=s,this.Oo=i,this.No=0,this.Bo=null,this.Lo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(e){this.cancel();const n=Math.floor(this.No+this.Qo()),r=Math.max(0,Date.now()-this.Lo),s=Math.max(0,n-r);s>0&&ne("ExponentialBackoff",`Backing off for ${s} ms (base delay: ${this.No} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Bo=this.oi.enqueueAfterDelay(this.timerId,s,()=>(this.Lo=Date.now(),e())),this.No*=this.xo,this.No<this.Mo&&(this.No=this.Mo),this.No>this.Oo&&(this.No=this.Oo)}Ko(){this.Bo!==null&&(this.Bo.skipDelay(),this.Bo=null)}cancel(){this.Bo!==null&&(this.Bo.cancel(),this.Bo=null)}Qo(){return(Math.random()-.5)*this.No}}/**
2679 * @license
2680 * Copyright 2017 Google LLC
2681 *
2682 * Licensed under the Apache License, Version 2.0 (the "License");
2683 * you may not use this file except in compliance with the License.
2684 * You may obtain a copy of the License at
2685 *
2686 *   http://www.apache.org/licenses/LICENSE-2.0
2687 *
2688 * Unless required by applicable law or agreed to in writing, software
2689 * distributed under the License is distributed on an "AS IS" BASIS,
2690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2691 * See the License for the specific language governing permissions and
2692 * limitations under the License.
2693 */class FP{constructor(e,n,r,s,i,o,a,l){this.oi=e,this.$o=r,this.Uo=s,this.connection=i,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new $P(e,n)}Ho(){return this.state===1||this.state===5||this.Jo()}Jo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Yo()}async stop(){this.Ho()&&await this.close(0)}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&this.Go===null&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,()=>this.e_()))}t_(e){this.n_(),this.stream.send(e)}async e_(){if(this.Jo())return this.close(0)}
2693n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}async close(e,n){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,e!==4?this.jo.reset():n&&n.code===F.RESOURCE_EXHAUSTED?(Cr(n.toString()),Cr("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):n&&n.code===F.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.i_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.To(n)}i_(){}auth(){this.state=1;const e=this.s_(this.Wo),n=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,s])=>{this.Wo===n&&this.o_(r,s)},r=>{e(()=>{const s=new ce(F.UNKNOWN,"Fetching auth token failed: "+r.message);return this.__(s)})})}o_(e,n){const r=this.s_(this.Wo);this.stream=this.a_(e,n),this.stream.Po(()=>{r(()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,()=>(this.Jo()&&(this.state=3),Promise.resolve())),this.listener.Po()))}),this.stream.To(s=>{r(()=>this.__(s))}),this.stream.onMessage(s=>{r(()=>this.onMessage(s))})}Yo(){this.state=5,this.jo.qo(async()=>{this.state=0,this.start()})}__(e){return ne("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}s_(e){return n=>{this.oi.enqueueAndForget(()=>this.Wo===e?n():(ne("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class mQ extends FP{constructor(e,n,r,s,i,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,s,o),this.serializer=i}a_(e,n){return this.connection.Fo("Listen",e,n)}onMessage(e){this.jo.reset();const n=C7(this.serializer,e),r=function(i){if(!("targetChange"in i))return Ae.min();const o=i.targetChange;return o.targetIds&&o.targetIds.length?Ae.min():o.readTime?Rr(o.readTime):Ae.min()}(e);return this.listener.u_(n,r)}c_(e){const n={};n.database=zp(this.serializer),n.addTarget=function(i,o){let a;const l=o.target;if(a=Hp(l)?{documents:k7(i,l)}:{query:O7(i,l).ut},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=SP(i,o.resumeToken);const c=Yp(i,o.expectedCount);c!==null&&(a.expectedCount=c)}else if(o.snapshotVersion.compareTo(Ae.min())>0){a.readTime=oh(i,o.snapshotVersion.toTimestamp());const c=Yp(i,o.expectedCount);c!==null&&(a.expectedCount=c)}return a}(this.serializer,e);const r=N7(this.serializer,e);r&&(n.labels=r),this.t_(n)}l_(e){const n={};n.database=zp(this.serializer),n.removeTarget=e,this.t_(n)}}class gQ extends FP{constructor(e,n,r,s,i,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,s,o),this.serializer=i,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(e,n){return this.connection.Fo("Write",e,n)}onMessage(e){if(Ze(!!e.streamToken),this.lastStreamToken=e.streamToken,this.h_){this.jo.reset();const n=D7(e.writeResults,e.commitTime),r=Rr(e.commitTime);return this.listener.T_(r,n)}return Ze(!e.writeResults||e.writeResults.length===0),this.h_=!0,this.listener.E_()}d_(){const e={};e.database=zp(this.serializer),this.t_(e)}I_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>S7(this.serializer,r))};this.t_(n)}}/**
2694 * @license
2695 * Copyright 2017 Google LLC
2696 *
2697 * Licensed under the Apache License, Version 2.0 (the "License");
2698 * you may not use this file except in compliance with the License.
2699 * You may obtain a copy of the License at
2700 *
2701 *   http://www.apache.org/licenses/LICENSE-2.0
2702 *
2703 * Unless required by applicable law or agreed to in writing, software
2704 * distributed under the License is distributed on an "AS IS" BASIS,
2705 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2706 * See the License for the specific language governing permissions and
2707 * limitations under the License.
2708 */class vQ extends class{}{constructor(e,n,r,s){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=s,this.A_=!1}R_(){if(this.A_)throw new ce(F.FAILED_PRECONDITION,"The client has already been terminated.")}
2708So(e,n,r,s){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,o])=>this.connection.So(e,qp(n,r),s,i,o)).catch(i=>{throw i.name==="FirebaseError"?(i.code===F.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),i):new ce(F.UNKNOWN,i.toString())})}vo(e,n,r,s,i){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.connection.vo(e,qp(n,r),s,o,a,i)).catch(o=>{throw o.name==="FirebaseError"?(o.code===F.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new ce(F.UNKNOWN,o.toString())})}terminate(){this.A_=!0,this.connection.terminate()}}class yQ{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){this.m_===0&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve())))}S_(e){this.state==="Online"?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.y_("Offline")))}set(e){this.b_(),this.m_=0,e==="Online"&&(this.g_=!1),this.y_(e)}y_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}w_(e){const n=`Could not reach Cloud Firestore backend. ${e}
2709This 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.g_?(Cr(n),this.g_=!1):ne("OnlineStateTracker",n)}b_(){this.f_!==null&&(this.f_.cancel(),this.f_=null)}}/**
2710 * @license
2711 * Copyright 2017 Google LLC
2712 *
2713 * Licensed under the Apache License, Version 2.0 (the "License");
2714 * you may not use this file except in compliance with the License.
2715 * You may obtain a copy of the License at
2716 *
2717 *   http://www.apache.org/licenses/LICENSE-2.0
2718 *
2719 * Unless required by applicable law or agreed to in writing, software
2720 * distributed under the License is distributed on an "AS IS" BASIS,
2721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2722 * See the License for the specific language governing permissions and
2723 * limitations under the License.
2724 */class _Q{constructor(e,n,r,s,i){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=i,this.M_.io(o=>{r.enqueueAndForget(async()=>{Hi(this)&&(ne("RemoteStore","Restarting streams for network reachability change."),await async function(l){const c=Pe(l);c.v_.add(4),await uc(c),c.x_.set("Unknown"),c.v_.delete(4),await df(c)}(this))})}),this.x_=new yQ(r,s)}}async function df(t){if(Hi(t))for(const e of t.F_)await e(!0)}async function uc(t){for(const e of t.F_)await e(!1)}function UP(t,e){const n=Pe(t);n.C_.has(e.targetId)||(n.C_.set(e.targetId,e),hv(n)?uv(n):aa(n).Jo()&&cv(n,e))}function BP(t,e){const n=Pe(t),r=aa(n);n.C_.delete(e),r.Jo()&&HP(n,e),n.C_.size===0&&(r.Jo()?r.Xo():Hi(n)&&n.x_.set("Unknown"))}function cv(t,e){if(t.O_.Oe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Ae.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}aa(t).c_(e)}function HP(t,e){t.O_.Oe(e),aa(t).l_(e)}function uv(t){t.O_=new E7({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),_t:e=>t.C_.get(e)||null,nt:()=>t.datastore.serializer.databaseId}),aa(t).start(),t.x_.p_()}function hv(t){return Hi(t)&&!aa(t).Ho()&&t.C_.size>0}function Hi(t){return Pe(t).v_.size===0}function jP(t){t.O_=void 0}async function wQ(t){t.C_.forEach((e,n)=>{cv(t,e)})}async function EQ(t,e){jP(t),hv(t)?(t.x_.S_(e),uv(t)):t.x_.set("Unknown")}async function bQ(t,e,n){if(t.x_.set("Online"),e instanceof CP&&e.state===2&&e.cause)try{await async function(s,i){const o=i.cause;for(const a of i.targetIds)s.C_.has(a)&&(await s.remoteSyncer.rejectListen(a,o),s.C_.delete(a),s.O_.removeTarget(a))}(t,e)}catch(r){ne("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await ah(t,r)}else if(e instanceof hu?t.O_.$e(e):e instanceof PP?t.O_.Je(e):t.O_.Ge(e),!n.isEqual(Ae.min()))try{const r=await VP(t.localStore);n.compareTo(r)>=0&&await function(i,o){const a=i.O_.it(o);
2724return a.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){const u=i.C_.get(c);u&&i.C_.set(c,u.withResumeToken(l.resumeToken,o))}}),a.targetMismatches.forEach((l,c)=>{const u=i.C_.get(l);if(!u)return;i.C_.set(l,u.withResumeToken(Wt.EMPTY_BYTE_STRING,u.snapshotVersion)),HP(i,l);const h=new Is(u.target,l,c,u.sequenceNumber);cv(i,h)}),i.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){ne("RemoteStore","Failed to raise snapshot:",r),await ah(t,r)}}async function ah(t,e,n){if(!oc(e))throw e;t.v_.add(1),await uc(t),t.x_.set("Offline"),n||(n=()=>VP(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ne("RemoteStore","Retrying IndexedDB access"),await n(),t.v_.delete(1),await df(t)})}function WP(t,e){return e().catch(n=>ah(t,n,e))}async function pf(t){const e=Pe(t),n=Vs(e);let r=e.D_.length>0?e.D_[e.D_.length-1].batchId:-1;for(;TQ(e);)try{const s=await aQ(e.localStore,r);if(s===null){e.D_.length===0&&n.Xo();break}r=s.batchId,IQ(e,s)}catch(s){await ah(e,s)}YP(e)&&qP(e)}function TQ(t){return Hi(t)&&t.D_.length<10}function IQ(t,e){t.D_.push(e);const n=Vs(t);n.Jo()&&n.P_&&n.I_(e.mutations)}function YP(t){return Hi(t)&&!Vs(t).Ho()&&t.D_.length>0}function qP(t){Vs(t).start()}async function AQ(t){Vs(t).d_()}async function RQ(t){const e=Vs(t);for(const n of t.D_)e.I_(n.mutations)}async function PQ(t,e,n){const r=t.D_.shift(),s=rv.from(r,e,n);await WP(t,()=>t.remoteSyncer.applySuccessfulWrite(s)),await pf(t)}async function CQ(t,e){e&&Vs(t).P_&&await async function(r,s){if(function(o){return y7(o)&&o!==F.ABORTED}(s.code)){const i=r.D_.shift();Vs(r).Zo(),await WP(r,()=>r.remoteSyncer.rejectFailedWrite(i.batchId,s)),await pf(r)}}(t,e),YP(t)&&qP(t)}async function LE(t,e){const n=Pe(t);n.asyncQueue.verifyOperationInProgress(),ne("RemoteStore","RemoteStore received new credentials");const r=Hi(n);n.v_.add(3),await uc(n),r&&n.x_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.v_.delete(3),await df(n)}async function SQ(t,e){const n=Pe(t);e?(n.v_.delete(2),await df(n)):e||(n.v_.add(2),await uc(n),n.x_.set("Unknown"))}function aa(t){return t.N_||(t.N_=function(n,r,s){const i=Pe(n);return i.R_(),new mQ(r,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,s)}(t.datastore,t.asyncQueue,{Po:wQ.bind(null,t),To:EQ.bind(null,t),u_:bQ.bind(null,t)}),t.F_.push(async e=>{e?(t.N_.Zo(),hv(t)?uv(t):t.x_.set("Unknown")):(await t.N_.stop(),jP(t))})),t.N_}function Vs(t){return t.B_||(t.B_=function(n,r,s){const i=Pe(n);return i.R_(),new gQ(r,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,s)}(t.datastore,t.asyncQueue,{Po:AQ.bind(null,t),To:CQ.bind(null,t),E_:RQ.bind(null,t),T_:PQ.bind(null,t)}),t.F_.push(async e=>{e?(t.B_.Zo(),await pf(t)):(await t.B_.stop(),t.D_.length>0&&(ne("RemoteStore",`Stopping write stream with ${t.D_.length} pending writes`),t.D_=[]))})),t.B_}/**
2725 * @license
2726 * Copyright 2017 Google LLC
2727 *
2728 * Licensed under the Apache License, Version 2.0 (the "License");
2729 * you may not use this file except in compliance with the License.
2730 * You may obtain a copy of the License at
2731 *
2732 *   http://www.apache.org/licenses/LICENSE-2.0
2733 *
2734 * Unless required by applicable law or agreed to in writing, software
2735 * distributed under the License is distributed on an "AS IS" BASIS,
2736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2737 * See the License for the specific language governing permissions and
2738 * limitations under the License.
2739 */class fv{constructor(e,n,r,s,i){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=s,this.removalCallback=i,this.deferred=new Ir,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,s,i){const o=Date.now()+r,a=new fv(e,n,o,s,i);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 ce(F.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 dv(t,e){if(Cr("AsyncQueue",`${e}: ${t}`),oc(t))return new ce(F.UNAVAILABLE,`${e}: ${t}`);throw t}/**
2740 * @license
2741 * Copyright 2017 Google LLC
2742 *
2743 * Licensed under the Apache License, Version 2.0 (the "License");
2744 * you may not use this file except in compliance with the License.
2745 * You may obtain a copy of the License at
2746 *
2747 *   http://www.apache.org/licenses/LICENSE-2.0
2748 *
2749 * Unless required by applicable law or agreed to in writing, software
2750 * distributed under the License is distributed on an "AS IS" BASIS,
2751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2752 * See the License for the specific language governing permissions and
2753 * limitations under the License.
2754 */class bo{constructor(e){this.comparator=e?(n,r)=>e(n,r)||me.comparator(n.key,r.key):(n,r)=>me.comparator(n.key,r.key),this.keyedMap=ka(),this.sortedSet=new ft(this.comparator)}static emptySet(e){return new bo(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 bo)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const s=n.getNext().key,i=r.getNext().key;if(!s.isEqual(i))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet (
2755  `+e.join(`  
2756`)+`
2757)`}copy(e,n){const r=new bo;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/**
2758 * @license
2759 * Copyright 2017 Google LLC
2760 *
2761 * Licensed under the Apache License, Version 2.0 (the "License");
2762 * you may not use this file except in compliance with the License.
2763 * You may obtain a copy of the License at
2764 *
2765 *   http://www.apache.org/licenses/LICENSE-2.0
2766 *
2767 * Unless required by applicable law or agreed to in writing, software
2768 * distributed under the License is distributed on an "AS IS" BASIS,
2769 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2770 * See the License for the specific language governing permissions and
2771 * limitations under the License.
2772 */class xE{constructor(){this.L_=new ft(me.comparator)}track(e){const n=e.doc.key,r=this.L_.get(n);r?e.type!==0&&r.type===3?this.L_=this.L_.insert(n,e):e.type===3&&r.type!==1?this.L_=this.L_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.L_=this.L_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.L_=this.L_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.L_=this.L_.remove(n):e.type===1&&r.type===2?this.L_=this.L_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.L_=this.L_.insert(n,{type:2,doc:e.doc}):Ee():this.L_=this.L_.insert(n,e)}k_(){const e=[];return this.L_.inorderTraversal((n,r)=>{e.push(r)}),e}}class Ho{constructor(e,n,r,s,i,o,a,l,c){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=s,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=c}static fromInitialDocuments(e,n,r,s,i){const o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new Ho(e,n,bo.emptySet(n),o,r,s,!0,!1,i)}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)&&af(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 s=0;s<n.length;s++)if(n[s].type!==r[s].type||!n[s].doc.isEqual(r[s].doc))return!1;return!0}}/**
2773 * @license
2774 * Copyright 2017 Google LLC
2775 *
2776 * Licensed under the Apache License, Version 2.0 (the "License");
2777 * you may not use this file except in compliance with the License.
2778 * You may obtain a copy of the License at
2779 *
2780 *   http://www.apache.org/licenses/LICENSE-2.0
2781 *
2782 * Unless required by applicable law or agreed to in writing, softw
2782are
2783 * distributed under the License is distributed on an "AS IS" BASIS,
2784 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2785 * See the License for the specific language governing permissions and
2786 * limitations under the License.
2787 */class DQ{constructor(){this.q_=void 0,this.Q_=[]}}class kQ{constructor(){this.queries=new oa(e=>dP(e),af),this.onlineState="Unknown",this.K_=new Set}}async function KP(t,e){const n=Pe(t),r=e.query;let s=!1,i=n.queries.get(r);if(i||(s=!0,i=new DQ),s)try{i.q_=await n.onListen(r)}catch(o){const a=dv(o,`Initialization of query '${Qi(e.query)}' failed`);return void e.onError(a)}n.queries.set(r,i),i.Q_.push(e),e.U_(n.onlineState),i.q_&&e.W_(i.q_)&&pv(n)}async function zP(t,e){const n=Pe(t),r=e.query;let s=!1;const i=n.queries.get(r);if(i){const o=i.Q_.indexOf(e);o>=0&&(i.Q_.splice(o,1),s=i.Q_.length===0)}if(s)return n.queries.delete(r),n.onUnlisten(r)}function OQ(t,e){const n=Pe(t);let r=!1;for(const s of e){const i=s.query,o=n.queries.get(i);if(o){for(const a of o.Q_)a.W_(s)&&(r=!0);o.q_=s}}r&&pv(n)}function MQ(t,e,n){const r=Pe(t),s=r.queries.get(e);if(s)for(const i of s.Q_)i.onError(n);r.queries.delete(e)}function pv(t){t.K_.forEach(e=>{e.next()})}class GP{constructor(e,n,r){this.query=e,this.G_=n,this.z_=!1,this.j_=null,this.onlineState="Unknown",this.options=r||{}}W_(e){if(!this.options.includeMetadataChanges){const r=[];for(const s of e.docChanges)s.type!==3&&r.push(s);e=new Ho(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.z_?this.H_(e)&&(this.G_.next(e),n=!0):this.J_(e,this.onlineState)&&(this.Y_(e),n=!0),this.j_=e,n}onError(e){this.G_.error(e)}U_(e){this.onlineState=e;let n=!1;return this.j_&&!this.z_&&this.J_(this.j_,e)&&(this.Y_(this.j_),n=!0),n}J_(e,n){if(!e.fromCache)return!0;const r=n!=="Offline";return(!this.options.Z_||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}H_(e){if(e.docChanges.length>0)return!0;const n=this.j_&&this.j_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}Y_(e){e=Ho.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.z_=!0,this.G_.next(e)}}/**
2788 * @license
2789 * Copyright 2017 Google LLC
2790 *
2791 * Licensed under the Apache License, Version 2.0 (the "License");
2792 * you may not use this file except in compliance with the License.
2793 * You may obtain a copy of the License at
2794 *
2795 *   http://www.apache.org/licenses/LICENSE-2.0
2796 *
2797 * Unless required by applicable law or agreed to in writing, software
2798 * distributed under the License is distributed on an "AS IS" BASIS,
2799 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2800 * See the License for the specific language governing permissions and
2801 * limitations under the License.
2802 */class QP{constructor(e){this.key=e}}class XP{constructor(e){this.key=e}}class NQ{constructor(e,n){this.query=e,this.oa=n,this._a=null,this.hasCachedResults=!1,this.current=!1,this.aa=Oe(),this.mutatedKeys=Oe(),this.ua=pP(e),this.ca=new bo(this.ua)}get la(){return this.oa}ha(e,n){const r=n?n.Pa:new xE,s=n?n.ca:this.ca;let i=n?n.mutatedKeys:this.mutatedKeys,o=s,a=!1;const l=this.query.limitType==="F"&&s.size===this.query.limit?s.last():null,c=this.query.limitType==="L"&&s.size===this.query.limit?s.first():null;if(e.inorderTraversal((u,h)=>{const f=s.get(u),d=lf(this.query,h)?h:null,p=!!f&&this.mutatedKeys.has(f.key),v=!!d&&(d.hasLocalMutations||this.mutatedKeys.has(d.key)&&d.hasCommittedMutations);let m=!1;f&&d?f.data.isEqual(d.data)?p!==v&&(r.track({type:3,doc:d}),m=!0):this.Ia(f,d)||(r.track({type:2,doc:d}),m=!0,(l&&this.ua(d,l)>0||c&&this.ua(d,c)<0)&&(a=!0)):!f&&d?(r.track({type:0,doc:d}),m=!0):f&&!d&&(r.track({type:1,doc:f}),m=!0,(l||c)&&(a=!0)),m&&(d?(o=o.add(d),i=v?i.add(u):i.delete(u)):(o=o.delete(u),i=i.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),i=i.delete(u.key),r.track({type:1,doc:u})}return{ca:o,Pa:r,Xi:a,mutatedKeys:i}}Ia(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}
2802applyChanges(e,n,r,s){const i=this.ca;this.ca=e.ca,this.mutatedKeys=e.mutatedKeys;const o=e.Pa.k_();o.sort((u,h)=>function(d,p){const v=m=>{switch(m){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Ee()}};return v(d)-v(p)}(u.type,h.type)||this.ua(u.doc,h.doc)),this.Ta(r),s=s!=null&&s;const a=n&&!s?this.Ea():[],l=this.aa.size===0&&this.current&&!s?1:0,c=l!==this._a;return this._a=l,o.length!==0||c?{snapshot:new Ho(this.query,e.ca,i,o,e.mutatedKeys,l===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),da:a}:{da:a}}U_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({ca:this.ca,Pa:new xE,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{da:[]}}Aa(e){return!this.oa.has(e)&&!!this.ca.has(e)&&!this.ca.get(e).hasLocalMutations}Ta(e){e&&(e.addedDocuments.forEach(n=>this.oa=this.oa.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.oa=this.oa.delete(n)),this.current=e.current)}Ea(){if(!this.current)return[];const e=this.aa;this.aa=Oe(),this.ca.forEach(r=>{this.Aa(r.key)&&(this.aa=this.aa.add(r.key))});const n=[];return e.forEach(r=>{this.aa.has(r)||n.push(new XP(r))}),this.aa.forEach(r=>{e.has(r)||n.push(new QP(r))}),n}Ra(e){this.oa=e.hs,this.aa=Oe();const n=this.ha(e.documents);return this.applyChanges(n,!0)}Va(){return Ho.fromInitialDocuments(this.query,this.ca,this.mutatedKeys,this._a===0,this.hasCachedResults)}}class LQ{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class xQ{constructor(e){this.key=e,this.ma=!1}}class VQ{constructor(e,n,r,s,i,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=s,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.fa={},this.ga=new oa(a=>dP(a),af),this.pa=new Map,this.ya=new Set,this.wa=new ft(me.comparator),this.Sa=new Map,this.ba=new ov,this.Da={},this.Ca=new Map,this.va=Bo.Bn(),this.onlineState="Unknown",this.Fa=void 0}get isPrimaryClient(){return this.Fa===!0}}async function $Q(t,e){const n=zQ(t);let r,s;const i=n.ga.get(e);if(i)r=i.targetId,n.sharedClientState.addLocalQueryTarget(r),s=i.view.Va();else{const o=await lQ(n.localStore,Ar(e)),a=n.sharedClientState.addLocalQueryTarget(o.targetId);r=o.targetId,s=await FQ(n,e,r,a==="current",o.resumeToken),n.isPrimaryClient&&UP(n.remoteStore,o)}return s}async function FQ(t,e,n,r,s){t.Ma=(h,f,d)=>async function(v,m,g,E){let y=m.view.ha(g);y.Xi&&(y=await OE(v.localStore,m.query,!1).then(({documents:R})=>m.view.ha(R,y)));const w=E&&E.targetChanges.get(m.targetId),I=E&&E.targetMismatches.get(m.targetId)!=null,A=m.view.applyChanges(y,v.isPrimaryClient,w,I);return $E(v,m.targetId,A.da),A.snapshot}(t,h,f,d);const i=await OE(t.localStore,e,!0),o=new NQ(e,i.hs),a=o.ha(i.documents),l=cc.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",s),c=o.applyChanges(a,t.isPrimaryClient,l);$E(t,n,c.da);const u=new LQ(e,n,o);return t.ga.set(e,u),t.pa.has(n)?t.pa.get(n).push(e):t.pa.set(n,[e]),c.snapshot}async function UQ(t,e){const n=Pe(t),r=n.ga.get(e),s=n.pa.get(r.targetId);if(s.length>1)return n.pa.set(r.targetId,s.filter(i=>!af(i,e))),void n.ga.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Gp(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),BP(n.remoteStore,r.targetId),Qp(n,r.targetId)}).catch(ic)):(Qp(n,r.targetId),await Gp(n.localStore,r.targetId,!0))}async function BQ(t,e,n){const r=GQ(t);try{const s=await function(o,a){const l=Pe(o),c=Rt.now(),u=a.reduce((d,p)=>d.add(p.key),Oe());let h,f;return l.persistence.runTransaction("Locally write mutations","readwrite",d=>{let p=Xr(),v=Oe();return l.os.getEntries(d,u).next(m=>{p=m,p.forEach((g,E)=>{E.isValidDocument()||(v=v.add(g))})}).next(()=>l.localDocuments.getOverlayedDocuments(d,p)).next(m=>{h=m;const g=[];for(const E of a){const y=d7(E,h.get(E.key).overlayedDocument);y!=null&&g.push(new Ys(E.key,y,iP(y.value.mapValue),qn.exists(!0)))}return l.mutationQueue.addMutationBatch(d,c,g,a)}).next(m=>{f=m;const g=m.applyToLocalDocumentSet(h,v);return l.documentOverlayCache.saveOverlays(d,m.batchId,g)})}).then(()=>({batchId:f.batchId,changes:gP(h)}))}(r.localStore,e);
2802r.sharedClientState.addPendingMutation(s.batchId),function(o,a,l){let c=o.Da[o.currentUser.toKey()];c||(c=new ft(Be)),c=c.insert(a,l),o.Da[o.currentUser.toKey()]=c}(r,s.batchId,n),await hc(r,s.changes),await pf(r.remoteStore)}catch(s){const i=dv(s,"Failed to persist write");n.reject(i)}}async function JP(t,e){const n=Pe(t);try{const r=await iQ(n.localStore,e);e.targetChanges.forEach((s,i)=>{const o=n.Sa.get(i);o&&(Ze(s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size<=1),s.addedDocuments.size>0?o.ma=!0:s.modifiedDocuments.size>0?Ze(o.ma):s.removedDocuments.size>0&&(Ze(o.ma),o.ma=!1))}),await hc(n,r,e)}catch(r){await ic(r)}}function VE(t,e,n){const r=Pe(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const s=[];r.ga.forEach((i,o)=>{const a=o.view.U_(e);a.snapshot&&s.push(a.snapshot)}),function(o,a){const l=Pe(o);l.onlineState=a;let c=!1;l.queries.forEach((u,h)=>{for(const f of h.Q_)f.U_(a)&&(c=!0)}),c&&pv(l)}(r.eventManager,e),s.length&&r.fa.u_(s),r.onlineState=e,r.isPrimaryClient&&r.sharedCl
2802ientState.setOnlineState(e)}}async function HQ(t,e,n){const r=Pe(t);r.sharedClientState.updateQueryState(e,"rejected",n);const s=r.Sa.get(e),i=s&&s.key;if(i){let o=new ft(me.comparator);o=o.insert(i,Ut.newNoDocument(i,Ae.min()));const a=Oe().add(i),l=new hf(Ae.min(),new Map,new ft(Be),o,a);await JP(r,l),r.wa=r.wa.remove(i),r.Sa.delete(e),mv(r)}else await Gp(r.localStore,e,!1).then(()=>Qp(r,e,n)).catch(ic)}async function jQ(t,e){const n=Pe(t),r=e.batch.batchId;try{const s=await sQ(n.localStore,e);eC(n,r,null),ZP(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await hc(n,s)}catch(s){await ic(s)}}async function WQ(t,e,n){const r=Pe(t);try{const s=await function(o,a){const l=Pe(o);return l.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let u;return l.mutationQueue.lookupMutationBatch(c,a).next(h=>(Ze(h!==null),u=h.keys(),l.mutationQueue.removeMutationBatch(c,h))).next(()=>l.mutationQueue.performConsistencyCheck(c)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(c,u,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,u)).next(()=>l.localDocuments.getDocuments(c,u))})}(r.localStore,e);eC(r,e,n),ZP(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await hc(r,s)}catch(s){await ic(s)}}function ZP(t,e){(t.Ca.get(e)||[]).forEach(n=>{n.resolve()}),t.Ca.delete(e)}function eC(t,e,n){const r=Pe(t);let s=r.Da[r.currentUser.toKey()];if(s){const i=s.get(e);i&&(n?i.reject(n):i.resolve(),s=s.remove(e)),r.Da[r.currentUser.toKey()]=s}}
2802function Qp(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.pa.get(e))t.ga.delete(r),n&&t.fa.xa(r,n);t.pa.delete(e),t.isPrimaryClient&&t.ba.Vr(e).forEach(r=>{t.ba.containsKey(r)||tC(t,r)})}function tC(t,e){t.ya.delete(e.path.canonicalString());const n=t.wa.get(e);n!==null&&(BP(t.remoteStore,n),t.wa=t.wa.remove(e),t.Sa.delete(n),mv(t))}function $E(t,e,n){for(const r of n)r instanceof QP?(t.ba.addReference(r.key,e),YQ(t,r)):r instanceof XP?(ne("SyncEngine","Document no longer in limbo: "+r.key),t.ba.removeReference(r.key,e),t.ba.containsKey(r.key)||tC(t,r.key)):Ee()}function YQ(t,e){const n=e.key,r=n.path.canonicalString();t.wa.get(n)||t.ya.has(r)||(ne("SyncEngine","New document in limbo: "+n),t.ya.add(r),mv(t))}function mv(t){for(;t.ya.size>0&&t.wa.size<t.maxConcurrentLimboResolutions;){const e=t.ya.values().next().value;t.ya.delete(e);const n=new me(st.fromString(e)),r=t.va.next();t.Sa.set(r,new xQ(n)),t.wa=t.wa.insert(n,r),UP(t.remoteStore,new Is(Ar(tv(n.path)),r,"TargetPurposeLimboResolution",Gg._e))}}async function hc(t,e,n){const r=Pe(t),s=[],i=[],o=[];r.ga.isEmpty()||(r.ga.forEach((a,l)=>{o.push(r.Ma(l,e,n).then(c=>
2802{if((c||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(l.targetId,c!=null&&c.fromCache?"not-current":"current"),c){s.push(c);const u=lv.Ki(l.targetId,c);i.push(u)}}))}),await Promise.all(o),r.fa.u_(s),await async function(l,c){const u=Pe(l);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",h=>H.forEach(c,f=>H.forEach(f.qi,d=>u.persistence.referenceDelegate.addReference(h,f.targetId,d)).next(()=>H.forEach(f.Qi,d=>u.persistence.referenceDelegate.removeReference(h,f.targetId,d)))))}catch(h){if(!oc(h))throw h;ne("LocalStore","Failed to update sequence numbers: "+h)}for(const h of c){const f=h.targetId;if(!h.fromCache){const d=u.ns.get(f),p=d.snapshotVersion,v=d.withLastLimboFreeSnapshotVersion(p);u.ns=u.ns.insert(f,v)}}}(r.localStore,i))}async function qQ(t,e){const n=Pe(t);if(!n.currentUser.isEqual(e)){ne("SyncEngine","User change. New user:",e.toKey());const r=await xP(n.localStore,e);n.currentUser=e,function(i,o){i.Ca.forEach(a=>{a.forEach(l=>{l.reject(new ce(F.CANCELLED,o))})}),i.Ca.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await hc(n,r.us)}}function KQ(t,e){const n=Pe(t),r=n.Sa.get(e);if(r&&r.ma)return Oe().add(r.key);{let s=Oe();const i=n.pa.get(e);if(!i)return s;for(const o of i){const a=n.ga.get(o);s=s.unionWith(a.view.la)}return s}}function zQ(t){const e=Pe(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=JP.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=KQ.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=HQ.bind(null,e),e.fa.u_=OQ.bind(null,e.eventManager),e.fa.xa=MQ.bind(null,e.eventManager),e}function GQ(t){const e=Pe(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=jQ.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=WQ.bind(null,e),e}class FE{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=ff(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 rQ(this.persistence,new tQ,e.initialUser,this.serializer)}createPersistence(e){return new J7(av.Hr,this.serializer)}createSharedClientState(e){return new uQ}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class QQ{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=>VE(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=qQ.bind(null,this.syncEngine),await SQ(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new kQ}()}createDatastore(e){const n=ff(e.databaseInfo.databaseId),r=function(i){return new pQ(i)}(e.databaseInfo);return function(i,o,a,l){return new vQ(i,o,a,l)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,s,i,o,a){return new _Q(r,s,i,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>VE(this.syncEngine,n,0),function(){return NE.D()?new NE:new hQ}())}createSyncEngine(e,n){return function(s,i,o,a,l,c,u){const h=new VQ(s,i,o,a,l,c);return u&&(h.Fa=!0),h}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e;await async function(r){const s=Pe(r);ne("RemoteStore","RemoteStore shutting down."),s.v_.add(5),await uc(s),s.M_.shutdown(),s.x_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate()}}/**
2803 * @license
2804 * Copyright 2020 Google LLC
2805 *
2806 * Licensed under the Apache License, Version 2.0 (the "License");
2807 * you may not use this file except in compliance with the License.
2808 * You may obtain a copy of the License at
2809 *
2810 *   http://www.apache.org/licenses/LICENSE-2.0
2811 *
2812 * Unless required by applicable law or agreed to in writing, software
2813 * distributed under the License is distributed on an "AS IS" BASIS,
2814 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2815 * See the License for the specific language governing permissions and
2816 * limitations under the License.
2817 *//**
2818 * @license
2819 * Copyright 2017 Google LLC
2820 *
2821 * Licensed under the Apache License, Version 2.0 (the "License");
2822 * you may not use this file except in compliance with the License.
2823 * You may obtain a copy of the License at
2824 *
2825 *   http://www.apache.org/licenses/LICENSE-2.0
2826 *
2827 * Unless required by applicable law or agreed to in writing, software
2828 * distributed under the License is distributed on an "AS IS" BASIS,
2829 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2830 * See the License for the specific language governing permissions and
2831 * limitations under the License.
2832 */class nC{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ba(this.observer.next,e)}error(e){this.observer.error?this.Ba(this.observer.error,e):Cr("Uncaught Error in snapshot listener:",e.toString())}La(){this.muted=!0}Ba(e,n){this.muted||setTimeout(()=>{this.muted||e(n)},0)}}/**
2833 * @license
2834 * Copyright 2017 Google LLC
2835 *
2836 * Licensed under the Apache License, Version 2.0 (the "License");
2837 * you may not use this file except in compliance with the License.
2838 * You may obtain a copy of the License at
2839 *
2840 *   http://www.apache.org/licenses/LICENSE-2.0
2841 *
2842 * Unless required by applicable law or agreed to in writing, software
2843 * distributed under the License is distributed on an "AS IS" BASIS,
2844 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2845 * See the License for the specific language governing permissions and
2846 * limitations under the License.
2847 */class XQ{constructor(e,n,r,s){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=s,this.user=Ft.UNAUTHENTICATED,this.clientId=nP.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async i=>{ne("FirestoreClient","Received user=",i.uid),await this.authCredentialListener(i),this.user=i}),this.appCheckCredentials.start(r,i=>(ne("FirestoreClient","Received new app check token=",i),this.appCheckCredentialListener(i,this.user)))}get configuration(){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 ce(F.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Ir;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=dv(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function wd(t,e){t.asyncQueue.verifyOperationInProgress(),ne("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async s=>{r.isEqual(s)||(await xP(e.localStore,s),r=s)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function UE(t,e){t.asyncQueue.verifyOperationInProgress();const n=await ZQ(t);ne("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>LE(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,s)=>LE(e.remoteStore,s)),t._onlineComponents=e}function JQ(t){return t.name==="FirebaseError"?t.code===F.FAILED_PRECONDITION||t.code===F.UNIMPLEMENT
2847ED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function ZQ(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ne("FirestoreClient","Using user provided OfflineComponentProvider");try{await wd(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!JQ(n))throw n;Vo("Error using user provided cache. Falling back to memory cache: "+n),await wd(t,new FE)}}else ne("FirestoreClient","Using default OfflineComponentProvider"),await wd(t,new FE);return t._offlineComponents}async function rC(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ne("FirestoreClient","Using user provided OnlineComponentProvider"),await UE(t,t._uninitializedComponentsProvider._online)):(ne("FirestoreClient","Using default OnlineComponentProvider"),await UE(t,new QQ))),t._onlineComponents}function eX(t){return rC(t).then(e=>e.syncEngine)}async function sC(t){const e=await rC(t),n=e.eventManager;return n.onListen=$Q.bind(null,e.syncEngine),n.onUnlisten=UQ.bind(null,e.syncEngine),n}function tX(t,e,n={}){const r=new Ir;return t.asyncQueue.enqueueAndForget(async()=>function(i,o,a,l,c){const u=new nC({next:f=>{o.enqueueAndForget(()=>zP(i,h));const d=f.docs.has(a);!d&&f.fromCache?c.reject(new ce(F.UNAVAILABLE,"Failed to get document because the client is offline.")):d&&f.fromCache&&l&&l.source==="server"?c.reject(new ce(F.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):c.resolve(f)},error:f=>c.reject(f)}),h=new GP(tv(a.path),u,{includeMetadataChanges:!0,Z_:!0});return KP(i,h)}(await sC(t),t.asyncQueue,e,n,r)),r.promise}function nX(t,e,n={}){const r=new Ir;return t.asyncQueue.enqueueAndForget(async()=>function(i,o,a,l,c){const u=new nC({next:f=>{o.enqueueAndForget(()=>zP(i,h)),f.fromCache&&l.source==="server"?c.reject(new ce(F.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.)')):c.resolve(f)},error:f=>c.reject(f)}),h=new GP(a,u,{includeMetadataChanges:!0,Z_:!0});return KP(i,h)}(await sC(t),t.asyncQueue,e,n,r)),r.promise}/**
2848 * @license
2849 * Copyright 2023 Google LLC
2850 *
2851 * Licensed under the Apache License, Version 2.0 (the "License");
2852 * you may not use this file except in compliance with the License.
2853 * You may obtain a copy of the License at
2854 *
2855 *   http://www.apache.org/licenses/LICENSE-2.0
2856 *
2857 * Unless required by applicable law or agreed to in writing, software
2858 * distributed under the License is distributed on an "AS IS" BASIS,
2859 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2860 * See the License for the specific language governing permissions and
2861 * limitations under the License.
2862 */function iC(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/**
2863 * @license
2864 * Copyright 2020 Google LLC
2865 *
2866 * Licensed under the Apache License, Version 2.0 (the "License");
2867 * you may not use this file except in compliance with the License.
2868 * You may obtain a copy of the License at
2869 *
2870 *   http://www.apache.org/licenses/LICENSE-2.0
2871 *
2872 * Unless required by applicable law or agreed to in writing, software
2873 * distributed under the License is distributed on an "AS IS" BASIS,
2874 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2875 * See the License for the specific language governing permissions and
2876 * limitations under the License.
2877 */const BE=new Map;/**
2878 * @license
2879 * Copyright 2017 Google LLC
2880 *
2881 * Licensed under the Apache License, Version 2.0 (the "License");
2882 * you may not use this file except in compliance with the License.
2883 * You may obtain a copy of the License at
2884 *
2885 *   http://www.apache.org/licenses/LICENSE-2.0
2886 *
2887 * Unless required by applicable law or agreed to in writing, software
2888 * distributed under the License is distributed on an "AS IS" BASIS,
2889 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2890 * See the License for the specific language governing permissions and
2891 * limitations under the License.
2892 */function oC(t,e,n){if(!n)throw new ce(F.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function rX(t,e,n,r){if(e===!0&&r===!0)throw new ce(F.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function HE(t){if(!me.isDocumentKey(t))throw new ce(F.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function jE(t){if(me.isDocumentKey(t))throw new ce(F.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function mf(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":Ee()}function ar(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new ce(F.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=mf(t);throw new ce(F.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/**
2893 * @license
2894 * Copyright 2020 Google LLC
2895 *
2896 * Licensed under the Apache License, Version 2.0 (the "License");
2897 * you may not use this file except in compliance with the License.
2898 * You may obtain a copy of the License at
2899 *
2900 *   http://www.apache.org/licenses/LICENSE-2.0
2901 *
2902 * Unless required by applicable law or agreed to in writing, software
2903 * distributed under the License is distributed on an "AS IS" BASIS,
2904 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2905 * See the License for the specific language governing permissions and
2906 * limitations under the License.
2907 */class WE{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new ce(F.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 ce(F.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}rX("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=iC((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(i){if(i.timeoutSeconds!==void 0){if(isNaN(i.timeoutSeconds))throw new ce(F.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (must not be NaN)`);if(i.timeoutSeconds<5)throw new ce(F.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (minimum allowed value is 5)`);if(i.timeoutSeconds>30)throw new ce(F.INVALID_ARGUMENT,`invalid long polling timeout: ${i.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,s){return r.timeoutSeconds===s.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class gf{constructor(e,n,r,s){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=s,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new WE({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new ce(F.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 ce(F.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 WE(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new b8;switch(r.type){case"firstParty":return new R8(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new ce(F.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=BE.get(n);r&&(ne("ComponentProvider","Removing Datastore"),BE.delete(n),r.terminate())}(this),Promise.resolve()}}function sX(t,e,n,r={}){var s;const i=(t=ar(t,gf))._getSettings(),o=`${e}:${n}`;if(i.host!=="firestore.googleapis.com"&&i.host!==o&&Vo("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},i),{host:o,ssl:!1})),r.mockUserToken){let a,l;if(typeof r.mockUserToken=="string")a=r.mockUserToken,l=Ft.MOCK_USER;else{a=L0(r.mockUserToken,(s=t._app)===null||s===void 0?void 0:s.options.projectId);const c=r.mockUserToken.sub||r.mockUserToken.user_id;if(!c)throw new ce(F.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");l=new Ft(c)}t._authCredentials=new T8(new tP(a,l))}}/**
2908 * @license
2909 * Copyright 2020 Google LLC
2910 *
2911 * Licensed under the Apache License, Version 2.0 (the "License");
2912 * you may not use this file except in compliance with the License.
2913 * You may obtain a copy of the License at
2914 *
2915 *   http://www.apache.org/licenses/LICENSE-2.0
2916 *
2917 * Unless required by applicable law or agreed to in writing, software
2918 * distributed under the License is distributed on an "AS IS" BASIS,
2919 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2920 * See the License for the specific language governing permissions and
2921 * limitations under the License.
2922 */class la{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new la(this.firestore,e,this._query)}}class tn{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 Ss(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new tn(this.firestore,e,this._key)}}class Ss extends la{constructor(e,n,r){super(e,n,tv(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 tn(this.firestore,null,new me(e))}withConverter(e){return new Ss(this.firestore,e,this._path)}}function YE(t,e,...n){if(t=it(t),oC("collection","path",e),t instanceof gf){const r=st.fromString(e,...n);return jE(r),new Ss(t,null,r)}{if(!(t instanceof tn||t instanceof Ss))throw new ce(F.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(st.fromString(e,...n));return jE(r),new Ss(t.firestore,null,r)}}function Cn(t,e,...n){if(t=it(t),arguments.length===1&&(e=nP.newId()),oC("doc","path",e),t instanceof gf){const r=st.fromString(e,...n);return HE(r),new tn(t,null,new me(r))}{if(!(t instanceof tn||t instanceof Ss))throw new ce(F.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(st.fromString(e,...n));return HE(r),new tn(t.firestore,t instanceof Ss?t.converter:null,new me(r))}}/**
2923 * @license
2924 * Copyright 2020 Google LLC
2925 *
2926 * Licensed under the Apache License, Version 2.0 (the "License");
2927 * you may not use this file except in compliance with the License.
2928 * You may obtain a copy of the License at
2929 *
2930 *   http://www.apache.org/licenses/LICENSE-2.0
2931 *
2932 * Unless required by applicable law or agreed to in writing, software
2933 * distributed under the License is distributed on an "AS IS" BASIS,
2934 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2935 * See the License for the specific language governing permissions and
2936 * limitations under the License.
2937 */class iX{constructor(){this.Xa=Promise.resolve(),this.eu=[],this.tu=!1,this.nu=[],this.ru=null,this.iu=!1,this.su=!1,this.ou=[],this.jo=new $P(this,"async_queue_retry"),this._u=()=>{const n=_d();n&&ne("AsyncQueue","Visibility state changed to "+n.visibilityState),this.jo.Ko()};const e=_d();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this._u)}get isShuttingDown(){return this.tu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.au(),this.uu(e)}enterRestrictedMode(e){if(!this.tu){this.tu=!0,this.su=e||!1;const n=_d();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this._u)}}enqueue(e){if(this.au(),this.tu)return new Promise(()=>{});const n=new Ir;return this.uu(()=>this.tu&&this.su?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.eu.push(e),this.cu()))}async cu(){if(this.eu.length!==0){try{await this.eu[0](),this.eu.shift(),this.jo.reset()}catch(e){if(!oc(e))throw e;ne("AsyncQueue","Operation failed with retryable error: "+e)}this.eu.length>0&&this.jo.qo(()=>this.cu())}}uu(e){const n=this.Xa.then(()=>(this.iu=!0,e().catch(r=>{this.ru=r,this.iu=!1;const s=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+`
2938`+o.stack),a}(r);throw Cr("INTERNAL UNHANDLED ERROR: ",s),r}).then(r=>(this.iu=!1,r))));return this.Xa=n,n}enqueueAfterDelay(e,n,r){this.au(),this.ou.indexOf(e)>-1&&(n=0);const s=fv.createAndSchedule(this,e,n,r,i=>this.lu(i));return this.nu.push(s),s}au(){this.ru&&Ee()}verifyOperationInProgress(){}async hu(){let e;
2938do e=this.Xa,await e;while(e!==this.Xa)}Pu(e){for(const n of this.nu)if(n.timerId===e)return!0;return!1}Iu(e){return this.hu().then(()=>{this.nu.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.nu)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.hu()})}Tu(e){this.ou.push(e)}lu(e){const n=this.nu.indexOf(e);this.nu.splice(n,1)}}class ji extends gf{constructor(e,n,r,s){super(e,n,r,s),this.type="firestore",this._queue=function(){return new iX}(),this._persistenceKey=(s==null?void 0:s.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||aC(this),this._firestoreClient.terminate()}}function sn(t,e){const n=typeof t=="object"?t:Vm(),r=typeof t=="string"?t:e||"(default)",s=Dh(n,"firestore").getImmediate({identifier:r});if(!s._initialized){const i=O0("firestore");i&&sX(s,...i)}return s}function gv(t){return t._firestoreClient||aC(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function aC(t){var e,n,r;const s=t._freezeSettings(),i=function(a,l,c,u){return new U8(a,l,c,u.host,u.ssl,u.experimentalForceLongPolling,u.experimentalAutoDetectLongPolling,iC(u.experimentalLongPollingOptions),u.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,s);t._firestoreClient=new XQ(t._authCredentials,t._appCheckCredentials,t._queue,i),!((n=s.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=s.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:s.localCache.kind,_offline:s.localCache._offlineComponentProvider,_online:s.localCache._onlineComponentProvider})}/**
2939 * @license
2940 * Copyright 2020 Google LLC
2941 *
2942 * Licensed under the Apache License, Version 2.0 (the "License");
2943 * you may not use this file except in compliance with the License.
2944 * You may obtain a copy of the License at
2945 *
2946 *   http://www.apache.org/licenses/LICENSE-2.0
2947 *
2948 * Unless required by applicable law or agreed to in writing, software
2949 * distributed under the License is distributed on an "AS IS" BASIS,
2950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2951 * See the License for the specific language governing permissions and
2952 * limitations under the License.
2953 */class jo{constructor(e){this._byteString=e}static fromBase64String(e){try{return new jo(Wt.fromBase64String(e))}catch(n){throw new ce(F.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new jo(Wt.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)}}/**
2954 * @license
2955 * Copyright 2020 Google LLC
2956 *
2957 * Licensed under the Apache License, Version 2.0 (the "License");
2958 * you may not use this file except in compliance with the License.
2959 * You may obtain a copy of the License at
2960 *
2961 *   http://www.apache.org/licenses/LICENSE-2.0
2962 *
2963 * Unless required by applicable law or agreed to in writing, software
2964 * distributed under the License is distributed on an "AS IS" BASIS,
2965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2966 * See the License for the specific language governing permissions and
2967 * limitations under the License.
2968 */class vf{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new ce(F.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Nt(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/**
2969 * @license
2970 * Copyright 2020 Google LLC
2971 *
2972 * Licensed under the Apache License, Version 2.0 (the "License");
2973 * you may not use this file except in compliance with the License.
2974 * You may obtain a copy of the License at
2975 *
2976 *   http://www.apache.org/licenses/LICENSE-2.0
2977 *
2978 * Unless required by applicable law or agreed to in writing, software
2979 * distributed under the License is distributed on an "AS IS" BASIS,
2980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2981 * See the License for the specific language governing permissions and
2982 * limitations under the License.
2983 */class vv{constructor(e){this._methodName=e}}/**
2984 * @license
2985 * Copyright 2017 Google LLC
2986 *
2987 * Licensed under the Apache License, Version 2.0 (the "License");
2988 * you may not use this file except in compliance with the License.
2989 * You may obtain a copy of the License at
2990 *
2991 *   http://www.apache.org/licenses/LICENSE-2.0
2992 *
2993 * Unless required by applicable law or agreed to in writing, software
2994 * distributed under the License is distributed on an "AS IS" BASIS,
2995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2996 * See the License for the specific language governing permissions and
2997 * limitations under the License.
2998 */class yv{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new ce(F.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new ce(F.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 Be(this._lat,e._lat)||Be(this._long,e._long)}}/**
2999 * @license
3000 * Copyright 2017 Google LLC
3001 *
3002 * Licensed under the Apache License, Version 2.0 (the "License");
3003 * you may not use this file except in compliance with the License.
3004 * You may obtain a copy of the License at
3005 *
3006 *   http://www.apache.org/licenses/LICENSE-2.0
3007 *
3008 * Unless required by applicable law or agreed to in writing, software
3009 * distributed under the License is distributed on an "AS IS" BASIS,
3010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3011 * See the License for the specific language governing permissions and
3012 * limitations under the License.
3013 */const oX=/^__.*__$/;class aX{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new Ys(e,this.data,this.fieldMask,n,this.fieldTransforms):new lc(e,this.data,n,this.fieldTransforms)}}class lC{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new Ys(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function cC(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Ee()}}class _v{constructor(e,n,r,s,i,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=s,i===void 0&&this.Eu(),this.fieldTransforms=i||[],this.fieldMask=o||[]}get path(){return this.settings.path}get du(){return this.settings.du}Au(e){return new _v(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ru(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),s=this.Au({path:r,Vu:!1});return s.mu(e),s}fu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),s=this.Au({path:r,Vu:!1});return s.Eu(),s}gu(e){return this.Au({path:void 0,Vu:!0})}pu(e){return lh(e,this.settings.methodName,this.settings.yu||!1,this.path,this.settings.wu)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}Eu(){if(this.path)for(let e=0;e<this.path.length;e++)this.mu(this.path.get(e))}mu(e){if(e.length===0)throw this.pu("Document fields must not be empty");if(cC(this.du)&&oX.test(e))throw this.pu('Document fields cannot begin and end with "__"')}}class lX{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||ff(e)}Su(e,n,r,s=!1){return new _v({du:e,methodName:n,wu:r,path:Nt.emptyPath(),Vu:!1,yu:s},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function yf(t){const e=t._freezeSettings(),n=ff(t._databaseId);return new lX(t._databaseId,!!e.ignoreUndefinedProperties,n)}function uC(t,e,n,r,s,i={}){const o=t.Su(i.merge||i.mergeFields?2:0,e,n,s);wv("Data must be an object, but it was:",o,r);const a=hC(r,o);let l,c;if(i.merge)l=new On(o.fieldMask),c=o.fieldTransforms;else if(i.mergeFields){const u=[];for(const h of i.mergeFields){const f=Xp(e,h,n);if(!o.contains(f))throw new ce(F.INVALID_ARGUMENT,`Field '${f}' is specified in your field mask but missing from your input data.`);dC(u,f)||u.push(f)}l=new On(u),c=o.fieldTransforms.filter(h=>l.covers(h.field))}else l=null,c=o.fieldTransforms;return new aX(new on(a),l,c)}class _f extends vv{_toFieldTransform(e){if(e.du!==2)throw e.du===1?e.pu(`${this._methodName}() can only appear at the top level of your update data`):e.pu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof _f}}function cX(t,e,n,r){const s=t.Su(1,e,n);wv("Data must be an object, but it was:",s,r);const i=[],o=on.empty();Bi(r,(l,c)=>{const u=Ev(e,l,n);c=it(c);const h=s.fu(u);if(c instanceof _f)i.push(u);else{const f=fc(c,h);f!=null&&(i.push(u),o.set(u,f))}});const a=new On(i);return new lC(o,a,s.fieldTransforms)}function uX(t,e,n,r,s,i){const o=t.Su(1,e,n),a=[Xp(e,r,n)],l=[s];if(i.length%2!=0)throw new ce(F.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let f=0;f<i.length;f+=2)a.push(Xp(e,i[f])),l.push(i[f+1]);const c=[],u=on.empty();for(let f=a.length-1;f>=0;--f)if(!dC(c,a[f])){const d=a[f];let p=l[f];p=it(p);const v=o.fu(d);if(p instanceof _f)c.push(d);else{const m=fc(p,v);m!=null&&(c.push(d),u.set(d,m))}}const h=new On(c);return new lC(u,h,o.fieldTransforms)}function hX(t,e,n,r=!1){return fc(n,t.Su(r?4:3,e))}function fc(t,e){if(fC(t=it(t)))return wv("Unsupported field value:",e,t),hC(t,e);if(t instanceof vv)return function(r,s){if(!cC(s.du))throw s.pu(`${r._methodName}
3013() can only be used with update() and set()`);if(!s.path)throw s.pu(`${r._methodName}() is not currently supported inside arrays`);const i=r._toFieldTransform(s);i&&s.fieldTransforms.push(i)}(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.Vu&&e.du!==4)throw e.pu("Nested arrays are not supported");return function(r,s){const i=[];let o=0;for(const a of r){let l=fc(a,s.gu(o));l==null&&(l={nullValue:"NULL_VALUE"}),i.push(l),o++}return{arrayValue:{values:i}}}(t,e)}return function(r,s){if((r=it(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return a7(s.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const i=Rt.fromDate(r);return{timestampValue:oh(s.serializer,i)}}if(r instanceof Rt){const i=new Rt(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:oh(s.serializer,i)}}if(r instanceof yv)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof jo)return{bytesValue:SP(s.serializer,r._byteString)};if(r instanceof tn){const i=s.databaseId,o=r.firestore._databaseId;if(!o.isEqual(i))throw s.pu(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:iv(r.firestore._databaseId||s.databaseId,r._key.path)}}throw s.pu(`Unsupported field value: ${mf(r)}`)}(t,e)}function hC(t,e){const n={};return rP(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Bi(t,(r,s)=>{const i=fc(s,e.Ru(r));i!=null&&(n[r]=i)}),{mapValue:{fields:n}}}function fC(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof Rt||t instanceof yv||t instanceof jo||t instanceof tn||t instanceof vv)}function wv(t,e,n){if(!fC(n)||!function(s){return typeof s=="object"&&s!==null&&(Object.getPrototypeOf(s)===Object.prototype||Object.getPrototypeOf(s)===null)}(n)){const r=mf(n);throw r==="an object"?e.pu(t+" a custom object"):e.pu(t+" "+r)}}function Xp(t,e,n){if((e=it(e))instanceof vf)return e._internalPath;if(typeof e=="string")return Ev(t,e);throw lh("Field path arguments must be of type string or ",t,!1,void 0,n)}const fX=new RegExp("[~\\*/\\[\\]]");function Ev(t,e,n){if(e.search(fX)>=0)throw lh(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new vf(...e.split("."))._internalPath}catch{throw lh(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function lh(t,e,n,r,s){const i=r&&!r.isEmpty(),o=s!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(i||o)&&(l+=" (found",i&&(l+=` in field ${r}`),o&&(l+=` in document ${s}`),l+=")"),new ce(F.INVALID_ARGUMENT,a+t+l)}function dC(t,e){return t.some(n=>n.isEqual(e))}/**
3014 * @license
3015 * Copyright 2020 Google LLC
3016 *
3017 * Licensed under the Apache License, Version 2.0 (the "License");
3018 * you may not use this file except in compliance with the License.
3019 * You may obtain a copy of the License at
3020 *
3021 *   http://www.apache.org/licenses/LICENSE-2.0
3022 *
3023 * Unless required by applicable law or agreed to in writing, software
3024 * distributed under the License is distributed on an "AS IS" BASIS,
3025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3026 * See the License for the specific language governing permissions and
3027 * limitations under the License.
3028 */class pC{constructor(e,n,r,s,i){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=s,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new tn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new dX(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(bv("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class dX extends pC{data(){return super.data()}}function bv(t,e){return typeof e=="string"?Ev(t,e):e instanceof vf?e._internalPath:e._delegate._internalPath}/**
3029 * @license
3030 * Copyright 2020 Google LLC
3031 *
3032 * Licensed under the Apache License, Version 2.0 (the "License");
3033 * you may not use this file except in compliance with the License.
3034 * You may obtain a copy of the License at
3035 *
3036 *   http://www.apache.org/licenses/LICENSE-2.0
3037 *
3038 * Unless required by applicable law or agreed to in writing, software
3039 * distributed under the License is distributed on an "AS IS" BASIS,
3040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3041 * See the License for the specific language governing permissions and
3042 * limitations under the License.
3043 */function pX(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new ce(F.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Tv{}class mX extends Tv{}function qE(t,e,...n){let r=[];e instanceof Tv&&r.push(e),r=r.concat(n),function(i){const o=i.filter(l=>l instanceof pc).length,a=i.filter(l=>l instanceof dc).length;if(o>1||o>0&&a>0)throw new ce(F.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const s of r)t=s._apply(t);return t}class dc extends mX{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new dc(e,n,r)}_apply(e){const n=this._parse(e);return mC(e._query,n),new la(e.firestore,e.converter,jp(e._query,n))}_parse(e){const n=yf(e.firestore);return function(i,o,a,l,c,u,h){let f;if(c.isKeyField()){if(u==="array-contains"||u==="array-contains-any")throw new ce(F.INVALID_ARGUMENT,`Invalid Query. You can't perform '${u}' queries on documentId().`);if(u==="in"||u==="not-in"){zE(h,u);const d=[];for(const p of h)d.push(KE(l,i,p));f={arrayValue:{values:d}}}else f=KE(l,i,h)}else u!=="in"&&u!=="not-in"&&u!=="array-contains-any"||zE(h,u),f=hX(a,o,h,u==="in"||u==="not-in");return wt.create(c,u,f)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}function Ed(t,e,n){const r=e,s=bv("where",t);return dc._create(s,r,n)}class pc extends Tv{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new pc(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:or.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(s,i){let o=s;const a=i.getFlattenedFilters();for(const l of a)mC(o,l),o=jp(o,l)}(e._query,n),new la(e.firestore,e.converter,jp(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}function gX(...t){return t.forEach(e=>vX("or",e)),pc._create("or",t)}function KE(t,e,n){if(typeof(n=it(n))=="string"){if(n==="")throw new ce(F.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!fP(e)&&n.indexOf("/")!==-1)throw new ce(F.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child(st.fromString(n));if(!me.isDocumentKey(r))throw new ce(F.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return mE(t,new me(r))}if(n instanceof tn)return mE(t,n._key);throw new ce(F.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${mf(n)}.`)}function zE(t,e){if(!Array.isArray(t)||t.length===0)throw new ce(F.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function mC(t,e){const n=function(s,i){for(const o of s)for(const a of o.getFlattenedFilters())if(i.indexOf(a.op)>=0)return a.op;return null}(t.filters,function(s){switch(s){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new ce(F.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new ce(F.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}function vX(t,e){if(!(e instanceof dc||e instanceof pc))throw new ce(F.INVALID_ARGUMENT,`Function ${t}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`)}class yX{convertValue(e,n="none"){switch(ki(e)){case 0:return null;case 1:return e.booleanValue;case 2:return _t(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(Di(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 Ee()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Bi(e,(s,i)=>{r[s]=this.convertValue(i,n)}),r}convertGeoPoint(e){return new yv(_t(e.latitude),_t(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Xg(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Pl(e));default:return null}}convertTimestamp(e){const n=xs(e);return new Rt(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=st.fromString(e);Ze(LP(r));const s=new Cl(r.get(1),r.get(3)),i=new me(r.popFirst(5));return s.isEqual(n)||Cr(`Document ${i} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),i}}/**
3044 * @license
3045 * Copyright 2020 Google LLC
3046 *
3047 * Licensed under the Apache License, Version 2.0 (the "License");
3048 * you may not use this file except in compliance with the License.
3049 * You may obtain a copy of the License at
3050 *
3051 *   http://www.apache.org/licenses/LICENSE-2.0
3052 *
3053 * Unless required by applicable law or agreed to in writing, software
3054 * distributed under the License is distributed on an "AS IS" BASIS,
3055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3056 * See the License for the specific language governing permissions and
3057 * limitations under the License.
3058 */function gC(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/**
3059 * @license
3060 * Copyright 2020 Google LLC
3061 *
3062 * Licensed under the Apache License, Version 2.0 (the "License");
3063 * you may not use this file except in compliance with the License.
3064 * You may obtain a copy of the License at
3065 *
3066 *   http://www.apache.org/licenses/LICENSE-2.0
3067 *
3068 * Unless required by applicable law or agreed to in writing, software
3069 * distributed under the License is distributed on an "AS IS" BASIS,
3070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3071 * See the License for the specific language governing permissions and
3072 * limitations under the License.
3073 */class Ma{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class vC extends pC{constructor(e,n,r,s,i,o){super(e,n,r,s,o),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new fu(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(bv("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class fu extends vC{data(e={}){return super.data(e)}}class _X{constructor(e,n,r,s){this._firestore=e,this._userDataWriter=n,this._snapshot=s,this.metadata=new Ma(s.hasPendingWrites,s.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 fu(this._firestore,this._userDataWriter,r.key,r,new Ma(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 ce(F.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(s,i){if(s._snapshot.oldDocs.isEmpty()){let o=0;return s._snapshot.docChanges.map(a=>{const l=new fu(s._firestore,s._userDataWriter,a.doc.key,a.doc,new Ma(s._snapshot.mutatedKeys.has(a.doc.key),s._snapshot.fromCache),s.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:o++}})}{let o=s._snapshot.oldDocs;return s._snapshot.docChanges.filter(a=>i||a.type!==3).map(a=>{const l=new fu(s._firestore,s._userDataWriter,a.doc.key,a.doc,new Ma(s._snapshot.mutatedKeys.has(a.doc.key),s._snapshot.fromCache),s.query.converter);let c=-1,u=-1;return a.type!==0&&(c=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:wX(a.type),doc:l,oldIndex:c,newIndex:u}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function wX(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Ee()}}/**
3074 * @license
3075 * Copyright 2020 Google LLC
3076 *
3077 * Licensed under the Apache License, Version 2.0 (the "License");
3078 * you may not use this file except in compliance with the License.
3079 * You may obtain a copy of the License at
3080 *
3081 *   http://www.apache.org/licenses/LICENSE-2.0
3082 *
3083 * Unless required by applicable law or agreed to in writing, softw
3083are
3084 * distributed under the License is distributed on an "AS IS" BASIS,
3085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3086 * See the License for the specific language governing permissions and
3087 * limitations under the License.
3088 */function ei(t){t=ar(t,tn);const e=ar(t.firestore,ji);return tX(gv(e),t._key).then(n=>TX(e,t,n))}class yC extends yX{constructor(e){super(),this.firestore=e}convertBytes(e){return new jo(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new tn(this.firestore,null,n)}}function GE(t){t=ar(t,la);const e=ar(t.firestore,ji),n=gv(e),r=new yC(e);return pX(t._query),nX(n,t._query).then(s=>new _X(e,r,t,s))}function bd(t,e,n){t=ar(t,tn);const r=ar(t.firestore,ji),s=gC(t.converter,e,n);return wf(r,[uC(yf(r),"setDoc",t._key,s,t.converter!==null,n).toMutation(t._key,qn.none())])}function jc(t,e,n,...r){t=ar(t,tn);const s=ar(t.firestore,ji),i=yf(s);let o;return o=typeof(e=it(e))=="string"||e instanceof vf?uX(i,"updateDoc",t._key,e,n,r):cX(i,"updateDoc",t._key,e),wf(s,[o.toMutation(t._key,qn.exists(!0))])}function EX(t){return wf(ar(t.firestore,ji),[new nv(t._key,qn.none())])}function bX(t,e){const n=ar(t.firestore,ji),r=Cn(t),s=gC(t.converter,e);return wf(n,[uC(yf(t.firestore),"addDoc",r._key,s,t.converter!==null,{}).toMutation(r._key,qn.exists(!1))]).then(()=>r)}function wf(t,e){return function(r,s){const i=new Ir;return r.asyncQueue.enqueueAndForget(async()=>BQ(await eX(r),s,i)),i.promise}(gv(t),e)}function TX(t,e,n){const r=n.docs.get(e._key),s=new yC(t);return new vC(t,s,e._key,r,new Ma(n.hasPendingWrites,n.fromCache),e.converter)}(function(e,n=!0){(function(s){ia=s})(xi),Ti(new Ms("firestore",(r,{instanceIdentifier:s,options:i})=>{const o=r.getProvider("app").getImmediate(),a=new ji(new I8(r.getProvider("auth-internal")),new C8(r.getProvider("app-check-internal")),function(c,u){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new ce(F.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Cl(c.options.projectId,u)}(o,s),o);return i=Object.assign({useFetchStreams:n},i),a._setSettings(i),a},"PUBLIC").setMultipleInstances(!0)),wr(uE,"4.4.3",e),wr(uE,"4.4.3","esm2017")})();const Jp=()=>{const t=hr("loginUser",()=>null);async function e(f,d){return await new Promise((p,v)=>{const m=us();return Gz(m,f,d).then(async g=>{t.value={uid:g.user.uid,displayName:g.user.displayName,email:g.user.email,photoURL:g.user.photoURL},await c(t.value),p()}).catch(g=>{g.code==="auth/invalid-email"?v(new Error("メールアドレスの形式が不正です。")):g.code==="auth/user-disabled"?v(new Error("このユーザーは無効化されています。")):g.code==="auth/user-not-found"?v(new Error("ユーザーが存在しません。")):g.code==="auth/wrong-password"?v(new Error("パスワードが間違っています。")):g.code==="auth/too-many-requests"?v(new Error("パスワードの試行回数が多すぎます。")):v(new Error("予期せぬエラーが起きました。時間をおいてから、試してください"))})})}async function n(){return await new Promise((f,d)=>{const p=us();r5(p).then(()=>{t.value=null,f()}).catch(v=>{d(v)})})}async function r(){return await new Promise((f,d)=>{const p=us(),v=new $r;I5(p,v).then(m=>{const g=m.user;g.getIdToken().then(async E=>{t.value={token:E,uid:g.uid,displayName:g.displayName,email:g.email,photoURL:g.photoURL},await c(t.value),f()}).catch(E=>{E.code==="auth/invalid-email"?d(new Error("メールアドレスの形式が不正です。")):E.code==="auth/user-disabled"?d(new Error("このユーザーは無効化されています。")):E.code==="auth/user-not-found"?d(new Error("ユーザーが存在しません。")):E.code==="auth/wrong-password"?d(new Error("パスワードが間違っています。")):E.code==="auth/too-many-requests"?d(new Error("試行回数が多すぎます。")):d(new Error("予期せぬエラーが起きました。時間をおいてから、試してください"))})}).catch(m=>{d(m)}).finally(()=>{})})}async function s(f,d,p){return await new Promise((v,m)=>{const g=us();zz(g,f,d).then(async E=>{const y=Ge().$createIconImage(p),w=await Ge().$uploadImage(y);await a(E.user,p,w),await h(E.user,p,w),v()}).catch(E=>{E.code==="auth/invalid-email"?m(new Error("メールアドレスの形式が不正です。")):E.code==="auth/user-disabled"?m(new Error("このユーザーは無効化されています。")):E.code==="auth/weak-password"?m(new Error("パスワードが簡単すぎます。")):E.code==="auth/user-not-found"?m(new Error("ユーザーが存在しません。")):E.code==="auth/wrong-password"?m(new Error("パスワードが間違っています。")):E.code==="auth/too-many-requests"?m(new Error("パスワードの試行回数が多すぎます。")):E.code==="auth/email-already-in-use"?m(new Error("このメールアドレスはすでに使われています。")):m(new Error("予期せぬエラーが発生しました。時間をおいて再度お試しください。"))})})}async function i(f){return await new Promise((d,p)=>{const v=us(),m=Ei().public;let g="";m.isDev?g="http://localhost:3000":g=m.PRODUCTION_URL;const E={url:g+kw,handleCodeInApp:!0};v.languageCode="ja",Kz(v,f,E).then(()=>{d()}).catch(y=>{p(y)})})}async function o(){return await new Promise((f,d)=>{const p=us(),v=Ei().public;let m="";v.isDev?m="http://localhost:3000":m=v.PRODUCTION_URL;const g={url:m+kw,handleCodeInApp:!0};p.languageCode="ja",Qz(p.currentUser,g).then(()=>{f()}).catch(E=>{d(E)})})}async function a(f,d,p){return await new Promise((v,m)=>{const g=us();Jz(g.currentUser,{displayName:d,photoURL:p}).then(async()=>{t.value={token:f.token,uid:f.uid,displayName:d,email:f.email,photoURL:p},t.value,await u(t.value),v()}).catch(E=>{m(E)})})}async function l(f){return await new Promise((d,p)=>{const v=us();v.currentUser,Zz(v.currentUser,f).then(async()=>{var m;t.value={token:(m=t.value)==null?void 0:m.token,uid:t.value.uid,displayName:t.value.displayName,email:f,photoURL:t.value.photoURL},await u(t.value),d()}).catch(m=>{p(m)})})}async function c(f){const d=Cn(sn(),"users",f.uid);try{await bd(d,{uid:f.uid,displayName:f.displayName,email:f.email,photoURL:f.photoURL,createdAt:new Date})}catch(p){throw p}}async function u(f){const d=Cn(sn(),"users",f.uid);try{await bd(d,{uid:f.uid,displayName:f.displayName,email:f.email,photoURL:f.photoURL,createdAt:new Date})}catch(p){throw p}}async function h(f,d,p){const v=Cn(sn(),"users",f.uid);try{await bd(v,{uid:f.uid,email:f.email,displayName:d,photoURL:p,createdAt:new Date})}catch(m){throw m}}return{signIn:e,signOut:n,loginUser:t,signInWithGoogle:r,signUpEmail:s,resetPasswordEmail:i,verificationEmail
3088:o,updateMyPage:a,updateUserEmail:l}},IX=()=>{const t=Jn(),e=hr("isLoadingTripList",()=>!1),n=hr("isAsc",()=>!1),r=hr("isOwner",()=>!1),s=hr("isInvited",()=>!1),i=hr("isPublic",()=>!1),o=YE(sn(),"tripLists"),a=hr("tripList",()=>null),l=hr("tripList",()=>[]),c=hr("tripListMembers",()=>[]),u=hr("inviteTripListId",()=>"");return{isLoading:e,tripLists:l,tripList:a,isOwner:r,isOwnerFunc:async R=>{var $,S;const{loginUser:P}=Jp(),C=Cn(sn(),"tripLists",R),D=await ei(C);if(!D.exists())throw r.value=!1,new Error("存在しない旅行リストです");if((($=D.data())==null?void 0:$.userId)!==((S=P.value)==null?void 0:S.uid))throw r.value=!1,new Error("編集権限がありません");r.value=!0},tripListMembers:c,inviteTripListId:u,createNewTripLists:async(R,P,C)=>{try{if(e.value=!0,!R)throw new Error("idが空です");if(!P)throw new Error("旅行リスト名が空です");const D=await bX(o,{userId:R,listName:P,description:C||"未入力",createdAt:new Date,owners:[R],isPublic:!1,invites:[]});await jc(D,{id:D.id})}catch(D){throw D}finally{e.value=!1}},fetchTripLists:async R=>{l.value=[];const P=qE(o,gX(Ed("userId","==",R),Ed("invites","array-contains",R)));try{e.value=!0;const C=await GE(P);l.value=C.docs.map(D=>D.data()).sort((D,$)=>D.createdAt>$.createdAt?1:-1)}catch{}finally{e.value=!1}},fetchTripList:async R=>{const P=Cn(sn(),"tripLists",R);try{e.value=!0;const C=await ei(P);if(!C.exists())throw t.push({path:"/"}),new Error("存在しない旅行リストです");a.value=C.data()}catch{}finally{e.value=!1}},updateTripList:async(R,P,C,D)=>{const $=Cn(sn(),"tripLists",R);try{if(!R)throw new Error("idが空です");if(!P)throw new Error("リスト名が空です");if(!C)throw new Error("説明が空です");e.value=!0,await jc($,{listName:P,description:C,isPublic:D}),alert("更新しました")}catch{alert("更新に失敗しました")}finally{e.value=!1}},inviteTripList:async(R,P)=>{var D,$,S;if(R==="")throw new Error("ユーザーのidが空です");if(P==="")throw new Error("招待IDが見当たらないです");const C=Cn(sn(),"tripLists",P);try{const V=await ei(C);if(!V.exists())throw new Error("存在しない旅行リストです");if(((D=V.data())==null?void 0:D.isPublic)===!1)throw new Error("非公開のリストです");if(($=V.data())!=null&&$.invites.includes(R))return;await jc(C,{invites:[...((S=V.data())==null?void 0:S.invites)||[],R]})}catch(V){const oe=V.message;throw new Error(oe)}},isPublic:i,fetchTripListMembers:async R=>{var V,oe;const P=Cn(sn(),"tripLists",R),C=await ei(P);if(!C.exists())throw t.push({path:"/"}),new Error("存在しない旅行リストです");const D=((V=C.data())==null?void 0:V.invites)||[];D.push((oe=C.data())==null?void 0:oe.userId);const $=qE(YE(sn(),"users"),Ed("uid","in",D)),S=await GE($);c.value=S.docs.map(J=>J.data())},leaveTripList:async(R,P)=>{var D;if(R==="")throw new Error("ユーザーのidが空です");const C=Cn(sn(),"tripLists",P);try{const $=await ei(C);if(!$.exists())throw t.push({path:"/"}),new Error("存在しない旅行リストです");const V=(((D=$.data())==null?void 0:D.invites)||[]).filter(oe=>oe!==R);await jc(C,{invites:V}),c.value=c.value.filter(oe=>oe.uid!==R)}catch($){const S=$.message;throw new Error(S)}},setInviteTripListId:R=>{u.value=R},deleteTripList:async R=>{const P=Cn(sn(),"tripLists",R);try{e.value=!0,await EX(P)}catch(C){throw new Error(C)}finally{e.value=!1}},isInvited:s,isInvitedFun:async R=>{var $,S,V,oe;const{loginUser:P}=Jp(),C=Cn(sn(),"tripLists",R),D=await ei(C);if((($=P.value)==null?void 0:$.uid)===((S=D.data())==null?void 0:S.userId))return s.value=!0,!0;if(!D.exists())throw s.value=!1,t.push({path:"/"}),new Error("存在しない旅行リストです");return(oe=D.data())!=null&&oe.invites.includes((V=P.value)==null?void 0:V.uid)||(s.value=!1),s.value=!0,!0},sortTripLists:()=>{n.value=!n.value,l.value.sort((R,P)=>n.value?R.createdAt>P.createdAt?-1:1:R.createdAt<P.createdAt?-1:1)},isAsc:n}},AX=Xn(()=>({provide:{async isPublic(t){var o,a;const{loginUser:e}=Jp(),{isPublic:n}=IX(),r=Jn(),s=Cn(sn(),"tripLists",t),i=await ei(s);if(i.data(),!i.exists())throw r.push({path:"/"}),n.value=!1,new Error("存在しない旅行リストです");if(((o=e.value)==null?void 0:o.uid)!==i.data().userId&&!((a=i.data())!=null&&a.isPublic))throw n.value=!1,new Error("公開されていない旅行リストです");n.value=!0}}}));/**
3089 * @license
3090 * Copyright 2017 Google LLC
3091 *
3092 * Licensed under the Apache License, Version 2.0 (the "License");
3093 * you may not use this file except in compliance with the License.
3094 * You may obtain a copy of the License at
3095 *
3096 *   http://www.apache.org/licenses/LICENSE-2.0
3097 *
3098 * Unless required by applicable law or agreed to in writing, software
3099 * distributed under the License is distributed on an "AS IS" BASIS,
3100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3101 * See the License for the specific language governing permissions and
3102 * limitations under the License.
3103 */const _C="firebasestorage.googleapis.com",wC="storageBucket",RX=2*60*1e3,PX=10*60*1e3;/**
3104 * @license
3105 * Copyright 2017 Google LLC
3106 *
3107 * Licensed under the Apache License, Version 2.0 (the "License");
3108 * you may not use this file except in compliance with the License.
3109 * You may obtain a copy of the License at
3110 *
3111 *   http://www.apache.org/licenses/LICENSE-2.0
3112 *
3113 * Unless required by applicable law or agreed to in writing, software
3114 * distributed under the License is distributed on an "AS IS" BASIS,
3115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3116 * See the License for the specific language governing permissions and
3117 * limitations under the License.
3118 */class gt extends Dr{constructor(e,n,r=0){super(Td(e),`Firebase Storage: ${n} (${Td(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,gt.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Td(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
3119${this.customData.serverResponse}`:this.message=this._baseMessage}}var mt;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(mt||(mt={}));function Td(t){return"storage/"+t}function Iv(){const t="An unknown error occurred, please check the error payload for server response.";return new gt(mt.UNKNOWN,t)}function CX(t){return new gt(mt.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function SX(t){return new gt(mt.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function DX(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new gt(mt.UNAUTHENTICATED,t)}function kX(){return new gt(mt.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function OX(t){return new gt(mt.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function MX(){return new gt(mt.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function NX(){return new gt(mt.CANCELED,"User canceled the upload/download.")}function LX(t){return new gt(mt.INVALID_URL,"Invalid URL '"+t+"'.")}function xX(t){return new gt(mt.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function VX(){return new gt(mt.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+wC+"' property when initializing the app?")}function $X(){return new gt(mt.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function FX(){return new gt(mt.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function UX(t){return new gt(mt.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}
3119function Zp(t){return new gt(mt.INVALID_ARGUMENT,t)}function EC(){return new gt(mt.APP_DELETED,"The Firebase app was deleted.")}function BX(t){return new gt(mt.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Qa(t,e){return new gt(mt.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function Ea(t){throw new gt(mt.INTERNAL_ERROR,"Internal error: "+t)}/**
3120 * @license
3121 * Copyright 2017 Google LLC
3122 *
3123 * Licensed under the Apache License, Version 2.0 (the "License");
3124 * you may not use this file except in compliance with the License.
3125 * You may obtain a copy of the License at
3126 *
3127 *   http://www.apache.org/licenses/LICENSE-2.0
3128 *
3129 * Unless required by applicable law or agreed to in writing, software
3130 * distributed under the License is distributed on an "AS IS" BASIS,
3131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3132 * See the License for the specific language governing permissions and
3133 * limitations under the License.
3134 */class Mn{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=Mn.makeFromUrl(e,n)}catch{return new Mn(e,"")}if(r.path==="")return r;throw xX(e)}static makeFromUrl(e,n){let r=null;const s="([A-Za-z0-9.\\-_]+)";function i(w){w.path.charAt(w.path.length-1)==="/"&&(w.path_=w.path_.slice(0,-1))}const o="(/(.*))?$",a=new RegExp("^gs://"+s+o,"i"),l={bucket:1,path:3};function c(w){w.path_=decodeURIComponent(w.path)}const u="v[A-Za-z0-9_]+",h=n.replace(/[.]/g,"\\."),f="(/([^?#]*).*)?$",d=new RegExp(`^https?://${h}/${u}/b/${s}/o${f}`,"i"),p={bucket:1,path:3},v=n===_C?"(?:storage.googleapis.com|storage.cloud.google.com)":n,m="([^?#]*)",g=new RegExp(`^https?://${v}/${s}/${m}`,"i"),y=[{regex:a,indices:l,postModify:i},{regex:d,indices:p,postModify:c},{regex:g,indices:{bucket:1,path:2},postModify:c}];for(let w=0;w<y.length;w++){const I=y[w],A=I.regex.exec(e);if(A){const R=A[I.indices.bucket];let P=A[I.indices.path];P||(P=""),r=new Mn(R,P),I.postModify(r);break}}if(r==null)throw LX(e);return r}}class HX{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/**
3135 * @license
3136 * Copyright 2017 Google LLC
3137 *
3138 * Licensed under the Apache License, Version 2.0 (the "License");
3139 * you may not use this file except in compliance with the License.
3140 * You may obtain a copy of the License at
3141 *
3142 *   http://www.apache.org/licenses/LICENSE-2.0
3143 *
3144 * Unless required by applicable law or agreed to in writing, software
3145 * distributed under the License is distributed on an "AS IS" BASIS,
3146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3147 * See the License for the specific language governing permissions and
3148 * limitations under the License.
3149 */function jX(t,e,n){let r=1,s=null,i=null,o=!1,a=0;function l(){return a===2}let c=!1;function u(...m){c||(c=!0,e.apply(null,m))}function h(m){s=setTimeout(()=>{s=null,t(d,l())},m)}function f(){i&&clearTimeout(i)}function d(m,...g){if(c){f();return}if(m){f(),u.call(null,m,...g);return}if(l()||o){f(),u.call(null,m,...g);return}r<64&&(r*=2);let y;a===1?(a=2,y=0):y=(r+Math.random())*1e3,h(y)}let p=!1;function v(m){p||(p=!0,f(),!c&&(s!==null?(m||(a=2),clearTimeout(s),h(0)):m||(a=1)))}return h(0),i=setTimeout(()=>{o=!0,v(!0)},n),v}function WX(t){t(!1)}/**
3150 * @license
3151 * Copyright 2017 Google LLC
3152 *
3153 * Licensed under the Apache License, Version 2.0 (the "License");
3154 * you may not use this file except in compliance with the License.
3155 * You may obtain a copy of the License at
3156 *
3157 *   http://www.apache.org/licenses/LICENSE-2.0
3158 *
3159 * Unless required by applicable law or agreed to in writing, software
3160 * distributed under the License is distributed on an "AS IS" BASIS,
3161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3162 * See the License for the specific language governing permissions and
3163 * limitations under the License.
3164 */function YX(t){return t!==void 0}function qX(t){return typeof t=="object"&&!Array.isArray(t)}function Av(t){return typeof t=="string"||t instanceof String}function QE(t){return Rv()&&t instanceof Blob}function Rv(){return typeof Blob<"u"}function XE(t,e,n,r){if(r<e)throw Zp(`Invalid value for '${t}'. Expected ${e} or greater.`);if(r>n)throw Zp(`Invalid value for '${t}'. Expected ${n} or less.`)}/**
3165 * @license
3166 * Copyright 2017 Google LLC
3167 *
3168 * Licensed under the Apache License, Version 2.0 (the "License");
3169 * you may not use this file except in compliance with the License.
3170 * You may obtain a copy of the License at
3171 *
3172 *   http://www.apache.org/licenses/LICENSE-2.0
3173 *
3174 * Unless required by applicable law or agreed to in writing, software
3175 * distributed under the License is distributed on an "AS IS" BASIS,
3176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3177 * See the License for the specific language governing permissions and
3178 * limitations under the License.
3179 */function Pv(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function bC(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const s=e(r)+"="+e(t[r]);n=n+s+"&"}return n=n.slice(0,-1),n}/**
3180 * @license
3181 * Copyright 2017 Google LLC
3182 *
3183 * Licensed under the Apache License, Version 2.0 (the "License");
3184 * you may not use this file except in compliance with the License.
3185 * You may obtain a copy of the License at
3186 *
3187 *   http://www.apache.org/licenses/LICENSE-2.0
3188 *
3189 * Unless required by applicable law or agreed to in writing, software
3190 * distributed under the License is distributed on an "AS IS" BASIS,
3191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3192 * See the License for the specific language governing permissions and
3193 * limitations under the License.
3194 */var gi;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(gi||(gi={}));/**
3195 * @license
3196 * Copyright 2022 Google LLC
3197 *
3198 * Licensed under the Apache License, Version 2.0 (the "License");
3199 * you may not use this file except in compliance with the License.
3200 * You may obtain a copy of the License at
3201 *
3202 *   http://www.apache.org/licenses/LICENSE-2.0
3203 *
3204 * Unless required by applicable law or agreed to in writing, software
3205 * distributed under the License is distributed on an "AS IS" BASIS,
3206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3207 * See the License for the specific language governing permissions and
3208 * limitations under the License.
3209 */function KX(t,e){const n=t>=500&&t<600,s=[408,429].indexOf(t)!==-1,i=e.indexOf(t)!==-1;return n||s||i}/**
3210 * @license
3211 * Copyright 2017 Google LLC
3212 *
3213 * Licensed under the Apache License, Version 2.0 (the "License");
3214 * you may not use this file except in compliance with the License.
3215 * You may obtain a copy of the License at
3216 *
3217 *   http://www.apache.org/licenses/LICENSE-2.0
3218 *
3219 * Unless required by applicable law or agreed to in writing, software
3220 * distributed under the License is distributed on an "AS IS" BASIS,
3221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3222 * See the License for the specific language governing permissions and
3223 * limitations under the License.
3224 */class zX{constructor(e,n,r,s,i,o,a,l,c,u,h,f=!0){this.url_=e,this.method_=n,this.headers_=r,this.body_=s,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=a,this.errorCallback_=l,this.timeout_=c,this.progressCallback_=u,this.connectionFactory_=h,this.retry=f,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((d,p)=>{this.resolve_=d,this.reject_=p,this.start_()})}start_(){const e=(r,s)=>{if(s){r(!1,new Wc(!1,null,!0));return}const i=this.connectionFactory_();this.pendingConnection_=i;const o=a=>{const l=a.loaded,c=a.lengthComputable?a.total:-1;this.progressCallback_!==null&&this.progressCallback_(l,c)};this.progressCallback_!==null&&i.addUploadProgressListener(o),i.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&i.removeUploadProgressListener(o),this.pendingConnection_=null;const a=i.getErrorCode()===gi.NO_ERROR,l=i.getStatus();if(!a||KX(l,this.additionalRetryCodes_)&&this.retry){const u=i.getErrorCode()===gi.ABORT;r(!1,new Wc(!1,null,u));return}const c=this.successCodes_.indexOf(l)!==-1;r(!0,new Wc(c,i))})},n=(r,s)=>{const i=this.resolve_,o=this.reject_,a=s.connection;if(s.wasSuccessCode)try{const l=this.callback_(a,a.getResponse());YX(l)?i(l):i()}catch(l){o(l)}else if(a!==null){const l=Iv();l.serverResponse=a.getErrorText(),this.errorCallback_?o(this.errorCallback_(a,l)):o(l)}else if(s.canceled){const l=this.appDelete_?EC():NX();o(l)}else{const l=MX();o(l)}};this.canceled_?n(!1,new Wc(!1,null,!0)):this.backoffId_=jX(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&WX(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class Wc{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function GX(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function QX(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function XX(t,e){e&&(t["X-Firebase-GMPID"]=e)}function JX(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}
3224function ZX(t,e,n,r,s,i,o=!0){const a=bC(t.urlParams),l=t.url+a,c=Object.assign({},t.headers);return XX(c,e),GX(c,n),QX(c,i),JX(c,r),new zX(l,t.method,c,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,s,o)}/**
3225 * @license
3226 * Copyright 2017 Google LLC
3227 *
3228 * Licensed under the Apache License, Version 2.0 (the "License");
3229 * you may not use this file except in compliance with the License.
3230 * You may obtain a copy of the License at
3231 *
3232 *   http://www.apache.org/licenses/LICENSE-2.0
3233 *
3234 * Unless required by applicable law or agreed to in writing, software
3235 * distributed under the License is distributed on an "AS IS" BASIS,
3236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3237 * See the License for the specific language governing permissions and
3238 * limitations under the License.
3239 */function eJ(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function tJ(...t){const e=eJ();if(e!==void 0){const n=new e;for(let r=0;r<t.length;r++)n.append(t[r]);return n.getBlob()}else{if(Rv())return new Blob(t);throw new gt(mt.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function nJ(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}/**
3240 * @license
3241 * Copyright 2021 Google LLC
3242 *
3243 * Licensed under the Apache License, Version 2.0 (the "License");
3244 * you may not use this file except in compliance with the License.
3245 * You may obtain a copy of the License at
3246 *
3247 *   http://www.apache.org/licenses/LICENSE-2.0
3248 *
3249 * Unless required by applicable law or agreed to in writing, software
3250 * distributed under the License is distributed on an "AS IS" BASIS,
3251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3252 * See the License for the specific language governing permissions and
3253 * limitations under the License.
3254 */function rJ(t){if(typeof atob>"u")throw UX("base-64");return atob(t)}/**
3255 * @license
3256 * Copyright 2017 Google LLC
3257 *
3258 * Licensed under the Apache License, Version 2.0 (the "License");
3259 * you may not use this file except in compliance with the License.
3260 * You may obtain a copy of the License at
3261 *
3262 *   http://www.apache.org/licenses/LICENSE-2.0
3263 *
3264 * Unless required by applicable law or agreed to in writing, software
3265 * distributed under the License is distributed on an "AS IS" BASIS,
3266 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3267 * See the License for the specific language governing permissions and
3268 * limitations under the License.
3269 */const _r={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class Id{constructor(e,n){this.data=e,this.contentType=n||null}}function sJ(t,e){switch(t){case _r.RAW:return new Id(TC(e));case _r.BASE64:case _r.BASE64URL:return new Id(IC(t,e));case _r.DATA_URL:return new Id(oJ(e),aJ(e))}throw Iv()}function TC(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|r&63);else if((r&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{const i=r,o=t.charCodeAt(++n);r=65536|(i&1023)<<10|o&1023,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function iJ(t){let e;try{e=decodeURIComponent(t)}catch{throw Qa(_r.DATA_URL,"Malformed data URL.")}return TC(e)}function IC(t,e){switch(t){case _r.BASE64:{const s=e.indexOf("-")!==-1,i=e.indexOf("_")!==-1;if(s||i)throw Qa(t,"Invalid character '"+(s?"-":"_")+"' found: is it base64url encoded?");break}case _r.BASE64URL:{const s=e.indexOf("+")!==-1,i=e.indexOf("/")!==-1;if(s||i)throw Qa(t,"Invalid character '"+(s?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=rJ(e)}catch(s){throw s.message.includes("polyfill")?s:Qa(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);return r}class AC{constructor(e){this.base64=!1,this.contentType=null;const n=e.match(/^data:([^,]+)?,/);if(n===null)throw Qa(_r.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const r=n[1]||null;r!=null&&(this.base64=lJ(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function oJ(t){const e=new AC(t);return e.base64?IC(_r.BASE64,e.rest):iJ(e.rest)}function aJ(t){return new AC(t).contentType}function lJ(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/**
3270 * @license
3271 * Copyright 2017 Google LLC
3272 *
3273 * Licensed under the Apache License, Version 2.0 (the "License");
3274 * you may not use this file except in compliance with the License.
3275 * You may obtain a copy of the License at
3276 *
3277 *   http://www.apache.org/licenses/LICENSE-2.0
3278 *
3279 * Unless required by applicable law or agreed to in writing, software
3280 * distributed under the License is distributed on an "AS IS" BASIS,
3281 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3282 * See the License for the specific language governing permissions and
3283 * limitations under the License.
3284 */class bs{constructor(e,n){let r=0,s="";QE(e)?(this.data_=e,r=e.size,s=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=s}size(){return this.size_}type(){return this.type_}slice(e,n){if(QE(this.data_)){const r=this.data_,s=nJ(r,e,n);return s===null?null:new bs(s)}else{const r=new Uint8Array(this.data_.buffer,e,n-e);return new bs(r,!0)}}static getBlob(...e){if(Rv()){const n=e.map(r=>r instanceof bs?r.data_:r);return new bs(tJ.apply(null,n))}else{const n=e.map(o=>Av(o)?sJ(_r.RAW,o).data:o.data_);let r=0;n.forEach(o=>{r+=o.byteLength});const s=new Uint8Array(r);let i=0;return n.forEach(o=>{for(let a=0;a<o.length;a++)s[i++]=o[a]}),new bs(s,!0)}}uploadData(){return this.data_}}/**
3285 * @license
3286 * Copyright 2017 Google LLC
3287 *
3288 * Licensed under the Apache License, Version 2.0 (the "License");
3289 * you may not use this file except in compliance with the License.
3290 * You may obtain a copy of the License at
3291 *
3292 *   http://www.apache.org/licenses/LICENSE-2.0
3293 *
3294 * Unless required by applicable law or agreed to in writing, software
3295 * distributed under the License is distributed on an "AS IS" BASIS,
3296 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3297 * See the License for the specific language governing permissions and
3298 * limitations under the License.
3299 */function RC(t){let e;try{e=JSON.parse(t)}catch{return null}return qX(e)?e:null}/**
3300 * @license
3301 * Copyright 2017 Google LLC
3302 *
3303 * Licensed under the Apache License, Version 2.0 (the "License");
3304 * you may not use this file except in compliance with the License.
3305 * You may obtain a copy of the License at
3306 *
3307 *   http://www.apache.org/licenses/LICENSE-2.0
3308 *
3309 * Unless required by applicable law or agreed to in writing, software
3310 * distributed under the License is distributed on an "AS IS" BASIS,
3311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3312 * See the License for the specific language governing permissions and
3313 * limitations under the License.
3314 */function cJ(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function uJ(t,e){const n=e.split("/").filter(r=>r.length>0).join("/");return t.length===0?n:t+"/"+n}function PC(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/**
3315 * @license
3316 * Copyright 2017 Google LLC
3317 *
3318 * Licensed under the Apache License, Version 2.0 (the "License");
3319 * you may not use this file except in compliance with the License.
3320 * You may obtain a copy of the License at
3321 *
3322 *   http://www.apache.org/licenses/LICENSE-2.0
3323 *
3324 * Unless required by applicable law or agreed to in writing, software
3325 * distributed under the License is distributed on an "AS IS" BASIS,
3326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3327 * See the License for the specific language governing permissions and
3328 * limitations under the License.
3329 */function hJ(t,e){return e}class zt{constructor(e,n,r,s){this.server=e,this.local=n||e,this.writable=!!r,this.xform=s||hJ}}let Yc=null;function fJ(t){return!Av(t)||t.length<2?t:PC(t)}function CC(){if(Yc)return Yc;const t=[];t.push(new zt("bucket")),t.push(new zt("generation")),t.push(new zt("metageneration")),t.push(new zt("name","fullPath",!0));function e(i,o){return fJ(o)}const n=new zt("name");n.xform=e,t.push(n);function r(i,o){return o!==void 0?Number(o):o}const s=new zt("size");return s.xform=r,t.push(s),t.push(new zt("timeCreated")),t.push(new zt("updated")),t.push(new zt("md5Hash",null,!0)),t.push(new zt("cacheControl",null,!0)),t.push(new zt("contentDisposition",null,!0)),t.push(new zt("contentEncoding",null,!0)),t.push(new zt("contentLanguage",null,!0)),t.push(new zt("contentType",null,!0)),t.push(new zt("metadata","customMetadata",!0)),Yc=t,Yc}function dJ(t,e){function n(){const r=t.bucket,s=t.fullPath,i=new Mn(r,s);return e._makeStorageReference(i)}Object.defineProperty(t,"ref",{get:n})}function pJ(t,e,n){const r={};r.type="file";const s=n.length;for(let i=0;i<s;i++){const o=n[i];r[o.local]=o.xform(r,e[o.server])}return dJ(r,t),r}function SC(t,e,n){const r=RC(e);return r===null?null:pJ(t,r,n)}function mJ(t,e,n,r){const s=RC(e);if(s===null||!Av(s.downloadTokens))return null;const i=s.downloadTokens;if(i.length===0)return null;const o=encodeURIComponent;return i.split(",").map(c=>{const u=t.bucket,h=t.fullPath,f="/b/"+o(u)+"/o/"+o(h),d=Pv(f,n,r),p=bC({alt:"media",token:c});return d+p})[0]}function gJ(t,e){const n={},r=e.length;for(let s=0;s<r;s++){const i=e[s];i.writable&&(n[i.server]=t[i.local])}return JSON.stringify(n)}class DC{constructor(e,n,r,s){this.url=e,this.method=n,this.handler=r,this.timeout=s,this.urlParam
3329s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/**
3330 * @license
3331 * Copyright 2017 Google LLC
3332 *
3333 * Licensed under the Apache License, Version 2.0 (the "License");
3334 * you may not use this file except in compliance with the License.
3335 * You may obtain a copy of the License at
3336 *
3337 *   http://www.apache.org/licenses/LICENSE-2.0
3338 *
3339 * Unless required by applicable law or agreed to in writing, software
3340 * distributed under the License is distributed on an "AS IS" BASIS,
3341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3342 * See the License for the specific language governing permissions and
3343 * limitations under the License.
3344 */function kC(t){if(!t)throw Iv()}function vJ(t,e){function n(r,s){const i=SC(t,s,e);return kC(i!==null),i}return n}function yJ(t,e){function n(r,s){const i=SC(t,s,e);return kC(i!==null),mJ(i,s,t.host,t._protocol)}return n}function OC(t){function e(n,r){let s;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?s=kX():s=DX():n.getStatus()===402?s=SX(t.bucket):n.getStatus()===403?s=OX(t.path):s=r,s.status=n.getStatus(),s.serverResponse=r.serverResponse,s}return e}function _J(t){const e=OC(t);function n(r,s){let i=e(r,s);return r.getStatus()===404&&(i=CX(t.path)),i.serverResponse=s.serverResponse,i}return n}function wJ(t,e,n){const r=e.fullServerUrl(),s=Pv(r,t.host,t._protocol),i="GET",o=t.maxOperationRetryTime,a=new DC(s,i,yJ(t,n),o);return a.errorHandler=_J(e),a}function EJ(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function bJ(t,e,n){const r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=EJ(null,e)),r}function TJ(t,e,n,r,s){const i=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};function a(){let y="";for(let w=0;w<2;w++)y=y+Math.random().toString().slice(2);return y}const l=a();o["Content-Type"]="multipart/related; boundary="+l;const c=bJ(e,r,s),u=gJ(c,n),h="--"+l+`\r
3345Content-Type: application/json; charset=utf-8\r
3346\r
3347`+u+`\r
3348--`+l+`\r
3349Content-Type: `+c.contentType+`\r
3350\r
3351`,f=`\r
3352--`+l+"--",d=bs.getBlob(h,r,f);if(d===null)throw $X();const p={name:c.fullPath},v=Pv(i,t.host,t._protocol),m="POST",g=t.maxUploadRetryTime,E=new DC(v,m,vJ(t,n),g);return E.urlParams=p,E.headers=o,E.body=d.uploadData(),E.errorHandler=OC(e),E}class IJ{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=gi.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=gi.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=gi.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,s){if(this.sent_)throw Ea("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,e,!0),s!==void 0)for(const i in s)s.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,s[i].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw Ea("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw Ea("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw Ea("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw Ea("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class AJ extends IJ{initXhr(){this.xhr_.responseType="text"}}function MC(){return new AJ}/**
3353 * @license
3354 * Copyright 2019 Google LLC
3355 *
3356 * Licensed under the Apache License, Version 2.0 (the "License");
3357 * you may not use this file except in compliance with the License.
3358 * You may obtain a copy of the License at
3359 *
3360 *   http://www.apache.org/licenses/LICENSE-2.0
3361 *
3362 * Unless required by applicable law or agreed to in writing, softw
3362are
3363 * distributed under the License is distributed on an "AS IS" BASIS,
3364 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3365 * See the License for the specific language governing permissions and
3366 * limitations under the License.
3367 */class Oi{constructor(e,n){this._service=e,n instanceof Mn?this._location=n:this._location=Mn.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new Oi(e,n)}get root(){const e=new Mn(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return PC(this._location.path)}get storage(){return this._service}get parent(){const e=cJ(this._location.path);if(e===null)return null;const n=new Mn(this._location.bucket,e);return new Oi(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw BX(e)}}function RJ(t,e,n){t._throwIfRoot("uploadBytes");const r=TJ(t.storage,t._location,CC(),new bs(e,!0),n);return t.storage.makeRequestWithTokens(r,MC).then(s=>({metadata:s,ref:t}))}function PJ(t){t._throwIfRoot("getDownloadURL");const e=wJ(t.storage,t._location,CC());return t.storage.makeRequestWithTokens(e,MC).then(n=>{if(n===null)throw FX();return n})}function CJ(t,e){const n=uJ(t._location.path,e),r=new Mn(t._location.bucket,n);return new Oi(t.storage,r)}/**
3368 * @license
3369 * Copyright 2017 Google LLC
3370 *
3371 * Licensed under the Apache License, Version 2.0 (the "License");
3372 * you may not use this file except in compliance with the License.
3373 * You may obtain a copy of the License at
3374 *
3375 *   http://www.apache.org/licenses/LICENSE-2.0
3376 *
3377 * Unless required by applicable law or agreed to in writing, software
3378 * distributed under the License is distributed on an "AS IS" BASIS,
3379 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3380 * See the License for the specific language governing permissions and
3381 * limitations under the License.
3382 */function SJ(t){return/^[A-Za-z]+:\/\//.test(t)}function DJ(t,e){return new Oi(t,e)}function NC(t,e){if(t instanceof Cv){const n=t;if(n._bucket==null)throw VX();const r=new Oi(n,n._bucket);return e!=null?NC(r,e):r}else return e!==void 0?CJ(t,e):t}function kJ(t,e){if(e&&SJ(e)){if(t instanceof Cv)return DJ(t,e);throw Zp("To use ref(service, url), the first argument must be a Storage instance.")}else return NC(t,e)}function JE(t,e){const n=e==null?void 0:e[wC];return n==null?null:Mn.makeFromBucketSpec(n,t)}function OJ(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:s}=r;s&&(t._overrideAuthToken=typeof s=="string"?s:L0(s,t.app.options.projectId))}class Cv{constructor(e,n,r,s,i){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=s,this._firebaseVersion=i,this._bucket=null,this._host=_C,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=RX,this._maxUploadRetryTime=PX,this._requests=new Set,s!=null?this._bucket=Mn.makeFromBucketSpec(s,this._host):this._bucket=JE(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Mn.makeFromBucketSpec(this._url,e):this._bucket=JE(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){XE("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){XE("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new Oi(this,e)}_makeRequest(e,n,r,s,i=!0){if(this._deleted)return new HX(EC());{const o=ZX(e,this._appId,r,s,n,this._firebaseVersion,i);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[r,s]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);
vendor: 11,304 bytes, lines 3382-3405
3382return this._makeRequest(e,n,r,s).getPromise()}}const ZE="@firebase/storage",eb="0.12.2";/**
3383 * @license
3384 * Copyright 2020 Google LLC
3385 *
3386 * Licensed under the Apache License, Version 2.0 (the "License");
3387 * you may not use this file except in compliance with the License.
3388 * You may obtain a copy of the License at
3389 *
3390 *   http://www.apache.org/licenses/LICENSE-2.0
3391 *
3392 * Unless required by applicable law or agreed to in writing, software
3393 * distributed under the License is distributed on an "AS IS" BASIS,
3394 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3395 * See the License for the specific language governing permissions and
3396 * limitations under the License.
3397 */const LC="storage";function tb(t,e,n){return t=it(t),RJ(t,e,n)}function nb(t){return t=it(t),PJ(t)}function rb(t,e){return t=it(t),kJ(t,e)}function sb(t=Vm(),e){t=it(t);const r=Dh(t,LC).getImmediate({identifier:e}),s=O0("storage");return s&&MJ(r,...s),r}function MJ(t,e,n,r={}){OJ(t,e,n,r)}function NJ(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),s=t.getProvider("app-check-internal");return new Cv(n,r,s,e,xi)}function LJ(){Ti(new Ms(LC,NJ,"PUBLIC").setMultipleInstances(!0)),wr(ZE,eb,""),wr(ZE,eb,"esm2017")}LJ();/*!
3398 * Compressor.js v1.2.1
3399 * https://fengyuanchen.github.io/compressorjs
3400 *
3401 * Copyright 2018-present Chen Fengyuan
3402 * Released under the MIT license
3403 *
3404 * Date: 2023-02-28T14:09:41.732Z
3405 */function ib(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function qc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ib(Object(n),!0).forEach(function(r){$J(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ib(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function xJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ob(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xC(r.key),r)}}function VJ(t,e,n){return e&&ob(t.prototype,e),n&&ob(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function $J(t,e,n){return e=xC(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ch(){return ch=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ch.apply(this,arguments)}function FJ(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xC(t){var e=FJ(t,"string");return typeof e=="symbol"?e:String(e)}var VC={exports:{}};(function(t){typeof window>"u"||function(e){var n=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,r=e.Blob&&function(){try{return!!new Blob}catch{return!1}}(),s=r&&e.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),i=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,o=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(r||i)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(l){var c,u,h,f,d,p,v,m,g;if(c=l.match(o),!c)throw new Error("invalid data URI");for(u=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),h=!!c[4],f=l.slice(c[0].length),h?d=atob(f):d=decodeURIComponent(f),p=new ArrayBuffer(d.length),v=new Uint8Array(p),m=0;m<d.length;m+=1)v[m]=d.charCodeAt(m);return r?new Blob([s?v:p],{type:u}):(g=new i,g.append(p),g.getBlob(u))};e.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,c,u){var h=this;setTimeout(function(){u&&n.toDataURL&&a?l(a(h.toDataURL(c,u))):l(h.mozGetAsFile("blob",c))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,c,u){var h=this;setTimeout(function(){(c&&c!=="image/png"||u)&&n.toDataURL&&a?l(a(h.toDataURL(c,u))):l(h.msToBlob(c))})}:n.toBlob=function(l,c,u){var h=this;setTimeout(function(){l(a(h.toDataURL(c,u)))})})),t.exports?t.exports=a:e.dataURLtoBlob=a}(window)})(VC);var ab=VC.exports,UJ=function(e){return typeof Blob>"u"?!1:e instanceof Blob||Object.prototype.toString.call(e)==="[object Blob]"},lb={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},BJ=typeof window<"u"&&typeof window.document<"u",$s=BJ?window:{},uh=function(e){return e>0&&e<1/0},HJ=Array.prototype.slice;function Sv(t){return Array.from?Array.from(t):HJ.call(t)}var jJ=/^image\/.+$/;function em(t){return jJ.test(t)}function WJ(t){var e=em(t)?t.substr(6):"";return e==="jpeg"&&(e="jpg"),".".concat(e)}var $C=String.fromCharCode;function YJ(t,e,n){var r="",s;for(n+=e,s=e;s<n;s+=1)r+=$C(t.getUint8(s));return r}var qJ=$s.btoa;function cb(t,e){for(var n=[],r=8192,s=new Uint8Array(t);s.length>0;)n.push($C.apply(null,Sv(s.subarray(0,r)))),s=s.subarray(r);return"data:".concat(e,";base64,").concat(qJ(n.join("")))}function KJ(t){var e=new DataView(t),n;try{var r,s,i;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var o=e.byteLength,a=2;a+1<o;){if(e.getUint8(a)===255&&e.getUint8(a+1)===225){s=a;break}a+=1}if(s){var l=s+4,c=s+10;if(YJ(e,l,4)==="Exif"){var u=e.getUint16(c);if(r=u===18761,(r||u===19789)&&e.getUint16(c+2,r)===42){var h=e.getUint32(c+4,r);h>=8&&(i=c+h)}}}if(i){var f=e.getUint16(i,r),d,p;for(p=0;p<f;p+=1)if(d=i+p*12+2,e.getUint16(d,r)===274){d+=8,n=e.getUint16(d,r),e.setUint16(d,1,r);break}}}catch{n=1}return n}function zJ(t){var e=0,n=1,r=1;switch(t){case 2:n=-1;break;case 3:e=-180;break;case 4:r=-1;break;case 5:e=90,r=-1;break;case 6:e=90;break;case 7:e=90,n=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:n,scaleY:r}}var GJ=/\.\d*(?:0|9){12}\d*$/;function ub(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return GJ.test(t)?Math.round(t*e)/e:t}function ba(t){var e=t.aspectRatio,n=t.height,r=t.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",i=uh(r),o=uh(n);if(i&&o){var a=n*e;(s==="contain"||s==="none")&&a>r||s==="cover"&&a<r?n=r/e:r=n*e}else i?n=r/e:o&&(r=n*e);return{width:r,height:n}}function QJ(t){for(var e=Sv(new Uint8Array(t)),n=e.length,r=[],s=0;s+3<n;){var i=e[s],o=e[s+1];if(i===255&&o===218)break;if(i===255&&o===216)s+=2;else{var a=e[s+2]*256+e[s+3],l=s+a+2,c=e.slice(s,l);r.push(c),s=l}}return r.reduce(function(u,h){return h[0]===255&&h[1]===225?u.concat(h):u},[])}function XJ(t,e){var n=Sv(new Uint8Array(t));if(n[2]!==255||n[3]!==224)return t;var r=n[4]*256+n[5],s=[255,216].concat(e,n.slice(4+r));return new Uint8Array(s)}var JJ=$s.ArrayBuffer,Ad=$s.FileReader,Qs=$s.URL||$s.webkitURL,ZJ=/\.\w+$/,eZ=$s.Compressor,tZ=function(){function t(e,n){xJ(this,t),this.file=e,this.exif=[],this.image=new Image,this.options=qc(qc({},lb),n),this.aborted=!1,this.result=null,this.init()}return VJ(t,[{key:"init",value:function(){var n=this,r=this.file,s=this.options;if(!UJ(r)){this.fail(new Error("The first argument must be a File or Blob object."));return}var i=r.type;if(!em(i)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Qs||!Ad){this.fail(new Error("The current browser does not support image compression."));return}JJ||(s.checkOrientation=!1,s.retainExif=!1);var o=i==="image/jpeg",a=o&&s.checkOrientation,l=o&&s.retainExif;if(Qs&&!a&&!l)this.load({url:Qs.createObjectURL(r)});else{var c=new Ad;this.reader=c,c.onload=function(u){var h=u.target,f=h.result,d={},p=1;a&&(p=KJ(f),p>1&&ch(d,zJ(p))),l&&(n.exif=QJ(f)),a||l?!Qs||p>1?d.url=cb(f,i):d.url=Qs.createObjectURL(r):d.url=f,n.load(d)},c.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},c.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},c.onloadend=function(){n.reader=null},a||l?c.readAsArrayBuffer(r):c.readAsDataURL(r)}}},{key:"load",value:function(n){var r=this,s=this.file,i=this.image;i.onload=function(){r.draw(qc(qc({},n),{},{naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight}))},i.onabort=function(){r.fail(new Error("Aborted to load the image."))},i.onerror=function(){r.fail(new Error("Failed to load the image."))},$s.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test($s.navigator.userAgent)&&(i.crossOrigin="anonymous"),i.alt=s.name,i.src=n.url}},{key:"draw",value:function(n){var r=this,s=n.naturalWidth,i=n.naturalHeight,o=n.rotate,a=o===void 0?0:o,l=n.scaleX,c=l===void 0?1:l,u=n.scaleY,h=u===void 0?1:u,f=this.file,d=this.image,p=this.options,v=document.createElement("canvas"),m=v.getContext("2d"),g=Math.abs(a)%180===90,E=(p.resize==="contain"||p.resize==="cover")&&uh(p.width)&&uh(p.height),y=Math.max(p.maxWidth,0)||1/0,w=Math.max(p.maxHeight,0)||1/0,I=Math.max(p.minWidth,0)||0,A=Math.max(p.minHeight,0)||0,R=s/i,P=p.width,C=p.height;if(g){var D=[w,y];y=D[0],w=D[1];var $=[A,I];I=$[0],A=$[1];var S=[C,P];P=S[0],C=S[1]}E&&(R=P/C);var V=ba({aspectRatio:R,width:y,height:w},"contain");y=V.width,w=V.height;var oe=ba({aspectRatio:R,width:I,height:A},"cover");if(I=oe.width,A=oe.height,E){var J=ba({aspectRatio:R,width:P,height:C},p.resize);P=J.width,C=J.height}else{var W=ba({aspectRatio:R,width:P,height:C}),se=W.width;P=se===void 0?s:se;var Z=W.height;C=Z===void 0?i:Z}P=Math.floor(ub(Math.min(Math.max(P,I),y))),C=Math.floor(ub(Math.min(Math.max(C,A),w)));var De=-P/2,Y=-C/2,we=P,ae=C,Ue=[];if(E){var Ce=0,qe=0,ke=s,O=i,G=ba({aspectRatio:R,width:s,height:i},{contain:"cover",cover:"contain"}[p.resize]);ke=G.width,O=G.height,Ce=(s-ke)/2,qe=(i-O)/2,Ue.push(Ce,qe,ke,O)}if(Ue.push(De,Y,we,ae),g){var z=[C,P];P=z[0],C=z[1]}v.width=P,v.height=C,em(p.mimeType)||(p.mimeType=f.type);var le="transparent";f.size>p.convertSize&&p.convertTypes.indexOf(p.mimeType)>=0&&(p.mimeType="image/jpeg");var be=p.mimeType==="image/jpeg";if(be&&(le="#fff"),m.fillStyle=le,m.fillRect(0,0,P,C),p.beforeDraw&&p.beforeDraw.call(this,m,v),!this.aborted&&(m.save(),m.translate(P/2,C/2),m.rotate(a*Math.PI/180),m.scale(c,h),m.drawImage.apply(m,[d].concat(Ue)),m.restore(),p.drew&&p.drew.call(this,m,v),!this.aborted)){var Se=function(b){if(!r.aborted){var k=function(X){return r.done({naturalWidth:s,naturalHeight:i,result:X})};if(b&&be&&p.retainExif&&r.exif&&r.exif.length>0){var x=function(X){return k(ab(cb(XJ(X,r.exif),p.mimeType)))};if(b.arrayBuffer)b.arrayBuffer().then(x).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var M=new Ad;r.reader=M,M.onload=function(K){var X=K.target;x(X.result)},M.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},M.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},M.onloadend=function(){r.reader=null},M.readAsArrayBuffer(b)}}else k(b)}};v.toBlob?v.toBlob(Se,p.mimeType,p.quality):Se(ab(v.toDataURL(p.mimeType,p.quality)))}}}
3405,{key:"done",value:function(n){var r=n.naturalWidth,s=n.naturalHeight,i=n.result,o=this.file,a=this.image,l=this.options;if(Qs&&a.src.indexOf("blob:")===0&&Qs.revokeObjectURL(a.src),i)if(l.strict&&!l.retainExif&&i.size>o.size&&l.mimeType===o.type&&!(l.width>r||l.height>s||l.minWidth>r||l.minHeight>s||l.maxWidth<r||l.maxHeight<s))i=o;else{var c=new Date;i.lastModified=c.getTime(),i.lastModifiedDate=c,i.name=o.name,i.name&&i.type!==o.type&&(i.name=i.name.replace(ZJ,WJ(i.type)))}else i=o;this.result=i,l.success&&l.success.call(this,i)}},{key:"fail",value:function(n){var r=this.options;if(r.error)r.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=eZ,t}},{key:"setDefaults",value:function(n){ch(lb,n)}}]),t}();const nZ=Xn(()=>({provide:{queryToEventIdString(t){return typeof t=="string"?t:t[0]},createRandomNumber(t=10){return Math.floor(Math.random()*t)+1},createRandomId(){const e="abcdefghijklmnopqrstuvwxyz0123456789",n=e.length;let r="";for(let s=0;s<8;s++)r+=e[Math.floor(Math.random()*n)];return r},formatDate(t){const e=t.getDate(),n=t.getMonth()+1;return`${t.getFullYear()}/${n<10?"0"+n:n}/${e<10?"0"+e:e}`},async getLatLng(t){const e=`https://maps.googleapis.com/maps/api/geocode/json?address=${t}&key=${Ei().public.GOOGLE_MAP_API_KEY}`,r=await(await fetch(e)).json(),s=r.status;return r.status==="ZERO_RESULTS"?{resMessage:"入力された地点名が存在しません"}:r.status==="OVER_QUERY_LIMIT"?{resMessage:s}:r.status==="INVALID_REQUEST"?{resMessage:s}:{address:r.results[0].formatted_address,lat:r.results[0].geometry.location.lat,lng:r.results[0].geometry.location.lng,resMessage:s}},openExternalMapUrl(t){if(t===void 0)throw new Error("地点名が空です");const e=`https://local.google.co.jp/maps?q=${t}`;window.open(e)},convertGoogleMapUrl(t,e){return`https://local.google.co.jp/maps?q=${t.replace(/\s+/g,"")}+${e.replace(/\s+/g,"")}`},dataUrlToBlob(t){const e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),s=new Uint8Array(r);for(let i=0;i<e.length;i++)s[i]=e.charCodeAt(i);return new Blob([r],{type:n})},blobToFile(t,e){return new File([t],e,{type:t.type})},createIconImage(t){const e=document.createElement("canvas");e.width=100,e.height=100;const n=e.getContext("2d");if(n===null)throw new Error("canvasの取得に失敗しました");n.fillStyle="#f3f3f3",n.beginPath(),n.arc(50,50,50,0,Math.PI*2,!0),n.closePath(),n.fill(),n.fillStyle="black",n.font="bold 50px sans-serif",n.textAlign="center",n.textBaseline="middle",n.fillText(t.charAt(0),50,50);const r=e.toDataURL(),s=Ge().$dataUrlToBlob(r);return Ge().$blobToFile(s,`${Ge().$createRandomId()}.png`)},async uploadImage(t){const e=sb(),n=`images/${t.name}`,r=rb(e,n);return await tb(r,t),await nb(r)},async uploadFromBlobUrl(t){try{const n=await(await fetch(t)).blob();`${n.size}`;const r=await new Promise((a,l)=>{new tZ(n,{quality:.6,success:c=>{`${c.size}`,a(c)},error:l})}),s=`images/${Date.now()}_${Math.random().toString(36).substring(2,15)}.png`,i=rb(sb(),s);return await tb(i,r),await nb(i)}catch(e){throw console.error("Upload failed:",e),new Error("画像のアップロードに失敗しました")}}}})),rZ=Xn(()=>({provide:{}})),sZ=[ZO,tM,WL,YL,qL,KL,zL,HK,jK,AX,nZ,rZ],iZ=et({props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(t){const e=t.renderKey,n=t.route,r={};for(const s in t.route)Object.defineProperty(r,s,{get:()=>e===t.renderKey?t.route[s]:n[s]});return Hn(Bl,Ml(r)),()=>Nn(t.vnode,{ref:t.vnodeRef})}}),oZ=et({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(t,{attrs:e,expose:n}){const r=Ge(),s=He(),i=bt(Bl,null);let o;n({pageRef:s});const a=bt(n0,null);let l;const c=r.deferHydration();if(r.isHydrating){const u=r.hooks.hookOnce("app:error",c);Jn().beforeEach(u)}return t.pageKey&&vt(()=>t.pageKey,(u,h)=>{u!==h&&r.callHook("page:loading:start")}),()=>Nn(R0,{name:t.name,route:t.route,...e},{default:u=>{const h=lZ(i,u.route,u.Component),f=i&&i.matched.length===u.route.matched.length;if(!u.Component){if(l&&!f)return l;c();return}if(l&&a&&!a.isCurrent(u.route))return l;if(h&&i&&(!a||a!=null&&a.isCurrent(i)))return f?l:null;const d=lp(u,t.pageKey);!r.isHydrating&&!cZ(i,u.route,u.Component)&&o===d&&r.callHook("page:loading:end"),o=d;const p=!!(t.transition??u.route.meta.pageTransition??sp),v=p&&aZ([t.transition,u.route.meta.pageTransition,sp,{onAfterLeave:()=>{r.callHook("page:transition:finish",u.Component)}}
3405].filter(Boolean)),m=t.keepalive??u.route.meta.keepalive??qO;return l=P0(Ko,p&&v,oN(m,Nn(mm,{suspensible:!0,onPending:()=>r.callHook("page:start",u.Component),onResolve:()=>{kn(()=>r.callHook("page:finish",u.Component).then(()=>r.callHook("page:loading:end")).finally(c))}},{default:()=>{const g=Nn(iZ,{key:d||void 0,vnode:u.Component,route:u.route,renderKey:d||void 0,trackRootNodes:p,vnodeRef:s});return m&&(g.type.name=u.Component.type.name||u.Component.type.__name||"RouteProvider"),g}}))).default(),l}})}});function aZ(t){const e=t.map(n=>({...n,onAfterLeave:n.onAfterLeave?Nm(n.onAfterLeave):void 0}));return e0(...e)}function lZ(t,e,n){if(!t)return!1;const r=e.matched.findIndex(s=>{var i;return((i=s.components)==null?void 0:i.default)===(n==null?void 0:n.type)});return!r||r===-1?!1:e.matched.slice(0,r).some((s,i)=>{var o,a,l;return((o=s.components)==null?void 0:o.default)!==((l=(a=t.matched[i])==null?void 0:a.components)==null?void 0:l.default)})||n&&lp({route:e,Component:n})!==lp({route:t,Component:n})}function cZ(t,e,n){return t?e.matched.findIndex(s=>{var i;return((i=s.components)==null?void 0:i.default)===(n==null?void 0:n.type)})<e.matched.length-1:!1}const uZ=et({name:"LayoutLoader",inheritAttrs:!1,props:{name:String,layoutProps:Object},async setup(t,e){const n=await Ts[t.name]().then(r=>r.default||r);return()=>Nn(n,t.layoutProps,e.slots)}}),hZ=et({name:"NuxtLayout",inheritAttrs:!1,props:{name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},setup(t,e){const n=Ge(),r=bt(Bl),s=r===Sm()?sN():r,i=L(()=>{let l=N(t.name)??s.meta.layout??"default";return l&&!(l in Ts)&&t.fallback&&(l=N(t.fallback)),l}),o=He();e.expose({layoutRef:o});const a=n.deferHydration();if(n.isHydrating){const l=n.hooks.hookOnce("app:error",a);Jn().beforeEach(l)}return()=>{const l=i.value&&i.value in Ts,c=s.meta.layoutTransition??YO;return P0(Ko,l&&c,{default:()=>Nn(mm,{suspensible:!0,onResolve:()=>{kn(a)}},{default:()=>Nn(fZ,{layoutProps:Us(e.attrs,{ref:o}),key:i.value||void 0,name:i.value,shouldProvide:!t.name,hasTransition:!!c},e.slots)})}).default()}}}),fZ=et({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean}},setup(t,e){const n=t.name;return t.shouldProvide&&Hn(n0,{isCurrent:r=>n===(r.meta.layout??"default")}),()=>{var r,s;return!n||typeof n=="string"&&!(n in Ts)?(s=(r=e.slots).default)==null?void 0:s.call(r):Nn(uZ,{key:n,layoutProps:t.layoutProps,name:n},e.slots)}}}),dZ=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n},pZ={};function mZ(t,e){const n=oZ,r=hZ;return ee(),at(r,null,{default:ht(()=>[de(n)]),_:1})}const gZ=dZ(pZ,[["render",mZ]]),vZ={__name:"nuxt-error-page",props:{error:Object},setup(t){const n=t.error;(n.stack||"").split(`
3406`).splice(1).map(h=>({text:h.replace("webpack:/","").replace(".vue",".js").trim(),internal:h.includes("node_modules")&&!h.includes(".cache")||h.includes("internal")||h.includes("new Promise")})).map(h=>`<span class="stack${h.internal?" internal":""}">${h.text}</span>`).join(`
3407`);const r=Number(n.statusCode||500),s=r===404,i=n.statusMessage??(s?"Page Not Found":"Internal Server Error"),o=n.message||n.toString(),a=void 0,u=s?Wv(()=>tt(()=>import("./error-404.T8ioau2q.js"),__vite__mapDeps([37,3,30,38]),import.meta.url).then(h=>h.default||h)):Wv(()=>tt(()=>import("./error-500.CMU239qL.js"),__vite__mapDeps([39,30,40]),import.meta.url).then(h=>h.default||h));return(h,f)=>(ee(),at(N(u),oo(al({statusCode:N(r),statusMessage:N(i),description:N(o),stack:N(a)})),null,16))}},yZ=vZ,_Z={__name:"nuxt-root",setup(t){const e=()=>null,n=Ge(),r=n.deferHydration();if(n.isHydrating){const a=n.hooks.hookOnce("app:error",r);Jn().beforeEach(a)}const s=!1;Hn(Bl,Sm()),n.hooks.callHookWith(a=>a.map(l=>l()),"vue:setup");const i=Ah();tT((a,l,c)=>{if(n.hooks.callHook("vue:error",a,l,c).catch(u=>console.error("[nuxt] Error in `vue:error` hook",u)),Qk(a)&&(a.fatal||a.unhandled))return n.runWithContext(()=>Zi(a)),!1});const o=!1;return(a,l)=>(ee(),at(mm,{onResolve:N(r)},{default:ht(()=>[N(i)?(ee(),at(N(yZ),{key:0,error:N(i)},null,8,["error"])):N(o)?(ee(),at(N(e),{key:1,context:N(o)},null,8,["context"])):N(s)?(ee(),at(dm(N(s)),{key:2})):(ee(),at(N(gZ),{key:3}))]),_:1},8,["onResolve"]))}},hb=_Z;let fb;{let t;fb=async function(){var o,a;if(t)return t;const r=!!((o=window.__NUXT__)!=null&&o.serverRendered||((a=document.getElementById("__NUXT_DATA__"))==null?void 0:a.dataset.ssr)==="true")?SD(hb):CD(hb),s=Lk({vueApp:r});async function i(l){await s.callHook("app:error",l),s.payload.error=s.payload.error||Rh(l)}r.config.errorHandler=i;try{await Vk(s,sZ)}catch(l){i(l)}try{await s.hooks.callHook("app:created",r),await s.hooks.callHook("app:beforeMount",r),r.mount(KO),await s.hooks.callHook("app:mounted",r),await kn()}catch(l){i(l)}return r.config.errorHandler===i&&(r.config.errorHandler=void 0),r},t=fb().catch(e=>{throw console.error("Error while mounting app:",e),e})}export{KZ as $,IX as A,Cee as B,Sm as C,qo as D,Kn as E,Fe as F,Je as G,Tee as H,Eee as I,Ei as J,t1 as K,kw as L,Jb as M,Ree as N,en as O,lee as P,yb as Q,kee as R,Dee as S,Pee as T,SZ as U,nee as V,r1 as W,Ja as X,po as Y,mm as Z,dZ as _,xe as a,i1 as a$,Io as a0,RZ as a1,Ko as a2,fee as a3,PZ as a4,Im as a5,CZ as a6,Un as a7,Rs as a8,cn as a9,vm as aA,al as aB,Nn as aC,Yo as aD,oT as aE,PD as aF,ZZ as aG,dee as aH,bt as aI,B1 as aJ,Nb as aK,ao as aL,vi as aM,XZ as aN,gu as aO,_i as aP,Lb as aQ,jZ as aR,WZ as aS,Us as aT,kn as aU,oo as aV,jr as aW,s1 as aX,a1 as aY,_m as aZ,l1 as a_,dh as aa,Yr as ab,aee as ac,L as ad,CD as ae,D1 as af,YZ as ag,S1 as ah,SD as ai,MZ as aj,GZ as ak,PS as al,Wv as am,fD as an,LZ as ao,xZ as ap,FZ as aq,VZ as ar,NZ as as,uee as at,$Z as au,ree as av,EZ as aw,tS as ax,Zr as ay,nS as az,de as b,YE as b$,tT as b0,h1 as b1,u1 as b2,wZ as b3,c1 as b4,ym as b5,Hn as b6,$b as b7,Dd as b8,Mb as b9,hee as bA,cee as bB,JZ as bC,QS as bD,BZ as bE,Xb as bF,NT as bG,ED as bH,LT as bI,wD as bJ,IT as bK,tee as bL,vt as bM,zb as bN,XS as bO,JS as bP,qZ as bQ,UZ as bR,vy as bS,eee as bT,OZ as bU,Rt as bV,See as bW,hr as bX,yee as bY,Rh as bZ,_ee as b_,QZ as ba,_y as bb,xl as bc,xr as bd,HS as be,dm as bf,oee as bg,il as bh,ey as bi,see as bj,To as bk,Ml as bl,TZ as bm,el as bn,GS as bo,iee as bp,bZ as bq,Kc as br,f1 as bs,Ve as bt,co as bu,CS as bv,AZ as bw,zZ as bx,IZ as by,HZ as bz,ve as c,sn as c0,bX as c1,jc as c2,GE as c3,EX as c4,Cn as c5,qE as c6,gX as c7,Ed as c8,Iee as c9,pee as ca,us as cb,Lee as cc,Oee as cd,Mee as ce,Nee as cf,bee as cg,Fl as ch,Ey as ci,Ul as cj,Ih as ck,e0 as cl,jD as cm,gee as cn,tp as co,H0 as cp,h_ as cq,wee as cr,BD as cs,vee as ct,mee as cu,zd as cv,Rm as cw,Vl as d,kZ as e,et as f,at as g,hZ as h,AD as i,Qb as j,N as k,dt as l,Fs as m,Jn as n,ee as o,DZ as p,Q1 as q,He as r,It as s,Jt as t,Jp as u,Yd as v,ht as w,Bn as x,Ge as y,Aee as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.