vendor: 18,634 bytes, lines 1-9
1(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();/** 2* @vue/shared v3.5.21 3* (c) 2018-present Yuxi (Evan) You and Vue contributors 4* @license MIT 5**/function Ga(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Pt={},br=[],Ge=()=>{},Lh=()=>!1,Js=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ka=e=>e.startsWith("onUpdate:"),ne=Object.assign,Wa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sm=Object.prototype.hasOwnProperty,xt=(e,t)=>sm.call(e,t),st=Array.isArray,wr=e=>Ys(e)==="[object Map]",Fh=e=>Ys(e)==="[object Set]",mt=e=>typeof e=="function",$t=e=>typeof e=="string",jn=e=>typeof e=="symbol",kt=e=>e!==null&&typeof e=="object",Bh=e=>(kt(e)||mt(e))&&mt(e.then)&&mt(e.catch),jh=Object.prototype.toString,Ys=e=>jh.call(e),om=e=>Ys(e).slice(8,-1),Uh=e=>Ys(e)==="[object Object]",Qa=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,hi=Ga(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xs=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},am=/-\w/g,Pn=Xs(e=>e.replace(am,t=>t.slice(1).toUpperCase())),lm=/\B([A-Z])/g,or=Xs(e=>e.replace(lm,"-$1").toLowerCase()),$h=Xs(e=>e.charAt(0).toUpperCase()+e.slice(1)),jo=Xs(e=>e?`on${$h(e)}`:""),In=(e,t)=>!Object.is(e,t),Uo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},qh=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},cm=e=>{const t=parseFloat(e);return isNaN(t)?e:t},um=e=>{const t=$t(e)?Number(e):NaN;return isNaN(t)?e:t};let jc;const Zs=()=>jc||(jc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ja(e){if(st(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=$t(r)?pm(r):Ja(r);if(i)for(const s in i)t[s]=i[s]}return t}else if($t(e)||kt(e))return e}const hm=/;(?![^(]*\))/g,dm=/:([^]+)/,fm=/\/\*[^]*?\*\//g;function pm(e){const t={};return e.replace(fm,"").split(hm).forEach(n=>{if(n){const r=n.split(dm);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function be(e){let t="";if($t(e))t=e;else if(st(e))for(let n=0;n<e.length;n++){const r=be(e[n]);r&&(t+=r+" ")}else if(kt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const mm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",gm=Ga(mm);function zh(e){return!!e||e===""}const Hh=e=>!!(e&&e.__v_isRef===!0),Te=e=>$t(e)?e:e==null?"":st(e)||kt(e)&&(e.toString===jh||!mt(e.toString))?Hh(e)?Te(e.value):JSON.stringify(e,Gh,2):String(e),Gh=(e,t)=>Hh(t)?Gh(e,t.value):wr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i],s)=>(n[$o(r,s)+" =>"]=i,n),{})}:Fh(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>$o(n))}:jn(t)?$o(t):kt(t)&&!st(t)&&!Uh(t)?String(t):t,$o=(e,t="")=>{var n;return jn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** 6* @vue/reactivity v3.5.21 7* (c) 2018-present Yuxi (Evan) You and Vue contributors 8* @license MIT 9**/let we;class ym{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=we;try{return we=this,t()}finally{we=n}}}on(){++this._on===1&&(this.prevScope=we,we=this)}off(){this._on>0&&--this._on===0&&(we=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function vm(){return we}let Rt;const qo=new WeakSet;class Kh{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,we&&we.active&&we.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,qo.has(this)&&(qo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Qh(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Uc(this),Jh(this);const t=Rt,n=Oe;Rt=this,Oe=!0;try{return this.fn()}finally{Yh(this),Rt=t,Oe=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Za(t);this.deps=this.depsTail=void 0,Uc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?qo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ha(this)&&this.run()}get dirty(){return ha(this)}}let Wh=0,di,fi;function Qh(e,t=!1){if(e.flags|=8,t){e.next=fi,fi=e;return}e.next=di,di=e}function Ya(){Wh++}function Xa(){if(--Wh>0)return;if(fi){let t=fi;for(fi=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;di;){let t=di;for(di=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Jh(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Yh(e){let t,n=e.depsTail,r=n;for(;r;){const i=r.prevDep;r.version===-1?(r===n&&(n=i),Za(r),_m(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function ha(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xh(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Xh(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ei)||(e.globalVersion=Ei,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ha(e))))return;e.flags|=2;const t=e.dep,n=Rt,r=Oe;Rt=e,Oe=!0;try{Jh(e);const i=e.fn(e._value);(t.version===0||In(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Rt=n,Oe=r,Yh(e),e.flags&=-3}}function Za(e,t=!1){const{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Za(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function _m(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Oe=!0;const Zh=[];function on(){Zh.push(Oe),Oe=!1}function an(){const e=Zh.pop();Oe=e===void 0?!0:e}function Uc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Rt;Rt=void 0;try{t()}finally{Rt=n}}}let Ei=0;class bm{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class tl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Rt||!Oe||Rt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Rt)n=this.activeLink=new bm(Rt,this),Rt.deps?(n.prevDep=Rt.depsTail,Rt.depsTail.nextDep=n,Rt.depsTail=n):Rt.deps=Rt.depsTail=n,td(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Rt.depsTail,n.nextDep=void 0,Rt.depsTail.nextDep=n,Rt.depsTail=n,Rt.deps===n&&(Rt.deps=r)}return n}trigger(t){this.version++,Ei++,this.notify(t)}notify(t){Ya();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Xa()}}}function td(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)td(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const da=new WeakMap,er=Symbol(""),fa=Symbol(""),Ti=Symbol("");function ue(e,t,n){if(Oe&&Rt){let r=da.get(e);r||da.set(e,r=new Map);let i=r.get(n);i||(r.set(n,i=new tl),i.map=r,i.key=n),i.track()}}function sn(e,t,n,r,i,s){const a=da.get(e);if(!a){Ei++;return}const l=u=>{u&&u.trigger()};if(Ya(),t==="clear")a.forEach(l);else{const u=st(e),d=u&&Qa(n);if(u&&n==="length"){const f=Number(r);a.forEach((p,g)=>{(g==="length"||g===Ti||!jn(g)&&g>=f)&&l(p)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),d&&l(a.get(Ti)),t){case"add":u?d&&l(a.get("length")):(l(a.get(er)),wr(e)&&l(a.get(fa)));break;case"delete":u||(l(a.get(er)),wr(e)&&l(a.get(fa)));break;case"set":wr(e)&&l(a.get(er));break}}Xa()}function pr(e){const t=It(e);return t===e?t:(ue(t,"iterate",Ti),De(e)?t:t.map(ee))}function to(e){return ue(e=It(e),"iterate",Ti),e}const wm={__proto__:null,[Symbol.iterator](){return zo(this,Symbol.iterator,ee)},concat(...e){return pr(this).concat(...e.map(t=>st(t)?pr(t):t))},entries(){return zo(this,"entries",e=>(e[1]=ee(e[1]),e))},every(e,t){return tn(this,"every",e,t,void 0,arguments)},filter(e,t){return tn(this,"filter",e,t,n=>n.map(ee),arguments)},find(e,t){return tn(this,"find",e,t,ee,arguments)},findIndex(e,t){return tn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tn(this,"findLast",e,t,ee,arguments)},findLastIndex(e,t){return tn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ho(this,"includes",e)},indexOf(...e){return Ho(this,"indexOf",e)},join(e){return pr(this).join(e)},lastIndexOf(...e){return Ho(this,"lastIndexOf",e)},map(e,t){return tn(this,"map",e,t,void 0,arguments)},pop(){return ii(this,"pop")},push(...e){return ii(this,"push",e)},reduce(e,...t){return $c(this,"reduce",e,t)},reduceRight(e,...t){return $c(this,"reduceRight",e,t)},shift(){return ii(this,"shift")},some(e,t){return tn(this,"some",e,t,void 0,arguments)},splice(...e){return ii(this,"splice",e)},toReversed(){return pr(this).toReversed()},toSorted(e){return pr(this).toSorted(e)},toSpliced(...e){return pr(this).toSpliced(...e)},unshift(...e){return ii(this,"unshift",e)},values(){return zo(this,"values",ee)}};function zo(e,t,n){const r=to(e),i=r[t]();return r!==e&&!De(e)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=n(s.value)),s}),i}const Em=Array.prototype;function tn(e,t,n,r,i,s){const a=to(e),l=a!==e&&!De(e),u=a[t];if(u!==Em[t]){const p=u.apply(e,s);return l?ee(p):p}let d=n;a!==e&&(l?d=function(p,g){return n.call(this,ee(p),g,e)}:n.length>2&&(d=function(p,g){return n.call(this,p,g,e)}));const f=u.call(a,d,r);return l&&i?i(f):f}function $c(e,t,n,r){const i=to(e);let s=n;return i!==e&&(De(e)?n.length>3&&(s=function(a,l,u){return n.call(this,a,l,u,e)}):s=function(a,l,u){return n.call(this,a,ee(l),u,e)}),i[t](s,...r)}function Ho(e,t,n){const r=It(e);ue(r,"iterate",Ti);const i=r[t](...n);return(i===-1||i===!1)&&il(n[0])?(n[0]=It(n[0]),r[t](...n)):i}function ii(e,t,n=[]){on(),Ya();const r=It(e)[t].apply(e,n);return Xa(),an(),r}const Tm=Ga("__proto__,__v_isRef,__isVue"),ed=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(jn));function Im(e){jn(e)||(e=String(e));const t=It(this);return ue(t,"has",e),t.hasOwnProperty(e)}class nd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(i?s?Nm:od:s?sd:id).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=st(t);if(!i){let u;if(a&&(u=wm[n]))return u;if(n==="hasOwnProperty")return Im}const l=Reflect.get(t,n,pe(t)?t:r);return(jn(n)?ed.has(n):Tm(n))||(i||ue(t,"get",n),s)?l:pe(l)?a&&Qa(n)?l:l.value:kt(l)?i?ad(l):nl(l):l}}class rd extends nd{constructor(t=!1){super(!1,t)}set(t,n,r,i){let s=t[n];if(!this._isShallow){const u=Vn(s);if(!De(r)&&!Vn(r)&&(s=It(s),r=It(r)),!st(t)&&pe(s)&&!pe(r))return u||(s.value=r),!0}const a=st(t)&&Qa(n)?Number(n)<t.length:xt(t,n),l=Reflect.set(t,n,r,pe(t)?t:i);return t===It(i)&&(a?In(r,s)&&sn(t,"set",n,r):sn(t,"add",n,r)),l}deleteProperty(t,n){const r=xt(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&sn(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!jn(n)||!ed.has(n))&&ue(t,"has",n),r}ownKeys(t){return ue(t,"iterate",st(t)?"length":er),Reflect.ownKeys(t)}}class xm extends nd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Am=new rd,Sm=new xm,Cm=new rd(!0);const pa=e=>e,ls=e=>Reflect.getPrototypeOf(e);function Rm(e,t,n){return function(...r){const i=this.__v_raw,s=It(i),a=wr(s),l=e==="entries"||e===Symbol.iterator&&a,u=e==="keys"&&a,d=i[e](...r),f=n?pa:t?Cs:ee;return!t&&ue(s,"iterate",u?fa:er),{next(){const{value:p,done:g}=d.next();return g?{value:p,done:g}:{value:l?[f(p[0]),f(p[1])]:f(p),done:g}},[Symbol.iterator](){return this}}}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Pm(e,t){const n={get(i){const s=this.__v_raw,a=It(s),l=It(i);e||(In(i,l)&&ue(a,"get",i),ue(a,"get",l));const{has:u}=ls(a),d=t?pa:e?Cs:ee;if(u.call(a,i))return d(s.get(i));if(u.call(a,l))return d(s.get(l));s!==a&&s.get(i)},get size(){const i=this.__v_raw;return!e&&ue(It(i),"iterate",er),i.size},has(i){const s=this.__v_raw,a=It(s),l=It(i);return e||(In(i,l)&&ue(a,"has",i),ue(a,"has",l)),i===l?s.has(i):s.has(i)||s.has(l)},forEach(i,s){const a=this,l=a.__v_raw,u=It(l),d=t?pa:e?Cs:ee;return!e&&ue(u,"iterate",er),l.forEach((f,p)=>i.call(s,d(f),d(p),a))}};return ne(n,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(i){!t&&!De(i)&&!Vn(i)&&(i=It(i));const s=It(this);return ls(s).has.call(s,i)||(s.add(i),sn(s,"add",i,i)),this},set(i,s){!t&&!De(s)&&!Vn(s)&&(s=It(s));const a=It(this),{has:l,get:u}=ls(a);let d=l.call(a,i);d||(i=It(i),d=l.call(a,i));const f=u.call(a,i);return a.set(i,s),d?In(s,f)&&sn(a,"set",i,s):sn(a,"add",i,s),this},delete(i){const s=It(this),{has:a,get:l}=ls(s);let u=a.call(s,i);u||(i=It(i),u=a.call(s,i)),l&&l.call(s,i);const d=s.delete(i);return u&&sn(s,"delete",i,void 0),d},clear(){const i=It(this),s=i.size!==0,a=i.clear();return s&&sn(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Rm(i,e,t)}),n}function el(e,t){const n=Pm(e,t);return(r,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(xt(n,i)&&i in r?n:r,i,s)}const Vm={get:el(!1,!1)},km={get:el(!1,!0)},Dm={get:el(!0,!1)};const id=new WeakMap,sd=new WeakMap,od=new WeakMap,Nm=new WeakMap;function Om(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mm(e){return e.__v_skip||!Object.isExtensible(e)?0:Om(om(e))}function nl(e){return Vn(e)?e:rl(e,!1,Am,Vm,id)}function Lm(e){return rl(e,!1,Cm,km,sd)}function ad(e){return rl(e,!0,Sm,Dm,od)}function rl(e,t,n,r,i){if(!kt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=Mm(e);if(s===0)return e;const a=i.get(e);if(a)return a;const l=new Proxy(e,s===2?r:n);return i.set(e,l),l}function Er(e){return Vn(e)?Er(e.__v_raw):!!(e&&e.__v_isReactive)}function Vn(e){return!!(e&&e.__v_isReadonly)}function De(e){return!!(e&&e.__v_isShallow)}function il(e){return e?!!e.__v_raw:!1}function It(e){const t=e&&e.__v_raw;return t?It(t):e}function Fm(e){return!xt(e,"__v_skip")&&Object.isExtensible(e)&&qh(e,"__v_skip",!0),e}const ee=e=>kt(e)?nl(e):e,Cs=e=>kt(e)?ad(e):e;function pe(e){return e?e.__v_isRef===!0:!1}function Mt(e){return Bm(e,!1)}function Bm(e,t){return pe(e)?e:new jm(e,t)}class jm{constructor(t,n){this.dep=new tl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:It(t),this._value=n?t:ee(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||De(t)||Vn(t);t=r?t:It(t),In(t,n)&&(this._rawValue=t,this._value=r?t:ee(t),this.dep.trigger())}}function ld(e){return pe(e)?e.value:e}const Um={get:(e,t,n)=>t==="__v_raw"?e:ld(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return pe(i)&&!pe(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function cd(e){return Er(e)?e:new Proxy(e,Um)}class $m{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new tl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ei-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Rt!==this)return Qh(this,!0),!0}get value(){const t=this.dep.track();return Xh(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function qm(e,t,n=!1){let r,i;return mt(e)?r=e:(r=e.get,i=e.set),new $m(r,i,n)}const us={},Rs=new WeakMap;let Yn;function zm(e,t=!1,n=Yn){if(n){let r=Rs.get(n);r||Rs.set(n,r=[]),r.push(e)}}function Hm(e,t,n=Pt){const{immediate:r,deep:i,once:s,scheduler:a,augmentJob:l,call:u}=n,d=$=>i?$:De($)||i===!1||i===0?bn($,1):bn($);let f,p,g,I,R=!1,V=!1;if(pe(e)?(p=()=>e.value,R=De(e)):Er(e)?(p=()=>d(e),R=!0):st(e)?(V=!0,R=e.some($=>Er($)||De($)),p=()=>e.map($=>{if(pe($))return $.value;if(Er($))return d($);if(mt($))return u?u($,2):$()})):mt(e)?t?p=u?()=>u(e,2):e:p=()=>{if(g){on();try{g()}finally{an()}}const $=Yn;Yn=f;try{return u?u(e,3,[I]):e(I)}finally{Yn=$}}:p=Ge,t&&i){const $=p,ut=i===!0?1/0:i;p=()=>bn($(),ut)}const O=vm(),B=()=>{f.stop(),O&&O.active&&Wa(O.effects,f)};if(s&&t){const $=t;t=(...ut)=>{$(...ut),B()}}let j=V?new Array(e.length).fill(us):us;const Q=$=>{if(!(!(f.flags&1)||!f.dirty&&!$))if(t){const ut=f.run();if(i||R||(V?ut.some((gt,x)=>In(gt,j[x])):In(ut,j))){g&&g();const gt=Yn;Yn=f;try{const x=[ut,j===us?void 0:V&&j[0]===us?[]:j,I];j=ut,u?u(t,3,x):t(...x)}finally{Yn=gt}}
vendor: 8,298 bytes, lines 9-13
9}else f.run()};return l&&l(Q),f=new Kh(p),f.scheduler=a?()=>a(Q,!1):Q,I=$=>zm($,!1,f),g=f.onStop=()=>{const $=Rs.get(f);if($){if(u)u($,4);else for(const ut of $)ut();Rs.delete(f)}},t?r?Q(!0):j=f.run():a?a(Q.bind(null,!0),!0):f.run(),B.pause=f.pause.bind(f),B.resume=f.resume.bind(f),B.stop=B,B}function bn(e,t=1/0,n){if(t<=0||!kt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pe(e))bn(e.value,t,n);else if(st(e))for(let r=0;r<e.length;r++)bn(e[r],t,n);else if(Fh(e)||wr(e))e.forEach(r=>{bn(r,t,n)});else if(Uh(e)){for(const r in e)bn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&bn(e[r],t,n)}return e}/** 10* @vue/runtime-core v3.5.21 11* (c) 2018-present Yuxi (Evan) You and Vue contributors 12* @license MIT 13**/function Li(e,t,n,r){try{return r?e(...r):e()}catch(i){eo(i,t,n)}}function Me(e,t,n,r){if(mt(e)){const i=Li(e,t,n,r);return i&&Bh(i)&&i.catch(s=>{eo(s,t,n)}),i}if(st(e)){const i=[];for(let s=0;s<e.length;s++)i.push(Me(e[s],t,n,r));return i}}function eo(e,t,n,r=!0){const i=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||Pt;if(t){let l=t.parent;const u=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const f=l.ec;if(f){for(let p=0;p<f.length;p++)if(f[p](e,u,d)===!1)return}l=l.parent}if(s){on(),Li(s,null,10,[e,u,d]),an();return}}Gm(e,n,i,r,a)}function Gm(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}const ye=[];let Ue=-1;const Tr=[];let vn=null,mr=0;const ud=Promise.resolve();let Ps=null;function ir(e){const t=Ps||ud;return e?t.then(this?e.bind(this):e):t}function Km(e){let t=Ue+1,n=ye.length;for(;t<n;){const r=t+n>>>1,i=ye[r],s=Ii(i);s<e||s===e&&i.flags&2?t=r+1:n=r}return t}function sl(e){if(!(e.flags&1)){const t=Ii(e),n=ye[ye.length-1];!n||!(e.flags&2)&&t>=Ii(n)?ye.push(e):ye.splice(Km(t),0,e),e.flags|=1,hd()}}function hd(){Ps||(Ps=ud.then(fd))}function Wm(e){st(e)?Tr.push(...e):vn&&e.id===-1?vn.splice(mr+1,0,e):e.flags&1||(Tr.push(e),e.flags|=1),hd()}function qc(e,t,n=Ue+1){for(;n<ye.length;n++){const r=ye[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;ye.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function dd(e){if(Tr.length){const t=[...new Set(Tr)].sort((n,r)=>Ii(n)-Ii(r));if(Tr.length=0,vn){vn.push(...t);return}for(vn=t,mr=0;mr<vn.length;mr++){const n=vn[mr];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}vn=null,mr=0}}const Ii=e=>e.id==null?e.flags&2?-1:1/0:e.id;function fd(e){try{for(Ue=0;Ue<ye.length;Ue++){const t=ye[Ue];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Li(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ue<ye.length;Ue++){const t=ye[Ue];t&&(t.flags&=-2)}Ue=-1,ye.length=0,dd(),Ps=null,(ye.length||Tr.length)&&fd()}}let He=null,pd=null;function Vs(e){const t=He;return He=e,pd=e&&e.type.__scopeId||null,t}function ma(e,t=He,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&Ns(-1);const s=Vs(t);let a;try{a=e(...i)}finally{Vs(s),r._d&&Ns(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Kn(e,t,n,r){const i=e.dirs,s=t&&t.dirs;for(let a=0;a<i.length;a++){const l=i[a];s&&(l.oldValue=s[a].value);let u=l.dir[r];u&&(on(),Me(u,n,8,[e.el,l,e,t]),an())}}const Qm=Symbol("_vte"),md=e=>e.__isTeleport,rn=Symbol("_leaveCb"),hs=Symbol("_enterCb");function Jm(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Fe(()=>{e.isMounted=!0}),Td(()=>{e.isUnmounting=!0}),e}const Ve=[Function,Array],gd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ve,onEnter:Ve,onAfterEnter:Ve,onEnterCancelled:Ve,onBeforeLeave:Ve,onLeave:Ve,onAfterLeave:Ve,onLeaveCancelled:Ve,onBeforeAppear:Ve,onAppear:Ve,onAfterAppear:Ve,onAppearCancelled:Ve},yd=e=>{const t=e.subTree;return t.component?yd(t.component):t},Ym={name:"BaseTransition",props:gd,setup(e,{slots:t}){const n=zd(),r=Jm();return()=>{const i=t.default&&bd(t.default(),!0);if(!i||!i.length)return;const s=vd(i),a=It(e),{mode:l}=a;if(r.isLeaving)return Go(s);const u=zc(s);if(!u)return Go(s);let d=ga(u,a,r,n,p=>d=p);u.type!==ve&&xi(u,d);let f=n.subTree&&zc(n.subTree);if(f&&f.type!==ve&&!Zn(f,u)&&yd(n).type!==ve){let p=ga(f,a,r,n);if(xi(f,p),l==="out-in"&&u.type!==ve)return r.isLeaving=!0,p.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,f=void 0},Go(s);l==="in-out"&&u.type!==ve?p.delayLeave=(g,I,R)=>{const V=_d(r,f);V[String(f.key)]=f,g[rn]=()=>{I(),g[rn]=void 0,delete d.delayedLeave,f=void 0},d.delayedLeave=()=>{R(),delete d.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return s}}};function vd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ve){t=n;break}}return t}const Xm=Ym;function _d(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ga(e,t,n,r,i){const{appear:s,mode:a,persisted:l=!1,onBeforeEnter:u,onEnter:d,onAfterEnter:f,onEnterCancelled:p,onBeforeLeave:g,onLeave:I,onAfterLeave:R,onLeaveCancelled:V,onBeforeAppear:O,onAppear:B,onAfterAppear:j,onAppearCancelled:Q}=t,$=String(e.key),ut=_d(n,e),gt=(v,T)=>{v&&Me(v,r,9,T)},x=(v,T)=>{const w=T[1];gt(v,T),st(v)?v.every(b=>b.length<=1)&&w():v.length<=1&&w()},_={mode:a,persisted:l,beforeEnter(v){let T=u;if(!n.isMounted)if(s)T=O||u;else return;v[rn]&&v[rn](!0);const w=ut[$];w&&Zn(e,w)&&w.el[rn]&&w.el[rn](),gt(T,[v])},enter(v){let T=d,w=f,b=p;if(!n.isMounted)if(s)T=B||d,w=j||f,b=Q||p;else return;let y=!1;const et=v[hs]=Y=>{y||(y=!0,Y?gt(b,[v]):gt(w,[v]),_.delayedLeave&&_.delayedLeave(),v[hs]=void 0)};T?x(T,[v,et]):et()},leave(v,T){const w=String(e.key);if(v[hs]&&v[hs](!0),n.isUnmounting)return T();gt(g,[v]);let b=!1;const y=v[rn]=et=>{b||(b=!0,T(),et?gt(V,[v]):gt(R,[v]),v[rn]=void 0,ut[w]===e&&delete ut[w])};ut[w]=e,I?x(I,[v,y]):y()},clone(v){const T=ga(v,t,n,r,i);return i&&i(T),T}};return _}function Go(e){if(no(e))return e=kn(e),e.children=null,e}function zc(e){if(!no(e))return md(e.type)&&e.children?vd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&mt(n.default))return n.default()}}function xi(e,t){e.shapeFlag&6&&e.component?(e.transition=t,xi(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function bd(e,t=!1,n){let r=[],i=0;for(let s=0;s<e.length;s++){let a=e[s];const l=n==null?a.key:String(n)+String(a.key!=null?a.key:s);a.type===he?(a.patchFlag&128&&i++,r=r.concat(bd(a.children,t,l))):(t||a.type!==ve)&&r.push(l!=null?kn(a,{key:l}):a)}if(i>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}function wd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const ks=new WeakMap;function pi(e,t,n,r,i=!1){if(st(e)){e.forEach((R,V)=>pi(R,t&&(st(t)?t[V]:t),n,r,i));return}if(mi(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&pi(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?cl(r.component):r.el,a=i?null:s,{i:l,r:u}=e,d=t&&t.r,f=l.refs===Pt?l.refs={}:l.refs,p=l.setupState,g=It(p),I=p===Pt?Lh:R=>xt(g,R);if(d!=null&&d!==u){if(Hc(t),$t(d))f[d]=null,I(d)&&(p[d]=null);else if(pe(d)){d.value=null;const R=t;R.k&&(f[R.k]=null)}}if(mt(u))Li(u,l,12,[a,f]);else{const R=$t(u),V=pe(u);if(R||V){const O=()=>{if(e.f){const B=R?I(u)?p[u]:f[u]:u.value;if(i)st(B)&&Wa(B,s);else if(st(B))B.includes(s)||B.push(s);else if(R)f[u]=[s],I(u)&&(p[u]=f[u]);else{const j=[s];u.value=j,e.k&&(f[e.k]=j)}}else R?(f[u]=a,I(u)&&(p[u]=a)):V&&(u.value=a,e.k&&(f[e.k]=a))};if(a){const B=()=>{O(),ks.delete(e)};B.id=-1,ks.set(e,B),xe(B,n)}else Hc(e),O()}}}function Hc(e){const t=ks.get(e);t&&(t.flags|=8,ks.delete(e))}Zs().requestIdleCallback;Zs().cancelIdleCallback;const mi=e=>!!e.type.__asyncLoader,no=e=>e.type.__isKeepAlive;function Zm(e,t){Ed(e,"a",t)}function tg(e,t){Ed(e,"da",t)}function Ed(e,t,n=_e){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(ro(t,r,n),n){let i=n.parent;for(;i&&i.parent;)no(i.parent.vnode)&&eg(r,t,n,i),i=i.parent}}function eg(e,t,n,r){const i=ro(t,e,r,!0);io(()=>{Wa(r[t],i)},n)}function ro(e,t,n=_e,r=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...a)=>{on();const l=Fi(n),u=Me(t,n,e,a);return l(),an(),u});return r?i.unshift(s):i.push(s),s}}const un=e=>(t,n=_e)=>{(!Si||e==="sp")&&ro(e,(...r)=>t(...r),n)}
vendor: 9,409 bytes, line 13
13,ng=un("bm"),Fe=un("m"),rg=un("bu"),ig=un("u"),Td=un("bum"),io=un("um"),sg=un("sp"),og=un("rtg"),ag=un("rtc");function lg(e,t=_e){ro("ec",e,t)}const cg=Symbol.for("v-ndc");function vs(e,t,n,r){let i;const s=n,a=st(e);if(a||$t(e)){const l=a&&Er(e);let u=!1,d=!1;l&&(u=!De(e),d=Vn(e),e=to(e)),i=new Array(e.length);for(let f=0,p=e.length;f<p;f++)i[f]=t(u?d?Cs(ee(e[f])):ee(e[f]):e[f],f,void 0,s)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,s)}else if(kt(e))if(e[Symbol.iterator])i=Array.from(e,(l,u)=>t(l,u,void 0,s));else{const l=Object.keys(e);i=new Array(l.length);for(let u=0,d=l.length;u<d;u++){const f=l[u];i[u]=t(e[f],f,u,s)}}else i=[];return i}const ya=e=>e?Hd(e)?cl(e):ya(e.parent):null,gi=ne(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ya(e.parent),$root:e=>ya(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>xd(e),$forceUpdate:e=>e.f||(e.f=()=>{sl(e.update)}),$nextTick:e=>e.n||(e.n=ir.bind(e.proxy)),$watch:e=>Vg.bind(e)}),Ko=(e,t)=>e!==Pt&&!e.__isScriptSetup&&xt(e,t),ug={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:s,accessCache:a,type:l,appContext:u}=e;let d;if(t[0]!=="$"){const I=a[t];if(I!==void 0)switch(I){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(Ko(r,t))return a[t]=1,r[t];if(i!==Pt&&xt(i,t))return a[t]=2,i[t];if((d=e.propsOptions[0])&&xt(d,t))return a[t]=3,s[t];if(n!==Pt&&xt(n,t))return a[t]=4,n[t];va&&(a[t]=0)}}const f=gi[t];let p,g;if(f)return t==="$attrs"&&ue(e.attrs,"get",""),f(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==Pt&&xt(n,t))return a[t]=4,n[t];if(g=u.config.globalProperties,xt(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return Ko(i,t)?(i[t]=n,!0):r!==Pt&&xt(r,t)?(r[t]=n,!0):xt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s,type:a}},l){let u,d;return!!(n[l]||e!==Pt&&l[0]!=="$"&&xt(e,l)||Ko(t,l)||(u=s[0])&&xt(u,l)||xt(r,l)||xt(gi,l)||xt(i.config.globalProperties,l)||(d=a.__cssModules)&&d[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:xt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gc(e){return st(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let va=!0;function hg(e){const t=xd(e),n=e.proxy,r=e.ctx;va=!1,t.beforeCreate&&Kc(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:a,watch:l,provide:u,inject:d,created:f,beforeMount:p,mounted:g,beforeUpdate:I,updated:R,activated:V,deactivated:O,beforeDestroy:B,beforeUnmount:j,destroyed:Q,unmounted:$,render:ut,renderTracked:gt,renderTriggered:x,errorCaptured:_,serverPrefetch:v,expose:T,inheritAttrs:w,components:b,directives:y,filters:et}=t;if(d&&dg(d,r,null),a)for(const ht in a){const dt=a[ht];mt(dt)&&(r[ht]=dt.bind(n))}if(i){const ht=i.call(n,n);kt(ht)&&(e.data=nl(ht))}if(va=!0,s)for(const ht in s){const dt=s[ht],ie=mt(dt)?dt.bind(n,n):mt(dt.get)?dt.get.bind(n,n):Ge,Bt=!mt(dt)&&mt(dt.set)?dt.set.bind(n):Ge,jt=wn({get:ie,set:Bt});Object.defineProperty(r,ht,{enumerable:!0,configurable:!0,get:()=>jt.value,set:Nt=>jt.value=Nt})}if(l)for(const ht in l)Id(l[ht],r,n,ht);if(u){const ht=mt(u)?u.call(n):u;Reflect.ownKeys(ht).forEach(dt=>{vg(dt,ht[dt])})}f&&Kc(f,e,"c");function pt(ht,dt){st(dt)?dt.forEach(ie=>ht(ie.bind(n))):dt&&ht(dt.bind(n))}if(pt(ng,p),pt(Fe,g),pt(rg,I),pt(ig,R),pt(Zm,V),pt(tg,O),pt(lg,_),pt(ag,gt),pt(og,x),pt(Td,j),pt(io,$),pt(sg,v),st(T))if(T.length){const ht=e.exposed||(e.exposed={});T.forEach(dt=>{Object.defineProperty(ht,dt,{get:()=>n[dt],set:ie=>n[dt]=ie,enumerable:!0})})}else e.exposed||(e.exposed={});ut&&e.render===Ge&&(e.render=ut),w!=null&&(e.inheritAttrs=w),b&&(e.components=b),y&&(e.directives=y),v&&wd(e)}function dg(e,t,n=Ge){st(e)&&(e=_a(e));for(const r in e){const i=e[r];let s;kt(i)?"default"in i?s=_s(i.from||r,i.default,!0):s=_s(i.from||r):s=_s(i),pe(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[r]=s}}function Kc(e,t,n){Me(st(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Id(e,t,n,r){let i=r.includes(".")?Fd(n,r):()=>n[r];if($t(e)){const s=t[e];mt(s)&&Se(i,s)}else if(mt(e))Se(i,e.bind(n));else if(kt(e))if(st(e))e.forEach(s=>Id(s,t,n,r));else{const s=mt(e.handler)?e.handler.bind(n):t[e.handler];mt(s)&&Se(i,s,e)}}function xd(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,l=s.get(t);let u;return l?u=l:!i.length&&!n&&!r?u=t:(u={},i.length&&i.forEach(d=>Ds(u,d,a,!0)),Ds(u,t,a)),kt(t)&&s.set(t,u),u}function Ds(e,t,n,r=!1){const{mixins:i,extends:s}=t;s&&Ds(e,s,n,!0),i&&i.forEach(a=>Ds(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const l=fg[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const fg={data:Wc,props:Qc,emits:Qc,methods:oi,computed:oi,beforeCreate:ge,created:ge,beforeMount:ge,mounted:ge,beforeUpdate:ge,updated:ge,beforeDestroy:ge,beforeUnmount:ge,destroyed:ge,unmounted:ge,activated:ge,deactivated:ge,errorCaptured:ge,serverPrefetch:ge,components:oi,directives:oi,watch:mg,provide:Wc,inject:pg};function Wc(e,t){return t?e?function(){return ne(mt(e)?e.call(this,this):e,mt(t)?t.call(this,this):t)}:t:e}function pg(e,t){return oi(_a(e),_a(t))}function _a(e){if(st(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ge(e,t){return e?[...new Set([].concat(e,t))]:t}function oi(e,t){return e?ne(Object.create(null),e,t):t}function Qc(e,t){return e?st(e)&&st(t)?[...new Set([...e,...t])]:ne(Object.create(null),Gc(e),Gc(t??{})):t}function mg(e,t){if(!e)return t;if(!t)return e;const n=ne(Object.create(null),e);for(const r in t)n[r]=ge(e[r],t[r]);return n}function Ad(){return{app:null,config:{isNativeTag:Lh,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 gg=0;function yg(e,t){return function(r,i=null){mt(r)||(r=ne({},r)),i!=null&&!kt(i)&&(i=null);const s=Ad(),a=new WeakSet,l=[];let u=!1;const d=s.app={_uid:gg++,_component:r,_props:i,_container:null,_context:s,_instance:null,version:ty,get config(){return s.config},set config(f){},use(f,...p){return a.has(f)||(f&&mt(f.install)?(a.add(f),f.install(d,...p)):mt(f)&&(a.add(f),f(d,...p))),d},mixin(f){return s.mixins.includes(f)||s.mixins.push(f),d},component(f,p){return p?(s.components[f]=p,d):s.components[f]},directive(f,p){return p?(s.directives[f]=p,d):s.directives[f]},mount(f,p,g){if(!u){const I=d._ceVNode||At(r,i);return I.appContext=s,g===!0?g="svg":g===!1&&(g=void 0),e(I,f,g),u=!0,d._container=f,f.__vue_app__=d,cl(I.component)}},onUnmount(f){l.push(f)},unmount(){u&&(Me(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(f,p){return s.provides[f]=p,d},runWithContext(f){const p=Ir;Ir=d;try{return f()}finally{Ir=p}}};return d}}let Ir=null;function vg(e,t){if(_e){let n=_e.provides;const r=_e.parent&&_e.parent.provides;r===n&&(n=_e.provides=Object.create(r)),n[e]=t}}function _s(e,t,n=!1){const r=zd();if(r||Ir){let i=Ir?Ir._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&mt(t)?t.call(r&&r.proxy):t}}const Sd={},Cd=()=>Object.create(Sd),Rd=e=>Object.getPrototypeOf(e)===Sd;function _g(e,t,n,r=!1){const i={},s=Cd();e.propsDefaults=Object.create(null),Pd(e,t,i,s);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:Lm(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function bg(e,t,n,r){const{props:i,attrs:s,vnode:{patchFlag:a}}=e,l=It(i),[u]=e.propsOptions;let d=!1;if((r||a>0)&&!(a&16)){if(a&8){const f=e.vnode.dynamicProps;for(let p=0;p<f.length;p++){let g=f[p];if(so(e.emitsOptions,g))continue;const I=t[g];if(u)if(xt(s,g))I!==s[g]&&(s[g]=I,d=!0);else{const R=Pn(g);i[R]=ba(u,l,R,I,e,!1)}else I!==s[g]&&(s[g]=I,d=!0)}}}else{Pd(e,t,i,s)&&(d=!0);let f;for(const p in l)(!t||!xt(t,p)&&((f=or(p))===p||!xt(t,f)))&&(u?n&&(n[p]!==void 0||n[f]!==void 0)&&(i[p]=ba(u,l,p,void 0,e,!0)):delete i[p]);if(s!==l)for(const p in s)(!t||!xt(t,p))&&(delete s[p],d=!0)}d&&sn(e.attrs,"set","")}function Pd(e,t,n,r){const[i,s]=e.propsOptions;let a=!1,l;if(t)for(let u in t){if(hi(u))continue;const d=t[u];let f;i&&xt(i,f=Pn(u))?!s||!s.includes(f)?n[f]=d:(l||(l={}))[f]=d:so(e.emitsOptions,u)||(!(u in r)||d!==r[u])&&(r[u]=d,a=!0)}if(s){const u=It(n),d=l||Pt;for(let f=0;f<s.length;f++){const p=s[f];n[p]=ba(i,u,p,d[p],e,!xt(d,p))}}return a}function ba(e,t,n,r,i,s){const a=e[n];if(a!=null){const l=xt(a,"default");if(l&&r===void 0){const u=a.default;if(a.type!==Function&&!a.skipFactory&&mt(u)){const{propsDefaults:d}=i;if(n in d)r=d[n];else{const f=Fi(i);r=d[n]=u.call(null,t),f()}}else r=u;i.ce&&i.ce._setProp(n,r)}a[0]&&(s&&!l?r=!1:a[1]&&(r===""||r===or(n))&&(r=!0))}return r}const wg=new WeakMap;function Vd(e,t,n=!1){const r=n?wg:t.propsCache,i=r.get(e);if(i)return i;const s=e.props,a={},l=[];let u=!1;if(!mt(e)){const f=p=>{u=!0;const[g,I]=Vd(p,t,!0);ne(a,g),I&&l.push(...I)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!u)return kt(e)&&r.set(e,br),br;if(st(s))for(let f=0;f<s.length;f++){const p=Pn(s[f]);
vendor: 1,973 bytes, line 13
13Jc(p)&&(a[p]=Pt)}else if(s)for(const f in s){const p=Pn(f);if(Jc(p)){const g=s[f],I=a[p]=st(g)||mt(g)?{type:g}:ne({},g),R=I.type;let V=!1,O=!0;if(st(R))for(let B=0;B<R.length;++B){const j=R[B],Q=mt(j)&&j.name;if(Q==="Boolean"){V=!0;break}else Q==="String"&&(O=!1)}else V=mt(R)&&R.name==="Boolean";I[0]=V,I[1]=O,(V||xt(I,"default"))&&l.push(p)}}const d=[a,l];return kt(e)&&r.set(e,d),d}function Jc(e){return e[0]!=="$"&&!hi(e)}const ol=e=>e==="_"||e==="_ctx"||e==="$stable",al=e=>st(e)?e.map(qe):[qe(e)],Eg=(e,t,n)=>{if(t._n)return t;const r=ma((...i)=>al(t(...i)),n);return r._c=!1,r},kd=(e,t,n)=>{const r=e._ctx;for(const i in e){if(ol(i))continue;const s=e[i];if(mt(s))t[i]=Eg(i,s,r);else if(s!=null){const a=al(s);t[i]=()=>a}}},Dd=(e,t)=>{const n=al(t);e.slots.default=()=>n},Nd=(e,t,n)=>{for(const r in t)(n||!ol(r))&&(e[r]=t[r])},Tg=(e,t,n)=>{const r=e.slots=Cd();if(e.vnode.shapeFlag&32){const i=t._;i?(Nd(r,t,n),n&&qh(r,"_",i,!0)):kd(t,r)}else t&&Dd(e,t)},Ig=(e,t,n)=>{const{vnode:r,slots:i}=e;let s=!0,a=Pt;if(r.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:Nd(i,t,n):(s=!t.$stable,kd(t,i)),a=t}else t&&(Dd(e,t),a={default:1});if(s)for(const l in i)!ol(l)&&a[l]==null&&delete i[l]},xe=Bg;function xg(e){return Ag(e)}function Ag(e,t){const n=Zs();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:a,createText:l,createComment:u,setText:d,setElementText:f,parentNode:p,nextSibling:g,setScopeId:I=Ge,insertStaticContent:R}=e,V=(E,A,P,L=null,N=null,M=null,G=void 0,q=null,U=!!A.dynamicChildren)=>{if(E===A)return;E&&!Zn(E,A)&&(L=Ye(E),Nt(E,N,M,!0),E=null),A.patchFlag===-2&&(U=!1,A.dynamicChildren=null);const{type:F,ref:nt,shapeFlag:W}=A;switch(F){case oo:O(E,A,P,L);break;case ve:B(E,A,P,L);break;case bs:E==null&&j(A,P,L,G);break;case he:b(E,A,P,L,N,M,G,q,U);break;default:W&1?ut(E,A,P,L,N,M,G,q,U):W&6?y(E,A,P,L,N,M,G,q,U):(W&64||W&128)&&F.process(E,A,P,L,N,M,G,q,U,Be)}nt!=null&&N?pi(nt,E&&E.ref,M,A||E,!A):nt==null&&E&&E.ref!=null&&pi(E.ref,null,M,E,!0)}
vendor: 17,829 bytes, line 13
13,O=(E,A,P,L)=>{if(E==null)r(A.el=l(A.children),P,L);else{const N=A.el=E.el;A.children!==E.children&&d(N,A.children)}},B=(E,A,P,L)=>{E==null?r(A.el=u(A.children||""),P,L):A.el=E.el},j=(E,A,P,L)=>{[E.el,E.anchor]=R(E.children,A,P,L,E.el,E.anchor)},Q=({el:E,anchor:A},P,L)=>{let N;for(;E&&E!==A;)N=g(E),r(E,P,L),E=N;r(A,P,L)},$=({el:E,anchor:A})=>{let P;for(;E&&E!==A;)P=g(E),i(E),E=P;i(A)},ut=(E,A,P,L,N,M,G,q,U)=>{A.type==="svg"?G="svg":A.type==="math"&&(G="mathml"),E==null?gt(A,P,L,N,M,G,q,U):v(E,A,N,M,G,q,U)},gt=(E,A,P,L,N,M,G,q)=>{let U,F;const{props:nt,shapeFlag:W,transition:Z,dirs:it}=E;if(U=E.el=a(E.type,M,nt&&nt.is,nt),W&8?f(U,E.children):W&16&&_(E.children,U,null,L,N,Wo(E,M),G,q),it&&Kn(E,null,L,"created"),x(U,E,E.scopeId,G,L),nt){for(const ft in nt)ft!=="value"&&!hi(ft)&&s(U,ft,null,nt[ft],M,L);"value"in nt&&s(U,"value",null,nt.value,M),(F=nt.onVnodeBeforeMount)&&je(F,L,E)}it&&Kn(E,null,L,"beforeMount");const rt=Sg(N,Z);rt&&Z.beforeEnter(U),r(U,A,P),((F=nt&&nt.onVnodeMounted)||rt||it)&&xe(()=>{F&&je(F,L,E),rt&&Z.enter(U),it&&Kn(E,null,L,"mounted")},N)},x=(E,A,P,L,N)=>{if(P&&I(E,P),L)for(let M=0;M<L.length;M++)I(E,L[M]);if(N){let M=N.subTree;if(A===M||jd(M.type)&&(M.ssContent===A||M.ssFallback===A)){const G=N.vnode;x(E,G,G.scopeId,G.slotScopeIds,N.parent)}}},_=(E,A,P,L,N,M,G,q,U=0)=>{for(let F=U;F<E.length;F++){const nt=E[F]=q?_n(E[F]):qe(E[F]);V(null,nt,A,P,L,N,M,G,q)}},v=(E,A,P,L,N,M,G)=>{const q=A.el=E.el;let{patchFlag:U,dynamicChildren:F,dirs:nt}=A;U|=E.patchFlag&16;const W=E.props||Pt,Z=A.props||Pt;let it;if(P&&Wn(P,!1),(it=Z.onVnodeBeforeUpdate)&&je(it,P,A,E),nt&&Kn(A,E,P,"beforeUpdate"),P&&Wn(P,!0),(W.innerHTML&&Z.innerHTML==null||W.textContent&&Z.textContent==null)&&f(q,""),F?T(E.dynamicChildren,F,q,P,L,Wo(A,N),M):G||dt(E,A,q,null,P,L,Wo(A,N),M,!1),U>0){if(U&16)w(q,W,Z,P,N);else if(U&2&&W.class!==Z.class&&s(q,"class",null,Z.class,N),U&4&&s(q,"style",W.style,Z.style,N),U&8){const rt=A.dynamicProps;for(let ft=0;ft<rt.length;ft++){const vt=rt[ft],Jt=W[vt],Yt=Z[vt];(Yt!==Jt||vt==="value")&&s(q,vt,Jt,Yt,N,P)}}U&1&&E.children!==A.children&&f(q,A.children)}else!G&&F==null&&w(q,W,Z,P,N);((it=Z.onVnodeUpdated)||nt)&&xe(()=>{it&&je(it,P,A,E),nt&&Kn(A,E,P,"updated")},L)},T=(E,A,P,L,N,M,G)=>{for(let q=0;q<A.length;q++){const U=E[q],F=A[q],nt=U.el&&(U.type===he||!Zn(U,F)||U.shapeFlag&198)?p(U.el):P;V(U,F,nt,null,L,N,M,G,!0)}},w=(E,A,P,L,N)=>{if(A!==P){if(A!==Pt)for(const M in A)!hi(M)&&!(M in P)&&s(E,M,A[M],null,N,L);for(const M in P){if(hi(M))continue;const G=P[M],q=A[M];G!==q&&M!=="value"&&s(E,M,q,G,N,L)}"value"in P&&s(E,"value",A.value,P.value,N)}},b=(E,A,P,L,N,M,G,q,U)=>{const F=A.el=E?E.el:l(""),nt=A.anchor=E?E.anchor:l("");let{patchFlag:W,dynamicChildren:Z,slotScopeIds:it}=A;it&&(q=q?q.concat(it):it),E==null?(r(F,P,L),r(nt,P,L),_(A.children||[],P,nt,N,M,G,q,U)):W>0&&W&64&&Z&&E.dynamicChildren?(T(E.dynamicChildren,Z,P,N,M,G,q),(A.key!=null||N&&A===N.subTree)&&Od(E,A,!0)):dt(E,A,P,nt,N,M,G,q,U)},y=(E,A,P,L,N,M,G,q,U)=>{A.slotScopeIds=q,E==null?A.shapeFlag&512?N.ctx.activate(A,P,L,G,U):et(A,P,L,N,M,G,U):Y(E,A,U)},et=(E,A,P,L,N,M,G)=>{const q=E.component=Kg(E,L,N);if(no(E)&&(q.ctx.renderer=Be),Wg(q,!1,G),q.asyncDep){if(N&&N.registerDep(q,pt,G),!E.el){const U=q.subTree=At(ve);B(null,U,A,P),E.placeholder=U.el}}else pt(q,E,A,P,N,M,G)},Y=(E,A,P)=>{const L=A.component=E.component;if(Lg(E,A,P))if(L.asyncDep&&!L.asyncResolved){ht(L,A,P);return}else L.next=A,L.update();else A.el=E.el,L.vnode=A},pt=(E,A,P,L,N,M,G)=>{const q=()=>{if(E.isMounted){let{next:W,bu:Z,u:it,parent:rt,vnode:ft}=E;{const se=Md(E);if(se){W&&(W.el=ft.el,ht(E,W,G)),se.asyncDep.then(()=>{E.isUnmounted||q()});return}}let vt=W,Jt;Wn(E,!1),W?(W.el=ft.el,ht(E,W,G)):W=ft,Z&&Uo(Z),(Jt=W.props&&W.props.onVnodeBeforeUpdate)&&je(Jt,rt,W,ft),Wn(E,!0);const Yt=Xc(E),Re=E.subTree;E.subTree=Yt,V(Re,Yt,p(Re.el),Ye(Re),E,N,M),W.el=Yt.el,vt===null&&Fg(E,Yt.el),it&&xe(it,N),(Jt=W.props&&W.props.onVnodeUpdated)&&xe(()=>je(Jt,rt,W,ft),N)}else{let W;const{el:Z,props:it}=A,{bm:rt,m:ft,parent:vt,root:Jt,type:Yt}=E,Re=mi(A);Wn(E,!1),rt&&Uo(rt),!Re&&(W=it&&it.onVnodeBeforeMount)&&je(W,vt,A),Wn(E,!0);{Jt.ce&&Jt.ce._def.shadowRoot!==!1&&Jt.ce._injectChildStyle(Yt);const se=E.subTree=Xc(E);V(null,se,P,L,E,N,M),A.el=se.el}if(ft&&xe(ft,N),!Re&&(W=it&&it.onVnodeMounted)){const se=A;xe(()=>je(W,vt,se),N)}(A.shapeFlag&256||vt&&mi(vt.vnode)&&vt.vnode.shapeFlag&256)&&E.a&&xe(E.a,N),E.isMounted=!0,A=P=L=null}};E.scope.on();const U=E.effect=new Kh(q);E.scope.off();const F=E.update=U.run.bind(U),nt=E.job=U.runIfDirty.bind(U);nt.i=E,nt.id=E.uid,U.scheduler=()=>sl(nt),Wn(E,!0),F()},ht=(E,A,P)=>{A.component=E;const L=E.vnode.props;E.vnode=A,E.next=null,bg(E,A.props,L,P),Ig(E,A.children,P),on(),qc(E),an()},dt=(E,A,P,L,N,M,G,q,U=!1)=>{const F=E&&E.children,nt=E?E.shapeFlag:0,W=A.children,{patchFlag:Z,shapeFlag:it}=A;if(Z>0){if(Z&128){Bt(F,W,P,L,N,M,G,q,U);return}else if(Z&256){ie(F,W,P,L,N,M,G,q,U);return}}it&8?(nt&16&&$n(F,N,M),W!==F&&f(P,W)):nt&16?it&16?Bt(F,W,P,L,N,M,G,q,U):$n(F,N,M,!0):(nt&8&&f(P,""),it&16&&_(W,P,L,N,M,G,q,U))},ie=(E,A,P,L,N,M,G,q,U)=>{E=E||br,A=A||br;const F=E.length,nt=A.length,W=Math.min(F,nt);let Z;for(Z=0;Z<W;Z++){const it=A[Z]=U?_n(A[Z]):qe(A[Z]);V(E[Z],it,P,null,N,M,G,q,U)}F>nt?$n(E,N,M,!0,!1,W):_(A,P,L,N,M,G,q,U,W)},Bt=(E,A,P,L,N,M,G,q,U)=>{let F=0;const nt=A.length;let W=E.length-1,Z=nt-1;for(;F<=W&&F<=Z;){const it=E[F],rt=A[F]=U?_n(A[F]):qe(A[F]);if(Zn(it,rt))V(it,rt,P,null,N,M,G,q,U);else break;F++}for(;F<=W&&F<=Z;){const it=E[W],rt=A[Z]=U?_n(A[Z]):qe(A[Z]);if(Zn(it,rt))V(it,rt,P,null,N,M,G,q,U);else break;W--,Z--}if(F>W){if(F<=Z){const it=Z+1,rt=it<nt?A[it].el:L;for(;F<=Z;)V(null,A[F]=U?_n(A[F]):qe(A[F]),P,rt,N,M,G,q,U),F++}}else if(F>Z)for(;F<=W;)Nt(E[F],N,M,!0),F++;else{const it=F,rt=F,ft=new Map;for(F=rt;F<=Z;F++){const Xt=A[F]=U?_n(A[F]):qe(A[F]);Xt.key!=null&&ft.set(Xt.key,F)}let vt,Jt=0;const Yt=Z-rt+1;let Re=!1,se=0;const fn=new Array(Yt);for(F=0;F<Yt;F++)fn[F]=0;for(F=it;F<=W;F++){const Xt=E[F];if(Jt>=Yt){Nt(Xt,N,M,!0);continue}let Pe;if(Xt.key!=null)Pe=ft.get(Xt.key);else for(vt=rt;vt<=Z;vt++)if(fn[vt-rt]===0&&Zn(Xt,A[vt])){Pe=vt;break}Pe===void 0?Nt(Xt,N,M,!0):(fn[Pe-rt]=F+1,Pe>=se?se=Pe:Re=!0,V(Xt,A[Pe],P,null,N,M,G,q,U),Jt++)}const Hr=Re?Cg(fn):br;for(vt=Hr.length-1,F=Yt-1;F>=0;F--){const Xt=rt+F,Pe=A[Xt],Gi=A[Xt+1],cr=Xt+1<nt?Gi.el||Gi.placeholder:L;fn[F]===0?V(null,Pe,P,cr,N,M,G,q,U):Re&&(vt<0||F!==Hr[vt]?jt(Pe,P,cr,2):vt--)}}},jt=(E,A,P,L,N=null)=>{const{el:M,type:G,transition:q,children:U,shapeFlag:F}=E;if(F&6){jt(E.component.subTree,A,P,L);return}if(F&128){E.suspense.move(A,P,L);return}if(F&64){G.move(E,A,P,Be);return}if(G===he){r(M,A,P);for(let W=0;W<U.length;W++)jt(U[W],A,P,L);r(E.anchor,A,P);return}if(G===bs){Q(E,A,P);return}if(L!==2&&F&1&&q)if(L===0)q.beforeEnter(M),r(M,A,P),xe(()=>q.enter(M),N);else{const{leave:W,delayLeave:Z,afterLeave:it}=q,rt=()=>{E.ctx.isUnmounted?i(M):r(M,A,P)},ft=()=>{M._isLeaving&&M[rn](!0),W(M,()=>{rt(),it&&it()})};Z?Z(M,rt,ft):ft()}else r(M,A,P)},Nt=(E,A,P,L=!1,N=!1)=>{const{type:M,props:G,ref:q,children:U,dynamicChildren:F,shapeFlag:nt,patchFlag:W,dirs:Z,cacheIndex:it}=E;if(W===-2&&(N=!1),q!=null&&(on(),pi(q,null,P,E,!0),an()),it!=null&&(A.renderCache[it]=void 0),nt&256){A.ctx.deactivate(E);return}const rt=nt&1&&Z,ft=!mi(E);let vt;if(ft&&(vt=G&&G.onVnodeBeforeUnmount)&&je(vt,A,E),nt&6)Un(E.component,P,L);else{if(nt&128){E.suspense.unmount(P,L);return}rt&&Kn(E,null,A,"beforeUnmount"),nt&64?E.type.remove(E,A,P,Be,L):F&&!F.hasOnce&&(M!==he||W>0&&W&64)?$n(F,A,P,!1,!0):(M===he&&W&384||!N&&nt&16)&&$n(U,A,P),L&&Ot(E)}(ft&&(vt=G&&G.onVnodeUnmounted)||rt)&&xe(()=>{vt&&je(vt,A,E),rt&&Kn(E,null,A,"unmounted")},P)},Ot=E=>{const{type:A,el:P,anchor:L,transition:N}=E;if(A===he){xo(P,L);return}if(A===bs){$(E);return}const M=()=>{i(P),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(E.shapeFlag&1&&N&&!N.persisted){const{leave:G,delayLeave:q}=N,U=()=>G(P,M);q?q(E.el,M,U):U()}else M()},xo=(E,A)=>{let P;for(;E!==A;)P=g(E),i(E),E=P;i(A)},Un=(E,A,P)=>{const{bum:L,scope:N,job:M,subTree:G,um:q,m:U,a:F}=E;Yc(U),Yc(F),L&&Uo(L),N.stop(),M&&(M.flags|=8,Nt(G,E,A,P)),q&&xe(q,A),xe(()=>{E.isUnmounted=!0},A)},$n=(E,A,P,L=!1,N=!1,M=0)=>{for(let G=M;G<E.length;G++)Nt(E[G],A,P,L,N)},Ye=E=>{if(E.shapeFlag&6)return Ye(E.component.subTree);if(E.shapeFlag&128)return E.suspense.next();const A=g(E.anchor||E.el),P=A&&A[Qm];return P?g(P):A};let qr=!1;const Hi=(E,A,P)=>{E==null?A._vnode&&Nt(A._vnode,null,null,!0):V(A._vnode||null,E,A,null,null,null,P),A._vnode=E,qr||(qr=!0,qc(),dd(),qr=!1)},Be={p:V,um:Nt,m:jt,r:Ot,mt:et,mc:_,pc:dt,pbc:T,n:Ye,o:e};return{render:Hi,hydrate:void 0,createApp:yg(Hi)}}function Wo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Wn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Sg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Od(e,t,n=!1){const r=e.children,i=t.children;if(st(r)&&st(i))for(let s=0;s<r.length;s++){const a=r[s];let l=i[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[s]=_n(i[s]),l.el=a.el),!n&&l.patchFlag!==-2&&Od(a,l)),l.type===oo&&l.patchFlag!==-1&&(l.el=a.el),l.type===ve&&!l.el&&(l.el=a.el)}}function Cg(e){const t=e.slice(),n=[0];let r,i,s,a,l;const u=e.length;for(r=0;r<u;r++){const d=e[r];if(d!==0){if(i=n[n.length-1],e[i]<d){t[r]=i,n.push(r);continue}for(s=0,a=n.length-1;s<a;)l=s+a>>1,e[n[l]]<d?s=l+1:a=l;d<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,a=n[s-1];s-- >0;)n[s]=a,a=t[a];return n}function Md(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Md(t)}function Yc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Rg=Symbol.for("v-scx"),Pg=()=>_s(Rg);function Se(e,t,n){return Ld(e,t,n)}function Ld(e,t,n=Pt){const{immediate:r,deep:i,flush:s,once:a}=n,l=ne({},n),u=t&&r||!t&&s!=="post";let d;if(Si){if(s==="sync"){const I=Pg();d=I.__watcherHandles||(I.__watcherHandles=[])}else if(!u){const I=()=>{};return I.stop=Ge,I.resume=Ge,I.pause=Ge,I}}const f=_e;l.call=(I,R,V)=>Me(I,f,R,V);let p=!1;s==="post"?l.scheduler=I=>{xe(I,f&&f.suspense)}:s!=="sync"&&(p=!0,l.scheduler=(I,R)=>{R?I():sl(I)}),l.augmentJob=I=>{t&&(I.flags|=4),p&&(I.flags|=2,f&&(I.id=f.uid,I.i=f))};const g=Hm(e,t,l);return Si&&(d?d.push(g):u&&g()),g}function Vg(e,t,n){const r=this.proxy,i=$t(e)?e.includes(".")?Fd(r,e):()=>r[e]:e.bind(r,r);let s;mt(t)?s=t:(s=t.handler,n=t);const a=Fi(this),l=Ld(i,s.bind(r),n);return a(),l}function Fd(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}const kg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Pn(t)}Modifiers`]||e[`${or(t)}Modifiers`];function Dg(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Pt;let i=n;const s=t.startsWith("update:"),a=s&&kg(r,t.slice(7));a&&(a.trim&&(i=n.map(f=>$t(f)?f.trim():f)),a.number&&(i=n.map(cm)));let l,u=r[l=jo(t)]||r[l=jo(Pn(t))];!u&&s&&(u=r[l=jo(or(t))]),u&&Me(u,e,6,i);const d=r[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Me(d,e,6,i)}}const Ng=new WeakMap;function Bd(e,t,n=!1){const r=n?Ng:t.emitsCache,i=r.get(e);if(i!==void 0)return i;const s=e.emits;let a={},l=!1;if(!mt(e)){const u=d=>{const f=Bd(d,t,!0);f&&(l=!0,ne(a,f))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!s&&!l?(kt(e)&&r.set(e,null),null):(st(s)?s.forEach(u=>a[u]=null):ne(a,s),kt(e)&&r.set(e,a),a)}function so(e,t){return!e||!Js(t)?!1:(t=t.slice(2).replace(/Once$/,""),xt(e,t[0].toLowerCase()+t.slice(1))||xt(e,or(t))||xt(e,t))}function Xc(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[s],slots:a,attrs:l,emit:u,render:d,renderCache:f,props:p,data:g,setupState:I,ctx:R,inheritAttrs:V}=e,O=Vs(e);let B,j;try{if(n.shapeFlag&4){const $=i||r,ut=$;B=qe(d.call(ut,$,f,p,I,g,R)),j=l}else{const $=t;B=qe($.length>1?$(p,{attrs:l,slots:a,emit:u}):$(p,null)),j=t.props?l:Og(l)}}catch($){yi.length=0,eo($,e,1),B=At(ve)}let Q=B;if(j&&V!==!1){const $=Object.keys(j),{shapeFlag:ut}=Q;$.length&&ut&7&&(s&&$.some(Ka)&&(j=Mg(j,s)),Q=kn(Q,j,!1,!0))}return n.dirs&&(Q=kn(Q,null,!1,!0),Q.dirs=Q.dirs?Q.dirs.concat(n.dirs):n.dirs),n.transition&&xi(Q,n.transition),B=Q,Vs(O),B}const Og=e=>{let t;for(const n in e)(n==="class"||n==="style"||Js(n))&&((t||(t={}))[n]=e[n]);return t},Mg=(e,t)=>{const n={};for(const r in e)(!Ka(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Lg(e,t,n){const{props:r,children:i,component:s}=e,{props:a,children:l,patchFlag:u}=t,d=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return r?Zc(r,a,d):!!a;if(u&8){const f=t.dynamicProps;for(let p=0;p<f.length;p++){const g=f[p];if(a[g]!==r[g]&&!so(d,g))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:r===a?!1:r?a?Zc(r,a,d):!0:!!a;return!1}function Zc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const s=r[i];if(t[s]!==e[s]&&!so(n,s))return!0}return!1}function Fg({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const jd=e=>e.__isSuspense;function Bg(e,t){t&&t.pendingBranch?st(e)?t.effects.push(...e):t.effects.push(e):Wm(e)}const he=Symbol.for("v-fgt"),oo=Symbol.for("v-txt"),ve=Symbol.for("v-cmt"),bs=Symbol.for("v-stc"),yi=[];let Ae=null;function K(e=!1){yi.push(Ae=e?null:[])}function jg(){yi.pop(),Ae=yi[yi.length-1]||null}let Ai=1;function Ns(e,t=!1){Ai+=e,e<0&&Ae&&t&&(Ae.hasOnce=!0)}function Ud(e){return e.dynamicChildren=Ai>0?Ae||br:null,jg(),Ai>0&&Ae&&Ae.push(e),e}function X(e,t,n,r,i,s){return Ud(ot(e,t,n,r,i,s,!0))}function Ce(e,t,n,r,i){return Ud(At(e,t,n,r,i,!0))}function Os(e){return e?e.__v_isVNode===!0:!1}function Zn(e,t){return e.type===t.type&&e.key===t.key}const $d=({key:e})=>e??null,ws=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$t(e)||pe(e)||mt(e)?{i:He,r:e,k:t,f:!!n}:e:null);function ot(e,t=null,n=null,r=0,i=null,s=e===he?0:1,a=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$d(t),ref:t&&ws(t),scopeId:pd,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:He};return l?(ll(u,n),s&128&&e.normalize(u)):n&&(u.shapeFlag|=$t(n)?8:16),Ai>0&&!a&&Ae&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&Ae.push(u),u}const At=Ug;function Ug(e,t=null,n=null,r=0,i=null,s=!1){if((!e||e===cg)&&(e=ve),Os(e)){const l=kn(e,t,!0);return n&&ll(l,n),Ai>0&&!s&&Ae&&(l.shapeFlag&6?Ae[Ae.indexOf(e)]=l:Ae.push(l)),l.patchFlag=-2,l}if(Xg(e)&&(e=e.__vccOpts),t){t=$g(t);let{class:l,style:u}=t;l&&!$t(l)&&(t.class=be(l)),kt(u)&&(il(u)&&!st(u)&&(u=ne({},u)),t.style=Ja(u))}const a=$t(e)?1:jd(e)?128:md(e)?64:kt(e)?4:mt(e)?2:0;return ot(e,t,n,r,i,a,s,!0)}function $g(e){return e?il(e)||Rd(e)?ne({},e):e:null}function kn(e,t,n=!1,r=!1){const{props:i,ref:s,patchFlag:a,children:l,transition:u}=e,d=t?zg(i||{},t):i,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&$d(d),ref:t&&t.ref?n&&s?st(s)?s.concat(ws(t)):[s,ws(t)]:ws(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==he?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&kn(e.ssContent),ssFallback:e.ssFallback&&kn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&r&&xi(f,u.clone(f)),f}function qd(e=" ",t=0){return At(oo,null,e,t)}function qg(e,t){const n=At(bs,null,e);return n.staticCount=t,n}function at(e="",t=!1){return t?(K(),Ce(ve,null,e)):At(ve,null,e)}function qe(e){return e==null||typeof e=="boolean"?At(ve):st(e)?At(he,null,e.slice()):Os(e)?_n(e):At(oo,null,String(e))}function _n(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:kn(e)}function ll(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(st(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),ll(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Rd(t)?t._ctx=He:i===3&&He&&(He.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else mt(t)?(t={default:t,_ctx:He},n=32):(t=String(t),r&64?(n=16,t=[qd(t)]):n=8);e.children=t,e.shapeFlag|=n}function zg(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=be([t.class,r.class]));else if(i==="style")t.style=Ja([t.style,r.style]);else if(Js(i)){const s=t[i],a=r[i];a&&s!==a&&!(st(s)&&s.includes(a))&&(t[i]=s?[].concat(s,a):a)}else i!==""&&(t[i]=r[i])}return t}function je(e,t,n,r=null){Me(e,t,7,[n,r])}const Hg=Ad();let Gg=0;function Kg(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||Hg,s={uid:Gg++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ym(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Vd(r,i),emitsOptions:Bd(r,i),emit:null,emitted:null,propsDefaults:Pt,inheritAttrs:r.inheritAttrs,ctx:Pt,data:Pt,props:Pt,attrs:Pt,slots:Pt,refs:Pt,setupState:Pt,setupContext: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: 2,000 bytes, lines 13-16
13sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=Dg.bind(null,s),e.ce&&e.ce(s),s}let _e=null;const zd=()=>_e||He;let Ms,wa;{const e=Zs(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),s=>{i.length>1?i.forEach(a=>a(s)):i[0](s)}};Ms=t("__VUE_INSTANCE_SETTERS__",n=>_e=n),wa=t("__VUE_SSR_SETTERS__",n=>Si=n)}const Fi=e=>{const t=_e;return Ms(e),e.scope.on(),()=>{e.scope.off(),Ms(t)}},tu=()=>{_e&&_e.scope.off(),Ms(null)};function Hd(e){return e.vnode.shapeFlag&4}let Si=!1;function Wg(e,t=!1,n=!1){t&&wa(t);const{props:r,children:i}=e.vnode,s=Hd(e);_g(e,r,s,t),Tg(e,i,n||t);const a=s?Qg(e,t):void 0;return t&&wa(!1),a}function Qg(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ug);const{setup:r}=n;if(r){on();const i=e.setupContext=r.length>1?Yg(e):null,s=Fi(e),a=Li(r,e,0,[e.props,i]),l=Bh(a);if(an(),s(),(l||e.sp)&&!mi(e)&&wd(e),l){if(a.then(tu,tu),t)return a.then(u=>{eu(e,u)}).catch(u=>{eo(u,e,0)});e.asyncDep=a}else eu(e,a)}else Gd(e)}function eu(e,t,n){mt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:kt(t)&&(e.setupState=cd(t)),Gd(e)}function Gd(e,t,n){const r=e.type;e.render||(e.render=r.render||Ge);{const i=Fi(e);on();try{hg(e)}finally{an(),i()}}}const Jg={get(e,t){return ue(e,"get",""),e[t]}};function Yg(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Jg),slots:e.slots,emit:e.emit,expose:t}}function cl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(cd(Fm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in gi)return gi[n](e)},has(t,n){return n in t||n in gi}})):e.proxy}function Xg(e){return mt(e)&&"__vccOpts"in e}const wn=(e,t)=>qm(e,t,Si);function Zg(e,t,n){const r=(s,a,l)=>{Ns(-1);try{return At(s,a,l)}finally{Ns(1)}},i=arguments.length;return i===2?kt(t)&&!st(t)?Os(t)?r(e,null,[t]):r(e,t):r(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&Os(n)&&(n=[n]),r(e,t,n))}const ty="3.5.21";/** 14* @vue/runtime-dom v3.5.21 15* (c) 2018-present Yuxi (Evan) You and Vue contributors 16* @license MIT
17**/let Ea;const nu=typeof window<"u"&&window.trustedTypes;if(nu)try{Ea=nu.createPolicy("vue",{createHTML:e=>e})}catch{}const Kd=Ea?e=>Ea.createHTML(e):e=>e,ey="http://www.w3.org/2000/svg",ny="http://www.w3.org/1998/Math/MathML",nn=typeof document<"u"?document:null,ru=nn&&nn.createElement("template"),ry={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?nn.createElementNS(ey,e):t==="mathml"?nn.createElementNS(ny,e):n?nn.createElement(e,{is:n}):nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>nn.createTextNode(e),createComment:e=>nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,s){const a=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{ru.innerHTML=Kd(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const l=ru.content;if(r==="svg"||r==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yn="transition",si="animation",Ci=Symbol("_vtc"),Wd={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},iy=ne({},gd,Wd),sy=e=>(e.displayName="Transition",e.props=iy,e),iu=sy((e,{slots:t})=>Zg(Xm,oy(e),t)),Qn=(e,t=[])=>{st(e)?e.forEach(n=>n(...t)):e&&e(...t)},su=e=>e?st(e)?e.some(t=>t.length>1):e.length>1:!1;function oy(e){const t={};for(const b in e)b in Wd||(t[b]=e[b]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:u=s,appearActiveClass:d=a,appearToClass:f=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:I=`${n}-leave-to`}=e,R=ay(i),V=R&&R[0],O=R&&R[1],{onBeforeEnter:B,onEnter:j,onEnterCancelled:Q,onLeave:$,onLeaveCancelled:ut,onBeforeAppear:gt=B,onAppear:x=j,onAppearCancelled:_=Q}=t,v=(b,y,et,Y)=>{b._enterCancelled=Y,Jn(b,y?f:l),Jn(b,y?d:a),et&&et()},T=(b,y)=>{b._isLeaving=!1,Jn(b,p),Jn(b,I),Jn(b,g),y&&y()},w=b=>(y,et)=>{const Y=b?x:j,pt=()=>v(y,b,et);Qn(Y,[y,pt]),ou(()=>{Jn(y,b?u:s),en(y,b?f:l),su(Y)||au(y,r,V,pt)})};return ne(t,{onBeforeEnter(b){Qn(B,[b]),en(b,s),en(b,a)},onBeforeAppear(b){Qn(gt,[b]),en(b,u),en(b,d)},onEnter:w(!1),onAppear:w(!0),onLeave(b,y){b._isLeaving=!0;const et=()=>T(b,y);en(b,p),b._enterCancelled?(en(b,g),uu()):(uu(),en(b,g)),ou(()=>{b._isLeaving&&(Jn(b,p),en(b,I),su($)||au(b,r,O,et))}),Qn($,[b,et])},onEnterCancelled(b){v(b,!1,void 0,!0),Qn(Q,[b])},onAppearCancelled(b){v(b,!0,void 0,!0),Qn(_,[b])},onLeaveCancelled(b){T(b),Qn(ut,[b])}})}function ay(e){if(e==null)return null;if(kt(e))return[Qo(e.enter),Qo(e.leave)];{const t=Qo(e);return[t,t]}}function Qo(e){return um(e)}function en(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ci]||(e[Ci]=new Set)).add(t)}function Jn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ci];n&&(n.delete(t),n.size||(e[Ci]=void 0))}function ou(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ly=0;function au(e,t,n,r){const i=e._endId=++ly,s=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:a,timeout:l,propCount:u}=cy(e,t);if(!a)return r();const d=a+"end";let f=0;const p=()=>{e.removeEventListener(d,g),s()},g=I=>{I.target===e&&++f>=u&&p()};setTimeout(()=>{f<u&&p()},l+1),e.addEventListener(d,g)}function cy(e,t){const n=window.getComputedStyle(e),r=R=>(n[R]||"").split(", "),i=r(`${yn}Delay`),s=r(`${yn}Duration`),a=lu(i,s),l=r(`${si}Delay`),u=r(`${si}Duration`),d=lu(l,u);let f=null,p=0,g=0;t===yn?a>0&&(f=yn,p=a,g=s.length):t===si?d>0&&(f=si,p=d,g=u.length):(p=Math.max(a,d),f=p>0?a>d?yn:si:null,g=f?f===yn?s.length:u.length:0);const I=f===yn&&/\b(?:transform|all)(?:,|$)/.test(r(`${yn}Property`).toString());return{type:f,timeout:p,propCount:g,hasTransform:I}}function lu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>cu(n)+cu(e[r])))}function cu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function uu(){return document.body.offsetHeight}
vendor: 4,137 bytes, line 17
17function uy(e,t,n){const r=e[Ci];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const hu=Symbol("_vod"),hy=Symbol("_vsh"),dy=Symbol(""),fy=/(?:^|;)\s*display\s*:/;function py(e,t,n){const r=e.style,i=$t(n);let s=!1;if(n&&!i){if(t)if($t(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&Es(r,l,"")}else for(const a in t)n[a]==null&&Es(r,a,"");for(const a in n)a==="display"&&(s=!0),Es(r,a,n[a])}else if(i){if(t!==n){const a=r[dy];a&&(n+=";"+a),r.cssText=n,s=fy.test(n)}}else t&&e.removeAttribute("style");hu in e&&(e[hu]=s?r.display:"",e[hy]&&(r.display="none"))}const du=/\s*!important$/;function Es(e,t,n){if(st(n))n.forEach(r=>Es(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=my(e,t);du.test(n)?e.setProperty(or(r),n.replace(du,""),"important"):e[r]=n}}const fu=["Webkit","Moz","ms"],Jo={};function my(e,t){const n=Jo[t];if(n)return n;let r=Pn(t);if(r!=="filter"&&r in e)return Jo[t]=r;r=$h(r);for(let i=0;i<fu.length;i++){const s=fu[i]+r;if(s in e)return Jo[t]=s}return t}const pu="http://www.w3.org/1999/xlink";function mu(e,t,n,r,i,s=gm(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(pu,t.slice(6,t.length)):e.setAttributeNS(pu,t,n):n==null||s&&!zh(n)?e.removeAttribute(t):e.setAttribute(t,s?"":jn(n)?String(n):n)}function gu(e,t,n,r,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Kd(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(l!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=zh(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(i||t)}function gy(e,t,n,r){e.addEventListener(t,n,r)}function yy(e,t,n,r){e.removeEventListener(t,n,r)}const yu=Symbol("_vei");function vy(e,t,n,r,i=null){const s=e[yu]||(e[yu]={}),a=s[t];if(r&&a)a.value=r;else{const[l,u]=_y(t);if(r){const d=s[t]=Ey(r,i);gy(e,l,d,u)}else a&&(yy(e,l,a,u),s[t]=void 0)}}const vu=/(?:Once|Passive|Capture)$/;function _y(e){let t;if(vu.test(e)){t={};let r;for(;r=e.match(vu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):or(e.slice(2)),t]}let Yo=0;const by=Promise.resolve(),wy=()=>Yo||(by.then(()=>Yo=0),Yo=Date.now());function Ey(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Me(Ty(r,n.value),t,5,[r])};return n.value=e,n.attached=wy(),n}function Ty(e,t){if(st(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const _u=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Iy=(e,t,n,r,i,s)=>{const a=i==="svg";t==="class"?uy(e,r,a):t==="style"?py(e,n,r):Js(t)?Ka(t)||vy(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):xy(e,t,r,a))?(gu(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&mu(e,t,r,a,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$t(r))?gu(e,Pn(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),mu(e,t,r,a))};function xy(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&_u(t)&&mt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return _u(t)&&$t(n)?!1:t in e}const Ay=["ctrl","shift","alt","meta"],Sy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ay.some(n=>e[`${n}Key`]&&!t.includes(n))},bu=(e,t)=>
17{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((i,...s)=>{for(let a=0;a<t.length;a++){const l=Sy[t[a]];if(l&&l(i,t))return}return e(i,...s)}))},Cy=ne({patchProp:Iy},ry);let wu;function Ry(){return wu||(wu=xg(Cy))}const Py=((...e)=>{const t=Ry().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=ky(r);if(!i)return;const s=t._component;!mt(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=n(i,!1,Vy(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t});function Vy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ky(e){return $t(e)?document.querySelector(e):e}const Dy=()=>{};var Eu={};/** 18 * @license 19 * Copyright 2017 Google LLC 20 * 21 * Licensed under the Apache License, Version 2.0 (the "License"); 22 * you may not use this file except in compliance with the License. 23 * You may obtain a copy of the License at 24 * 25 * http://www.apache.org/licenses/LICENSE-2.0 26 * 27 * Unless required by applicable law or agreed to in writing, software 28 * distributed under the License is distributed on an "AS IS" BASIS, 29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 30 * See the License for the specific language governing permissions and 31 * limitations under the License. 32 */const Qd=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},Ny=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=e[n++];t[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=e[n++],a=e[n++],l=e[n++],u=((i&7)<<18|(s&63)<<12|(a&63)<<6|l&63)-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(u&1023))}else{const s=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63)}}return t.join("")},Jd={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const s=e[i],a=i+1<e.length,l=a?e[i+1]:0,u=i+2<e.length,d=u?e[i+2]:0,f=s>>2,p=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,I=d&63;u||(I=64,a||(g=64)),r.push(n[f],n[p],n[g],n[I])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Qd(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):Ny(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const s=n[e.charAt(i++)],l=i<e.length?n[e.charAt(i)]:0;++i;const d=i<e.length?n[e.charAt(i)]:64;++i;const p=i<e.length?n[e.charAt(i)]:64;if(++i,s==null||l==null||d==null||p==null)throw new Oy;const g=s<<2|l>>4;if(r.push(g),d!==64){const I=l<<4&240|d>>2;if(r.push(I),p!==64){const R=d<<6&192|p;r.push(R)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
32class Oy extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const My=function(e){const t=Qd(e);return Jd.encodeByteArray(t,!0)},Ls=function(e){return My(e).replace(/\./g,"")},Ly=function(e){try{return Jd.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/** 33 * @license 34 * Copyright 2022 Google LLC 35 * 36 * Licensed under the Apache License, Version 2.0 (the "License"); 37 * you may not use this file except in compliance with the License. 38 * You may obtain a copy of the License at 39 * 40 * http://www.apache.org/licenses/LICENSE-2.0 41 * 42 * Unless required by applicable law or agreed to in writing, software 43 * distributed under the License is distributed on an "AS IS" BASIS, 44 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 45 * See the License for the specific language governing permissions and 46 * limitations under the License. 47 */function Fy(){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.")}/** 48 * @license 49 * Copyright 2022 Google LLC 50 * 51 * Licensed under the Apache License, Version 2.0 (the "License"); 52 * you may not use this file except in compliance with the License. 53 * You may obtain a copy of the License at 54 * 55 * http://www.apache.org/licenses/LICENSE-2.0 56 * 57 * Unless required by applicable law or agreed to in writing, software 58 * distributed under the License is distributed on an "AS IS" BASIS, 59 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 60 * See the License for the specific language governing permissions and 61 * limitations under the License. 62 */const By=()=>Fy().__FIREBASE_DEFAULTS__,jy=()=>{if(typeof process>"u"||typeof Eu>"u")return;const e=Eu.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Uy=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&Ly(e[1]);return t&&JSON.parse(t)},ul=()=>{try{return Dy()||By()||jy()||Uy()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},$y=e=>{var t,n;return(n=(t=ul())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]},qy=e=>{const t=$y(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return t[0]==="["?[t.substring(1,n-1),r]:[t.substring(0,n),r]},Yd=()=>{var e;return(e=ul())===null||e===void 0?void 0:e.config};/** 63 * @license 64 * Copyright 2017 Google LLC 65 * 66 * Licensed under the Apache License, Version 2.0 (the "License"); 67 * you may not use this file except in compliance with the License. 68 * You may obtain a copy of the License at 69 * 70 * http://www.apache.org/licenses/LICENSE-2.0 71 * 72 * Unless required by applicable law or agreed to in writing, software 73 * distributed under the License is distributed on an "AS IS" BASIS, 74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 * See the License for the specific language governing permissions and 76 * limitations under the License. 77 */class zy{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}/** 78 * @license 79 * Copyright 2025 Google LLC 80 * 81 * Licensed under the Apache License, Version 2.0 (the "License"); 82 * you may not use this file except in compliance with the License. 83 * You may obtain a copy of the License at 84 * 85 * http://www.apache.org/licenses/LICENSE-2.0 86 * 87 * Unless required by applicable law or agreed to in writing, software 88 * distributed under the License is distributed on an "AS IS" BASIS, 89 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 90 * See the License for the specific language governing permissions and 91 * limitations under the License. 92 */function hl(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Hy(e){return(await fetch(e,{credentials:"include"})).ok}/** 93 * @license 94 * Copyright 2021 Google LLC 95 * 96 * Licensed under the Apache License, Version 2.0 (the "License");
97 * you may not use this file except in compliance with the License. 98 * You may obtain a copy of the License at 99 * 100 * http://www.apache.org/licenses/LICENSE-2.0 101 * 102 * Unless required by applicable law or agreed to in writing, software 103 * distributed under the License is distributed on an "AS IS" BASIS, 104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 105 * See the License for the specific language governing permissions and 106 * limitations under the License. 107 */function Gy(e,t){if(e.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=t||"demo-project",i=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const a=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},e);return[Ls(JSON.stringify(n)),Ls(JSON.stringify(a)),""].join(".")}const vi={};function Ky(){const e={prod:[],emulator:[]};for(const t of Object.keys(vi))vi[t]?e.emulator.push(t):e.prod.push(t);return e}function Wy(e){let t=document.getElementById(e),n=!1;return t||(t=document.createElement("div"),t.setAttribute("id",e),n=!0),{created:n,element:t}}let Tu=!1;function Qy(e,t){if(typeof window>"u"||typeof document>"u"||!hl(window.location.host)||vi[e]===t||vi[e]||Tu)return;vi[e]=t;function n(g){return`__firebase__banner__${g}`}const r="__firebase__banner",s=Ky().prod.length>0;function a(){const g=document.getElementById(r);g&&g.remove()}function l(g){g.style.display="flex",g.style.background="#7faaf0",g.style.position="fixed",g.style.bottom="5px",g.style.left="5px",g.style.padding=".5em",g.style.borderRadius="5px",g.style.alignItems="center"}function u(g,I){g.setAttribute("width","24"),g.setAttribute("id",I),g.setAttribute("height","24"),g.setAttribute("viewBox","0 0 24 24"),g.setAttribute("fill","none"),g.style.marginLeft="-6px"}function d(){const g=document.createElement("span");return g.style.cursor="pointer",g.style.marginLeft="16px",g.style.fontSize="24px",g.innerHTML=" ×",g.onclick=()=>{Tu=!0,a()},g}function f(g,I){g.setAttribute("id",I),g.innerText="Learn more",g.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",g.setAttribute("target","__blank"),g.style.paddingLeft="5px",g.style.textDecoration="underline"}function p(){const g=Wy(r),I=n("text"),R=document.getElementById(I)||document.createElement("span"),V=n("learnmore"),O=document.getElementById(V)||document.createElement("a"),B=n("preprendIcon"),j=document.getElementById(B)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(g.created){const Q=g.element;l(Q),f(O,V);const $=d();u(j,B),Q.append(j,R,O,$),document.body.appendChild(Q)}s?(R.innerText="Preview backend disconnected.",j.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 108<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 109</g> 110<defs> 111<clipPath id="clip0_6013_33858"> 112<rect width="24" height="24" fill="white"/> 113</clipPath> 114</defs>`):(j.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 115<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 116</g> 117<defs> 118<clipPath id="clip0_6083_34804"> 119<rect width="24" height="24" fill="white"/> 120</clipPath> 121</defs>`,R.innerText="Preview backend running in this workspace."),R.setAttribute("id",I)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",p):p()}/** 122 * @license 123 * Copyright 2017 Google LLC 124 * 125 * Licensed under the Apache License, Version 2.0 (the "License");
126 * you may not use this file except in compliance with the License. 127 * You may obtain a copy of the License at 128 * 129 * http://www.apache.org/licenses/LICENSE-2.0 130 * 131 * Unless required by applicable law or agreed to in writing, software 132 * distributed under the License is distributed on an "AS IS" BASIS, 133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134 * See the License for the specific language governing permissions and 135 * limitations under the License. 136 */function Jy(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Yy(){var e;const t=(e=ul())===null||e===void 0?void 0:e.forceEnvironment;if(t==="node")return!0;if(t==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function Xy(){return!Yy()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Zy(){try{return typeof indexedDB=="object"}catch{return!1}}function tv(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;t(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){t(n)}})}/** 137 * @license 138 * Copyright 2017 Google LLC 139 * 140 * Licensed under the Apache License, Version 2.0 (the "License"); 141 * you may not use this file except in compliance with the License. 142 * You may obtain a copy of the License at 143 * 144 * http://www.apache.org/licenses/LICENSE-2.0 145 * 146 * Unless required by applicable law or agreed to in writing, software 147 * distributed under the License is distributed on an "AS IS" BASIS, 148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 149 * See the License for the specific language governing permissions and 150 * limitations under the License. 151 */const ev="FirebaseError";class Fr extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=ev,Object.setPrototypeOf(this,Fr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Xd.prototype.create)}}class Xd{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},i=`${this.service}/${t}`,s=this.errors[t],a=s?nv(s,r):"Error",l=`${this.serviceName}: ${a} (${i}).`;return new Fr(i,l,r)}}function nv(e,t){return e.replace(rv,(n,r)=>{const i=t[r];return i!=null?String(i):`<${r}?>`})}const rv=/\{\$([^}]+)}/g;function Fs(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const s=e[i],a=t[i];if(Iu(s)&&Iu(a)){if(!Fs(s,a))return!1}else if(s!==a)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function Iu(e){return e!==null&&typeof e=="object"}/** 152 * @license 153 * Copyright 2021 Google LLC 154 * 155 * Licensed under the Apache License, Version 2.0 (the "License"); 156 * you may not use this file except in compliance with the License. 157 * You may obtain a copy of the License at 158 * 159 * http://www.apache.org/licenses/LICENSE-2.0 160 * 161 * Unless required by applicable law or agreed to in writing, software 162 * distributed under the License is distributed on an "AS IS" BASIS, 163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 164 * See the License for the specific language governing permissions and 165 * limitations under the License. 166 */function Pr(e){return e&&e._delegate?e._delegate:e}class Ri{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/** 167 * @license 168 * Copyright 2019 Google LLC 169 * 170 * Licensed under the Apache License, Version 2.0 (the "License"); 171 * you may not use this file except in compliance with the License. 172 * You may obtain a copy of the License at 173 * 174 * http://www.apache.org/licenses/LICENSE-2.0 175 * 176 * Unless required by applicable law or agreed to in writing, softw
176are 177 * distributed under the License is distributed on an "AS IS" BASIS, 178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 179 * See the License for the specific language governing permissions and 180 * limitations under the License. 181 */const Xn="[DEFAULT]";/** 182 * @license 183 * Copyright 2019 Google LLC 184 * 185 * Licensed under the Apache License, Version 2.0 (the "License"); 186 * you may not use this file except in compliance with the License. 187 * You may obtain a copy of the License at 188 * 189 * http://www.apache.org/licenses/LICENSE-2.0 190 * 191 * Unless required by applicable law or agreed to in writing, software 192 * distributed under the License is distributed on an "AS IS" BASIS, 193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 194 * See the License for the specific language governing permissions and 195 * limitations under the License. 196 */class iv{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new zy;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(ov(t))try{this.getOrInitializeService({instanceIdentifier:Xn})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(t=Xn){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=Xn){return this.instances.has(t)}getOptions(t=Xn){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&a.resolve(i)}return i}onInit(t,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(t),this.onInitCallbacks.set(i,s);const a=this.instances.get(i);return a&&t(a,i),()=>{s.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:sv(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=Xn){return this.component?this.component.multipleInstances?t:Xn:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function sv(e){return e===Xn?void 0:e}function ov(e){return e.instantiationMode==="EAGER"}/** 197 * @license 198 * Copyright 2019 Google LLC 199 * 200 * Licensed under the Apache License, Version 2.0 (the "License");
201 * you may not use this file except in compliance with the License. 202 * You may obtain a copy of the License at 203 * 204 * http://www.apache.org/licenses/LICENSE-2.0 205 * 206 * Unless required by applicable law or agreed to in writing, software 207 * distributed under the License is distributed on an "AS IS" BASIS, 208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 209 * See the License for the specific language governing permissions and 210 * limitations under the License. 211 */class av{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new iv(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/** 212 * @license 213 * Copyright 2017 Google LLC 214 * 215 * Licensed under the Apache License, Version 2.0 (the "License"); 216 * you may not use this file except in compliance with the License. 217 * You may obtain a copy of the License at 218 * 219 * http://www.apache.org/licenses/LICENSE-2.0 220 * 221 * Unless required by applicable law or agreed to in writing, software 222 * distributed under the License is distributed on an "AS IS" BASIS, 223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 224 * See the License for the specific language governing permissions and 225 * limitations under the License. 226 */var bt;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(bt||(bt={}));const lv={debug:bt.DEBUG,verbose:bt.VERBOSE,info:bt.INFO,warn:bt.WARN,error:bt.ERROR,silent:bt.SILENT},cv=bt.INFO,uv={[bt.DEBUG]:"log",[bt.VERBOSE]:"log",[bt.INFO]:"info",[bt.WARN]:"warn",[bt.ERROR]:"error"},hv=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=uv[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Zd{constructor(t){this.name=t,this._logLevel=cv,this._logHandler=hv,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in bt))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?lv[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,bt.DEBUG,...t),this._logHandler(this,bt.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,bt.VERBOSE,...t),this._logHandler(this,bt.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,bt.INFO,...t),this._logHandler(this,bt.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,bt.WARN,...t),this._logHandler(this,bt.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,bt.ERROR,...t),this._logHandler(this,bt.ERROR,...t)}}const dv=(e,t)=>t.some(n=>e instanceof n);let xu,Au;function fv(){return xu||(xu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function pv(){return Au||(Au=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const tf=new WeakMap,Ta=new WeakMap,ef=new WeakMap,Xo=new WeakMap,dl=new WeakMap;function mv(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(xn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",s),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&tf.set(n,e)}).catch(()=>{}),dl.set(t,e),t}function gv(e){if(Ta.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});Ta.set(e,t)}let Ia={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ta.get(e);if(t==="objectStoreNames")return e.objectStoreNames||ef.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return xn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};
226function yv(e){Ia=e(Ia)}function vv(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Zo(this),t,...n);return ef.set(r,t.sort?t.sort():[t]),xn(r)}:pv().includes(e)?function(...t){return e.apply(Zo(this),t),xn(tf.get(this))}:function(...t){return xn(e.apply(Zo(this),t))}}function _v(e){return typeof e=="function"?vv(e):(e instanceof IDBTransaction&&gv(e),dv(e,fv())?new Proxy(e,Ia):e)}function xn(e){if(e instanceof IDBRequest)return mv(e);if(Xo.has(e))return Xo.get(e);const t=_v(e);return t!==e&&(Xo.set(e,t),dl.set(t,e)),t}const Zo=e=>dl.get(e);function bv(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const a=indexedDB.open(e,t),l=xn(a);return r&&a.addEventListener("upgradeneeded",u=>{r(xn(a.result),u.oldVersion,u.newVersion,xn(a.transaction),u)}),n&&a.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),l.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const wv=["get","getKey","getAll","getAllKeys","count"],Ev=["put","add","delete","clear"],ta=new Map;function Su(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ta.get(t))return ta.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Ev.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||wv.includes(n)))return;const s=async function(a,...l){const u=this.transaction(a,i?"readwrite":"readonly");let d=u.store;return r&&(d=d.index(l.shift())),(await Promise.all([d[n](...l),i&&u.done]))[0]};return ta.set(t,s),s}yv(e=>({...e,get:(t,n,r)=>Su(t,n)||e.get(t,n,r),has:(t,n)=>!!Su(t,n)||e.has(t,n)}));/** 227 * @license 228 * Copyright 2019 Google LLC 229 * 230 * Licensed under the Apache License, Version 2.0 (the "License"); 231 * you may not use this file except in compliance with the License. 232 * You may obtain a copy of the License at 233 * 234 * http://www.apache.org/licenses/LICENSE-2.0 235 * 236 * Unless required by applicable law or agreed to in writing, software 237 * distributed under the License is distributed on an "AS IS" BASIS, 238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 239 * See the License for the specific language governing permissions and 240 * limitations under the License. 241 */class Tv{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Iv(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Iv(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const xa="@firebase/app",Cu="0.13.2";/** 242 * @license 243 * Copyright 2019 Google LLC 244 * 245 * Licensed under the Apache License, Version 2.0 (the "License"); 246 * you may not use this file except in compliance with the License. 247 * You may obtain a copy of the License at 248 * 249 * http://www.apache.org/licenses/LICENSE-2.0 250 * 251 * Unless required by applicable law or agreed to in writing, software 252 * distributed under the License is distributed on an "AS IS" BASIS, 253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 254 * See the License for the specific language governing permissions and 255 * limitations under the License. 256 */const ln=new Zd("@firebase/app"),xv="@firebase/app-compat",Av="@firebase/analytics-compat",Sv="@firebase/analytics",Cv="@firebase/app-check-compat",Rv="@firebase/app-check",Pv="@firebase/auth",Vv="@firebase/auth-compat",kv="@firebase/database",Dv="@firebase/data-connect",Nv="@firebase/database-compat",Ov="@firebase/functions",Mv="@firebase/functions-compat",Lv="@firebase/installations",Fv="@firebase/installations-compat",Bv="@firebase/messaging",jv="@firebase/messaging-compat",Uv="@firebase/performance",$v="@firebase/performance-compat",qv="@firebase/remote-config",zv="@firebase/remote-config-compat",Hv="@firebase/storage",Gv="@firebase/storage-compat",Kv="@firebase/firestore",Wv="@firebase/ai",Qv="@firebase/firestore-compat",Jv="firebase",Yv="11.10.0";/** 257 * @license 258 * Copyright 2019 Google LLC 259 * 260 * Licensed under the Apache License, Version 2.0 (the "License");
261 * you may not use this file except in compliance with the License. 262 * You may obtain a copy of the License at 263 * 264 * http://www.apache.org/licenses/LICENSE-2.0 265 * 266 * Unless required by applicable law or agreed to in writing, software 267 * distributed under the License is distributed on an "AS IS" BASIS, 268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 269 * See the License for the specific language governing permissions and 270 * limitations under the License. 271 */const Aa="[DEFAULT]",Xv={[xa]:"fire-core",[xv]:"fire-core-compat",[Sv]:"fire-analytics",[Av]:"fire-analytics-compat",[Rv]:"fire-app-check",[Cv]:"fire-app-check-compat",[Pv]:"fire-auth",[Vv]:"fire-auth-compat",[kv]:"fire-rtdb",[Dv]:"fire-data-connect",[Nv]:"fire-rtdb-compat",[Ov]:"fire-fn",[Mv]:"fire-fn-compat",[Lv]:"fire-iid",[Fv]:"fire-iid-compat",[Bv]:"fire-fcm",[jv]:"fire-fcm-compat",[Uv]:"fire-perf",[$v]:"fire-perf-compat",[qv]:"fire-rc",[zv]:"fire-rc-compat",[Hv]:"fire-gcs",[Gv]:"fire-gcs-compat",[Kv]:"fire-fst",[Qv]:"fire-fst-compat",[Wv]:"fire-vertex","fire-js":"fire-js",[Jv]:"fire-js-all"};/** 272 * @license 273 * Copyright 2019 Google LLC 274 * 275 * Licensed under the Apache License, Version 2.0 (the "License"); 276 * you may not use this file except in compliance with the License. 277 * You may obtain a copy of the License at 278 * 279 * http://www.apache.org/licenses/LICENSE-2.0 280 * 281 * Unless required by applicable law or agreed to in writing, software 282 * distributed under the License is distributed on an "AS IS" BASIS, 283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 284 * See the License for the specific language governing permissions and 285 * limitations under the License. 286 */const Bs=new Map,Zv=new Map,Sa=new Map;function Ru(e,t){try{e.container.addComponent(t)}catch(n){ln.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function js(e){const t=e.name;if(Sa.has(t))return ln.debug(`There were multiple attempts to register component ${t}.`),!1;Sa.set(t,e);for(const n of Bs.values())Ru(n,e);for(const n of Zv.values())Ru(n,e);return!0}function t_(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function e_(e){return e==null?!1:e.settings!==void 0}/** 287 * @license 288 * Copyright 2019 Google LLC 289 * 290 * Licensed under the Apache License, Version 2.0 (the "License"); 291 * you may not use this file except in compliance with the License. 292 * You may obtain a copy of the License at 293 * 294 * http://www.apache.org/licenses/LICENSE-2.0 295 * 296 * Unless required by applicable law or agreed to in writing, software 297 * distributed under the License is distributed on an "AS IS" BASIS, 298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 299 * See the License for the specific language governing permissions and 300 * limitations under the License. 301 */const n_={"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","server-app-deleted":"Firebase Server App has been 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.","invali
301d-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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},An=new Xd("app","Firebase",n_);/** 302 * @license 303 * Copyright 2019 Google LLC 304 * 305 * Licensed under the Apache License, Version 2.0 (the "License"); 306 * you may not use this file except in compliance with the License. 307 * You may obtain a copy of the License at 308 * 309 * http://www.apache.org/licenses/LICENSE-2.0 310 * 311 * Unless required by applicable law or agreed to in writing, software 312 * distributed under the License is distributed on an "AS IS" BASIS, 313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 314 * See the License for the specific language governing permissions and 315 * limitations under the License. 316 */class r_{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Ri("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw An.create("app-deleted",{appName:this._name})}}/** 317 * @license 318 * Copyright 2019 Google LLC 319 * 320 * Licensed under the Apache License, Version 2.0 (the "License"); 321 * you may not use this file except in compliance with the License. 322 * You may obtain a copy of the License at 323 * 324 * http://www.apache.org/licenses/LICENSE-2.0 325 * 326 * Unless required by applicable law or agreed to in writing, software 327 * distributed under the License is distributed on an "AS IS" BASIS, 328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 329 * See the License for the specific language governing permissions and 330 * limitations under the License. 331 */const i_=Yv;function nf(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Aa,automaticDataCollectionEnabled:!0},t),i=r.name;if(typeof i!="string"||!i)throw An.create("bad-app-name",{appName:String(i)});if(n||(n=Yd()),!n)throw An.create("no-options");const s=Bs.get(i);if(s){if(Fs(n,s.options)&&Fs(r,s.config))return s;throw An.create("duplicate-app",{appName:i})}const a=new av(i);for(const u of Sa.values())a.addComponent(u);const l=new r_(n,r,a);return Bs.set(i,l),l}function s_(e=Aa){const t=Bs.get(e);if(!t&&e===Aa&&Yd())return nf();if(!t)throw An.create("no-app",{appName:e});return t}function xr(e,t,n){var r;let i=(r=Xv[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const s=i.match(/\s|\//),a=t.match(/\s|\//);if(s||a){const l=[`Unable to register library "${i}" with version "${t}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&l.push("and"),a&&l.push(`version name "${t}" contains illegal characters (whitespace or "/")`),ln.warn(l.join(" "));return}js(new Ri(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}/** 332 * @license 333 * Copyright 2021 Google LLC 334 * 335 * Licensed under the Apache License, Version 2.0 (the "License"); 336 * you may not use this file except in compliance with the License. 337 * You may obtain a copy of the License at 338 * 339 * http://www.apache.org/licenses/LICENSE-2.0 340 * 341 * Unless required by applicable law or agreed to in writing, softw
341are 342 * distributed under the License is distributed on an "AS IS" BASIS, 343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 344 * See the License for the specific language governing permissions and 345 * limitations under the License. 346 */const o_="firebase-heartbeat-database",a_=1,Pi="firebase-heartbeat-store";let ea=null;function rf(){return ea||(ea=bv(o_,a_,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(Pi)}catch(n){console.warn(n)}}}}).catch(e=>{throw An.create("idb-open",{originalErrorMessage:e.message})})),ea}async function l_(e){try{const n=(await rf()).transaction(Pi),r=await n.objectStore(Pi).get(sf(e));return await n.done,r}catch(t){if(t instanceof Fr)ln.warn(t.message);else{const n=An.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});ln.warn(n.message)}}}async function Pu(e,t){try{const r=(await rf()).transaction(Pi,"readwrite");await r.objectStore(Pi).put(t,sf(e)),await r.done}catch(n){if(n instanceof Fr)ln.warn(n.message);else{const r=An.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});ln.warn(r.message)}}}function sf(e){return`${e.name}!${e.options.appId}`}/** 347 * @license 348 * Copyright 2021 Google LLC 349 * 350 * Licensed under the Apache License, Version 2.0 (the "License"); 351 * you may not use this file except in compliance with the License. 352 * You may obtain a copy of the License at 353 * 354 * http://www.apache.org/licenses/LICENSE-2.0 355 * 356 * Unless required by applicable law or agreed to in writing, software 357 * distributed under the License is distributed on an "AS IS" BASIS, 358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 359 * See the License for the specific language governing permissions and 360 * limitations under the License. 361 */const c_=1024,u_=30;class h_{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new f_(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var t,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Vu();if(((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(a=>a.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats.length>u_){const a=p_(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(a,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){ln.warn(r)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=Vu(),{heartbeatsToSend:r,unsentEntries:i}=d_(this._heartbeatsCache.heartbeats),s=Ls(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return ln.warn(n),""}}}function Vu(){return new Date().toISOString().substring(0,10)}function d_(e,t=c_){const n=[];let r=e.slice();for(const i of e){const s=n.find(a=>a.agent===i.agent);if(s){if(s.dates.push(i.date),ku(n)>t){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),ku(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class f_{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Zy()?tv().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await l_(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Pu(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Pu(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return}}function ku(e){return Ls(JSON.stringify({version:2,heartbeats:e})).length}function p_(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}/** 362 * @license 363 * Copyright 2019 Google LLC 364 * 365 * Licensed under the Apache License, Version 2.0 (the "License");
366 * you may not use this file except in compliance with the License. 367 * You may obtain a copy of the License at 368 * 369 * http://www.apache.org/licenses/LICENSE-2.0 370 * 371 * Unless required by applicable law or agreed to in writing, software 372 * distributed under the License is distributed on an "AS IS" BASIS, 373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 374 * See the License for the specific language governing permissions and 375 * limitations under the License. 376 */function m_(e){js(new Ri("platform-logger",t=>new Tv(t),"PRIVATE")),js(new Ri("heartbeat",t=>new h_(t),"PRIVATE")),xr(xa,Cu,e),xr(xa,Cu,"esm2017"),xr("fire-js","")}m_("");var Du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 377Copyright The Closure Library Authors. 378SPDX-License-Identifier: Apache-2.0 379*/var Sn,of;(function(){var e;/** @license 380 381 Copyright The Closure Library Authors. 382 SPDX-License-Identifier: Apache-2.0 383*/function t(x,_){function v(){}v.prototype=_.prototype,x.D=_.prototype,x.prototype=new v,x.prototype.constructor=x,x.C=function(T,w,b){for(var y=Array(arguments.length-2),et=2;et<arguments.length;et++)y[et-2]=arguments[et];return _.prototype[w].apply(T,y)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}t(r,n),r.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(x,_,v){v||(v=0);var T=Array(16);if(typeof _=="string")for(var w=0;16>w;++w)T[w]=_.charCodeAt(v++)|_.charCodeAt(v++)<<8|_.charCodeAt(v++)<<16|_.charCodeAt(v++)<<24;else for(w=0;16>w;++w)T[w]=_[v++]|_[v++]<<8|_[v++]<<16|_[v++]<<24;_=x.g[0],v=x.g[1],w=x.g[2];var b=x.g[3],y=_+(b^v&(w^b))+T[0]+3614090360&4294967295;_=v+(y<<7&4294967295|y>>>25),y=b+(w^_&(v^w))+T[1]+3905402710&4294967295,b=_+(y<<12&4294967295|y>>>20),y=w+(v^b&(_^v))+T[2]+606105819&4294967295,w=b+(y<<17&4294967295|y>>>15),y=v+(_^w&(b^_))+T[3]+3250441966&4294967295,v=w+(y<<22&4294967295|y>>>10),y=_+(b^v&(w^b))+T[4]+4118548399&4294967295,_=v+(y<<7&4294967295|y>>>25),y=b+(w^_&(v^w))+T[5]+1200080426&4294967295,b=_+(y<<12&4294967295|y>>>20),y=w+(v^b&(_^v))+T[6]+2821735955&4294967295,w=b+(y<<17&4294967295|y>>>15),y=v+(_^w&(b^_))+T[7]+4249261313&4294967295,v=w+(y<<22&4294967295|y>>>10),y=_+(b^v&(w^b))+T[8]+1770035416&4294967295,_=v+(y<<7&4294967295|y>>>25),y=b+(w^_&(v^w))+T[9]+2336552879&4294967295,b=_+(y<<12&4294967295|y>>>20),y=w+(v^b&(_^v))+T[10]+4294925233&4294967295,w=b+(y<<17&4294967295|y>>>15),y=v+(_^w&(b^_))+T[11]+2304563134&4294967295,v=w+(y<<22&4294967295|y>>>10),y=_+(b^v&(w^b))+T[12]+1804603682&4294967295,_=v+(y<<7&4294967295|y>>>25),y=b+(w^_&(v^w))+T[13]+4254626195&4294967295,b=_+(y<<12&4294967295|y>>>20),y=w+(v^b&(_^v))+T[14]+2792965006&4294967295,w=b+(y<<17&4294967295|y>>>15),y=v+(_^w&(b^_))+T[15]+1236535329&4294967295,v=w+(y<<22&4294967295|y>>>10),y=_+(w^b&(v^w))+T[1]+4129170786&4294967295,_=v+(y<<5&4294967295|y>>>27),y=b+(v^w&(_^v))+T[6]+3225465664&4294967295,b=_+(y<<9&4294967295|y>>>23),y=w+(_^v&(b^_))+T[11]+643717713&4294967295,w=b+(y<<14&4294967295|y>>>18),y=v+(b^_&(w^b))+T[0]+3921069994&4294967295,v=w+(y<<20&4294967295|y>>>12),y=_+(w^b&(v^w))+T[5]+3593408605&4294967295,_=v+(y<<5&4294967295|y>>>27),y=b+(v^w&(_^v))+T[10]+38016083&4294967295,b=_+(y<<9&4294967295|y>>>23),y=w+(_^v&(b^_))+T[15]+3634488961&4294967295,w=b+(y<<14&4294967295|y>>>18),y=v+(b^_&(w^b))+T[4]+3889429448&4294967295,v=w+(y<<20&4294967295|y>>>12),y=_+(w^b&(v^w))+T[9]+568446438&4294967295,_=v+(y<<5&4294967295|y>>>27),y=b+(v^w&(_^v))+T[14]+3275163606&4294967295,b=_+(y<<9&4294967295|y>>>23),y=w+(_^v&(b^_))+T[3]+4107603335&4294967295,w=b+(y<<14&4294967295|y>>>18),y=v+(b^_&(w^b))+T[8]+1163531501&4294967295,v=w+(y<<20&4294967295|y>>>12),y=_+(w^b&(v^w))+T[13]+2850285829&4294967295,_=v+(y<<5&4294967295|y>>>27),y=b+(v^w&(_^v))+T[2]+4243563512&4294967295,b=_+(y<<9&4294967295|y>>>23),y=w+(_^v&(b^_))+T[7]+1735328473&4294967295,w=b+(y<<14&4294967295|y>>>18),y=v+(b^_&(w^b))+T[12]+2368359562&4294967295,v=w+(y<<20&4294967295|y>>>12),y=_+(v^w^b)+T[5]+4294588738&4294967295,_=v+(y<<4&4294967295|y>>>28),y=b+(_^v^w)+T[8]+2272392833&4294967295,b=_+(y<<11&4294967295|y>>>21),y=w+(b^_^v)+T[11]+1839030562&4294967295,w=b+(y<<16&4294967295|y>>>16),y=v+(w^b^_)+T[14]+4259657740&4294967295,v=w+(y<<23&4294967295|y>>>9),y=_+(v^w^b)+T[1]+2763975236&4294967295,_=v+(y<<4&4294967295|y>>>28),y=b+(_^v^w)+T[4]+1272893353&4294967295,b=_+(y<<11&4294967295|y>>>21),y=w+(b^_^v)+T[7]+4139469664&4294967295,w=b+(y<<16&4294967295|y>>>16),y=v+(w^b^_)+T[10]+3200236656&4294967295,v=w+(y<<23&4294967295|y>>>9),y=_+(v^w^b)+T[13]+681279174&4294967295,_=v+(y<<4&4294967295|y>>>28),y=b+(_^v^w)+T[0]+3936430074&4294967295,b=_+(y<<11&4294967295|y>>>21),y=w+(b^_^v)+T[3]+3572445317&4294967295,w=b+(y<<16&4294967295|y>>>16),y=v+(w^b^_)+T[6]+76029189&4294967295,v=w+(y<<23&4294967295|y>>>9),y=_+(v^w^b)+T[9]+3654602809&4294967295,_=v+(y<<4&4294967295|y>>>28),y=b+(_^v^w)+T[12]+3873151461&4294967295,b=_+(y<<11&4294967295|y>>>21),y=w+(b^_^v)+T[15]+530742520&4294967295,w=b+(y<<16&4294967295|y>>>16),y=v+(w^b^_)+T[2]+3299628645&4294967295,v=w+(y<<23&4294967295|y>>>9),y=_+(w^(v|~b))+T[0]+4096336452&4294967295,_=v+(y<<6&4294967295|y>>>26),y=b+(v^(_|~w))+T[7]+1126891415&4294967295,b=_+(y<<10&4294967295|y>>>22),y=w+(_^(b|~v))+T[14]+2878612391&4294967295,w=b+(y<<15&4294967295|y>>>17),y=v+(b^(w|~_))+T[5]+4237533241&4294967295,v=w+(y<<21&4294967295|y>>>11),y=_+(w^(v|~b))+T[12]+1700485571&4294967295,_=v+(y<<6&4294967295|y>>>26),y=b+(v^(_|~w))+T[3]+2399980690&4294967295,b=_+(y<<10&4294967295|y>>>22),y=w+(_^(b|~v))+T[10]+4293915773&4294967295,w=b+(y<<15&4294967295|y>>>17),y=v+(b^(w|~_))+T[1]+2240044497&4294967295,v=w+(y<<21&4294967295|y>>>11),y=_+(w^(v|~b))+T[8]+1873313359&4294967295,_=v+(y<<6&4294967295|y>>>26),y=b+(v^(_|~w))+T[15]+4264355552&4294967295,b=_+(y<<10&4294967295|y>>>22),y=w+(_^(b|~v))+T[6]+2734768916&4294967295,w=b+(y<<15&4294967295|y>>>17),y=v+(b^(w|~_))+T[13]+1309151649&4294967295,v=w+(y<<21&4294967295|y>>>11),y=_+(w^(v|~b))+T[4]+4149444226&4294967295,_=v+(y<<6&4294967295|y>>>26),y=b+(v^(_|~w))+T[11]+3174756917&4294967295,b=_+(y<<10&4294967295|y>>>22),y=w+(_^(b|~v))+T[2]+718787259&4294967295,w=b+(y<<15&4294967295|y>>>17),y=v+(b^(w|~_))+T[9]+3951481745&4294967295,x.g[0]=x.g[0]+_&4294967295,x.g[1]=x.g[1]+(w+(y<<21&4294967295|y>>>11))&4294967295,x.g[2]=x.g[2]+w&4294967295,x.g[3]=x.g[3]+b&4294967295}r.prototype.u=function(x,_){_===void 0&&(_=x.length);for(var v=_-this.blockSize,T=this.B,w=this.h,b=0;b<_;){if(w==0)for(;b<=v;)i(this,x,b),b+=this.blockSize;
vendor: 7,101 bytes, lines 383-390
383if(typeof x=="string"){for(;b<_;)if(T[w++]=x.charCodeAt(b++),w==this.blockSize){i(this,T),w=0;break}}else for(;b<_;)if(T[w++]=x[b++],w==this.blockSize){i(this,T),w=0;break}}this.h=w,this.o+=_},r.prototype.v=function(){var x=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);x[0]=128;for(var _=1;_<x.length-8;++_)x[_]=0;var v=8*this.o;for(_=x.length-8;_<x.length;++_)x[_]=v&255,v/=256;for(this.u(x),x=Array(16),_=v=0;4>_;++_)for(var T=0;32>T;T+=8)x[v++]=this.g[_]>>>T&255;return x};function s(x,_){var v=l;return Object.prototype.hasOwnProperty.call(v,x)?v[x]:v[x]=_(x)}function a(x,_){this.h=_;for(var v=[],T=!0,w=x.length-1;0<=w;w--){var b=x[w]|0;T&&b==_||(v[w]=b,T=!1)}this.g=v}var l={};function u(x){return-128<=x&&128>x?s(x,function(_){return new a([_|0],0>_?-1:0)}):new a([x|0],0>x?-1:0)}function d(x){if(isNaN(x)||!isFinite(x))return p;if(0>x)return O(d(-x));for(var _=[],v=1,T=0;x>=v;T++)_[T]=x/v|0,v*=4294967296;return new a(_,0)}function f(x,_){if(x.length==0)throw Error("number format error: empty string");if(_=_||10,2>_||36<_)throw Error("radix out of range: "+_);if(x.charAt(0)=="-")return O(f(x.substring(1),_));if(0<=x.indexOf("-"))throw Error('number format error: interior "-" character');for(var v=d(Math.pow(_,8)),T=p,w=0;w<x.length;w+=8){var b=Math.min(8,x.length-w),y=parseInt(x.substring(w,w+b),_);8>b?(b=d(Math.pow(_,b)),T=T.j(b).add(d(y))):(T=T.j(v),T=T.add(d(y)))}return T}var p=u(0),g=u(1),I=u(16777216);e=a.prototype,e.m=function(){if(V(this))return-O(this).m();for(var x=0,_=1,v=0;v<this.g.length;v++){var T=this.i(v);x+=(0<=T?T:4294967296+T)*_,_*=4294967296}return x},e.toString=function(x){if(x=x||10,2>x||36<x)throw Error("radix out of range: "+x);if(R(this))return"0";if(V(this))return"-"+O(this).toString(x);for(var _=d(Math.pow(x,6)),v=this,T="";;){var w=$(v,_).g;v=B(v,w.j(_));var b=((0<v.g.length?v.g[0]:v.h)>>>0).toString(x);if(v=w,R(v))return b+T;for(;6>b.length;)b="0"+b;T=b+T}},e.i=function(x){return 0>x?0:x<this.g.length?this.g[x]:this.h};function R(x){if(x.h!=0)return!1;for(var _=0;_<x.g.length;_++)if(x.g[_]!=0)return!1;return!0}function V(x){return x.h==-1}e.l=function(x){return x=B(this,x),V(x)?-1:R(x)?0:1};function O(x){for(var _=x.g.length,v=[],T=0;T<_;T++)v[T]=~x.g[T];return new a(v,~x.h).add(g)}e.abs=function(){return V(this)?O(this):this},e.add=function(x){for(var _=Math.max(this.g.length,x.g.length),v=[],T=0,w=0;w<=_;w++){var b=T+(this.i(w)&65535)+(x.i(w)&65535),y=(b>>>16)+(this.i(w)>>>16)+(x.i(w)>>>16);T=y>>>16,b&=65535,y&=65535,v[w]=y<<16|b}return new a(v,v[v.length-1]&-2147483648?-1:0)};function B(x,_){return x.add(O(_))}e.j=function(x){if(R(this)||R(x))return p;if(V(this))return V(x)?O(this).j(O(x)):O(O(this).j(x));if(V(x))return O(this.j(O(x)));if(0>this.l(I)&&0>x.l(I))return d(this.m()*x.m());for(var _=this.g.length+x.g.length,v=[],T=0;T<2*_;T++)v[T]=0;for(T=0;T<this.g.length;T++)for(var w=0;w<x.g.length;w++){var b=this.i(T)>>>16,y=this.i(T)&65535,et=x.i(w)>>>16,Y=x.i(w)&65535;v[2*T+2*w]+=y*Y,j(v,2*T+2*w),v[2*T+2*w+1]+=b*Y,j(v,2*T+2*w+1),v[2*T+2*w+1]+=y*et,j(v,2*T+2*w+1),v[2*T+2*w+2]+=b*et,j(v,2*T+2*w+2)}for(T=0;T<_;T++)v[T]=v[2*T+1]<<16|v[2*T];for(T=_;T<2*_;T++)v[T]=0;return new a(v,0)};function j(x,_){for(;(x[_]&65535)!=x[_];)x[_+1]+=x[_]>>>16,x[_]&=65535,_++}function Q(x,_){this.g=x,this.h=_}function $(x,_){if(R(_))throw Error("division by zero");if(R(x))return new Q(p,p);if(V(x))return _=$(O(x),_),new Q(O(_.g),O(_.h));if(V(_))return _=$(x,O(_)),new Q(O(_.g),_.h);if(30<x.g.length){if(V(x)||V(_))throw Error("slowDivide_ only works with positive integers.");for(var v=g,T=_;0>=T.l(x);)v=ut(v),T=ut(T);var w=gt(v,1),b=gt(T,1);for(T=gt(T,2),v=gt(v,2);!R(T);){var y=b.add(T);0>=y.l(x)&&(w=w.add(v),b=y),T=gt(T,1),v=gt(v,1)}return _=B(x,w.j(_)),new Q(w,_)}for(w=p;0<=x.l(_);){for(v=Math.max(1,Math.floor(x.m()/_.m())),T=Math.ceil(Math.log(v)/Math.LN2),T=48>=T?1:Math.pow(2,T-48),b=d(v),y=b.j(_);V(y)||0<y.l(x);)v-=T,b=d(v),y=b.j(_);R(b)&&(b=g),w=w.add(b),x=B(x,y)}return new Q(w,x)}e.A=function(x){return $(this,x).h},e.and=function(x){for(var _=Math.max(this.g.length,x.g.length),v=[],T=0;T<_;T++)v[T]=this.i(T)&x.i(T);return new a(v,this.h&x.h)},e.or=function(x){for(var _=Math.max(this.g.length,x.g.length),v=[],T=0;T<_;T++)v[T]=this.i(T)|x.i(T);return new a(v,this.h|x.h)},e.xor=function(x){for(var _=Math.max(this.g.length,x.g.length),v=[],T=0;T<_;T++)v[T]=this.i(T)^x.i(T);return new a(v,this.h^x.h)};function ut(x){for(var _=x.g.length+1,v=[],T=0;T<_;T++)v[T]=x.i(T)<<1|x.i(T-1)>>>31;return new a(v,x.h)}function gt(x,_){var v=_>>5;_%=32;for(var T=x.g.length-v,w=[],b=0;b<T;b++)w[b]=0<_?x.i(b+v)>>>_|x.i(b+v+1)<<32-_:x.i(b+v);return new a(w,x.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,of=r,a.prototype.add=a.prototype.add,a.prototype.multiply=a.prototype.j,a.prototype.modulo=a.prototype.A,a.prototype.compare=a.prototype.l,a.prototype.toNumber=a.prototype.m,a.prototype.toString=a.prototype.toString,a.prototype.getBits=a.prototype.i,a.fromNumber=d,a.fromString=f,Sn=a}).apply(typeof Du<"u"?Du:typeof self<"u"?self:typeof window<"u"?window:{});var ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 384Copyright The Closure Library Authors. 385SPDX-License-Identifier: Apache-2.0 386*/var af,ai,lf,Ts,Ca,cf,uf,hf;(function(){var e,t=typeof Object.defineProperties=="function"?Object.defineProperty:function(o,c,h){return o==Array.prototype||o==Object.prototype||(o[c]=h.value),o};function n(o){o=[typeof globalThis=="object"&&globalThis,o,typeof window=="object"&&window,typeof self=="object"&&self,typeof ds=="object"&&ds];for(var c=0;c<o.length;++c){var h=o[c];if(h&&h.Math==Math)return h}throw Error("Cannot find global object")}var r=n(this);function i(o,c){if(c)t:{var h=r;o=o.split(".");for(var m=0;m<o.length-1;m++){var S=o[m];if(!(S in h))break t;h=h[S]}o=o[o.length-1],m=h[o],c=c(m),c!=m&&c!=null&&t(h,o,{configurable:!0,writable:!0,value:c})}}function s(o,c){o instanceof String&&(o+="");var h=0,m=!1,S={next:function(){if(!m&&h<o.length){var C=h++;return{value:c(C,o[C]),done:!1}}return m=!0,{done:!0,value:void 0}}};return S[Symbol.iterator]=function(){return S},S}i("Array.prototype.values",function(o){return o||function(){return s(this,function(c,h){return h})}});/** @license 387 388 Copyright The Closure Library Authors. 389 SPDX-License-Identifier: Apache-2.0 390*/var a=a||{},l=this||self;function u(o){var c=typeof o;return c=c!="object"?c:o?Array.isArray(o)?"array":c:"null",c=="array"||c=="object"&&typeof o.length=="number"}function d(o){var c=typeof o;return c=="object"&&o!=null||c=="function"}function f(o,c,h){return o.call.apply(o.bind,arguments)}function p(o,c,h){if(!o)throw Error();if(2<arguments.length){var m=Array.prototype.slice.call(arguments,2);return function(){var S=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(S,m),o.apply(c,S)}}return function(){return o.apply(c,arguments)}}function g(o,c,h){return g=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?f:p,g.apply(null,arguments)}
390function I(o,c){var h=Array.prototype.slice.call(arguments,1);return function(){var m=h.slice();return m.push.apply(m,arguments),o.apply(this,m)}}function R(o,c){function h(){}h.prototype=c.prototype,o.aa=c.prototype,o.prototype=new h,o.prototype.constructor=o,o.Qb=function(m,S,C){for(var z=Array(arguments.length-2),St=2;St<arguments.length;St++)z[St-2]=arguments[St];return c.prototype[S].apply(m,z)}}function V(o){const c=o.length;if(0<c){const h=Array(c);for(let m=0;m<c;m++)h[m]=o[m];return h}return[]}function O(o,c){for(let h=1;h<arguments.length;h++){const m=arguments[h];if(u(m)){const S=o.length||0,C=m.length||0;o.length=S+C;for(let z=0;z<C;z++)o[S+z]=m[z]}else o.push(m)}}class B{constructor(c,h){this.i=c,this.j=h,this.h=0,this.g=null}get(){let c;return 0<this.h?(this.h--,c=this.g,this.g=c.next,c.next=null):c=this.i(),c}}function j(o){return/^[\s\xa0]*$/.test(o)}function Q(){var o=l.navigator;return o&&(o=o.userAgent)?o:""}function $(o){return $[" "](o),o}$[" "]=function(){};var ut=Q().indexOf("Gecko")!=-1&&!(Q().toLowerCase().indexOf("webkit")!=-1&&Q().indexOf("Edge")==-1)&&!(Q().indexOf("Trident")!=-1||Q().indexOf("MSIE")!=-1)&&Q().indexOf("Edge")==-1;function gt(o,c,h){for(const m in o)c.call(h,o[m],m,o)}function x(o,c){for(const h in o)c.call(void 0,o[h],h,o)}function _(o){const c={};for(const h in o)c[h]=o[h];return c}const v="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function T(o,c){let h,m;for(let S=1;S<arguments.length;S++){m=arguments[S];for(h in m)o[h]=m[h];for(let C=0;C<v.length;C++)h=v[C],Object.prototype.hasOwnProperty.call(m,h)&&(o[h]=m[h])}}function w(o){var c=1;o=o.split(":");const h=[];for(;0<c&&o.length;)h.push(o.shift()),c--;return o.length&&h.push(o.join(":")),h}function b(o){l.setTimeout(()=>{throw o},0)}function y(){var o=ie;let c=null;return o.g&&(c=o.g,o.g=o.g.next,o.g||(o.h=null),c.next=null),c}class et{constructor(){this.h=this.g=null}add(c,h){const m=Y.get();m.set(c,h),this.h?this.h.next=m:this.g=m,this.h=m}}var Y=new B(()=>new pt,o=>o.reset());class pt{constructor(){this.next=this.g=this.h=null}set(c,h){this.h=c,this.g=h,this.next=null}reset(){this.next=this.g=this.h=null}}let ht,dt=!1,ie=new et,Bt=()=>{const o=l.Promise.resolve(void 0);ht=()=>{o.then(jt)}};var jt=()=>{for(var o;o=y();){try{o.h.call(o.g)}catch(h){b(h)}var c=Y;c.j(o),100>c.h&&(c.h++,o.next=c.g,c.g=o)}dt=!1};function Nt(){this.s=this.s,this.C=this.C}Nt.prototype.s=!1,Nt.prototype.ma=function(){this.s||(this.s=!0,this.N())},Nt.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function Ot(o,c){this.type=o,this.g=this.target=c,this.defaultPrevented=!1}Ot.prototype.h=function(){this.defaultPrevented=!0};var xo=(function(){if(!l.addEventListener||!Object.defineProperty)return!1;var o=!1,c=Object.defineProperty({},"passive",{get:function(){o=!0}});try{const h=()=>{};l.addEventListener("test",h,c),l.removeEventListener("test",h,c)}catch{}return o})();function Un(o,c){if(Ot.call(this,o?o.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,o){var h=this.type=o.type,m=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:null;if(this.target=o.target||o.srcElement,this.g=c,c=o.relatedTarget){if(ut){t:{try{$(c.nodeName);var S=!0;break t}catch{}S=!1}
vendor: 35,989 bytes, lines 390-402
390S||(c=null)}}else h=="mouseover"?c=o.fromElement:h=="mouseout"&&(c=o.toElement);this.relatedTarget=c,m?(this.clientX=m.clientX!==void 0?m.clientX:m.pageX,this.clientY=m.clientY!==void 0?m.clientY:m.pageY,this.screenX=m.screenX||0,this.screenY=m.screenY||0):(this.clientX=o.clientX!==void 0?o.clientX:o.pageX,this.clientY=o.clientY!==void 0?o.clientY:o.pageY,this.screenX=o.screenX||0,this.screenY=o.screenY||0),this.button=o.button,this.key=o.key||"",this.ctrlKey=o.ctrlKey,this.altKey=o.altKey,this.shiftKey=o.shiftKey,this.metaKey=o.metaKey,this.pointerId=o.pointerId||0,this.pointerType=typeof o.pointerType=="string"?o.pointerType:$n[o.pointerType]||"",this.state=o.state,this.i=o,o.defaultPrevented&&Un.aa.h.call(this)}}R(Un,Ot);var $n={2:"touch",3:"pen",4:"mouse"};Un.prototype.h=function(){Un.aa.h.call(this);var o=this.i;o.preventDefault?o.preventDefault():o.returnValue=!1};var Ye="closure_listenable_"+(1e6*Math.random()|0),qr=0;function Hi(o,c,h,m,S){this.listener=o,this.proxy=null,this.src=c,this.type=h,this.capture=!!m,this.ha=S,this.key=++qr,this.da=this.fa=!1}function Be(o){o.da=!0,o.listener=null,o.proxy=null,o.src=null,o.ha=null}function zr(o){this.src=o,this.g={},this.h=0}zr.prototype.add=function(o,c,h,m,S){var C=o.toString();o=this.g[C],o||(o=this.g[C]=[],this.h++);var z=A(o,c,m,S);return-1<z?(c=o[z],h||(c.fa=!1)):(c=new Hi(c,this.src,C,!!m,S),c.fa=h,o.push(c)),c};function E(o,c){var h=c.type;if(h in o.g){var m=o.g[h],S=Array.prototype.indexOf.call(m,c,void 0),C;(C=0<=S)&&Array.prototype.splice.call(m,S,1),C&&(Be(c),o.g[h].length==0&&(delete o.g[h],o.h--))}}function A(o,c,h,m){for(var S=0;S<o.length;++S){var C=o[S];if(!C.da&&C.listener==c&&C.capture==!!h&&C.ha==m)return S}return-1}var P="closure_lm_"+(1e6*Math.random()|0),L={};function N(o,c,h,m,S){if(Array.isArray(c)){for(var C=0;C<c.length;C++)N(o,c[C],h,m,S);return null}return h=it(h),o&&o[Ye]?o.K(c,h,d(m)?!!m.capture:!1,S):M(o,c,h,!1,m,S)}function M(o,c,h,m,S,C){if(!c)throw Error("Invalid event type");var z=d(S)?!!S.capture:!!S,St=W(o);if(St||(o[P]=St=new zr(o)),h=St.add(c,h,m,z,C),h.proxy)return h;if(m=G(),h.proxy=m,m.src=o,m.listener=h,o.addEventListener)xo||(S=z),S===void 0&&(S=!1),o.addEventListener(c.toString(),m,S);else if(o.attachEvent)o.attachEvent(F(c.toString()),m);else if(o.addListener&&o.removeListener)o.addListener(m);else throw Error("addEventListener and attachEvent are unavailable.");return h}function G(){function o(h){return c.call(o.src,o.listener,h)}const c=nt;return o}function q(o,c,h,m,S){if(Array.isArray(c))for(var C=0;C<c.length;C++)q(o,c[C],h,m,S);else m=d(m)?!!m.capture:!!m,h=it(h),o&&o[Ye]?(o=o.i,c=String(c).toString(),c in o.g&&(C=o.g[c],h=A(C,h,m,S),-1<h&&(Be(C[h]),Array.prototype.splice.call(C,h,1),C.length==0&&(delete o.g[c],o.h--)))):o&&(o=W(o))&&(c=o.g[c.toString()],o=-1,c&&(o=A(c,h,m,S)),(h=-1<o?c[o]:null)&&U(h))}function U(o){if(typeof o!="number"&&o&&!o.da){var c=o.src;if(c&&c[Ye])E(c.i,o);else{var h=o.type,m=o.proxy;c.removeEventListener?c.removeEventListener(h,m,o.capture):c.detachEvent?c.detachEvent(F(h),m):c.addListener&&c.removeListener&&c.removeListener(m),(h=W(c))?(E(h,o),h.h==0&&(h.src=null,c[P]=null)):Be(o)}}}function F(o){return o in L?L[o]:L[o]="on"+o}function nt(o,c){if(o.da)o=!0;else{c=new Un(c,this);var h=o.listener,m=o.ha||o.src;o.fa&&U(o),o=h.call(m,c)}return o}function W(o){return o=o[P],o instanceof zr?o:null}var Z="__closure_events_fn_"+(1e9*Math.random()>>>0);function it(o){return typeof o=="function"?o:(o[Z]||(o[Z]=function(c){return o.handleEvent(c)}),o[Z])}function rt(){Nt.call(this),this.i=new zr(this),this.M=this,this.F=null}R(rt,Nt),rt.prototype[Ye]=!0,rt.prototype.removeEventListener=function(o,c,h,m){q(this,o,c,h,m)};function ft(o,c){var h,m=o.F;if(m)for(h=[];m;m=m.F)h.push(m);if(o=o.M,m=c.type||c,typeof c=="string")c=new Ot(c,o);else if(c instanceof Ot)c.target=c.target||o;else{var S=c;c=new Ot(m,o),T(c,S)}if(S=!0,h)for(var C=h.length-1;0<=C;C--){var z=c.g=h[C];S=vt(z,m,!0,c)&&S}if(z=c.g=o,S=vt(z,m,!0,c)&&S,S=vt(z,m,!1,c)&&S,h)for(C=0;C<h.length;C++)z=c.g=h[C],S=vt(z,m,!1,c)&&S}rt.prototype.N=function(){if(rt.aa.N.call(this),this.i){var o=this.i,c;for(c in o.g){for(var h=o.g[c],m=0;m<h.length;m++)Be(h[m]);delete o.g[c],o.h--}}this.F=null},rt.prototype.K=function(o,c,h,m){return this.i.add(String(o),c,!1,h,m)},rt.prototype.L=function(o,c,h,m){return this.i.add(String(o),c,!0,h,m)};function vt(o,c,h,m){if(c=o.i.g[String(c)],!c)return!0;c=c.concat();for(var S=!0,C=0;C<c.length;++C){var z=c[C];if(z&&!z.da&&z.capture==h){var St=z.listener,Zt=z.ha||z.src;z.fa&&E(o.i,z),S=St.call(Zt,m)!==!1&&S}}return S&&!m.defaultPrevented}function Jt(o,c,h){if(typeof o=="function")h&&(o=g(o,h));else if(o&&typeof o.handleEvent=="function")o=g(o.handleEvent,o);else throw Error("Invalid listener argument");return 2147483647<Number(c)?-1:l.setTimeout(o,c||0)}function Yt(o){o.g=Jt(()=>{o.g=null,o.i&&(o.i=!1,Yt(o))},o.l);const c=o.h;o.h=null,o.m.apply(null,c)}class Re extends Nt{constructor(c,h){super(),this.m=c,this.l=h,this.h=null,this.i=!1,this.g=null}j(c){this.h=arguments,this.g?this.i=!0:Yt(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function se(o){Nt.call(this),this.h=o,this.g={}}R(se,Nt);var fn=[];function Hr(o){gt(o.g,function(c,h){this.g.hasOwnProperty(h)&&U(c)},o),o.g={}}se.prototype.N=function(){se.aa.N.call(this),Hr(this)},se.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Xt=l.JSON.stringify,Pe=l.JSON.parse,Gi=class{stringify(o){return l.JSON.stringify(o,void 0)}parse(o){return l.JSON.parse(o,void 0)}};function cr(){}cr.prototype.h=null;function Ql(o){return o.h||(o.h=o.i())}function Jl(){}var Gr={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Ao(){Ot.call(this,"d")}R(Ao,Ot);function So(){Ot.call(this,"c")}R(So,Ot);var qn={},Yl=null;function Ki(){return Yl=Yl||new rt}qn.La="serverreachability";function Xl(o){Ot.call(this,qn.La,o)}R(Xl,Ot);function Kr(o){const c=Ki();ft(c,new Xl(c))}qn.STAT_EVENT="statevent";function Zl(o,c){Ot.call(this,qn.STAT_EVENT,o),this.stat=c}R(Zl,Ot);function me(o){const c=Ki();ft(c,new Zl(c,o))}qn.Ma="timingevent";function tc(o,c){Ot.call(this,qn.Ma,o),this.size=c}R(tc,Ot);function Wr(o,c){if(typeof o!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){o()},c)}function Qr(){this.g=!0}Qr.prototype.xa=function(){this.g=!1};function Mp(o,c,h,m,S,C){o.info(function(){if(o.g)if(C)for(var z="",St=C.split("&"),Zt=0;Zt<St.length;Zt++){var Tt=St[Zt].split("=");if(1<Tt.length){var oe=Tt[0];Tt=Tt[1];var ae=oe.split("_");z=2<=ae.length&&ae[1]=="type"?z+(oe+"="+Tt+"&"):z+(oe+"=redacted&")}}else z=null;else z=C;return"XMLHTTP REQ ("+m+") [attempt "+S+"]: "+c+` 391`+h+` 392`+z})}function Lp(o,c,h,m,S,C,z){o.info(function(){return"XMLHTTP RESP ("+m+") [ attempt "+S+"]: "+c+` 393`+h+` 394`+C+" "+z})}function ur(o,c,h,m){o.info(function(){return"XMLHTTP TEXT ("+c+"): "+Bp(o,h)+(m?" "+m:"")})}function Fp(o,c){o.info(function(){return"TIMEOUT: "+c})}Qr.prototype.info=function(){};function Bp(o,c){if(!o.g)return c;if(!c)return null;try{var h=JSON.parse(c);if(h){for(o=0;o<h.length;o++)if(Array.isArray(h[o])){var m=h[o];if(!(2>m.length)){var S=m[1];if(Array.isArray(S)&&!(1>S.length)){var C=S[0];if(C!="noop"&&C!="stop"&&C!="close")for(var z=1;z<S.length;z++)S[z]=""}}}}return Xt(h)}catch{return c}}var Wi={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},ec={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Co;function Qi(){}R(Qi,cr),Qi.prototype.g=function(){return new XMLHttpRequest},Qi.prototype.i=function(){return{}},Co=new Qi;function pn(o,c,h,m){this.j=o,this.i=c,this.l=h,this.R=m||1,this.U=new se(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new nc}function nc(){this.i=null,this.g="",this.h=!1}var rc={},Ro={};function Po(o,c,h){o.L=1,o.v=Zi(Xe(c)),o.m=h,o.P=!0,ic(o,null)}function ic(o,c){o.F=Date.now(),Ji(o),o.A=Xe(o.v);var h=o.A,m=o.R;Array.isArray(m)||(m=[String(m)]),vc(h.i,"t",m),o.C=0,h=o.j.J,o.h=new nc,o.g=Mc(o.j,h?c:null,!o.m),0<o.O&&(o.M=new Re(g(o.Y,o,o.g),o.O)),c=o.U,h=o.g,m=o.ca;var S="readystatechange";Array.isArray(S)||(S&&(fn[0]=S.toString()),S=fn);for(var C=0;C<S.length;C++){var z=N(h,S[C],m||c.handleEvent,!1,c.h||c);if(!z)break;c.g[z.key]=z}c=o.H?_(o.H):{},o.m?(o.u||(o.u="POST"),c["Content-Type"]="application/x-www-form-urlencoded",o.g.ea(o.A,o.u,o.m,c)):(o.u="GET",o.g.ea(o.A,o.u,null,c)),Kr(),Mp(o.i,o.u,o.A,o.l,o.R,o.m)}pn.prototype.ca=function(o){o=o.target;const c=this.M;c&&Ze(o)==3?c.j():this.Y(o)},pn.prototype.Y=function(o){try{if(o==this.g)t:{const ae=Ze(this.g);var c=this.g.Ba();const fr=this.g.Z();if(!(3>ae)&&(ae!=3||this.g&&(this.h.h||this.g.oa()||xc(this.g)))){this.J||ae!=4||c==7||(c==8||0>=fr?Kr(3):Kr(2)),Vo(this);var h=this.g.Z();this.X=h;e:if(sc(this)){var m=xc(this.g);o="";var S=m.length,C=Ze(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){zn(this),Jr(this);var z="";break e}this.h.i=new l.TextDecoder}for(c=0;c<S;c++)this.h.h=!0,o+=this.h.i.decode(m[c],{stream:!(C&&c==S-1)});m.length=0,this.h.g+=o,this.C=0,z=this.h.g}else z=this.g.oa();if(this.o=h==200,Lp(this.i,this.u,this.A,this.l,this.R,ae,h),this.o){if(this.T&&!this.K){e:{if(this.g){var St,Zt=this.g;if((St=Zt.g?Zt.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!j(St)){var Tt=St;break e}}Tt=null}if(h=Tt)ur(this.i,this.l,h,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,ko(this,h);else{this.o=!1,this.s=3,me(12),zn(this),Jr(this);break t}}if(this.P){h=!0;let Ne;for(;!this.J&&this.C<z.length;)if(Ne=jp(this,z),Ne==Ro){ae==4&&(this.s=4,me(14),h=!1),ur(this.i,this.l,null,"[Incomplete Response]");break}else if(Ne==rc){this.s=4,me(15),ur(this.i,this.l,z,"[Invalid Chunk]"),h=!1;break}else ur(this.i,this.l,Ne,null),ko(this,Ne);if(sc(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),ae!=4||z.length!=0||this.h.h||(this.s=1,me(16),h=!1),this.o=this.o&&h,!h)ur(this.i,this.l,z,"[Invalid Chunked Response]"),zn(this),Jr(this);else if(0<z.length&&!this.W){this.W=!0;var oe=this.j;oe.g==this&&oe.ba&&!oe.M&&(oe.j.info("Great, no buffering proxy detected. Bytes received: "+z.length),Fo(oe),oe.M=!0,me(11))}}else ur(this.i,this.l,z,null),ko(this,z);ae==4&&zn(this),this.o&&!this.J&&(ae==4?kc(this.j,this):(this.o=!1,Ji(this)))}else rm(this.g),h==400&&0<z.indexOf("Unknown SID")?(this.s=3,me(12)):(this.s=0,me(13)),zn(this),Jr(this)}}}catch{}finally{}};function sc(o){return o.g?o.u=="GET"&&o.L!=2&&o.j.Ca:!1}function jp(o,c){var h=o.C,m=c.indexOf(` 395`,h);return m==-1?Ro:(h=Number(c.substring(h,m)),isNaN(h)?rc:(m+=1,m+h>c.length?Ro:(c=c.slice(m,m+h),o.C=m+h,c)))}pn.prototype.cancel=function(){this.J=!0,zn(this)};function Ji(o){o.S=Date.now()+o.I,oc(o,o.I)}function oc(o,c){if(o.B!=null)throw Error("WatchDog timer not null");o.B=Wr(g(o.ba,o),c)}function Vo(o){o.B&&(l.clearTimeout(o.B),o.B=null)}pn.prototype.ba=function(){this.B=null;const o=Date.now();0<=o-this.S?(Fp(this.i,this.A),this.L!=2&&(Kr(),me(17)),zn(this),this.s=2,Jr(this)):oc(this,this.S-o)};function Jr(o){o.j.G==0||o.J||kc(o.j,o)}function zn(o){Vo(o);var c=o.M;c&&typeof c.ma=="function"&&c.ma(),o.M=null,Hr(o.U),o.g&&(c=o.g,o.g=null,c.abort(),c.ma())}function ko(o,c){try{var h=o.j;if(h.G!=0&&(h.g==o||Do(h.h,o))){if(!o.K&&Do(h.h,o)&&h.G==3){try{var m=h.Da.g.parse(c)}catch{m=null}if(Array.isArray(m)&&m.length==3){var S=m;if(S[0]==0){t:if(!h.u){if(h.g)if(h.g.F+3e3<o.F)ss(h),rs(h);else break t;Lo(h),me(18)}}else h.za=S[1],0<h.za-h.T&&37500>S[2]&&h.F&&h.v==0&&!h.C&&(h.C=Wr(g(h.Za,h),6e3));if(1>=cc(h.h)&&h.ca){try{h.ca()}catch{}h.ca=void 0}}else Gn(h,11)}else if((o.K||h.g==o)&&ss(h),!j(c))for(S=h.Da.g.parse(c),c=0;c<S.length;c++){let Tt=S[c];if(h.T=Tt[0],Tt=Tt[1],h.G==2)if(Tt[0]=="c"){h.K=Tt[1],h.ia=Tt[2];const oe=Tt[3];oe!=null&&(h.la=oe,h.j.info("VER="+h.la));const ae=Tt[4];ae!=null&&(h.Aa=ae,h.j.info("SVER="+h.Aa));const fr=Tt[5];fr!=null&&typeof fr=="number"&&0<fr&&(m=1.5*fr,h.L=m,h.j.info("backChannelRequestTimeoutMs_="+m)),m=h;const Ne=o.g;if(Ne){const as=Ne.g?Ne.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(as){var C=m.h;C.g||as.indexOf("spdy")==-1&&as.indexOf("quic")==-1&&as.indexOf("h2")==-1||(C.j=C.l,C.g=new Set,C.h&&(No(C,C.h),C.h=null))}if(m.D){const Bo=Ne.g?Ne.g.getResponseHeader("X-HTTP-Session-Id"):null;Bo&&(m.ya=Bo,Vt(m.I,m.D,Bo))}}h.G=3,h.l&&h.l.ua(),h.ba&&(h.R=Date.now()-o.F,h.j.info("Handshake RTT: "+h.R+"ms")),m=h;var z=o;if(m.qa=Oc(m,m.J?m.ia:null,m.W),z.K){uc(m.h,z);var St=z,Zt=m.L;Zt&&(St.I=Zt),St.B&&(Vo(St),Ji(St)),m.g=z}else Pc(m);0<h.i.length&&is(h)}else Tt[0]!="stop"&&Tt[0]!="close"||Gn(h,7);else h.G==3&&(Tt[0]=="stop"||Tt[0]=="close"?Tt[0]=="stop"?Gn(h,7):Mo(h):Tt[0]!="noop"&&h.l&&h.l.ta(Tt),h.v=0)}}Kr(4)}catch{}}var Up=class{constructor(o,c){this.g=o,this.map=c}};function ac(o){this.l=o||10,l.PerformanceNavigationTiming?(o=l.performance.getEntriesByType("navigation"),o=0<o.length&&(o[0].nextHopProtocol=="hq"||o[0].nextHopProtocol=="h2")):o=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=o?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function lc(o){return o.h?!0:o.g?o.g.size>=o.j:!1}function cc(o){return o.h?1:o.g?o.g.size:0}function Do(o,c){return o.h?o.h==c:o.g?o.g.has(c):!1}function No(o,c){o.g?o.g.add(c):o.h=c}function uc(o,c){o.h&&o.h==c?o.h=null:o.g&&o.g.has(c)&&o.g.delete(c)}ac.prototype.cancel=function(){if(this.i=hc(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const o of this.g.values())o.cancel();this.g.clear()}};function hc(o){if(o.h!=null)return o.i.concat(o.h.D);if(o.g!=null&&o.g.size!==0){let c=o.i;for(const h of o.g.values())c=c.concat(h.D);return c}return V(o.i)}function $p(o){if(o.V&&typeof o.V=="function")return o.V();if(typeof Map<"u"&&o instanceof Map||typeof Set<"u"&&o instanceof Set)return Array.from(o.values());if(typeof o=="string")return o.split("");if(u(o)){for(var c=[],h=o.length,m=0;m<h;m++)c.push(o[m]);return c}c=[],h=0;for(m in o)c[h++]=o[m];return c}function qp(o){if(o.na&&typeof o.na=="function")return o.na();if(!o.V||typeof o.V!="function"){if(typeof Map<"u"&&o instanceof Map)return Array.from(o.keys());if(!(typeof Set<"u"&&o instanceof Set)){if(u(o)||typeof o=="string"){var c=[];o=o.length;for(var h=0;h<o;h++)c.push(h);return c}c=[],h=0;for(const m in o)c[h++]=m;return c}}}function dc(o,c){if(o.forEach&&typeof o.forEach=="function")o.forEach(c,void 0);else if(u(o)||typeof o=="string")Array.prototype.forEach.call(o,c,void 0);else for(var h=qp(o),m=$p(o),S=m.length,C=0;C<S;C++)c.call(void 0,m[C],h&&h[C],o)}var fc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function zp(o,c){if(o){o=o.split("&");for(var h=0;h<o.length;h++){var m=o[h].indexOf("="),S=null;if(0<=m){var C=o[h].substring(0,m);S=o[h].substring(m+1)}else C=o[h];c(C,S?decodeURIComponent(S.replace(/\+/g," ")):"")}}}function Hn(o){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,o instanceof Hn){this.h=o.h,Yi(this,o.j),this.o=o.o,this.g=o.g,Xi(this,o.s),this.l=o.l;var c=o.i,h=new Zr;h.i=c.i,c.g&&(h.g=new Map(c.g),h.h=c.h),pc(this,h),this.m=o.m}else o&&(c=String(o).match(fc))?(this.h=!1,Yi(this,c[1]||"",!0),this.o=Yr(c[2]||""),this.g=Yr(c[3]||"",!0),Xi(this,c[4]),this.l=Yr(c[5]||"",!0),pc(this,c[6]||"",!0),this.m=Yr(c[7]||"")):(this.h=!1,this.i=new Zr(null,this.h))}Hn.prototype.toString=function(){var o=[],c=this.j;c&&o.push(Xr(c,mc,!0),":");var h=this.g;return(h||c=="file")&&(o.push("//"),(c=this.o)&&o.push(Xr(c,mc,!0),"@"),o.push(encodeURIComponent(String(h)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),h=this.s,h!=null&&o.push(":",String(h))),(h=this.l)&&(this.g&&h.charAt(0)!="/"&&o.push("/"),o.push(Xr(h,h.charAt(0)=="/"?Kp:Gp,!0))),(h=this.i.toString())&&o.push("?",h),(h=this.m)&&o.push("#",Xr(h,Qp)),o.join("")};function Xe(o){return new Hn(o)}function Yi(o,c,h){o.j=h?Yr(c,!0):c,o.j&&(o.j=o.j.replace(/:$/,""))}function Xi(o,c){if(c){if(c=Number(c),isNaN(c)||0>c)throw Error("Bad port number "+c);o.s=c}else o.s=null}function pc(o,c,h){c instanceof Zr?(o.i=c,Jp(o.i,o.h)):(h||(c=Xr(c,Wp)),o.i=new Zr(c,o.h))}function Vt(o,c,h){o.i.set(c,h)}function Zi(o){return Vt(o,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),o}function Yr(o,c){return o?c?decodeURI(o.replace(/%25/g,"%2525")):decodeURIComponent(o):""}function Xr(o,c,h){return typeof o=="string"?(o=encodeURI(o).replace(c,Hp),h&&(o=o.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),o):null}function Hp(o){return o=o.charCodeAt(0),"%"+(o>>4&15).toString(16)+(o&15).toString(16)}var mc=/[#\/\?@]/g,Gp=/[#\?:]/g,Kp=/[#\?]/g,Wp=/[#\?@]/g,Qp=/#/g;function Zr(o,c){this.h=this.g=null,this.i=o||null,this.j=!!c}function mn(o){o.g||(o.g=new Map,o.h=0,o.i&&zp(o.i,function(c,h){o.add(decodeURIComponent(c.replace(/\+/g," ")),h)}))}e=Zr.prototype,e.add=function(o,c){mn(this),this.i=null,o=hr(this,o);var h=this.g.get(o);return h||this.g.set(o,h=[]),h.push(c),this.h+=1,this};function gc(o,c){mn(o),c=hr(o,c),o.g.has(c)&&(o.i=null,o.h-=o.g.get(c).length,o.g.delete(c))}function yc(o,c){return mn(o),c=hr(o,c),o.g.has(c)}e.forEach=function(o,c){mn(this),this.g.forEach(function(h,m){h.forEach(function(S){o.call(c,S,m,this)},this)},this)},e.na=function(){mn(this);const o=Array.from(this.g.values()),c=Array.from(this.g.keys()),h=[];for(let m=0;m<c.length;m++){const S=o[m];for(let C=0;C<S.length;C++)h.push(c[m])}return h},e.V=function(o){mn(this);let c=[];if(typeof o=="string")yc(this,o)&&(c=c.concat(this.g.get(hr(this,o))));else{o=Array.from(this.g.values());for(let h=0;h<o.length;h++)c=c.concat(o[h])}return c},e.set=function(o,c){return mn(this),this.i=null,o=hr(this,o),yc(this,o)&&(this.h-=this.g.get(o).length),this.g.set(o,[c]),this.h+=1,this},e.get=function(o,c){return o?(o=this.V(o),0<o.length?String(o[0]):c):c};function vc(o,c,h){gc(o,c),0<h.length&&(o.i=null,o.g.set(hr(o,c),V(h)),o.h+=h.length)}e.toString=function(){if(this.i)return this.i;if(!this.g)return"";const o=[],c=Array.from(this.g.keys());for(var h=0;h<c.length;h++){var m=c[h];const C=encodeURIComponent(String(m)),z=this.V(m);for(m=0;m<z.length;m++){var S=C;z[m]!==""&&(S+="="+encodeURIComponent(String(z[m]))),o.push(S)}}return this.i=o.join("&")};function hr(o,c){return c=String(c),o.j&&(c=c.toLowerCase()),c}function Jp(o,c){c&&!o.j&&(mn(o),o.i=null,o.g.forEach(function(h,m){var S=m.toLowerCase();m!=S&&(gc(this,m),vc(this,S,h))},o)),o.j=c}function Yp(o,c){const h=new Qr;if(l.Image){const m=new Image;m.onload=I(gn,h,"TestLoadImage: loaded",!0,c,m),m.onerror=I(gn,h,"TestLoadImage: error",!1,c,m),m.onabort=I(gn,h,"TestLoadImage: abort",!1,c,m),m.ontimeout=I(gn,h,"TestLoadImage: timeout",!1,c,m),l.setTimeout(function(){m.ontimeout&&m.ontimeout()},1e4),m.src=o}else c(!1)}function Xp(o,c){const h=new Qr,m=new AbortController,S=setTimeout(()=>{m.abort(),gn(h,"TestPingServer: timeout",!1,c)},1e4);fetch(o,{signal:m.signal}).then(C=>{clearTimeout(S),C.ok?gn(h,"TestPingServer: ok",!0,c):gn(h,"TestPingServer: server error",!1,c)}).catch(()=>{clearTimeout(S),gn(h,"TestPingServer: error",!1,c)})}function gn(o,c,h,m,S){try{S&&(S.onload=null,S.onerror=null,S.onabort=null,S.ontimeout=null),m(h)}catch{}}function Zp(){this.g=new Gi}function tm(o,c,h){const m=h||"";try{dc(o,function(S,C){let z=S;d(S)&&(z=Xt(S)),c.push(m+C+"="+encodeURIComponent(z))})}catch(S){throw c.push(m+"type="+encodeURIComponent("_badmap")),S}}function ts(o){this.l=o.Ub||null,this.j=o.eb||!1}R(ts,cr),ts.prototype.g=function(){return new es(this.l,this.j)},ts.prototype.i=(function(o){return function(){return o}})({});function es(o,c){rt.call(this),this.D=o,this.o=c,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}R(es,rt),e=es.prototype,e.open=function(o,c){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=o,this.A=c,this.readyState=1,ei(this)},e.send=function(o){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const c={headers:this.u,method:this.B,credentials:this.m,cache:void 0};o&&(c.body=o),(this.D||l).fetch(new Request(this.A,c)).then(this.Sa.bind(this),this.ga.bind(this))},e.abort=function(){this.response=this.responseText="",this.u=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,ti(this)),this.readyState=0},e.Sa=function(o){if(this.g&&(this.l=o,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=o.headers,this.readyState=2,ei(this)),this.g&&(this.readyState=3,ei(this),this.g)))if(this.responseType==="arraybuffer")o.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in o){if(this.j=o.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;_c(this)}else o.text().then(this.Ra.bind(this),this.ga.bind(this))};function _c(o){o.j.read().then(o.Pa.bind(o)).catch(o.ga.bind(o))}e.Pa=function(o){if(this.g){if(this.o&&o.value)this.response.push(o.value);else if(!this.o){var c=o.value?o.value:new Uint8Array(0);(c=this.v.decode(c,{stream:!o.done}))&&(this.response=this.responseText+=c)}o.done?ti(this):ei(this),this.readyState==3&&_c(this)}},e.Ra=function(o){this.g&&(this.response=this.responseText=o,ti(this))},e.Qa=function(o){this.g&&(this.response=o,ti(this))},e.ga=function(){this.g&&ti(this)};function ti(o){o.readyState=4,o.l=null,o.j=null,o.v=null,ei(o)}e.setRequestHeader=function(o,c){this.u.append(o,c)},e.getResponseHeader=function(o){return this.h&&this.h.get(o.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const o=[],c=this.h.entries();for(var h=c.next();!h.done;)h=h.value,o.push(h[0]+": "+h[1]),h=c.next();return o.join(`\r 396`)};function ei(o){o.onreadystatechange&&o.onreadystatechange.call(o)}Object.defineProperty(es.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(o){this.m=o?"include":"same-origin"}});function bc(o){let c="";return gt(o,function(h,m){c+=m,c+=":",c+=h,c+=`\r 397`}),c}function Oo(o,c,h){t:{for(m in h){var m=!1;break t}m=!0}m||(h=bc(h),typeof o=="string"?h!=null&&encodeURIComponent(String(h)):Vt(o,c,h))}function Ft(o){rt.call(this),this.headers=new Map,this.o=o||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}R(Ft,rt);var em=/^https?$/i,nm=["POST","PUT"];e=Ft.prototype,e.Ha=function(o){this.J=o},e.ea=function(o,c,h,m){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+o);c=c?c.toUpperCase():"GET",this.D=o,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Co.g(),this.v=this.o?Ql(this.o):Ql(Co),this.g.onreadystatechange=g(this.Ea,this);try{this.B=!0,this.g.open(c,String(o),!0),this.B=!1}catch(C){wc(this,C);return}if(o=h||"",h=new Map(this.headers),m)if(Object.getPrototypeOf(m)===Object.prototype)for(var S in m)h.set(S,m[S]);else if(typeof m.keys=="function"&&typeof m.get=="function")for(const C of m.keys())h.set(C,m.get(C));else throw Error("Unknown input type for opt_headers: "+String(m));m=Array.from(h.keys()).find(C=>C.toLowerCase()=="content-type"),S=l.FormData&&o instanceof l.FormData,!(0<=Array.prototype.indexOf.call(nm,c,void 0))||m||S||h.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[C,z]of h)this.g.setRequestHeader(C,z);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{Ic(this),this.u=!0,this.g.send(o),this.u=!1}catch(C){wc(this,C)}};function wc(o,c){o.h=!1,o.g&&(o.j=!0,o.g.abort(),o.j=!1),o.l=c,o.m=5,Ec(o),ns(o)}function Ec(o){o.A||(o.A=!0,ft(o,"complete"),ft(o,"error"))}e.abort=function(o){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=o||7,ft(this,"complete"),ft(this,"abort"),ns(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),ns(this,!0)),Ft.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?Tc(this):this.bb())},e.bb=function(){Tc(this)};function Tc(o){if(o.h&&typeof a<"u"&&(!o.v[1]||Ze(o)!=4||o.Z()!=2)){if(o.u&&Ze(o)==4)Jt(o.Ea,0,o);else if(ft(o,"readystatechange"),Ze(o)==4){o.h=!1;try{const z=o.Z();t:switch(z){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break t;default:c=!1}var h;if(!(h=c)){var m;if(m=z===0){var S=String(o.D).match(fc)[1]||null;!S&&l.self&&l.self.location&&(S=l.self.location.protocol.slice(0,-1)),m=!em.test(S?S.toLowerCase():"")}h=m}if(h)ft(o,"complete"),ft(o,"success");else{o.m=6;try{var C=2<Ze(o)?o.g.statusText:""}catch{C=""}o.l=C+" ["+o.Z()+"]",Ec(o)}}finally{ns(o)}}}}function ns(o,c){if(o.g){Ic(o);const h=o.g,m=o.v[0]?()=>{}:null;o.g=null,o.v=null,c||ft(o,"ready");try{h.onreadystatechange=m}catch{}}}function Ic(o){o.I&&(l.clearTimeout(o.I),o.I=null)}e.isActive=function(){return!!this.g};function Ze(o){return o.g?o.g.readyState:0}e.Z=function(){try{return 2<Ze(this)?this.g.status:-1}catch{return-1}},e.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},e.Oa=function(o){if(this.g){var c=this.g.responseText;return o&&c.indexOf(o)==0&&(c=c.substring(o.length)),Pe(c)}};function xc(o){try{if(!o.g)return null;if("response"in o.g)return o.g.response;switch(o.H){case"":case"text":return o.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in o.g)return o.g.mozResponseArrayBuffer}return null}catch{return null}}function rm(o){const c={};o=(o.g&&2<=Ze(o)&&o.g.getAllResponseHeaders()||"").split(`\r 398`);for(let m=0;m<o.length;m++){if(j(o[m]))continue;var h=w(o[m]);const S=h[0];if(h=h[1],typeof h!="string")continue;h=h.trim();const C=c[S]||[];c[S]=C,C.push(h)}x(c,function(m){return m.join(", ")})}e.Ba=function(){return this.m},e.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function ni(o,c,h){return h&&h.internalChannelParams&&h.internalChannelParams[o]||c}function Ac(o){this.Aa=0,this.i=[],this.j=new Qr,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=ni("failFast",!1,o),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=ni("baseRetryDelayMs",5e3,o),this.cb=ni("retryDelaySeedMs",1e4,o),this.Wa=ni("forwardChannelMaxRetries",2,o),this.wa=ni("forwardChannelRequestTimeoutMs",2e4,o),this.pa=o&&o.xmlHttpFactory||void 0,this.Xa=o&&o.Tb||void 0,this.Ca=o&&o.useFetchStreams||!1,this.L=void 0,this.J=o&&o.supportsCrossDomainXhr||!1,this.K="",this.h=new ac(o&&o.concurrentRequestLimit),this.Da=new Zp,this.P=o&&o.fastHandshake||!1,this.O=o&&o.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=o&&o.Rb||!1,o&&o.xa&&this.j.xa(),o&&o.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&o&&o.detectBufferingProxy||!1,this.ja=void 0,o&&o.longPollingTimeout&&0<o.longPollingTimeout&&(this.ja=o.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}e=Ac.prototype,e.la=8,e.G=1,e.connect=function(o,c,h,m){me(0),this.W=o,this.H=c||{},h&&m!==void 0&&(this.H.OSID=h,this.H.OAID=m),this.F=this.X,this.I=Oc(this,null,this.W),is(this)};function Mo(o){if(Sc(o),o.G==3){var c=o.U++,h=Xe(o.I);if(Vt(h,"SID",o.K),Vt(h,"RID",c),Vt(h,"TYPE","terminate"),ri(o,h),c=new pn(o,o.j,c),c.L=2,c.v=Zi(Xe(h)),h=!1,l.navigator&&l.navigator.sendBeacon)try{h=l.navigator.sendBeacon(c.v.toString(),"")}catch{}!h&&l.Image&&(new Image().src=c.v,h=!0),h||(c.g=Mc(c.j,null),c.g.ea(c.v)),c.F=Date.now(),Ji(c)}Nc(o)}function rs(o){o.g&&(Fo(o),o.g.cancel(),o.g=null)}function Sc(o){rs(o),o.u&&(l.clearTimeout(o.u),o.u=null),ss(o),o.h.cancel(),o.s&&(typeof o.s=="number"&&l.clearTimeout(o.s),o.s=null)}function is(o){if(!lc(o.h)&&!o.s){o.s=!0;var c=o.Ga;ht||Bt(),dt||(ht(),dt=!0),ie.add(c,o),o.B=0}}function im(o,c){return cc(o.h)>=o.h.j-(o.s?1:0)?!1:o.s?(o.i=c.D.concat(o.i),!0):o.G==1||o.G==2||o.B>=(o.Va?0:o.Wa)?!1:(o.s=Wr(g(o.Ga,o,c),Dc(o,o.B)),o.B++,!0)}e.Ga=function(o){if(this.s)if(this.s=null,this.G==1){if(!o){this.U=Math.floor(1e5*Math.random()),o=this.U++;const S=new pn(this,this.j,o);let C=this.o;if(this.S&&(C?(C=_(C),T(C,this.S)):C=this.S),this.m!==null||this.O||(S.H=C,C=null),this.P)t:{for(var c=0,h=0;h<this.i.length;h++){e:{var m=this.i[h];if("__data__"in m.map&&(m=m.map.__data__,typeof m=="string")){m=m.length;break e}m=void 0}if(m===void 0)break;if(c+=m,4096<c){c=h;break t}if(c===4096||h===this.i.length-1){c=h+1;break t}}c=1e3}else c=1e3;c=Rc(this,S,c),h=Xe(this.I),Vt(h,"RID",o),Vt(h,"CVER",22),this.D&&Vt(h,"X-HTTP-Session-Id",this.D),ri(this,h),C&&(this.O?c="headers="+encodeURIComponent(String(bc(C)))+"&"+c:this.m&&Oo(h,this.m,C)),No(this.h,S),this.Ua&&Vt(h,"TYPE","init"),this.P?(Vt(h,"$req",c),Vt(h,"SID","null"),S.T=!0,Po(S,h,null)):Po(S,h,c),this.G=2}}else this.G==3&&(o?Cc(this,o):this.i.length==0||lc(this.h)||Cc(this))};function Cc(o,c){var h;c?h=c.l:h=o.U++;const m=Xe(o.I);Vt(m,"SID",o.K),Vt(m,"RID",h),Vt(m,"AID",o.T),ri(o,m),o.m&&o.o&&Oo(m,o.m,o.o),h=new pn(o,o.j,h,o.B+1),o.m===null&&(h.H=o.o),c&&(o.i=c.D.concat(o.i)),c=Rc(o,h,1e3),h.I=Math.round(.5*o.wa)+Math.round(.5*o.wa*Math.random()),No(o.h,h),Po(h,m,c)}function ri(o,c){o.H&>(o.H,function(h,m){Vt(c,m,h)}),o.l&&dc({},function(h,m){Vt(c,m,h)})}function Rc(o,c,h){h=Math.min(o.i.length,h);var m=o.l?g(o.l.Na,o.l,o):null;t:{var S=o.i;let C=-1;for(;;){const z=["count="+h];C==-1?0<h?(C=S[0].g,z.push("ofs="+C)):C=0:z.push("ofs="+C);let St=!0;for(let Zt=0;Zt<h;Zt++){let Tt=S[Zt].g;const oe=S[Zt].map;if(Tt-=C,0>Tt)C=Math.max(0,S[Zt].g-100),St=!1;else try{tm(oe,z,"req"+Tt+"_")}catch{m&&m(oe)}}if(St){m=z.join("&");break t}}}return o=o.i.splice(0,h),c.D=o,m}function Pc(o){if(!o.g&&!o.u){o.Y=1;var c=o.Fa;ht||Bt(),dt||(ht(),dt=!0),ie.add(c,o),o.v=0}}function Lo(o){return o.g||o.u||3<=o.v?!1:(o.Y++,o.u=Wr(g(o.Fa,o),Dc(o,o.v)),o.v++,!0)}e.Fa=function(){if(this.u=null,Vc(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var o=2*this.R;this.j.info("BP detection timer enabled: "+o),this.A=Wr(g(this.ab,this),o)}},e.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,me(10),rs(this),Vc(this))};function Fo(o){o.A!=null&&(l.clearTimeout(o.A),o.A=null)}function Vc(o){o.g=new pn(o,o.j,"rpc",o.Y),o.m===null&&(o.g.H=o.o),o.g.O=0;var c=Xe(o.qa);Vt(c,"RID","rpc"),Vt(c,"SID",o.K),Vt(c,"AID",o.T),Vt(c,"CI",o.F?"0":"1"),!o.F&&o.ja&&Vt(c,"TO",o.ja),Vt(c,"TYPE","xmlhttp"),ri(o,c),o.m&&o.o&&Oo(c,o.m,o.o),o.L&&(o.g.I=o.L);var h=o.g;o=o.ia,h.L=1,h.v=Zi(Xe(c)),h.m=null,h.P=!0,ic(h,o)}e.Za=function(){this.C!=null&&(this.C=null,rs(this),Lo(this),me(19))};function ss(o){o.C!=null&&(l.clearTimeout(o.C),o.C=null)}function kc(o,c){var h=null;if(o.g==c){ss(o),Fo(o),o.g=null;var m=2}else if(Do(o.h,c))h=c.D,uc(o.h,c),m=1;else return;if(o.G!=0){if(c.o)if(m==1){h=c.m?c.m.length:0,c=Date.now()-c.F;var S=o.B;m=Ki(),ft(m,new tc(m,h)),is(o)}else Pc(o);else if(S=c.s,S==3||S==0&&0<c.X||!(m==1&&im(o,c)||m==2&&Lo(o)))switch(h&&0<h.length&&(c=o.h,c.i=c.i.concat(h)),S){case 1:Gn(o,5);break;case 4:Gn(o,10);break;case 3:Gn(o,6);break;default:Gn(o,2)}}}function Dc(o,c){let h=o.Ta+Math.floor(Math.random()*o.cb);return o.isActive()||(h*=2),h*c}function Gn(o,c){if(o.j.info("Error code "+c),c==2){var h=g(o.fb,o),m=o.Xa;const S=!m;m=new Hn(m||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||Yi(m,"https"),Zi(m),S?Yp(m.toString(),h):Xp(m.toString(),h)}else me(2);o.G=0,o.l&&o.l.sa(c),Nc(o),Sc(o)}e.fb=function(o){o?(this.j.info("Successfully pinged google.com"),me(2)):(this.j.info("Failed to ping google.com"),me(1))};function Nc(o){if(o.G=0,o.ka=[],o.l){const c=hc(o.h);(c.length!=0||o.i.length!=0)&&(O(o.ka,c),O(o.ka,o.i),o.h.i.length=0,V(o.i),o.i.length=0),o.l.ra()}}function Oc(o,c,h){var m=h instanceof Hn?Xe(h):new Hn(h);if(m.g!="")c&&(m.g=c+"."+m.g),Xi(m,m.s);else{var S=l.location;m=S.protocol,c=c?c+"."+S.hostname:S.hostname,S=+S.port;var C=new Hn(null);m&&Yi(C,m),c&&(C.g=c),S&&Xi(C,S),h&&(C.l=h),m=C}return h=o.D,c=o.ya,h&&c&&Vt(m,h,c),Vt(m,"VER",o.la),ri(o,m),m}function Mc(o,c,h){if(c&&!o.J)throw Error("Can't create secondary domain capable XhrIo object.");return c=o.Ca&&!o.pa?new Ft(new ts({eb:h})):new Ft(o.pa),c.Ha(o.J),c}e.isActive=function(){return!!this.l&&this.l.isActive(this)};function Lc(){}e=Lc.prototype,e.ua=function(){},e.ta=function(){},e.sa=function(){},e.ra=function(){},e.isActive=function(){return!0},e.Na=function(){};function os(){}os.prototype.g=function(o,c){return new Ie(o,c)};function Ie(o,c){rt.call(this),this.g=new Ac(c),this.l=o,this.h=c&&c.messageUrlParams||null,o=c&&c.messageHeaders||null,c&&c.clientProtocolHeaderRequired&&(o?o["X-Client-Protocol"]="webchannel":o={"X-Client-Protocol":"webchannel"}),this.g.o=o,o=c&&c.initMessageHeaders||null,c&&c.messageContentType&&(o?o["X-WebChannel-Content-Type"]=c.messageContentType:o={"X-WebChannel-Content-Type":c.messageContentType}),c&&c.va&&(o?o["X-WebChannel-Client-Profile"]=c.va:o={"X-WebChannel-Client-Profile":c.va}),this.g.S=o,(o=c&&c.Sb)&&!j(o)&&(this.g.m=o),this.v=c&&c.supportsCrossDomainXhr||!1,this.u=c&&c.sendRawJson||!1,(c=c&&c.httpSessionIdParam)&&!j(c)&&(this.g.D=c,o=this.h,o!==null&&c in o&&(o=this.h,c in o&&delete o[c])),this.j=new dr(this)}R(Ie,rt),Ie.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Ie.prototype.close=function(){Mo(this.g)},Ie.prototype.o=function(o){var c=this.g;if(typeof o=="string"){var h={};h.__data__=o,o=h}else this.u&&(h={},h.__data__=Xt(o),o=h);c.i.push(new Up(c.Ya++,o)),c.G==3&&is(c)},Ie.prototype.N=function(){this.g.l=null,delete this.j,Mo(this.g),delete this.g,Ie.aa.N.call(this)};function Fc(o){Ao.call(this),o.__headers__&&(this.headers=o.__headers__,this.statusCode=o.__status__,delete o.__headers__,delete o.__status__);var c=o.__sm__;if(c){t:{for(const h in c){o=h;break t}o=void 0}(this.i=o)&&(o=this.i,c=c!==null&&o in c?c[o]:void 0),this.data=c}else this.data=o}R(Fc,Ao);function Bc(){So.call(this),this.status=1}R(Bc,So);function dr(o){this.g=o}R(dr,Lc),dr.prototype.ua=function(){ft(this.g,"a")},dr.prototype.ta=function(o){ft(this.g,new Fc(o))},dr.prototype.sa=function(o){ft(this.g,new Bc)},dr.prototype.ra=function(){ft(this.g,"b")},os.prototype.createWebChannel=os.prototype.g,Ie.prototype.send=Ie.prototype.o,Ie.prototype.open=Ie.prototype.m,Ie.prototype.close=Ie.prototype.close,hf=function(){return new os},uf=function(){return Ki()},cf=qn,Ca={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Wi.NO_ERROR=0,Wi.TIMEOUT=8,Wi.HTTP_ERROR=6,Ts=Wi,ec.COMPLETE="complete",lf=ec,Jl.EventType=Gr,Gr.OPEN="a",Gr.CLOSE="b",Gr.ERROR="c",Gr.MESSAGE="d",rt.prototype.listen=rt.prototype.K,ai=Jl,Ft.prototype.listenOnce=Ft.prototype.L,Ft.prototype.getLastError=Ft.prototype.Ka,Ft.prototype.getLastErrorCode=Ft.prototype.Ba,Ft.prototype.getStatus=Ft.prototype.Z,Ft.prototype.getResponseJson=Ft.prototype.Oa,Ft.prototype.getResponseText=Ft.prototype.oa,Ft.prototype.send=Ft.prototype.ea,Ft.prototype.setWithCredentials=Ft.prototype.Ha,af=Ft}).apply(typeof ds<"u"?ds:typeof self<"u"?self:typeof window<"u"?window:{});const Nu="@firebase/firestore",Ou="4.8.0";/** 399 * @license 400 * Copyright 2017 Google LLC 401 * 402 * Licensed under the Apache License, Version 2.0 (the "License");
403 * you may not use this file except in compliance with the License. 404 * You may obtain a copy of the License at 405 * 406 * http://www.apache.org/licenses/LICENSE-2.0 407 * 408 * Unless required by applicable law or agreed to in writing, software 409 * distributed under the License is distributed on an "AS IS" BASIS, 410 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 411 * See the License for the specific language governing permissions and 412 * limitations under the License. 413 */class ce{constructor(t){this.uid=t}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}ce.UNAUTHENTICATED=new ce(null),ce.GOOGLE_CREDENTIALS=new ce("google-credentials-uid"),ce.FIRST_PARTY=new ce("first-party-uid"),ce.MOCK_USER=new ce("mock-user");/** 414 * @license 415 * Copyright 2017 Google LLC 416 * 417 * Licensed under the Apache License, Version 2.0 (the "License"); 418 * you may not use this file except in compliance with the License. 419 * You may obtain a copy of the License at 420 * 421 * http://www.apache.org/licenses/LICENSE-2.0 422 * 423 * Unless required by applicable law or agreed to in writing, software 424 * distributed under the License is distributed on an "AS IS" BASIS, 425 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 426 * See the License for the specific language governing permissions and 427 * limitations under the License. 428 */let Br="11.10.0";/** 429 * @license 430 * Copyright 2017 Google LLC 431 * 432 * Licensed under the Apache License, Version 2.0 (the "License"); 433 * you may not use this file except in compliance with the License. 434 * You may obtain a copy of the License at 435 * 436 * http://www.apache.org/licenses/LICENSE-2.0 437 * 438 * Unless required by applicable law or agreed to in writing, software 439 * distributed under the License is distributed on an "AS IS" BASIS, 440 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 441 * See the License for the specific language governing permissions and 442 * limitations under the License. 443 */const sr=new Zd("@firebase/firestore");function gr(){return sr.logLevel}function J(e,...t){if(sr.logLevel<=bt.DEBUG){const n=t.map(fl);sr.debug(`Firestore (${Br}): ${e}`,...n)}}function cn(e,...t){if(sr.logLevel<=bt.ERROR){const n=t.map(fl);sr.error(`Firestore (${Br}): ${e}`,...n)}}function Dn(e,...t){if(sr.logLevel<=bt.WARN){const n=t.map(fl);sr.warn(`Firestore (${Br}): ${e}`,...n)}}function fl(e){if(typeof e=="string")return e;try{/** 444* @license 445* Copyright 2020 Google LLC 446* 447* Licensed under the Apache License, Version 2.0 (the "License"); 448* you may not use this file except in compliance with the License. 449* You may obtain a copy of the License at 450* 451* http://www.apache.org/licenses/LICENSE-2.0 452* 453* Unless required by applicable law or agreed to in writing, software 454* distributed under the License is distributed on an "AS IS" BASIS, 455* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 456* See the License for the specific language governing permissions and 457* limitations under the License. 458*/return(function(n){return JSON.stringify(n)})(e)}catch{return e}}/** 459 * @license 460 * Copyright 2017 Google LLC 461 * 462 * Licensed under the Apache License, Version 2.0 (the "License"); 463 * you may not use this file except in compliance with the License. 464 * You may obtain a copy of the License at 465 * 466 * http://www.apache.org/licenses/LICENSE-2.0 467 * 468 * Unless required by applicable law or agreed to in writing, software 469 * distributed under the License is distributed on an "AS IS" BASIS, 470 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 471 * See the License for the specific language governing permissions and 472 * limitations under the License. 473 */function ct(e,t,n){let r="Unexpected state";typeof t=="string"?r=t:n=t,df(e,r,n)}function df(e,t,n){let r=`FIRESTORE (${Br}) INTERNAL ASSERTION FAILED: ${t} (ID: ${e.toString(16)})`;if(n!==void 0)try{r+=" CONTEXT: "+JSON.stringify(n)}catch{r+=" CONTEXT: "+n}throw cn(r),new Error(r)}function Lt(e,t,n,r){let i="Unexpected state";typeof n=="string"?i=n:r=n,e||df(t,i,r)}function wt(e,t){return e}/** 474 * @license 475 * Copyright 2017 Google LLC 476 * 477 * Licensed under the Apache License, Version 2.0 (the "License");
478 * you may not use this file except in compliance with the License. 479 * You may obtain a copy of the License at 480 * 481 * http://www.apache.org/licenses/LICENSE-2.0 482 * 483 * Unless required by applicable law or agreed to in writing, software 484 * distributed under the License is distributed on an "AS IS" BASIS, 485 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 486 * See the License for the specific language governing permissions and 487 * limitations under the License. 488 */const D={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 H extends Fr{constructor(t,n){super(t,n),this.code=t,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 489 * @license 490 * Copyright 2017 Google LLC 491 * 492 * Licensed under the Apache License, Version 2.0 (the "License"); 493 * you may not use this file except in compliance with the License. 494 * You may obtain a copy of the License at 495 * 496 * http://www.apache.org/licenses/LICENSE-2.0 497 * 498 * Unless required by applicable law or agreed to in writing, software 499 * distributed under the License is distributed on an "AS IS" BASIS, 500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 501 * See the License for the specific language governing permissions and 502 * limitations under the License. 503 */class Cn{constructor(){this.promise=new Promise(((t,n)=>{this.resolve=t,this.reject=n}))}}/** 504 * @license 505 * Copyright 2017 Google LLC 506 * 507 * Licensed under the Apache License, Version 2.0 (the "License"); 508 * you may not use this file except in compliance with the License. 509 * You may obtain a copy of the License at 510 * 511 * http://www.apache.org/licenses/LICENSE-2.0 512 * 513 * Unless required by applicable law or agreed to in writing, software 514 * distributed under the License is distributed on an "AS IS" BASIS, 515 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 516 * See the License for the specific language governing permissions and 517 * limitations under the License. 518 */class ff{constructor(t,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}}class g_{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,n){t.enqueueRetryable((()=>n(ce.UNAUTHENTICATED)))}shutdown(){}}class y_{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,n){this.changeListener=n,t.enqueueRetryable((()=>n(this.token.user)))}shutdown(){this.changeListener=null}}class v_{constructor(t){this.t=t,this.currentUser=ce.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,n){Lt(this.o===void 0,42304);let r=this.i;const i=u=>this.i!==r?(r=this.i,n(u)):Promise.resolve();let s=new Cn;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new Cn,t.enqueueRetryable((()=>i(this.currentUser)))};const a=()=>{const u=s;t.enqueueRetryable((async()=>{await u.promise,await i(this.currentUser)}))},l=u=>{J("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=u,this.o&&(this.auth.addAuthTokenListener(this.o),a())};this.t.onInit((u=>l(u))),setTimeout((()=>{if(!this.auth){const u=this.t.getImmediate({optional:!0});u?l(u):(J("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Cn)}}),0),a()}getToken(){const t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((r=>this.i!==t?(J("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Lt(typeof r.accessToken=="string",31837,{l:r}),new ff(r.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const t=this.auth&&this.auth.getUid();return Lt(t===null||typeof t=="string",2055,{h:t}),new ce(t)}}class __{constructor(t,n,r){this.P=t,this.T=n,this.I=r,this.type="FirstParty",this.user=ce.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);const t=this.R();return t&&this.A.set("Authorization",t),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}}class b_{constructor(t,n,r){this.P=t,this.T=n,this.I=r}getToken(){return Promise.resolve(new __(this.P,this.T,this.I))}start(t,n){t.enqueueRetryable((()=>n(ce.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class Mu{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class w_{constructor(t,n){this.V=n,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,e_(t)&&t.settings.appCheckToken&&(this.p=t.settings.appCheckToken)}start(t,n){Lt(this.o===void 0,3512);const r=s=>{s.error!=null&&J("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const a=s.token!==this.m;return this.m=s.token,J("FirebaseAppCheckTokenProvider",`Received ${a?"new":"existing"} token.`),a?n(s.token):Promise.resolve()};this.o=s=>{t.enqueueRetryable((()=>r(s)))};const i=s=>{J("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((s=>i(s))),setTimeout((()=>
518{if(!this.appCheck){const s=this.V.getImmediate({optional:!0});s?i(s):J("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new Mu(this.p));const t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then((n=>n?(Lt(typeof n.token=="string",44558,{tokenResult:n}),this.m=n.token,new Mu(n.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** 519 * @license 520 * Copyright 2020 Google LLC 521 * 522 * Licensed under the Apache License, Version 2.0 (the "License"); 523 * you may not use this file except in compliance with the License. 524 * You may obtain a copy of the License at 525 * 526 * http://www.apache.org/licenses/LICENSE-2.0 527 * 528 * Unless required by applicable law or agreed to in writing, software 529 * distributed under the License is distributed on an "AS IS" BASIS, 530 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 531 * See the License for the specific language governing permissions and 532 * limitations under the License. 533 */function E_(e){const t=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&typeof t.getRandomValues=="function")t.getRandomValues(n);else for(let r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}/** 534 * @license 535 * Copyright 2023 Google LLC 536 * 537 * Licensed under the Apache License, Version 2.0 (the "License"); 538 * you may not use this file except in compliance with the License. 539 * You may obtain a copy of the License at 540 * 541 * http://www.apache.org/licenses/LICENSE-2.0 542 * 543 * Unless required by applicable law or agreed to in writing, software 544 * distributed under the License is distributed on an "AS IS" BASIS, 545 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 546 * See the License for the specific language governing permissions and 547 * limitations under the License. 548 */function pf(){return new TextEncoder}/** 549 * @license 550 * Copyright 2017 Google LLC 551 * 552 * Licensed under the Apache License, Version 2.0 (the "License"); 553 * you may not use this file except in compliance with the License. 554 * You may obtain a copy of the License at 555 * 556 * http://www.apache.org/licenses/LICENSE-2.0 557 * 558 * Unless required by applicable law or agreed to in writing, software 559 * distributed under the License is distributed on an "AS IS" BASIS, 560 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 561 * See the License for the specific language governing permissions and 562 * limitations under the License. 563 */class pl{static newId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const i=E_(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=t.charAt(i[s]%62))}return r}}function yt(e,t){return e<t?-1:e>t?1:0}function Ra(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=e.codePointAt(n),i=t.codePointAt(n);if(r!==i){if(r<128&&i<128)return yt(r,i);{const s=pf(),a=T_(s.encode(Lu(e,n)),s.encode(Lu(t,n)));return a!==0?a:yt(r,i)}}n+=r>65535?2:1}return yt(e.length,t.length)}function Lu(e,t){return e.codePointAt(t)>65535?e.substring(t,t+2):e.substring(t,t+1)}function T_(e,t){for(let n=0;n<e.length&&n<t.length;++n)if(e[n]!==t[n])return yt(e[n],t[n]);return yt(e.length,t.length)}function Vr(e,t,n){return e.length===t.length&&e.every(((r,i)=>n(r,t[i])))}/** 564 * @license 565 * Copyright 2017 Google LLC 566 * 567 * Licensed under the Apache License, Version 2.0 (the "License"); 568 * you may not use this file except in compliance with the License. 569 * You may obtain a copy of the License at 570 * 571 * http://www.apache.org/licenses/LICENSE-2.0 572 * 573 * Unless required by applicable law or agreed to in writing, software 574 * distributed under the License is distributed on an "AS IS" BASIS, 575 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 576 * See the License for the specific language governing permissions and 577 * limitations under the License. 578 */const Fu="__name__";class $e{constructor(t,n,r){n===void 0?n=0:n>t.length&&ct(637,{offset:n,range:t.length}),r===void 0?r=t.length-n:r>t.length-n&&ct(1746,{length:r,range:t.length-n}),this.segments=t,this.offset=n,this.len=r}get length(){return this.len}isEqual(t){return $e.comparator(this,t)===0}child(t){const n=this.segments.slice(this.offset,this.limit());return t instanceof $e?t.forEach((r=>{n.push(r)})):n.push(t),this.construct(n)}limit(){return this.offset+this.length}popFirst(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)}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(t){return this.segments[this.offset+t]}isEmpty(){return this.length===0}isPrefixOf(t){if(t.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}isImmediateParentOf(t){if(this.length+1!==t.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}forEach(t){for(let n=this.offset,r=this.limit();n<r;n++)t(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(t,n){const r=Math.min(t.length,n.length);for(let i=0;i<r;i++){const s=$e.compareSegments(t.get(i),n.get(i));if(s!==0)return s}return yt(t.length,n.length)}static compareSegments(t,n){const r=$e.isNumericId(t),i=$e.isNumericId(n);return r&&!i?-1:!r&&i?1:r&&i?$e.extractNumericId(t).compare($e.extractNumericId(n)):Ra(t,n)}static isNumericId(t){return t.startsWith("__id")&&t.endsWith("__")}static extractNumericId(t){return Sn.fromString(t.substring(4,t.length-2))}}class Ct extends $e{construct(t,n,r){return new Ct(t,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
578toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){const n=[];for(const r of t){if(r.indexOf("//")>=0)throw new H(D.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter((i=>i.length>0)))}return new Ct(n)}static emptyPath(){return new Ct([])}}const I_=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class fe extends $e{construct(t,n,r){return new fe(t,n,r)}static isValidIdentifier(t){return I_.test(t)}canonicalString(){return this.toArray().map((t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),fe.isValidIdentifier(t)||(t="`"+t+"`"),t))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===Fu}static keyField(){return new fe([Fu])}static fromServerFormat(t){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new H(D.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let a=!1;for(;i<t.length;){const l=t[i];if(l==="\\"){if(i+1===t.length)throw new H(D.INVALID_ARGUMENT,"Path has trailing escape character: "+t);const u=t[i+1];if(u!=="\\"&&u!=="."&&u!=="`")throw new H(D.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=u,i+=2}else l==="`"?(a=!a,i++):l!=="."||a?(r+=l,i++):(s(),i++)}if(s(),a)throw new H(D.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new fe(n)}static emptyPath(){return new fe([])}}/** 579 * @license 580 * Copyright 2017 Google LLC 581 * 582 * Licensed under the Apache License, Version 2.0 (the "License"); 583 * you may not use this file except in compliance with the License. 584 * You may obtain a copy of the License at 585 * 586 * http://www.apache.org/licenses/LICENSE-2.0 587 * 588 * Unless required by applicable law or agreed to in writing, software 589 * distributed under the License is distributed on an "AS IS" BASIS, 590 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 591 * See the License for the specific language governing permissions and 592 * limitations under the License. 593 */class tt{constructor(t){this.path=t}static fromPath(t){return new tt(Ct.fromString(t))}static fromName(t){return new tt(Ct.fromString(t).popFirst(5))}static empty(){return new tt(Ct.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return t!==null&&Ct.comparator(this.path,t.path)===0}toString(){return this.path.toString()}static comparator(t,n){return Ct.comparator(t.path,n.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new tt(new Ct(t.slice()))}}/** 594 * @license 595 * Copyright 2017 Google LLC 596 * 597 * Licensed under the Apache License, Version 2.0 (the "License"); 598 * you may not use this file except in compliance with the License. 599 * You may obtain a copy of the License at 600 * 601 * http://www.apache.org/licenses/LICENSE-2.0 602 * 603 * Unless required by applicable law or agreed to in writing, software 604 * distributed under the License is distributed on an "AS IS" BASIS, 605 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 606 * See the License for the specific language governing permissions and 607 * limitations under the License. 608 */function mf(e,t,n){if(!n)throw new H(D.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function x_(e,t,n,r){if(t===!0&&r===!0)throw new H(D.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}function Bu(e){if(!tt.isDocumentKey(e))throw new H(D.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function ju(e){if(tt.isDocumentKey(e))throw new H(D.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function gf(e){return typeof e=="object"&&e!==null&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function ao(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return""+e;if(typeof e=="object"){if(e instanceof Array)return"an array";{const t=(function(r){return r.constructor?r.constructor.name:null})(e);return t?`a custom ${t} object`:"an object"}}return typeof e=="function"?"a function":ct(12329,{type:typeof e})}function Vi(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new H(D.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=ao(e);throw new H(D.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}function A_(e,t){if(t<=0)throw new H(D.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${t}.`)}/** 609 * @license 610 * Copyright 2025 Google LLC 611 * 612 * Licensed under the Apache License, Version 2.0 (the "License");
613 * you may not use this file except in compliance with the License. 614 * You may obtain a copy of the License at 615 * 616 * http://www.apache.org/licenses/LICENSE-2.0 617 * 618 * Unless required by applicable law or agreed to in writing, software 619 * distributed under the License is distributed on an "AS IS" BASIS, 620 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 621 * See the License for the specific language governing permissions and 622 * limitations under the License. 623 */function Gt(e,t){const n={typeString:e};return t&&(n.value=t),n}function Bi(e,t){if(!gf(e))throw new H(D.INVALID_ARGUMENT,"JSON must be an object");let n;for(const r in t)if(t[r]){const i=t[r].typeString,s="value"in t[r]?{value:t[r].value}:void 0;if(!(r in e)){n=`JSON missing required field: '${r}'`;break}const a=e[r];if(i&&typeof a!==i){n=`JSON field '${r}' must be a ${i}.`;break}if(s!==void 0&&a!==s.value){n=`Expected '${r}' field to equal '${s.value}'`;break}}if(n)throw new H(D.INVALID_ARGUMENT,n);return!0}/** 624 * @license 625 * Copyright 2017 Google LLC 626 * 627 * Licensed under the Apache License, Version 2.0 (the "License"); 628 * you may not use this file except in compliance with the License. 629 * You may obtain a copy of the License at 630 * 631 * http://www.apache.org/licenses/LICENSE-2.0 632 * 633 * Unless required by applicable law or agreed to in writing, software 634 * distributed under the License is distributed on an "AS IS" BASIS, 635 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 636 * See the License for the specific language governing permissions and 637 * limitations under the License. 638 */const Uu=-62135596800,$u=1e6;class Dt{static now(){return Dt.fromMillis(Date.now())}static fromDate(t){return Dt.fromMillis(t.getTime())}static fromMillis(t){const n=Math.floor(t/1e3),r=Math.floor((t-1e3*n)*$u);return new Dt(n,r)}constructor(t,n){if(this.seconds=t,this.nanoseconds=n,n<0)throw new H(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new H(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<Uu)throw new H(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new H(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/$u}_compareTo(t){return this.seconds===t.seconds?yt(this.nanoseconds,t.nanoseconds):yt(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:Dt._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(t){if(Bi(t,Dt._jsonSchema))return new Dt(t.seconds,t.nanoseconds)}valueOf(){const t=this.seconds-Uu;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}Dt._jsonSchemaVersion="firestore/timestamp/1.0",Dt._jsonSchema={type:Gt("string",Dt._jsonSchemaVersion),seconds:Gt("number"),nanoseconds:Gt("number")};/** 639 * @license 640 * Copyright 2017 Google LLC 641 * 642 * Licensed under the Apache License, Version 2.0 (the "License"); 643 * you may not use this file except in compliance with the License. 644 * You may obtain a copy of the License at 645 * 646 * http://www.apache.org/licenses/LICENSE-2.0 647 * 648 * Unless required by applicable law or agreed to in writing, software 649 * distributed under the License is distributed on an "AS IS" BASIS, 650 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 651 * See the License for the specific language governing permissions and 652 * limitations under the License. 653 */class lt{static fromTimestamp(t){return new lt(t)}static min(){return new lt(new Dt(0,0))}static max(){return new lt(new Dt(253402300799,999999999))}constructor(t){this.timestamp=t}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 654 * @license 655 * Copyright 2021 Google LLC 656 * 657 * Licensed under the Apache License, Version 2.0 (the "License");
658 * you may not use this file except in compliance with the License. 659 * You may obtain a copy of the License at 660 * 661 * http://www.apache.org/licenses/LICENSE-2.0 662 * 663 * Unless required by applicable law or agreed to in writing, software 664 * distributed under the License is distributed on an "AS IS" BASIS, 665 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 666 * See the License for the specific language governing permissions and 667 * limitations under the License. 668 */const ki=-1;function S_(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=lt.fromTimestamp(r===1e9?new Dt(n+1,0):new Dt(n,r));return new Nn(i,tt.empty(),t)}function C_(e){return new Nn(e.readTime,e.key,ki)}class Nn{constructor(t,n,r){this.readTime=t,this.documentKey=n,this.largestBatchId=r}static min(){return new Nn(lt.min(),tt.empty(),ki)}static max(){return new Nn(lt.max(),tt.empty(),ki)}}function R_(e,t){let n=e.readTime.compareTo(t.readTime);return n!==0?n:(n=tt.comparator(e.documentKey,t.documentKey),n!==0?n:yt(e.largestBatchId,t.largestBatchId))}/** 669 * @license 670 * Copyright 2020 Google LLC 671 * 672 * Licensed under the Apache License, Version 2.0 (the "License"); 673 * you may not use this file except in compliance with the License. 674 * You may obtain a copy of the License at 675 * 676 * http://www.apache.org/licenses/LICENSE-2.0 677 * 678 * Unless required by applicable law or agreed to in writing, software 679 * distributed under the License is distributed on an "AS IS" BASIS, 680 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 681 * See the License for the specific language governing permissions and 682 * limitations under the License. 683 */const P_="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class V_{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((t=>t()))}}/** 684 * @license 685 * Copyright 2017 Google LLC 686 * 687 * Licensed under the Apache License, Version 2.0 (the "License"); 688 * you may not use this file except in compliance with the License. 689 * You may obtain a copy of the License at 690 * 691 * http://www.apache.org/licenses/LICENSE-2.0 692 * 693 * Unless required by applicable law or agreed to in writing, software 694 * distributed under the License is distributed on an "AS IS" BASIS, 695 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 696 * See the License for the specific language governing permissions and 697 * limitations under the License. 698 */async function lo(e){if(e.code!==D.FAILED_PRECONDITION||e.message!==P_)throw e;J("LocalStore","Unexpectedly lost primary lease")}/** 699 * @license 700 * Copyright 2017 Google LLC 701 * 702 * Licensed under the Apache License, Version 2.0 (the "License"); 703 * you may not use this file except in compliance with the License. 704 * You may obtain a copy of the License at 705 * 706 * http://www.apache.org/licenses/LICENSE-2.0 707 * 708 * Unless required by applicable law or agreed to in writing, software 709 * distributed under the License is distributed on an "AS IS" BASIS, 710 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 711 * See the License for the specific language governing permissions and 712 * limitations under the License. 713 */class k{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((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(t){return this.next(void 0,t)}next(t,n){return this.callbackAttached&&ct(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new k(((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(t,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}}))}toPromise(){return new Promise(((t,n)=>{this.next(t,n)}))}wrapUserFunction(t){try{const n=t();return n instanceof k?n:k.resolve(n)}catch(n){return k.reject(n)}}wrapSuccess(t,n){return t?this.wrapUserFunction((()=>t(n))):k.resolve(n)}wrapFailure(t,n){return t?this.wrapUserFunction((()=>t(n))):k.reject(n)}static resolve(t){return new k(((n,r)=>{n(t)}))}static reject(t){return new k(((n,r)=>{r(t)}))}static waitFor(t){return new k(((n,r)=>{let i=0,s=0,a=!1;t.forEach((l=>{++i,l.next((()=>{++s,a&&s===i&&n()}),(u=>r(u)))})),a=!0,s===i&&n()}))}static or(t){let n=k.resolve(!1);for(const r of t)n=n.next((i=>i?k.resolve(i):r()));return n}static forEach(t,n){const r=[];return t.forEach(((i,s)=>{r.push(n.call(this,i,s))})),this.waitFor(r)}static mapArray(t,n){return new k(((r,i)=>{const s=t.length,a=new Array(s);let l=0;for(let u=0;u<s;u++){const d=u;n(t[d]).next((f=>{a[d]=f,++l,l===s&&r(a)}),(f=>i(f)))}}))}static doWhile(t,n){return new k(((r,i)=>{const s=()=>{t()===!0?n().next((()=>{s()}),i):r()};s()}))}}function k_(e){const t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function jr(e){return e.name==="IndexedDbTransactionError"}/** 714 * @license 715 * Copyright 2018 Google LLC 716 * 717 * Licensed under the Apache License, Version 2.0 (the "License");
718 * you may not use this file except in compliance with the License. 719 * You may obtain a copy of the License at 720 * 721 * http://www.apache.org/licenses/LICENSE-2.0 722 * 723 * Unless required by applicable law or agreed to in writing, software 724 * distributed under the License is distributed on an "AS IS" BASIS, 725 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 726 * See the License for the specific language governing permissions and 727 * limitations under the License. 728 */class co{constructor(t,n){this.previousValue=t,n&&(n.sequenceNumberHandler=r=>this._e(r),this.ae=r=>n.writeSequenceNumber(r))}_e(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.ae&&this.ae(t),t}}co.ue=-1;/** 729 * @license 730 * Copyright 2017 Google LLC 731 * 732 * Licensed under the Apache License, Version 2.0 (the "License"); 733 * you may not use this file except in compliance with the License. 734 * You may obtain a copy of the License at 735 * 736 * http://www.apache.org/licenses/LICENSE-2.0 737 * 738 * Unless required by applicable law or agreed to in writing, software 739 * distributed under the License is distributed on an "AS IS" BASIS, 740 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 741 * See the License for the specific language governing permissions and 742 * limitations under the License. 743 */const D_=-1;function uo(e){return e==null}function Us(e){return e===0&&1/e==-1/0}function N_(e){return typeof e=="number"&&Number.isInteger(e)&&!Us(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}/** 744 * @license 745 * Copyright 2017 Google LLC 746 * 747 * Licensed under the Apache License, Version 2.0 (the "License"); 748 * you may not use this file except in compliance with the License. 749 * You may obtain a copy of the License at 750 * 751 * http://www.apache.org/licenses/LICENSE-2.0 752 * 753 * Unless required by applicable law or agreed to in writing, software 754 * distributed under the License is distributed on an "AS IS" BASIS, 755 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 756 * See the License for the specific language governing permissions and 757 * limitations under the License. 758 */const yf="�";function O_(e){let t="";for(let n=0;n<e.length;n++)t.length>0&&(t=qu(t)),t=M_(e.get(n),t);return qu(t)}function M_(e,t){let n=t;const r=e.length;for(let i=0;i<r;i++){const s=e.charAt(i);switch(s){case"\0":n+="��";break;case yf:n+="��";break;default:n+=s}}return n}function qu(e){return e+yf+"�"}/** 759 * @license 760 * Copyright 2017 Google LLC 761 * 762 * Licensed under the Apache License, Version 2.0 (the "License"); 763 * you may not use this file except in compliance with the License. 764 * You may obtain a copy of the License at 765 * 766 * http://www.apache.org/licenses/LICENSE-2.0 767 * 768 * Unless required by applicable law or agreed to in writing, software 769 * distributed under the License is distributed on an "AS IS" BASIS, 770 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 771 * See the License for the specific language governing permissions and 772 * limitations under the License. 773 */function zu(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ur(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function vf(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}/** 774 * @license 775 * Copyright 2017 Google LLC 776 * 777 * Licensed under the Apache License, Version 2.0 (the "License"); 778 * you may not use this file except in compliance with the License. 779 * You may obtain a copy of the License at 780 * 781 * http://www.apache.org/licenses/LICENSE-2.0 782 * 783 * Unless required by applicable law or agreed to in writing, software 784 * distributed under the License is distributed on an "AS IS" BASIS, 785 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 786 * See the License for the specific language governing permissions and 787 * limitations under the License. 788 */class qt{constructor(t,n){this.comparator=t,this.root=n||te.EMPTY}insert(t,n){return new qt(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,te.BLACK,null,
788null))}remove(t){return new qt(this.comparator,this.root.remove(t,this.comparator).copy(null,null,te.BLACK,null,null))}get(t){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(t,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(t){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(t,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal(((n,r)=>(t(n,r),!1)))}toString(){const t=[];return this.inorderTraversal(((n,r)=>(t.push(`${n}:${r}`),!1))),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new fs(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new fs(this.root,t,this.comparator,!1)}getReverseIterator(){return new fs(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new fs(this.root,t,this.comparator,!0)}}class fs{constructor(t,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!t.isEmpty();)if(s=n?r(t.key,n):1,n&&i&&(s*=-1),s<0)t=this.isReverse?t.left:t.right;else{if(s===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const n={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class te{constructor(t,n,r,i,s){this.key=t,this.value=n,this.color=r??te.RED,this.left=i??te.EMPTY,this.right=s??te.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,n,r,i,s){return new te(t??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}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(t,n,r){let i=this;const s=r(t,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(t,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(t,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return te.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,n){let r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(t,i.key)===0){if(i.right.isEmpty())return te.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,te.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,te.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=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,t,n)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw ct(43730,{key:this.key,value:this.value});
788if(this.right.isRed())throw ct(14113,{key:this.key,value:this.value});const t=this.left.check();if(t!==this.right.check())throw ct(27949);return t+(this.isRed()?0:1)}}te.EMPTY=null,te.RED=!0,te.BLACK=!1;te.EMPTY=new class{constructor(){this.size=0}get key(){throw ct(57766)}get value(){throw ct(16141)}get color(){throw ct(16727)}get left(){throw ct(29726)}get right(){throw ct(36894)}copy(t,n,r,i,s){return this}insert(t,n,r){return new te(t,n)}remove(t,n){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 789 * @license 790 * Copyright 2017 Google LLC 791 * 792 * Licensed under the Apache License, Version 2.0 (the "License"); 793 * you may not use this file except in compliance with the License. 794 * You may obtain a copy of the License at 795 * 796 * http://www.apache.org/licenses/LICENSE-2.0 797 * 798 * Unless required by applicable law or agreed to in writing, software 799 * distributed under the License is distributed on an "AS IS" BASIS, 800 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 801 * See the License for the specific language governing permissions and 802 * limitations under the License. 803 */class Wt{constructor(t){this.comparator=t,this.data=new qt(this.comparator)}has(t){return this.data.get(t)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal(((n,r)=>(t(n),!1)))}forEachInRange(t,n){const r=this.data.getIteratorFrom(t[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,t[1])>=0)return;n(i.key)}}forEachWhile(t,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!t(r.getNext().key))return}firstAfterOrEqual(t){const n=this.data.getIteratorFrom(t);return n.hasNext()?n.getNext().key:null}getIterator(){return new Hu(this.data.getIterator())}getIteratorFrom(t){return new Hu(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let n=this;return n.size<t.size&&(n=t,t=this),t.forEach((r=>{n=n.add(r)})),n}isEqual(t){if(!(t instanceof Wt)||this.size!==t.size)return!1;const n=this.data.getIterator(),r=t.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const t=[];return this.forEach((n=>{t.push(n)})),t}toString(){const t=[];return this.forEach((n=>t.push(n))),"SortedSet("+t.toString()+")"}copy(t){const n=new Wt(this.comparator);return n.data=t,n}}class Hu{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 804 * @license 805 * Copyright 2020 Google LLC 806 * 807 * Licensed under the Apache License, Version 2.0 (the "License"); 808 * you may not use this file except in compliance with the License. 809 * You may obtain a copy of the License at 810 * 811 * http://www.apache.org/licenses/LICENSE-2.0 812 * 813 * Unless required by applicable law or agreed to in writing, software 814 * distributed under the License is distributed on an "AS IS" BASIS, 815 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 816 * See the License for the specific language governing permissions and 817 * limitations under the License. 818 */class En{constructor(t){this.fields=t,t.sort(fe.comparator)}static empty(){return new En([])}unionWith(t){let n=new Wt(fe.comparator);for(const r of this.fields)n=n.add(r);for(const r of t)n=n.add(r);return new En(n.toArray())}covers(t){for(const n of this.fields)if(n.isPrefixOf(t))return!0;return!1}isEqual(t){return Vr(this.fields,t.fields,((n,r)=>n.isEqual(r)))}}/** 819 * @license 820 * Copyright 2023 Google LLC 821 * 822 * Licensed under the Apache License, Version 2.0 (the "License"); 823 * you may not use this file except in compliance with the License. 824 * You may obtain a copy of the License at 825 * 826 * http://www.apache.org/licenses/LICENSE-2.0 827 * 828 * Unless required by applicable law or agreed to in writing, softw
828are 829 * distributed under the License is distributed on an "AS IS" BASIS, 830 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 831 * See the License for the specific language governing permissions and 832 * limitations under the License. 833 */class _f extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 834 * @license 835 * Copyright 2020 Google LLC 836 * 837 * Licensed under the Apache License, Version 2.0 (the "License"); 838 * you may not use this file except in compliance with the License. 839 * You may obtain a copy of the License at 840 * 841 * http://www.apache.org/licenses/LICENSE-2.0 842 * 843 * Unless required by applicable law or agreed to in writing, software 844 * distributed under the License is distributed on an "AS IS" BASIS, 845 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 846 * See the License for the specific language governing permissions and 847 * limitations under the License. 848 */class re{constructor(t){this.binaryString=t}static fromBase64String(t){const n=(function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new _f("Invalid base64 string: "+s):s}})(t);return new re(n)}static fromUint8Array(t){const n=(function(i){let s="";for(let a=0;a<i.length;++a)s+=String.fromCharCode(i[a]);return s})(t);return new re(n)}[Symbol.iterator](){let t=0;return{next:()=>t<this.binaryString.length?{value:this.binaryString.charCodeAt(t++),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 i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r})(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(t){return yt(this.binaryString,t.binaryString)}isEqual(t){return this.binaryString===t.binaryString}}re.EMPTY_BYTE_STRING=new re("");const L_=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function On(e){if(Lt(!!e,39018),typeof e=="string"){let t=0;const n=L_.exec(e);if(Lt(!!n,46558,{timestamp:e}),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),t=Number(i)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:Ut(e.seconds),nanos:Ut(e.nanos)}}function Ut(e){return typeof e=="number"?e:typeof e=="string"?Number(e):0}function Mn(e){return typeof e=="string"?re.fromBase64String(e):re.fromUint8Array(e)}/** 849 * @license 850 * Copyright 2020 Google LLC 851 * 852 * Licensed under the Apache License, Version 2.0 (the "License"); 853 * you may not use this file except in compliance with the License. 854 * You may obtain a copy of the License at 855 * 856 * http://www.apache.org/licenses/LICENSE-2.0 857 * 858 * Unless required by applicable law or agreed to in writing, software 859 * distributed under the License is distributed on an "AS IS" BASIS, 860 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 861 * See the License for the specific language governing permissions and 862 * limitations under the License. 863 */const bf="server_timestamp",wf="__type__",Ef="__previous_value__",Tf="__local_write_time__";function ho(e){var t,n;return((n=(((t=e==null?void 0:e.mapValue)===null||t===void 0?void 0:t.fields)||{})[wf])===null||n===void 0?void 0:n.stringValue)===bf}function fo(e){const t=e.mapValue.fields[Ef];return ho(t)?fo(t):t}function Di(e){const t=On(e.mapValue.fields[Tf].timestampValue);return new Dt(t.seconds,t.nanos)}/** 864 * @license 865 * Copyright 2017 Google LLC 866 * 867 * Licensed under the Apache License, Version 2.0 (the "License"); 868 * you may not use this file except in compliance with the License. 869 * You may obtain a copy of the License at 870 * 871 * http://www.apache.org/licenses/LICENSE-2.0 872 * 873 * Unless required by applicable law or agreed to in writing, software 874 * distributed under the License is distributed on an "AS IS" BASIS, 875 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 876 * See the License for the specific language governing permissions and 877 * limitations under the License. 878 */class F_{constructor(t,n,r,i,s,a,l,u,d,f){this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=a,this.autoDetectLongPolling=l,this.longPollingOptions=u,this.useFetchStreams=d,this.isUsingEmulator=f}}const $s="(default)";class Ni{constructor(t,n){this.projectId=t,this.database=n||$s}static empty(){return new Ni("","")}get isDefaultDatabase(){return this.database===$s}isEqual(t){return t instanceof Ni&&t.projectId===this.projectId&&t.database===this.database}}/** 879 * @license 880 * Copyright 2020 Google LLC 881 * 882 * Licensed under the Apache License, Version 2.0 (the "License");
883 * you may not use this file except in compliance with the License. 884 * You may obtain a copy of the License at 885 * 886 * http://www.apache.org/licenses/LICENSE-2.0 887 * 888 * Unless required by applicable law or agreed to in writing, software 889 * distributed under the License is distributed on an "AS IS" BASIS, 890 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 891 * See the License for the specific language governing permissions and 892 * limitations under the License. 893 */const If="__type__",B_="__max__",ps={mapValue:{}},xf="__vector__",qs="value";function Ln(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?ho(e)?4:U_(e)?9007199254740991:j_(e)?10:11:ct(28295,{value:e})}function Je(e,t){if(e===t)return!0;const n=Ln(e);if(n!==Ln(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Di(e).isEqual(Di(t));case 3:return(function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const a=On(i.timestampValue),l=On(s.timestampValue);return a.seconds===l.seconds&&a.nanos===l.nanos})(e,t);case 5:return e.stringValue===t.stringValue;case 6:return(function(i,s){return Mn(i.bytesValue).isEqual(Mn(s.bytesValue))})(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return(function(i,s){return Ut(i.geoPointValue.latitude)===Ut(s.geoPointValue.latitude)&&Ut(i.geoPointValue.longitude)===Ut(s.geoPointValue.longitude)})(e,t);case 2:return(function(i,s){if("integerValue"in i&&"integerValue"in s)return Ut(i.integerValue)===Ut(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const a=Ut(i.doubleValue),l=Ut(s.doubleValue);return a===l?Us(a)===Us(l):isNaN(a)&&isNaN(l)}return!1})(e,t);case 9:return Vr(e.arrayValue.values||[],t.arrayValue.values||[],Je);case 10:case 11:return(function(i,s){const a=i.mapValue.fields||{},l=s.mapValue.fields||{};if(zu(a)!==zu(l))return!1;for(const u in a)if(a.hasOwnProperty(u)&&(l[u]===void 0||!Je(a[u],l[u])))return!1;return!0})(e,t);default:return ct(52216,{left:e})}}function Oi(e,t){return(e.values||[]).find((n=>Je(n,t)))!==void 0}function kr(e,t){if(e===t)return 0;const n=Ln(e),r=Ln(t);if(n!==r)return yt(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return yt(e.booleanValue,t.booleanValue);case 2:return(function(s,a){const l=Ut(s.integerValue||s.doubleValue),u=Ut(a.integerValue||a.doubleValue);return l<u?-1:l>u?1:l===u?0:isNaN(l)?isNaN(u)?0:-1:1})(e,t);case 3:return Gu(e.timestampValue,t.timestampValue);case 4:return Gu(Di(e),Di(t));case 5:return Ra(e.stringValue,t.stringValue);case 6:return(function(s,a){const l=Mn(s),u=Mn(a);return l.compareTo(u)})(e.bytesValue,t.bytesValue);case 7:return(function(s,a){const l=s.split("/"),u=a.split("/");for(let d=0;d<l.length&&d<u.length;d++){const f=yt(l[d],u[d]);if(f!==0)return f}return yt(l.length,u.length)})(e.referenceValue,t.referenceValue);
893case 8:return(function(s,a){const l=yt(Ut(s.latitude),Ut(a.latitude));return l!==0?l:yt(Ut(s.longitude),Ut(a.longitude))})(e.geoPointValue,t.geoPointValue);case 9:return Ku(e.arrayValue,t.arrayValue);case 10:return(function(s,a){var l,u,d,f;const p=s.fields||{},g=a.fields||{},I=(l=p[qs])===null||l===void 0?void 0:l.arrayValue,R=(u=g[qs])===null||u===void 0?void 0:u.arrayValue,V=yt(((d=I==null?void 0:I.values)===null||d===void 0?void 0:d.length)||0,((f=R==null?void 0:R.values)===null||f===void 0?void 0:f.length)||0);return V!==0?V:Ku(I,R)})(e.mapValue,t.mapValue);case 11:return(function(s,a){if(s===ps.mapValue&&a===ps.mapValue)return 0;if(s===ps.mapValue)return 1;if(a===ps.mapValue)return-1;const l=s.fields||{},u=Object.keys(l),d=a.fields||{},f=Object.keys(d);u.sort(),f.sort();for(let p=0;p<u.length&&p<f.length;++p){const g=Ra(u[p],f[p]);if(g!==0)return g;const I=kr(l[u[p]],d[f[p]]);if(I!==0)return I}return yt(u.length,f.length)})(e.mapValue,t.mapValue);default:throw ct(23264,{le:n})}}function Gu(e,t){if(typeof e=="string"&&typeof t=="string"&&e.length===t.length)return yt(e,t);const n=On(e),r=On(t),i=yt(n.seconds,r.seconds);return i!==0?i:yt(n.nanos,r.nanos)}function Ku(e,t){const n=e.values||[],r=t.values||[];for(let i=0;i<n.length&&i<r.length;++i){const s=kr(n[i],r[i]);if(s)return s}return yt(n.length,r.length)}function Dr(e){return Pa(e)}function Pa(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?(function(n){const r=On(n);return`time(${r.seconds},${r.nanos})`})(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?(function(n){return Mn(n).toBase64()})(e.bytesValue):"referenceValue"in e?(function(n){return tt.fromName(n).toString()})(e.referenceValue):"geoPointValue"in e?(function(n){return`geo(${n.latitude},${n.longitude})`})(e.geoPointValue):"arrayValue"in e?(function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=Pa(s);return r+"]"})(e.arrayValue):"mapValue"in e?(function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const a of r)s?s=!1:i+=",",i+=`${a}:${Pa(n.fields[a])}`;return i+"}"})(e.mapValue):ct(61005,{value:e})}function Is(e){switch(Ln(e)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const t=fo(e);return t?16+Is(t):16;case 5:return 2*e.stringValue.length;case 6:return Mn(e.bytesValue).approximateByteSize();case 7:return e.referenceValue.length;case 9:return(function(r){return(r.values||[]).reduce(((i,s)=>i+Is(s)),0)})(e.arrayValue);case 10:case 11:return(function(r){let i=0;return Ur(r.fields,((s,a)=>{i+=s.length+Is(a)})),i})(e.mapValue);default:throw ct(13486,{value:e})}}function zs(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function Va(e){return!!e&&"integerValue"in e}function ml(e){return!!e&&"arrayValue"in e}function Wu(e){return!!e&&"nullValue"in e}function Qu(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function na(e){return!!e&&"mapValue"in e}function j_(e){var t,n;return((n=(((t=e==null?void 0:e.mapValue)===null||t===void 0?void 0:t.fields)||{})[If])===null||n===void 0?void 0:n.stringValue)===xf}function _i(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&typeof e.timestampValue=="object")return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return Ur(e.mapValue.fields,((n,r)=>t.mapValue.fields[n]=_i(r))),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=_i(e.arrayValue.values[n]);return t}return Object.assign({},e)}function U_(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue===B_}/** 894 * @license 895 * Copyright 2017 Google LLC 896 * 897 * Licensed under the Apache License, Version 2.0 (the "License"); 898 * you may not use this file except in compliance with the License. 899 * You may obtain a copy of the License at 900 * 901 * http://www.apache.org/licenses/LICENSE-2.0 902 * 903 * Unless required by applicable law or agreed to in writing, softw
903are 904 * distributed under the License is distributed on an "AS IS" BASIS, 905 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 906 * See the License for the specific language governing permissions and 907 * limitations under the License. 908 */class ze{constructor(t){this.value=t}static empty(){return new ze({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let n=this.value;for(let r=0;r<t.length-1;++r)if(n=(n.mapValue.fields||{})[t.get(r)],!na(n))return null;return n=(n.mapValue.fields||{})[t.lastSegment()],n||null}}set(t,n){this.getFieldsMap(t.popLast())[t.lastSegment()]=_i(n)}setAll(t){let n=fe.emptyPath(),r={},i=[];t.forEach(((a,l)=>{if(!n.isImmediateParentOf(l)){const u=this.getFieldsMap(n);this.applyChanges(u,r,i),r={},i=[],n=l.popLast()}a?r[l.lastSegment()]=_i(a):i.push(l.lastSegment())}));const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(t){const n=this.field(t.popLast());na(n)&&n.mapValue.fields&&delete n.mapValue.fields[t.lastSegment()]}isEqual(t){return Je(this.value,t.value)}getFieldsMap(t){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<t.length;++r){let i=n.mapValue.fields[t.get(r)];na(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[t.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(t,n,r){Ur(n,((i,s)=>t[i]=s));for(const i of r)delete t[i]}clone(){return new ze(_i(this.value))}}/** 909 * @license 910 * Copyright 2017 Google LLC 911 * 912 * Licensed under the Apache License, Version 2.0 (the "License"); 913 * you may not use this file except in compliance with the License. 914 * You may obtain a copy of the License at 915 * 916 * http://www.apache.org/licenses/LICENSE-2.0 917 * 918 * Unless required by applicable law or agreed to in writing, software 919 * distributed under the License is distributed on an "AS IS" BASIS, 920 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 921 * See the License for the specific language governing permissions and 922 * limitations under the License. 923 */class de{constructor(t,n,r,i,s,a,l){this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=a,this.documentState=l}static newInvalidDocument(t){return new de(t,0,lt.min(),lt.min(),lt.min(),ze.empty(),0)}static newFoundDocument(t,n,r,i){return new de(t,1,n,lt.min(),r,i,0)}static newNoDocument(t,n){return new de(t,2,n,lt.min(),lt.min(),ze.empty(),0)}static newUnknownDocument(t,n){return new de(t,3,n,lt.min(),lt.min(),ze.empty(),2)}convertToFoundDocument(t,n){return!this.createTime.isEqual(lt.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=t),this.version=t,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=ze.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=ze.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=lt.min(),this}setReadTime(t){return this.readTime=t,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(t){return t instanceof de&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}mutableCopy(){return new de(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}})`}}/** 924 * @license 925 * Copyright 2022 Google LLC 926 * 927 * Licensed under the Apache License, Version 2.0 (the "License");
928 * you may not use this file except in compliance with the License. 929 * You may obtain a copy of the License at 930 * 931 * http://www.apache.org/licenses/LICENSE-2.0 932 * 933 * Unless required by applicable law or agreed to in writing, software 934 * distributed under the License is distributed on an "AS IS" BASIS, 935 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 936 * See the License for the specific language governing permissions and 937 * limitations under the License. 938 */class Nr{constructor(t,n){this.position=t,this.inclusive=n}}function Ju(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const s=t[i],a=e.position[i];if(s.field.isKeyField()?r=tt.comparator(tt.fromName(a.referenceValue),n.key):r=kr(a,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function Yu(e,t){if(e===null)return t===null;if(t===null||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!Je(e.position[n],t.position[n]))return!1;return!0}/** 939 * @license 940 * Copyright 2022 Google LLC 941 * 942 * Licensed under the Apache License, Version 2.0 (the "License"); 943 * you may not use this file except in compliance with the License. 944 * You may obtain a copy of the License at 945 * 946 * http://www.apache.org/licenses/LICENSE-2.0 947 * 948 * Unless required by applicable law or agreed to in writing, software 949 * distributed under the License is distributed on an "AS IS" BASIS, 950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 951 * See the License for the specific language governing permissions and 952 * limitations under the License. 953 */class Mi{constructor(t,n="asc"){this.field=t,this.dir=n}}function $_(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}/** 954 * @license 955 * Copyright 2022 Google LLC 956 * 957 * Licensed under the Apache License, Version 2.0 (the "License"); 958 * you may not use this file except in compliance with the License. 959 * You may obtain a copy of the License at 960 * 961 * http://www.apache.org/licenses/LICENSE-2.0 962 * 963 * Unless required by applicable law or agreed to in writing, software 964 * distributed under the License is distributed on an "AS IS" BASIS, 965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 966 * See the License for the specific language governing permissions and 967 * limitations under the License. 968 */class Af{}class Ht extends Af{constructor(t,n,r){super(),this.field=t,this.op=n,this.value=r}static create(t,n,r){return t.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(t,n,r):new z_(t,n,r):n==="array-contains"?new K_(t,r):n==="in"?new W_(t,r):n==="not-in"?new Q_(t,r):n==="array-contains-any"?new J_(t,r):new Ht(t,n,r)}static createKeyFieldInFilter(t,n,r){return n==="in"?new H_(t,r):new G_(t,r)}matches(t){const n=t.data.field(this.field);return this.op==="!="?n!==null&&n.nullValue===void 0&&this.matchesComparison(kr(n,this.value)):n!==null&&Ln(this.value)===Ln(n)&&this.matchesComparison(kr(n,this.value))}matchesComparison(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return t===0;case"!=":return t!==0;case">":return t>0;case">=":return t>=0;default:return ct(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Le extends Af{constructor(t,n){super(),this.filters=t,this.op=n,this.he=null}static create(t,n){return new Le(t,n)}matches(t){return Sf(this)?this.filters.find((n=>!n.matches(t)))===void 0:this.filters.find((n=>n.matches(t)))!==void 0}getFlattenedFilters(){return this.he!==null||(this.he=this.filters.reduce(((t,n)=>t.concat(n.getFlattenedFilters())),[])),this.he}getFilters(){return Object.assign([],this.filters)}}function Sf(e){return e.op==="and"}function Cf(e){return q_(e)&&Sf(e)}function q_(e){for(const t of e.filters)if(t instanceof Le)return!1;return!0}function ka(e){if(e instanceof Ht)return e.field.canonicalString()+e.op.toString()+Dr(e.value);if(Cf(e))return e.filters.map((t=>ka(t))).join(",");{const t=e.filters.map((n=>ka(n))).join(",");return`${e.op}(${t})`}}function Rf(e,t){return e instanceof Ht?(function(r,i){return i instanceof Ht&&r.op===i.op&&r.field.isEqual(i.field)&&Je(r.value,i.value)})(e,t):e instanceof Le?(function(r,i){return i instanceof Le&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce(((s,a,l)=>s&&Rf(a,i.filters[l])),!0):!1})(e,t):void ct(19439)}function Pf(e){return e instanceof Ht?(function(n){return`${n.field.canonicalString()} ${n.op} ${Dr(n.value)}`})(e):e instanceof Le?(function(n){return n.op.toString()+" {"+n.getFilters().map(Pf).join(" ,")+"}"})(e):"Filter"}class z_ extends Ht{constructor(t,n,r){super(t,n,r),this.key=tt.fromName(r.referenceValue)}matches(t){const n=tt.comparator(t.key,this.key);return this.matchesComparison(n)}}class H_ extends Ht{constructor(t,n){super(t,"in",n),this.keys=Vf("in",n)}matches(t){return this.keys.some((n=>n.isEqual(t.key)))}}class G_ extends Ht{constructor(t,n){super(t,"not-in",n),this.keys=Vf("not-in",n)}matches(t){return!this.keys.some((n=>n.isEqual(t.key)))}}function Vf(e,t){var n;return(((n=t.arrayValue)===null||n===void 0?void 0:n.values)||[]).map((r=>tt.fromName(r.referenceValue)))}class K_ extends Ht{constructor(t,n){super(t,"array-contains",n)}matches(t){const n=t.data.field(this.field);return ml(n)&&Oi(n.arrayValue,this.value)}}class W_ extends Ht{constructor(t,n){super(t,"in",n)}matches(t){const n=t.data.field(this.field);return n!==null&&Oi(this.value.arrayValue,n)}}class Q_ extends Ht{constructor(t,n){super(t,"not-in",n)}matches(t){if(Oi(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=t.data.field(this.field);return n!==null&&n.nullValue===void 0&&!Oi(this.value.arrayValue,n)}}class J_ extends Ht{constructor(t,n){super(t,"array-contains-any",n)}matches(t){const n=t.data.field(this.field);return!(!ml(n)||!n.arrayValue.values)&&n.arrayValue.values.some((r=>Oi(this.value.arrayValue,r)))}}/** 969 * @license 970 * Copyright 2019 Google LLC 971 * 972 * Licensed under the Apache License, Version 2.0 (the "License");
973 * you may not use this file except in compliance with the License. 974 * You may obtain a copy of the License at 975 * 976 * http://www.apache.org/licenses/LICENSE-2.0 977 * 978 * Unless required by applicable law or agreed to in writing, software 979 * distributed under the License is distributed on an "AS IS" BASIS, 980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 981 * See the License for the specific language governing permissions and 982 * limitations under the License. 983 */class Y_{constructor(t,n=null,r=[],i=[],s=null,a=null,l=null){this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=a,this.endAt=l,this.Pe=null}}function Xu(e,t=null,n=[],r=[],i=null,s=null,a=null){return new Y_(e,t,n,r,i,s,a)}function gl(e){const t=wt(e);if(t.Pe===null){let n=t.path.canonicalString();t.collectionGroup!==null&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((r=>ka(r))).join(","),n+="|ob:",n+=t.orderBy.map((r=>(function(s){return s.field.canonicalString()+s.dir})(r))).join(","),uo(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map((r=>Dr(r))).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map((r=>Dr(r))).join(",")),t.Pe=n}return t.Pe}function yl(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!$_(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!Rf(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Yu(e.startAt,t.startAt)&&Yu(e.endAt,t.endAt)}function Da(e){return tt.isDocumentKey(e.path)&&e.collectionGroup===null&&e.filters.length===0}/** 984 * @license 985 * Copyright 2017 Google LLC 986 * 987 * Licensed under the Apache License, Version 2.0 (the "License"); 988 * you may not use this file except in compliance with the License. 989 * You may obtain a copy of the License at 990 * 991 * http://www.apache.org/licenses/LICENSE-2.0 992 * 993 * Unless required by applicable law or agreed to in writing, software 994 * distributed under the License is distributed on an "AS IS" BASIS, 995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 996 * See the License for the specific language governing permissions and 997 * limitations under the License. 998 */class ar{constructor(t,n=null,r=[],i=[],s=null,a="F",l=null,u=null){this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=a,this.startAt=l,this.endAt=u,this.Te=null,this.Ie=null,this.de=null,this.startAt,this.endAt}}function X_(e,t,n,r,i,s,a,l){return new ar(e,t,n,r,i,s,a,l)}function vl(e){return new ar(e)}function Zu(e){return e.filters.length===0&&e.limit===null&&e.startAt==null&&e.endAt==null&&(e.explicitOrderBy.length===0||e.explicitOrderBy.length===1&&e.explicitOrderBy[0].field.isKeyField())}function _l(e){return e.collectionGroup!==null}function Ar(e){const t=wt(e);if(t.Te===null){t.Te=[];const n=new Set;for(const s of t.explicitOrderBy)t.Te.push(s),n.add(s.field.canonicalString());const r=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";(function(a){let l=new Wt(fe.comparator);return a.filters.forEach((u=>{u.getFlattenedFilters().forEach((d=>{d.isInequality()&&(l=l.add(d.field))}))})),l})(t).forEach((s=>{n.has(s.canonicalString())||s.isKeyField()||t.Te.push(new Mi(s,r))})),n.has(fe.keyField().canonicalString())||t.Te.push(new Mi(fe.keyField(),r))}return t.Te}function Ke(e){const t=wt(e);return t.Ie||(t.Ie=Z_(t,Ar(e))),t.Ie}function Z_(e,t){if(e.limitType==="F")return Xu(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map((i=>{const s=i.dir==="desc"?"asc":"desc";return new Mi(i.field,s)}));const n=e.endAt?new Nr(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new Nr(e.startAt.position,e.startAt.inclusive):null;return Xu(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}function Na(e,t){const n=e.filters.concat([t]);return new ar(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function Hs(e,t,n){return new ar(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function po(e,t){return yl(Ke(e),Ke(t))&&e.limitType===t.limitType}function kf(e){return`${gl(Ke(e))}|lt:${e.limitType}`}function yr(e){return`Query(target=${(function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map((i=>Pf(i))).join(", ")}]`),uo(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map((i=>(function(a){return`${a.field.canonicalString()} (${a.dir})`})(i))).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map((i=>Dr(i))).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map((i=>Dr(i))).join(",")),`Target(${r})`})(Ke(e))}; limitType=${e.limitType})`}
998function mo(e,t){return t.isFoundDocument()&&(function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):tt.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)})(e,t)&&(function(r,i){for(const s of Ar(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0})(e,t)&&(function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0})(e,t)&&(function(r,i){return!(r.startAt&&!(function(a,l,u){const d=Ju(a,l,u);return a.inclusive?d<=0:d<0})(r.startAt,Ar(r),i)||r.endAt&&!(function(a,l,u){const d=Ju(a,l,u);return a.inclusive?d>=0:d>0})(r.endAt,Ar(r),i))})(e,t)}function tb(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Df(e){return(t,n)=>{let r=!1;for(const i of Ar(e)){const s=eb(i,t,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function eb(e,t,n){const r=e.field.isKeyField()?tt.comparator(t.key,n.key):(function(s,a,l){const u=a.data.field(s),d=l.data.field(s);return u!==null&&d!==null?kr(u,d):ct(42886)})(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return ct(19790,{direction:e.dir})}}/** 999 * @license 1000 * Copyright 2017 Google LLC 1001 * 1002 * Licensed under the Apache License, Version 2.0 (the "License"); 1003 * you may not use this file except in compliance with the License. 1004 * You may obtain a copy of the License at 1005 * 1006 * http://www.apache.org/licenses/LICENSE-2.0 1007 * 1008 * Unless required by applicable law or agreed to in writing, software 1009 * distributed under the License is distributed on an "AS IS" BASIS, 1010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1011 * See the License for the specific language governing permissions and 1012 * limitations under the License. 1013 */class lr{constructor(t,n){this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}get(t){const n=this.mapKeyFn(t),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,t))return s}}has(t){return this.get(t)!==void 0}set(t,n){const r=this.mapKeyFn(t),i=this.inner[r];if(i===void 0)return this.inner[r]=[[t,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],t))return void(i[s]=[t,n]);i.push([t,n]),this.innerSize++}delete(t){const n=this.mapKeyFn(t),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],t))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(t){Ur(this.inner,((n,r)=>{for(const[i,s]of r)t(i,s)}))}isEmpty(){return vf(this.inner)}size(){return this.innerSize}}/** 1014 * @license 1015 * Copyright 2017 Google LLC 1016 * 1017 * Licensed under the Apache License, Version 2.0 (the "License"); 1018 * you may not use this file except in compliance with the License. 1019 * You may obtain a copy of the License at 1020 * 1021 * http://www.apache.org/licenses/LICENSE-2.0 1022 * 1023 * Unless required by applicable law or agreed to in writing, software 1024 * distributed under the License is distributed on an "AS IS" BASIS, 1025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1026 * See the License for the specific language governing permissions and 1027 * limitations under the License. 1028 */const nb=new qt(tt.comparator);function Fn(){return nb}const Nf=new qt(tt.comparator);function li(...e){let t=Nf;for(const n of e)t=t.insert(n.key,n);return t}function rb(e){let t=Nf;return e.forEach(((n,r)=>t=t.insert(n,r.overlayedDocument))),t}function tr(){return bi()}function Of(){return bi()}function bi(){return new lr((e=>e.toString()),((e,t)=>e.isEqual(t)))}const ib=new Wt(tt.comparator);function Et(...e){let t=ib;for(const n of e)t=t.add(n);return t}const sb=new Wt(yt);function ob(){return sb}/** 1029 * @license 1030 * Copyright 2020 Google LLC 1031 * 1032 * Licensed under the Apache License, Version 2.0 (the "License"); 1033 * you may not use this file except in compliance with the License. 1034 * You may obtain a copy of the License at 1035 * 1036 * http://www.apache.org/licenses/LICENSE-2.0 1037 * 1038 * Unless required by applicable law or agreed to in writing, software 1039 * distributed under the License is distributed on an "AS IS" BASIS, 1040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1041 * See the License for the specific language governing permissions and 1042 * limitations under the License. 1043 */function bl(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Us(t)?"-0":t}}function Mf(e){return{integerValue:""+e}}function ab(e,t){return N_(t)?Mf(t):bl(e,t)}/** 1044 * @license 1045 * Copyright 2018 Google LLC 1046 * 1047 * Licensed under the Apache License, Version 2.0 (the "License");
1048 * you may not use this file except in compliance with the License. 1049 * You may obtain a copy of the License at 1050 * 1051 * http://www.apache.org/licenses/LICENSE-2.0 1052 * 1053 * Unless required by applicable law or agreed to in writing, software 1054 * distributed under the License is distributed on an "AS IS" BASIS, 1055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1056 * See the License for the specific language governing permissions and 1057 * limitations under the License. 1058 */class go{constructor(){this._=void 0}}function lb(e,t,n){return e instanceof Oa?(function(i,s){const a={fields:{[wf]:{stringValue:bf},[Tf]:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&ho(s)&&(s=fo(s)),s&&(a.fields[Ef]=s),{mapValue:a}})(n,t):e instanceof Gs?Lf(e,t):e instanceof Ks?Ff(e,t):(function(i,s){const a=ub(i,s),l=th(a)+th(i.Ee);return Va(a)&&Va(i.Ee)?Mf(l):bl(i.serializer,l)})(e,t)}function cb(e,t,n){return e instanceof Gs?Lf(e,t):e instanceof Ks?Ff(e,t):n}function ub(e,t){return e instanceof Ma?(function(r){return Va(r)||(function(s){return!!s&&"doubleValue"in s})(r)})(t)?t:{integerValue:0}:null}class Oa extends go{}class Gs extends go{constructor(t){super(),this.elements=t}}function Lf(e,t){const n=Bf(t);for(const r of e.elements)n.some((i=>Je(i,r)))||n.push(r);return{arrayValue:{values:n}}}class Ks extends go{constructor(t){super(),this.elements=t}}function Ff(e,t){let n=Bf(t);for(const r of e.elements)n=n.filter((i=>!Je(i,r)));return{arrayValue:{values:n}}}class Ma extends go{constructor(t,n){super(),this.serializer=t,this.Ee=n}}function th(e){return Ut(e.integerValue||e.doubleValue)}function Bf(e){return ml(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}function hb(e,t){return e.field.isEqual(t.field)&&(function(r,i){return r instanceof Gs&&i instanceof Gs||r instanceof Ks&&i instanceof Ks?Vr(r.elements,i.elements,Je):r instanceof Ma&&i instanceof Ma?Je(r.Ee,i.Ee):r instanceof Oa&&i instanceof Oa})(e.transform,t.transform)}class nr{constructor(t,n){this.updateTime=t,this.exists=n}static none(){return new nr}static exists(t){return new nr(void 0,t)}static updateTime(t){return new nr(t)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function xs(e,t){return e.updateTime!==void 0?t.isFoundDocument()&&t.version.isEqual(e.updateTime):e.exists===void 0||e.exists===t.isFoundDocument()}class wl{}function jf(e,t){if(!e.hasLocalMutations||t&&t.fields.length===0)return null;if(t===null)return e.isNoDocument()?new fb(e.key,nr.none()):new El(e.key,e.data,nr.none());{const n=e.data,r=ze.empty();let i=new Wt(fe.comparator);for(let s of t.fields)if(!i.has(s)){let a=n.field(s);a===null&&s.length>1&&(s=s.popLast(),a=n.field(s)),a===null?r.delete(s):r.set(s,a),i=i.add(s)}return new yo(e.key,r,new En(i.toArray()),nr.none())}}function db(e,t,n){e instanceof El?(function(i,s,a){const l=i.value.clone(),u=nh(i.fieldTransforms,s,a.transformResults);l.setAll(u),s.convertToFoundDocument(a.version,l).setHasCommittedMutations()})(e,t,n):e instanceof yo?(function(i,s,a){if(!xs(i.precondition,s))return void s.convertToUnknownDocument(a.version);const l=nh(i.fieldTransforms,s,a.transformResults),u=s.data;u.setAll(Uf(i)),u.setAll(l),s.convertToFoundDocument(a.version,u).setHasCommittedMutations()})(e,t,n):(function(i,s,a){s.convertToNoDocument(a.version).setHasCommittedMutations()})(0,t,n)}function wi(e,t,n,r){return e instanceof El?(function(s,a,l,u){if(!xs(s.precondition,a))return l;const d=s.value.clone(),f=rh(s.fieldTransforms,u,a);return d.setAll(f),a.convertToFoundDocument(a.version,d).setHasLocalMutations(),null})(e,t,n,r):e instanceof yo?(function(s,a,l,u){if(!xs(s.precondition,a))return l;const d=rh(s.fieldTransforms,u,a),f=a.data;return f.setAll(Uf(s)),f.setAll(d),a.convertToFoundDocument(a.version,f).setHasLocalMutations(),l===null?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map((p=>p.field)))})(e,t,n,r):(function(s,a,l){return xs(s.precondition,a)?(a.convertToNoDocument(a.version).setHasLocalMutations(),null):l}
1058)(e,t,n)}function eh(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!(function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&Vr(r,i,((s,a)=>hb(s,a)))})(e.fieldTransforms,t.fieldTransforms)&&(e.type===0?e.value.isEqual(t.value):e.type!==1||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class El extends wl{constructor(t,n,r,i=[]){super(),this.key=t,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class yo extends wl{constructor(t,n,r,i,s=[]){super(),this.key=t,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function Uf(e){const t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}})),t}function nh(e,t,n){const r=new Map;Lt(e.length===n.length,32656,{Ae:n.length,Re:e.length});for(let i=0;i<n.length;i++){const s=e[i],a=s.transform,l=t.data.field(s.field);r.set(s.field,cb(a,l,n[i]))}return r}function rh(e,t,n){const r=new Map;for(const i of e){const s=i.transform,a=n.data.field(i.field);r.set(i.field,lb(s,a,t))}return r}class fb extends wl{constructor(t,n){super(),this.key=t,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}/** 1059 * @license 1060 * Copyright 2017 Google LLC 1061 * 1062 * Licensed under the Apache License, Version 2.0 (the "License"); 1063 * you may not use this file except in compliance with the License. 1064 * You may obtain a copy of the License at 1065 * 1066 * http://www.apache.org/licenses/LICENSE-2.0 1067 * 1068 * Unless required by applicable law or agreed to in writing, software 1069 * distributed under the License is distributed on an "AS IS" BASIS, 1070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1071 * See the License for the specific language governing permissions and 1072 * limitations under the License. 1073 */class pb{constructor(t,n,r,i){this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(t,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(t.key)&&db(s,t,r[i])}}applyToLocalView(t,n){for(const r of this.baseMutations)r.key.isEqual(t.key)&&(n=wi(r,t,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(t.key)&&(n=wi(r,t,n,this.localWriteTime));return n}applyToLocalDocumentSet(t,n){const r=Of();return this.mutations.forEach((i=>{const s=t.get(i.key),a=s.overlayedDocument;let l=this.applyToLocalView(a,s.mutatedFields);l=n.has(i.key)?null:l;const u=jf(a,l);u!==null&&r.set(i.key,u),a.isValidDocument()||a.convertToNoDocument(lt.min())})),r}keys(){return this.mutations.reduce(((t,n)=>t.add(n.key)),Et())}isEqual(t){return this.batchId===t.batchId&&Vr(this.mutations,t.mutations,((n,r)=>eh(n,r)))&&Vr(this.baseMutations,t.baseMutations,((n,r)=>eh(n,r)))}}/** 1074 * @license 1075 * Copyright 2022 Google LLC 1076 * 1077 * Licensed under the Apache License, Version 2.0 (the "License"); 1078 * you may not use this file except in compliance with the License. 1079 * You may obtain a copy of the License at 1080 * 1081 * http://www.apache.org/licenses/LICENSE-2.0 1082 * 1083 * Unless required by applicable law or agreed to in writing, software 1084 * distributed under the License is distributed on an "AS IS" BASIS, 1085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1086 * See the License for the specific language governing permissions and 1087 * limitations under the License. 1088 */class mb{constructor(t,n){this.largestBatchId=t,this.mutation=n}getKey(){return this.mutation.key}isEqual(t){return t!==null&&this.mutation===t.mutation}toString(){return`Overlay{ 1089 largestBatchId: ${this.largestBatchId}, 1090 mutation: ${this.mutation.toString()} 1091 }`}}/** 1092 * @license 1093 * Copyright 2017 Google LLC 1094 * 1095 * Licensed under the Apache License, Version 2.0 (the "License"); 1096 * you may not use this file except in compliance with the License. 1097 * You may obtain a copy of the License at 1098 * 1099 * http://www.apache.org/licenses/LICENSE-2.0 1100 * 1101 * Unless required by applicable law or agreed to in writing, softw
1101are 1102 * distributed under the License is distributed on an "AS IS" BASIS, 1103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1104 * See the License for the specific language governing permissions and 1105 * limitations under the License. 1106 */class gb{constructor(t,n){this.count=t,this.unchangedNames=n}}/** 1107 * @license 1108 * Copyright 2017 Google LLC 1109 * 1110 * Licensed under the Apache License, Version 2.0 (the "License"); 1111 * you may not use this file except in compliance with the License. 1112 * You may obtain a copy of the License at 1113 * 1114 * http://www.apache.org/licenses/LICENSE-2.0 1115 * 1116 * Unless required by applicable law or agreed to in writing, software 1117 * distributed under the License is distributed on an "AS IS" BASIS, 1118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1119 * See the License for the specific language governing permissions and 1120 * limitations under the License. 1121 */var zt,_t;function $f(e){if(e===void 0)return cn("GRPC error has no .code"),D.UNKNOWN;switch(e){case zt.OK:return D.OK;case zt.CANCELLED:return D.CANCELLED;case zt.UNKNOWN:return D.UNKNOWN;case zt.DEADLINE_EXCEEDED:return D.DEADLINE_EXCEEDED;case zt.RESOURCE_EXHAUSTED:return D.RESOURCE_EXHAUSTED;case zt.INTERNAL:return D.INTERNAL;case zt.UNAVAILABLE:return D.UNAVAILABLE;case zt.UNAUTHENTICATED:return D.UNAUTHENTICATED;case zt.INVALID_ARGUMENT:return D.INVALID_ARGUMENT;case zt.NOT_FOUND:return D.NOT_FOUND;case zt.ALREADY_EXISTS:return D.ALREADY_EXISTS;case zt.PERMISSION_DENIED:return D.PERMISSION_DENIED;case zt.FAILED_PRECONDITION:return D.FAILED_PRECONDITION;case zt.ABORTED:return D.ABORTED;case zt.OUT_OF_RANGE:return D.OUT_OF_RANGE;case zt.UNIMPLEMENTED:return D.UNIMPLEMENTED;case zt.DATA_LOSS:return D.DATA_LOSS;default:return ct(39323,{code:e})}}(_t=zt||(zt={}))[_t.OK=0]="OK",_t[_t.CANCELLED=1]="CANCELLED",_t[_t.UNKNOWN=2]="UNKNOWN",_t[_t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_t[_t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_t[_t.NOT_FOUND=5]="NOT_FOUND",_t[_t.ALREADY_EXISTS=6]="ALREADY_EXISTS",_t[_t.PERMISSION_DENIED=7]="PERMISSION_DENIED",_t[_t.UNAUTHENTICATED=16]="UNAUTHENTICATED",_t[_t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_t[_t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_t[_t.ABORTED=10]="ABORTED",_t[_t.OUT_OF_RANGE=11]="OUT_OF_RANGE",_t[_t.UNIMPLEMENTED=12]="UNIMPLEMENTED",_t[_t.INTERNAL=13]="INTERNAL",_t[_t.UNAVAILABLE=14]="UNAVAILABLE",_t[_t.DATA_LOSS=15]="DATA_LOSS";/** 1122 * @license 1123 * Copyright 2022 Google LLC 1124 * 1125 * Licensed under the Apache License, Version 2.0 (the "License"); 1126 * you may not use this file except in compliance with the License. 1127 * You may obtain a copy of the License at 1128 * 1129 * http://www.apache.org/licenses/LICENSE-2.0 1130 * 1131 * Unless required by applicable law or agreed to in writing, software 1132 * distributed under the License is distributed on an "AS IS" BASIS, 1133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1134 * See the License for the specific language governing permissions and 1135 * limitations under the License. 1136 */const yb=new Sn([4294967295,4294967295],0);function ih(e){const t=pf().encode(e),n=new of;return n.update(t),new Uint8Array(n.digest())}function sh(e){const t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),s=t.getUint32(12,!0);return[new Sn([n,r],0),new Sn([i,s],0)]}class Tl{constructor(t,n,r){if(this.bitmap=t,this.padding=n,this.hashCount=r,n<0||n>=8)throw new ci(`Invalid padding: ${n}`);if(r<0)throw new ci(`Invalid hash count: ${r}`);if(t.length>0&&this.hashCount===0)throw new ci(`Invalid hash count: ${r}`);if(t.length===0&&n!==0)throw new ci(`Invalid padding when bitmap length is 0: ${n}`);this.fe=8*t.length-n,this.ge=Sn.fromNumber(this.fe)}pe(t,n,r){let i=t.add(n.multiply(Sn.fromNumber(r)));return i.compare(yb)===1&&(i=new Sn([i.getBits(0),i.getBits(1)],0)),i.modulo(this.ge).toNumber()}ye(t){return!!(this.bitmap[Math.floor(t/8)]&1<<t%8)}mightContain(t){if(this.fe===0)return!1;const n=ih(t),[r,i]=sh(n);for(let s=0;s<this.hashCount;s++){const a=this.pe(r,i,s);if(!this.ye(a))return!1}return!0}static create(t,n,r){const i=t%8==0?0:8-t%8,s=new Uint8Array(Math.ceil(t/8)),a=new Tl(s,i,n);return r.forEach((l=>a.insert(l))),a}insert(t){if(this.fe===0)return;const n=ih(t),[r,i]=sh(n);for(let s=0;s<this.hashCount;s++){const a=this.pe(r,i,s);this.we(a)}}we(t){const n=Math.floor(t/8),r=t%8;this.bitmap[n]|=1<<r}}
1136class ci extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** 1137 * @license 1138 * Copyright 2017 Google LLC 1139 * 1140 * Licensed under the Apache License, Version 2.0 (the "License"); 1141 * you may not use this file except in compliance with the License. 1142 * You may obtain a copy of the License at 1143 * 1144 * http://www.apache.org/licenses/LICENSE-2.0 1145 * 1146 * Unless required by applicable law or agreed to in writing, software 1147 * distributed under the License is distributed on an "AS IS" BASIS, 1148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1149 * See the License for the specific language governing permissions and 1150 * limitations under the License. 1151 */class vo{constructor(t,n,r,i,s){this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(t,n,r){const i=new Map;return i.set(t,ji.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new vo(lt.min(),i,new qt(yt),Fn(),Et())}}class ji{constructor(t,n,r,i,s){this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(t,n,r){return new ji(r,n,Et(),Et(),Et())}}/** 1152 * @license 1153 * Copyright 2017 Google LLC 1154 * 1155 * Licensed under the Apache License, Version 2.0 (the "License"); 1156 * you may not use this file except in compliance with the License. 1157 * You may obtain a copy of the License at 1158 * 1159 * http://www.apache.org/licenses/LICENSE-2.0 1160 * 1161 * Unless required by applicable law or agreed to in writing, software 1162 * distributed under the License is distributed on an "AS IS" BASIS, 1163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1164 * See the License for the specific language governing permissions and 1165 * limitations under the License. 1166 */class As{constructor(t,n,r,i){this.Se=t,this.removedTargetIds=n,this.key=r,this.be=i}}class qf{constructor(t,n){this.targetId=t,this.De=n}}class zf{constructor(t,n,r=re.EMPTY_BYTE_STRING,i=null){this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i}}class oh{constructor(){this.ve=0,this.Ce=ah(),this.Fe=re.EMPTY_BYTE_STRING,this.Me=!1,this.xe=!0}get current(){return this.Me}get resumeToken(){return this.Fe}get Oe(){return this.ve!==0}get Ne(){return this.xe}Be(t){t.approximateByteSize()>0&&(this.xe=!0,this.Fe=t)}Le(){let t=Et(),n=Et(),r=Et();return this.Ce.forEach(((i,s)=>{switch(s){case 0:t=t.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:ct(38017,{changeType:s})}})),new ji(this.Fe,this.Me,t,n,r)}ke(){this.xe=!1,this.Ce=ah()}qe(t,n){this.xe=!0,this.Ce=this.Ce.insert(t,n)}Qe(t){this.xe=!0,this.Ce=this.Ce.remove(t)}$e(){this.ve+=1}Ue(){this.ve-=1,Lt(this.ve>=0,3241,{ve:this.ve})}Ke(){this.xe=!0,this.Me=!0}}class vb{constructor(t){this.We=t,this.Ge=new Map,this.ze=Fn(),this.je=ms(),this.Je=ms(),this.He=new qt(yt)}Ye(t){for(const n of t.Se)t.be&&t.be.isFoundDocument()?this.Ze(n,t.be):this.Xe(n,t.key,t.be);for(const n of t.removedTargetIds)this.Xe(n,t.key,t.be)}et(t){this.forEachTarget(t,(n=>{const r=this.tt(n);switch(t.state){case 0:this.nt(n)&&r.Be(t.resumeToken);break;case 1:r.Ue(),r.Oe||r.ke(),r.Be(t.resumeToken);break;case 2:r.Ue(),r.Oe||this.removeTarget(n);break;case 3:this.nt(n)&&(r.Ke(),r.Be(t.resumeToken));break;case 4:this.nt(n)&&(this.rt(n),r.Be(t.resumeToken));break;default:ct(56790,{state:t.state})}}))}forEachTarget(t,n){t.targetIds.length>0?t.targetIds.forEach(n):this.Ge.forEach(((r,i)=>{this.nt(i)&&n(i)}))}it(t){const n=t.targetId,r=t.De.count,i=this.st(n);if(i){const s=i.target;if(Da(s))if(r===0){const a=new tt(s.path);this.Xe(n,a,de.newNoDocument(a,lt.min()))}else Lt(r===1,20013,{expectedCount:r});else{const a=this.ot(n);if(a!==r){const l=this._t(t),u=l?this.ut(l,t,a):1;if(u!==0){this.rt(n);const d=u===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.He=this.He.insert(n,d)}}}}}_t(t){const n=t.De.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let a,l;try{a=Mn(r).toUint8Array()}catch(u){if(u instanceof _f)return Dn("Decoding the base64 bloom filter in existence filter failed ("+u.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw u}try{l=new Tl(a,i,s)}catch(u){return Dn(u instanceof ci?"BloomFilter error: ":"Applying bloom filter failed: ",u),null}return l.fe===0?null:l}ut(t,n,r){return n.De.count===r-this.ht(t,n.targetId)?0:2}ht(t,n){const r=this.We.getRemoteKeysForTarget(n);let i=0;return r.forEach((s=>{const a=this.We.lt(),l=`projects/${a.projectId}/databases/${a.database}/documents/${s.path.canonicalString()}`;t.mightContain(l)||(this.Xe(n,s,null),i++)})),i}Pt(t){const n=new Map;this.Ge.forEach(((s,a)=>{const l=this.st(a);if(l){if(s.current&&Da(l.target)){const u=new tt(l.target.path);this.Tt(u).has(a)||this.It(a,u)||this.Xe(a,u,de.newNoDocument(u,t))}s.Ne&&(n.set(a,s.Le()),s.ke())}}));let r=Et();this.Je.forEach(((s,a)=>{let l=!0;a.forEachWhile((u=>{const d=this.st(u);return!d||d.purpose==="TargetPurposeLimboResolution"||(l=!1,!1)})),l&&(r=r.add(s))})),this.ze.forEach(((s,a)=>a.setReadTime(t)));const i=new vo(t,n,this.He,this.ze,r);return this.ze=Fn(),this.je=ms(),this.Je=ms(),this.He=new qt(yt),i}Ze(t,n){if(!this.nt(t))return;const r=this.It(t,n.key)?2:0;this.tt(t).qe(n.key,r),this.ze=this.ze.insert(n.key,n),this.je=this.je.insert(n.key,this.Tt(n.key).add(t)),this.Je=this.Je.insert(n.key,this.dt(n.key).add(t))}Xe(t,n,r){if(!this.nt(t))return;const i=this.tt(t);this.It(t,n)?i.qe(n,1):i.Qe(n),this.Je=this.Je.insert(n,this.dt(n).delete(t)),this.Je=this.Je.insert(n,this.dt(n).add(t)),r&&(this.ze=this.ze.insert(n,r))}removeTarget(t){this.Ge.delete(t)}ot(t){const n=this.tt(t).Le();return this.We.getRemoteKeysForTarget(t).size+n.addedDocuments.size-n.removedDocuments.size}$e(t){this.tt(t).$e()}tt(t){let n=this.Ge.get(t);return n||(n=new oh,this.Ge.set(t,n)),n}dt(t){let n=this.Je.get(t);return n||(n=new Wt(yt),this.Je=this.Je.insert(t,n)),n}Tt(t){let n=this.je.get(t);return n||(n=new Wt(yt),this.je=this.je.insert(t,n)),n}nt(t){const n=this.st(t)!==null;return n||J("WatchChangeAggregator","Detected inactive target",t),n}st(t){const n=this.Ge.get(t);return n&&n.Oe?null:this.We.Et(t)}rt(t){this.Ge.set(t,new oh),this.We.getRemoteKeysForTarget(t).forEach((n=>{this.Xe(t,n,null)}))}It(t,n){return this.We.getRemoteKeysForTarget(t).has(n)}}function ms(){return new qt(tt.comparator)}function ah(){return new qt(tt.comparator)}const _b={asc:"ASCENDING",desc:"DESCENDING"},bb={"<":"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"},wb={and:"AND",or:"OR"};class Eb{constructor(t,n){this.databaseId=t,this.useProto3Json=n}}function La(e,t){return e.useProto3Json||uo(t)?t:{value:t}}function Fa(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function Hf(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function Sr(e){return Lt(!!e,49232),lt.fromTimestamp((function(n){const r=On(n);return new Dt(r.seconds,r.nanos)})(e))}function Gf(e,t){return Ba(e,t).canonicalString()}function Ba(e,t){const n=(function(i){return new Ct(["projects",i.projectId,"databases",i.database])})(e).child("documents");return t===void 0?n:n.child(t)}function Kf(e){const t=Ct.fromString(e);return Lt(Xf(t),10190,{key:t.toString()}),t}function ra(e,t){const n=Kf(t);if(n.get(1)!==e.databaseId.projectId)throw new H(D.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new H(D.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new tt(Qf(n))}function Wf(e,t){return Gf(e.databaseId,t)}function Tb(e){const t=Kf(e);return t.length===4?Ct.emptyPath():Qf(t)}function lh(e){return new Ct(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Qf(e){return Lt(e.length>4&&e.get(4)==="documents",29091,{key:e.toString()}),e.popFirst(5)}function Ib(e,t){let n;if("targetChange"in t){t.targetChange;const r=(function(d){return d==="NO_CHANGE"?0:d==="ADD"?1:d==="REMOVE"?2:d==="CURRENT"?3:d==="RESET"?4:ct(39313,{state:d})})(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],s=(function(d,f){return d.useProto3Json?(Lt(f===void 0||typeof f=="string",58123),re.fromBase64String(f||"")):(Lt(f===void 0||f instanceof Buffer||f instanceof Uint8Array,16193),re.fromUint8Array(f||new Uint8Array))})(e,t.targetChange.resumeToken),a=t.targetChange.cause,l=a&&(function(d){const f=d.code===void 0?D.UNKNOWN:$f(d.code);return new H(f,d.message||"")})(a);n=new zf(r,i,s,l||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=ra(e,r.document.name),s=Sr(r.document.updateTime),a=r.document.createTime?Sr(r.document.createTime):lt.min(),l=new ze({mapValue:{fields:r.document.fields}}),u=de.newFoundDocument(i,s,a,l),d=r.targetIds||[],f=r.removedTargetIds||[];n=new As(d,f,u.key,u)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=ra(e,r.document),s=r.readTime?Sr(r.readTime):lt.min(),a=de.newNoDocument(i,s),l=r.removedTargetIds||[];n=new As([],l,a.key,a)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=ra(e,r.document),s=r.removedTargetIds||[];n=new As([],s,i,null)}else{if(!("filter"in t))return ct(11601,{At:t});{t.filter;const r=t.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,a=new gb(i,s),l=r.targetId;n=new qf(l,a)}}return n}function xb(e,t){return{documents:[Wf(e,t.path)]}}function Ab(e,t){const n={structuredQuery:{}},r=t.path;let i;t.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=Wf(e,i);const s=(function(d){if(d.length!==0)return Yf(Le.create(d,"and"))})(t.filters);s&&(n.structuredQuery.where=s);const a=(function(d){if(d.length!==0)return d.map((f=>(function(g){return{field:vr(g.field),direction:Rb(g.dir)}})(f)))})(t.orderBy);a&&(n.structuredQuery.orderBy=a);const l=La(e,t.limit);return l!==null&&(n.structuredQuery.limit=l),t.startAt&&(n.structuredQuery.startAt=(function(d){return{before:d.inclusive,values:d.position}})(t.startAt)),t.endAt&&(n.structuredQuery.endAt=(function(d){return{before:!d.inclusive,values:d.position}})(t.endAt)),{Vt:n,parent:i}}function Sb(e){let t=Tb(e.parent);
1166const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Lt(r===1,65062);const f=n.from[0];f.allDescendants?i=f.collectionId:t=t.child(f.collectionId)}let s=[];n.where&&(s=(function(p){const g=Jf(p);return g instanceof Le&&Cf(g)?g.getFilters():[g]})(n.where));let a=[];n.orderBy&&(a=(function(p){return p.map((g=>(function(R){return new Mi(_r(R.field),(function(O){switch(O){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}})(R.direction))})(g)))})(n.orderBy));let l=null;n.limit&&(l=(function(p){let g;return g=typeof p=="object"?p.value:p,uo(g)?null:g})(n.limit));let u=null;n.startAt&&(u=(function(p){const g=!!p.before,I=p.values||[];return new Nr(I,g)})(n.startAt));let d=null;return n.endAt&&(d=(function(p){const g=!p.before,I=p.values||[];return new Nr(I,g)})(n.endAt)),X_(t,i,a,s,l,"F",u,d)}function Cb(e,t){const n=(function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return ct(28987,{purpose:i})}})(t.purpose);return n==null?null:{"goog-listen-tags":n}}function Jf(e){return e.unaryFilter!==void 0?(function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=_r(n.unaryFilter.field);return Ht.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=_r(n.unaryFilter.field);return Ht.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=_r(n.unaryFilter.field);return Ht.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const a=_r(n.unaryFilter.field);return Ht.create(a,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return ct(61313);default:return ct(60726)}})(e):e.fieldFilter!==void 0?(function(n){return Ht.create(_r(n.fieldFilter.field),(function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return ct(58110);default:return ct(50506)}})(n.fieldFilter.op),n.fieldFilter.value)})(e):e.compositeFilter!==void 0?(function(n){return Le.create(n.compositeFilter.filters.map((r=>Jf(r))),(function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return ct(1026)}})(n.compositeFilter.op))})(e):ct(30097,{filter:e})}function Rb(e){return _b[e]}function Pb(e){return bb[e]}function Vb(e){return wb[e]}function vr(e){return{fieldPath:e.canonicalString()}}function _r(e){return fe.fromServerFormat(e.fieldPath)}function Yf(e){return e instanceof Ht?(function(n){if(n.op==="=="){if(Qu(n.value))return{unaryFilter:{field:vr(n.field),op:"IS_NAN"}};if(Wu(n.value))return{unaryFilter:{field:vr(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(Qu(n.value))return{unaryFilter:{field:vr(n.field),op:"IS_NOT_NAN"}};if(Wu(n.value))return{unaryFilter:{field:vr(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:vr(n.field),op:Pb(n.op),value:n.value}}})(e):e instanceof Le?(function(n){const r=n.getFilters().map((i=>Yf(i)));return r.length===1?r[0]:{compositeFilter:{op:Vb(n.op),filters:r}}})(e):ct(54877,{filter:e})}function Xf(e){return e.length>=4&&e.get(0)==="projects"&&e.get(2)==="databases"}/** 1167 * @license 1168 * Copyright 2017 Google LLC 1169 * 1170 * Licensed under the Apache License, Version 2.0 (the "License"); 1171 * you may not use this file except in compliance with the License. 1172 * You may obtain a copy of the License at 1173 * 1174 * http://www.apache.org/licenses/LICENSE-2.0 1175 * 1176 * Unless required by applicable law or agreed to in writing, software 1177 * distributed under the License is distributed on an "AS IS" BASIS, 1178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1179 * See the License for the specific language governing permissions and 1180 * limitations under the License. 1181 */class Tn{constructor(t,n,r,i,s=lt.min(),a=lt.min(),l=re.EMPTY_BYTE_STRING,u=null){this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=a,this.resumeToken=l,this.expectedCount=u}withSequenceNumber(t){return new Tn(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,n){return new Tn(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new Tn(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new Tn(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}/** 1182 * @license 1183 * Copyright 2017 Google LLC 1184 * 1185 * Licensed under the Apache License, Version 2.0 (the "License");
1186 * you may not use this file except in compliance with the License. 1187 * You may obtain a copy of the License at 1188 * 1189 * http://www.apache.org/licenses/LICENSE-2.0 1190 * 1191 * Unless required by applicable law or agreed to in writing, software 1192 * distributed under the License is distributed on an "AS IS" BASIS, 1193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1194 * See the License for the specific language governing permissions and 1195 * limitations under the License. 1196 */class kb{constructor(t){this.gt=t}}function Db(e){const t=Sb({parent:e.parent,structuredQuery:e.structuredQuery});return e.limitType==="LAST"?Hs(t,t.limit,"L"):t}/** 1197 * @license 1198 * Copyright 2019 Google LLC 1199 * 1200 * Licensed under the Apache License, Version 2.0 (the "License"); 1201 * you may not use this file except in compliance with the License. 1202 * You may obtain a copy of the License at 1203 * 1204 * http://www.apache.org/licenses/LICENSE-2.0 1205 * 1206 * Unless required by applicable law or agreed to in writing, software 1207 * distributed under the License is distributed on an "AS IS" BASIS, 1208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1209 * See the License for the specific language governing permissions and 1210 * limitations under the License. 1211 */class Nb{constructor(){this.Dn=new Ob}addToCollectionParentIndex(t,n){return this.Dn.add(n),k.resolve()}getCollectionParents(t,n){return k.resolve(this.Dn.getEntries(n))}addFieldIndex(t,n){return k.resolve()}deleteFieldIndex(t,n){return k.resolve()}deleteAllFieldIndexes(t){return k.resolve()}createTargetIndexes(t,n){return k.resolve()}getDocumentsMatchingTarget(t,n){return k.resolve(null)}getIndexType(t,n){return k.resolve(0)}getFieldIndexes(t,n){return k.resolve([])}getNextCollectionGroupToUpdate(t){return k.resolve(null)}getMinOffset(t,n){return k.resolve(Nn.min())}getMinOffsetFromCollectionGroup(t,n){return k.resolve(Nn.min())}updateCollectionGroup(t,n,r){return k.resolve()}updateIndexEntries(t,n){return k.resolve()}}class Ob{constructor(){this.index={}}add(t){const n=t.lastSegment(),r=t.popLast(),i=this.index[n]||new Wt(Ct.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(t){const n=t.lastSegment(),r=t.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(t){return(this.index[t]||new Wt(Ct.comparator)).toArray()}}/** 1212 * @license 1213 * Copyright 2018 Google LLC 1214 * 1215 * Licensed under the Apache License, Version 2.0 (the "License"); 1216 * you may not use this file except in compliance with the License. 1217 * You may obtain a copy of the License at 1218 * 1219 * http://www.apache.org/licenses/LICENSE-2.0 1220 * 1221 * Unless required by applicable law or agreed to in writing, software 1222 * distributed under the License is distributed on an "AS IS" BASIS, 1223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1224 * See the License for the specific language governing permissions and 1225 * limitations under the License. 1226 */const ch={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Zf=41943040;class Ee{static withCacheSize(t){return new Ee(t,Ee.DEFAULT_COLLECTION_PERCENTILE,Ee.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(t,n,r){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}}/** 1227 * @license 1228 * Copyright 2017 Google LLC 1229 * 1230 * Licensed under the Apache License, Version 2.0 (the "License"); 1231 * you may not use this file except in compliance with the License. 1232 * You may obtain a copy of the License at 1233 * 1234 * http://www.apache.org/licenses/LICENSE-2.0 1235 * 1236 * Unless required by applicable law or agreed to in writing, software 1237 * distributed under the License is distributed on an "AS IS" BASIS, 1238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1239 * See the License for the specific language governing permissions and 1240 * limitations under the License. 1241 */Ee.DEFAULT_COLLECTION_PERCENTILE=10,Ee.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Ee.DEFAULT=new Ee(Zf,Ee.DEFAULT_COLLECTION_PERCENTILE,Ee.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Ee.DISABLED=new Ee(-1,0,0);/** 1242 * @license 1243 * Copyright 2017 Google LLC 1244 * 1245 * Licensed under the Apache License, Version 2.0 (the "License");
1246 * you may not use this file except in compliance with the License. 1247 * You may obtain a copy of the License at 1248 * 1249 * http://www.apache.org/licenses/LICENSE-2.0 1250 * 1251 * Unless required by applicable law or agreed to in writing, software 1252 * distributed under the License is distributed on an "AS IS" BASIS, 1253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1254 * See the License for the specific language governing permissions and 1255 * limitations under the License. 1256 */class Or{constructor(t){this._r=t}next(){return this._r+=2,this._r}static ar(){return new Or(0)}static ur(){return new Or(-1)}}/** 1257 * @license 1258 * Copyright 2020 Google LLC 1259 * 1260 * Licensed under the Apache License, Version 2.0 (the "License"); 1261 * you may not use this file except in compliance with the License. 1262 * You may obtain a copy of the License at 1263 * 1264 * http://www.apache.org/licenses/LICENSE-2.0 1265 * 1266 * Unless required by applicable law or agreed to in writing, software 1267 * distributed under the License is distributed on an "AS IS" BASIS, 1268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1269 * See the License for the specific language governing permissions and 1270 * limitations under the License. 1271 */const uh="LruGarbageCollector",Mb=1048576;function hh([e,t],[n,r]){const i=yt(e,n);return i===0?yt(t,r):i}class Lb{constructor(t){this.Tr=t,this.buffer=new Wt(hh),this.Ir=0}dr(){return++this.Ir}Er(t){const n=[t,this.dr()];if(this.buffer.size<this.Tr)this.buffer=this.buffer.add(n);else{const r=this.buffer.last();hh(n,r)<0&&(this.buffer=this.buffer.delete(r).add(n))}}get maxValue(){return this.buffer.last()[0]}}class Fb{constructor(t,n,r){this.garbageCollector=t,this.asyncQueue=n,this.localStore=r,this.Ar=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Rr(6e4)}stop(){this.Ar&&(this.Ar.cancel(),this.Ar=null)}get started(){return this.Ar!==null}Rr(t){J(uh,`Garbage collection scheduled in ${t}ms`),this.Ar=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",t,(async()=>{this.Ar=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){jr(n)?J(uh,"Ignoring IndexedDB error during garbage collection: ",n):await lo(n)}await this.Rr(3e5)}))}}class Bb{constructor(t,n){this.Vr=t,this.params=n}calculateTargetCount(t,n){return this.Vr.mr(t).next((r=>Math.floor(n/100*r)))}nthSequenceNumber(t,n){if(n===0)return k.resolve(co.ue);const r=new Lb(n);return this.Vr.forEachTarget(t,(i=>r.Er(i.sequenceNumber))).next((()=>this.Vr.gr(t,(i=>r.Er(i))))).next((()=>r.maxValue))}removeTargets(t,n,r){return this.Vr.removeTargets(t,n,r)}removeOrphanedDocuments(t,n){return this.Vr.removeOrphanedDocuments(t,n)}collect(t,n){return this.params.cacheSizeCollectionThreshold===-1?(J("LruGarbageCollector","Garbage collection skipped; disabled"),k.resolve(ch)):this.getCacheSize(t).next((r=>r<this.params.cacheSizeCollectionThreshold?(J("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),ch):this.pr(t,n)))}getCacheSize(t){return this.Vr.getCacheSize(t)}pr(t,n){let r,i,s,a,l,u,d;const f=Date.now();return this.calculateTargetCount(t,this.params.percentileToCollect).next((p=>(p>this.params.maximumSequenceNumbersToCollect?(J("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${p}`),i=this.params.maximumSequenceNumbersToCollect):i=p,a=Date.now(),this.nthSequenceNumber(t,i)))).next((p=>(r=p,l=Date.now(),this.removeTargets(t,r,n)))).next((p=>(s=p,u=Date.now(),this.removeOrphanedDocuments(t,r)))).next((p=>(d=Date.now(),gr()<=bt.DEBUG&&J("LruGarbageCollector",`LRU Garbage Collection 1272 Counted targets in ${a-f}ms 1273 Determined least recently used ${i} in `+(l-a)+`ms 1274 Removed ${s} targets in `+(u-l)+`ms 1275 Removed ${p} documents in `+(d-u)+`ms 1276Total Duration: ${d-f}ms`),k.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:p}))))}}function jb(e,t){return new Bb(e,t)}/** 1277 * @license 1278 * Copyright 2017 Google LLC 1279 * 1280 * Licensed under the Apache License, Version 2.0 (the "License");
1281 * you may not use this file except in compliance with the License. 1282 * You may obtain a copy of the License at 1283 * 1284 * http://www.apache.org/licenses/LICENSE-2.0 1285 * 1286 * Unless required by applicable law or agreed to in writing, software 1287 * distributed under the License is distributed on an "AS IS" BASIS, 1288 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1289 * See the License for the specific language governing permissions and 1290 * limitations under the License. 1291 */class Ub{constructor(){this.changes=new lr((t=>t.toString()),((t,n)=>t.isEqual(n))),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,n){this.assertNotApplied(),this.changes.set(t,de.newInvalidDocument(t).setReadTime(n))}getEntry(t,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?k.resolve(r):this.getFromCache(t,n)}getEntries(t,n){return this.getAllFromCache(t,n)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}}/** 1292 * @license 1293 * Copyright 2017 Google LLC 1294 * 1295 * Licensed under the Apache License, Version 2.0 (the "License"); 1296 * you may not use this file except in compliance with the License. 1297 * You may obtain a copy of the License at 1298 * 1299 * http://www.apache.org/licenses/LICENSE-2.0 1300 * 1301 * Unless required by applicable law or agreed to in writing, software 1302 * distributed under the License is distributed on an "AS IS" BASIS, 1303 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1304 * See the License for the specific language governing permissions and 1305 * limitations under the License. 1306 *//** 1307 * @license 1308 * Copyright 2022 Google LLC 1309 * 1310 * Licensed under the Apache License, Version 2.0 (the "License"); 1311 * you may not use this file except in compliance with the License. 1312 * You may obtain a copy of the License at 1313 * 1314 * http://www.apache.org/licenses/LICENSE-2.0 1315 * 1316 * Unless required by applicable law or agreed to in writing, software 1317 * distributed under the License is distributed on an "AS IS" BASIS, 1318 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1319 * See the License for the specific language governing permissions and 1320 * limitations under the License. 1321 */class $b{constructor(t,n){this.overlayedDocument=t,this.mutatedFields=n}}/** 1322 * @license 1323 * Copyright 2017 Google LLC 1324 * 1325 * Licensed under the Apache License, Version 2.0 (the "License"); 1326 * you may not use this file except in compliance with the License. 1327 * You may obtain a copy of the License at 1328 * 1329 * http://www.apache.org/licenses/LICENSE-2.0 1330 * 1331 * Unless required by applicable law or agreed to in writing, software 1332 * distributed under the License is distributed on an "AS IS" BASIS, 1333 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1334 * See the License for the specific language governing permissions and 1335 * limitations under the License. 1336 */class qb{constructor(t,n,r,i){this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(t,n){let r=null;return this.documentOverlayCache.getOverlay(t,n).next((i=>(r=i,this.remoteDocumentCache.getEntry(t,n)))).next((i=>(r!==null&&wi(r.mutation,i,En.empty(),Dt.now()),i)))}getDocuments(t,n){return this.remoteDocumentCache.getEntries(t,n).next((r=>this.getLocalViewOfDocuments(t,r,Et()).next((()=>r))))}getLocalViewOfDocuments(t,n,r=Et()){const i=tr();return this.populateOverlays(t,i,n).next((()=>this.computeViews(t,n,i,r).next((s=>{let a=li();return s.forEach(((l,u)=>{a=a.insert(l,u.overlayedDocument)})),a}))))}getOverlayedDocuments(t,n){const r=tr();return this.populateOverlays(t,r,n).next((()=>this.computeViews(t,n,r,Et())))}populateOverlays(t,n,r){const i=[];return r.forEach((s=>{n.has(s)||i.push(s)})),this.documentOverlayCache.getOverlays(t,i).next((s=>{s.forEach(((a,l)=>{n.set(a,l)}))}))}computeViews(t,n,r,i){let s=Fn();const a=bi(),l=(function(){return bi()})();return n.forEach(((u,d)=>{const f=r.get(d.key);i.has(d.key)&&(f===void 0||f.mutation instanceof yo)?s=s.insert(d.key,d):f!==void 0?(a.set(d.key,f.mutation.getFieldMask()),wi(f.mutation,d,f.mutation.getFieldMask(),Dt.now())):a.set(d.key,En.empty())})),this.recalculateAndSaveOverlays(t,s).next((u=>(u.forEach(((d,f)=>
1336a.set(d,f))),n.forEach(((d,f)=>{var p;return l.set(d,new $b(f,(p=a.get(d))!==null&&p!==void 0?p:null))})),l)))}recalculateAndSaveOverlays(t,n){const r=bi();let i=new qt(((a,l)=>a-l)),s=Et();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,n).next((a=>{for(const l of a)l.keys().forEach((u=>{const d=n.get(u);if(d===null)return;let f=r.get(u)||En.empty();f=l.applyToLocalView(d,f),r.set(u,f);const p=(i.get(l.batchId)||Et()).add(u);i=i.insert(l.batchId,p)}))})).next((()=>{const a=[],l=i.getReverseIterator();for(;l.hasNext();){const u=l.getNext(),d=u.key,f=u.value,p=Of();f.forEach((g=>{if(!s.has(g)){const I=jf(n.get(g),r.get(g));I!==null&&p.set(g,I),s=s.add(g)}})),a.push(this.documentOverlayCache.saveOverlays(t,d,p))}return k.waitFor(a)})).next((()=>r))}recalculateAndSaveOverlaysForDocumentKeys(t,n){return this.remoteDocumentCache.getEntries(t,n).next((r=>this.recalculateAndSaveOverlays(t,r)))}getDocumentsMatchingQuery(t,n,r,i){return(function(a){return tt.isDocumentKey(a.path)&&a.collectionGroup===null&&a.filters.length===0})(n)?this.getDocumentsMatchingDocumentQuery(t,n.path):_l(n)?this.getDocumentsMatchingCollectionGroupQuery(t,n,r,i):this.getDocumentsMatchingCollectionQuery(t,n,r,i)}getNextDocuments(t,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(t,n,r,i).next((s=>{const a=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,n,r.largestBatchId,i-s.size):k.resolve(tr());let l=ki,u=s;return a.next((d=>k.forEach(d,((f,p)=>(l<p.largestBatchId&&(l=p.largestBatchId),s.get(f)?k.resolve():this.remoteDocumentCache.getEntry(t,f).next((g=>{u=u.insert(f,g)}))))).next((()=>this.populateOverlays(t,d,s))).next((()=>this.computeViews(t,u,d,Et()))).next((f=>({batchId:l,changes:rb(f)})))))}))}getDocumentsMatchingDocumentQuery(t,n){return this.getDocument(t,new tt(n)).next((r=>{let i=li();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i}))}getDocumentsMatchingCollectionGroupQuery(t,n,r,i){const s=n.collectionGroup;let a=li();return this.indexManager.getCollectionParents(t,s).next((l=>k.forEach(l,(u=>{const d=(function(p,g){return new ar(g,null,p.explicitOrderBy.slice(),p.filters.slice(),p.limit,p.limitType,p.startAt,p.endAt)})(n,u.child(s));return this.getDocumentsMatchingCollectionQuery(t,d,r,i).next((f=>{f.forEach(((p,g)=>{a=a.insert(p,g)}))}))})).next((()=>a))))}getDocumentsMatchingCollectionQuery(t,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(t,n.path,r.largestBatchId).next((a=>(s=a,this.remoteDocumentCache.getDocumentsMatchingQuery(t,n,r,s,i)))).next((a=>{s.forEach(((u,d)=>{const f=d.getKey();a.get(f)===null&&(a=a.insert(f,de.newInvalidDocument(f)))}));let l=li();return a.forEach(((u,d)=>{const f=s.get(u);f!==void 0&&wi(f.mutation,d,En.empty(),Dt.now()),mo(n,d)&&(l=l.insert(u,d))})),l}))}}/** 1337 * @license 1338 * Copyright 2020 Google LLC 1339 * 1340 * Licensed under the Apache License, Version 2.0 (the "License"); 1341 * you may not use this file except in compliance with the License. 1342 * You may obtain a copy of the License at 1343 * 1344 * http://www.apache.org/licenses/LICENSE-2.0 1345 * 1346 * Unless required by applicable law or agreed to in writing, software 1347 * distributed under the License is distributed on an "AS IS" BASIS, 1348 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1349 * See the License for the specific language governing permissions and 1350 * limitations under the License. 1351 */class zb{constructor(t){this.serializer=t,this.Br=new Map,this.Lr=new Map}getBundleMetadata(t,n){return k.resolve(this.Br.get(n))}saveBundleMetadata(t,n){return this.Br.set(n.id,(function(i){return{id:i.id,version:i.version,createTime:Sr(i.createTime)}})(n)),k.resolve()}getNamedQuery(t,n){return k.resolve(this.Lr.get(n))}saveNamedQuery(t,n){return this.Lr.set(n.name,(function(i){return{name:i.name,query:Db(i.bundledQuery),readTime:Sr(i.readTime)}})(n)),k.resolve()}}/** 1352 * @license 1353 * Copyright 2022 Google LLC 1354 * 1355 * Licensed under the Apache License, Version 2.0 (the "License"); 1356 * you may not use this file except in compliance with the License. 1357 * You may obtain a copy of the License at 1358 * 1359 * http://www.apache.org/licenses/LICENSE-2.0 1360 * 1361 * Unless required by applicable law or agreed to in writing, softw
1361are 1362 * distributed under the License is distributed on an "AS IS" BASIS, 1363 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1364 * See the License for the specific language governing permissions and 1365 * limitations under the License. 1366 */class Hb{constructor(){this.overlays=new qt(tt.comparator),this.kr=new Map}getOverlay(t,n){return k.resolve(this.overlays.get(n))}getOverlays(t,n){const r=tr();return k.forEach(n,(i=>this.getOverlay(t,i).next((s=>{s!==null&&r.set(i,s)})))).next((()=>r))}saveOverlays(t,n,r){return r.forEach(((i,s)=>{this.wt(t,n,s)})),k.resolve()}removeOverlaysForBatchId(t,n,r){const i=this.kr.get(r);return i!==void 0&&(i.forEach((s=>this.overlays=this.overlays.remove(s))),this.kr.delete(r)),k.resolve()}getOverlaysForCollection(t,n,r){const i=tr(),s=n.length+1,a=new tt(n.child("")),l=this.overlays.getIteratorFrom(a);for(;l.hasNext();){const u=l.getNext().value,d=u.getKey();if(!n.isPrefixOf(d.path))break;d.path.length===s&&u.largestBatchId>r&&i.set(u.getKey(),u)}return k.resolve(i)}getOverlaysForCollectionGroup(t,n,r,i){let s=new qt(((d,f)=>d-f));const a=this.overlays.getIterator();for(;a.hasNext();){const d=a.getNext().value;if(d.getKey().getCollectionGroup()===n&&d.largestBatchId>r){let f=s.get(d.largestBatchId);f===null&&(f=tr(),s=s.insert(d.largestBatchId,f)),f.set(d.getKey(),d)}}const l=tr(),u=s.getIterator();for(;u.hasNext()&&(u.getNext().value.forEach(((d,f)=>l.set(d,f))),!(l.size()>=i)););return k.resolve(l)}wt(t,n,r){const i=this.overlays.get(r.key);if(i!==null){const a=this.kr.get(i.largestBatchId).delete(r.key);this.kr.set(i.largestBatchId,a)}this.overlays=this.overlays.insert(r.key,new mb(n,r));let s=this.kr.get(n);s===void 0&&(s=Et(),this.kr.set(n,s)),this.kr.set(n,s.add(r.key))}}/** 1367 * @license 1368 * Copyright 2024 Google LLC 1369 * 1370 * Licensed under the Apache License, Version 2.0 (the "License"); 1371 * you may not use this file except in compliance with the License. 1372 * You may obtain a copy of the License at 1373 * 1374 * http://www.apache.org/licenses/LICENSE-2.0 1375 * 1376 * Unless required by applicable law or agreed to in writing, software 1377 * distributed under the License is distributed on an "AS IS" BASIS, 1378 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1379 * See the License for the specific language governing permissions and 1380 * limitations under the License. 1381 */class Gb{constructor(){this.sessionToken=re.EMPTY_BYTE_STRING}getSessionToken(t){return k.resolve(this.sessionToken)}setSessionToken(t,n){return this.sessionToken=n,k.resolve()}}/** 1382 * @license 1383 * Copyright 2017 Google LLC 1384 * 1385 * Licensed under the Apache License, Version 2.0 (the "License"); 1386 * you may not use this file except in compliance with the License. 1387 * You may obtain a copy of the License at 1388 * 1389 * http://www.apache.org/licenses/LICENSE-2.0 1390 * 1391 * Unless required by applicable law or agreed to in writing, software 1392 * distributed under the License is distributed on an "AS IS" BASIS, 1393 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1394 * See the License for the specific language governing permissions and 1395 * limitations under the License. 1396 */class Il{constructor(){this.qr=new Wt(Qt.Qr),this.$r=new Wt(Qt.Ur)}isEmpty(){return this.qr.isEmpty()}addReference(t,n){const r=new Qt(t,n);this.qr=this.qr.add(r),this.$r=this.$r.add(r)}Kr(t,n){t.forEach((r=>this.addReference(r,n)))}removeReference(t,n){this.Wr(new Qt(t,n))}Gr(t,n){t.forEach((r=>this.removeReference(r,n)))}zr(t){const n=new tt(new Ct([])),r=new Qt(n,t),i=new Qt(n,t+1),s=[];return this.$r.forEachInRange([r,i],(a=>{this.Wr(a),s.push(a.key)})),s}jr(){this.qr.forEach((t=>this.Wr(t)))}Wr(t){this.qr=this.qr.delete(t),this.$r=this.$r.delete(t)}Jr(t){const n=new tt(new Ct([])),r=new Qt(n,t),i=new Qt(n,t+1);let s=Et();return this.$r.forEachInRange([r,i],(a=>{s=s.add(a.key)})),s}containsKey(t){const n=new Qt(t,0),r=this.qr.firstAfterOrEqual(n);return r!==null&&t.isEqual(r.key)}}class Qt{constructor(t,n){this.key=t,this.Hr=n}static Qr(t,n){return tt.comparator(t.key,n.key)||yt(t.Hr,n.Hr)}static Ur(t,n){return yt(t.Hr,n.Hr)||tt.comparator(t.key,n.key)}}/** 1397 * @license 1398 * Copyright 2017 Google LLC 1399 * 1400 * Licensed under the Apache License, Version 2.0 (the "License");
1401 * you may not use this file except in compliance with the License. 1402 * You may obtain a copy of the License at 1403 * 1404 * http://www.apache.org/licenses/LICENSE-2.0 1405 * 1406 * Unless required by applicable law or agreed to in writing, software 1407 * distributed under the License is distributed on an "AS IS" BASIS, 1408 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1409 * See the License for the specific language governing permissions and 1410 * limitations under the License. 1411 */class Kb{constructor(t,n){this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.er=1,this.Yr=new Wt(Qt.Qr)}checkEmpty(t){return k.resolve(this.mutationQueue.length===0)}addMutationBatch(t,n,r,i){const s=this.er;this.er++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const a=new pb(s,n,r,i);this.mutationQueue.push(a);for(const l of i)this.Yr=this.Yr.add(new Qt(l.key,s)),this.indexManager.addToCollectionParentIndex(t,l.key.path.popLast());return k.resolve(a)}lookupMutationBatch(t,n){return k.resolve(this.Zr(n))}getNextMutationBatchAfterBatchId(t,n){const r=n+1,i=this.Xr(r),s=i<0?0:i;return k.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return k.resolve(this.mutationQueue.length===0?D_:this.er-1)}getAllMutationBatches(t){return k.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,n){const r=new Qt(n,0),i=new Qt(n,Number.POSITIVE_INFINITY),s=[];return this.Yr.forEachInRange([r,i],(a=>{const l=this.Zr(a.Hr);s.push(l)})),k.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(t,n){let r=new Wt(yt);return n.forEach((i=>{const s=new Qt(i,0),a=new Qt(i,Number.POSITIVE_INFINITY);this.Yr.forEachInRange([s,a],(l=>{r=r.add(l.Hr)}))})),k.resolve(this.ei(r))}getAllMutationBatchesAffectingQuery(t,n){const r=n.path,i=r.length+1;let s=r;tt.isDocumentKey(s)||(s=s.child(""));const a=new Qt(new tt(s),0);let l=new Wt(yt);return this.Yr.forEachWhile((u=>{const d=u.key.path;return!!r.isPrefixOf(d)&&(d.length===i&&(l=l.add(u.Hr)),!0)}),a),k.resolve(this.ei(l))}ei(t){const n=[];return t.forEach((r=>{const i=this.Zr(r);i!==null&&n.push(i)})),n}removeMutationBatch(t,n){Lt(this.ti(n.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Yr;return k.forEach(n.mutations,(i=>{const s=new Qt(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(t,i.key)})).next((()=>{this.Yr=r}))}rr(t){}containsKey(t,n){const r=new Qt(n,0),i=this.Yr.firstAfterOrEqual(r);return k.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(t){return this.mutationQueue.length,k.resolve()}ti(t,n){return this.Xr(t)}Xr(t){return this.mutationQueue.length===0?0:t-this.mutationQueue[0].batchId}Zr(t){const n=this.Xr(t);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** 1412 * @license 1413 * Copyright 2017 Google LLC 1414 * 1415 * Licensed under the Apache License, Version 2.0 (the "License"); 1416 * you may not use this file except in compliance with the License. 1417 * You may obtain a copy of the License at 1418 * 1419 * http://www.apache.org/licenses/LICENSE-2.0 1420 * 1421 * Unless required by applicable law or agreed to in writing, software 1422 * distributed under the License is distributed on an "AS IS" BASIS, 1423 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1424 * See the License for the specific language governing permissions and 1425 * limitations under the License. 1426 */class Wb{constructor(t){this.ni=t,this.docs=(function(){return new qt(tt.comparator)})(),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,a=this.ni(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:a}),this.size+=a-s,this.indexManager.addToCollectionParentIndex(t,r.path.popLast())}removeEntry(t){const n=this.docs.get(t);n&&(this.docs=this.docs.remove(t),this.size-=n.size)}getEntry(t,n){const r=this.docs.get(n);return k.resolve(r?r.document.mutableCopy():de.newInvalidDocument(n))}getEntries(t,n){let r=Fn();return n.forEach((i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():de.newInvalidDocument(i))})),k.resolve(r)}getDocumentsMatchingQuery(t,n,r,i){let s=Fn();const a=n.path,l=new tt(a.child("__id-9223372036854775808__")),u=this.docs.getIteratorFrom(l);for(;u.hasNext();){const{key:d,value:{document:f}}=u.getNext();if(!a.isPrefixOf(d.path))break;d.path.length>a.length+1||R_(C_(f),r)<=0||(i.has(f.key)||mo(n,f))&&(s=s.insert(f.key,f.mutableCopy()))}return k.resolve(s)}getAllFromCollectionGroup(t,n,r,i){ct(9500)}
vendor: 9,328 bytes, lines 1426-1490
1426ri(t,n){return k.forEach(this.docs,(r=>n(r)))}newChangeBuffer(t){return new Qb(this)}getSize(t){return k.resolve(this.size)}}class Qb extends Ub{constructor(t){super(),this.Or=t}applyChanges(t){const n=[];return this.changes.forEach(((r,i)=>{i.isValidDocument()?n.push(this.Or.addEntry(t,i)):this.Or.removeEntry(r)})),k.waitFor(n)}getFromCache(t,n){return this.Or.getEntry(t,n)}getAllFromCache(t,n){return this.Or.getEntries(t,n)}}/** 1427 * @license 1428 * Copyright 2017 Google LLC 1429 * 1430 * Licensed under the Apache License, Version 2.0 (the "License"); 1431 * you may not use this file except in compliance with the License. 1432 * You may obtain a copy of the License at 1433 * 1434 * http://www.apache.org/licenses/LICENSE-2.0 1435 * 1436 * Unless required by applicable law or agreed to in writing, software 1437 * distributed under the License is distributed on an "AS IS" BASIS, 1438 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1439 * See the License for the specific language governing permissions and 1440 * limitations under the License. 1441 */class Jb{constructor(t){this.persistence=t,this.ii=new lr((n=>gl(n)),yl),this.lastRemoteSnapshotVersion=lt.min(),this.highestTargetId=0,this.si=0,this.oi=new Il,this.targetCount=0,this._i=Or.ar()}forEachTarget(t,n){return this.ii.forEach(((r,i)=>n(i))),k.resolve()}getLastRemoteSnapshotVersion(t){return k.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return k.resolve(this.si)}allocateTargetId(t){return this.highestTargetId=this._i.next(),k.resolve(this.highestTargetId)}setTargetsMetadata(t,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.si&&(this.si=n),k.resolve()}hr(t){this.ii.set(t.target,t);const n=t.targetId;n>this.highestTargetId&&(this._i=new Or(n),this.highestTargetId=n),t.sequenceNumber>this.si&&(this.si=t.sequenceNumber)}addTargetData(t,n){return this.hr(n),this.targetCount+=1,k.resolve()}updateTargetData(t,n){return this.hr(n),k.resolve()}removeTargetData(t,n){return this.ii.delete(n.target),this.oi.zr(n.targetId),this.targetCount-=1,k.resolve()}removeTargets(t,n,r){let i=0;const s=[];return this.ii.forEach(((a,l)=>{l.sequenceNumber<=n&&r.get(l.targetId)===null&&(this.ii.delete(a),s.push(this.removeMatchingKeysForTargetId(t,l.targetId)),i++)})),k.waitFor(s).next((()=>i))}getTargetCount(t){return k.resolve(this.targetCount)}getTargetData(t,n){const r=this.ii.get(n)||null;return k.resolve(r)}addMatchingKeys(t,n,r){return this.oi.Kr(n,r),k.resolve()}removeMatchingKeys(t,n,r){this.oi.Gr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach((a=>{s.push(i.markPotentiallyOrphaned(t,a))})),k.waitFor(s)}removeMatchingKeysForTargetId(t,n){return this.oi.zr(n),k.resolve()}getMatchingKeysForTargetId(t,n){const r=this.oi.Jr(n);return k.resolve(r)}containsKey(t,n){return k.resolve(this.oi.containsKey(n))}}/** 1442 * @license 1443 * Copyright 2017 Google LLC 1444 * 1445 * Licensed under the Apache License, Version 2.0 (the "License"); 1446 * you may not use this file except in compliance with the License. 1447 * You may obtain a copy of the License at 1448 * 1449 * http://www.apache.org/licenses/LICENSE-2.0 1450 * 1451 * Unless required by applicable law or agreed to in writing, software 1452 * distributed under the License is distributed on an "AS IS" BASIS, 1453 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1454 * See the License for the specific language governing permissions and 1455 * limitations under the License. 1456 */class tp{constructor(t,n){this.ai={},this.overlays={},this.ui=new co(0),this.ci=!1,this.ci=!0,this.li=new Gb,this.referenceDelegate=t(this),this.hi=new Jb(this),this.indexManager=new Nb,this.remoteDocumentCache=(function(i){return new Wb(i)})((r=>this.referenceDelegate.Pi(r))),this.serializer=new kb(n),this.Ti=new zb(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ci=!1,Promise.resolve()}get started(){return this.ci}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let n=this.overlays[t.toKey()];return n||(n=new Hb,this.overlays[t.toKey()]=n),n}getMutationQueue(t,n){let r=this.ai[t.toKey()];return r||(r=new Kb(n,this.referenceDelegate),this.ai[t.toKey()]=r),r}getGlobalsCache(){return this.li}getTargetCache(){return this.hi}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ti}runTransaction(t,n,r){J("MemoryPersistence","Starting transaction:",t);const i=new Yb(this.ui.next());return this.referenceDelegate.Ii(),r(i).next((s=>this.referenceDelegate.di(i).next((()=>s)))).toPromise().then((s=>(i.raiseOnCommittedEvent(),s)))}Ei(t,n){return k.or(Object.values(this.ai).map((r=>()=>r.containsKey(t,n))))}}class Yb extends V_{constructor(t){super(),this.currentSequenceNumber=t}}class xl{constructor(t){this.persistence=t,this.Ai=new Il,this.Ri=null}static Vi(t){return new xl(t)}get mi(){if(this.Ri)return this.Ri;throw ct(60996)}addReference(t,n,r){return this.Ai.addReference(r,n),this.mi.delete(r.toString()),k.resolve()}removeReference(t,n,r){return this.Ai.removeReference(r,n),this.mi.add(r.toString()),k.resolve()}markPotentiallyOrphaned(t,n){return this.mi.add(n.toString()),k.resolve()}removeTarget(t,n){this.Ai.zr(n.targetId).forEach((i=>this.mi.add(i.toString())));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(t,n.targetId).next((i=>{i.forEach((s=>this.mi.add(s.toString())))})).next((()=>r.removeTargetData(t,n)))}Ii(){this.Ri=new Set}di(t){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return k.forEach(this.mi,(r=>{const i=tt.fromPath(r);return this.fi(t,i).next((s=>{s||n.removeEntry(i,lt.min())}))})).next((()=>(this.Ri=null,n.apply(t))))}updateLimboDocument(t,n){return this.fi(t,n).next((r=>{r?this.mi.delete(n.toString()):this.mi.add(n.toString())}))}Pi(t){return 0}fi(t,n){return k.or([()=>k.resolve(this.Ai.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(t,n),()=>this.persistence.Ei(t,n)])}}class Ws{constructor(t,n){this.persistence=t,this.gi=new lr((r=>O_(r.path)),((r,i)=>r.isEqual(i))),this.garbageCollector=jb(this,n)}static Vi(t,n){return new Ws(t,n)}Ii(){}di(t){return k.resolve()}forEachTarget(t,n){return this.persistence.getTargetCache().forEachTarget(t,n)}mr(t){const n=this.yr(t);return this.persistence.getTargetCache().getTargetCount(t).next((r=>n.next((i=>r+i))))}yr(t){let n=0;return this.gr(t,(r=>{n++})).next((()=>n))}gr(t,n){return k.forEach(this.gi,((r,i)=>this.Sr(t,r,i).next((s=>s?k.resolve():n(i)))))}removeTargets(t,n,r){return this.persistence.getTargetCache().removeTargets(t,n,r)}removeOrphanedDocuments(t,n){let r=0;const i=this.persistence.getRemoteDocumentCache(),s=i.newChangeBuffer();return i.ri(t,(a=>this.Sr(t,a,n).next((l=>{l||(r++,s.removeEntry(a,lt.min()))})))).next((()=>s.apply(t))).next((()=>r))}markPotentiallyOrphaned(t,n){return this.gi.set(n,t.currentSequenceNumber),k.resolve()}removeTarget(t,n){const r=n.withSequenceNumber(t.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(t,r)}addReference(t,n,r){return this.gi.set(r,t.currentSequenceNumber),k.resolve()}removeReference(t,n,r){return this.gi.set(r,t.currentSequenceNumber),k.resolve()}updateLimboDocument(t,n){return this.gi.set(n,t.currentSequenceNumber),k.resolve()}Pi(t){let n=t.key.toString().length;return t.isFoundDocument()&&(n+=Is(t.data.value)),n}Sr(t,n,r){return k.or([()=>this.persistence.Ei(t,n),()=>this.persistence.getTargetCache().containsKey(t,n),()=>{const i=this.gi.get(n);return k.resolve(i!==void 0&&i>r)}])}getCacheSize(t){return this.persistence.getRemoteDocumentCache().getSize(t)}}/** 1457 * @license 1458 * Copyright 2017 Google LLC 1459 * 1460 * Licensed under the Apache License, Version 2.0 (the "License"); 1461 * you may not use this file except in compliance with the License. 1462 * You may obtain a copy of the License at 1463 * 1464 * http://www.apache.org/licenses/LICENSE-2.0 1465 * 1466 * Unless required by applicable law or agreed to in writing, software 1467 * distributed under the License is distributed on an "AS IS" BASIS, 1468 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1469 * See the License for the specific language governing permissions and 1470 * limitations under the License. 1471 */class Al{constructor(t,n,r,i){this.targetId=t,this.fromCache=n,this.Is=r,this.ds=i}static Es(t,n){let r=Et(),i=Et();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new Al(t,n.fromCache,r,i)}}/** 1472 * @license 1473 * Copyright 2023 Google LLC 1474 * 1475 * Licensed under the Apache License, Version 2.0 (the "License"); 1476 * you may not use this file except in compliance with the License. 1477 * You may obtain a copy of the License at 1478 * 1479 * http://www.apache.org/licenses/LICENSE-2.0 1480 * 1481 * Unless required by applicable law or agreed to in writing, software 1482 * distributed under the License is distributed on an "AS IS" BASIS, 1483 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1484 * See the License for the specific language governing permissions and 1485 * limitations under the License. 1486 */class Xb{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(t){this._documentReadCount+=t}}/** 1487 * @license 1488 * Copyright 2019 Google LLC 1489 * 1490 * Licensed under the Apache License, Version 2.0 (the "License");
1491 * you may not use this file except in compliance with the License. 1492 * You may obtain a copy of the License at 1493 * 1494 * http://www.apache.org/licenses/LICENSE-2.0 1495 * 1496 * Unless required by applicable law or agreed to in writing, software 1497 * distributed under the License is distributed on an "AS IS" BASIS, 1498 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1499 * See the License for the specific language governing permissions and 1500 * limitations under the License. 1501 */class Zb{constructor(){this.As=!1,this.Rs=!1,this.Vs=100,this.fs=(function(){return Xy()?8:k_(Jy())>0?6:4})()}initialize(t,n){this.gs=t,this.indexManager=n,this.As=!0}getDocumentsMatchingQuery(t,n,r,i){const s={result:null};return this.ps(t,n).next((a=>{s.result=a})).next((()=>{if(!s.result)return this.ys(t,n,i,r).next((a=>{s.result=a}))})).next((()=>{if(s.result)return;const a=new Xb;return this.ws(t,n,a).next((l=>{if(s.result=l,this.Rs)return this.Ss(t,n,a,l.size)}))})).next((()=>s.result))}Ss(t,n,r,i){return r.documentReadCount<this.Vs?(gr()<=bt.DEBUG&&J("QueryEngine","SDK will not create cache indexes for query:",yr(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),k.resolve()):(gr()<=bt.DEBUG&&J("QueryEngine","Query:",yr(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.fs*i?(gr()<=bt.DEBUG&&J("QueryEngine","The SDK decides to create cache indexes for query:",yr(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(t,Ke(n))):k.resolve())}ps(t,n){if(Zu(n))return k.resolve(null);let r=Ke(n);return this.indexManager.getIndexType(t,r).next((i=>i===0?null:(n.limit!==null&&i===1&&(n=Hs(n,null,"F"),r=Ke(n)),this.indexManager.getDocumentsMatchingTarget(t,r).next((s=>{const a=Et(...s);return this.gs.getDocuments(t,a).next((l=>this.indexManager.getMinOffset(t,r).next((u=>{const d=this.bs(n,l);return this.Ds(n,d,a,u.readTime)?this.ps(t,Hs(n,null,"F")):this.vs(t,d,n,u)}))))})))))}ys(t,n,r,i){return Zu(n)||i.isEqual(lt.min())?k.resolve(null):this.gs.getDocuments(t,r).next((s=>{const a=this.bs(n,s);return this.Ds(n,a,r,i)?k.resolve(null):(gr()<=bt.DEBUG&&J("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),yr(n)),this.vs(t,a,n,S_(i,ki)).next((l=>l)))}))}bs(t,n){let r=new Wt(Df(t));return n.forEach(((i,s)=>{mo(t,s)&&(r=r.add(s))})),r}Ds(t,n,r,i){if(t.limit===null)return!1;if(r.size!==n.size)return!0;const s=t.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}ws(t,n,r){return gr()<=bt.DEBUG&&J("QueryEngine","Using full collection scan to execute query:",yr(n)),this.gs.getDocumentsMatchingQuery(t,n,Nn.min(),r)}vs(t,n,r,i){return this.gs.getDocumentsMatchingQuery(t,r,i).next((s=>(n.forEach((a=>{s=s.insert(a.key,a)})),s)))}}/** 1502 * @license 1503 * Copyright 2020 Google LLC 1504 * 1505 * Licensed under the Apache License, Version 2.0 (the "License"); 1506 * you may not use this file except in compliance with the License. 1507 * You may obtain a copy of the License at 1508 * 1509 * http://www.apache.org/licenses/LICENSE-2.0 1510 * 1511 * Unless required by applicable law or agreed to in writing, software 1512 * distributed under the License is distributed on an "AS IS" BASIS, 1513 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1514 * See the License for the specific language governing permissions and 1515 * limitations under the License. 1516 */const Sl="LocalStore",tw=3e8;class ew{constructor(t,n,r,i){this.persistence=t,this.Cs=n,this.serializer=i,this.Fs=new qt(yt),this.Ms=new lr((s=>gl(s)),yl),this.xs=new Map,this.Os=t.getRemoteDocumentCache(),this.hi=t.getTargetCache(),this.Ti=t.getBundleCache(),this.Ns(r)}Ns(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new qb(this.Os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Os.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(n=>t.collect(n,this.Fs)))}}function nw(e,t,n,r){return new ew(e,t,n,r)}async function ep(e,t){const n=wt(e);return await n.persistence.runTransaction("Handle user change","readonly",(r=>{let i;
1516return n.mutationQueue.getAllMutationBatches(r).next((s=>(i=s,n.Ns(t),n.mutationQueue.getAllMutationBatches(r)))).next((s=>{const a=[],l=[];let u=Et();for(const d of i){a.push(d.batchId);for(const f of d.mutations)u=u.add(f.key)}for(const d of s){l.push(d.batchId);for(const f of d.mutations)u=u.add(f.key)}return n.localDocuments.getDocuments(r,u).next((d=>({Bs:d,removedBatchIds:a,addedBatchIds:l})))}))}))}function np(e){const t=wt(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(n=>t.hi.getLastRemoteSnapshotVersion(n)))}function rw(e,t){const n=wt(e),r=t.snapshotVersion;let i=n.Fs;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(s=>{const a=n.Os.newChangeBuffer({trackRemovals:!0});i=n.Fs;const l=[];t.targetChanges.forEach(((f,p)=>{const g=i.get(p);if(!g)return;l.push(n.hi.removeMatchingKeys(s,f.removedDocuments,p).next((()=>n.hi.addMatchingKeys(s,f.addedDocuments,p))));let I=g.withSequenceNumber(s.currentSequenceNumber);t.targetMismatches.get(p)!==null?I=I.withResumeToken(re.EMPTY_BYTE_STRING,lt.min()).withLastLimboFreeSnapshotVersion(lt.min()):f.resumeToken.approximateByteSize()>0&&(I=I.withResumeToken(f.resumeToken,r)),i=i.insert(p,I),(function(V,O,B){return V.resumeToken.approximateByteSize()===0||O.snapshotVersion.toMicroseconds()-V.snapshotVersion.toMicroseconds()>=tw?!0:B.addedDocuments.size+B.modifiedDocuments.size+B.removedDocuments.size>0})(g,I,f)&&l.push(n.hi.updateTargetData(s,I))}));let u=Fn(),d=Et();if(t.documentUpdates.forEach((f=>{t.resolvedLimboDocuments.has(f)&&l.push(n.persistence.referenceDelegate.updateLimboDocument(s,f))})),l.push(iw(s,a,t.documentUpdates).next((f=>{u=f.Ls,d=f.ks}))),!r.isEqual(lt.min())){const f=n.hi.getLastRemoteSnapshotVersion(s).next((p=>n.hi.setTargetsMetadata(s,s.currentSequenceNumber,r)));l.push(f)}return k.waitFor(l).next((()=>a.apply(s))).next((()=>n.localDocuments.getLocalViewOfDocuments(s,u,d))).next((()=>u))})).then((s=>(n.Fs=i,s)))}function iw(e,t,n){let r=Et(),i=Et();return n.forEach((s=>r=r.add(s))),t.getEntries(e,r).next((s=>{let a=Fn();return n.forEach(((l,u)=>{const d=s.get(l);u.isFoundDocument()!==d.isFoundDocument()&&(i=i.add(l)),u.isNoDocument()&&u.version.isEqual(lt.min())?(t.removeEntry(l,u.readTime),a=a.insert(l,u)):!d.isValidDocument()||u.version.compareTo(d.version)>0||u.version.compareTo(d.version)===0&&d.hasPendingWrites?(t.addEntry(u),a=a.insert(l,u)):J(Sl,"Ignoring outdated watch update for ",l,". Current version:",d.version," Watch version:",u.version)})),{Ls:a,ks:i}}))}function sw(e,t){const n=wt(e);return n.persistence.runTransaction("Allocate target","readwrite",(r=>{let i;return n.hi.getTargetData(r,t).next((s=>s?(i=s,k.resolve(i)):n.hi.allocateTargetId(r).next((a=>(i=new Tn(t,a,"TargetPurposeListen",r.currentSequenceNumber),n.hi.addTargetData(r,i).next((()=>i)))))))})).then((r=>{const i=n.Fs.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Fs=n.Fs.insert(r.targetId,r),n.Ms.set(t,r.targetId)),r}))}async function ja(e,t,n){const r=wt(e),i=r.Fs.get(t),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,(a=>r.persistence.referenceDelegate.removeTarget(a,i)))}catch(a){if(!jr(a))throw a;J(Sl,`Failed to update sequence numbers for target ${t}: ${a}`)}r.Fs=r.Fs.remove(t),r.Ms.delete(i.target)}function dh(e,t,n){const r=wt(e);let i=lt.min(),s=Et();return r.persistence.runTransaction("Execute query","readwrite",(a=>(function(u,d,f){const p=wt(u),g=p.Ms.get(f);return g!==void 0?k.resolve(p.Fs.get(g)):p.hi.getTargetData(d,f)})(r,a,Ke(t)).next((l=>{if(l)return i=l.lastLimboFreeSnapshotVersion,r.hi.getMatchingKeysForTargetId(a,l.targetId).next((u=>{s=u}))})).next((()=>r.Cs.getDocumentsMatchingQuery(a,t,n?i:lt.min(),n?s:Et()))).next((l=>(ow(r,tb(t),l),{documents:l,qs:s})))))}function ow(e,t,n){let r=e.xs.get(t)||lt.min();n.forEach(((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)})),e.xs.set(t,r)}class fh{constructor(){this.activeTargetIds=ob()}Gs(t){this.activeTargetIds=this.activeTargetIds.add(t)}zs(t){this.activeTargetIds=this.activeTargetIds.delete(t)}Ws(){const t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}}class aw{constructor(){this.Fo=new fh,this.Mo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,n,r){}addLocalQueryTarget(t,n=!0){return n&&this.Fo.Gs(t),this.Mo[t]||"not-current"}updateQueryState(t,n,r){this.Mo[t]=n}removeLocalQueryTarget(t){this.Fo.zs(t)}isLocalQueryTarget(t){return this.Fo.activeTargetIds.has(t)}clearQueryState(t){delete this.Mo[t]}getAllActiveQueryTargets(){return this.Fo.activeTargetIds}isActiveQueryTarget(t){return this.Fo.activeTargetIds.has(t)}start(){return this.Fo=new fh,Promise.resolve()}handleUserChange(t,n,r){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}}/** 1517 * @license 1518 * Copyright 2019 Google LLC 1519 * 1520 * Licensed under the Apache License, Version 2.0 (the "License");
1521 * you may not use this file except in compliance with the License. 1522 * You may obtain a copy of the License at 1523 * 1524 * http://www.apache.org/licenses/LICENSE-2.0 1525 * 1526 * Unless required by applicable law or agreed to in writing, software 1527 * distributed under the License is distributed on an "AS IS" BASIS, 1528 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1529 * See the License for the specific language governing permissions and 1530 * limitations under the License. 1531 */class lw{xo(t){}shutdown(){}}/** 1532 * @license 1533 * Copyright 2019 Google LLC 1534 * 1535 * Licensed under the Apache License, Version 2.0 (the "License"); 1536 * you may not use this file except in compliance with the License. 1537 * You may obtain a copy of the License at 1538 * 1539 * http://www.apache.org/licenses/LICENSE-2.0 1540 * 1541 * Unless required by applicable law or agreed to in writing, software 1542 * distributed under the License is distributed on an "AS IS" BASIS, 1543 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1544 * See the License for the specific language governing permissions and 1545 * limitations under the License. 1546 */const ph="ConnectivityMonitor";class mh{constructor(){this.Oo=()=>this.No(),this.Bo=()=>this.Lo(),this.ko=[],this.qo()}xo(t){this.ko.push(t)}shutdown(){window.removeEventListener("online",this.Oo),window.removeEventListener("offline",this.Bo)}qo(){window.addEventListener("online",this.Oo),window.addEventListener("offline",this.Bo)}No(){J(ph,"Network connectivity changed: AVAILABLE");for(const t of this.ko)t(0)}Lo(){J(ph,"Network connectivity changed: UNAVAILABLE");for(const t of this.ko)t(1)}static C(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 1547 * @license 1548 * Copyright 2023 Google LLC 1549 * 1550 * Licensed under the Apache License, Version 2.0 (the "License"); 1551 * you may not use this file except in compliance with the License. 1552 * You may obtain a copy of the License at 1553 * 1554 * http://www.apache.org/licenses/LICENSE-2.0 1555 * 1556 * Unless required by applicable law or agreed to in writing, software 1557 * distributed under the License is distributed on an "AS IS" BASIS, 1558 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1559 * See the License for the specific language governing permissions and 1560 * limitations under the License. 1561 */let gs=null;function Ua(){return gs===null?gs=(function(){return 268435456+Math.round(2147483648*Math.random())})():gs++,"0x"+gs.toString(16)}/** 1562 * @license 1563 * Copyright 2020 Google LLC 1564 * 1565 * Licensed under the Apache License, Version 2.0 (the "License"); 1566 * you may not use this file except in compliance with the License. 1567 * You may obtain a copy of the License at 1568 * 1569 * http://www.apache.org/licenses/LICENSE-2.0 1570 * 1571 * Unless required by applicable law or agreed to in writing, software 1572 * distributed under the License is distributed on an "AS IS" BASIS, 1573 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1574 * See the License for the specific language governing permissions and 1575 * limitations under the License. 1576 */const ia="RestConnection",cw={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class uw{get Qo(){return!1}constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const n=t.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.$o=n+"://"+t.host,this.Uo=`projects/${r}/databases/${i}`,this.Ko=this.databaseId.database===$s?`project_id=${r}`:`project_id=${r}&database_id=${i}`}Wo(t,n,r,i,s){const a=Ua(),l=this.Go(t,n.toUriEncodedString());J(ia,`Sending RPC '${t}' ${a}:`,l,r);const u={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.Ko};this.zo(u,i,s);const{host:d}=new URL(l),f=hl(d);return this.jo(t,l,u,r,f).then((p=>(J(ia,`Received RPC '${t}' ${a}: `,p),p)),(p=>{throw Dn(ia,`RPC '${t}' ${a} failed with error: `,p,"url: ",l,"request:",r),p}))}Jo(t,n,r,i,s,a){return this.Wo(t,n,r,i,s)}zo(t,n,r){t["X-Goog-Api-Client"]=(function(){return"gl-js/ fire/"+Br})(),t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEac
1576h(((i,s)=>t[s]=i)),r&&r.headers.forEach(((i,s)=>t[s]=i))}Go(t,n){const r=cw[t];return`${this.$o}/v1/${n}:${r}`}terminate(){}}/** 1577 * @license 1578 * Copyright 2017 Google LLC 1579 * 1580 * Licensed under the Apache License, Version 2.0 (the "License"); 1581 * you may not use this file except in compliance with the License. 1582 * You may obtain a copy of the License at 1583 * 1584 * http://www.apache.org/licenses/LICENSE-2.0 1585 * 1586 * Unless required by applicable law or agreed to in writing, software 1587 * distributed under the License is distributed on an "AS IS" BASIS, 1588 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1589 * See the License for the specific language governing permissions and 1590 * limitations under the License. 1591 */class hw{constructor(t){this.Ho=t.Ho,this.Yo=t.Yo}Zo(t){this.Xo=t}e_(t){this.t_=t}n_(t){this.r_=t}onMessage(t){this.i_=t}close(){this.Yo()}send(t){this.Ho(t)}s_(){this.Xo()}o_(){this.t_()}__(t){this.r_(t)}a_(t){this.i_(t)}}/** 1592 * @license 1593 * Copyright 2017 Google LLC 1594 * 1595 * Licensed under the Apache License, Version 2.0 (the "License"); 1596 * you may not use this file except in compliance with the License. 1597 * You may obtain a copy of the License at 1598 * 1599 * http://www.apache.org/licenses/LICENSE-2.0 1600 * 1601 * Unless required by applicable law or agreed to in writing, software 1602 * distributed under the License is distributed on an "AS IS" BASIS, 1603 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1604 * See the License for the specific language governing permissions and 1605 * limitations under the License. 1606 */const le="WebChannelConnection";class dw extends uw{constructor(t){super(t),this.u_=[],this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}jo(t,n,r,i,s){const a=Ua();return new Promise(((l,u)=>{const d=new af;d.setWithCredentials(!0),d.listenOnce(lf.COMPLETE,(()=>{try{switch(d.getLastErrorCode()){case Ts.NO_ERROR:const p=d.getResponseJson();J(le,`XHR for RPC '${t}' ${a} received:`,JSON.stringify(p)),l(p);break;case Ts.TIMEOUT:J(le,`RPC '${t}' ${a} timed out`),u(new H(D.DEADLINE_EXCEEDED,"Request time out"));break;case Ts.HTTP_ERROR:const g=d.getStatus();if(J(le,`RPC '${t}' ${a} failed with status:`,g,"response text:",d.getResponseText()),g>0){let I=d.getResponseJson();Array.isArray(I)&&(I=I[0]);const R=I==null?void 0:I.error;if(R&&R.status&&R.message){const V=(function(B){const j=B.toLowerCase().replace(/_/g,"-");return Object.values(D).indexOf(j)>=0?j:D.UNKNOWN})(R.status);u(new H(V,R.message))}else u(new H(D.UNKNOWN,"Server responded with status "+d.getStatus()))}else u(new H(D.UNAVAILABLE,"Connection failed."));break;default:ct(9055,{c_:t,streamId:a,l_:d.getLastErrorCode(),h_:d.getLastError()})}}finally{J(le,`RPC '${t}' ${a} completed.`)}}));const f=JSON.stringify(i);J(le,`RPC '${t}' ${a} sending request:`,i),d.send(n,"POST",f,r,15)}))}P_(t,n,r){const i=Ua(),s=[this.$o,"/","google.firestore.v1.Firestore","/",t,"/channel"],a=hf(),l=uf(),u={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},d=this.longPollingOptions.timeoutSeconds;d!==void 0&&(u.longPollingTimeout=Math.round(1e3*d)),this.useFetchStreams&&(u.useFetchStreams=!0),this.zo(u.initMessageHeaders,n,r),u.encodeInitMessageHeaders=!0;const f=s.join("");J(le,`Creating RPC '${t}' stream ${i}: ${f}`,u);const p=a.createWebChannel(f,u);this.T_(p);let g=!1,I=!1;const R=new hw({Ho:O=>{I?J(le,`Not sending because RPC '${t}' stream ${i} is closed:`,O):(g||(J(le,`Opening RPC '${t}' stream ${i} transport.`),p.open(),g=!0),J(le,`RPC '${t}' stream ${i} sending:`,O),p.send(O))},Yo:()=>p.close()}),V=(O,B,j)=>{O.listen(B,(Q=>{try{j(Q)}catch($){setTimeout((()=>{throw $}),0)}}))};return V(p,ai.EventType.OPEN,(()=>{I||(J(le,`RPC '${t}' stream ${i} transport opened.`),R.s_())})),V(p,ai.EventType.CLOSE,(()=>{I||(I=!0,J(le,`RPC '${t}' stream ${i} transport closed`),R.__(),this.I_(p))}
1606)),V(p,ai.EventType.ERROR,(O=>{I||(I=!0,Dn(le,`RPC '${t}' stream ${i} transport errored. Name:`,O.name,"Message:",O.message),R.__(new H(D.UNAVAILABLE,"The operation could not be completed")))})),V(p,ai.EventType.MESSAGE,(O=>{var B;if(!I){const j=O.data[0];Lt(!!j,16349);const Q=j,$=(Q==null?void 0:Q.error)||((B=Q[0])===null||B===void 0?void 0:B.error);if($){J(le,`RPC '${t}' stream ${i} received error:`,$);const ut=$.status;let gt=(function(v){const T=zt[v];if(T!==void 0)return $f(T)})(ut),x=$.message;gt===void 0&&(gt=D.INTERNAL,x="Unknown error status: "+ut+" with message "+$.message),I=!0,R.__(new H(gt,x)),p.close()}else J(le,`RPC '${t}' stream ${i} received:`,j),R.a_(j)}})),V(l,cf.STAT_EVENT,(O=>{O.stat===Ca.PROXY?J(le,`RPC '${t}' stream ${i} detected buffering proxy`):O.stat===Ca.NOPROXY&&J(le,`RPC '${t}' stream ${i} detected no buffering proxy`)})),setTimeout((()=>{R.o_()}),0),R}terminate(){this.u_.forEach((t=>t.close())),this.u_=[]}T_(t){this.u_.push(t)}I_(t){this.u_=this.u_.filter((n=>n===t))}}function sa(){return typeof document<"u"?document:null}/** 1607 * @license 1608 * Copyright 2020 Google LLC 1609 * 1610 * Licensed under the Apache License, Version 2.0 (the "License"); 1611 * you may not use this file except in compliance with the License. 1612 * You may obtain a copy of the License at 1613 * 1614 * http://www.apache.org/licenses/LICENSE-2.0 1615 * 1616 * Unless required by applicable law or agreed to in writing, software 1617 * distributed under the License is distributed on an "AS IS" BASIS, 1618 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1619 * See the License for the specific language governing permissions and 1620 * limitations under the License. 1621 */function _o(e){return new Eb(e,!0)}/** 1622 * @license 1623 * Copyright 2017 Google LLC 1624 * 1625 * Licensed under the Apache License, Version 2.0 (the "License"); 1626 * you may not use this file except in compliance with the License. 1627 * You may obtain a copy of the License at 1628 * 1629 * http://www.apache.org/licenses/LICENSE-2.0 1630 * 1631 * Unless required by applicable law or agreed to in writing, software 1632 * distributed under the License is distributed on an "AS IS" BASIS, 1633 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1634 * See the License for the specific language governing permissions and 1635 * limitations under the License. 1636 */class rp{constructor(t,n,r=1e3,i=1.5,s=6e4){this.Fi=t,this.timerId=n,this.d_=r,this.E_=i,this.A_=s,this.R_=0,this.V_=null,this.m_=Date.now(),this.reset()}reset(){this.R_=0}f_(){this.R_=this.A_}g_(t){this.cancel();const n=Math.floor(this.R_+this.p_()),r=Math.max(0,Date.now()-this.m_),i=Math.max(0,n-r);i>0&&J("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.R_} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.V_=this.Fi.enqueueAfterDelay(this.timerId,i,(()=>(this.m_=Date.now(),t()))),this.R_*=this.E_,this.R_<this.d_&&(this.R_=this.d_),this.R_>this.A_&&(this.R_=this.A_)}y_(){this.V_!==null&&(this.V_.skipDelay(),this.V_=null)}cancel(){this.V_!==null&&(this.V_.cancel(),this.V_=null)}p_(){return(Math.random()-.5)*this.R_}}/** 1637 * @license 1638 * Copyright 2017 Google LLC 1639 * 1640 * Licensed under the Apache License, Version 2.0 (the "License"); 1641 * you may not use this file except in compliance with the License. 1642 * You may obtain a copy of the License at 1643 * 1644 * http://www.apache.org/licenses/LICENSE-2.0 1645 * 1646 * Unless required by applicable law or agreed to in writing, software 1647 * distributed under the License is distributed on an "AS IS" BASIS, 1648 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1649 * See the License for the specific language governing permissions and 1650 * limitations under the License. 1651 */const gh="PersistentStream";class fw{constructor(t,n,r,i,s,a,l,u){this.Fi=t,this.w_=r,this.S_=i,this.connection=s,this.authCredentialsProvider=a,this.appCheckCredentialsProvider=l,this.listener=u,this.state=0,this.b_=0,this.D_=null,this.v_=null,this.stream=null,this.C_=0,this.F_=new rp(t,n)}M_(){return this.state===1||this.state===5||this.x_()}x_(){return this.state===2||this.state===3}start(){this.C_=0,this.state!==4?this.auth():this.O_()}async stop(){this.M_()&&await this.close(0)}N_(){this.state=0,this.F_.reset()}B_(){this.x_()&&this.D_===null&&(this.D_=this.Fi.enqueueAfterDelay(this.w_,6e4,(()=>this.L_())))}k_(t){this.q_(),this.stream.send(t)}async L_(){if(this.x_())return this.close(0)}q_(){this.D_&&(this.D_.cancel(),this.D_=null)}Q_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(t,n){this.q_(),this.Q_(),this.F_.cancel(),this.b_++,t!==4?this.F_.reset():n&&n.code===D.RESOURCE_EXHAUSTED?(cn(n.toString()),cn("Using maximum backoff delay to prevent overloading the backend."),this.F_.f_()):n&&n.code===D.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.U_(),this.stream.close(),this.stream=null),this.state=t,await this.listener.n_(n)}U_(){}auth(){this.state=1;const t=this.K_(this.b_),n=this.b_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([r,i])=>{this.b_===n&&this.W_(r,i)}),(r=>{t((()=>{const i=new H(D.UNKNOWN,"Fetching auth token failed: "+r.message);return this.G_(i)}))}))}W_(t,n){const r=this.K_(this.b_);this.stream=this.z_(t,n),this.stream.Zo((()=>{r((()=>this.listener.Zo()))})),this.stream.e_((()=>{r((()=>(this.state=2,this.v_=this.Fi.enqueueAfterDelay(this.S_,1e4,(()=>(this.x_()&&(this.state=3),Promise.resolve()))),this.listener.e_())))})),this.stream.n_((i=>{r((()=>this.G_(i)))})),this.stream.onMessage((i=>{r((()=>++this.C_==1?this.j_(i):this.onNext(i)))}))}O_(){this.state=5,this.F_.g_((async()=>{this.state=0,this.start()}))}G_(t){return J(gh,`close with error: ${t}`),this.stream=null,this.close(4,t)}K_(t){return n=>{this.Fi.enqueueAndForget((()=>this.b_===t?n():(J(gh,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class pw extends fw{constructor(t,n,r,i,s,a){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,a),this.serializer
1651=s}z_(t,n){return this.connection.P_("Listen",t,n)}j_(t){return this.onNext(t)}onNext(t){this.F_.reset();const n=Ib(this.serializer,t),r=(function(s){if(!("targetChange"in s))return lt.min();const a=s.targetChange;return a.targetIds&&a.targetIds.length?lt.min():a.readTime?Sr(a.readTime):lt.min()})(t);return this.listener.J_(n,r)}H_(t){const n={};n.database=lh(this.serializer),n.addTarget=(function(s,a){let l;const u=a.target;if(l=Da(u)?{documents:xb(s,u)}:{query:Ab(s,u).Vt},l.targetId=a.targetId,a.resumeToken.approximateByteSize()>0){l.resumeToken=Hf(s,a.resumeToken);const d=La(s,a.expectedCount);d!==null&&(l.expectedCount=d)}else if(a.snapshotVersion.compareTo(lt.min())>0){l.readTime=Fa(s,a.snapshotVersion.toTimestamp());const d=La(s,a.expectedCount);d!==null&&(l.expectedCount=d)}return l})(this.serializer,t);const r=Cb(this.serializer,t);r&&(n.labels=r),this.k_(n)}Y_(t){const n={};n.database=lh(this.serializer),n.removeTarget=t,this.k_(n)}}/** 1652 * @license 1653 * Copyright 2017 Google LLC 1654 * 1655 * Licensed under the Apache License, Version 2.0 (the "License"); 1656 * you may not use this file except in compliance with the License. 1657 * You may obtain a copy of the License at 1658 * 1659 * http://www.apache.org/licenses/LICENSE-2.0 1660 * 1661 * Unless required by applicable law or agreed to in writing, software 1662 * distributed under the License is distributed on an "AS IS" BASIS, 1663 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1664 * See the License for the specific language governing permissions and 1665 * limitations under the License. 1666 */class mw{}class gw extends mw{constructor(t,n,r,i){super(),this.authCredentials=t,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.ra=!1}ia(){if(this.ra)throw new H(D.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(t,n,r,i){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([s,a])=>this.connection.Wo(t,Ba(n,r),i,s,a))).catch((s=>{throw s.name==="FirebaseError"?(s.code===D.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new H(D.UNKNOWN,s.toString())}))}Jo(t,n,r,i,s){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([a,l])=>this.connection.Jo(t,Ba(n,r),i,a,l,s))).catch((a=>{throw a.name==="FirebaseError"?(a.code===D.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),a):new H(D.UNKNOWN,a.toString())}))}terminate(){this.ra=!0,this.connection.terminate()}}class yw{constructor(t,n){this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.sa=0,this.oa=null,this._a=!0}aa(){this.sa===0&&(this.ua("Unknown"),this.oa=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.oa=null,this.ca("Backend didn't respond within 10 seconds."),this.ua("Offline"),Promise.resolve()))))}la(t){this.state==="Online"?this.ua("Unknown"):(this.sa++,this.sa>=1&&(this.ha(),this.ca(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.ua("Offline")))}set(t){this.ha(),this.sa=0,t==="Online"&&(this._a=!1),this.ua(t)}ua(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}ca(t){const n=`Could not reach Cloud Firestore backend. ${t} 1667This 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._a?(cn(n),this._a=!1):J("OnlineStateTracker",n)}ha(){this.oa!==null&&(this.oa.cancel(),this.oa=null)}}/** 1668 * @license 1669 * Copyright 2017 Google LLC 1670 * 1671 * Licensed under the Apache License, Version 2.0 (the "License"); 1672 * you may not use this file except in compliance with the License. 1673 * You may obtain a copy of the License at 1674 * 1675 * http://www.apache.org/licenses/LICENSE-2.0 1676 * 1677 * Unless required by applicable law or agreed to in writing, software 1678 * distributed under the License is distributed on an "AS IS" BASIS, 1679 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1680 * See the License for the specific language governing permissions and 1681 * limitations under the License. 1682 */const Mr="RemoteStore";class vw{constructor(t,n,r,i,s){this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Pa=[],this.Ta=new Map,this.Ia=new Set,this.da=[],this.Ea=s,this.Ea.xo((a=>{r.enqueueAndForget((async()=>
1682{$i(this)&&(J(Mr,"Restarting streams for network reachability change."),await(async function(u){const d=wt(u);d.Ia.add(4),await Ui(d),d.Aa.set("Unknown"),d.Ia.delete(4),await bo(d)})(this))}))})),this.Aa=new yw(r,i)}}async function bo(e){if($i(e))for(const t of e.da)await t(!0)}async function Ui(e){for(const t of e.da)await t(!1)}function ip(e,t){const n=wt(e);n.Ta.has(t.targetId)||(n.Ta.set(t.targetId,t),Vl(n)?Pl(n):$r(n).x_()&&Rl(n,t))}function Cl(e,t){const n=wt(e),r=$r(n);n.Ta.delete(t),r.x_()&&sp(n,t),n.Ta.size===0&&(r.x_()?r.B_():$i(n)&&n.Aa.set("Unknown"))}function Rl(e,t){if(e.Ra.$e(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(lt.min())>0){const n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}$r(e).H_(t)}function sp(e,t){e.Ra.$e(t),$r(e).Y_(t)}function Pl(e){e.Ra=new vb({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),Et:t=>e.Ta.get(t)||null,lt:()=>e.datastore.serializer.databaseId}),$r(e).start(),e.Aa.aa()}function Vl(e){return $i(e)&&!$r(e).M_()&&e.Ta.size>0}function $i(e){return wt(e).Ia.size===0}function op(e){e.Ra=void 0}async function _w(e){e.Aa.set("Online")}async function bw(e){e.Ta.forEach(((t,n)=>{Rl(e,t)}))}async function ww(e,t){op(e),Vl(e)?(e.Aa.la(t),Pl(e)):e.Aa.set("Unknown")}async function Ew(e,t,n){if(e.Aa.set("Online"),t instanceof zf&&t.state===2&&t.cause)try{await(async function(i,s){const a=s.cause;for(const l of s.targetIds)i.Ta.has(l)&&(await i.remoteSyncer.rejectListen(l,a),i.Ta.delete(l),i.Ra.removeTarget(l))})(e,t)}catch(r){J(Mr,"Failed to remove targets %s: %s ",t.targetIds.join(","),r),await yh(e,r)}else if(t instanceof As?e.Ra.Ye(t):t instanceof qf?e.Ra.it(t):e.Ra.et(t),!n.isEqual(lt.min()))try{const r=await np(e.localStore);n.compareTo(r)>=0&&await(function(s,a){const l=s.Ra.Pt(a);
1682return l.targetChanges.forEach(((u,d)=>{if(u.resumeToken.approximateByteSize()>0){const f=s.Ta.get(d);f&&s.Ta.set(d,f.withResumeToken(u.resumeToken,a))}})),l.targetMismatches.forEach(((u,d)=>{const f=s.Ta.get(u);if(!f)return;s.Ta.set(u,f.withResumeToken(re.EMPTY_BYTE_STRING,f.snapshotVersion)),sp(s,u);const p=new Tn(f.target,u,d,f.sequenceNumber);Rl(s,p)})),s.remoteSyncer.applyRemoteEvent(l)})(e,n)}catch(r){J(Mr,"Failed to raise snapshot:",r),await yh(e,r)}}async function yh(e,t,n){if(!jr(t))throw t;e.Ia.add(1),await Ui(e),e.Aa.set("Offline"),n||(n=()=>np(e.localStore)),e.asyncQueue.enqueueRetryable((async()=>{J(Mr,"Retrying IndexedDB access"),await n(),e.Ia.delete(1),await bo(e)}))}async function vh(e,t){const n=wt(e);n.asyncQueue.verifyOperationInProgress(),J(Mr,"RemoteStore received new credentials");const r=$i(n);n.Ia.add(3),await Ui(n),r&&n.Aa.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.Ia.delete(3),await bo(n)}async function Tw(e,t){const n=wt(e);t?(n.Ia.delete(2),await bo(n)):t||(n.Ia.add(2),await Ui(n),n.Aa.set("Unknown"))}function $r(e){return e.Va||(e.Va=(function(n,r,i){const s=wt(n);return s.ia(),new pw(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)})(e.datastore,e.asyncQueue,{Zo:_w.bind(null,e),e_:bw.bind(null,e),n_:ww.bind(null,e),J_:Ew.bind(null,e)}),e.da.push((async t=>{t?(e.Va.N_(),Vl(e)?Pl(e):e.Aa.set("Unknown")):(await e.Va.stop(),op(e))}))),e.Va}/** 1683 * @license 1684 * Copyright 2017 Google LLC 1685 * 1686 * Licensed under the Apache License, Version 2.0 (the "License"); 1687 * you may not use this file except in compliance with the License. 1688 * You may obtain a copy of the License at 1689 * 1690 * http://www.apache.org/licenses/LICENSE-2.0 1691 * 1692 * Unless required by applicable law or agreed to in writing, software 1693 * distributed under the License is distributed on an "AS IS" BASIS, 1694 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1695 * See the License for the specific language governing permissions and 1696 * limitations under the License. 1697 */class kl{constructor(t,n,r,i,s){this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Cn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((a=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(t,n,r,i,s){const a=Date.now()+r,l=new kl(t,n,a,i,s);return l.start(r),l}start(t){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new H(D.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
1697)}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((t=>this.deferred.resolve(t)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function ap(e,t){if(cn("AsyncQueue",`${t}: ${e}`),jr(e))return new H(D.UNAVAILABLE,`${t}: ${e}`);throw e}/** 1698 * @license 1699 * Copyright 2017 Google LLC 1700 * 1701 * Licensed under the Apache License, Version 2.0 (the "License"); 1702 * you may not use this file except in compliance with the License. 1703 * You may obtain a copy of the License at 1704 * 1705 * http://www.apache.org/licenses/LICENSE-2.0 1706 * 1707 * Unless required by applicable law or agreed to in writing, software 1708 * distributed under the License is distributed on an "AS IS" BASIS, 1709 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1710 * See the License for the specific language governing permissions and 1711 * limitations under the License. 1712 */class Cr{static emptySet(t){return new Cr(t.comparator)}constructor(t){this.comparator=t?(n,r)=>t(n,r)||tt.comparator(n.key,r.key):(n,r)=>tt.comparator(n.key,r.key),this.keyedMap=li(),this.sortedSet=new qt(this.comparator)}has(t){return this.keyedMap.get(t)!=null}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const n=this.keyedMap.get(t);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal(((n,r)=>(t(n),!1)))}add(t){const n=this.delete(t.key);return n.copy(n.keyedMap.insert(t.key,t),n.sortedSet.insert(t,null))}delete(t){const n=this.get(t);return n?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(n)):this}isEqual(t){if(!(t instanceof Cr)||this.size!==t.size)return!1;const n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const t=[];return this.forEach((n=>{t.push(n.toString())})),t.length===0?"DocumentSet ()":`DocumentSet ( 1713 `+t.join(` 1714`)+` 1715)`}copy(t,n){const r=new Cr;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}/** 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 _h{constructor(){this.fa=new qt(tt.comparator)}track(t){const n=t.doc.key,r=this.fa.get(n);r?t.type!==0&&r.type===3?this.fa=this.fa.insert(n,t):t.type===3&&r.type!==1?this.fa=this.fa.insert(n,{type:r.type,doc:t.doc}):t.type===2&&r.type===2?this.fa=this.fa.insert(n,{type:2,doc:t.doc}):t.type===2&&r.type===0?this.fa=this.fa.insert(n,{type:0,doc:t.doc}):t.type===1&&r.type===0?this.fa=this.fa.remove(n):t.type===1&&r.type===2?this.fa=this.fa.insert(n,{type:1,doc:r.doc}):t.type===0&&r.type===1?this.fa=this.fa.insert(n,{type:2,doc:t.doc}):ct(63341,{At:t,ga:r}):this.fa=this.fa.insert(n,t)}pa(){const t=[];return this.fa.inorderTraversal(((n,r)=>{t.push(r)})),t}}class Lr{constructor(t,n,r,i,s,a,l,u,d){this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=a,this.syncStateChanged=l,this.excludesMetadataChanges=u,this.hasCachedResults=d}static fromInitialDocuments(t,n,r,i,s){const a=[];return n.forEach((l=>{a.push({type:0,doc:l})})),new Lr(t,n,Cr.emptySet(n),a,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&po(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const n=this.docChanges,r=t.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!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 Iw{constructor(){this.ya=void 0,this.wa=[]}Sa(){return this.wa.some((t=>t.ba()))}}class xw{constructor(){this.queries=bh(),this.onlineState="Unknown",this.Da=new Set}terminate(){(function(n,r){const i=wt(n),s=i.queries;i.queries=bh(),s.forEach(((a,l)=>{for(const u of l.wa)u.onError(r)}))})(this,new H(D.ABORTED,"Firestore shutting down"))}}function bh(){return new lr((e=>kf(e)),po)}async function lp(e,t){const n=wt(e);let r=3;const i=t.query;let s=n.queries.get(i);s?!s.Sa()&&t.ba()&&(r=2):(s=new Iw,r=t.ba()?0:1);try{switch(r){case 0:s.ya=await n.onListen(i,!0);break;case 1:s.ya=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(a){const l=ap(a,`Initialization of query '${yr(t.query)}' failed`);return void t.onError(l)}n.queries.set(i,s),s.wa.push(t),t.va(n.onlineState),s.ya&&t.Ca(s.ya)&&Dl(n)}async function cp(e,t){const n=wt(e),r=t.query;let i=3;const s=n.queries.get(r);if(s){const a=s.wa.indexOf(t);a>=0&&(s.wa.splice(a,1),s.wa.length===0?i=t.ba()?0:1:!s.Sa()&&t.ba()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function Aw(e,t){const n=wt(e);let r=!1;for(const i of t){const s=i.query,a=n.queries.get(s);if(a){for(const l of a.wa)l.Ca(i)&&(r=!0);a.ya=i}}r&&Dl(n)}function Sw(e,t,n){const r=wt(e),i=r.queries.get(t);if(i)for(const s of i.wa)s.onError(n);r.queries.delete(t)}
1745function Dl(e){e.Da.forEach((t=>{t.next()}))}var $a,wh;(wh=$a||($a={})).Fa="default",wh.Cache="cache";class up{constructor(t,n,r){this.query=t,this.Ma=n,this.xa=!1,this.Oa=null,this.onlineState="Unknown",this.options=r||{}}Ca(t){if(!this.options.includeMetadataChanges){const r=[];for(const i of t.docChanges)i.type!==3&&r.push(i);t=new Lr(t.query,t.docs,t.oldDocs,r,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let n=!1;return this.xa?this.Na(t)&&(this.Ma.next(t),n=!0):this.Ba(t,this.onlineState)&&(this.La(t),n=!0),this.Oa=t,n}onError(t){this.Ma.error(t)}va(t){this.onlineState=t;let n=!1;return this.Oa&&!this.xa&&this.Ba(this.Oa,t)&&(this.La(this.Oa),n=!0),n}Ba(t,n){if(!t.fromCache||!this.ba())return!0;const r=n!=="Offline";return(!this.options.ka||!r)&&(!t.docs.isEmpty()||t.hasCachedResults||n==="Offline")}Na(t){if(t.docChanges.length>0)return!0;const n=this.Oa&&this.Oa.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}La(t){t=Lr.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.xa=!0,this.Ma.next(t)}ba(){return this.options.source!==$a.Cache}}/** 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 hp{constructor(t){this.key=t}}class dp{constructor(t){this.key=t}}class Cw{constructor(t,n){this.query=t,this.Ha=n,this.Ya=null,this.hasCachedResults=!1,this.current=!1,this.Za=Et(),this.mutatedKeys=Et(),this.Xa=Df(t),this.eu=new Cr(this.Xa)}get tu(){return this.Ha}nu(t,n){const r=n?n.ru:new _h,i=n?n.eu:this.eu;let s=n?n.mutatedKeys:this.mutatedKeys,a=i,l=!1;const u=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,d=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(t.inorderTraversal(((f,p)=>{const g=i.get(f),I=mo(this.query,p)?p:null,R=!!g&&this.mutatedKeys.has(g.key),V=!!I&&(I.hasLocalMutations||this.mutatedKeys.has(I.key)&&I.hasCommittedMutations);let O=!1;g&&I?g.data.isEqual(I.data)?R!==V&&(r.track({type:3,doc:I}),O=!0):this.iu(g,I)||(r.track({type:2,doc:I}),O=!0,(u&&this.Xa(I,u)>0||d&&this.Xa(I,d)<0)&&(l=!0)):!g&&I?(r.track({type:0,doc:I}),O=!0):g&&!I&&(r.track({type:1,doc:g}),O=!0,(u||d)&&(l=!0)),O&&(I?(a=a.add(I),s=V?s.add(f):s.delete(f)):(a=a.delete(f),s=s.delete(f)))})),this.query.limit!==null)for(;a.size>this.query.limit;){const f=this.query.limitType==="F"?a.last():a.first();a=a.delete(f.key),s=s.delete(f.key),r.track({type:1,doc:f})}return{eu:a,ru:r,Ds:l,mutatedKeys:s}}iu(t,n){return t.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(t,n,r,i){const s=this.eu;this.eu=t.eu,this.mutatedKeys=t.mutatedKeys;const a=t.ru.pa();a.sort(((f,p)=>(function(I,R){const V=O=>{switch(O){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ct(20277,{At:O})}};return V(I)-V(R)})(f.type,p.type)||this.Xa(f.doc,p.doc))),this.su(r),i=i!=null&&i;const l=n&&!i?this.ou():[],u=this.Za.size===0&&this.current&&!i?1:0,d=u!==this.Ya;return this.Ya=u,a.length!==0||d?{snapshot:new Lr(this.query,t.eu,s,a,t.mutatedKeys,u===0,d,!1,!!r&&r.resumeToken.approximateByteSize()>0),_u:l}:{_u:l}}va(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({eu:this.eu,ru:new _h,mutatedKeys:this.mutatedKeys,Ds:!1},!1)):{_u:[]}}au(t){return!this.Ha.has(t)&&!!this.eu.has(t)&&!this.eu.get(t).hasLocalMutations}su(t){t&&(t.addedDocuments.forEach((n=>this.Ha=this.Ha.add(n))),t.modifiedDocuments.forEach((n=>{})),t.removedDocuments.forEach((n=>this.Ha=this.Ha.delete(n))),this.current=t.current)}ou(){if(!this.current)return[];const t=this.Za;this.Za=Et(),this.eu.forEach((r=>{this.au(r.key)&&(this.Za=this.Za.add(r.key))}
1760));const n=[];return t.forEach((r=>{this.Za.has(r)||n.push(new dp(r))})),this.Za.forEach((r=>{t.has(r)||n.push(new hp(r))})),n}uu(t){this.Ha=t.qs,this.Za=Et();const n=this.nu(t.documents);return this.applyChanges(n,!0)}cu(){return Lr.fromInitialDocuments(this.query,this.eu,this.mutatedKeys,this.Ya===0,this.hasCachedResults)}}const Nl="SyncEngine";class Rw{constructor(t,n,r){this.query=t,this.targetId=n,this.view=r}}class Pw{constructor(t){this.key=t,this.lu=!1}}class Vw{constructor(t,n,r,i,s,a){this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=a,this.hu={},this.Pu=new lr((l=>kf(l)),po),this.Tu=new Map,this.Iu=new Set,this.du=new qt(tt.comparator),this.Eu=new Map,this.Au=new Il,this.Ru={},this.Vu=new Map,this.mu=Or.ur(),this.onlineState="Unknown",this.fu=void 0}get isPrimaryClient(){return this.fu===!0}}async function kw(e,t,n=!0){const r=yp(e);let i;const s=r.Pu.get(t);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.cu()):i=await fp(r,t,n,!0),i}async function Dw(e,t){const n=yp(e);await fp(n,t,!0,!1)}async function fp(e,t,n,r){const i=await sw(e.localStore,Ke(t)),s=i.targetId,a=e.sharedCl
1760ientState.addLocalQueryTarget(s,n);let l;return r&&(l=await Nw(e,t,s,a==="current",i.resumeToken)),e.isPrimaryClient&&n&&ip(e.remoteStore,i),l}async function Nw(e,t,n,r,i){e.gu=(p,g,I)=>(async function(V,O,B,j){let Q=O.view.nu(B);Q.Ds&&(Q=await dh(V.localStore,O.query,!1).then((({documents:x})=>O.view.nu(x,Q))));const $=j&&j.targetChanges.get(O.targetId),ut=j&&j.targetMismatches.get(O.targetId)!=null,gt=O.view.applyChanges(Q,V.isPrimaryClient,$,ut);return Th(V,O.targetId,gt._u),gt.snapshot})(e,p,g,I);const s=await dh(e.localStore,t,!0),a=new Cw(t,s.qs),l=a.nu(s.documents),u=ji.createSynthesizedTargetChangeForCurrentChange(n,r&&e.onlineState!=="Offline",i),d=a.applyChanges(l,e.isPrimaryClient,u);Th(e,n,d._u);const f=new Rw(t,n,a);return e.Pu.set(t,f),e.Tu.has(n)?e.Tu.get(n).push(t):e.Tu.set(n,[t]),d.snapshot}async function Ow(e,t,n){const r=wt(e),i=r.Pu.get(t),s=r.Tu.get(i.targetId);if(s.length>1)return r.Tu.set(i.targetId,s.filter((a=>!po(a,t)))),void r.Pu.delete(t);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
1760ientState.isActiveQueryTarget(i.targetId)||await ja(r.localStore,i.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(i.targetId),n&&Cl(r.remoteStore,i.targetId),qa(r,i.targetId)})).catch(lo)):(qa(r,i.targetId),await ja(r.localStore,i.targetId,!0))}async function Mw(e,t){const n=wt(e),r=n.Pu.get(t),i=n.Tu.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),Cl(n.remoteStore,r.targetId))}async function pp(e,t){const n=wt(e);try{const r=await rw(n.localStore,t);t.targetChanges.forEach(((i,s)=>{const a=n.Eu.get(s);a&&(Lt(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1,22616),i.addedDocuments.size>0?a.lu=!0:i.modifiedDocuments.size>0?Lt(a.lu,14607):i.removedDocuments.size>0&&(Lt(a.lu,42227),a.lu=!1))})),await gp(n,r,t)}catch(r){await lo(r)}}function Eh(e,t,n){const r=wt(e);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.Pu.forEach(((s,a)=>{const l=a.view.va(t);l.snapshot&&i.push(l.snapshot)})),(function(a,l){const u=wt(a);u.onlineState=l;let d=!1;u.queries.forEach(((f,p)=>{for(const g of p.wa)g.va(l)&&(d=!0)})),d&&Dl(u)})(r.eventManager,t),i.length&&r.hu.J_(i),r.onlineState=t,r.isPrimaryClient&&r.sharedCl
1760ientState.setOnlineState(t)}}async function Lw(e,t,n){const r=wt(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.Eu.get(t),s=i&&i.key;if(s){let a=new qt(tt.comparator);a=a.insert(s,de.newNoDocument(s,lt.min()));const l=Et().add(s),u=new vo(lt.min(),new Map,new qt(yt),a,l);await pp(r,u),r.du=r.du.remove(s),r.Eu.delete(t),Ol(r)}else await ja(r.localStore,t,!1).then((()=>qa(r,t,n))).catch(lo)}function qa(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.Tu.get(t))e.Pu.delete(r),n&&e.hu.pu(r,n);e.Tu.delete(t),e.isPrimaryClient&&e.Au.zr(t).forEach((r=>{e.Au.containsKey(r)||mp(e,r)}))}function mp(e,t){e.Iu.delete(t.path.canonicalString());const n=e.du.get(t);n!==null&&(Cl(e.remoteStore,n),e.du=e.du.remove(t),e.Eu.delete(n),Ol(e))}function Th(e,t,n){for(const r of n)r instanceof hp?(e.Au.addReference(r.key,t),Fw(e,r)):r instanceof dp?(J(Nl,"Document no longer in limbo: "+r.key),e.Au.removeReference(r.key,t),e.Au.containsKey(r.key)||mp(e,r.key)):ct(19791,{yu:r})}function Fw(e,t){const n=t.key,r=n.path.canonicalString();e.du.get(n)||e.Iu.has(r)||(J(Nl,"New document in limbo: "+n),e.Iu.add(r),Ol(e))}function Ol(e){for(;e.Iu.size>0&&e.du.size<e.maxConcurrentLimboResolutions;){const t=e.Iu.values().next().value;e.Iu.delete(t);const n=new tt(Ct.fromString(t)),r=e.mu.next();e.Eu.set(r,new Pw(n)),e.du=e.du.insert(n,r),ip(e.remoteStore,new Tn(Ke(vl(n.path)),r,"TargetPurposeLimboResolution",co.ue))}}async function gp(e,t,n){const r=wt(e),i=[],s=[],a=[];r.Pu.isEmpty()||(r.Pu.forEach(((l,u)=>{a.push(r.gu(u,t,n).then((d=>{var f;if((d||n)&&r.isPrimaryClient){const p=d?!d.fromCache:(f=n==null?void 0:n.targetChanges.get(u.targetId))===null||f===void 0?void 0:f.current;
1760r.sharedClientState.updateQueryState(u.targetId,p?"current":"not-current")}if(d){i.push(d);const p=Al.Es(u.targetId,d);s.push(p)}})))})),await Promise.all(a),r.hu.J_(i),await(async function(u,d){const f=wt(u);try{await f.persistence.runTransaction("notifyLocalViewChanges","readwrite",(p=>k.forEach(d,(g=>k.forEach(g.Is,(I=>f.persistence.referenceDelegate.addReference(p,g.targetId,I))).next((()=>k.forEach(g.ds,(I=>f.persistence.referenceDelegate.removeReference(p,g.targetId,I)))))))))}catch(p){if(!jr(p))throw p;J(Sl,"Failed to update sequence numbers: "+p)}for(const p of d){const g=p.targetId;if(!p.fromCache){const I=f.Fs.get(g),R=I.snapshotVersion,V=I.withLastLimboFreeSnapshotVersion(R);f.Fs=f.Fs.insert(g,V)}}})(r.localStore,s))}async function Bw(e,t){const n=wt(e);if(!n.currentUser.isEqual(t)){J(Nl,"User change. New user:",t.toKey());const r=await ep(n.localStore,t);n.currentUser=t,(function(s,a){s.Vu.forEach((l=>{l.forEach((u=>{u.reject(new H(D.CANCELLED,a))}))})),s.Vu.clear()})(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await gp(n,r.Bs)}}function jw(e,t){const n=wt(e),r=n.Eu.get(t);if(r&&r.lu)return Et().add(r.key);{let i=Et();const s=n.Tu.get(t);if(!s)return i;for(const a of s){const l=n.Pu.get(a);i=i.unionWith(l.view.tu)}return i}}function yp(e){const t=wt(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=pp.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=jw.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Lw.bind(null,t),t.hu.J_=Aw.bind(null,t.eventManager),t.hu.pu=Sw.bind(null,t.eventManager),t}class Qs{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(t){this.serializer=_o(t.databaseInfo.databaseId),this.sharedClientState=this.bu(t),this.persistence=this.Du(t),await this.persistence.start(),this.localStore=this.vu(t),this.gcScheduler=this.Cu(t,this.localStore),this.indexBackfillerScheduler=this.Fu(t,this.localStore)}Cu(t,n){return null}Fu(t,n){return null}vu(t){return nw(this.persistence,new Zb,t.initialUser,this.serializer)}Du(t){return new tp(xl.Vi,this.serializer)}bu(t){return new aw}async terminate(){var t,n;(t=this.gcScheduler)===null||t===void 0||t.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}Qs.provider={build:()=>new Qs};class Uw extends Qs{constructor(t){super(),this.cacheSizeBytes=t}Cu(t,n){Lt(this.persistence.referenceDelegate instanceof Ws,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new Fb(r,t.asyncQueue,n)}Du(t){const n=this.cacheSizeBytes!==void 0?Ee.withCacheSize(this.cacheSizeBytes):Ee.DEFAULT;return new tp((r=>Ws.Vi(r,n)),this.serializer)}}class za{async initialize(t,n){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>Eh(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=Bw.bind(null,this.syncEngine),await Tw(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(t){return(function(){return new xw})()}createDatastore(t){const n=_o(t.databaseInfo.databaseId),r=(function(s){return new dw(s)})(t.databaseInfo);return(function(s,a,l,u){return new gw(s,a,l,u)})(t.authCredentials,t.appCheckCredentials,r,n)}createRemoteStore(t){return(function(r,i,s,a,l){return new vw(r,i,s,a,l)})(this.localStore,this.datastore,t.asyncQueue,(n=>Eh(this.syncEngine,n,0)),(function(){return mh.C()?new mh:new lw})())}createSyncEngine(t,n){return(function(i,s,a,l,u,d,f){const p=new Vw(i,s,a,l,u,d);return f&&(p.fu=!0),p})(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,n)}async terminate(){var t,n;await(async function(i){const s=wt(i);J(Mr,"RemoteStore shutting down."),s.Ia.add(5),await Ui(s),s.Ea.shutdown(),s.Aa.set("Unknown")})(this.remoteStore),(t=this.datastore)===null||t===void 0||t.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}za.provider={build:()=>new za};/** 1761 * @license 1762 * Copyright 2020 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 *//** 1776 * @license 1777 * Copyright 2017 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 */class vp{constructor(t){this.observer=t,this.muted=!1}next(t){this.muted||this.observer.next&&this.xu(this.observer.next,t)}error(t){this.muted||(this.observer.error?this.xu(this.observer.error,t):cn("Uncaught Error in snapshot listener:",t.toString()))}Ou(){this.muted=!0}xu(t,n){setTimeout((()=>{this.muted||t(n)}),0)}}/** 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 */const Bn="FirestoreClient";class $w{constructor(t,n,r,i,s){this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=ce.UNAUTHENTICATED,this.clientId=pl.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,(async a=>{J(Bn,"Received user=",a.uid),await this.authCredentialListener(a),this.user=a})),this.appCheckCredentials.start(r,(a=>(J(Bn,"Received new app check token=",a),this.appCheckCredentialListener(a,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(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}terminate(){this.asyncQueue.enterRestrictedMode();const t=new Cn;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),t.resolve()}catch(n){const r=ap(n,"Failed to shutdown persistence");t.reject(r)}})),t.promise}}async function oa(e,t){e.asyncQueue.verifyOperationInProgress(),J(Bn,"Initializing OfflineComponentProvider");const n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async i=>{r.isEqual(i)||(await ep(t.localStore,i),r=i)})),t.persistence.setDatabaseDeletedListener((()=>{Dn("Terminating Firestore due to IndexedDb database deletion"),e.terminate().then((()=>{J("Terminating Firestore due to IndexedDb database deletion completed successfully")})).catch((i=>{Dn("Terminating Firestore due to IndexedDb database deletion failed",i)}))})),e._offlineComponents=t}async function Ih(e,t){e.asyncQueue.verifyOperationInProgress();const n=await qw(e);J(Bn,"Initializing OnlineComponentProvider"),await t.initialize(n,e.configuration),e.setCredentialChangeListener((r=>vh(t.remoteStore,r))),e.setAppCheckTokenChangeListener(((r,i)=>vh(t.remoteStore,i))),e._onlineComponents=t}async function qw(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){J(Bn,"Using user provided OfflineComponentProvider");try{await oa(e,e._uninitializedComponentsProvider._offline)}catch(t){const n=t;if(!(function(i){return i.name==="FirebaseError"?i.code===D.FAILED_PRECONDITION||i.code===D.UNIMPLEMENT
1805ED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11})(n))throw n;Dn("Error using user provided cache. Falling back to memory cache: "+n),await oa(e,new Qs)}}else J(Bn,"Using default OfflineComponentProvider"),await oa(e,new Uw(void 0));return e._offlineComponents}async function zw(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(J(Bn,"Using user provided OnlineComponentProvider"),await Ih(e,e._uninitializedComponentsProvider._online)):(J(Bn,"Using default OnlineComponentProvider"),await Ih(e,new za))),e._onlineComponents}async function _p(e){const t=await zw(e),n=t.eventManager;return n.onListen=kw.bind(null,t.syncEngine),n.onUnlisten=Ow.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=Dw.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=Mw.bind(null,t.syncEngine),n}function Hw(e,t,n={}){const r=new Cn;return e.asyncQueue.enqueueAndForget((async()=>(function(s,a,l,u,d){const f=new vp({next:g=>{f.Ou(),a.enqueueAndForget((()=>cp(s,p)));const I=g.docs.has(l);!I&&g.fromCache?d.reject(new H(D.UNAVAILABLE,"Failed to get document because the client is offline.")):I&&g.fromCache&&u&&u.source==="server"?d.reject(new H(D.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.)')):d.resolve(g)},error:g=>d.reject(g)}),p=new up(vl(l.path),f,{includeMetadataChanges:!0,ka:!0});return lp(s,p)})(await _p(e),e.asyncQueue,t,n,r))),r.promise}function Gw(e,t,n={}){const r=new Cn;return e.asyncQueue.enqueueAndForget((async()=>(function(s,a,l,u,d){const f=new vp({next:g=>{f.Ou(),a.enqueueAndForget((()=>cp(s,p))),g.fromCache&&u.source==="server"?d.reject(new H(D.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.)')):d.resolve(g)},error:g=>d.reject(g)}),p=new up(l,f,{includeMetadataChanges:!0,ka:!0});return lp(s,p)})(await _p(e),e.asyncQueue,t,n,r))),r.promise}/** 1806 * @license 1807 * Copyright 2023 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 */function bp(e){const t={};return e.timeoutSeconds!==void 0&&(t.timeoutSeconds=e.timeoutSeconds),t}/** 1821 * @license 1822 * Copyright 2020 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 */const xh=new Map;/** 1836 * @license 1837 * Copyright 2020 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 */const wp="firestore.googleapis.com",Ah=!0;class Sh{constructor(t){var n,r;if(t.host===void 0){if(t.ssl!==void 0)throw new H(D.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=wp,this.ssl=Ah}else this.host=t.host,this.ssl=(n=t.ssl)!==null&&n!==void 0?n:Ah;if(this.isUsingEmulator=t.emulatorOptions!==void 0,this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,t.cacheSizeBytes===void 0)this.cacheSizeBytes=Zf;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<Mb)throw new H(D.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}x_("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:t.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=bp((r=t.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),(function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new H(D.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new H(D.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new H(D.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&(function(r,i){return r.timeoutSeconds===i.timeoutSeconds})(this.experimentalLongPollingOptions,t.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}}class wo{constructor(t,n,r,i){this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Sh({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new H(D.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!=="notTerminated"}_setSettings(t){if(this._settingsFrozen)throw new H(D.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 Sh(t),this._emulatorOptions=t.emulatorOptions||{},t.credentials!==void 0&&(this._authCredentials=(function(r){if(!r)return new g_;switch(r.type){case"firstParty":return new b_(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new H(D.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
1850d credential type")}})(t.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return(function(n){const r=xh.get(n);r&&(J("ComponentProvider","Removing Datastore"),xh.delete(n),r.terminate())})(this),Promise.resolve()}}function Kw(e,t,n,r={}){var i;e=Vi(e,wo);const s=hl(t),a=e._getSettings(),l=Object.assign(Object.assign({},a),{emulatorOptions:e._getEmulatorOptions()}),u=`${t}:${n}`;s&&(Hy(`https://${u}`),Qy("Firestore",!0)),a.host!==wp&&a.host!==u&&Dn("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const d=Object.assign(Object.assign({},a),{host:u,ssl:s,emulatorOptions:r});if(!Fs(d,l)&&(e._setSettings(d),r.mockUserToken)){let f,p;if(typeof r.mockUserToken=="string")f=r.mockUserToken,p=ce.MOCK_USER;else{f=Gy(r.mockUserToken,(i=e._app)===null||i===void 0?void 0:i.options.projectId);const g=r.mockUserToken.sub||r.mockUserToken.user_id;if(!g)throw new H(D.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");p=new ce(g)}e._authCredentials=new y_(new ff(f,p))}}/** 1851 * @license 1852 * Copyright 2020 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 */class hn{constructor(t,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=t}withConverter(t){return new hn(this.firestore,t,this._query)}}class Kt{constructor(t,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Rn(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new Kt(this.firestore,t,this._key)}toJSON(){return{type:Kt._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(t,n,r){if(Bi(n,Kt._jsonSchema))return new Kt(t,r||null,new tt(Ct.fromString(n.referencePath)))}}Kt._jsonSchemaVersion="firestore/documentReference/1.0",Kt._jsonSchema={type:Gt("string",Kt._jsonSchemaVersion),referencePath:Gt("string")};class Rn extends hn{constructor(t,n,r){super(t,n,vl(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new Kt(this.firestore,null,new tt(t))}withConverter(t){return new Rn(this.firestore,t,this._path)}}function aa(e,t,...n){if(e=Pr(e),mf("collection","path",t),e instanceof wo){const r=Ct.fromString(t,...n);return ju(r),new Rn(e,null,r)}{if(!(e instanceof Kt||e instanceof Rn))throw new H(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(Ct.fromString(t,...n));return ju(r),new Rn(e.firestore,null,r)}}function Ww(e,t,...n){if(e=Pr(e),arguments.length===1&&(t=pl.newId()),mf("doc","path",t),e instanceof wo){const r=Ct.fromString(t,...n);return Bu(r),new Kt(e,null,new tt(r))}{if(!(e instanceof Kt||e instanceof Rn))throw new H(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(Ct.fromString(t,...n));return Bu(r),new Kt(e.firestore,e instanceof Rn?e.converter:null,new tt(r))}}/** 1866 * @license 1867 * Copyright 2020 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 */const Ch="AsyncQueue";class Rh{constructor(t=Promise.resolve()){this.Zu=[],this.Xu=!1,this.ec=[],this.tc=null,this.nc=!1,this.rc=!1,this.sc=[],this.F_=new rp(this,"async_queue_retry"),this.oc=()=>{const r=sa();r&&J(Ch,"Visibility state changed to "+r.visibilityState),this.F_.y_()},this._c=t;const n=sa();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.oc)}get isShuttingDown(){return this.Xu}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.ac(),this.uc(t)}enterRestrictedMode(t){if(!this.Xu){this.Xu=!0,this.rc=t||!1;const n=sa();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.oc)}}enqueue(t){if(this.ac(),this.Xu)return new Promise((()=>{}));const n=new Cn;return this.uc((()=>this.Xu&&this.rc?Promise.resolve():(t().then(n.resolve,n.reject),n.promise))).then((()=>n.promise))}enqueueRetryable(t){this.enqueueAndForget((()=>(this.Zu.push(t),this.cc())))}async cc(){if(this.Zu.length!==0){try{await this.Zu[0](),this.Zu.shift(),this.F_.reset()}catch(t){if(!jr(t))throw t;J(Ch,"Operation failed with retryable error: "+t)}this.Zu.length>0&&this.F_.g_((()=>this.cc()))}}uc(t){const n=this._c.then((()=>(this.nc=!0,t().catch((r=>{throw this.tc=r,this.nc=!1,cn("INTERNAL UNHANDLED ERROR: ",Ph(r)),r})).then((r=>(this.nc=!1,r))))));return this._c=n,n}enqueueAfterDelay(t,n,r){this.ac(),this.sc.indexOf(t)>-1&&(n=0);const i=kl.createAndSchedule(this,t,n,r,(s=>this.lc(s)));return this.ec.push(i),i}ac(){this.tc&&ct(47125,{hc:Ph(this.tc)})}verifyOperationInProgress(){}async Pc(){let t;do t=this._c,await t;while(t!==this._c)}Tc(t){for(const n of this.ec)if(n.timerId===t)return!0;return!1}Ic(t){return this.Pc().then((()=>{this.ec.sort(((n,r)=>n.targetTimeMs-r.targetTimeMs));for(const n of this.ec)if(n.skipDelay(),t!=="all"&&n.timerId===t)break;return this.Pc()}))}dc(t){this.sc.push(t)}lc(t){const n=this.ec.indexOf(t);this.ec.splice(n,1)}}function Ph(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+` 1881`+e.stack),t}class Ml extends wo{constructor(t,n,r,i){super(t,n,r,i),this.type="firestore",this._queue=new Rh,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const t=this._firestoreClient.terminate();this._queue=new Rh(t),this._firestoreClient=void 0,await t}}}function Qw(e,t){const n=typeof e=="object"?e:s_(),r=typeof e=="string"?e:$s,i=t_(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=qy("firestore");s&&Kw(i,...s)}return i}function Ep(e){if(e._terminated)throw new H(D.FAILED_PRECONDITION,"The client has already been terminated.");return e._firestoreClient||Jw(e),e._firestoreClient}function Jw(e){var t,n,r;const i=e._freezeSettings(),s=(function(l,u,d,f){return new F_(l,u,d,f.host,f.ssl,f.experimentalForceLongPolling,f.experimentalAutoDetectLongPolling,bp(f.experimentalLongPollingOptions),f.useFetchStreams,f.isUsingEmulator)})(e._databaseId,((t=e._app)===null||t===void 0?void 0:t.options.appId)||"",e._persistenceKey,i);e._componentsProvider||!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(e._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),e._firestoreClient=new $w(e._authCredentials,e._appCheckCredentials,e._queue,s,e._componentsProvider&&(function(l){const u=l==null?void 0:l._online.build();return{_offline:l==null?void 0:l._offline.build(u),_online:u}})(e._componentsProvider))}/** 1882 * @license 1883 * Copyright 2020 Google LLC 1884 * 1885 * Licensed under the Apache License, Version 2.0 (the "License");
1886 * you may not use this file except in compliance with the License. 1887 * You may obtain a copy of the License at 1888 * 1889 * http://www.apache.org/licenses/LICENSE-2.0 1890 * 1891 * Unless required by applicable law or agreed to in writing, software 1892 * distributed under the License is distributed on an "AS IS" BASIS, 1893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1894 * See the License for the specific language governing permissions and 1895 * limitations under the License. 1896 */class ke{constructor(t){this._byteString=t}static fromBase64String(t){try{return new ke(re.fromBase64String(t))}catch(n){throw new H(D.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(t){return new ke(re.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}toJSON(){return{type:ke._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(t){if(Bi(t,ke._jsonSchema))return ke.fromBase64String(t.bytes)}}ke._jsonSchemaVersion="firestore/bytes/1.0",ke._jsonSchema={type:Gt("string",ke._jsonSchemaVersion),bytes:Gt("string")};/** 1897 * @license 1898 * Copyright 2020 Google LLC 1899 * 1900 * Licensed under the Apache License, Version 2.0 (the "License"); 1901 * you may not use this file except in compliance with the License. 1902 * You may obtain a copy of the License at 1903 * 1904 * http://www.apache.org/licenses/LICENSE-2.0 1905 * 1906 * Unless required by applicable law or agreed to in writing, software 1907 * distributed under the License is distributed on an "AS IS" BASIS, 1908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1909 * See the License for the specific language governing permissions and 1910 * limitations under the License. 1911 */class Tp{constructor(...t){for(let n=0;n<t.length;++n)if(t[n].length===0)throw new H(D.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new fe(t)}isEqual(t){return this._internalPath.isEqual(t._internalPath)}}/** 1912 * @license 1913 * Copyright 2020 Google LLC 1914 * 1915 * Licensed under the Apache License, Version 2.0 (the "License"); 1916 * you may not use this file except in compliance with the License. 1917 * You may obtain a copy of the License at 1918 * 1919 * http://www.apache.org/licenses/LICENSE-2.0 1920 * 1921 * Unless required by applicable law or agreed to in writing, software 1922 * distributed under the License is distributed on an "AS IS" BASIS, 1923 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1924 * See the License for the specific language governing permissions and 1925 * limitations under the License. 1926 */class Ip{constructor(t){this._methodName=t}}/** 1927 * @license 1928 * Copyright 2017 Google LLC 1929 * 1930 * Licensed under the Apache License, Version 2.0 (the "License"); 1931 * you may not use this file except in compliance with the License. 1932 * You may obtain a copy of the License at 1933 * 1934 * http://www.apache.org/licenses/LICENSE-2.0 1935 * 1936 * Unless required by applicable law or agreed to in writing, software 1937 * distributed under the License is distributed on an "AS IS" BASIS, 1938 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1939 * See the License for the specific language governing permissions and 1940 * limitations under the License. 1941 */class We{constructor(t,n){if(!isFinite(t)||t<-90||t>90)throw new H(D.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new H(D.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}_compareTo(t){return yt(this._lat,t._lat)||yt(this._long,t._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:We._jsonSchemaVersion}}static fromJSON(t){if(Bi(t,We._jsonSchema))return new We(t.latitude,t.longitude)}}We._jsonSchemaVersion="firestore/geoPoint/1.0",We._jsonSchema={type:Gt("string",We._jsonSchemaVersion),latitude:Gt("number"),longitude:Gt("number")};/** 1942 * @license 1943 * Copyright 2024 Google LLC 1944 * 1945 * Licensed under the Apache License, Version 2.0 (the "License");
1946 * you may not use this file except in compliance with the License. 1947 * You may obtain a copy of the License at 1948 * 1949 * http://www.apache.org/licenses/LICENSE-2.0 1950 * 1951 * Unless required by applicable law or agreed to in writing, software 1952 * distributed under the License is distributed on an "AS IS" BASIS, 1953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1954 * See the License for the specific language governing permissions and 1955 * limitations under the License. 1956 */class Qe{constructor(t){this._values=(t||[]).map((n=>n))}toArray(){return this._values.map((t=>t))}isEqual(t){return(function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0})(this._values,t._values)}toJSON(){return{type:Qe._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(t){if(Bi(t,Qe._jsonSchema)){if(Array.isArray(t.vectorValues)&&t.vectorValues.every((n=>typeof n=="number")))return new Qe(t.vectorValues);throw new H(D.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}Qe._jsonSchemaVersion="firestore/vectorValue/1.0",Qe._jsonSchema={type:Gt("string",Qe._jsonSchemaVersion),vectorValues:Gt("object")};/** 1957 * @license 1958 * Copyright 2017 Google LLC 1959 * 1960 * Licensed under the Apache License, Version 2.0 (the "License"); 1961 * you may not use this file except in compliance with the License. 1962 * You may obtain a copy of the License at 1963 * 1964 * http://www.apache.org/licenses/LICENSE-2.0 1965 * 1966 * Unless required by applicable law or agreed to in writing, software 1967 * distributed under the License is distributed on an "AS IS" BASIS, 1968 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1969 * See the License for the specific language governing permissions and 1970 * limitations under the License. 1971 */const Yw=/^__.*__$/;function xp(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ct(40011,{Ec:e})}}class Ll{constructor(t,n,r,i,s,a){this.settings=t,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Ac(),this.fieldTransforms=s||[],this.fieldMask=a||[]}get path(){return this.settings.path}get Ec(){return this.settings.Ec}Rc(t){return new Ll(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Vc(t){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.Rc({path:r,mc:!1});return i.fc(t),i}gc(t){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.Rc({path:r,mc:!1});return i.Ac(),i}yc(t){return this.Rc({path:void 0,mc:!0})}wc(t){return Ha(t,this.settings.methodName,this.settings.Sc||!1,this.path,this.settings.bc)}contains(t){return this.fieldMask.find((n=>t.isPrefixOf(n)))!==void 0||this.fieldTransforms.find((n=>t.isPrefixOf(n.field)))!==void 0}Ac(){if(this.path)for(let t=0;t<this.path.length;t++)this.fc(this.path.get(t))}fc(t){if(t.length===0)throw this.wc("Document fields must not be empty");if(xp(this.Ec)&&Yw.test(t))throw this.wc('Document fields cannot begin and end with "__"')}}class Xw{constructor(t,n,r){this.databaseId=t,this.ignoreUndefinedProperties=n,this.serializer=r||_o(t)}Dc(t,n,r,i=!1){return new Ll({Ec:t,methodName:n,bc:r,path:fe.emptyPath(),mc:!1,Sc:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Ap(e){const t=e._freezeSettings(),n=_o(e._databaseId);return new Xw(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Sp(e,t,n,r=!1){return Fl(n,e.Dc(r?4:3,t))}function Fl(e,t){if(Cp(e=Pr(e)))return t0("Unsupported field value:",t,e),Zw(e,t);if(e instanceof Ip)return(function(r,i){if(!xp(i.Ec))throw i.wc(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.wc(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)})(e,t),null;if(e===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.mc&&t.Ec!==4)throw t.wc("Nested arrays are not supported");return(function(r,i){const s=[];let a=0;for(const l of r){let u=Fl(l,i.yc(a));u==null&&(u={nullValue:"NULL_VALUE"}),s.push(u),a++}return{arrayValue:{values:s}}})(e,t)}return(function(r,i){if((r=Pr(r))===null)return{nullValue:"NULL_VALUE"};
1971if(typeof r=="number")return ab(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=Dt.fromDate(r);return{timestampValue:Fa(i.serializer,s)}}if(r instanceof Dt){const s=new Dt(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:Fa(i.serializer,s)}}if(r instanceof We)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof ke)return{bytesValue:Hf(i.serializer,r._byteString)};if(r instanceof Kt){const s=i.databaseId,a=r.firestore._databaseId;if(!a.isEqual(s))throw i.wc(`Document reference is for database ${a.projectId}/${a.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:Gf(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof Qe)return(function(a,l){return{mapValue:{fields:{[If]:{stringValue:xf},[qs]:{arrayValue:{values:a.toArray().map((d=>{if(typeof d!="number")throw l.wc("VectorValues must only contain numeric values.");return bl(l.serializer,d)}))}}}}}})(r,i);throw i.wc(`Unsupported field value: ${ao(r)}`)})(e,t)}function Zw(e,t){const n={};return vf(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Ur(e,((r,i)=>{const s=Fl(i,t.Vc(r));s!=null&&(n[r]=s)})),{mapValue:{fields:n}}}function Cp(e){return!(typeof e!="object"||e===null||e instanceof Array||e instanceof Date||e instanceof Dt||e instanceof We||e instanceof ke||e instanceof Kt||e instanceof Ip||e instanceof Qe)}function t0(e,t,n){if(!Cp(n)||!gf(n)){const r=ao(n);throw r==="an object"?t.wc(e+" a custom object"):t.wc(e+" "+r)}}const e0=new RegExp("[~\\*/\\[\\]]");function n0(e,t,n){if(t.search(e0)>=0)throw Ha(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new Tp(...t.split("."))._internalPath}catch{throw Ha(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function Ha(e,t,n,r,i){const s=r&&!r.isEmpty(),a=i!==void 0;let l=`Function ${t}() called with invalid data`;n&&(l+=" (via `toFirestore()`)"),l+=". ";let u="";return(s||a)&&(u+=" (found",s&&(u+=` in field ${r}`),a&&(u+=` in document ${i}`),u+=")"),new H(D.INVALID_ARGUMENT,l+e+u)}/** 1972 * @license 1973 * Copyright 2020 Google LLC 1974 * 1975 * Licensed under the Apache License, Version 2.0 (the "License"); 1976 * you may not use this file except in compliance with the License. 1977 * You may obtain a copy of the License at 1978 * 1979 * http://www.apache.org/licenses/LICENSE-2.0 1980 * 1981 * Unless required by applicable law or agreed to in writing, software 1982 * distributed under the License is distributed on an "AS IS" BASIS, 1983 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1984 * See the License for the specific language governing permissions and 1985 * limitations under the License. 1986 */class Bl{constructor(t,n,r,i,s){this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Kt(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const t=new r0(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const n=this._document.data.field(Eo("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n)}}}class r0 extends Bl{data(){return super.data()}}function Eo(e,t){return typeof t=="string"?n0(e,t):t instanceof Tp?t._internalPath:t._delegate._internalPath}/** 1987 * @license 1988 * Copyright 2020 Google LLC 1989 * 1990 * Licensed under the Apache License, Version 2.0 (the "License"); 1991 * you may not use this file except in compliance with the License. 1992 * You may obtain a copy of the License at 1993 * 1994 * http://www.apache.org/licenses/LICENSE-2.0 1995 * 1996 * Unless required by applicable law or agreed to in writing, software 1997 * distributed under the License is distributed on an "AS IS" BASIS, 1998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1999 * See the License for the specific language governing permissions and 2000 * limitations under the License. 2001 */function i0(e){if(e.limitType==="L"&&e.explicitOrderBy.length===0)throw new H(D.UNIMPLEMENT
2001ED,"limitToLast() queries require specifying at least one orderBy() clause")}class jl{}class To extends jl{}function la(e,t,...n){let r=[];t instanceof jl&&r.push(t),r=r.concat(n),(function(s){const a=s.filter((u=>u instanceof Ul)).length,l=s.filter((u=>u instanceof Io)).length;if(a>1||a>0&&l>0)throw new H(D.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 i of r)e=i._apply(e);return e}class Io extends To{constructor(t,n,r){super(),this._field=t,this._op=n,this._value=r,this.type="where"}static _create(t,n,r){return new Io(t,n,r)}_apply(t){const n=this._parse(t);return Rp(t._query,n),new hn(t.firestore,t.converter,Na(t._query,n))}_parse(t){const n=Ap(t.firestore);return(function(s,a,l,u,d,f,p){let g;if(d.isKeyField()){if(f==="array-contains"||f==="array-contains-any")throw new H(D.INVALID_ARGUMENT,`Invalid Query. You can't perform '${f}' queries on documentId().`);if(f==="in"||f==="not-in"){Nh(p,f);const R=[];for(const V of p)R.push(Dh(u,s,V));g={arrayValue:{values:R}}}else g=Dh(u,s,p)}else f!=="in"&&f!=="not-in"&&f!=="array-contains-any"||Nh(p,f),g=Sp(l,a,p,f==="in"||f==="not-in");return Ht.create(d,f,g)})(t._query,"where",n,t.firestore._databaseId,this._field,this._op,this._value)}}function s0(e,t,n){const r=t,i=Eo("where",e);return Io._create(i,r,n)}class Ul extends jl{constructor(t,n){super(),this.type=t,this._queryConstraints=n}static _create(t,n){return new Ul(t,n)}_parse(t){const n=this._queryConstraints.map((r=>r._parse(t))).filter((r=>r.getFilters().length>0));return n.length===1?n[0]:Le.create(n,this._getOperator())}_apply(t){const n=this._parse(t);return n.getFilters().length===0?t:((function(i,s){let a=i;const l=s.getFlattenedFilters();for(const u of l)Rp(a,u),a=Na(a,u)})(t._query,n),new hn(t.firestore,t.converter,Na(t._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class $l extends To{constructor(t,n){super(),this._field=t,this._direction=n,this.type="orderBy"}static _create(t,n){return new $l(t,n)}_apply(t){const n=(function(i,s,a){if(i.startAt!==null)throw new H(D.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new H(D.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Mi(s,a)})(t._query,this._field,this._direction);return new hn(t.firestore,t.converter,(function(i,s){const a=i.explicitOrderBy.concat([s]);return new ar(i.path,i.collectionGroup,a,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)})(t._query,n))}}function Vh(e,t="asc"){const n=t,r=Eo("orderBy",e);return $l._create(r,n)}class ql extends To{constructor(t,n,r){super(),this.type=t,this._limit=n,this._limitType=r}static _create(t,n,r){return new ql(t,n,r)}_apply(t){return new hn(t.firestore,t.converter,Hs(t._query,this._limit,this._limitType))}}function kh(e){return A_("limit",e),ql._create("limit",e,"F")}class zl extends To{constructor(t,n,r){super(),this.type=t,this._docOrFields=n,this._inclusive=r}static _create(t,n,r){return new zl(t,n,r)}_apply(t){const n=a0(t,this.type,this._docOrFields,this._inclusive);return new hn(t.firestore,t.converter,(function(i,s){return new ar(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,s,i.endAt)})(t._query,n))}}function o0(...e){return zl._create("startAfter",e,!1)}function a0(e,t,n,r){if(n[0]=Pr(n[0]),n[0]instanceof Bl)return(function(s,a,l,u,d){if(!u)throw new H(D.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${l}().`);const f=[];for(const p of Ar(s))if(p.field.isKeyField())f.push(zs(a,u.key));else{const g=u.data.field(p.field);if(ho(g))throw new H(D.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+p.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(g===null){const I=p.field.canonicalString();throw new H(D.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${I}' (used as the orderBy) does not exist.`)}f.push(g)}return new Nr(f,d)})(e._query,e.firestore._databaseId,t,n[0]._document,r);{const i=Ap(e.firestore);return(function(a,l,u,d,f,p){const g=a.explicitOrderBy;if(f.length>g.length)throw new H(D.INVALID_ARGUMENT,`Too many arguments provided to ${d}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const I=[];for(let R=0;R<f.length;R++){const V=f[R];
2001if(g[R].field.isKeyField()){if(typeof V!="string")throw new H(D.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${d}(), but got a ${typeof V}`);if(!_l(a)&&V.indexOf("/")!==-1)throw new H(D.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${d}() must be a plain document ID, but '${V}' contains a slash.`);const O=a.path.child(Ct.fromString(V));if(!tt.isDocumentKey(O))throw new H(D.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${d}() must result in a valid document path, but '${O}' is not because it contains an odd number of segments.`);const B=new tt(O);I.push(zs(l,B))}else{const O=Sp(u,d,V);I.push(O)}}return new Nr(I,p)})(e._query,e.firestore._databaseId,i,t,n,r)}}function Dh(e,t,n){if(typeof(n=Pr(n))=="string"){if(n==="")throw new H(D.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!_l(t)&&n.indexOf("/")!==-1)throw new H(D.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=t.path.child(Ct.fromString(n));if(!tt.isDocumentKey(r))throw new H(D.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 zs(e,new tt(r))}if(n instanceof Kt)return zs(e,n._key);throw new H(D.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${ao(n)}.`)}function Nh(e,t){if(!Array.isArray(e)||e.length===0)throw new H(D.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function Rp(e,t){const n=(function(i,s){for(const a of i)for(const l of a.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null})(e.filters,(function(i){switch(i){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[]}})(t.op));if(n!==null)throw n===t.op?new H(D.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new H(D.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}class l0{convertValue(t,n="none"){switch(Ln(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Ut(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,n);case 5:return t.stringValue;case 6:return this.convertBytes(Mn(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,n);case 11:return this.convertObject(t.mapValue,n);case 10:return this.convertVectorValue(t.mapValue);default:throw ct(62114,{value:t})}}convertObject(t,n){return this.convertObjectMap(t.fields,n)}convertObjectMap(t,n="none"){const r={};return Ur(t,((i,s)=>{r[i]=this.convertValue(s,n)})),r}convertVectorValue(t){var n,r,i;const s=(i=(r=(n=t.fields)===null||n===void 0?void 0:n[qs].arrayValue)===null||r===void 0?void 0:r.values)===null||i===void 0?void 0:i.map((a=>Ut(a.doubleValue)));return new Qe(s)}
2001convertGeoPoint(t){return new We(Ut(t.latitude),Ut(t.longitude))}convertArray(t,n){return(t.values||[]).map((r=>this.convertValue(r,n)))}convertServerTimestamp(t,n){switch(n){case"previous":const r=fo(t);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Di(t));default:return null}}convertTimestamp(t){const n=On(t);return new Dt(n.seconds,n.nanos)}convertDocumentKey(t,n){const r=Ct.fromString(t);Lt(Xf(r),9688,{name:t});const i=new Ni(r.get(1),r.get(3)),s=new tt(r.popFirst(5));return i.isEqual(n)||cn(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}class ui{constructor(t,n){this.hasPendingWrites=t,this.fromCache=n}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class rr extends Bl{constructor(t,n,r,i,s,a){super(t,n,r,i,a),this._firestore=t,this._firestoreImpl=t,this.metadata=s}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const n=new Ss(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,n={}){if(this._document){const r=this._document.data.field(Eo("DocumentSnapshot.get",t));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new H(D.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const t=this._document,n={};return n.type=rr._jsonSchemaVersion,n.bundle="",n.bundleSource="DocumentSnapshot",n.bundleName=this._key.toString(),!t||!t.isValidDocument()||!t.isFoundDocument()?n:(this._userDataWriter.convertObjectMap(t.data.value.mapValue.fields,"previous"),n.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),n)}}rr._jsonSchemaVersion="firestore/documentSnapshot/1.0",rr._jsonSchema={type:Gt("string",rr._jsonSchemaVersion),bundleSource:Gt("string","DocumentSnapshot"),bundleName:Gt("string"),bundle:Gt("string")};class Ss extends rr{data(t={}){return super.data(t)}}class Rr{constructor(t,n,r,i){this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new ui(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const t=[];return this.forEach((n=>t.push(n))),t}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(t,n){this._snapshot.docs.forEach((r=>{t.call(n,new Ss(this._firestore,this._userDataWriter,r.key,r,new ui(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(t={}){const n=!!t.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new H(D.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=(function(i,s){if(i._snapshot.oldDocs.isEmpty()){let a=0;return i._snapshot.docChanges.map((l=>{const u=new Ss(i._firestore,i._userDataWriter,l.doc.key,l.doc,new ui(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);return l.doc,{type:"added",doc:u,oldIndex:-1,newIndex:a++}}))}{let a=i._snapshot.oldDocs;return i._snapshot.docChanges.filter((l=>s||l.type!==3)).map((l=>{const u=new Ss(i._firestore,i._userDataWriter,l.doc.key,l.doc,new ui(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);let d=-1,f=-1;return l.type!==0&&(d=a.indexOf(l.doc.key),a=a.delete(l.doc.key)),l.type!==1&&(a=a.add(l.doc),f=a.indexOf(l.doc.key)),{type:c0(l.type),doc:u,oldIndex:d,newIndex:f}}))}})(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new H(D.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const t={};
2001t.type=Rr._jsonSchemaVersion,t.bundleSource="QuerySnapshot",t.bundleName=pl.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const n=[],r=[],i=[];return this.docs.forEach((s=>{s._document!==null&&(n.push(s._document),r.push(this._userDataWriter.convertObjectMap(s._document.data.value.mapValue.fields,"previous")),i.push(s.ref.path))})),t.bundle=(this._firestore,this.query._query,t.bundleName,"NOT SUPPORTED"),t}}function c0(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ct(61501,{type:e})}}/** 2002 * @license 2003 * Copyright 2020 Google LLC 2004 * 2005 * Licensed under the Apache License, Version 2.0 (the "License"); 2006 * you may not use this file except in compliance with the License. 2007 * You may obtain a copy of the License at 2008 * 2009 * http://www.apache.org/licenses/LICENSE-2.0 2010 * 2011 * Unless required by applicable law or agreed to in writing, software 2012 * distributed under the License is distributed on an "AS IS" BASIS, 2013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2014 * See the License for the specific language governing permissions and 2015 * limitations under the License. 2016 */function u0(e){e=Vi(e,Kt);const t=Vi(e.firestore,Ml);return Hw(Ep(t),e._key).then((n=>h0(t,e,n)))}Rr._jsonSchemaVersion="firestore/querySnapshot/1.0",Rr._jsonSchema={type:Gt("string",Rr._jsonSchemaVersion),bundleSource:Gt("string","QuerySnapshot"),bundleName:Gt("string"),bundle:Gt("string")};class Pp extends l0{constructor(t){super(),this.firestore=t}convertBytes(t){return new ke(t)}convertReference(t){const n=this.convertDocumentKey(t,this.firestore._databaseId);return new Kt(this.firestore,null,n)}}function ca(e){e=Vi(e,hn);const t=Vi(e.firestore,Ml),n=Ep(t),r=new Pp(t);return i0(e._query),Gw(n,e._query).then((i=>new Rr(t,r,e,i)))}function h0(e,t,n){const r=n.docs.get(t._key),i=new Pp(e);return new rr(e,i,t._key,r,new ui(n.hasPendingWrites,n.fromCache),t.converter)}(function(t,n=!0){(function(i){Br=i})(i_),js(new Ri("firestore",((r,{instanceIdentifier:i,options:s})=>{const a=r.getProvider("app").getImmediate(),l=new Ml(new v_(r.getProvider("auth-internal")),new w_(a,r.getProvider("app-check-internal")),(function(d,f){if(!Object.prototype.hasOwnProperty.apply(d.options,["projectId"]))throw new H(D.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ni(d.options.projectId,f)})(a,i),a);return s=Object.assign({useFetchStreams:n},s),l._setSettings(s),l}),"PUBLIC").setMultipleInstances(!0)),xr(Nu,Ou,t),xr(Nu,Ou,"esm2017")})();var d0="firebase",f0="11.10.0";/** 2017 * @license 2018 * Copyright 2020 Google LLC 2019 * 2020 * Licensed under the Apache License, Version 2.0 (the "License"); 2021 * you may not use this file except in compliance with the License. 2022 * You may obtain a copy of the License at 2023 * 2024 * http://www.apache.org/licenses/LICENSE-2.0 2025 * 2026 * Unless required by applicable law or agreed to in writing, software 2027 * distributed under the License is distributed on an "AS IS" BASIS, 2028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2029 * See the License for the specific language governing permissions and 2030 * limitations under the License. 2031 */xr(d0,f0,"app");const p0={apiKey:"AIzaSyA2OtmGp-C2Y9cAaSV24ZRMyuvrtl4Shtg",authDomain:"lr-live-text.firebaseapp.com",databaseURL:"https://lr-live-text.firebaseio.com",projectId:"lr-live-text",storageBucket:"lr-live-text.appspot.com",messagingSenderId:"769023886319"},m0=nf(p0),ys=Qw(m0),Oh=new Set,Hl=(e,t={})=>new Promise((n,r)=>{if(Oh.has(e)){n();return}const i=document.createElement("script");i.src=e,i.async=!0,Object.keys(t).forEach(s=>{i.setAttribute(s,t[s])}),i.onload=()=>{Oh.add(e),n()},i.onerror=()=>{r(new Error(`Failed to load script: ${e}`))},document.head.appendChild(i)}),Vp=()=>Hl("https://www.instagram.com/embed.js"),kp=()=>Hl("https://platform.twitter.com/widgets.js",{charset:"utf-8"}),Dp=()=>Hl("https://telegram.org/js/telegram-widget.js?7"),g0="data:image/svg+xml,%3csvg%20width='10'%20height='6'%20viewBox='0%200%2010%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.75%201L4.75%205L0.75%201'%20stroke='%23221F20'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",dn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},y0={__name:"LTelegramPost",props:{content:{type:String,required:!0},isImportant:{type:Boolean,default:!1},isEmbed:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(null),r=`telegram-component-${Math.random().toString(36).substr(2,9)}`,i=async()=>
2031{if(n.value)try{await Dp();let s=t.content.replace(/<br\s*\/?>/gi,"");const a=/<script[^>]*data-telegram-post="([^"]+)"[^>]*><\/script>/g;let l=0;const u=[];s=s.replace(a,(f,p)=>(u.push(p),`<div class="telegram-embed-placeholder" data-embed-id="${l++}" data-telegram-post="${p}"></div>`)),n.value.innerHTML=`<div><div>${s}</div></div>`,n.value.querySelectorAll(".telegram-embed-placeholder").forEach((f,p)=>{const I=f.getAttribute("data-telegram-post").split("/");if(I.length===2){const[R,V]=I,O=document.createElement("div");O.className="telegram-embed-container",O.id=`${r}-wrapper-${p}`;const B=document.createElement("iframe");B.id=`telegram-post-${R}-${V}-${r}-${p}`,B.src=`https://t.me/${R}/${V}?embed=1&userpic=false`,B.width="100%",B.height="500",B.frameBorder="0",B.scrolling="no",B.style.border="none",B.style.overflow="hidden",B.style.colorScheme="light dark",O.appendChild(B),f.replaceWith(O)}}),await ir(),window.__telegramIframeListenerAdded||(window.addEventListener("message",f=>{if(f.origin==="https://t.me")try{let p;typeof f.data=="string"?p=JSON.parse(f.data):p=f.data,p.event==="resize"&&p.height&&document.querySelectorAll('iframe[src*="t.me"]').forEach(I=>{I.contentWindow===f.source&&(I.style.height=p.height+"px")})}catch{typeof f.data=="object"&&f.data.height&&document.querySelectorAll('iframe[src*="t.me"]').forEach(I=>{I.contentWindow===f.source&&(I.style.height=f.data.height+"px")})}}),window.__telegramIframeListenerAdded=!0)}catch(s){console.error("Error rendering Telegram embed:",s)}};return Fe(i),Se(()=>t.content,i),(s,a)=>(K(),X("div",{ref_key:"container",ref:n,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:t.isImportant},{"livetxt_inner-paragraph--is-embed":t.isEmbed},{"livetxt_inner-paragraph--is-video":t.isVideo}])},null,2))}},qi=dn(y0,[["__scopeId","data-v-28c6e3df"]]),v0={name:"LTelegramPost",props:{content:{type:String,default:""}},mounted(){const e=document.createElement("script");e.src="https://www.tiktok.com/embed.js",e.async=!0,this.$el.appendChild(e)}},_0=["innerHTML"];function b0(e,t,n,r,i,s){return K(),X("div",{class:"LTiktokPost",innerHTML:n.content},null,8,_0)}const Gl=dn(v0,[["render",b0]]),w0={__name:"LIframePost",props:{content:{type:String,required:!0},isImportant:{type:Boolean,default:!1},isEmbed:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(null),r=()=>{try{if(!n.value)return;let i=t.content.replace(/<br\s*\/?>/gi,"");n.value.innerHTML=`<div><div>${i}</div></div>`}catch(i){console.error("Error rendering iframe content:",i)}};return Fe(r),Se(()=>t.content,r),(i,s)=>(K(),X("div",{ref_key:"container",ref:n,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:t.isImportant},{"livetxt_inner-paragraph--is-embed":t.isEmbed},{"livetxt_inner-paragraph--is-video":t.isVideo}])},null,2))}},zi=dn(w0,[["__scopeId","data-v-b8670d13"]]),E0={__name:"LInstagramPost",props:{content:{type:String,required:!0},isImportant:{type:Boolean,default:!1},isEmbed:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(null),r=`instagram-${Math.random().toString(36).substr(2,9)}`,i=async()=>{if(n.value)try{await Vp();let s=t.content.replace(/<br\s*\/?>/gi,"");const a=/<blockquote[^>]*class="instagram-media"[^>]*data-instgrm-permalink="([^"]+)"[^>]*>[\s\S]*?<\/blockquote>/gi;let l=0;const u=[];s=s.replace(a,(f,p)=>(u.push(p.replace(/&/g,"&")),`<div class="instagram-embed-placeholder" data-embed-id="${l++}" data-instagram-url="${p.replace(/&/g,"&")}"></div>`)),n.value.innerHTML=`<div><div>${s}</div></div>`,n.value.querySelectorAll(".instagram-embed-placeholder").forEach(f=>{const p=f.getAttribute("data-instagram-url"),g=document.createElement("blockquote");g.className="instagram-media",g.setAttribute("data-instgrm-permalink",`${p}/`),g.setAttribute("data-instgrm-version","14"),g.setAttribute("data-instagram-id",r);const I=document.createElement("a");I.href=`${p}/`,I.textContent="",g.appendChild(I),f.replaceWith(g)}),await ir(),setTimeout(()=>{window.instgrm&&window.instgrm.Embeds&&window.instgrm.Embeds.process&&window.instgrm.Embeds.process()},200)}catch(s){console.error("Error rendering Instagram embed:",s)}};return Fe(i),Se(()=>t.content,i),(s,a)=>(K(),X("div",{ref_key:"container",ref:n,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:t.isImportant},{"livetxt_inner-paragraph--is-embed":t.isEmbed},{"livetxt_inner-paragraph--is-video":t.isVideo}])},null,2))}},Kl=dn(E0,[["__scopeId","data-v-c986fbb0"]]),T0={__name:"LTwitterPost",props:{content:{type:String,required:!0},isImportant:{type:Boolean,default:!1},isEmbed:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(null),r=`twitter-${Math.random().toString(36).substr(2,9)}`,i=async()=>
2031{if(n.value)try{await kp();let s=t.content.replace(/<br\s*\/?>/gi,"");const a=s.match(/href="([^"]+)"/),l=a?a[1]:null;if(l){const d=l.match(/status\/(\d+)/),f=d?d[1]:null;if(f){n.value.innerHTML=`<div><div id="${r}"></div></div>`,await ir();const p=()=>{if(window.twttr&&window.twttr.widgets&&window.twttr.widgets.createTweet){const g=n.value.querySelector(`#${r}`);g&&window.twttr.widgets.createTweet(f,g)}else setTimeout(p,100)};setTimeout(p,200);return}}n.value.innerHTML=`<div><div>${s}</div></div>`,await ir();const u=()=>{window.twttr&&window.twttr.widgets&&window.twttr.widgets.load?window.twttr.widgets.load(n.value):setTimeout(u,100)};setTimeout(u,200)}catch(s){console.error("Error rendering Twitter embed:",s)}};return Fe(i),Se(()=>t.content,i),(s,a)=>(K(),X("div",{ref_key:"container",ref:n,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:t.isImportant},{"livetxt_inner-paragraph--is-embed":t.isEmbed},{"livetxt_inner-paragraph--is-video":t.isVideo}])},null,2))}},Wl=dn(T0,[["__scopeId","data-v-b0c4a5d3"]]),I0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANDSURBVHgB7VddUhNBEO6eVQt5EU/gcgLjCcjCAdQTEE8gCwTwifAklQjhBsAN9ACyyQ3iCQgngBexyspO27PJzs/+mKRIFZa130tmdnq6v/mmp2cCUKFChQoPR9TqrsAjAcsGFCm6jyME72vQDo9ggYj2uocA9A6WMQha4V2RjSid/Ut2mXeNQLbGjhZHSvkkoBr8VDGKUUjse/OkQQSNtE8Qr8KCQNL4IoRGtHe6CbMSQwStEAIO19u7DVgQ1r/sNtjnIO2zcmdFuZwjptTiH99YYJA2o4OuH+2ffoQ5oeaouZbP99bwirwfbcE0Yo5aCBfBcThM+xTTORGvcI6cS3KK5wDPTb+NfdKljgNi86/Eoma3BrZaKPRpTJREqicE1YE46NRhGim2UbbJHJ5r5xMKurBM/aw/h5jEUd2sAge2WraSfDD6wXGz55L47GdzRdkgobGzDtR4Pg51bAm1UmICxJo2JNnXQTNKCk80DKGuf9U8jUg+u6Z7eavaTj55sVY9Uc0aI5LftE8Ur10uFojQrBhpmDZjGfv6c0ZJlXfpFk/m1d18yigTy3pRDFZstZQYR/UNS6ErMnqkZeZV36TtaIu3ziZlbBxlOGzfxJDFMRBeQSmxGcB32K3uLEH5XboEJijgC5gTLjGCoWEgTVAS+jsnfj1tqy11ktsQGdh3IAH6JqAprnYM9ntTTgylGSTLmSd6lpV7tD38QAA/rAB9u4COt9SkApA3LIqBAu5KifH1oFeDiG/Tdk6Z2Du0xzbaOzVcFi9R/F7d6OzUc4cj9cmHIOiEVgxTBfiE9kqJCQEDq5speqZSj5PbLYhq64LjT0P7W2JjHQ4O1jJjrpKCnvRKiWWPNueWrtRBZ+ciVY2r+VG2wBZB2SjbZA5v8Vp7+9L4ls5DwVYyR2wcNDbKcKV2i6XKJxlutJstmBHKVs3JFmX7WWUrachmoGoTPZXXPLIyWc0gaG+/gQXiau/kGiY3SaJWezv33sspFpyFd8w2TPvqpRk1T85hQYj2u+dgX28Fak2+56HyiS9LvaXSLiMPhKSR9qWeVU7eTSOWTBp5W2obVfLOk1PTMMm5o+QV+1yE8K/hMf8aVqhQ4b/CH1JKmGTXz/N2AAAAAElFTkSuQmCC",x0={class:"livetxt_hero"},A0={class:"mt-3.5 text-[#221F20] text-2xl md:text-3xl font-normal"},S0={class:"flex justify-end text-end mt-14"},C0={id:"switch-button"},R0={class:"flex gap-2.5 items-center"},P0={__name:"Header",props:{app:Object,isEnabled:Boolean,sortByTime:Function},setup(e){return(t,n)=>{var r;return K(),X("div",x0,[n[3]||(n[3]=ot("div",{class:"flex items-center"},[ot("img",{class:"mr-2.5",src:I0,alt:"sensors-live"}),ot("span",{class:"text-lg text-[#BE768D] font-bold uppercase"},"Gyvai")],-1)),ot("div",A0,Te((r=e.app)==null?void 0:r.name),1),ot("div",S0,[ot("div",C0,[ot("div",R0,[n[2]||(n[2]=ot("div",{class:"text-[#221F20] text-base font-normal"},"Naujausi viršuje",-1)),ot("div",{class:be(["switch-button",{disabled:!e.isEnabled}]),onClick:n[0]||(n[0]=(...i)=>e.sortByTime&&e.sortByTime(...i))},[...n[1]||(n[1]=[ot("div",{class:"button"},null,-1)])],2)])])])])}}},V0={__name:"LMixedEmbed",props:{content:{type:String,required:!0},isImportant:{type:Boolean,default:!1},isEmbed:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1},hasTwitter:{type:Boolean,default:!1},hasTelegram:{type:Boolean,default:!1},hasInstagram:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(null),r=async()=>{if(n.value)try{let i=t.content.replace(/<br\s*\/?>/gi,"");const s=[];if(t.hasTwitter&&s.push(kp()),t.hasTelegram&&s.push(Dp()),t.hasInstagram&&s.push(Vp()),await Promise.all(s),t.hasTelegram){const a=/<script[^>]*data-telegram-post="([^"]+)"[^>]*><\/script>/g;let l=0;i=i.replace(a,(u,d)=>`<div class="telegram-embed-placeholder" data-embed-id="${l++}" data-telegram-post="${d}"></div>`)}if(t.hasInstagram){const a=/<blockquote[^>]*class="instagram-media"[^>]*data-instgrm-permalink="([^"]+)"[^>]*>[\s\S]*?<\/blockquote>/gi;let l=0;i=i.replace(a,(u,d)=>`<div class="instagram-embed-placeholder" data-embed-id="${l++}" data-instagram-url="${d.replace(/&/g,"&")}"></div>`)}n.value.innerHTML=`<div><div>${i}</div></div>`,t.hasTelegram&&n.value.querySelectorAll(".telegram-embed-placeholder").forEach(l=>{const d=l.getAttribute("data-telegram-post").split("/");if(d.length===2){const[f,p]=d,g=document.createElement("div");g.className="telegram-embed-container";const I=document.createElement("script");I.async=!0,I.src="https://telegram.org/js/telegram-widget.js?22",I.setAttribute("data-telegram-post",`${f}/${p}`),I.setAttribute("data-width","100%"),g.appendChild(I),l.replaceWith(g)}}),t.hasInstagram&&n.value.querySelectorAll(".instagram-embed-placeholder").forEach(l=>{const u=l.getAttribute("data-instagram-url"),d=document.createElement("blockquote");d.className="instagram-media",d.setAttribute("data-instgrm-permalink",`${u}/`),d.setAttribute("data-instgrm-version","14");const f=document.createElement("a");f.href=`${u}/`,f.textContent="",d.appendChild(f),l.replaceWith(d)}),await ir(),t.hasTwitter&&window.twttr&&window.twttr.widgets&&window.twttr.widgets.load&&window.twttr.widgets.load(n.value),t.hasTelegram&&window.Telegram&&window.Telegram.Post&&setTimeout(()=>{window.Telegram.Post.process()},100),t.hasInstagram&&window.instgrm&&window.instgrm.Embeds&&window.instgrm.Embeds.process&&window.instgrm.Embeds.process()}catch(i){console.error("Error rendering mixed embeds:",i)}};return Fe(r),Se(()=>t.content,r),(i,s)=>(K(),X("div",{ref_key:"container",ref:n,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:t.isImportant},{"livetxt_inner-paragraph--is-embed":t.isEmbed},{"livetxt_inner-paragraph--is-video":t.isVideo}])},null,2))}},Np=dn(V0,[["__scopeId","data-v-ec8009cd"]]),k0={class:"mt-5.5"},D0={class:"w-full h-[59px] bg-[#2C6847] px-4 md:px-8 flex items-center justify-between rounded-tl-[8px] rounded-tr-[8px]"},N0={key:0},O0=["title"],M0={class:"border border-solid border-[#2C6847] rounded-bl-[8px] rounded-br-[8px] px-4 md:px-8 pt-5 pb-14.5 livetxt-item"},L0=["innerHTML"],F0={key:1},B0={key:2},j0={key:3},U0={key:4},$0={key:5}
2031,q0={__name:"PinnedPost",props:{post:Object,timeDiff:Function,app:Object,isPostExpanded:Function,toggleCollapse:Function},setup(e){const t=n=>[n.isTwitter,n.isTelegram,n.isIframe,n.isInstagram].filter(Boolean).length>1;return(n,r)=>(K(),X("div",k0,[ot("div",D0,[e.app.formatTime?(K(),X("div",N0,[ot("div",{class:"text-[#fff] text-sm font-bold",title:e.post.time},Te(e.timeDiff(e.post.time)),9,O0)])):at("",!0),r[0]||(r[0]=qg('<div class="flex items-center gap-1.5"><p class="text-white text-lg hidden md:block">Svarbus pranešimas</p><svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 34 34" fill="none"><g clip-path="url(#clip0_84_208)"><path d="M24.0711 12.7577L20.5356 16.2932C19.7436 17.0852 19.2698 18.0822 19.1213 19.1216L14.8787 14.879C15.9464 14.7305 16.9293 14.2426 17.7071 13.4648L21.2427 9.92924L24.0711 12.7577ZM27.6066 13.4648L20.5356 6.39371C20.1466 6.0048 19.5102 6.0048 19.1213 6.39371C18.7324 6.78261 18.7324 7.41901 19.1213 7.80792L19.8284 8.51503L16.2929 12.0506C15.1191 13.2244 13.2241 13.2244 12.0503 12.0506L10.6361 13.4648L14.8575 17.6862L9.90774 22.6359V24.0502H11.322L16.2717 19.1004L20.5356 23.3643L21.9498 21.9501C20.776 20.7763 20.776 18.8812 21.9498 17.7074L25.4853 14.1719L26.1924 14.879C26.5813 15.2679 27.2177 15.2679 27.6066 14.879C27.9955 14.4901 27.9955 13.8537 27.6066 13.4648Z" fill="white"></path></g><defs><clipPath id="clip0_84_208"><rect width="24" height="24" fill="white" transform="translate(17 0.0292969) rotate(45)"></rect></clipPath></defs></svg></div>',1))]),ot("div",M0,[e.post.content&&!e.post.isTwitter&&!e.post.isTelegram&&!e.post.isIframe&&!e.post.isInstagram?(K(),X("div",{key:0,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:e.post.isImportant},{"livetxt_inner-paragraph--is-embed":e.post.isEmbed},{"livetxt_inner-paragraph--is-video":e.post.isVideo}])},[ot("div",null,[ot("div",{innerHTML:e.post.content.replace(/<br\s*\/?>/gi,"")},null,8,L0)])],2)):at("",!0),t(e.post)?(K(),X("div",F0,[At(Np,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo,hasTwitter:e.post.isTwitter,hasTelegram:e.post.isTelegram,hasInstagram:e.post.isInstagram},null,8,["content","isImportant","isEmbed","isVideo","hasTwitter","hasTelegram","hasInstagram"])])):at("",!0),!t(e.post)&&e.post.isTwitter?(K(),X("div",B0,[At(Wl,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0),!t(e.post)&&e.post.isTelegram?(K(),X("div",j0,[At(qi,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0),!t(e.post)&&e.post.isIframe?(K(),X("div",U0,[At(zi,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0),!t(e.post)&&e.post.isInstagram?(K(),X("div",$0,[At(Kl,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0)])]))}};let ua=!1;function z0(){return ua?Promise.resolve():new Promise(e=>{if(window.pp_gemius_hit&&window.gemius_pending){ua=!0,e();return}window.pp_gemius_use_cmp=!0,window.pp_gemius_cmp_timeout=1e4;const t=document.createElement("script");t.src="https://galt.hit.gemius.pl/xgemius.js",t.defer=!0,t.onload=()=>{ua=!0,console.log("[TRACKING]: Gemius scripts loaded successfully"),e()},t.onerror=()=>{console.error("[TRACKING]: Failed to load Gemius scripts"),e()},document.head.appendChild(t)})}function H0(){function e(t,n){!/ EmbeddedBrowser/.test(navigator.userAgent)&&!/Lrytas\//.test(navigator.userAgent)?(typeof gemius_pending=="function"&&(gemius_pending("gemius_hit"),gemius_pending("gemius_event"),gemius_pending("pp_gemius_hit"),gemius_pending("pp_gemius_event")),typeof pp_gemius_hit=="function"&&pp_gemius_hit("pxYw3TOyr28FJaiG.Ezn75Xm38OdnTuyyZU4.o7yymX.N7"),console.log(`[TRACKING]: LiveText Gallery pageview - Image ${t+1} of ${n}`)):console.log("[TRACKING]: LiveText Gallery pageview tracking skipped because of native app SDK tracking.",navigator.userAgent)}return{doGalleryPageView:e}}const G0={class:"lightbox-counter"},K0={class:"lightbox-image-container"},W0=["src","alt"],Q0={key:0,class:"lightbox-loader"},J0={key:1,class:"lightbox-authority"},Y0={__name:"GalleryLightbox",props:{images:{type:Array,required:!0},initialIndex:{type:Number,default:0},isOpen:{type:Boolean,default:!1},authorities:{type:Array,default:()=>[]}},emits:["close"],setup(e,{emit:t}){const{doGalleryPageView:n}=H0(),r=e,i=t,s=Mt(r.initialIndex),a=Mt(!1),l=()=>{i("close")},u=()=>{a.value=!1,s.value=(s.value+1)%r.images.length},d=()=>{a.value=!1,s.value=(s.value-1+r.images.length)%r.images.length},f=g=>{r.isOpen&&(g.key==="Escape"?l():g.key==="ArrowRight"?u():g.key==="ArrowLeft"&&d())},p=()=>{a.value=!0};return Se(()=>r.isOpen,g=>{g?(document.body.style.overflow="hidden",n(s.value,r.images.length)):document.body.style.overflow=""}),Se(()=>r.initialIndex,g=>{s.value=g,a.value=!1}),Se(s,g=>{r.isOpen&&n(g,r.images.length)}),Fe(()=>{document.addEventListener("keydown",f)}),io(()=>{document.removeEventListener("keydown",f),document.body.style.overflow=""}),(g,I)=>(K(),Ce(iu,{name:"lightbox-fade"},{default:ma(()=>[e.isOpen?(K(),X("div",{key:0,class:"gallery-lightbox",onClick:bu(l,["self"])},[ot("button",{class:"lightbox-close",onClick:bu(l,["stop"]),"aria-label":"Close gallery"},[...I[0]||(I[0]=[ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ot("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ot("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])]),ot("div",G0,Te(s.value+1)+" / "+Te(e.images.length),1),e.images.length>1?(K(),X("button",{key:0,class:"lightbox-nav lightbox-nav-prev",onClick:d,"aria-label":"Previous image"}
2031,[...I[1]||(I[1]=[ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ot("polyline",{points:"15 18 9 12 15 6"})],-1)])])):at("",!0),ot("div",K0,[At(iu,{name:"image-fade",mode:"out-in"},{default:ma(()=>[(K(),X("img",{key:s.value,src:e.images[s.value],alt:`Gallery image ${s.value+1}`,class:be(["lightbox-image",{"image-loaded":a.value}]),onLoad:p},null,42,W0))]),_:1}),a.value?at("",!0):(K(),X("div",Q0,[...I[2]||(I[2]=[ot("div",{class:"spinner"},null,-1)])]))]),e.authorities[s.value]?(K(),X("div",J0,Te(e.authorities[s.value]),1)):at("",!0),e.images.length>1?(K(),X("button",{key:2,class:"lightbox-nav lightbox-nav-next",onClick:u,"aria-label":"Next image"},[...I[3]||(I[3]=[ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ot("polyline",{points:"9 18 15 12 9 6"})],-1)])])):at("",!0)])):at("",!0)]),_:1}))}},X0={class:"livetxt_inner-text pt-[36px]"},Z0={key:0,class:"mb-2.5"},t1=["title"],e1={key:1,class:"mb-2.5 mt-4.5"},n1={class:"text-[#8C9497] text-sm font-bold"},r1=["innerHTML"],i1={key:3},s1={key:4},o1={key:5},a1={key:6},l1={key:7},c1={__name:"PostItemDefault",props:{post:Object,timeDiff:Function,app:Object,isPostExpanded:Function,toggleCollapse:Function},setup(e){const t=d=>[d.isTwitter,d.isTelegram,d.isIframe,d.isInstagram].filter(Boolean).length>1,n=Mt(null),r=Mt(!1),i=Mt([]),s=Mt(0),a=Mt([]),l=d=>{const f=d.target.closest(".gallery-item-quill");if(f){const p=d.target.closest(".quill-gallery");if(p){let g=[],I=[];const R=p.querySelectorAll(".gallery-data-img");if(R&&R.length>0&&(g=Array.from(R).map(V=>V.src),I=Array.from(R).map(V=>V.getAttribute("data-authority")||"")),!g||g.length===0){const V=p.querySelectorAll(".gallery-item-quill img");g=Array.from(V).map(O=>O.src),I=Array.from(V).map(O=>O.getAttribute("data-authority")||"")}if(g&&g.length>0){i.value=g,a.value=I;const V=f.querySelector("img");if(V){const B=V.src.split("/").pop().toLowerCase(),j=g.findIndex(Q=>(typeof Q=="string"?Q:"").split("/").pop().toLowerCase()===B);s.value=j>=0?j:0}r.value=!0}else console.error("No images found in gallery")}}},u=()=>{r.value=!1};return Fe(()=>{n.value&&n.value.addEventListener("click",l)}),io(()=>{n.value&&n.value.removeEventListener("click",l)}),(d,f)=>(K(),X("div",{ref_key:"postElementRef",ref:n,class:"livetxt_inner-post border-t border-solid border-[#D0D7DA] first-of-type:border-t-0"},[ot("div",X0,[e.app.formatTime?(K(),X("div",Z0,[ot("div",{class:"text-[#8C9497] text-sm font-bold",title:e.post.time},Te(e.timeDiff(e.post.time)),9,t1)])):at("",!0),e.app.formatTime?at("",!0):(K(),X("div",e1,[ot("div",n1,Te(e.post.time),1)])),e.post.content&&!e.post.isTwitter&&!e.post.isTelegram&&!e.post.isIframe&&!e.post.isInstagram?(K(),X("div",{key:2,class:be(["text-[#221F20] text-base text-left mt-2.5 break-normal customNews",{customNews__title:e.post.isImportant},{"livetxt_inner-paragraph--is-embed":e.post.isEmbed},{"livetxt_inner-paragraph--is-video":e.post.isVideo}])},[ot("div",null,[ot("div",{innerHTML:e.post.content.replace(/<br\s*\/?>/gi,"")},null,8,r1)])],2)):at("",!0),t(e.post)?(K(),X("div",i1,[At(Np,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo,hasTwitter:e.post.isTwitter,hasTelegram:e.post.isTelegram,hasInstagram:e.post.isInstagram},null,8,["content","isImportant","isEmbed","isVideo","hasTwitter","hasTelegram","hasInstagram"])])):at("",!0),!t(e.post)&&e.post.isTwitter?(K(),X("div",s1,[At(Wl,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0),!t(e.post)&&e.post.isTelegram?(K(),X("div",o1,[At(qi,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0),!t(e.post)&&e.post.isIframe?(K(),X("div",a1,[At(zi,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0),!t(e.post)&&e.post.isInstagram?(K(),X("div",l1,[At(Kl,{content:e.post.content,isImportant:e.post.isImportant,isEmbed:e.post.isEmbed,isVideo:e.post.isVideo},null,8,["content","isImportant","isEmbed","isVideo"])])):at("",!0)]),At(Y0,{images:i.value,initialIndex:s.value,isOpen:r.value,authorities:a.value,onClose:u},null,8,["images","initialIndex","isOpen","authorities"])],512))}},u1={class:"livetxt_inner-post border-t border-solid border-[#D0D7DA] first-of-type:border-t-0"},h1={class:"livetxt_inner-text pt-[36px]"},d1={class:"text-[#8C9497] text-sm font-bold"},f1={key:0,class:"mb-2.5"},p1=["title"],m1=["innerHTML"],g1=["innerHTML"],y1=["innerHTML"],v1=["innerHTML"],_1={key:8,class:"livetxt_inner-top livetxt_inner-topSec"},b1={class:"livetxt_inner-timeSec"}
2031,w1={__name:"PostItemBasketball",props:{post:Object,timeDiff:Function,app:Object},setup(e){return(t,n)=>(K(),X("div",u1,[ot("div",h1,[ot("div",d1,Te(e.post.minute),1),e.app.formatTime?(K(),X("div",f1,[ot("div",{class:"text-[#8C9497] text-sm font-bold",title:e.post.time},Te(e.timeDiff(e.post.time)),9,p1)])):at("",!0),!e.post.isTelegram&&!e.post.isTiktok&&!e.post.isInstagram&&!e.post.isTwitter&&!e.post.isFacebook?(K(),X("div",{key:1,class:be(["text-[#221F20] text-lg text-left mt-2.5 mb-4.5 font-bold break-normal customText",{"livetxt_inner-paragraph--is-embed":e.post.isEmbed},{"livetxt_inner-paragraph--is-video":e.post.isVideo}]),innerHTML:e.post.content.replace(/<br\s*\/?>/gi,"")},null,10,m1)):at("",!0),e.post.isTelegram?(K(),Ce(qi,{key:2,content:e.post.content},null,8,["content"])):at("",!0),e.post.isTiktok?(K(),Ce(Gl,{key:3,content:e.post.content},null,8,["content"])):at("",!0),e.post.isIframe?(K(),Ce(zi,{key:4,content:e.post.content},null,8,["content"])):at("",!0),e.post.isInstagram?(K(),X("div",{key:5,class:"instagram-embed-container",innerHTML:e.post.embedContent},null,8,g1)):at("",!0),e.post.isTwitter?(K(),X("div",{key:6,class:"twitter-embed-container",innerHTML:e.post.embedContent},null,8,y1)):at("",!0),e.post.isFacebook?(K(),X("div",{key:7,class:"facebook-embed-container",innerHTML:e.post.embedContent},null,8,v1)):at("",!0),e.app.formatTime?at("",!0):(K(),X("div",_1,[ot("div",b1,Te(e.post.time),1)]))])]))}},E1={class:"livetxt_inner-post border-t border-solid border-[#D0D7DA] first-of-type:border-t-0"},T1={class:"livetxt_inner-text pt-[36px]"},I1={key:0,class:"text-[#8C9497] text-sm font-bold"},x1={key:1,class:"mb-2.5"},A1=["title"],S1=["innerHTML"],C1=["innerHTML"],R1=["innerHTML"],P1=["innerHTML"],V1={key:9,class:"livetxt_inner-top livetxt_inner-topSec"},k1={class:"livetxt_inner-timeSec"},D1={__name:"PostItemSoccer",props:{post:Object,timeDiff:Function,app:Object},setup(e){return(t,n)=>(K(),X("div",E1,[ot("div",T1,[e.post.minute?(K(),X("div",I1,Te(e.post.minute)+" minutÄ. ",1)):at("",!0),e.app.formatTime?(K(),X("div",x1,[ot("div",{class:"text-[#8C9497] text-sm font-bold",title:e.post.time},Te(e.timeDiff(e.post.time)),9,A1)])):at("",!0),!e.post.isTelegram&&!e.post.isTiktok&&!e.post.isInstagram&&!e.post.isTwitter&&!e.post.isFacebook?(K(),X("div",{key:2,class:be(["text-[#221F20] text-lg text-left mt-2.5 mb-4.5 font-bold break-normal customText",{"livetxt_inner-paragraph--is-embed":e.post.isEmbed},{"livetxt_inner-paragraph--is-video":e.post.isVideo}]),innerHTML:e.post.content.replace(/<br\s*\/?>/gi,"")},null,10,S1)):at("",!0),e.post.isTelegram?(K(),Ce(qi,{key:3,content:e.post.content},null,8,["content"])):at("",!0),e.post.isTiktok?(K(),Ce(Gl,{key:4,content:e.post.content},null,8,["content"])):at("",!0),e.post.isIframe?(K(),Ce(zi,{key:5,content:e.post.content},null,8,["content"])):at("",!0),e.post.isInstagram?(K(),X("div",{key:6,class:"instagram-embed-container",innerHTML:e.post.embedContent},null,8,C1)):at("",!0),e.post.isTwitter?(K(),X("div",{key:7,class:"twitter-embed-container",innerHTML:e.post.embedContent},null,8,R1)):at("",!0),e.post.isFacebook?(K(),X("div",{key:8,class:"facebook-embed-container",innerHTML:e.post.embedContent},null,8,P1)):at("",!0),e.app.formatTime?at("",!0):(K(),X("div",V1,[ot("div",k1,Te(e.post.time),1)]))])]))}};function N1(){return new Promise(e=>{if(typeof window>"u"||typeof window.__tcfapi!="function"){e(null);return}const t=setTimeout(()=>e(null),2e3);window.__tcfapi("getTCData",2,(n,r)=>{clearTimeout(t),e(r&&(n!=null&&n.tcString)?n.tcString:null)})})}const O1=["srcdoc","width","height"],M1={__name:"VAdvert.client",props:{auid:{type:String,default:"4f764b"},square:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(!1),r=Mt(null),i=wn(()=>{var l,u;return(((u=(l=r.value)==null?void 0:l.ads)==null?void 0:u.length)??0)>0}),s=wn(()=>{var u,d,f;
2031const l=(f=(d=(u=r.value)==null?void 0:u.ads)==null?void 0:d[0])==null?void 0:f.creativeWidth;return l?l+"px":t.horizontal?"980px":"300px"}),a=wn(()=>{var u,d,f;const l=(f=(d=(u=r.value)==null?void 0:u.ads)==null?void 0:d[0])==null?void 0:f.creativeHeight;return l?l+"px":t.horizontal?"120px":"250px"});return Fe(()=>{setTimeout(async()=>{var l,u;try{const d=await N1(),f=d?`&consentString=${encodeURIComponent(d)}`:"",p=`https://delivery.adnuntius.com/i?tzo=-120&auId=${t.auid}&format=json${f}`;console.log("[ADVERT] Requesting:",p);const g=await fetch(p);console.log("[ADVERT] Response status:",g.status,g.statusText);const I=await g.json();console.log("[ADVERT] Response data:",I),r.value=((l=I==null?void 0:I.adUnits)==null?void 0:l[0])??null,n.value=!0,i.value||console.warn("[ADVERT] No ad returned for auId:",t.auid,"matchedAdCount:",(u=r.value)==null?void 0:u.matchedAdCount)}catch(d){console.log("[ADVERT] Error - ",d)}},150)}),(l,u)=>i.value&&r.value.html?(K(),X("div",{key:0,class:be(["LAdvert mx-auto w-fit",{"LAdvert--square":e.square},{"LAdvert--horizontal":e.horizontal}])},[ot("iframe",{src:"about:blank",srcdoc:r.value.html,width:s.value,height:a.value,frameborder:"0"},null,8,O1)],2)):at("",!0)}},Op=dn(M1,[["__scopeId","data-v-ebc05087"]]),L1={key:0,class:"flex flex-col gap-[18px]"},F1={key:1,class:"flex flex-col gap-[18px]"},B1={key:2,class:"flex flex-col gap-[18px]"},j1={__name:"PostList",props:{posts:Array,app:Object,timeDiff:Function,isPostExpanded:Function,toggleCollapse:Function,showAdvert:{type:Boolean,default:!0}},setup(e){return(t,n)=>{var r,i,s;return K(),X("div",null,[((r=e.app)==null?void 0:r.type.value)==="default"?(K(),X("div",L1,[(K(!0),X(he,null,vs(e.posts,(a,l)=>(K(),X(he,{key:a.id},[At(c1,{post:a,app:e.app,timeDiff:e.timeDiff,isPostExpanded:e.isPostExpanded,toggleCollapse:e.toggleCollapse},null,8,["post","app","timeDiff","isPostExpanded","toggleCollapse"]),e.showAdvert&&l===0?(K(),Ce(Op,{key:0})):at("",!0)],64))),128))])):((i=e.app)==null?void 0:i.type.value)==="basketball"?(K(),X("div",F1,[(K(!0),X(he,null,vs(e.posts,a=>(K(),Ce(w1,{key:a.id,post:a,app:e.app,timeDiff:e.timeDiff},null,8,["post","app","timeDiff"]))),128))])):((s=e.app)==null?void 0:s.type.value)==="soccer"?(K(),X("div",B1,[(K(!0),X(he,null,vs(e.posts,a=>(K(),Ce(D1,{key:a.id,post:a,app:e.app,timeDiff:e.timeDiff},null,8,["post","app","timeDiff"]))),128))])):at("",!0)])}}},U1=["src"],$1={__name:"LoadMoreButton",props:{onClick:Function,svgIcon:String},setup(e){return(t,n)=>(K(),X("button",{onClick:n[0]||(n[0]=(...r)=>e.onClick&&e.onClick(...r)),class:"bg-white rounded-sm border-none outline-none flex items-center justify-center w-40 h-7.5 p-0 cursor-pointer font-medium text-sm text-center text-[#221F20]"},[n[1]||(n[1]=qd(" Skaityti daugiau ",-1)),ot("img",{class:"ml-2.5",src:e.svgIcon},null,8,U1)]))}},q1={id:"app"},z1={key:0,class:"p-8 space-y-4"},H1={key:1,class:"livetxt relative py-10 max-md:pb-15 px-2.5 md:py-5 md:px-8 rounded-lg border-2 border-solid border-[#D0D7DA] bg-white"},G1={key:0},K1={class:"mt-5"},W1={key:1,class:"absolute customBtnStyle bottom-[-15px]"},Q1=3,J1=Object.assign({name:"LiveTxt",components:{LTelegramPost:qi,LTiktokPost:Gl,LIframePost:zi,LInstagramPost:Kl,LTwitterPost:Wl}},{__name:"LiveTxt",props:{appid:{type:String,default:""},minimized:{type:Boolean,default:!1}},setup(e){const t=e,n=Mt(null),r=Mt(!0),i=Mt([]),s=Mt("asc"),a=Mt(!1),l=Mt(null),u=Mt(!0),d=Mt([]),f=Mt([]),p=wn(()=>t.minimized===!0||t.minimized===""),g=wn(()=>p.value?1:3),I=async()=>{a.value||await gt()},R=w=>{const b=new Date,y=new Date(w.replace(" ","T")),et=Math.abs(y.getTime()-b.getTime()),Y=Math.floor(et/1e3%3600%60),pt=Math.floor(et/(60*1e3)%60),ht=Math.floor(et/(60*1e3*60)%24),dt=Math.round(et/(60*1e3*60)/24);return`prieš ${dt!==0?dt+" d.":""} ${ht!==0?ht+" val.":""} ${pt!==0?pt+" min.":""} ${Y!==0&&pt<1?Y+" sec.":""}`},V=()=>{r.value=!r.value,s.value==="asc"?O("desc"):O("asc")},O=async w=>{s.value=w,i.value=[],l.value=null,a.value=!1,await ut()},B=()=>{ir(()=>{document.querySelectorAll("blockquote").forEach(b=>{const et=b.innerText.trim().split(". ");
2031if(et.length>1){const Y=et.pop();b.innerHTML=et.join(". ")+'.<br><span class="quote-author">'+Y+"</span>"}})})},j=async()=>{if(t.appid)try{const w=aa(ys,"apps",t.appid,"text"),b=la(w,s0("isPinned","==",!0)),y=await ca(b);if(y.empty)return;let et=[];y.forEach(Y=>{et.push({id:Y.id,...Y.data()})}),et.sort((Y,pt)=>{const ht=new Date(Y.time);return new Date(pt.time)-ht}),f.value=et}catch(w){console.error("Error getting pinned posts:",w)}},Q=wn(()=>f.value.map(w=>{let b=w.content;const y=document.createElement("textarea");y.innerHTML=b;const et=y.value,Y=x(et),pt=new DOMParser().parseFromString(Y,"text/html"),ht=pt.querySelector("blockquote.instagram-media"),dt=pt.querySelector("blockquote.twitter-tweet"),ie=pt.querySelector("iframe[src*='facebook.com/plugins/post.php']"),Bt=Y.includes("telegram.org"),jt=Y.includes("tiktok"),Nt=Y.includes("tv.lrytas.lt"),Ot=pt.querySelector("iframe, embed, object");return{...w,content:Y,isInstagram:!!ht,isTwitter:!!dt,isFacebook:!!ie,isTelegram:Bt,isTiktok:jt,isVideo:Nt,isIframe:!!Ot}}).filter(w=>w.content!==" "&&w.content.trim()!=="")),$=async()=>{if(t.appid)try{const w=Ww(ys,"apps",t.appid),b=await u0(w);b.exists()&&(n.value=b.data(),await Promise.all([ut(),j()]))}catch(w){console.error("Error getting app:",w)}},ut=async()=>{try{const w=aa(ys,"apps",t.appid,"text"),b=la(w,Vh("time",s.value==="asc"?"desc":"asc"),kh(g.value)),y=await ca(b);if(y.empty){a.value=!0;return}l.value=y.docs[y.docs.length-1];let et=[];y.forEach(Y=>{et.push({id:Y.id,...Y.data()})}),i.value=et,u.value=!1}catch(w){console.error("Error getting posts:",w)}},gt=async()=>{if(l.value)try{const w=aa(ys,"apps",t.appid,"text"),b=la(w,Vh("time",s.value==="asc"?"desc":"asc"),o0(l.value),kh(Q1)),y=await ca(b);if(y.empty){a.value=!0;return}l.value=y.docs[y.docs.length-1];let et=[];y.forEach(Y=>{et.push({id:Y.id,...Y.data()})}),i.value.push(...et),B()}catch(w){console.error("Error getting more posts:",w)}},x=w=>{const y=new DOMParser().parseFromString(w,"text/html");return y.querySelectorAll("p").forEach(Y=>{const pt=Y.querySelectorAll("iframe"),ht=Y.querySelectorAll("blockquote"),dt=Y.querySelectorAll("script");Y.querySelectorAll(".quill-gallery").forEach(Bt=>{Y.parentNode.insertBefore(Bt,Y)}),pt.forEach(Bt=>{const jt=y.createElement("div");jt.className="telegram-embed-container",jt.appendChild(Bt.cloneNode(!0)),Y.parentNode.insertBefore(jt,Y),Bt.remove()}),ht.forEach(Bt=>{Y.parentNode.insertBefore(Bt,Y)}),dt.forEach(Bt=>{const jt=y.createElement("div");jt.className="telegram-embed-container",jt.appendChild(Bt.cloneNode(!0)),Y.parentNode.insertBefore(jt,Y),Bt.remove()}),!Y.textContent.trim()&&!Y.querySelector("*:not(iframe):not(blockquote):not(script):not(.quill-gallery)")&&Y.remove()}),y.body.innerHTML},_=w=>{d.value.includes(w)?d.value=d.value.filter(b=>b!==w):d.value.push(w)},v=w=>d.value.includes(w),T=wn(()=>i.value.map(w=>{let b=w.content;const y=document.createElement("textarea");y.innerHTML=b;const et=y.value,Y=x(et),pt=new DOMParser().parseFromString(Y,"text/html"),ht=pt.querySelector("blockquote.instagram-media"),dt=pt.querySelector("blockquote.twitter-tweet"),ie=pt.querySelector("iframe[src*='facebook.com/plugins/post.php']"),Bt=Y.includes("telegram.org"),jt=Y.includes("tiktok"),Nt=Y.includes("tv.lrytas.lt"),Ot=pt.querySelector("iframe, embed, object");return{...w,content:Y,isInstagram:!!ht,isTwitter:!!dt,isFacebook:!!ie,isTelegram:Bt,isTiktok:jt,isVideo:Nt,isIframe:!!Ot}}).filter(w=>w.content.trim()!==""&&w.content!==" "));return Fe(async()=>{await $(),B()}),Se(()=>t.appid,async()=>{i.value=[],f.value=[],l.value=null,a.value=!1,$()}),Se(()=>t.minimized,async()=>{i.value=[],f.value=[],l.value=null,a.value=!1,await ut(),await j()}),(w,b)=>{var y,et,Y;return K(),X("div",q1,[u.value?(K(),X("div",z1,[...b[0]||(b[0]=[ot("div",{class:"h-4 bg-gray-200 rounded w-1/3 animate-pulse"},null,-1),ot("div",{class:"h-6 bg-gray-200 rounded w-full animate-pulse"},null,-1),ot("div",{class:"h-6 bg-gray-200 rounded w-full animate-pulse"},null,-1)])])):(K(),X("div",H1,[At(P0,{app:n.value,isEnabled:r.value,sortByTime:V},null,8,["app","isEnabled"]),((y=n.value)==null?void 0:y.type.value)==="default"?(K(),X("div",G1,[(K(!0),X(he,null,vs(Q.value,(pt,ht)=>(K(),X(he,{key:pt.id},[At(q0,{post:pt,app:n.value,timeDiff:R,isPostExpanded:v,toggleCollapse:_},null,8,["post","app"]),ht===0?(K(),Ce(Op,{key:0,class:"mt-5"})):at("",!0)],64))),128))])):at("",!0),ot("div",K1,[At(j1,{posts:T.value,app:n.value,timeDiff:R,isPostExpanded:v,toggleCollapse:_,showAdvert:Q.value.length===0},null,8,["posts","app","showAdvert"])]),!a.value&&i.value.length>0&&(!((et=n.value)!=null&&et.direction)||((Y=n.value)==null?void 0:Y.direction.value)==="vertical")?(K(),X("div",W1,[At($1,{onClick:I,svgIcon:ld(g0)},null,8,["svgIcon"])])):at("",!0)]))])}}}),Y1=dn(J1,[["__scopeId","data-v-70621e97"]]),X1='/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-cc987b13],[data-v-cc987b13]:before,[data-v-cc987b13]:after,[data-v-cc987b13]::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial}}
2031}@layer theme{[data-v-cc987b13]:root,[data-v-cc987b13]:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-200:oklch(92.8% .006 264.531);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-bold:700;--radius-sm:.25rem;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{[data-v-cc987b13],[data-v-cc987b13]:after,[data-v-cc987b13]:before,[data-v-cc987b13]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-cc987b13]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-cc987b13],[data-v-cc987b13]:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr[data-v-cc987b13]{height:0;color:inherit;border-top-width:1px}abbr[data-v-cc987b13]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-cc987b13],h2[data-v-cc987b13],h3[data-v-cc987b13],h4[data-v-cc987b13],h5[data-v-cc987b13],h6[data-v-cc987b13]{font-size:inherit;font-weight:inherit}a[data-v-cc987b13]{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-cc987b13],strong[data-v-cc987b13]{font-weight:bolder}code[data-v-cc987b13],kbd[data-v-cc987b13],samp[data-v-cc987b13],pre[data-v-cc987b13]{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small[data-v-cc987b13]{font-size:80%}sub[data-v-cc987b13],sup[data-v-cc987b13]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-cc987b13]{bottom:-.25em}sup[data-v-cc987b13]{top:-.5em}table[data-v-cc987b13]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-cc987b13]:-moz-focusring{outline:auto}progress[data-v-cc987b13]{vertical-align:baseline}summary[data-v-cc987b13]{display:list-item}ol[data-v-cc987b13],ul[data-v-cc987b13],menu[data-v-cc987b13]{list-style:none}img[data-v-cc987b13],svg[data-v-cc987b13],video[data-v-cc987b13],canvas[data-v-cc987b13],audio[data-v-cc987b13],iframe[data-v-cc987b13],embed[data-v-cc987b13],object[data-v-cc987b13]{vertical-align:middle;display:block}img[data-v-cc987b13],video[data-v-cc987b13]{max-width:100%;height:auto}button[data-v-cc987b13],input[data-v-cc987b13],select[data-v-cc987b13],optgroup[data-v-cc987b13],textarea[data-v-cc987b13]{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}[data-v-cc987b13]::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup[data-v-cc987b13]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option[data-v-cc987b13]{padding-inline-start:20px}[data-v-cc987b13]::file-selector-button{margin-inline-end:4px}[data-v-cc987b13]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-cc987b13]::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){[data-v-cc987b13]::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea[data-v-cc987b13]{resize:vertical}[data-v-cc987b13]::-webkit-search-decoration{-webkit-appearance:none}[data-v-cc987b13]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-cc987b13]::-webkit-datetime-edit{display:inline-flex}[data-v-cc987b13]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-cc987b13]::-webkit-datetime-edit{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-year-field{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-month-field{padding-block:0}
2031[data-v-cc987b13]::-webkit-datetime-edit-day-field{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-hour-field{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-minute-field{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-second-field{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-millisecond-field{padding-block:0}[data-v-cc987b13]::-webkit-datetime-edit-meridiem-field{padding-block:0}[data-v-cc987b13]::-webkit-calendar-picker-indicator{line-height:1}[data-v-cc987b13]:-moz-ui-invalid{box-shadow:none}button[data-v-cc987b13],input[data-v-cc987b13]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}[data-v-cc987b13]::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}[data-v-cc987b13]::-webkit-inner-spin-button{height:auto}[data-v-cc987b13]::-webkit-outer-spin-button{height:auto}[hidden][data-v-cc987b13]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute[data-v-cc987b13]{position:absolute}.relative[data-v-cc987b13]{position:relative}.static[data-v-cc987b13]{position:static}.bottom-\\[-15px\\][data-v-cc987b13]{bottom:-15px}.container[data-v-cc987b13]{width:100%}@media (min-width:40rem){.container[data-v-cc987b13]{max-width:40rem}}@media (min-width:48rem){.container[data-v-cc987b13]{max-width:48rem}}@media (min-width:64rem){.container[data-v-cc987b13]{max-width:64rem}}@media (min-width:80rem){.container[data-v-cc987b13]{max-width:80rem}}@media (min-width:96rem){.container[data-v-cc987b13]{max-width:96rem}}.mx-auto[data-v-cc987b13]{margin-inline:auto}.mt-2\\.5[data-v-cc987b13]{margin-top:calc(var(--spacing)*2.5)}.mt-3\\.5[data-v-cc987b13]{margin-top:calc(var(--spacing)*3.5)}.mt-4\\.5[data-v-cc987b13]{margin-top:calc(var(--spacing)*4.5)}.mt-5[data-v-cc987b13]{margin-top:calc(var(--spacing)*5)}.mt-5\\.5[data-v-cc987b13]{margin-top:calc(var(--spacing)*5.5)}.mt-14[data-v-cc987b13]{margin-top:calc(var(--spacing)*14)}.mr-2\\.5[data-v-cc987b13]{margin-right:calc(var(--spacing)*2.5)}.mb-2\\.5[data-v-cc987b13]{margin-bottom:calc(var(--spacing)*2.5)}.mb-4\\.5[data-v-cc987b13]{margin-bottom:calc(var(--spacing)*4.5)}.ml-2\\.5[data-v-cc987b13]{margin-left:calc(var(--spacing)*2.5)}.flex[data-v-cc987b13]{display:flex}.hidden[data-v-cc987b13]{display:none}.h-4[data-v-cc987b13]{height:calc(var(--spacing)*4)}.h-6[data-v-cc987b13]{height:calc(var(--spacing)*6)}.h-7\\.5[data-v-cc987b13]{height:calc(var(--spacing)*7.5)}.h-\\[59px\\][data-v-cc987b13]{height:59px}.w-1\\/3[data-v-cc987b13]{width:33.3333%}.w-40[data-v-cc987b13]{width:calc(var(--spacing)*40)}.w-fit[data-v-cc987b13]{width:fit-content}.w-full[data-v-cc987b13]{width:100%}.transform[data-v-cc987b13]{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse[data-v-cc987b13]{animation:var(--animate-pulse)}.cursor-pointer[data-v-cc987b13]{cursor:pointer}.resize[data-v-cc987b13]{resize:both}.flex-col[data-v-cc987b13]{flex-direction:column}.items-center[data-v-cc987b13]{align-items:center}.justify-between[data-v-cc987b13]{justify-content:space-between}.justify-center[data-v-cc987b13]{justify-content:center}.justify-end[data-v-cc987b13]{justify-content:flex-end}.gap-1\\.5[data-v-cc987b13]{gap:calc(var(--spacing)*1.5)}.gap-2\\.5[data-v-cc987b13]{gap:calc(var(--spacing)*2.5)}.gap-\\[18px\\][data-v-cc987b13]{gap:18px}:where(.space-y-4[data-v-cc987b13]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.rounded[data-v-cc987b13]{border-radius:.25rem}.rounded-lg[data-v-cc987b13]{border-radius:var(--radius-lg)}.rounded-sm[data-v-cc987b13]{border-radius:var(--radius-sm)}.rounded-tl-\\[8px\\][data-v-cc987b13]{border-top-left-radius:8px}.rounded-tr-\\[8px\\][data-v-cc987b13]{border-top-right-radius:8px}.rounded-br-\\[8px\\][data-v-cc987b13]{border-bottom-right-radius:8px}.rounded-bl-\\[8px\\][data-v-cc987b13]{border-bottom-left-radius:8px}.border[data-v-cc987b13]{border-style:var(--tw-border-style);border-width:1px}.border-2[data-v-cc987b13]{border-style:var(--tw-border-style);border-width:2px}.border-t[data-v-cc987b13]{border-top-style:var(--tw-border-style);border-top-width:1px}.border-none[data-v-cc987b13]{--tw-border-style:none;border-style:none}.border-solid[data-v-cc987b13]{--tw-border-style:solid;border-style:solid}.border-\\[\\#2C6847\\][data-v-cc987b13]{border-color:#2c6847}.border-\\[\\#D0D7DA\\][data-v-cc987b13]{border-color:#d0d7da}.bg-\\[\\#2C6847\\][data-v-cc987b13]{background-color:#2c6847}.bg-gray-200[data-v-cc987b13]{background-color:var(--color-gray-200)}.bg-white[data-v-cc987b13]{background-color:var(--color-white)}.p-0[data-v-cc987b13]{padding:calc(var(--spacing)*0)}.p-8[data-v-cc987b13]{padding:calc(var(--spacing)*8)}.px-2\\.5[data-v-cc987b13]{padding-inline:calc(var(--spacing)*2.5)}.px-4[data-v-cc987b13]{padding-inline:calc(var(--spacing)*4)}.py-10[data-v-cc987b13]{padding-block:calc(var(--spacing)*10)}.pt-5[data-v-cc987b13]{padding-top:calc(var(--spacing)*5)}.pt-\\[36px\\][data-v-cc987b13]{padding-top:36px}.pb-14\\.5[data-v-cc987b13]{padding-bottom:calc(var(--spacing)*14.5)}.text-center[data-v-cc987b13]{text-align:center}.text-end[data-v-cc987b13]{text-align:end}.text-left[data-v-cc987b13]{text-align:left}.text-2xl[data-v-cc987b13]{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base[data-v-cc987b13]{font-size:var(--text-base);
2031line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg[data-v-cc987b13]{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm[data-v-cc987b13]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-bold[data-v-cc987b13]{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium[data-v-cc987b13]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal[data-v-cc987b13]{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.break-normal[data-v-cc987b13]{overflow-wrap:normal;word-break:normal}.text-\\[\\#8C9497\\][data-v-cc987b13]{color:#8c9497}.text-\\[\\#221F20\\][data-v-cc987b13]{color:#221f20}.text-\\[\\#BE768D\\][data-v-cc987b13]{color:#be768d}.text-\\[\\#fff\\][data-v-cc987b13]{color:#fff}.text-white[data-v-cc987b13]{color:var(--color-white)}.uppercase[data-v-cc987b13]{text-transform:uppercase}.outline-none[data-v-cc987b13]{--tw-outline-style:none;outline-style:none}.first-of-type\\:border-t-0[data-v-cc987b13]:first-of-type{border-top-style:var(--tw-border-style);border-top-width:0}@media not all and (min-width:48rem){.max-md\\:pb-15[data-v-cc987b13]{padding-bottom:calc(var(--spacing)*15)}}@media (min-width:48rem){.md\\:block[data-v-cc987b13]{display:block}.md\\:px-8[data-v-cc987b13]{padding-inline:calc(var(--spacing)*8)}.md\\:py-5[data-v-cc987b13]{padding-block:calc(var(--spacing)*5)}.md\\:text-3xl[data-v-cc987b13]{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}}[data-v-cc987b13]:root{font-family:DM Sans,sans-serif}ul[data-v-cc987b13]{margin-bottom:18px;padding-left:30px;list-style-type:disc}.livetxt[data-v-cc987b13],.livetxt-item[data-v-cc987b13]{box-shadow:0 2px 12px #221f201a}.switch-button[data-v-cc987b13]{cursor:pointer;background:#fff;border:1px solid #8c9497;border-radius:14px;justify-content:space-between;align-items:center;width:52px;height:28px;transition:background .3s,border .3s;display:flex;position:relative}.switch-button .button[data-v-cc987b13]{background:#be768d;border-radius:50%;width:20px;height:20px;transition:left .3s,background .3s;position:absolute;top:50%;left:4px;transform:translateY(-50%)}.customBtnStyle[data-v-cc987b13]{left:50%;transform:translate(-50%)}.switch-button.disabled[data-v-cc987b13]{background:#fff;border-color:#8c9497}.switch-button.disabled .button[data-v-cc987b13]{background:#8c9497;left:calc(100% - 24px)}.livetxt_inner-paragraph--is-embed[data-v-cc987b13]{position:relative}.livetxt_inner-paragraph--is-embed[data-v-cc987b13]:before{content:"";padding-bottom:100%;display:block}.livetxt_inner-paragraph--is-embed>iframe[data-v-cc987b13]{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}.livetxt_inner-paragraph--is-video[data-v-cc987b13]{position:relative}.livetxt_inner-paragraph--is-video[data-v-cc987b13]:before{content:"";padding-bottom:56.25%;display:block}.livetxt_inner-paragraph--is-video>iframe[data-v-cc987b13]{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}.customText p[data-v-cc987b13]{margin-bottom:18px}.customNews div div h1[data-v-cc987b13],.customNews div div p h2[data-v-cc987b13],.customNews div div p h3[data-v-cc987b13],.customNews div div p strong[data-v-cc987b13]{font-size:28px;line-height:32px;display:block;color:#221f20!important;margin-bottom:21px!important}.customNews__title div div h1[data-v-cc987b13],.customNews__title div div h1 span[data-v-cc987b13],.customNews__title div div p strong[data-v-cc987b13]{font-size:28px;line-height:32px;display:block;color:#be768d!important;margin-bottom:21px!important}.customNews div div p img[data-v-cc987b13],.customNews__title div div p img[data-v-cc987b13]{margin:0 auto}blockquote[data-v-cc987b13]{color:#2c6847;border-left:1px solid #2c6847;margin-left:24px;padding-left:24px;font-size:16px;font-style:italic;line-height:22px}blockquote em[data-v-cc987b13]{color:#2c6847;margin-top:.5rem;font-size:16px;font-style:italic;line-height:22px;display:block}.quote-author[data-v-cc987b13]{color:#2c6847;margin-top:16px;font-size:16px;font-style:italic;line-height:22px;display:block}.ql-align-center[data-v-cc987b13]{text-align:center}.ql-align-left[data-v-cc987b13]{text-align:left}.ql-align-right[data-v-cc987b13]{text-align:right}.ql-align-justify[data-v-cc987b13]{text-align:justify}.customNews p a[data-v-cc987b13]{color:#be768d}.customNews p[data-v-cc987b13]{margin-bottom:18px}.customNews ol[data-v-cc987b13]{margin-bottom:18px;padding-left:30px;list-style-type:decimal}.twitter-video-container[data-v-cc987b13],.twitter-video-container blockquote.twitter-tweet[data-v-cc987b13]{width:100%!important;max-width:100%!important}.twitter-video-container iframe[data-v-cc987b13]{width:100%!important}.instagram-embed-container[data-v-cc987b13],.twitter-embed-container[data-v-cc987b13]{width:100%;min-height:300px;margin:1rem 0}.instagram-embed-container iframe[data-v-cc987b13],.twitter-embed-container iframe[data-v-cc987b13]{width:100%!important}.facebook-embed-container[data-v-cc987b13]{width:100%;min-height:400px;margin:1rem 0}.facebook-embed-container iframe[data-v-cc987b13]{border:none;width:100%!important}.telegram-embed-container[data-v-cc987b13]{max-width:505px}.quill-gallery[data-v-cc987b13]{margin:1em 0}.gallery-grid-quill[data-v-cc987b13]{grid-template-columns:repeat(4,1fr);gap:10px;margin:10px 0;display:grid}.gallery-item-quill[data-v-cc987b13]{cursor:pointer;width:100%;padding-bottom:100%;transition:transform .2s,box-shadow .2s;position:relative;overflow:hidden}.gallery-item-quill img[data-v-cc987b13]{object-fit:cover;width:100%;height:100%;transition:opacity .2s;position:absolute;top:0;left:0}.gallery-item-quill:hover img[data-v-cc987b13]{opacity:.9}.overlay-quill[data-v-cc987b13]{z-index:1;background-color:#000000b3;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.overlay-text-quill[data-v-cc987b13]{color:#fff;font-size:2rem;font-weight:700}.gallery-lightbox[data-v-cc987b13]{z-index:9999;background-color:#000000f2;justify-content:center;align-items:center;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.lightbox-close[data-v-cc987b13]{color:#fff;cursor:pointer;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);pointer-events:auto;background:#ffffff1a;border:none;border-radius:50%;justify-content:center;align-items:center;width:48px;height:48px;transition:all .3s;display:flex;position:absolute;top:20px;right:20px}.lightbox-close[data-v-cc987b13]:hover{background:#fff3}.lightbox-counter[data-v-cc987b13]{color:#fff;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00000080;border-radius:20px;padding:8px 16px;font-size:16px;font-weight:600;position:absolute;top:30px;left:50%;transform:translate(-50%)}.lightbox-nav[data-v-cc987b13]{color:#fff;cursor:pointer;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffff1a;border:none;border-radius:50%;justify-content:center;align-items:center;width:64px;
2031height:64px;transition:all .3s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.lightbox-nav[data-v-cc987b13]:hover{background:#fff3}.lightbox-nav-prev[data-v-cc987b13]{left:20px}.lightbox-nav-next[data-v-cc987b13]{right:20px}.lightbox-image-container[data-v-cc987b13]{justify-content:center;align-items:center;max-width:90vw;max-height:90vh;display:flex;position:relative}.lightbox-image[data-v-cc987b13]{object-fit:contain;opacity:0;max-width:100%;max-height:90vh;transition:opacity .3s;box-shadow:0 10px 50px #00000080}.lightbox-image.image-loaded[data-v-cc987b13]{opacity:1}.lightbox-loader[data-v-cc987b13]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.lightbox-authority[data-v-cc987b13]{color:#fff;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);word-wrap:break-word;background:#000000b3;border-radius:6px;max-width:calc(100% - 40px);padding:8px 16px;font-size:14px;font-weight:500;position:absolute;bottom:20px;left:20px}.spinner[data-v-cc987b13]{border:4px solid #fff3;border-top-color:#fff;border-radius:50%;width:48px;height:48px;animation:.8s linear infinite spin-cc987b13}@keyframes spin-cc987b13{to{transform:rotate(360deg)}}.lightbox-fade-enter-active[data-v-cc987b13],.lightbox-fade-leave-active[data-v-cc987b13]{transition:opacity .3s}.lightbox-fade-enter-from[data-v-cc987b13],.lightbox-fade-leave-to[data-v-cc987b13]{opacity:0}.image-fade-enter-active[data-v-cc987b13],.image-fade-leave-active[data-v-cc987b13]{transition:opacity .2s}.image-fade-enter-from[data-v-cc987b13],.image-fade-leave-to[data-v-cc987b13]{opacity:0}@media screen and (max-width:767px){.customNews p strong[data-v-cc987b13],.customText p[data-v-cc987b13]{font-size:16px}blockquote[data-v-cc987b13]{margin-left:12px;padding-left:12px}.lightbox-close[data-v-cc987b13]{width:40px;height:40px;top:10px;right:10px}.lightbox-counter[data-v-cc987b13]{padding:6px 12px;font-size:14px;top:10px}.lightbox-nav[data-v-cc987b13]{width:48px;height:48px}.lightbox-nav svg[data-v-cc987b13]{width:32px;height:32px}.lightbox-nav-prev[data-v-cc987b13]{left:10px}.lightbox-nav-next[data-v-cc987b13]{right:10px}.lightbox-image-container[data-v-cc987b13]{max-width:95vw;max-height:80vh}.lightbox-image[data-v-cc987b13]{max-height:80vh}.lightbox-authority[data-v-cc987b13]{max-width:calc(100% - 20px);padding:6px 12px;font-size:12px;bottom:10px;left:10px}.customNews__title div div h1 strong[data-v-cc987b13],.customNews div div h1[data-v-cc987b13],.customNews div div p h2[data-v-cc987b13],.customNews div div p h3[data-v-cc987b13],.customNews__title div div h1[data-v-cc987b13],.customNews__title div div h1 span[data-v-cc987b13],.customNews__title div div p strong[data-v-cc987b13],.customNews div div p strong[data-v-cc987b13]{font-size:21px;line-height:28px}.ql-video[data-v-cc987b13]{width:100%}.telegram-video-container[data-v-cc987b13]{width:100%;height:100vh}.telegram-embed-container iframe[data-v-cc987b13]{width:100%!important}
2031.facebook-embed-optimized[data-v-cc987b13]{height:415px!important}.LIframePost iframe[data-v-cc987b13]{width:100%!important}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@keyframes pulse-cc987b13{50%{opacity:.5}}',Z1={__name:"App.ce",setup(e){return(t,n)=>(K(),Ce(Y1))}},tE=dn(Z1,[["styles",[X1]],["__scopeId","data-v-cc987b13"]]),eE='/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-200:oklch(92.8% .006 264.531);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-bold:700;--radius-sm:.25rem;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}
2031::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.static{position:static}.bottom-\\[-15px\\]{bottom:-15px}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mt-3\\.5{margin-top:calc(var(--spacing)*3.5)}.mt-4\\.5{margin-top:calc(var(--spacing)*4.5)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-5\\.5{margin-top:calc(var(--spacing)*5.5)}.mt-14{margin-top:calc(var(--spacing)*14)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-4\\.5{margin-bottom:calc(var(--spacing)*4.5)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.flex{display:flex}.hidden{display:none}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7\\.5{height:calc(var(--spacing)*7.5)}.h-\\[59px\\]{height:59px}.w-1\\/3{width:33.3333%}.w-40{width:calc(var(--spacing)*40)}.w-fit{width:fit-content}.w-full{width:100%}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-\\[18px\\]{gap:18px}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-tl-\\[8px\\]{border-top-left-radius:8px}.rounded-tr-\\[8px\\]{border-top-right-radius:8px}.rounded-br-\\[8px\\]{border-bottom-right-radius:8px}.rounded-bl-\\[8px\\]{border-bottom-left-radius:8px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#2C6847\\]{border-color:#2c6847}.border-\\[\\#D0D7DA\\]{border-color:#d0d7da}.bg-\\[\\#2C6847\\]{background-color:#2c6847}.bg-gray-200{background-color:var(--color-gray-200)}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.p-8{padding:calc(var(--spacing)*8)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-\\[36px\\]{padding-top:36px}.pb-14\\.5{padding-bottom:calc(var(--spacing)*14.5)}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);
2031line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.break-normal{overflow-wrap:normal;word-break:normal}.text-\\[\\#8C9497\\]{color:#8c9497}.text-\\[\\#221F20\\]{color:#221f20}.text-\\[\\#BE768D\\]{color:#be768d}.text-\\[\\#fff\\]{color:#fff}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.outline-none{--tw-outline-style:none;outline-style:none}.first-of-type\\:border-t-0:first-of-type{border-top-style:var(--tw-border-style);border-top-width:0}@media not all and (min-width:48rem){.max-md\\:pb-15{padding-bottom:calc(var(--spacing)*15)}}@media (min-width:48rem){.md\\:block{display:block}.md\\:px-8{padding-inline:calc(var(--spacing)*8)}.md\\:py-5{padding-block:calc(var(--spacing)*5)}.md\\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}}:root{font-family:DM Sans,sans-serif}ul{margin-bottom:18px;padding-left:30px;list-style-type:disc}.livetxt,.livetxt-item{box-shadow:0 2px 12px #221f201a}.switch-button{cursor:pointer;background:#fff;border:1px solid #8c9497;border-radius:14px;justify-content:space-between;align-items:center;width:52px;height:28px;transition:background .3s,border .3s;display:flex;position:relative}.switch-button .button{background:#be768d;border-radius:50%;width:20px;height:20px;transition:left .3s,background .3s;position:absolute;top:50%;left:4px;transform:translateY(-50%)}.customBtnStyle{left:50%;transform:translate(-50%)}.switch-button.disabled{background:#fff;border-color:#8c9497}.switch-button.disabled .button{background:#8c9497;left:calc(100% - 24px)}.livetxt_inner-paragraph--is-embed{position:relative}.livetxt_inner-paragraph--is-embed:before{content:"";padding-bottom:100%;display:block}.livetxt_inner-paragraph--is-embed>iframe{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}.livetxt_inner-paragraph--is-video{position:relative}.livetxt_inner-paragraph--is-video:before{content:"";padding-bottom:56.25%;display:block}.livetxt_inner-paragraph--is-video>iframe{width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}.customText p{margin-bottom:18px}.customNews div div h1,.customNews div div p h2,.customNews div div p h3,.customNews div div p strong{font-size:28px;line-height:32px;display:block;color:#221f20!important;margin-bottom:21px!important}.customNews__title div div h1,.customNews__title div div h1 span,.customNews__title div div p strong{font-size:28px;line-height:32px;display:block;color:#be768d!important;margin-bottom:21px!important}.customNews div div p img,.customNews__title div div p img{margin:0 auto}blockquote{color:#2c6847;border-left:1px solid #2c6847;margin-left:24px;padding-left:24px;font-size:16px;font-style:italic;line-height:22px}blockquote em{color:#2c6847;margin-top:.5rem;font-size:16px;font-style:italic;line-height:22px;display:block}.quote-author{color:#2c6847;margin-top:16px;font-size:16px;font-style:italic;line-height:22px;display:block}.ql-align-center{text-align:center}.ql-align-left{text-align:left}.ql-align-right{text-align:right}.ql-align-justify{text-align:justify}.customNews p a{color:#be768d}.customNews p{margin-bottom:18px}.customNews ol{margin-bottom:18px;padding-left:30px;list-style-type:decimal}.twitter-video-container,.twitter-video-container blockquote.twitter-tweet{width:100%!important;max-width:100%!important}.twitter-video-container iframe{width:100%!important}.instagram-embed-container,.twitter-embed-container{width:100%;min-height:300px;margin:1rem 0}.instagram-embed-container iframe,.twitter-embed-container iframe{width:100%!important}.facebook-embed-container{width:100%;min-height:400px;margin:1rem 0}.facebook-embed-container iframe{border:none;width:100%!important}.telegram-embed-container{max-width:505px}.quill-gallery{margin:1em 0}.gallery-grid-quill{grid-template-columns:repeat(4,1fr);gap:10px;margin:10px 0;display:grid}.gallery-item-quill{cursor:pointer;width:100%;padding-bottom:100%;transition:transform .2s,box-shadow .2s;position:relative;overflow:hidden}.gallery-item-quill img{object-fit:cover;width:100%;height:100%;transition:opacity .2s;position:absolute;top:0;left:0}.gallery-item-quill:hover img{opacity:.9}.overlay-quill{z-index:1;background-color:#000000b3;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.overlay-text-quill{color:#fff;font-size:2rem;font-weight:700}.gallery-lightbox{z-index:9999;background-color:#000000f2;justify-content:center;align-items:center;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.lightbox-close{color:#fff;cursor:pointer;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);pointer-events:auto;background:#ffffff1a;border:none;border-radius:50%;justify-content:center;align-items:center;width:48px;height:48px;transition:all .3s;display:flex;position:absolute;top:20px;right:20px}.lightbox-close:hover{background:#fff3}.lightbox-counter{color:#fff;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#00000080;border-radius:20px;padding:8px 16px;font-size:16px;font-weight:600;position:absolute;top:30px;left:50%;transform:translate(-50%)}.lightbox-nav{color:#fff;cursor:pointer;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffff1a;border:none;border-radius:50%;justify-content:center;align-items:center;width:64px;
2031height:64px;transition:all .3s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.lightbox-nav:hover{background:#fff3}.lightbox-nav-prev{left:20px}.lightbox-nav-next{right:20px}.lightbox-image-container{justify-content:center;align-items:center;max-width:90vw;max-height:90vh;display:flex;position:relative}.lightbox-image{object-fit:contain;opacity:0;max-width:100%;max-height:90vh;transition:opacity .3s;box-shadow:0 10px 50px #00000080}.lightbox-image.image-loaded{opacity:1}.lightbox-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.lightbox-authority{color:#fff;z-index:10001;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);word-wrap:break-word;background:#000000b3;border-radius:6px;max-width:calc(100% - 40px);padding:8px 16px;font-size:14px;font-weight:500;position:absolute;bottom:20px;left:20px}.spinner{border:4px solid #fff3;border-top-color:#fff;border-radius:50%;width:48px;height:48px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.lightbox-fade-enter-active,.lightbox-fade-leave-active{transition:opacity .3s}.lightbox-fade-enter-from,.lightbox-fade-leave-to{opacity:0}.image-fade-enter-active,.image-fade-leave-active{transition:opacity .2s}.image-fade-enter-from,.image-fade-leave-to{opacity:0}@media screen and (max-width:767px){.customNews p strong,.customText p{font-size:16px}blockquote{margin-left:12px;padding-left:12px}.lightbox-close{width:40px;height:40px;top:10px;right:10px}.lightbox-counter{padding:6px 12px;font-size:14px;top:10px}.lightbox-nav{width:48px;height:48px}.lightbox-nav svg{width:32px;height:32px}.lightbox-nav-prev{left:10px}.lightbox-nav-next{right:10px}.lightbox-image-container{max-width:95vw;max-height:80vh}.lightbox-image{max-height:80vh}.lightbox-authority{max-width:calc(100% - 20px);padding:6px 12px;font-size:12px;bottom:10px;left:10px}.customNews__title div div h1 strong,.customNews div div h1,.customNews div div p h2,.customNews div div p h3,.customNews__title div div h1,.customNews__title div div h1 span,.customNews__title div div p strong,.customNews div div p strong{font-size:21px;line-height:28px}.ql-video{width:100%}.telegram-video-container{width:100%;height:100vh}.telegram-embed-container iframe{width:100%!important}
2031.facebook-embed-optimized{height:415px!important}.LIframePost iframe{width:100%!important}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';let Mh=!1;function nE(){typeof window>"u"||Mh||(Mh=!0,(function(){var e="lrytas.lt",t=document.createElement("script"),n=document.getElementsByTagName("script")[0],r="https://cmp.inmobi.com".concat("/choice/","UV9U0wgzknhEN","/",e,"/choice.js?tag_version=V3"),i=0,s=3;t.async=!0,t.type="text/javascript",t.src=r,n.parentNode.insertBefore(t,n);function a(){var f="__tcfapiLocator",p=[],g=window,I;function R(){var B=g.document,j=!!g.frames[f];if(!j)if(B.body){var Q=B.createElement("iframe");Q.style.cssText="display:none",Q.name=f,B.body.appendChild(Q)}else setTimeout(R,5);return!j}function V(){var B,j=arguments;if(j.length)if(j[0]==="setGdprApplies")j.length>3&&j[2]===2&&typeof j[3]=="boolean"&&(B=j[3],typeof j[2]=="function"&&j[2]("set",!0));else if(j[0]==="ping"){var Q={gdprApplies:B,cmpLoaded:!1,cmpStatus:"stub"};typeof j[2]=="function"&&j[2](Q)}else j[0]==="init"&&typeof j[3]=="object"&&(j[3]=Object.assign(j[3],{tag_version:"V2"})),p.push(j);else return p}function O(B){var j=typeof B.data=="string",Q={};try{j?Q=JSON.parse(B.data):Q=B.data}catch{}var $=Q.__tcfapiCall;$&&window.__tcfapi($.command,$.version,function(ut,gt){var x={__tcfapiReturn:{returnValue:ut,success:gt,callId:$.callId}};j&&(x=JSON.stringify(x)),B&&B.source&&B.source.postMessage&&B.source.postMessage(x,"*")},$.parameter)}for(;g;){try{if(g.frames[f]){I=g;break}}catch{}if(g===window.top)break;g=g.parent}I||(R(),g.__tcfapi=V,g.addEventListener("message",O,!1))}a();var l=function(){var f=arguments;typeof window.__uspapi!==l&&setTimeout(function(){typeof window.__uspapi<"u"&&window.__uspapi.apply(window.__uspapi,f)},500)},u=function(){i++,window.__uspapi===l&&i<s?console.warn("USP is not accessible"):clearInterval(d)};if(typeof window.__uspapi>"u"){window.__uspapi=l;var d=setInterval(u,6e3)}})())}class rE extends HTMLElement{constructor(){super();const t=document.createElement("style");t.textContent=eE,this.appendChild(t),this.container=document.createElement("div"),this.appendChild(this.container)}connectedCallback(){nE(),z0(),this._app=Py(tE,{appid:this.getAttribute("appid")||"",minimized:this.hasAttribute("minimized")}).mount(this.container)}disconnectedCallback(){var t;(t=this._app)==null||t.unmount()}static get observedAttributes(){return["appid"]}attributeChangedCallback(t,n,r){var i;t==="appid"&&((i=this._app)!=null&&i._instance)&&(this._app._instance.props.appid=r)}}customElements.define("live-txt",rE);
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.