PageSourceSearch

https://asistente-prl.vercel.app/assets/index-DLje6V2-.js

js asistente-prl.vercel.app collected 2026-10-03 06:07:39 UTC 616,227 bytes, 2,598 lines download raw bytes

vendor: 3,790 bytes, lines 1-17
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const h of o)if(h.type==="childList")for(const d of h.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(o){const h={};return o.integrity&&(h.integrity=o.integrity),o.referrerPolicy&&(h.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?h.credentials="include":o.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(o){if(o.ep)return;o.ep=!0;const h=i(o);fetch(o.href,h)}})();function S0(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var qf={exports:{}},Fl={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var ky;function pT(){if(ky)return Fl;ky=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(r,o,h){var d=null;if(h!==void 0&&(d=""+h),o.key!==void 0&&(d=""+o.key),"key"in o){h={};for(var y in o)y!=="key"&&(h[y]=o[y])}else h=o;return o=h.ref,{$$typeof:s,type:r,key:d,ref:o!==void 0?o:null,props:h}}return Fl.Fragment=e,Fl.jsx=i,Fl.jsxs=i,Fl}var qy;function yT(){return qy||(qy=1,qf.exports=pT()),qf.exports}var x=yT(),Hf={exports:{}},gt={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Hy;function _T(){if(Hy)return gt;Hy=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),d=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),O=Symbol.iterator;function Q(V){return V===null||typeof V!="object"?null:(V=O&&V[O]||V["@@iterator"],typeof V=="function"?V:null)}var J={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},et=Object.assign,nt={};function yt(V,K,tt){this.props=V,this.context=K,this.refs=nt,this.updater=tt||J}yt.prototype.isReactComponent={},yt.prototype.setState=function(V,K){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,K,"setState")},yt.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function Tt(){}Tt.prototype=yt.prototype;function _t(V,K,tt){this.props=V,this.context=K,this.refs=nt,this.updater=tt||J}var Xt=_t.prototype=new Tt;Xt.constructor=_t,et(Xt,yt.prototype),Xt.isPureReactComponent=!0;var Zt=Array.isArray;function Lt(){}var N={H:null,A:null,T:null,S:null},S=Object.prototype.hasOwnProperty;function C(V,K,tt){var st=tt.ref;return{$$typeof:s,type:V,key:K,ref:st!==void 0?st:null,props:tt}}function M(V,K){return C(V.type,K,V.props)}function D(V){return typeof V=="object"&&V!==null&&V.$$typeof===s}function j(V){var K={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(tt){return K[tt]})}var w=/\/+/g;function ne(V,K){return typeof V=="object"&&V!==null&&V.key!=null?j(""+V.key):K.toString(36)}function Ce(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;
vendor: 18,991 bytes, lines 17-43
17default:switch(typeof V.status=="string"?V.then(Lt,Lt):(V.status="pending",V.then(function(K){V.status==="pending"&&(V.status="fulfilled",V.value=K)},function(K){V.status==="pending"&&(V.status="rejected",V.reason=K)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function G(V,K,tt,st,dt){var bt=typeof V;(bt==="undefined"||bt==="boolean")&&(V=null);var Dt=!1;if(V===null)Dt=!0;else switch(bt){case"bigint":case"string":case"number":Dt=!0;break;case"object":switch(V.$$typeof){case s:case e:Dt=!0;break;case b:return Dt=V._init,G(Dt(V._payload),K,tt,st,dt)}}if(Dt)return dt=dt(V),Dt=st===""?"."+ne(V,0):st,Zt(dt)?(tt="",Dt!=null&&(tt=Dt.replace(w,"$&/")+"/"),G(dt,K,tt,"",function(Ha){return Ha})):dt!=null&&(D(dt)&&(dt=M(dt,tt+(dt.key==null||V&&V.key===dt.key?"":(""+dt.key).replace(w,"$&/")+"/")+Dt)),K.push(dt)),1;Dt=0;var xe=st===""?".":st+":";if(Zt(V))for(var ie=0;ie<V.length;ie++)st=V[ie],bt=xe+ne(st,ie),Dt+=G(st,K,tt,bt,dt);else if(ie=Q(V),typeof ie=="function")for(V=ie.call(V),ie=0;!(st=V.next()).done;)st=st.value,bt=xe+ne(st,ie++),Dt+=G(st,K,tt,bt,dt);else if(bt==="object"){if(typeof V.then=="function")return G(Ce(V),K,tt,st,dt);throw K=String(V),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return Dt}function W(V,K,tt){if(V==null)return V;var st=[],dt=0;return G(V,st,"","",function(bt){return K.call(tt,bt,dt++)}),st}function ct(V){if(V._status===-1){var K=V._result;K=K(),K.then(function(tt){(V._status===0||V._status===-1)&&(V._status=1,V._result=tt)},function(tt){(V._status===0||V._status===-1)&&(V._status=2,V._result=tt)}),V._status===-1&&(V._status=0,V._result=K)}if(V._status===1)return V._result.default;throw V._result}var Mt=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)},kt={map:W,forEach:function(V,K,tt){W(V,function(){K.apply(this,arguments)},tt)},count:function(V){var K=0;return W(V,function(){K++}),K},toArray:function(V){return W(V,function(K){return K})||[]},only:function(V){if(!D(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return gt.Activity=A,gt.Children=kt,gt.Component=yt,gt.Fragment=i,gt.Profiler=o,gt.PureComponent=_t,gt.StrictMode=r,gt.Suspense=v,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,gt.__COMPILER_RUNTIME={__proto__:null,c:function(V){return N.H.useMemoCache(V)}},gt.cache=function(V){return function(){return V.apply(null,arguments)}},gt.cacheSignal=function(){return null},gt.cloneElement=function(V,K,tt){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var st=et({},V.props),dt=V.key;if(K!=null)for(bt in K.key!==void 0&&(dt=""+K.key),K)!S.call(K,bt)||bt==="key"||bt==="__self"||bt==="__source"||bt==="ref"&&K.ref===void 0||(st[bt]=K[bt]);var bt=arguments.length-2;if(bt===1)st.children=tt;else if(1<bt){for(var Dt=Array(bt),xe=0;xe<bt;xe++)Dt[xe]=arguments[xe+2];st.children=Dt}return C(V.type,dt,st)},gt.createContext=function(V){return V={$$typeof:d,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:h,_context:V},V},gt.createElement=function(V,K,tt){var st,dt={},bt=null;if(K!=null)for(st in K.key!==void 0&&(bt=""+K.key),K)S.call(K,st)&&st!=="key"&&st!=="__self"&&st!=="__source"&&(dt[st]=K[st]);var Dt=arguments.length-2;if(Dt===1)dt.children=tt;else if(1<Dt){for(var xe=Array(Dt),ie=0;ie<Dt;ie++)xe[ie]=arguments[ie+2];dt.children=xe}if(V&&V.defaultProps)for(st in Dt=V.defaultProps,Dt)dt[st]===void 0&&(dt[st]=Dt[st]);return C(V,bt,dt)},gt.createRef=function(){return{current:null}},gt.forwardRef=function(V){return{$$typeof:y,render:V}},gt.isValidElement=D,gt.lazy=function(V){return{$$typeof:b,_payload:{_status:-1,_result:V},_init:ct}},gt.memo=function(V,K){return{$$typeof:p,type:V,compare:K===void 0?null:K}},gt.startTransition=function(V){var K=N.T,tt={};N.T=tt;try{var st=V(),dt=N.S;dt!==null&&dt(tt,st),typeof st=="object"&&st!==null&&typeof st.then=="function"&&st.then(Lt,Mt)}catch(bt){Mt(bt)}finally{K!==null&&tt.types!==null&&(K.types=tt.types),N.T=K}},gt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},gt.use=function(V){return N.H.use(V)},gt.useActionState=function(V,K,tt){return N.H.useActionState(V,K,tt)},gt.useCallback=function(V,K){return N.H.useCallback(V,K)},gt.useContext=function(V){return N.H.useContext(V)},gt.useDebugValue=function(){},gt.useDeferredValue=function(V,K){return N.H.useDeferredValue(V,K)},gt.useEffect=function(V,K){return N.H.useEffect(V,K)},gt.useEffectEvent=function(V){return N.H.useEffectEvent(V)},gt.useId=function(){return N.H.useId()},gt.useImperativeHandle=function(V,K,tt){return N.H.useImperativeHandle(V,K,tt)},gt.useInsertionEffect=function(V,K){return N.H.useInsertionEffect(V,K)},gt.useLayoutEffect=function(V,K){return N.H.useLayoutEffect(V,K)},gt.useMemo=function(V,K){return N.H.useMemo(V,K)},gt.useOptimistic=function(V,K){return N.H.useOptimistic(V,K)},gt.useReducer=function(V,K,tt){return N.H.useReducer(V,K,tt)},gt.useRef=function(V){return N.H.useRef(V)},gt.useState=function(V){return N.H.useState(V)},gt.useSyncExternalStore=function(V,K,tt){return N.H.useSyncExternalStore(V,K,tt)},gt.useTransition=function(){return N.H.useTransition()},gt.version="19.2.4",gt}var Gy;function zd(){return Gy||(Gy=1,Hf.exports=_T()),Hf.exports}var je=zd();const w0=S0(je);var Gf={exports:{}},Ql={},Ff={exports:{}},Qf={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Fy;function vT(){return Fy||(Fy=1,(function(s){function e(G,W){var ct=G.length;G.push(W);t:for(;0<ct;){var Mt=ct-1>>>1,kt=G[Mt];if(0<o(kt,W))G[Mt]=W,G[ct]=kt,ct=Mt;else break t}}function i(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var W=G[0],ct=G.pop();if(ct!==W){G[0]=ct;t:for(var Mt=0,kt=G.length,V=kt>>>1;Mt<V;){var K=2*(Mt+1)-1,tt=G[K],st=K+1,dt=G[st];if(0>o(tt,ct))st<kt&&0>o(dt,tt)?(G[Mt]=dt,G[st]=ct,Mt=st):(G[Mt]=tt,G[K]=ct,Mt=K);else if(st<kt&&0>o(dt,ct))G[Mt]=dt,G[st]=ct,Mt=st;else break t}}return W}function o(G,W){var ct=G.sortIndex-W.sortIndex;return ct!==0?ct:G.id-W.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var d=Date,y=d.now();s.unstable_now=function(){return d.now()-y}}var v=[],p=[],b=1,A=null,O=3,Q=!1,J=!1,et=!1,nt=!1,yt=typeof setTimeout=="function"?setTimeout:null,Tt=typeof clearTimeout=="function"?clearTimeout:null,_t=typeof setImmediate<"u"?setImmediate:null;function Xt(G){for(var W=i(p);W!==null;){if(W.callback===null)r(p);else if(W.startTime<=G)r(p),W.sortIndex=W.expirationTime,e(v,W);else break;W=i(p)}}function Zt(G){if(et=!1,Xt(G),!J)if(i(v)!==null)J=!0,Lt||(Lt=!0,j());else{var W=i(p);W!==null&&Ce(Zt,W.startTime-G)}}var Lt=!1,N=-1,S=5,C=-1;function M(){return nt?!0:!(s.unstable_now()-C<S)}function D(){if(nt=!1,Lt){var G=s.unstable_now();C=G;var W=!0;try{t:{J=!1,et&&(et=!1,Tt(N),N=-1),Q=!0;var ct=O;try{e:{for(Xt(G),A=i(v);A!==null&&!(A.expirationTime>G&&M());){var Mt=A.callback;if(typeof Mt=="function"){A.callback=null,O=A.priorityLevel;var kt=Mt(A.expirationTime<=G);if(G=s.unstable_now(),typeof kt=="function"){A.callback=kt,Xt(G),W=!0;break e}A===i(v)&&r(v),Xt(G)}else r(v);A=i(v)}if(A!==null)W=!0;else{var V=i(p);V!==null&&Ce(Zt,V.startTime-G),W=!1}}break t}finally{A=null,O=ct,Q=!1}W=void 0}}finally{W?j():Lt=!1}}}var j;if(typeof _t=="function")j=function(){_t(D)};else if(typeof MessageChannel<"u"){var w=new MessageChannel,ne=w.port2;w.port1.onmessage=D,j=function(){ne.postMessage(null)}}else j=function(){yt(D,0)};function Ce(G,W){N=yt(function(){G(s.unstable_now())},W)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(G){G.callback=null},s.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<G?Math.floor(1e3/G):5},s.unstable_getCurrentPriorityLevel=function(){return O},s.unstable_next=function(G){switch(O){case 1:case 2:case 3:var W=3;break;default:W=O}var ct=O;O=W;try{return G()}finally{O=ct}},s.unstable_requestPaint=function(){nt=!0},s.unstable_runWithPriority=function(G,W){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ct=O;O=G;try{return W()}finally{O=ct}},s.unstable_scheduleCallback=function(G,W,ct){var Mt=s.unstable_now();switch(typeof ct=="object"&&ct!==null?(ct=ct.delay,ct=typeof ct=="number"&&0<ct?Mt+ct:Mt):ct=Mt,G){case 1:var kt=-1;break;case 2:kt=250;break;case 5:kt=1073741823;break;case 4:kt=1e4;break;default:kt=5e3}return kt=ct+kt,G={id:b++,callback:W,priorityLevel:G,startTime:ct,expirationTime:kt,sortIndex:-1},ct>Mt?(G.sortIndex=ct,e(p,G),i(v)===null&&G===i(p)&&(et?(Tt(N),N=-1):et=!0,Ce(Zt,ct-Mt))):(G.sortIndex=kt,e(v,G),J||Q||(J=!0,Lt||(Lt=!0,j()))),G},s.unstable_shouldYield=M,s.unstable_wrapCallback=function(G){var W=O;return function(){var ct=O;O=W;try{return G.apply(this,arguments)}finally{O=ct}}}})(Qf)),Qf}var Qy;function ET(){return Qy||(Qy=1,Ff.exports=vT()),Ff.exports}var Yf={exports:{}},Ye={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var Yy;function TT(){if(Yy)return Ye;Yy=1;var s=zd();function e(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function h(v,p,b){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:A==null?null:""+A,children:v,containerInfo:p,implementation:b}}var d=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ye.createPortal=function(v,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return h(v,p,null,b)},Ye.flushSync=function(v){var p=d.T,b=r.p;try{if(d.T=null,r.p=2,v)return v()}finally{d.T=p,r.p=b,r.d.f()}},Ye.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(v,p))},Ye.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},Ye.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var b=p.as,A=y(b,p.crossOrigin),O=typeof p.integrity=="string"?p.integrity:void 0,Q=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?r.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:A,integrity:O,fetchPriority:Q}):b==="script"&&r.d.X(v,{crossOrigin:A,integrity:O,fetchPriority:Q,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ye.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=y(p.as,p.crossOrigin);r.d.M(v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(v)},Ye.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,A=y(b,p.crossOrigin);r.d.L(v,b,{crossOrigin:A,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ye.preloadModule=function(v,p){if(typeof v=="string")if(p){var b=y(p.as,p.crossOrigin);r.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(v)},Ye.requestFormReset=function(v){r.d.r(v)},Ye.unstable_batchedUpdates=function(v,p){return v(p)},Ye.useFormState=function(v,p,b){return d.H.useFormState(v,p,b)},Ye.useFormStatus=function(){return d.H.useHostTransitionStatus()},Ye.version="19.2.4",Ye}var Ky;function bT(){if(Ky)return Yf.exports;Ky=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),Yf.exports=TT(),Yf.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var Xy;function AT(){if(Xy)return Ql;Xy=1;var s=ET(),e=zd(),i=bT();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function d(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function y(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function v(t){if(h(t)!==t)throw Error(r(188))}function p(t){var n=t.alternate;if(!n){if(n=h(t),n===null)throw Error(r(188));return n!==t?null:t}for(var a=t,l=n;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return v(c),t;if(f===l)return v(c),n;f=f.sibling}throw Error(r(188))}if(a.return!==l.return)a=c,l=f;else{for(var g=!1,E=c.child;E;){if(E===a){g=!0,a=c,l=f;break}if(E===l){g=!0,l=c,a=f;break}E=E.sibling}if(!g){for(E=f.child;E;){if(E===a){g=!0,a=f,l=c;break}if(E===l){g=!0,l=f,a=c;break}E=E.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?t:n}function b(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=b(t),n!==null)return n;t=t.sibling}return null}var A=Object.assign,O=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),et=Symbol.for("react.fragment"),nt=Symbol.for("react.strict_mode"),yt=Symbol.for("react.profiler"),Tt=Symbol.for("react.consumer"),_t=Symbol.for("react.context"),Xt=Symbol.for("react.forward_ref"),Zt=Symbol.for("react.suspense"),Lt=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function j(t){return t===null||typeof t!="object"?null:(t=D&&t[D]||t["@@iterator"],typeof t=="function"?t:null)}var w=Symbol.for("react.client.reference");function ne(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===w?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case et:return"Fragment";case yt:return"Profiler";case nt:return"StrictMode";case Zt:return"Suspense";case Lt:return"SuspenseList";case C:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case J:return"Portal";case _t:return t.displayName||"Context";case Tt:return(t._context.displayName||"Context")+".Consumer";case Xt:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case N:return n=t.displayName||null,n!==null?n:ne(t.type)||"Memo";case S:n=t._payload,t=t._init;try{return ne(t(n))}catch{}}return null}var Ce=Array.isArray,G=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ct={pending:!1,data:null,method:null,action:null},Mt=[],kt=-1;function V(t){return{current:t}}function K(t){0>kt||(t.current=Mt[kt],Mt[kt]=null,kt--)}function tt(t,n){kt++,Mt[kt]=t.current,t.current=n}var st=V(null),dt=V(null),bt=V(null),Dt=V(null);function xe(t,n){switch(tt(bt,n),tt(dt,t),tt(st,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?cy(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=cy(n),t=hy(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(st),tt(st,t)}function ie(){K(st),K(dt),K(bt)}function Ha(t){t.memoizedState!==null&&tt(Dt,t);var n=st.current,a=hy(n,t.type);n!==a&&(tt(dt,t),tt(st,a))}function Vs(t){dt.current===t&&(K(st),K(dt)),Dt.current===t&&(K(Dt),kl._currentValue=ct)}var Os,Ms;function $n(t){if(Os===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Os=n&&n[1]||"",Ms=-1<a.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+Os+t+Ms}var kr=!1;function Ga(t,n){if(!t||kr)return"";kr=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(q){var B=q}Reflect.construct(t,[],Y)}else{try{Y.call()}catch(q){B=q}t.call(Y.prototype)}}else{try{throw Error()}catch(q){B=q}(Y=t())&&typeof Y.catch=="function"&&Y.catch(function(){})}}
vendor: 4,674 bytes, lines 43-48
43catch(q){if(q&&B&&typeof q.stack=="string")return[q.stack,B.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),g=f[0],E=f[1];if(g&&E){var R=g.split(`
44`),P=E.split(`
45`);for(c=l=0;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;for(;c<P.length&&!P[c].includes("DetermineComponentFrameRoot");)c++;if(l===R.length||c===P.length)for(l=R.length-1,c=P.length-1;1<=l&&0<=c&&R[l]!==P[c];)c--;for(;1<=l&&0<=c;l--,c--)if(R[l]!==P[c]){if(l!==1||c!==1)do if(l--,c--,0>c||R[l]!==P[c]){var H=`
46`+R[l].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=l&&0<=c);break}}}finally{kr=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?$n(a):""}function qr(t,n){switch(t.tag){case 26:case 27:case 5:return $n(t.type);case 16:return $n("Lazy");case 13:return t.child!==n&&n!==null?$n("Suspense Fallback"):$n("Suspense");case 19:return $n("SuspenseList");case 0:case 15:return Ga(t.type,!1);case 11:return Ga(t.type.render,!1);case 1:return Ga(t.type,!0);case 31:return $n("Activity");default:return""}}function Hr(t){try{var n="",a=null;do n+=qr(t,a),a=t,t=t.return;while(t);return n}catch(l){return`
47Error generating stack: `+l.message+`
48`+l.stack}}var me=Object.prototype.hasOwnProperty,Ne=s.unstable_scheduleCallback,Zi=s.unstable_cancelCallback,Hc=s.unstable_shouldYield,Eo=s.unstable_requestPaint,$e=s.unstable_now,Fa=s.unstable_getCurrentPriorityLevel,Gr=s.unstable_ImmediatePriority,Fr=s.unstable_UserBlockingPriority,$i=s.unstable_NormalPriority,Gc=s.unstable_LowPriority,To=s.unstable_IdlePriority,bo=s.log,Ao=s.unstable_setDisableYieldValue,jn=null,Ue=null;function Tn(t){if(typeof bo=="function"&&Ao(t),Ue&&typeof Ue.setStrictMode=="function")try{Ue.setStrictMode(jn,t)}catch{}}var ue=Math.clz32?Math.clz32:wo,So=Math.log,zs=Math.LN2;function wo(t){return t>>>=0,t===0?32:31-(So(t)/zs|0)|0}var Jn=256,Qa=262144,ge=4194304;function Wn(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ti(t,n,a){var l=t.pendingLanes;if(l===0)return 0;var c=0,f=t.suspendedLanes,g=t.pingedLanes;t=t.warmLanes;var E=l&134217727;return E!==0?(l=E&~f,l!==0?c=Wn(l):(g&=E,g!==0?c=Wn(g):a||(a=E&~t,a!==0&&(c=Wn(a))))):(E=l&~f,E!==0?c=Wn(E):g!==0?c=Wn(g):a||(a=l&~t,a!==0&&(c=Wn(a)))),c===0?0:n!==0&&n!==c&&(n&f)===0&&(f=c&-c,a=n&-n,f>=a||f===32&&(a&4194048)!==0)?n:c}function Ln(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Fc(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ro(){var t=ge;return ge<<=1,(ge&62914560)===0&&(ge=4194304),t}function ei(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function Ya(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Qc(t,n,a,l,c,f){var g=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var E=t.entanglements,R=t.expirationTimes,P=t.hiddenUpdates;for(a=g&~a;0<a;){var H=31-ue(a),Y=1<<H;E[H]=0,R[H]=-1;var B=P[H];if(B!==null)for(P[H]=null,H=0;H<B.length;H++){var q=B[H];q!==null&&(q.lane&=-536870913)}a&=~Y}l!==0&&Ka(t,l,0),f!==0&&c===0&&t.tag!==0&&(t.suspendedLanes|=f&~(g&~n))}function Ka(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var l=31-ue(n);t.entangledLanes|=n,t.entanglements[l]=t.entanglements[l]|1073741824|a&261930}function Qr(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var l=31-ue(a),c=1<<l;
vendor: 8,549 bytes, line 48
48c&n|t[l]&n&&(t[l]|=n),a&=~c}}function Yr(t,n){var a=n&-n;return a=(a&42)!==0?1:Xa(a),(a&(t.suspendedLanes|n))!==0?0:a}function Xa(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function wi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Co(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:My(t.type))}function Un(t,n){var a=W.p;try{return W.p=t,n()}finally{W.p=a}}var Pn=Math.random().toString(36).slice(2),pe="__reactFiber$"+Pn,Ve="__reactProps$"+Pn,ni="__reactContainer$"+Pn,js="__reactEvents$"+Pn,Yc="__reactListeners$"+Pn,xo="__reactHandles$"+Pn,No="__reactResources$"+Pn,ii="__reactMarker$"+Pn;function Ls(t){delete t[pe],delete t[Ve],delete t[js],delete t[Yc],delete t[xo]}function ai(t){var n=t[pe];if(n)return n;for(var a=t.parentNode;a;){if(n=a[ni]||a[pe]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=_y(t);t!==null;){if(a=t[pe])return a;t=_y(t)}return n}t=a,a=t.parentNode}return null}function bn(t){if(t=t[pe]||t[ni]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function hn(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function si(t){var n=t[No];return n||(n=t[No]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ye(t){t[ii]=!0}var Kr=new Set,Xr={};function ri(t,n){li(t,n),li(t+"Capture",n)}function li(t,n){for(Xr[t]=n,t=0;t<n.length;t++)Kr.add(n[t])}var Zr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),$r={},Jr={};function Io(t){return me.call(Jr,t)?!0:me.call($r,t)?!1:Zr.test(t)?Jr[t]=!0:($r[t]=!0,!1)}function Us(t,n,a){if(Io(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function fn(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function _e(t,n,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+l)}}function Oe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ji(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Wr(t,n,a){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return c.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(t,n,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function qt(t){if(!t._valueTracker){var n=Ji(t)?"checked":"value";t._valueTracker=Wr(t,n,""+t[n])}}function Za(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return t&&(l=Ji(t)?t.checked?"true":"false":t.value),t=l,t!==a?(n.setValue(t),!0):!1}function oi(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var $a=/[\n"\\]/g;function nn(t){return t.replace($a,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ps(t,n,a,l,c,f,g,E){t.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.type=g:t.removeAttribute("type"),n!=null?g==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Oe(n)):t.value!==""+Oe(n)&&(t.value=""+Oe(n)):g!=="submit"&&g!=="reset"||t.removeAttribute("value"),n!=null?tl(t,g,Oe(n)):a!=null?tl(t,g,Oe(a)):l!=null&&t.removeAttribute("value"),c==null&&f!=null&&(t.defaultChecked=!!f),c!=null&&(t.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+Oe(E):t.removeAttribute("name")}function Do(t,n,a,l,c,f,g,E){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.type=f),n!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){qt(t);return}a=a!=null?""+Oe(a):"",n=n!=null?""+Oe(n):a,E||n===t.value||(t.value=n),t.defaultValue=n}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=E?t.checked:!!l,t.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.name=g),qt(t)}function tl(t,n,a){n==="number"&&oi(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Wi(t,n,a,l){if(t=t.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<t.length;a++)c=n.hasOwnProperty("$"+t[a].value),t[a].selected!==c&&(t[a].selected=c),c&&l&&(t[a].defaultSelected=!0)}else{for(a=""+Oe(a),n=null,c=0;c<t.length;c++){if(t[c].value===a){t[c].selected=!0,l&&(t[c].defaultSelected=!0);return}n!==null||t[c].disabled||(n=t[c])}n!==null&&(n.selected=!0)}}function Vo(t,n,a){if(n!=null&&(n=""+Oe(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Oe(a):""}function ta(t,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(r(92));if(Ce(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Oe(n),t.defaultValue=a,l=t.textContent,l===a&&l!==""&&l!==null&&(t.value=l),qt(t)}function an(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var Oo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function el(t,n,a){var l=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":l?t.setProperty(n,a):typeof a!="number"||a===0||Oo.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function nl(t,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(t=t.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var c in n)l=n[c],n.hasOwnProperty(c)&&a[c]!==l&&el(t,c,l)}else for(var f in n)n.hasOwnProperty(f)&&el(t,f,n[f])}function Bs(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mo=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ea=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ks(t){return ea.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Bn(){}var il=null;function An(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var na=null,ui=null;function Ja(t){var n=bn(t);if(n&&(t=n.stateNode)){var a=t[Ve]||null;t:switch(t=n.stateNode,n.type){case"input":if(Ps(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+nn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==t&&l.form===t.form){var c=l[Ve]||null;if(!c)throw Error(r(90));Ps(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===t.form&&Za(l)}break t;case"textarea":Vo(t,a.value,a.defaultValue);break t;case"select":n=a.value,n!=null&&Wi(t,!!a.multiple,n,!1)}}}var qs=!1;function ia(t,n,a){if(qs)return t(n,a);qs=!0;try{var l=t(n);return l}finally{if(qs=!1,(na!==null||ui!==null)&&(Cu(),na&&(n=na,t=ui,ui=na=null,Ja(n),t)))for(n=0;n<t.length;n++)Ja(t[n])}}function kn(t,n){var a=t.stateNode;if(a===null)return null;var l=a[Ve]||null;if(l===null)return null;a=l[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wa=!1;if(Sn)try{var Ft={};Object.defineProperty(Ft,"passive",{get:function(){Wa=!0}}),window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch{Wa=!1}var ci=null,al=null,ts=null;function sl(){if(ts)return ts;var t,n=al,a=n.length,l,c="value"in ci?ci.value:ci.textContent,f=c.length;for(t=0;t<a&&n[t]===c[t];t++);var g=a-t;for(l=1;l<=g&&n[a-l]===c[f-l];l++);return ts=c.slice(t,1<l?1-l:void 0)}function es(t){var n=t.keyCode;
vendor: 5,443 bytes, line 48
48return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Ri(){return!0}function qn(){return!1}function Pe(t){function n(a,l,c,f,g){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(a=t[E],this[E]=a?a(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ri:qn,this.isPropagationStopped=qn,this}return A(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ri)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ri)},persist:function(){},isPersistent:Ri}),n}var Ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hi=Pe(Ci),aa=A({},Ci,{view:0,detail:0}),rl=Pe(aa),sa,Hs,fi,Gs=A({},aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ra,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fi&&(fi&&t.type==="mousemove"?(sa=t.screenX-fi.screenX,Hs=t.screenY-fi.screenY):Hs=sa=0,fi=t),sa)},movementY:function(t){return"movementY"in t?t.movementY:Hs}}),ll=Pe(Gs),ns=A({},Gs,{dataTransfer:0}),zo=Pe(ns),jo=A({},aa,{relatedTarget:0}),is=Pe(jo),ol=A({},Ci,{animationName:0,elapsedTime:0,pseudoElement:0}),Lo=Pe(ol),Fs=A({},Ci,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Uo=Pe(Fs),Po=A({},Ci,{data:0}),di=Pe(Po),Bo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ko={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ho(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=qo[t])?!!n[t]:!1}function ra(){return Ho}var Je=A({},aa,{key:function(t){if(t.key){var n=Bo[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=es(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ko[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ra,charCode:function(t){return t.type==="keypress"?es(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?es(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Go=Pe(Je),Fo=A({},Gs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xi=Pe(Fo),u=A({},aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ra}),m=Pe(u),_=A({},Ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),T=Pe(_),L=A({},Gs,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),k=Pe(L),$=A({},Ci,{newState:0,oldState:0}),vt=Pe($),ce=[9,13,27,32],Ut=Sn&&"CompositionEvent"in window,ae=null;Sn&&"documentMode"in document&&(ae=document.documentMode);var wn=Sn&&"TextEvent"in window&&!ae,mi=Sn&&(!Ut||ae&&8<ae&&11>=ae),Hn=" ",Gn=!1;function as(t,n){switch(t){case"keyup":return ce.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qs(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ys=!1;function BE(t,n){switch(t){case"compositionend":return Qs(n);case"keypress":return n.which!==32?null:(Gn=!0,Hn);case"textInput":return t=n.data,t===Hn&&Gn?null:t;default:return null}}function kE(t,n){if(Ys)return t==="compositionend"||!Ut&&as(t,n)?(t=sl(),ts=al=ci=null,Ys=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return mi&&n.locale!=="ko"?null:n.data;default:return null}}var qE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tm(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!qE[t.type]:n==="textarea"}function bm(t,n,a,l){na?ui?ui.push(l):ui=[l]:na=l,n=Mu(n,"onChange"),0<n.length&&(a=new hi("onChange","change",null,a,l),t.push({event:a,listeners:n}))}var ul=null,cl=null;function HE(t){ay(t,0)}function Qo(t){var n=hn(t);
vendor: 6,051 bytes, line 48
48if(Za(n))return t}function Am(t,n){if(t==="change")return n}var Sm=!1;if(Sn){var Kc;if(Sn){var Xc="oninput"in document;if(!Xc){var wm=document.createElement("div");wm.setAttribute("oninput","return;"),Xc=typeof wm.oninput=="function"}Kc=Xc}else Kc=!1;Sm=Kc&&(!document.documentMode||9<document.documentMode)}function Rm(){ul&&(ul.detachEvent("onpropertychange",Cm),cl=ul=null)}function Cm(t){if(t.propertyName==="value"&&Qo(cl)){var n=[];bm(n,cl,t,An(t)),ia(HE,n)}}function GE(t,n,a){t==="focusin"?(Rm(),ul=n,cl=a,ul.attachEvent("onpropertychange",Cm)):t==="focusout"&&Rm()}function FE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Qo(cl)}function QE(t,n){if(t==="click")return Qo(n)}function YE(t,n){if(t==="input"||t==="change")return Qo(n)}function KE(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var dn=typeof Object.is=="function"?Object.is:KE;function hl(t,n){if(dn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!me.call(n,c)||!dn(t[c],n[c]))return!1}return!0}function xm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Nm(t,n){var a=xm(t);t=0;for(var l;a;){if(a.nodeType===3){if(l=t+a.textContent.length,t<=n&&l>=n)return{node:a,offset:n-t};t=l}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=xm(a)}}function Im(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Im(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Dm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=oi(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=oi(t.document)}return n}function Zc(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var XE=Sn&&"documentMode"in document&&11>=document.documentMode,Ks=null,$c=null,fl=null,Jc=!1;function Vm(t,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Jc||Ks==null||Ks!==oi(l)||(l=Ks,"selectionStart"in l&&Zc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fl&&hl(fl,l)||(fl=l,l=Mu($c,"onSelect"),0<l.length&&(n=new hi("onSelect","select",null,n,a),t.push({event:n,listeners:l}),n.target=Ks)))}function ss(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Xs={animationend:ss("Animation","AnimationEnd"),animationiteration:ss("Animation","AnimationIteration"),animationstart:ss("Animation","AnimationStart"),transitionrun:ss("Transition","TransitionRun"),transitionstart:ss("Transition","TransitionStart"),transitioncancel:ss("Transition","TransitionCancel"),transitionend:ss("Transition","TransitionEnd")},Wc={},Om={};Sn&&(Om=document.createElement("div").style,"AnimationEvent"in window||(delete Xs.animationend.animation,delete Xs.animationiteration.animation,delete Xs.animationstart.animation),"TransitionEvent"in window||delete Xs.transitionend.transition);function rs(t){if(Wc[t])return Wc[t];if(!Xs[t])return t;var n=Xs[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Om)return Wc[t]=n[a];return t}var Mm=rs("animationend"),zm=rs("animationiteration"),jm=rs("animationstart"),ZE=rs("transitionrun"),$E=rs("transitionstart"),JE=rs("transitioncancel"),Lm=rs("transitionend"),Um=new Map,th="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");th.push("scrollEnd");function Fn(t,n){Um.set(t,n),ri(n,[t])}var Yo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Rn=[],Zs=0,eh=0;function Ko(){for(var t=Zs,n=eh=Zs=0;n<t;){var a=Rn[n];Rn[n++]=null;var l=Rn[n];Rn[n++]=null;var c=Rn[n];Rn[n++]=null;var f=Rn[n];if(Rn[n++]=null,l!==null&&c!==null){var g=l.pending;g===null?c.next=c:(c.next=g.next,g.next=c),l.pending=c}f!==0&&Pm(a,c,f)}}function Xo(t,n,a,l){Rn[Zs++]=t,Rn[Zs++]=n,Rn[Zs++]=a,Rn[Zs++]=l,eh|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function nh(t,n,a,l){return Xo(t,n,a,l),Zo(t)}function ls(t,n){return Xo(t,null,null,n),Zo(t)}function Pm(t,n,a){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a);for(var c=!1,f=t.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(t=f.stateNode,t===null||t._visibility&1||(c=!0)),t=f,f=f.return;return t.tag===3?(f=t.stateNode,c&&n!==null&&(c=31-ue(a),t=f.hiddenUpdates,l=t[c],l===null?t[c]=[n]:l.push(n),n.lane=a|536870912),f):null}function Zo(t){if(50<Ml)throw Ml=0,ff=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var $s={};function WE(t,n,a,l){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 18,702 bytes, line 48
48ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(t,n,a,l){return new WE(t,n,a,l)}function ih(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ni(t,n){var a=t.alternate;return a===null?(a=mn(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Bm(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function $o(t,n,a,l,c,f){var g=0;if(l=t,typeof t=="function")ih(t)&&(g=1);else if(typeof t=="string")g=aT(t,a,st.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case C:return t=mn(31,a,n,c),t.elementType=C,t.lanes=f,t;case et:return os(a.children,c,f,n);case nt:g=8,c|=24;break;case yt:return t=mn(12,a,n,c|2),t.elementType=yt,t.lanes=f,t;case Zt:return t=mn(13,a,n,c),t.elementType=Zt,t.lanes=f,t;case Lt:return t=mn(19,a,n,c),t.elementType=Lt,t.lanes=f,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case _t:g=10;break t;case Tt:g=9;break t;case Xt:g=11;break t;case N:g=14;break t;case S:g=16,l=null;break t}g=29,a=Error(r(130,t===null?"null":typeof t,"")),l=null}return n=mn(g,a,n,c),n.elementType=t,n.type=l,n.lanes=f,n}function os(t,n,a,l){return t=mn(7,t,l,n),t.lanes=a,t}function ah(t,n,a){return t=mn(6,t,null,n),t.lanes=a,t}function km(t){var n=mn(18,null,null,0);return n.stateNode=t,n}function sh(t,n,a){return n=mn(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var qm=new WeakMap;function Cn(t,n){if(typeof t=="object"&&t!==null){var a=qm.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Hr(n)},qm.set(t,n),n)}return{value:t,source:n,stack:Hr(n)}}var Js=[],Ws=0,Jo=null,dl=0,xn=[],Nn=0,la=null,gi=1,pi="";function Ii(t,n){Js[Ws++]=dl,Js[Ws++]=Jo,Jo=t,dl=n}function Hm(t,n,a){xn[Nn++]=gi,xn[Nn++]=pi,xn[Nn++]=la,la=t;var l=gi;t=pi;var c=32-ue(l)-1;l&=~(1<<c),a+=1;var f=32-ue(n)+c;if(30<f){var g=c-c%5;f=(l&(1<<g)-1).toString(32),l>>=g,c-=g,gi=1<<32-ue(n)+c|a<<c|l,pi=f+t}else gi=1<<f|a<<c|l,pi=t}function rh(t){t.return!==null&&(Ii(t,1),Hm(t,1,0))}function lh(t){for(;t===Jo;)Jo=Js[--Ws],Js[Ws]=null,dl=Js[--Ws],Js[Ws]=null;for(;t===la;)la=xn[--Nn],xn[Nn]=null,pi=xn[--Nn],xn[Nn]=null,gi=xn[--Nn],xn[Nn]=null}function Gm(t,n){xn[Nn++]=gi,xn[Nn++]=pi,xn[Nn++]=la,gi=n.id,pi=n.overflow,la=t}var Be=null,Wt=null,It=!1,oa=null,In=!1,oh=Error(r(519));function ua(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ml(Cn(n,t)),oh}function Fm(t){var n=t.stateNode,a=t.type,l=t.memoizedProps;switch(n[pe]=t,n[Ve]=l,a){case"dialog":wt("cancel",n),wt("close",n);break;case"iframe":case"object":case"embed":wt("load",n);break;case"video":case"audio":for(a=0;a<jl.length;a++)wt(jl[a],n);break;case"source":wt("error",n);break;case"img":case"image":case"link":wt("error",n),wt("load",n);break;case"details":wt("toggle",n);break;case"input":wt("invalid",n),Do(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":wt("invalid",n);break;case"textarea":wt("invalid",n),ta(n,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||oy(n.textContent,a)?(l.popover!=null&&(wt("beforetoggle",n),wt("toggle",n)),l.onScroll!=null&&wt("scroll",n),l.onScrollEnd!=null&&wt("scrollend",n),l.onClick!=null&&(n.onclick=Bn),n=!0):n=!1,n||ua(t,!0)}function Qm(t){for(Be=t.return;Be;)switch(Be.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Be=Be.return}}function tr(t){if(t!==Be)return!1;if(!It)return Qm(t),It=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Cf(t.type,t.memoizedProps)),a=!a),a&&Wt&&ua(t),Qm(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Wt=yy(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Wt=yy(t)}else n===27?(n=Wt,Aa(t.type)?(t=Vf,Vf=null,Wt=t):Wt=n):Wt=Be?Vn(t.stateNode.nextSibling):null;return!0}function us(){Wt=Be=null,It=!1}function uh(){var t=oa;return t!==null&&(on===null?on=t:on.push.apply(on,t),oa=null),t}function ml(t){oa===null?oa=[t]:oa.push(t)}var ch=V(null),cs=null,Di=null;function ca(t,n,a){tt(ch,n._currentValue),n._currentValue=a}function Vi(t){t._currentValue=ch.current,K(ch)}function hh(t,n,a){for(;t!==null;){var l=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),t===a)break;t=t.return}}function fh(t,n,a,l){var c=t.child;for(c!==null&&(c.return=t);c!==null;){var f=c.dependencies;if(f!==null){var g=c.child;f=f.firstContext;t:for(;f!==null;){var E=f;f=c;for(var R=0;R<n.length;R++)if(E.context===n[R]){f.lanes|=a,E=f.alternate,E!==null&&(E.lanes|=a),hh(f.return,a,t),l||(g=null);break t}f=E.next}}else if(c.tag===18){if(g=c.return,g===null)throw Error(r(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),hh(g,a,t),g=null}else g=c.child;if(g!==null)g.return=c;else for(g=c;g!==null;){if(g===t){g=null;break}if(c=g.sibling,c!==null){c.return=g.return,g=c;break}g=g.return}c=g}}function er(t,n,a,l){t=null;for(var c=n,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var g=c.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var E=c.type;dn(c.pendingProps.value,g.value)||(t!==null?t.push(E):t=[E])}}else if(c===Dt.current){if(g=c.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(t!==null?t.push(kl):t=[kl])}c=c.return}t!==null&&fh(n,t,a,l),n.flags|=262144}function Wo(t){for(t=t.firstContext;t!==null;){if(!dn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function hs(t){cs=t,Di=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ke(t){return Ym(cs,t)}function tu(t,n){return cs===null&&hs(t),Ym(t,n)}function Ym(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Di===null){if(t===null)throw Error(r(308));Di=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else Di=Di.next=n;return a}var t1=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},e1=s.unstable_scheduleCallback,n1=s.unstable_NormalPriority,ve={$$typeof:_t,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dh(){return{controller:new t1,data:new Map,refCount:0}}function gl(t){t.refCount--,t.refCount===0&&e1(n1,function(){t.controller.abort()})}var pl=null,mh=0,nr=0,ir=null;function i1(t,n){if(pl===null){var a=pl=[];mh=0,nr=_f(),ir={status:"pending",value:void 0,then:function(l){a.push(l)}}}return mh++,n.then(Km,Km),n}function Km(){if(--mh===0&&pl!==null){ir!==null&&(ir.status="fulfilled");var t=pl;pl=null,nr=0,ir=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function a1(t,n){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return t.then(function(){l.status="fulfilled",l.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Xm=G.S;G.S=function(t,n){Vp=$e(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&i1(t,n),Xm!==null&&Xm(t,n)};var fs=V(null);function gh(){var t=fs.current;return t!==null?t:$t.pooledCache}function eu(t,n){n===null?tt(fs,fs.current):tt(fs,n.pool)}function Zm(){var t=gh();return t===null?null:{parent:ve._currentValue,pool:t}}var ar=Error(r(460)),ph=Error(r(474)),nu=Error(r(542)),iu={then:function(){}};function $m(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Jm(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(Bn,Bn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,tg(t),t;default:if(typeof n.status=="string")n.then(Bn,Bn);else{if(t=$t,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=n,t.status="pending",t.then(function(l){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=l}},function(l){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,tg(t),t}throw ms=n,ar}}function ds(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ms=a,ar):a}}var ms=null;function Wm(){if(ms===null)throw Error(r(459));var t=ms;return ms=null,t}function tg(t){if(t===ar||t===nu)throw Error(r(483))}var sr=null,yl=0;function au(t){var n=yl;return yl+=1,sr===null&&(sr=[]),Jm(sr,t,n)}function _l(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function su(t,n){throw n.$$typeof===O?Error(r(525)):(t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function eg(t){function n(z,I){if(t){var U=z.deletions;U===null?(z.deletions=[I],z.flags|=16):U.push(I)}}function a(z,I){if(!t)return null;for(;I!==null;)n(z,I),I=I.sibling;return null}function l(z){for(var I=new Map;z!==null;)z.key!==null?I.set(z.key,z):I.set(z.index,z),z=z.sibling;return I}function c(z,I){return z=Ni(z,I),z.index=0,z.sibling=null,z}function f(z,I,U){return z.index=U,t?(U=z.alternate,U!==null?(U=U.index,U<I?(z.flags|=67108866,I):U):(z.flags|=67108866,I)):(z.flags|=1048576,I)}function g(z){return t&&z.alternate===null&&(z.flags|=67108866),z}function E(z,I,U,F){return I===null||I.tag!==6?(I=ah(U,z.mode,F),I.return=z,I):(I=c(I,U),I.return=z,I)}function R(z,I,U,F){var ot=U.type;return ot===et?H(z,I,U.props.children,F,U.key):I!==null&&(I.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===S&&ds(ot)===I.type)?(I=c(I,U.props),_l(I,U),I.return=z,I):(I=$o(U.type,U.key,U.props,null,z.mode,F),_l(I,U),I.return=z,I)}function P(z,I,U,F){return I===null||I.tag!==4||I.stateNode.containerInfo!==U.containerInfo||I.stateNode.implementation!==U.implementation?(I=sh(U,z.mode,F),I.return=z,I):(I=c(I,U.children||[]),I.return=z,I)}function H(z,I,U,F,ot){return I===null||I.tag!==7?(I=os(U,z.mode,F,ot),I.return=z,I):(I=c(I,U),I.return=z,I)}function Y(z,I,U){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=ah(""+I,z.mode,U),I.return=z,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Q:return U=$o(I.type,I.key,I.props,null,z.mode,U),_l(U,I),U.return=z,U;case J:return I=sh(I,z.mode,U),I.return=z,I;case S:return I=ds(I),Y(z,I,U)}if(Ce(I)||j(I))return I=os(I,z.mode,U,null),I.return=z,I;if(typeof I.then=="function")return Y(z,au(I),U);if(I.$$typeof===_t)return Y(z,tu(z,I),U);su(z,I)}return null}function B(z,I,U,F){var ot=I!==null?I.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ot!==null?null:E(z,I,""+U,F);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case Q:return U.key===ot?R(z,I,U,F):null;case J:return U.key===ot?P(z,I,U,F):null;case S:return U=ds(U),B(z,I,U,F)}if(Ce(U)||j(U))return ot!==null?null:H(z,I,U,F,null);if(typeof U.then=="function")return B(z,I,au(U),F);if(U.$$typeof===_t)return B(z,I,tu(z,U),F);su(z,U)}return null}function q(z,I,U,F,ot){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return z=z.get(U)||null,E(I,z,""+F,ot);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case Q:return z=z.get(F.key===null?U:F.key)||null,R(I,z,F,ot);case J:return z=z.get(F.key===null?U:F.key)||null,P(I,z,F,ot);case S:return F=ds(F),q(z,I,U,F,ot)}if(Ce(F)||j(F))return z=z.get(U)||null,H(I,z,F,ot,null);if(typeof F.then=="function")return q(z,I,U,au(F),ot);if(F.$$typeof===_t)return q(z,I,U,tu(I,F),ot);su(I,F)}return null}function rt(z,I,U,F){for(var ot=null,zt=null,lt=I,At=I=0,Ct=null;lt!==null&&At<U.length;At++){lt.index>At?(Ct=lt,lt=null):Ct=lt.sibling;var jt=B(z,lt,U[At],F);if(jt===null){lt===null&&(lt=Ct);break}t&&lt&&jt.alternate===null&&n(z,lt),I=f(jt,I,At),zt===null?ot=jt:zt.sibling=jt,zt=jt,lt=Ct}if(At===U.length)return a(z,lt),It&&Ii(z,At),ot;if(lt===null){for(;At<U.length;At++)lt=Y(z,U[At],F),lt!==null&&(I=f(lt,I,At),zt===null?ot=lt:zt.sibling=lt,zt=lt);return It&&Ii(z,At),ot}for(lt=l(lt);At<U.length;At++)Ct=q(lt,z,At,U[At],F),Ct!==null&&(t&&Ct.alternate!==null&&lt.delete(Ct.key===null?At:Ct.key),I=f(Ct,I,At),zt===null?ot=Ct:zt.sibling=Ct,zt=Ct);return t&&lt.forEach(function(xa){return n(z,xa)}),It&&Ii(z,At),ot}function ht(z,I,U,F){if(U==null)throw Error(r(151));for(var ot=null,zt=null,lt=I,At=I=0,Ct=null,jt=U.next();lt!==null&&!jt.done;At++,jt=U.next()){lt.index>At?(Ct=lt,lt=null):Ct=lt.sibling;var xa=B(z,lt,jt.value,F);if(xa===null){lt===null&&(lt=Ct);break}t&&lt&&xa.alternate===null&&n(z,lt),I=f(xa,I,At),zt===null?ot=xa:zt.sibling=xa,zt=xa,lt=Ct}if(jt.done)return a(z,lt),It&&Ii(z,At),ot;if(lt===null){for(;!jt.done;At++,jt=U.next())jt=Y(z,jt.value,F),jt!==null&&(I=f(jt,I,At),zt===null?ot=jt:zt.sibling=jt,zt=jt);return It&&Ii(z,At),ot}for(lt=l(lt);!jt.done;At++,jt=U.next())jt=q(lt,z,At,jt.value,F),jt!==null&&(t&&jt.alternate!==null&&lt.delete(jt.key===null?At:jt.key),I=f(jt,I,At),zt===null?ot=jt:zt.sibling=jt,zt=jt);return t&&lt.forEach(function(gT){return n(z,gT)}),It&&Ii(z,At),ot}function Kt(z,I,U,F){if(typeof U=="object"&&U!==null&&U.type===et&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case Q:t:{for(var ot=U.key;I!==null;){if(I.key===ot){if(ot=U.type,ot===et){if(I.tag===7){a(z,I.sibling),F=c(I,U.props.children),F.return=z,z=F;break t}}else if(I.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===S&&ds(ot)===I.type){a(z,I.sibling),F=c(I,U.props),_l(F,U),F.return=z,z=F;break t}a(z,I);break}else n(z,I);I=I.sibling}U.type===et?(F=os(U.props.children,z.mode,F,U.key),F.return=z,z=F):(F=$o(U.type,U.key,U.props,null,z.mode,F),_l(F,U),F.return=z,z=F)}return g(z);case J:t:{for(ot=U.key;I!==null;){if(I.key===ot)if(I.tag===4&&I.stateNode.containerInfo===U.containerInfo&&I.stateNode.implementation===U.implementation){a(z,I.sibling),F=c(I,U.children||[]),F.return=z,z=F;break t}else{a(z,I);break}else n(z,I);I=I.sibling}F=sh(U,z.mode,F),F.return=z,z=F}return g(z);case S:return U=ds(U),Kt(z,I,U,F)}if(Ce(U))return rt(z,I,U,F);if(j(U)){if(ot=j(U),typeof ot!="function")throw Error(r(150));return U=ot.call(U),ht(z,I,U,F)}if(typeof U.then=="function")return Kt(z,I,au(U),F);if(U.$$typeof===_t)return Kt(z,I,tu(z,U),F);su(z,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,I!==null&&I.tag===6?(a(z,I.sibling),F=c(I,U),F.return=z,z=F):(a(z,I),F=ah(U,z.mode,F),F.return=z,z=F),g(z)):a(z,I)}return function(z,I,U,F){try{yl=0;var ot=Kt(z,I,U,F);return sr=null,ot}catch(lt){if(lt===ar||lt===nu)throw lt;var zt=mn(29,lt,null,z.mode);return zt.lanes=F,zt.return=z,zt}finally{}}}var gs=eg(!0),ng=eg(!1),ha=!1;function yh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _h(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function fa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function da(t,n,a){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Pt&2)!==0){var c=l.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),l.pending=n,n=Zo(t),Pm(t,null,a),n}return Xo(t,l,n,a),Zo(t)}function vl(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,Qr(t,a)}}function vh(t,n){var a=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?c=f=n:f=f.next=n}else c=f=n;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var Eh=!1;function El(){if(Eh){var t=ir;if(t!==null)throw t}}function Tl(t,n,a,l){Eh=!1;var c=t.updateQueue;ha=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var R=E,P=R.next;R.next=null,g===null?f=P:g.next=P,g=R;var H=t.alternate;H!==null&&(H=H.updateQueue,E=H.lastBaseUpdate,E!==g&&(E===null?H.firstBaseUpdate=P:E.next=P,H.lastBaseUpdate=R))}if(f!==null){var Y=c.baseState;g=0,H=P=R=null,E=f;do{var B=E.lane&-536870913,q=B!==E.lane;if(q?(Rt&B)===B:(l&B)===B){B!==0&&B===nr&&(Eh=!0),H!==null&&(H=H.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});t:{var rt=t,ht=E;B=n;var Kt=a;switch(ht.tag){case 1:if(rt=ht.payload,typeof rt=="function"){Y=rt.call(Kt,Y,B);break t}Y=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=ht.payload,B=typeof rt=="function"?rt.call(Kt,Y,B):rt,B==null)break t;Y=A({},Y,B);break t;case 2:ha=!0}}B=E.callback,B!==null&&(t.flags|=64,q&&(t.flags|=8192),q=c.callbacks,q===null?c.callbacks=[B]:q.push(B))}else q={lane:B,tag:E.tag,payload:E.payload,callback:E.callback,next:null},H===null?(P=H=q,R=Y):H=H.next=q,g|=B;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;q=E,E=q.next,q.next=null,c.lastBaseUpdate=q,c.shared.pending=null}}while(!0);H===null&&(R=Y),c.baseState=R,c.firstBaseUpdate=P,c.lastBaseUpdate=H,f===null&&(c.shared.lanes=0),_a|=g,t.lanes=g,t.memoizedState=Y}}function ig(t,n){if(typeof t!="function")throw Error(r(191,t));t.call(n)}function ag(t,n){var a=t.callbacks;
vendor: 4,975 bytes, line 48
48if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)ig(a[t],n)}var rr=V(null),ru=V(0);function sg(t,n){t=ki,tt(ru,t),tt(rr,n),ki=t|n.baseLanes}function Th(){tt(ru,ki),tt(rr,rr.current)}function bh(){ki=ru.current,K(rr),K(ru)}var gn=V(null),Dn=null;function ma(t){var n=t.alternate;tt(he,he.current&1),tt(gn,t),Dn===null&&(n===null||rr.current!==null||n.memoizedState!==null)&&(Dn=t)}function Ah(t){tt(he,he.current),tt(gn,t),Dn===null&&(Dn=t)}function rg(t){t.tag===22?(tt(he,he.current),tt(gn,t),Dn===null&&(Dn=t)):ga()}function ga(){tt(he,he.current),tt(gn,gn.current)}function pn(t){K(gn),Dn===t&&(Dn=null),K(he)}var he=V(0);function lu(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||If(a)||Df(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Oi=0,Et=null,Qt=null,Ee=null,ou=!1,lr=!1,ps=!1,uu=0,bl=0,or=null,s1=0;function le(){throw Error(r(321))}function Sh(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!dn(t[a],n[a]))return!1;return!0}function wh(t,n,a,l,c,f){return Oi=f,Et=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,G.H=t===null||t.memoizedState===null?Hg:Bh,ps=!1,f=a(l,c),ps=!1,lr&&(f=og(n,a,l,c)),lg(t),f}function lg(t){G.H=wl;var n=Qt!==null&&Qt.next!==null;if(Oi=0,Ee=Qt=Et=null,ou=!1,bl=0,or=null,n)throw Error(r(300));t===null||Te||(t=t.dependencies,t!==null&&Wo(t)&&(Te=!0))}function og(t,n,a,l){Et=t;var c=0;do{if(lr&&(or=null),bl=0,lr=!1,25<=c)throw Error(r(301));if(c+=1,Ee=Qt=null,t.updateQueue!=null){var f=t.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}G.H=Gg,f=n(a,l)}while(lr);return f}function r1(){var t=G.H,n=t.useState()[0];return n=typeof n.then=="function"?Al(n):n,t=t.useState()[0],(Qt!==null?Qt.memoizedState:null)!==t&&(Et.flags|=1024),n}function Rh(){var t=uu!==0;return uu=0,t}function Ch(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function xh(t){if(ou){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}ou=!1}Oi=0,Ee=Qt=Et=null,lr=!1,bl=uu=0,or=null}function We(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?Et.memoizedState=Ee=t:Ee=Ee.next=t,Ee}function fe(){if(Qt===null){var t=Et.alternate;t=t!==null?t.memoizedState:null}else t=Qt.next;var n=Ee===null?Et.memoizedState:Ee.next;if(n!==null)Ee=n,Qt=t;else{if(t===null)throw Et.alternate===null?Error(r(467)):Error(r(310));Qt=t,t={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},Ee===null?Et.memoizedState=Ee=t:Ee=Ee.next=t}return Ee}function cu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Al(t){var n=bl;return bl+=1,or===null&&(or=[]),t=Jm(or,t,n),n=Et,(Ee===null?n.memoizedState:Ee.next)===null&&(n=n.alternate,G.H=n===null||n.memoizedState===null?Hg:Bh),t}function hu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Al(t);if(t.$$typeof===_t)return ke(t)}throw Error(r(438,String(t)))}function Nh(t){var n=null,a=Et.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=Et.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=cu(),Et.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),l=0;l<t;l++)a[l]=M;return n.index++,a}function Mi(t,n){return typeof n=="function"?n(t):n}function fu(t){var n=fe();return Ih(n,Qt,t)}function Ih(t,n,a){var l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var c=t.baseQueue,f=l.pending;if(f!==null){if(c!==null){var g=c.next;c.next=f.next,f.next=g}n.baseQueue=c=f,l.pending=null}if(f=t.baseState,c===null)t.memoizedState=f;else{n=c.next;var E=g=null,R=null,P=n,H=!1;do{var Y=P.lane&-536870913;if(Y!==P.lane?(Rt&Y)===Y:(Oi&Y)===Y){var B=P.revertLane;if(B===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),Y===nr&&(H=!0);else if((Oi&B)===B){P=P.next,B===nr&&(H=!0);continue}else Y={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},R===null?(E=R=Y,g=f):R=R.next=Y,Et.lanes|=B,_a|=B;Y=P.action,ps&&a(f,Y),f=P.hasEagerState?P.eagerState:a(f,Y)}else B={lane:Y,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},R===null?(E=R=B,g=f):R=R.next=B,Et.lanes|=Y,_a|=Y;P=P.next}
vendor: 11,744 bytes, line 48
48while(P!==null&&P!==n);if(R===null?g=f:R.next=E,!dn(f,t.memoizedState)&&(Te=!0,H&&(a=ir,a!==null)))throw a;t.memoizedState=f,t.baseState=g,t.baseQueue=R,l.lastRenderedState=f}return c===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Dh(t){var n=fe(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=t;var l=a.dispatch,c=a.pending,f=n.memoizedState;if(c!==null){a.pending=null;var g=c=c.next;do f=t(f,g.action),g=g.next;while(g!==c);dn(f,n.memoizedState)||(Te=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function ug(t,n,a){var l=Et,c=fe(),f=It;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=n();var g=!dn((Qt||c).memoizedState,a);if(g&&(c.memoizedState=a,Te=!0),c=c.queue,Mh(fg.bind(null,l,c,t),[t]),c.getSnapshot!==n||g||Ee!==null&&Ee.memoizedState.tag&1){if(l.flags|=2048,ur(9,{destroy:void 0},hg.bind(null,l,c,a,n),null),$t===null)throw Error(r(349));f||(Oi&127)!==0||cg(l,n,a)}return a}function cg(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Et.updateQueue,n===null?(n=cu(),Et.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function hg(t,n,a,l){n.value=a,n.getSnapshot=l,dg(n)&&mg(t)}function fg(t,n,a){return a(function(){dg(n)&&mg(t)})}function dg(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!dn(t,a)}catch{return!0}}function mg(t){var n=ls(t,2);n!==null&&un(n,t,2)}function Vh(t){var n=We();if(typeof t=="function"){var a=t;if(t=a(),ps){Tn(!0);try{a()}finally{Tn(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:t},n}function gg(t,n,a,l){return t.baseState=a,Ih(t,Qt,typeof l=="function"?l:Mi)}function l1(t,n,a,l,c){if(gu(t))throw Error(r(485));if(t=n.action,t!==null){var f={payload:c,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};G.T!==null?a(!0):f.isTransition=!1,l(f),a=n.pending,a===null?(f.next=n.pending=f,pg(n,f)):(f.next=a.next,n.pending=a.next=f)}}function pg(t,n){var a=n.action,l=n.payload,c=t.state;if(n.isTransition){var f=G.T,g={};G.T=g;try{var E=a(c,l),R=G.S;R!==null&&R(g,E),yg(t,n,E)}catch(P){Oh(t,n,P)}finally{f!==null&&g.types!==null&&(f.types=g.types),G.T=f}}else try{f=a(c,l),yg(t,n,f)}catch(P){Oh(t,n,P)}}function yg(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){_g(t,n,l)},function(l){return Oh(t,n,l)}):_g(t,n,a)}function _g(t,n,a){n.status="fulfilled",n.value=a,vg(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,pg(t,a)))}function Oh(t,n,a){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,vg(n),n=n.next;while(n!==l)}t.action=null}function vg(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function Eg(t,n){return n}function Tg(t,n){if(It){var a=$t.formState;if(a!==null){t:{var l=Et;if(It){if(Wt){e:{for(var c=Wt,f=In;c.nodeType!==8;){if(!f){c=null;break e}if(c=Vn(c.nextSibling),c===null){c=null;break e}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){Wt=Vn(c.nextSibling),l=c.data==="F!";break t}}ua(l)}l=!1}l&&(n=a[0])}}return a=We(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eg,lastRenderedState:n},a.queue=l,a=Bg.bind(null,Et,l),l.dispatch=a,l=Vh(!1),f=Ph.bind(null,Et,!1,l.queue),l=We(),c={state:n,dispatch:null,action:t,pending:null},l.queue=c,a=l1.bind(null,Et,c,f,a),c.dispatch=a,l.memoizedState=t,[n,a,!1]}function bg(t){var n=fe();return Ag(n,Qt,t)}function Ag(t,n,a){if(n=Ih(t,n,Eg)[0],t=fu(Mi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Al(n)}catch(g){throw g===ar?nu:g}else l=n;n=fe();var c=n.queue,f=c.dispatch;return a!==n.memoizedState&&(Et.flags|=2048,ur(9,{destroy:void 0},o1.bind(null,c,a),null)),[l,f,t]}function o1(t,n){t.action=n}function Sg(t){var n=fe(),a=Qt;if(a!==null)return Ag(n,a,t);fe(),n=n.memoizedState,a=fe();var l=a.queue.dispatch;return a.memoizedState=t,[n,l,!1]}function ur(t,n,a,l){return t={tag:t,create:a,deps:l,inst:n,next:null},n=Et.updateQueue,n===null&&(n=cu(),Et.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(l=a.next,a.next=t,t.next=l,n.lastEffect=t),t}function wg(){return fe().memoizedState}function du(t,n,a,l){var c=We();Et.flags|=t,c.memoizedState=ur(1|n,{destroy:void 0},a,l===void 0?null:l)}function mu(t,n,a,l){var c=fe();l=l===void 0?null:l;var f=c.memoizedState.inst;Qt!==null&&l!==null&&Sh(l,Qt.memoizedState.deps)?c.memoizedState=ur(n,f,a,l):(Et.flags|=t,c.memoizedState=ur(1|n,f,a,l))}function Rg(t,n){du(8390656,8,t,n)}function Mh(t,n){mu(2048,8,t,n)}function u1(t){Et.flags|=4;var n=Et.updateQueue;if(n===null)n=cu(),Et.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function Cg(t){var n=fe().memoizedState;return u1({ref:n,nextImpl:t}),function(){if((Pt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function xg(t,n){return mu(4,2,t,n)}function Ng(t,n){return mu(4,4,t,n)}function Ig(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Dg(t,n,a){a=a!=null?a.concat([t]):null,mu(4,4,Ig.bind(null,n,t),a)}function zh(){}function Vg(t,n){var a=fe();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&Sh(n,l[1])?l[0]:(a.memoizedState=[t,n],t)}function Og(t,n){var a=fe();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&Sh(n,l[1]))return l[0];if(l=t(),ps){Tn(!0);try{t()}finally{Tn(!1)}}return a.memoizedState=[l,n],l}function jh(t,n,a){return a===void 0||(Oi&1073741824)!==0&&(Rt&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=Mp(),Et.lanes|=t,_a|=t,a)}function Mg(t,n,a,l){return dn(a,n)?a:rr.current!==null?(t=jh(t,a,l),dn(t,n)||(Te=!0),t):(Oi&42)===0||(Oi&1073741824)!==0&&(Rt&261930)===0?(Te=!0,t.memoizedState=a):(t=Mp(),Et.lanes|=t,_a|=t,n)}function zg(t,n,a,l,c){var f=W.p;W.p=f!==0&&8>f?f:8;var g=G.T,E={};G.T=E,Ph(t,!1,n,a);try{var R=c(),P=G.S;if(P!==null&&P(E,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var H=a1(R,l);Sl(t,n,H,vn(t))}else Sl(t,n,l,vn(t))}catch(Y){Sl(t,n,{then:function(){},status:"rejected",reason:Y},vn())}finally{W.p=f,g!==null&&E.types!==null&&(g.types=E.types),G.T=g}}function c1(){}function Lh(t,n,a,l){if(t.tag!==5)throw Error(r(476));var c=jg(t).queue;zg(t,c,n,ct,a===null?c1:function(){return Lg(t),a(l)})}function jg(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:ct,baseState:ct,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:ct},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Lg(t){var n=jg(t);n.next===null&&(n=t.alternate.memoizedState),Sl(t,n.next.queue,{},vn())}function Uh(){return ke(kl)}function Ug(){return fe().memoizedState}function Pg(){return fe().memoizedState}function h1(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=vn();t=fa(a);var l=da(n,t,a);l!==null&&(un(l,n,a),vl(l,n,a)),n={cache:dh()},t.payload=n;return}n=n.return}}function f1(t,n,a){var l=vn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},gu(t)?kg(n,a):(a=nh(t,n,a,l),a!==null&&(un(a,t,l),qg(a,n,l)))}function Bg(t,n,a){var l=vn();Sl(t,n,a,l)}function Sl(t,n,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(gu(t))kg(n,c);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var g=n.lastRenderedState,E=f(g,a);if(c.hasEagerState=!0,c.eagerState=E,dn(E,g))return Xo(t,n,c,0),$t===null&&Ko(),!1}catch{}finally{}if(a=nh(t,n,c,l),a!==null)return un(a,t,l),qg(a,n,l),!0}return!1}function Ph(t,n,a,l){if(l={lane:2,revertLane:_f(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gu(t)){if(n)throw Error(r(479))}else n=nh(t,a,l,2),n!==null&&un(n,t,2)}function gu(t){var n=t.alternate;return t===Et||n!==null&&n===Et}function kg(t,n){lr=ou=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function qg(t,n,a){if((a&4194048)!==0){var l=n.lanes;l&=t.pendingLanes,a|=l,n.lanes=a,Qr(t,a)}}var wl={readContext:ke,use:hu,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useLayoutEffect:le,useInsertionEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useSyncExternalStore:le,useId:le,useHostTransitionStatus:le,useFormState:le,useActionState:le,useOptimistic:le,useMemoCache:le,useCacheRefresh:le};wl.useEffectEvent=le;var Hg={readContext:ke,use:hu,useCallback:function(t,n){return We().memoizedState=[t,n===void 0?null:n],t},useContext:ke,useEffect:Rg,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,du(4194308,4,Ig.bind(null,n,t),a)},useLayoutEffect:function(t,n){return du(4194308,4,t,n)},useInsertionEffect:function(t,n){du(4,2,t,n)},useMemo:function(t,n){var a=We();n=n===void 0?null:n;var l=t();if(ps){Tn(!0);try{t()}finally{Tn(!1)}}return a.memoizedState=[l,n],l},useReducer:function(t,n,a){var l=We();if(a!==void 0){var c=a(n);if(ps){Tn(!0);try{a(n)}finally{Tn(!1)}}}else c=n;return l.memoizedState=l.baseState=c,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:c},l.queue=t,t=t.dispatch=f1.bind(null,Et,t),[l.memoizedState,t]},useRef:function(t){var n=We();return t={current:t},n.memoizedState=t},useState:function(t){t=Vh(t);var n=t.queue,a=Bg.bind(null,Et,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:zh,useDeferredValue:function(t,n){var a=We();return jh(a,t,n)},useTransition:function(){var t=Vh(!1);return t=zg.bind(null,Et,t.queue,!0,!1),We().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var l=Et,c=We();if(It){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),$t===null)throw Error(r(349));(Rt&127)!==0||cg(l,n,a)}c.memoizedState=a;var f={value:a,getSnapshot:n};return c.queue=f,Rg(fg.bind(null,l,f,t),[t]),l.flags|=2048,ur(9,{destroy:void 0},hg.bind(null,l,f,a,n),null),a},useId:function(){var t=We(),n=$t.identifierPrefix;if(It){var a=pi,l=gi;a=(l&~(1<<32-ue(l)-1)).toString(32)+a,n="_"+n+"R_"+a,a=uu++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=s1++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Uh,useFormState:Tg,useActionState:Tg,useOptimistic:function(t){var n=We();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Ph.bind(null,Et,!0,a),a.dispatch=n,[t,n]},useMemoCache:Nh,useCacheRefresh:function(){return We().memoizedState=h1.bind(null,Et)},useEffectEvent:function(t){var n=We(),a={impl:t};return n.memoizedState=a,function(){if((Pt&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Bh={readContext:ke,use:hu,useCallback:Vg,useContext:ke,useEffect:Mh,useImperativeHandle:Dg,useInsertionEffect:xg,useLayoutEffect:Ng,useMemo:Og,useReducer:fu,useRef:wg,useState:function(){return fu(Mi)},useDebugValue:zh,useDeferredValue:function(t,n){var a=fe();return Mg(a,Qt.memoizedState,t,n)},useTransition:function(){var t=fu(Mi)[0],n=fe().memoizedState;return[typeof t=="boolean"?t:Al(t),n]},useSyncExternalStore:ug,useId:Ug,useHostTransitionStatus:Uh,useFormState:bg,useActionState:bg,useOptimistic:function(t,n){var a=fe();return gg(a,Qt,t,n)},useMemoCache:Nh,useCacheRefresh:Pg};Bh.useEffectEvent=Cg;var Gg={readContext:ke,use:hu,useCallback:Vg,useContext:ke,useEffect:Mh,useImperativeHandle:Dg,useInsertionEffect:xg,useLayoutEffect:Ng,useMemo:Og,useReducer:Dh,useRef
vendor: 13,739 bytes, line 48
48:wg,useState:function(){return Dh(Mi)},useDebugValue:zh,useDeferredValue:function(t,n){var a=fe();return Qt===null?jh(a,t,n):Mg(a,Qt.memoizedState,t,n)},useTransition:function(){var t=Dh(Mi)[0],n=fe().memoizedState;return[typeof t=="boolean"?t:Al(t),n]},useSyncExternalStore:ug,useId:Ug,useHostTransitionStatus:Uh,useFormState:Sg,useActionState:Sg,useOptimistic:function(t,n){var a=fe();return Qt!==null?gg(a,Qt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Nh,useCacheRefresh:Pg};Gg.useEffectEvent=Cg;function kh(t,n,a,l){n=t.memoizedState,a=a(l,n),a=a==null?n:A({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var qh={enqueueSetState:function(t,n,a){t=t._reactInternals;var l=vn(),c=fa(l);c.payload=n,a!=null&&(c.callback=a),n=da(t,c,l),n!==null&&(un(n,t,l),vl(n,t,l))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var l=vn(),c=fa(l);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=da(t,c,l),n!==null&&(un(n,t,l),vl(n,t,l))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=vn(),l=fa(a);l.tag=2,n!=null&&(l.callback=n),n=da(t,l,a),n!==null&&(un(n,t,a),vl(n,t,a))}};function Fg(t,n,a,l,c,f,g){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,f,g):n.prototype&&n.prototype.isPureReactComponent?!hl(a,l)||!hl(c,f):!0}function Qg(t,n,a,l){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==t&&qh.enqueueReplaceState(n,n.state,null)}function ys(t,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(t=t.defaultProps){a===n&&(a=A({},a));for(var c in t)a[c]===void 0&&(a[c]=t[c])}return a}function Yg(t){Yo(t)}function Kg(t){console.error(t)}function Xg(t){Yo(t)}function pu(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Zg(t,n,a){try{var l=t.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Hh(t,n,a){return a=fa(a),a.tag=3,a.payload={element:null},a.callback=function(){pu(t,n)},a}function $g(t){return t=fa(t),t.tag=3,t}function Jg(t,n,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;t.payload=function(){return c(f)},t.callback=function(){Zg(n,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(t.callback=function(){Zg(n,a,l),typeof c!="function"&&(va===null?va=new Set([this]):va.add(this));var E=l.stack;this.componentDidCatch(l.value,{componentStack:E!==null?E:""})})}function d1(t,n,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&er(n,a,c,!0),a=gn.current,a!==null){switch(a.tag){case 31:case 13:return Dn===null?xu():a.alternate===null&&oe===0&&(oe=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===iu?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),gf(t,l,c)),!1;case 22:return a.flags|=65536,l===iu?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),gf(t,l,c)),!1}throw Error(r(435,a.tag))}return gf(t,l,c),xu(),!1}if(It)return n=gn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,l!==oh&&(t=Error(r(422),{cause:l}),ml(Cn(t,a)))):(l!==oh&&(n=Error(r(423),{cause:l}),ml(Cn(n,a))),t=t.current.alternate,t.flags|=65536,c&=-c,t.lanes|=c,l=Cn(l,a),c=Hh(t.stateNode,l,c),vh(t,c),oe!==4&&(oe=2)),!1;var f=Error(r(520),{cause:l});if(f=Cn(f,a),Ol===null?Ol=[f]:Ol.push(f),oe!==4&&(oe=2),n===null)return!0;l=Cn(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=c&-c,a.lanes|=t,t=Hh(a.stateNode,l,t),vh(a,t),!1;case 1:if(n=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(va===null||!va.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=$g(c),Jg(c,t,a,l),vh(a,c),!1}a=a.return}while(a!==null);return!1}var Gh=Error(r(461)),Te=!1;function qe(t,n,a,l){n.child=t===null?ng(n,null,a,l):gs(n,t.child,a,l)}function Wg(t,n,a,l,c){a=a.render;var f=n.ref;if("ref"in l){var g={};for(var E in l)E!=="ref"&&(g[E]=l[E])}else g=l;return hs(n),l=wh(t,n,a,g,f,c),E=Rh(),t!==null&&!Te?(Ch(t,n,c),zi(t,n,c)):(It&&E&&rh(n),n.flags|=1,qe(t,n,l,c),n.child)}function tp(t,n,a,l,c){if(t===null){var f=a.type;return typeof f=="function"&&!ih(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,ep(t,n,f,l,c)):(t=$o(a.type,null,l,n,n.mode,c),t.ref=n.ref,t.return=n,n.child=t)}if(f=t.child,!Jh(t,c)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:hl,a(g,l)&&t.ref===n.ref)return zi(t,n,c)}return n.flags|=1,t=Ni(f,l),t.ref=n.ref,t.return=n,n.child=t}function ep(t,n,a,l,c){if(t!==null){var f=t.memoizedProps;if(hl(f,l)&&t.ref===n.ref)if(Te=!1,n.pendingProps=l=f,Jh(t,c))(t.flags&131072)!==0&&(Te=!0);else return n.lanes=t.lanes,zi(t,n,c)}return Fh(t,n,a,l,c)}function np(t,n,a,l){var c=l.children,f=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,t!==null){for(l=n.child=t.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,n.child=null;return ip(t,n,f,a,l)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&eu(n,f!==null?f.cachePool:null),f!==null?sg(n,f):Th(),rg(n);else return l=n.lanes=536870912,ip(t,n,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(eu(n,f.cachePool),sg(n,f),ga(),n.memoizedState=null):(t!==null&&eu(n,null),Th(),ga());return qe(t,n,c,a),n.child}function Rl(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ip(t,n,a,l,c){var f=gh();return f=f===null?null:{parent:ve._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},t!==null&&eu(n,null),Th(),rg(n),t!==null&&er(t,n,l,!0),n.childLanes=c,null}function yu(t,n){return n=vu({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function ap(t,n,a){return gs(n,t.child,null,a),t=yu(n,n.pendingProps),t.flags|=2,pn(n),n.memoizedState=null,t}function m1(t,n,a){var l=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(It){if(l.mode==="hidden")return t=yu(n,l),n.lanes=536870912,Rl(null,t);if(Ah(n),(t=Wt)?(t=py(t,In),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:la!==null?{id:gi,overflow:pi}:null,retryLane:536870912,hydrationErrors:null},a=km(t),a.return=n,n.child=a,Be=n,Wt=null)):t=null,t===null)throw ua(n);return n.lanes=536870912,null}return yu(n,l)}var f=t.memoizedState;if(f!==null){var g=f.dehydrated;if(Ah(n),c)if(n.flags&256)n.flags&=-257,n=ap(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(r(558));else if(Te||er(t,n,a,!1),c=(a&t.childLanes)!==0,Te||c){if(l=$t,l!==null&&(g=Yr(l,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,ls(t,g),un(l,t,g),Gh;xu(),n=ap(t,n,a)}else t=f.treeContext,Wt=Vn(g.nextSibling),Be=n,It=!0,oa=null,In=!1,t!==null&&Gm(n,t),n=yu(n,l),n.flags|=4096;return n}return t=Ni(t.child,{mode:l.mode,children:l.children}),t.ref=n.ref,n.child=t,t.return=n,t}function _u(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function Fh(t,n,a,l,c){return hs(n),a=wh(t,n,a,l,void 0,c),l=Rh(),t!==null&&!Te?(Ch(t,n,c),zi(t,n,c)):(It&&l&&rh(n),n.flags|=1,qe(t,n,a,c),n.child)}function sp(t,n,a,l,c,f){return hs(n),n.updateQueue=null,a=og(n,l,a,c),lg(t),l=Rh(),t!==null&&!Te?(Ch(t,n,f),zi(t,n,f)):(It&&l&&rh(n),n.flags|=1,qe(t,n,a,f),n.child)}function rp(t,n,a,l,c){if(hs(n),n.stateNode===null){var f=$s,g=a.contextType;typeof g=="object"&&g!==null&&(f=ke(g)),f=new a(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=qh,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},yh(n),g=a.contextType,f.context=typeof g=="object"&&g!==null?ke(g):$s,f.state=n.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(kh(n,a,g,l),f.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&qh.enqueueReplaceState(f,f.state,null),Tl(n,l,f,c),El(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(t===null){f=n.stateNode;var E=n.memoizedProps,R=ys(a,E);f.props=R;var P=f.context,H=a.contextType;g=$s,typeof H=="object"&&H!==null&&(g=ke(H));var Y=a.getDerivedStateFromProps;H=typeof Y=="function"||typeof f.getSnapshotBeforeUpdate=="function",E=n.pendingProps!==E,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(E||P!==g)&&Qg(n,f,l,g),ha=!1;var B=n.memoizedState;f.state=B,Tl(n,l,f,c),El(),P=n.memoizedState,E||B!==P||ha?(typeof Y=="function"&&(kh(n,a,Y,l),P=n.memoizedState),(R=ha||Fg(n,a,R,l,B,P,g))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=P),f.props=l,f.state=P,f.context=g,l=R):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,_h(t,n),g=n.memoizedProps,H=ys(a,g),f.props=H,Y=n.pendingProps,B=f.context,P=a.contextType,R=$s,typeof P=="object"&&P!==null&&(R=ke(P)),E=a.getDerivedStateFromProps,(P=typeof E=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==Y||B!==R)&&Qg(n,f,l,R),ha=!1,B=n.memoizedState,f.state=B,Tl(n,l,f,c),El();var q=n.memoizedState;g!==Y||B!==q||ha||t!==null&&t.dependencies!==null&&Wo(t.dependencies)?(typeof E=="function"&&(kh(n,a,E,l),q=n.memoizedState),(H=ha||Fg(n,a,H,l,B,q,R)||t!==null&&t.dependencies!==null&&Wo(t.dependencies))?(P||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,q,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,q,R)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===t.memoizedProps&&B===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&B===t.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=q),f.props=l,f.state=q,f.context=R,l=H):(typeof f.componentDidUpdate!="function"||g===t.memoizedProps&&B===t.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===t.memoizedProps&&B===t.memoizedState||(n.flags|=1024),l=!1)}return f=l,_u(t,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,t!==null&&l?(n.child=gs(n,t.child,null,c),n.child=gs(n,null,a,c)):qe(t,n,a,c),n.memoizedState=f.state,t=n.child):t=zi(t,n,c),t}function lp(t,n,a,l){return us(),n.flags|=256,qe(t,n,a,l),n.child}var Qh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yh(t){return{baseLanes:t,cachePool:Zm()}}function Kh(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=_n),t}function op(t,n,a){var l=n.pendingProps,c=!1,f=(n.flags&128)!==0,g;if((g=f)||(g=t!==null&&t.memoizedState===null?!1:(he.current&2)!==0),g&&(c=!0,n.flags&=-129),g=(n.flags&32)!==0,n.flags&=-33,t===null){if(It){if(c?ma(n):ga(),(t=Wt)?(t=py(t,In),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:la!==null?{id:gi,overflow:pi}:null,retryLane:536870912,hydrationErrors:null},a=km(t),a.return=n,n.child=a,Be=n,Wt=null)):t=null,t===null)throw ua(n);return Df(t)?n.lanes=32:n.lanes=536870912,null}var E=l.children;return l=l.fallback,c?(ga(),c=n.mode,E=vu({mode:"hidden",children:E},c),l=os(l,c,a,null),E.return=n,l.return=n,E.sibling=l,n.child=E,l=n.child,l.memoizedState=Yh(a),l.childLanes=Kh(t,g,a),n.memoizedState=Qh,Rl(null,l)):(ma(n),Xh(n,E))}var R=t.memoizedState;if(R!==null&&(E=R.dehydrated,E!==null)){if(f)n.flags&256?(ma(n),n.flags&=-257,n=Zh(t,n,a)):n.memoizedState!==null?(ga(),n.child=t.child,n.flags|=128,n=null):(ga(),E=l.fallback,c=n.mode,l=vu({mode:"visible",children:l.children},c),E=os(E,c,a,null),E.flags|=2,l.return=n,E.return=n,l.sibling=E,n.child=l,gs(n,t.child,null,a),l=n.child,l.memoizedState=Yh(a),l.childLanes=Kh(t,g,a),n.memoizedState=Qh,n=Rl(null,l));else if(ma(n),Df(E)){if(g=E.nextSibling&&E.nextSibling.dataset,g)var P=g.dgst;g=P,l=Error(r(419)),l.stack="",l.digest=g,ml({value:l,source:null,stack:null}),n=Zh(t,n,a)}else if(Te||er(t,n,a,!1),g=(a&t.childLanes)!==0,Te||g){if(g=$t,g!==null&&(l=Yr(g,a),l!==0&&l!==R.retryLane))throw R.retryLane=l,ls(t,l),un(g,t,l),Gh;If(E)||xu(),n=Zh(t,n,a)}else If(E)?(n.flags|=192,n.child=t.child,n=null):(t=R.treeContext,Wt=Vn(E.nextSibling),Be=n,It=!0,oa=null,In=!1,t!==null&&Gm(n,t),n=Xh(n,l.children),n.flags|=4096);return n}
vendor: 7,010 bytes, line 48
48return c?(ga(),E=l.fallback,c=n.mode,R=t.child,P=R.sibling,l=Ni(R,{mode:"hidden",children:l.children}),l.subtreeFlags=R.subtreeFlags&65011712,P!==null?E=Ni(P,E):(E=os(E,c,a,null),E.flags|=2),E.return=n,l.return=n,l.sibling=E,n.child=l,Rl(null,l),l=n.child,E=t.child.memoizedState,E===null?E=Yh(a):(c=E.cachePool,c!==null?(R=ve._currentValue,c=c.parent!==R?{parent:R,pool:R}:c):c=Zm(),E={baseLanes:E.baseLanes|a,cachePool:c}),l.memoizedState=E,l.childLanes=Kh(t,g,a),n.memoizedState=Qh,Rl(t.child,l)):(ma(n),a=t.child,t=a.sibling,a=Ni(a,{mode:"visible",children:l.children}),a.return=n,a.sibling=null,t!==null&&(g=n.deletions,g===null?(n.deletions=[t],n.flags|=16):g.push(t)),n.child=a,n.memoizedState=null,a)}function Xh(t,n){return n=vu({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function vu(t,n){return t=mn(22,t,null,n),t.lanes=0,t}function Zh(t,n,a){return gs(n,t.child,null,a),t=Xh(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function up(t,n,a){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n),hh(t.return,n,a)}function $h(t,n,a,l,c,f){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:f}:(g.isBackwards=n,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=a,g.tailMode=c,g.treeForkCount=f)}function cp(t,n,a){var l=n.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var g=he.current,E=(g&2)!==0;if(E?(g=g&1|2,n.flags|=128):g&=1,tt(he,g),qe(t,n,l,a),l=It?dl:0,!E&&t!==null&&(t.flags&128)!==0)t:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&up(t,a,n);else if(t.tag===19)up(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break t;for(;t.sibling===null;){if(t.return===null||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)t=a.alternate,t!==null&&lu(t)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),$h(n,!1,c,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(t=c.alternate,t!==null&&lu(t)===null){n.child=c;break}t=c.sibling,c.sibling=a,a=c,c=t}$h(n,!0,a,null,f,l);break;case"together":$h(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function zi(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),_a|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(er(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(r(153));if(n.child!==null){for(t=n.child,a=Ni(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Ni(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function Jh(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Wo(t)))}function g1(t,n,a){switch(n.tag){case 3:xe(n,n.stateNode.containerInfo),ca(n,ve,t.memoizedState.cache),us();break;case 27:case 5:Ha(n);break;case 4:xe(n,n.stateNode.containerInfo);break;case 10:ca(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ah(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(ma(n),n.flags|=128,null):(a&n.child.childLanes)!==0?op(t,n,a):(ma(n),t=zi(t,n,a),t!==null?t.sibling:null);ma(n);break;case 19:var c=(t.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(er(t,n,a,!1),l=(a&n.childLanes)!==0),c){if(l)return cp(t,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),tt(he,he.current),l)break;return null;case 22:return n.lanes=0,np(t,n,a,n.pendingProps);case 24:ca(n,ve,t.memoizedState.cache)}return zi(t,n,a)}function hp(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)Te=!0;else{if(!Jh(t,a)&&(n.flags&128)===0)return Te=!1,g1(t,n,a);Te=(t.flags&131072)!==0}else Te=!1,It&&(n.flags&1048576)!==0&&Hm(n,dl,n.index);switch(n.lanes=0,n.tag){case 16:t:{var l=n.pendingProps;if(t=ds(n.elementType),n.type=t,typeof t=="function")ih(t)?(l=ys(t,l),n.tag=1,n=rp(null,n,t,l,a)):(n.tag=0,n=Fh(null,n,t,l,a));else{if(t!=null){var c=t.$$typeof;if(c===Xt){n.tag=11,n=Wg(null,n,t,l,a);break t}else if(c===N){n.tag=14,n=tp(null,n,t,l,a);break t}}throw n=ne(t)||t,Error(r(306,n,""))}}return n;case 0:return Fh(t,n,n.type,n.pendingProps,a);case 1:return l=n.type,c=ys(l,n.pendingProps),rp(t,n,l,c,a);case 3:t:{if(xe(n,n.stateNode.containerInfo),t===null)throw Error(r(387));l=n.pendingProps;var f=n.memoizedState;c=f.element,_h(t,n),Tl(n,l,null,a);var g=n.memoizedState;if(l=g.cache,ca(n,ve,l),l!==f.cache&&fh(n,[ve],a,!0),El(),l=g.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:g.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=lp(t,n,l,a);break t}else if(l!==c){c=Cn(Error(r(424)),n),ml(c),n=lp(t,n,l,a);break t}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Wt=Vn(t.firstChild),Be=n,It=!0,oa=null,In=!0,a=ng(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(us(),l===c){n=zi(t,n,a);break t}qe(t,n,l,a)}n=n.child}return n;case 26:return _u(t,n),t===null?(a=by(n.type,null,n.pendingProps,null))?n.memoizedState=a:It||(a=n.type,t=n.pendingProps,l=zu(bt.current).createElement(a),l[pe]=n,l[Ve]=t,He(l,a,t),ye(l),n.stateNode=l):n.memoizedState=by(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ha(n),t===null&&It&&(l=n.stateNode=vy(n.type,n.pendingProps,bt.current),Be=n,In=!0,c=Wt,Aa(n.type)?(Vf=c,Wt=Vn(l.firstChild)):Wt=c),qe(t,n,n.pendingProps.children,a),_u(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&It&&((c=l=Wt)&&(l=F1(l,n.type,n.pendingProps,In),l!==null?(n.stateNode=l,Be=n,Wt=Vn(l.firstChild),In=!1,c=!0):c=!1),c||ua(n)),Ha(n),c=n.type,f=n.pendingProps,g=t!==null?t.memoizedProps:null,l=f.children,Cf(c,f)?l=null:g!==null&&Cf(c,g)&&(n.flags|=32),n.memoizedState!==null&&(c=wh(t,n,r1,null,null,a),kl._currentValue=c),_u(t,n),qe(t,n,l,a),n.child;case 6:return t===null&&It&&((t=a=Wt)&&(a=Q1(a,n.pendingProps,In),a!==null?(n.stateNode=a,Be=n,Wt=null,t=!0):t=!1),t||ua(n)),null;case 13:return op(t,n,a);case 4:return xe(n,n.stateNode.containerInfo),l=n.pendingProps,t===null?n.child=gs(n,null,l,a):qe(t,n,l,a),n.child;case 11:return Wg(t,n,n.type,n.pendingProps,a);case 7:return qe(t,n,n.pendingProps,a),n.child;case 8:return qe(t,n,n.pendingProps.children,a),n.child;case 12:return qe(t,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,ca(n,n.type,l.value),qe(t,n,l.children,a),n.child;case 9:return c=n.type._context,l=n.pendingProps.children,hs(n),c=ke(c),l=l(c),n.flags|=1,qe(t,n,l,a),n.child;case 14:return tp(t,n,n.type,n.pendingProps,a);case 15:return ep(t,n,n.type,n.pendingProps,a);case 19:return cp(t,n,a);case 31:return m1(t,n,a);case 22:return np(t,n,a,n.pendingProps);case 24:return hs(n),l=ke(ve),t===null?(c=gh(),c===null&&(c=$t,f=dh(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),n.memoizedState={parent:l,cache:c}
vendor: 3,125 bytes, line 48
48,yh(n),ca(n,ve,c)):((t.lanes&a)!==0&&(_h(t,n),Tl(n,null,null,a),El()),c=t.memoizedState,f=n.memoizedState,c.parent!==l?(c={parent:l,cache:l},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),ca(n,ve,l)):(l=f.cache,ca(n,ve,l),l!==c.cache&&fh(n,[ve],a,!0))),qe(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function ji(t){t.flags|=4}function Wh(t,n,a,l,c){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(c&335544128)===c)if(t.stateNode.complete)t.flags|=8192;else if(Up())t.flags|=8192;else throw ms=iu,ph}else t.flags&=-16777217}function fp(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Cy(n))if(Up())t.flags|=8192;else throw ms=iu,ph}function Eu(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Ro():536870912,t.lanes|=n,dr|=n)}function Cl(t,n){if(!It)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function te(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,l=0;if(n)for(var c=t.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=t,c=c.sibling;else for(c=t.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=t,c=c.sibling;return t.subtreeFlags|=l,t.childLanes=a,n}function p1(t,n,a){var l=n.pendingProps;switch(lh(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return te(n),null;case 1:return te(n),null;case 3:return a=n.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Vi(ve),ie(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(tr(n)?ji(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,uh())),te(n),null;case 26:var c=n.type,f=n.memoizedState;return t===null?(ji(n),f!==null?(te(n),fp(n,f)):(te(n),Wh(n,c,null,l,a))):f?f!==t.memoizedState?(ji(n),te(n),fp(n,f)):(te(n),n.flags&=-16777217):(t=t.memoizedProps,t!==l&&ji(n),te(n),Wh(n,c,t,l,a)),null;case 27:if(Vs(n),a=bt.current,c=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&ji(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return te(n),null}t=st.current,tr(n)?Fm(n):(t=vy(c,l,a),n.stateNode=t,ji(n))}return te(n),null;case 5:if(Vs(n),c=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&ji(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return te(n),null}if(f=st.current,tr(n))Fm(n);else{var g=zu(bt.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>
48",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?g.createElement(c,{is:l.is}):g.createElement(c)}}f[pe]=n,f[Ve]=l;t:for(g=n.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===n)break t;for(;g.sibling===null;){if(g.return===null||g.return===n)break t;g=g.return}g.sibling.return=g.return,g=g.sibling}n.stateNode=f;t:switch(He(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&ji(n)}}return te(n),Wh(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==l&&ji(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(t=bt.current,tr(n)){if(t=n.stateNode,a=n.memoizedProps,l=null,c=Be,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}t[pe]=n,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||oy(t.nodeValue,a)),t||ua(n,!0)}else t=zu(t).createTextNode(l),t[pe]=n,n.stateNode=t}return te(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(l=tr(n),a!==null){if(t===null){if(!l)throw Error(r(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[pe]=n}else us(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;te(n),t=!1}else a=uh(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(pn(n),n):(pn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return te(n),null;case 13:if(l=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(c=tr(n),l!==null&&l.dehydrated!==null){if(t===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[pe]=n}else us(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;te(n),c=!1}else c=uh(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(pn(n),n):(pn(n),null)}return pn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=l!==null,t=t!==null&&t.memoizedState!==null,a&&(l=n.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Eu(n,n.updateQueue),te(n),null);case 4:return ie(),t===null&&bf(n.stateNode.containerInfo),te(n),null;case 10:return Vi(n.type),te(n),null;case 19:if(K(he),l=n.memoizedState,l===null)return te(n),null;if(c=(n.flags&128)!==0,f=l.rendering,f===null)if(c)Cl(l,!1);else{if(oe!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(f=lu(t),f!==null){for(n.flags|=128,Cl(l,!1),t=f.updateQueue,n.updateQueue=t,Eu(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Bm(a,t),a=a.sibling;return tt(he,he.current&1|2),It&&Ii(n,l.treeForkCount),n.child}t=t.sibling}l.tail!==null&&$e()>wu&&(n.flags|=128,c=!0,Cl(l,!1),n.lanes=4194304)}else{if(!c)if(t=lu(f),t!==null){if(n.flags|=128,c=!0,t=t.updateQueue,n.updateQueue=t,Eu(n,t),Cl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!It)return te(n),null}else 2*$e()-l.renderingStartTime>wu&&a!==536870912&&(n.flags|=128,c=!0,Cl(l,!1),n.lanes=4194304);l.isBackwards?(f.sibling=n.child,n.child=f):(t=l.last,t!==null?t.sibling=f:n.child=f,l.last=f)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=$e(),t.sibling=null,a=he.current,tt(he,c?a&1|2:a&1),It&&Ii(n,l.treeForkCount),t):(te(n),null);case 22:case 23:return pn(n),bh(),l=n.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(a&536870912)!==0&&(n.flags&128)===0&&(te(n),n.subtreeFlags&6&&(n.flags|=8192)):te(n),a=n.updateQueue,a!==null&&Eu(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),t!==null&&K(fs),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Vi(ve),te(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function y1(t,n){switch(lh(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Vi(ve),ie(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Vs(n),null;case 31:if(n.memoizedState!==null){if(pn(n),n.alternate===null)throw Error(r(340));us()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(pn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));us()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return K(he),null;case 4:return ie(),null;case 10:return Vi(n.type),null;case 22:case 23:return pn(n),bh(),t!==null&&K(fs),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Vi(ve),null;case 25:return null;default:return null}}function dp(t,n){switch(lh(n),n.tag){case 3:Vi(ve),ie();break;case 26:case 27:case 5:Vs(n);break;case 4:ie();break;case 31:n.memoizedState!==null&&pn(n);break;case 13:pn(n);break;case 19:K(he);break;case 10:Vi(n.type);break;case 22:case 23:pn(n),bh(),t!==null&&K(fs);break;case 24:Vi(ve)}}function xl(t,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&t)===t){l=void 0;var f=a.create,g=a.inst;l=f(),g.destroy=l}a=a.next}while(a!==c)}}catch(E){Gt(n,n.return,E)}}function pa(t,n,a){try{var l=n.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&t)===t){var g=l.inst,E=g.destroy;if(E!==void 0){g.destroy=void 0,c=n;var R=a,P=E;try{P()}catch(H){Gt(c,R,H)}}}l=l.next}while(l!==f)}}catch(H){Gt(n,n.return,H)}}function mp(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{ag(n,a)}catch(l){Gt(t,t.return,l)}}}function gp(t,n,a){a.props=ys(t.type,t.memoizedProps),a.state=t.memoizedState;
vendor: 18,568 bytes, line 48
48try{a.componentWillUnmount()}catch(l){Gt(t,n,l)}}function Nl(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof a=="function"?t.refCleanup=a(l):a.current=l}}catch(c){Gt(t,n,c)}}function yi(t,n){var a=t.ref,l=t.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){Gt(t,n,c)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Gt(t,n,c)}else a.current=null}function pp(t){var n=t.type,a=t.memoizedProps,l=t.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break t;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){Gt(t,t.return,c)}}function tf(t,n,a){try{var l=t.stateNode;P1(l,t.type,a,n),l[Ve]=n}catch(c){Gt(t,t.return,c)}}function yp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Aa(t.type)||t.tag===4}function ef(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||yp(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Aa(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function nf(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Bn));else if(l!==4&&(l===27&&Aa(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(nf(t,n,a),t=t.sibling;t!==null;)nf(t,n,a),t=t.sibling}function Tu(t,n,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(l!==4&&(l===27&&Aa(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Tu(t,n,a),t=t.sibling;t!==null;)Tu(t,n,a),t=t.sibling}function _p(t){var n=t.stateNode,a=t.memoizedProps;try{for(var l=t.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);He(n,l,a),n[pe]=t,n[Ve]=a}catch(f){Gt(t,t.return,f)}}var Li=!1,be=!1,af=!1,vp=typeof WeakSet=="function"?WeakSet:Set,Me=null;function _1(t,n){if(t=t.containerInfo,wf=qu,t=Dm(t),Zc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else t:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break t}var g=0,E=-1,R=-1,P=0,H=0,Y=t,B=null;e:for(;;){for(var q;Y!==a||c!==0&&Y.nodeType!==3||(E=g+c),Y!==f||l!==0&&Y.nodeType!==3||(R=g+l),Y.nodeType===3&&(g+=Y.nodeValue.length),(q=Y.firstChild)!==null;)B=Y,Y=q;for(;;){if(Y===t)break e;if(B===a&&++P===c&&(E=g),B===f&&++H===l&&(R=g),(q=Y.nextSibling)!==null)break;Y=B,B=Y.parentNode}Y=q}a=E===-1||R===-1?null:{start:E,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Rf={focusedElem:t,selectionRange:a},qu=!1,Me=n;Me!==null;)if(n=Me,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Me=t;else for(;Me!==null;){switch(n=Me,f=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)c=t[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&f!==null){t=void 0,a=n,c=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var rt=ys(a.type,c);t=l.getSnapshotBeforeUpdate(rt,f),l.__reactInternalSnapshotBeforeUpdate=t}catch(ht){Gt(a,a.return,ht)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)Nf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Nf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=n.sibling,t!==null){t.return=n.return,Me=t;break}Me=n.return}}function Ep(t,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Pi(t,a),l&4&&xl(5,a);break;case 1:if(Pi(t,a),l&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(g){Gt(a,a.return,g)}else{var c=ys(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(c,n,t.__reactInternalSnapshotBeforeUpdate)}catch(g){Gt(a,a.return,g)}}l&64&&mp(a),l&512&&Nl(a,a.return);break;case 3:if(Pi(t,a),l&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{ag(t,n)}catch(g){Gt(a,a.return,g)}}break;case 27:n===null&&l&4&&_p(a);case 26:case 5:Pi(t,a),n===null&&l&4&&pp(a),l&512&&Nl(a,a.return);break;case 12:Pi(t,a);break;case 31:Pi(t,a),l&4&&Ap(t,a);break;case 13:Pi(t,a),l&4&&Sp(t,a),l&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=C1.bind(null,a),Y1(t,a))));break;case 22:if(l=a.memoizedState!==null||Li,!l){n=n!==null&&n.memoizedState!==null||be,c=Li;var f=be;Li=l,(be=n)&&!f?Bi(t,a,(a.subtreeFlags&8772)!==0):Pi(t,a),Li=c,be=f}break;case 30:break;default:Pi(t,a)}}function Tp(t){var n=t.alternate;n!==null&&(t.alternate=null,Tp(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ls(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var se=null,sn=!1;function Ui(t,n,a){for(a=a.child;a!==null;)bp(t,n,a),a=a.sibling}function bp(t,n,a){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(jn,a)}catch{}switch(a.tag){case 26:be||yi(a,n),Ui(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:be||yi(a,n);var l=se,c=sn;Aa(a.type)&&(se=a.stateNode,sn=!1),Ui(t,n,a),Ul(a.stateNode),se=l,sn=c;break;case 5:be||yi(a,n);case 6:if(l=se,c=sn,se=null,Ui(t,n,a),se=l,sn=c,se!==null)if(sn)try{(se.nodeType===9?se.body:se.nodeName==="HTML"?se.ownerDocument.body:se).removeChild(a.stateNode)}catch(f){Gt(a,n,f)}else try{se.removeChild(a.stateNode)}catch(f){Gt(a,n,f)}break;case 18:se!==null&&(sn?(t=se,my(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Tr(t)):my(se,a.stateNode));break;case 4:l=se,c=sn,se=a.stateNode.containerInfo,sn=!0,Ui(t,n,a),se=l,sn=c;break;case 0:case 11:case 14:case 15:pa(2,a,n),be||pa(4,a,n),Ui(t,n,a);break;case 1:be||(yi(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&gp(a,n,l)),Ui(t,n,a);break;case 21:Ui(t,n,a);break;case 22:be=(l=be)||a.memoizedState!==null,Ui(t,n,a),be=l;break;default:Ui(t,n,a)}}function Ap(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Tr(t)}catch(a){Gt(n,n.return,a)}}}function Sp(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Tr(t)}catch(a){Gt(n,n.return,a)}}function v1(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new vp),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new vp),n;default:throw Error(r(435,t.tag))}}function bu(t,n){var a=v1(t);n.forEach(function(l){if(!a.has(l)){a.add(l);var c=x1.bind(null,t,l);l.then(c,c)}})}function rn(t,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],f=t,g=n,E=g;t:for(;E!==null;){switch(E.tag){case 27:if(Aa(E.type)){se=E.stateNode,sn=!1;break t}break;case 5:se=E.stateNode,sn=!1;break t;case 3:case 4:se=E.stateNode.containerInfo,sn=!0;break t}E=E.return}if(se===null)throw Error(r(160));bp(f,g,c),se=null,sn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)wp(n,t),n=n.sibling}var Qn=null;function wp(t,n){var a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:rn(n,t),ln(t),l&4&&(pa(3,t,t.return),xl(3,t),pa(5,t,t.return));break;case 1:rn(n,t),ln(t),l&512&&(be||a===null||yi(a,a.return)),l&64&&Li&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=Qn;if(rn(n,t),ln(t),l&512&&(be||a===null||yi(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=t.memoizedState,a===null)if(l===null)if(t.stateNode===null){t:{l=t.type,a=t.memoizedProps,c=c.ownerDocument||c;e:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[ii]||f[pe]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),He(f,l,a),f[pe]=t,ye(f),l=f;break t;case"link":var g=wy("link","href",c).get(l+(a.href||""));if(g){for(var E=0;E<g.length;E++)if(f=g[E],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(E,1);break e}}f=c.createElement(l),He(f,l,a),c.head.appendChild(f);break;case"meta":if(g=wy("meta","content",c).get(l+(a.content||""))){for(E=0;E<g.length;E++)if(f=g[E],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(E,1);break e}}f=c.createElement(l),He(f,l,a),c.head.appendChild(f);break;default:throw Error(r(468,l))}f[pe]=t,ye(f),l=f}t.stateNode=l}else Ry(c,t.type,t.stateNode);else t.stateNode=Sy(c,l,t.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?Ry(c,t.type,t.stateNode):Sy(c,l,t.memoizedProps)):l===null&&t.stateNode!==null&&tf(t,t.memoizedProps,a.memoizedProps)}break;case 27:rn(n,t),ln(t),l&512&&(be||a===null||yi(a,a.return)),a!==null&&l&4&&tf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(rn(n,t),ln(t),l&512&&(be||a===null||yi(a,a.return)),t.flags&32){c=t.stateNode;try{an(c,"")}catch(rt){Gt(t,t.return,rt)}}l&4&&t.stateNode!=null&&(c=t.memoizedProps,tf(t,c,a!==null?a.memoizedProps:c)),l&1024&&(af=!0);break;case 6:if(rn(n,t),ln(t),l&4){if(t.stateNode===null)throw Error(r(162));l=t.memoizedProps,a=t.stateNode;try{a.nodeValue=l}catch(rt){Gt(t,t.return,rt)}}break;case 3:if(Uu=null,c=Qn,Qn=ju(n.containerInfo),rn(n,t),Qn=c,ln(t),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Tr(n.containerInfo)}catch(rt){Gt(t,t.return,rt)}af&&(af=!1,Rp(t));break;case 4:l=Qn,Qn=ju(t.stateNode.containerInfo),rn(n,t),ln(t),Qn=l;break;case 12:rn(n,t),ln(t);break;case 31:rn(n,t),ln(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bu(t,l)));break;case 13:rn(n,t),ln(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Su=$e()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bu(t,l)));break;case 22:c=t.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,P=Li,H=be;if(Li=P||c,be=H||R,rn(n,t),be=H,Li=P,ln(t),l&8192)t:for(n=t.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||R||Li||be||_s(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){R=a=n;try{if(f=R.stateNode,c)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{E=R.stateNode;var Y=R.memoizedProps.style,B=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;E.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(rt){Gt(R,R.return,rt)}}}else if(n.tag===6){if(a===null){R=n;try{R.stateNode.nodeValue=c?"":R.memoizedProps}catch(rt){Gt(R,R.return,rt)}}}else if(n.tag===18){if(a===null){R=n;try{var q=R.stateNode;c?gy(q,!0):gy(R.stateNode,!1)}catch(rt){Gt(R,R.return,rt)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break t;for(;n.sibling===null;){if(n.return===null||n.return===t)break t;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=t.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,bu(t,a))));break;case 19:rn(n,t),ln(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bu(t,l)));break;case 30:break;case 21:break;default:rn(n,t),ln(t)}}function ln(t){var n=t.flags;if(n&2){try{for(var a,l=t.return;l!==null;){if(yp(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,f=ef(t);Tu(t,f,c);break;case 5:var g=a.stateNode;a.flags&32&&(an(g,""),a.flags&=-33);var E=ef(t);Tu(t,E,g);break;case 3:case 4:var R=a.stateNode.containerInfo,P=ef(t);nf(t,P,R);break;default:throw Error(r(161))}}catch(H){Gt(t,t.return,H)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Rp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Rp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Pi(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Ep(t,n.alternate,n),n=n.sibling}function _s(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:pa(4,n,n.return),_s(n);break;case 1:yi(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&gp(n,n.return,a),_s(n);break;case 27:Ul(n.stateNode);case 26:case 5:yi(n,n.return),_s(n);break;case 22:n.memoizedState===null&&_s(n);break;case 30:_s(n);break;default:_s(n)}t=t.sibling}}function Bi(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,c=t,f=n,g=f.flags;switch(f.tag){case 0:case 11:case 15:Bi(c,f,a),xl(4,f);break;case 1:if(Bi(c,f,a),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(P){Gt(l,l.return,P)}if(l=f,c=l.updateQueue,c!==null){var E=l.stateNode;try{var R=c.shared.hiddenCallbacks;if(R!==null)for(c.shared.hiddenCallbacks=null,c=0;c<R.length;c++)ig(R[c],E)}catch(P){Gt(l,l.return,P)}}a&&g&64&&mp(f),Nl(f,f.return);break;case 27:_p(f);case 26:case 5:Bi(c,f,a),a&&l===null&&g&4&&pp(f),Nl(f,f.return);break;case 12:Bi(c,f,a);break;case 31:Bi(c,f,a),a&&g&4&&Ap(c,f);break;case 13:Bi(c,f,a),a&&g&4&&Sp(c,f);break;case 22:f.memoizedState===null&&Bi(c,f,a),Nl(f,f.return);break;case 30:break;default:Bi(c,f,a)}n=n.sibling}}function sf(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&gl(a))}function rf(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&gl(t))}function Yn(t,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Cp(t,n,a,l),n=n.sibling}function Cp(t,n,a,l){var c=n.flags;switch(n.tag){case 0:case 11:case 15:Yn(t,n,a,l),c&2048&&xl(9,n);break;case 1:Yn(t,n,a,l);break;case 3:Yn(t,n,a,l),c&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&gl(t)));break;case 12:if(c&2048){Yn(t,n,a,l),t=n.stateNode;try{var f=n.memoizedProps,g=f.id,E=f.onPostCommit;typeof E=="function"&&E(g,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(R){Gt(n,n.return,R)}}else Yn(t,n,a,l);break;case 31:Yn(t,n,a,l);break;case 13:Yn(t,n,a,l);break;case 23:break;case 22:f=n.stateNode,g=n.alternate,n.memoizedState!==null?f._visibility&2?Yn(t,n,a,l):Il(t,n):f._visibility&2?Yn(t,n,a,l):(f._visibility|=2,cr(t,n,a,l,(n.subtreeFlags&10256)!==0||!1)),c&2048&&sf(g,n);break;case 24:Yn(t,n,a,l),c&2048&&rf(n.alternate,n);break;default:Yn(t,n,a,l)}}function cr(t,n,a,l,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=t,g=n,E=a,R=l,P=g.flags;switch(g.tag){case 0:case 11:case 15:cr(f,g,E,R,c),xl(8,g);break;case 23:break;case 22:var H=g.stateNode;g.memoizedState!==null?H._visibility&2?cr(f,g,E,R,c):Il(f,g):(H._visibility|=2,cr(f,g,E,R,c)),c&&P&2048&&sf(g.alternate,g);break;case 24:cr(f,g,E,R,c),c&&P&2048&&rf(g.alternate,g);break;default:cr(f,g,E,R,c)}n=n.sibling}}function Il(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,l=n,c=l.flags;switch(l.tag){case 22:Il(a,l),c&2048&&sf(l.alternate,l);break;case 24:Il(a,l),c&2048&&rf(l.alternate,l);break;default:Il(a,l)}n=n.sibling}}var Dl=8192;function hr(t,n,a){if(t.subtreeFlags&Dl)for(t=t.child;t!==null;)xp(t,n,a),t=t.sibling}function xp(t,n,a){switch(t.tag){case 26:hr(t,n,a),t.flags&Dl&&t.memoizedState!==null&&sT(a,Qn,t.memoizedState,t.memoizedProps);break;case 5:hr(t,n,a);break;case 3:case 4:var l=Qn;Qn=ju(t.stateNode.containerInfo),hr(t,n,a),Qn=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=Dl,Dl=16777216,hr(t,n,a),Dl=l):hr(t,n,a));break;default:hr(t,n,a)}}function Np(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Vl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];Me=l,Dp(l,t)}Np(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ip(t),t=t.sibling}function Ip(t){switch(t.tag){case 0:case 11:case 15:Vl(t),t.flags&2048&&pa(9,t,t.return);break;case 3:Vl(t);break;case 12:Vl(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Au(t)):Vl(t);break;default:Vl(t)}}function Au(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];Me=l,Dp(l,t)}Np(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:pa(8,n,n.return),Au(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Au(n));break;default:Au(n)}t=t.sibling}}function Dp(t,n){for(;Me!==null;){var a=Me;switch(a.tag){case 0:case 11:case 15:pa(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:gl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Me=l;else t:for(a=t;Me!==null;){l=Me;var c=l.sibling,f=l.return;if(Tp(l),l===a){Me=null;break t}if(c!==null){c.return=f,Me=c;break t}Me=f}}}var E1={getCacheForType:function(t){var n=ke(ve),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return ke(ve).controller.signal}},T1=typeof WeakMap=="function"?WeakMap:Map,Pt=0,$t=null,St=null,Rt=0,Ht=0,yn=null,ya=!1,fr=!1,lf=!1,ki=0,oe=0,_a=0,vs=0,of=0,_n=0,dr=0,Ol=null,on=null,uf=!1,Su=0,Vp=0,wu=1/0,Ru=null,va=null,Ie=0,Ea=null,mr=null,qi=0,cf=0,hf=null,Op=null,Ml=0,ff=null;function vn(){return(Pt&2)!==0&&Rt!==0?Rt&-Rt:G.T!==null?_f():Co()}function Mp(){if(_n===0)if((Rt&536870912)===0||It){var t=Qa;
vendor: 4,200 bytes, line 48
48Qa<<=1,(Qa&3932160)===0&&(Qa=262144),_n=t}else _n=536870912;return t=gn.current,t!==null&&(t.flags|=32),_n}function un(t,n,a){(t===$t&&(Ht===2||Ht===9)||t.cancelPendingCommit!==null)&&(gr(t,0),Ta(t,Rt,_n,!1)),Ya(t,a),((Pt&2)===0||t!==$t)&&(t===$t&&((Pt&2)===0&&(vs|=a),oe===4&&Ta(t,Rt,_n,!1)),_i(t))}function zp(t,n,a){if((Pt&6)!==0)throw Error(r(327));var l=!a&&(n&127)===0&&(n&t.expiredLanes)===0||Ln(t,n),c=l?S1(t,n):mf(t,n,!0),f=l;do{if(c===0){fr&&!l&&Ta(t,n,0,!1);break}else{if(a=t.current.alternate,f&&!b1(a)){c=mf(t,n,!1),f=!1;continue}if(c===2){if(f=n,t.errorRecoveryDisabledLanes&f)var g=0;else g=t.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){n=g;t:{var E=t;c=Ol;var R=E.current.memoizedState.isDehydrated;if(R&&(gr(E,g).flags|=256),g=mf(E,g,!1),g!==2){if(lf&&!R){E.errorRecoveryDisabledLanes|=f,vs|=f,c=4;break t}f=on,on=c,f!==null&&(on===null?on=f:on.push.apply(on,f))}c=g}if(f=!1,c!==2)continue}}if(c===1){gr(t,0),Ta(t,n,0,!0);break}t:{switch(l=t,f=c,f){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Ta(l,n,_n,!ya);break t;case 2:on=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Su+300-$e(),10<c)){if(Ta(l,n,_n,!ya),ti(l,0,!0)!==0)break t;qi=n,l.timeoutHandle=fy(jp.bind(null,l,a,on,Ru,uf,n,_n,vs,dr,ya,f,"Throttled",-0,0),c);break t}jp(l,a,on,Ru,uf,n,_n,vs,dr,ya,f,null,-0,0)}}break}while(!0);_i(t)}function jp(t,n,a,l,c,f,g,E,R,P,H,Y,B,q){if(t.timeoutHandle=-1,Y=n.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},xp(n,f,Y);var rt=(f&62914560)===f?Su-$e():(f&4194048)===f?Vp-$e():0;if(rt=rT(Y,rt),rt!==null){qi=f,t.cancelPendingCommit=rt(Gp.bind(null,t,n,f,a,l,c,g,E,R,H,Y,null,B,q)),Ta(t,f,g,!P);return}}Gp(t,n,f,a,l,c,g,E,R)}function b1(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],f=c.getSnapshot;c=c.value;try{if(!dn(f(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ta(t,n,a,l){n&=~of,n&=~vs,t.suspendedLanes|=n,t.pingedLanes&=~n,l&&(t.warmLanes|=n),l=t.expirationTimes;for(var c=n;0<c;){var f=31-ue(c),g=1<<f;l[f]=-1,c&=~g}a!==0&&Ka(t,a,n)}function Cu(){return(Pt&6)===0?(zl(0),!1):!0}function df(){if(St!==null){if(Ht===0)var t=St.return;else t=St,Di=cs=null,xh(t),sr=null,yl=0,t=St;for(;t!==null;)dp(t.alternate,t),t=t.return;St=null}}function gr(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,q1(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),qi=0,df(),$t=t,St=a=Ni(t.current,null),Rt=n,Ht=0,yn=null,ya=!1,fr=Ln(t,n),lf=!1,dr=_n=of=vs=_a=oe=0,on=Ol=null,uf=!1,(n&8)!==0&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var c=31-ue(l),f=1<<c;n|=t[c],l&=~f}return ki=n,Ko(),a}function Lp(t,n){Et=null,G.H=wl,n===ar||n===nu?(n=Wm(),Ht=3):n===ph?(n=Wm(),Ht=4):Ht=n===Gh?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,yn=n,St===null&&(oe=1,pu(t,Cn(n,t.current)))}function Up(){var t=gn.current;return t===null?!0:(Rt&4194048)===Rt?Dn===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?t===Dn:!1}function Pp(){var t=G.H;return G.H=wl,t===null?wl:t}function Bp(){var t=G.A;return G.A=E1,t}function xu(){oe=4,ya||(Rt&4194048)!==Rt&&gn.current!==null||(fr=!0),(_a&134217727)===0&&(vs&134217727)===0||$t===null||Ta($t,Rt,_n,!1)}function mf(t,n,a){var l=Pt;Pt|=2;var c=Pp(),f=Bp();($t!==t||Rt!==n)&&(Ru=null,gr(t,n)),n=!1;var g=oe;t:do try{if(Ht!==0&&St!==null){var E=St,R=yn;switch(Ht){case 8:df(),g=6;break t;case 3:case 2:case 9:case 6:gn.current===null&&(n=!0);var P=Ht;if(Ht=0,yn=null,pr(t,E,R,P),a&&fr){g=0;break t}break;default:P=Ht,Ht=0,yn=null,pr(t,E,R,P)}}A1(),g=oe;break}catch(H){Lp(t,H)}while(!0);return n&&t.shellSuspendCounter++,Di=cs=null,Pt=l,G.H=c,G.A=f,St===null&&($t=null,Rt=0,Ko()),g}function A1(){for(;St!==null;)kp(St)}function S1(t,n){var a=Pt;Pt|=2;var l=Pp(),c=Bp();
vendor: 4,631 bytes, line 48
48$t!==t||Rt!==n?(Ru=null,wu=$e()+500,gr(t,n)):fr=Ln(t,n);t:do try{if(Ht!==0&&St!==null){n=St;var f=yn;e:switch(Ht){case 1:Ht=0,yn=null,pr(t,n,f,1);break;case 2:case 9:if($m(f)){Ht=0,yn=null,qp(n);break}n=function(){Ht!==2&&Ht!==9||$t!==t||(Ht=7),_i(t)},f.then(n,n);break t;case 3:Ht=7;break t;case 4:Ht=5;break t;case 7:$m(f)?(Ht=0,yn=null,qp(n)):(Ht=0,yn=null,pr(t,n,f,7));break;case 5:var g=null;switch(St.tag){case 26:g=St.memoizedState;case 5:case 27:var E=St;if(g?Cy(g):E.stateNode.complete){Ht=0,yn=null;var R=E.sibling;if(R!==null)St=R;else{var P=E.return;P!==null?(St=P,Nu(P)):St=null}break e}}Ht=0,yn=null,pr(t,n,f,5);break;case 6:Ht=0,yn=null,pr(t,n,f,6);break;case 8:df(),oe=6;break t;default:throw Error(r(462))}}w1();break}catch(H){Lp(t,H)}while(!0);return Di=cs=null,G.H=l,G.A=c,Pt=a,St!==null?0:($t=null,Rt=0,Ko(),oe)}function w1(){for(;St!==null&&!Hc();)kp(St)}function kp(t){var n=hp(t.alternate,t,ki);t.memoizedProps=t.pendingProps,n===null?Nu(t):St=n}function qp(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=sp(a,n,n.pendingProps,n.type,void 0,Rt);break;case 11:n=sp(a,n,n.pendingProps,n.type.render,n.ref,Rt);break;case 5:xh(n);default:dp(a,n),n=St=Bm(n,ki),n=hp(a,n,ki)}t.memoizedProps=t.pendingProps,n===null?Nu(t):St=n}function pr(t,n,a,l){Di=cs=null,xh(n),sr=null,yl=0;var c=n.return;try{if(d1(t,c,n,a,Rt)){oe=1,pu(t,Cn(a,t.current)),St=null;return}}catch(f){if(c!==null)throw St=c,f;oe=1,pu(t,Cn(a,t.current)),St=null;return}n.flags&32768?(It||l===1?t=!0:fr||(Rt&536870912)!==0?t=!1:(ya=t=!0,(l===2||l===9||l===3||l===6)&&(l=gn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Hp(n,t)):Nu(n)}function Nu(t){var n=t;do{if((n.flags&32768)!==0){Hp(n,ya);return}t=n.return;var a=p1(n.alternate,n,ki);if(a!==null){St=a;return}if(n=n.sibling,n!==null){St=n;return}St=n=t}while(n!==null);oe===0&&(oe=5)}function Hp(t,n){do{var a=y1(t.alternate,t);if(a!==null){a.flags&=32767,St=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){St=t;return}St=t=a}while(t!==null);oe=6,St=null}function Gp(t,n,a,l,c,f,g,E,R){t.cancelPendingCommit=null;do Iu();while(Ie!==0);if((Pt&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=eh,Qc(t,a,f,g,E,R),t===$t&&(St=$t=null,Rt=0),mr=n,Ea=t,qi=a,cf=f,hf=c,Op=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,N1($i,function(){return Xp(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,c=W.p,W.p=2,g=Pt,Pt|=4;try{_1(t,n,a)}finally{Pt=g,W.p=c,G.T=l}}Ie=1,Fp(),Qp(),Yp()}}function Fp(){if(Ie===1){Ie=0;var t=Ea,n=mr,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var l=W.p;W.p=2;var c=Pt;Pt|=4;try{wp(n,t);var f=Rf,g=Dm(t.containerInfo),E=f.focusedElem,R=f.selectionRange;if(g!==E&&E&&E.ownerDocument&&Im(E.ownerDocument.documentElement,E)){if(R!==null&&Zc(E)){var P=R.start,H=R.end;if(H===void 0&&(H=P),"selectionStart"in E)E.selectionStart=P,E.selectionEnd=Math.min(H,E.value.length);else{var Y=E.ownerDocument||document,B=Y&&Y.defaultView||window;if(B.getSelection){var q=B.getSelection(),rt=E.textContent.length,ht=Math.min(R.start,rt),Kt=R.end===void 0?ht:Math.min(R.end,rt);!q.extend&&ht>Kt&&(g=Kt,Kt=ht,ht=g);var z=Nm(E,ht),I=Nm(E,Kt);if(z&&I&&(q.rangeCount!==1||q.anchorNode!==z.node||q.anchorOffset!==z.offset||q.focusNode!==I.node||q.focusOffset!==I.offset)){var U=Y.createRange();U.setStart(z.node,z.offset),q.removeAllRanges(),ht>Kt?(q.addRange(U),q.extend(I.node,I.offset)):(U.setEnd(I.node,I.offset),q.addRange(U))}}}}for(Y=[],q=E;q=q.parentNode;)q.nodeType===1&&Y.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<Y.length;E++){var F=Y[E];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}qu=!!wf,Rf=wf=null}finally{Pt=c,W.p=l,G.T=a}}t.current=n,Ie=2}}function Qp(){if(Ie===2){Ie=0;var t=Ea,n=mr,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var l=W.p;W.p=2;var c=Pt;Pt|=4;try{Ep(t,n.alternate,n)}finally{Pt=c,W.p=l,G.T=a}}Ie=3}}function Yp(){if(Ie===4||Ie===3){Ie=0,Eo();var t=Ea,n=mr,a=qi,l=Op;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ie=5:(Ie=0,mr=Ea=null,Kp(t,t.pendingLanes));var c=t.pendingLanes;if(c===0&&(va=null),wi(a),n=n.stateNode,Ue&&typeof Ue.onCommitFiberRoot=="function")try{Ue.onCommitFiberRoot(jn,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=G.T,c=W.p,W.p=2,G.T=null;try{for(var f=t.onRecoverableError,g=0;g<l.length;g++){var E=l[g];f(E.value,{componentStack:E.stack})}}finally{G.T=n,W.p=c}}
vendor: 5,629 bytes, line 48
48(qi&3)!==0&&Iu(),_i(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===ff?Ml++:(Ml=0,ff=t):Ml=0,zl(0)}}function Kp(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,gl(n)))}function Iu(){return Fp(),Qp(),Yp(),Xp()}function Xp(){if(Ie!==5)return!1;var t=Ea,n=cf;cf=0;var a=wi(qi),l=G.T,c=W.p;try{W.p=32>a?32:a,G.T=null,a=hf,hf=null;var f=Ea,g=qi;if(Ie=0,mr=Ea=null,qi=0,(Pt&6)!==0)throw Error(r(331));var E=Pt;if(Pt|=4,Ip(f.current),Cp(f,f.current,g,a),Pt=E,zl(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot=="function")try{Ue.onPostCommitFiberRoot(jn,f)}catch{}return!0}finally{W.p=c,G.T=l,Kp(t,n)}}function Zp(t,n,a){n=Cn(a,n),n=Hh(t.stateNode,n,2),t=da(t,n,2),t!==null&&(Ya(t,2),_i(t))}function Gt(t,n,a){if(t.tag===3)Zp(t,t,a);else for(;n!==null;){if(n.tag===3){Zp(n,t,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(va===null||!va.has(l))){t=Cn(a,t),a=$g(2),l=da(n,a,2),l!==null&&(Jg(a,l,n,t),Ya(l,2),_i(l));break}}n=n.return}}function gf(t,n,a){var l=t.pingCache;if(l===null){l=t.pingCache=new T1;var c=new Set;l.set(n,c)}else c=l.get(n),c===void 0&&(c=new Set,l.set(n,c));c.has(a)||(lf=!0,c.add(a),t=R1.bind(null,t,n,a),n.then(t,t))}function R1(t,n,a){var l=t.pingCache;l!==null&&l.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,$t===t&&(Rt&a)===a&&(oe===4||oe===3&&(Rt&62914560)===Rt&&300>$e()-Su?(Pt&2)===0&&gr(t,0):of|=a,dr===Rt&&(dr=0)),_i(t)}function $p(t,n){n===0&&(n=Ro()),t=ls(t,n),t!==null&&(Ya(t,n),_i(t))}function C1(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),$p(t,a)}function x1(t,n){var a=0;switch(t.tag){case 31:case 13:var l=t.stateNode,c=t.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(n),$p(t,a)}function N1(t,n){return Ne(t,n)}var Du=null,yr=null,pf=!1,Vu=!1,yf=!1,ba=0;function _i(t){t!==yr&&t.next===null&&(yr===null?Du=yr=t:yr=yr.next=t),Vu=!0,pf||(pf=!0,D1())}function zl(t,n){if(!yf&&Vu){yf=!0;do for(var a=!1,l=Du;l!==null;){if(t!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var g=l.suspendedLanes,E=l.pingedLanes;f=(1<<31-ue(42|t)+1)-1,f&=c&~(g&~E),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,ey(l,f))}else f=Rt,f=ti(l,l===$t?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Ln(l,f)||(a=!0,ey(l,f));l=l.next}while(a);yf=!1}}function I1(){Jp()}function Jp(){Vu=pf=!1;var t=0;ba!==0&&k1()&&(t=ba);for(var n=$e(),a=null,l=Du;l!==null;){var c=l.next,f=Wp(l,n);f===0?(l.next=null,a===null?Du=c:a.next=c,c===null&&(yr=a)):(a=l,(t!==0||(f&3)!==0)&&(Vu=!0)),l=c}Ie!==0&&Ie!==5||zl(t),ba!==0&&(ba=0)}function Wp(t,n){for(var a=t.suspendedLanes,l=t.pingedLanes,c=t.expirationTimes,f=t.pendingLanes&-62914561;0<f;){var g=31-ue(f),E=1<<g,R=c[g];R===-1?((E&a)===0||(E&l)!==0)&&(c[g]=Fc(E,n)):R<=n&&(t.expiredLanes|=E),f&=~E}if(n=$t,a=Rt,a=ti(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,a===0||t===n&&(Ht===2||Ht===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&Zi(l),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Ln(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(l!==null&&Zi(l),wi(a)){case 2:case 8:a=Fr;break;case 32:a=$i;break;case 268435456:a=To;break;default:a=$i}return l=ty.bind(null,t),a=Ne(a,l),t.callbackPriority=n,t.callbackNode=a,n}return l!==null&&l!==null&&Zi(l),t.callbackPriority=2,t.callbackNode=null,2}function ty(t,n){if(Ie!==0&&Ie!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Iu()&&t.callbackNode!==a)return null;var l=Rt;return l=ti(t,t===$t?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(zp(t,l,n),Wp(t,$e()),t.callbackNode!=null&&t.callbackNode===a?ty.bind(null,t):null)}function ey(t,n){if(Iu())return null;zp(t,n,!0)}function D1(){H1(function(){(Pt&6)!==0?Ne(Gr,I1):Jp()})}function _f(){if(ba===0){var t=nr;t===0&&(t=Jn,Jn<<=1,(Jn&261888)===0&&(Jn=256)),ba=t}return ba}function ny(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ks(""+t)}function iy(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function V1(t,n,a,l,c){if(n==="submit"&&a&&a.stateNode===c){var f=ny((c[Ve]||null).action),g=l.submitter;g&&(n=(n=g[Ve]||null)?ny(n.formAction):g.getAttribute("formAction"),n!==null&&(f=n,g=null));var E=new hi("action","action",null,l,c);t.push({event:E,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ba!==0){var R=g?iy(c,g):new FormData(c);Lh(a,{pending:!0,data:R,method:c.method,action:f},null,R)}}else typeof f=="function"&&(E.preventDefault(),R=g?iy(c,g):new FormData(c),Lh(a,{pending:!0,data:R,method:c.method,action:f},f,R))},currentTarget:c}]})}}for(var vf=0;vf<th.length;vf++){var Ef=th[vf],O1=Ef.toLowerCase(),M1=Ef[0].toUpperCase()+Ef.slice(1);Fn(O1,"on"+M1)}Fn(Mm,"onAnimationEnd"),Fn(zm,"onAnimationIteration"),Fn(jm,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn(ZE,"onTransitionRun"),Fn($E,"onTransitionStart"),Fn(JE,"onTransitionCancel"),Fn(Lm,"onTransitionEnd"),li("onMouseEnter",["mouseout","mouseover"]),li("onMouseLeave",["mouseout","mouseover"]),li("onPointerEnter",["pointerout","pointerover"]),li("onPointerLeave",["pointerout","pointerover"]),ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ri("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),ri("onBeforeInput",["compositionend","keypress","textInput","paste"]),ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),z1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jl));function ay(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var l=t[a],c=l.event;l=l.listeners;t:{var f=void 0;if(n)for(var g=l.length-1;0<=g;g--){var E=l[g],R=E.instance,P=E.currentTarget;if(E=E.listener,R!==f&&c.isPropagationStopped())break t;f=E,c.currentTarget=P;try{f(c)}catch(H){Yo(H)}c.currentTarget=null,f=R}else for(g=0;g<l.length;g++){if(E=l[g],R=E.instance,P=E.currentTarget,E=E.listener,R!==f&&c.isPropagationStopped())break t;f=E,c.currentTarget=P;try{f(c)}catch(H){Yo(H)}c.currentTarget=null,f=R}}}}function wt(t,n){var a=n[js];a===void 0&&(a=n[js]=new Set);var l=t+"__bubble";a.has(l)||(sy(n,t,2,!1),a.add(l))}function Tf(t,n,a){var l=0;n&&(l|=4),sy(a,t,l,n)}var Ou="_reactListening"+Math.random().toString(36).slice(2);function bf(t){if(!t[Ou]){t[Ou]=!0,Kr.forEach(function(a){a!=="selectionchange"&&(z1.has(a)||Tf(a,!1,t),Tf(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Ou]||(n[Ou]=!0,Tf("selectionchange",!1,n))}}function sy(t,n,a,l){switch(My(n)){case 2:var c=uT;break;case 8:c=cT;break;default:c=Lf}a=c.bind(null,n,a,t),c=void 0,!Wa||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),l?c!==void 0?t.addEventListener(n,a,{capture:!0,passive:c}):t.addEventListener(n,a,!0):c!==void 0?t.addEventListener(n,a,{passive:c}):t.addEventListener(n,a,!1)}function Af(t,n,a,l,c){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)t:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var E=l.stateNode.containerInfo;if(E===c)break;if(g===4)for(g=l.return;g!==null;){var R=g.tag;if((R===3||R===4)&&g.stateNode.containerInfo===c)return;g=g.return}for(;E!==null;){if(g=ai(E),g===null)return;if(R=g.tag,R===5||R===6||R===26||R===27){l=f=g;continue t}E=E.parentNode}}l=l.return}ia(function(){var P=f,H=An(a),Y=[];t:{var B=Um.get(t);if(B!==void 0){var q=hi,rt=t;switch(t){case"keypress":if(es(a)===0)break t;case"keydown":case"keyup":q=Go;break;case"focusin":rt="focus",q=is;break;case"focusout":rt="blur",q=is;break;case"beforeblur":case"afterblur":q=is;break;case"click":if(a.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=ll;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=zo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=m;break;case Mm:case zm:case jm:q=Lo;break;case Lm:q=T;break;case"scroll":case"scrollend":q=rl;break;case"wheel":q=k;break;case"copy":case"cut":case"paste":q=Uo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=xi;break;case"toggle":case"beforetoggle":q=vt}var ht=(n&4)!==0,Kt=!ht&&(t==="scroll"||t==="scrollend"),z=ht?B!==null?B+"Capture":null:B;ht=[];for(var I=P,U;I!==null;){var F=I;if(U=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||U===null||z===null||(F=kn(I,z),F!=null&&ht.push(Ll(I,F,U))),Kt)break;I=I.return}0<ht.length&&(B=new q(B,rt,null,a,H),Y.push({event:B,listeners:ht}))}}if((n&7)===0){t:{if(B=t==="mouseover"||t==="pointerover",q=t==="mouseout"||t==="pointerout",B&&a!==il&&(rt=a.relatedTarget||a.fromElement)&&(ai(rt)||rt[ni]))break t;if((q||B)&&(B=H.window===H?H:(B=H.ownerDocument)?B.defaultView||B.parentWindow:window,q?(rt=a.relatedTarget||a.toElement,q=P,rt=rt?ai(rt):null,rt!==null&&(Kt=h(rt),ht=rt.tag,rt!==Kt||ht!==5&&ht!==27&&ht!==6)&&(rt=null)):(q=null,rt=P),q!==rt)){if(ht=ll,F="onMouseLeave",z="onMouseEnter",I="mouse",(t==="pointerout"||t==="pointerover")&&(ht=xi,F="onPointerLeave",z="onPointerEnter",I="pointer"),Kt=q==null?B:hn(q),U=rt==null?B:hn(rt),B=new ht(F,I+"leave",q,a,H),B.target=Kt,B.relatedTarget=U,F=null,ai(H
vendor: 5,567 bytes, lines 48-49
48)===P&&(ht=new ht(z,I+"enter",rt,a,H),ht.target=U,ht.relatedTarget=Kt,F=ht),Kt=F,q&&rt)e:{for(ht=j1,z=q,I=rt,U=0,F=z;F;F=ht(F))U++;F=0;for(var ot=I;ot;ot=ht(ot))F++;for(;0<U-F;)z=ht(z),U--;for(;0<F-U;)I=ht(I),F--;for(;U--;){if(z===I||I!==null&&z===I.alternate){ht=z;break e}z=ht(z),I=ht(I)}ht=null}else ht=null;q!==null&&ry(Y,B,q,ht,!1),rt!==null&&Kt!==null&&ry(Y,Kt,rt,ht,!0)}}t:{if(B=P?hn(P):window,q=B.nodeName&&B.nodeName.toLowerCase(),q==="select"||q==="input"&&B.type==="file")var zt=Am;else if(Tm(B))if(Sm)zt=YE;else{zt=FE;var lt=GE}else q=B.nodeName,!q||q.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?P&&Bs(P.elementType)&&(zt=Am):zt=QE;if(zt&&(zt=zt(t,P))){bm(Y,zt,a,H);break t}lt&&lt(t,B,P),t==="focusout"&&P&&B.type==="number"&&P.memoizedProps.value!=null&&tl(B,"number",B.value)}switch(lt=P?hn(P):window,t){case"focusin":(Tm(lt)||lt.contentEditable==="true")&&(Ks=lt,$c=P,fl=null);break;case"focusout":fl=$c=Ks=null;break;case"mousedown":Jc=!0;break;case"contextmenu":case"mouseup":case"dragend":Jc=!1,Vm(Y,a,H);break;case"selectionchange":if(XE)break;case"keydown":case"keyup":Vm(Y,a,H)}var At;if(Ut)t:{switch(t){case"compositionstart":var Ct="onCompositionStart";break t;case"compositionend":Ct="onCompositionEnd";break t;case"compositionupdate":Ct="onCompositionUpdate";break t}Ct=void 0}else Ys?as(t,a)&&(Ct="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ct="onCompositionStart");Ct&&(mi&&a.locale!=="ko"&&(Ys||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&Ys&&(At=sl()):(ci=H,al="value"in ci?ci.value:ci.textContent,Ys=!0)),lt=Mu(P,Ct),0<lt.length&&(Ct=new di(Ct,t,null,a,H),Y.push({event:Ct,listeners:lt}),At?Ct.data=At:(At=Qs(a),At!==null&&(Ct.data=At)))),(At=wn?BE(t,a):kE(t,a))&&(Ct=Mu(P,"onBeforeInput"),0<Ct.length&&(lt=new di("onBeforeInput","beforeinput",null,a,H),Y.push({event:lt,listeners:Ct}),lt.data=At)),V1(Y,t,P,a,H)}ay(Y,n)})}function Ll(t,n,a){return{instance:t,listener:n,currentTarget:a}}function Mu(t,n){for(var a=n+"Capture",l=[];t!==null;){var c=t,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=kn(t,a),c!=null&&l.unshift(Ll(t,c,f)),c=kn(t,n),c!=null&&l.push(Ll(t,c,f))),t.tag===3)return l;t=t.return}return[]}function j1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function ry(t,n,a,l,c){for(var f=n._reactName,g=[];a!==null&&a!==l;){var E=a,R=E.alternate,P=E.stateNode;if(E=E.tag,R!==null&&R===l)break;E!==5&&E!==26&&E!==27||P===null||(R=P,c?(P=kn(a,f),P!=null&&g.unshift(Ll(a,P,R))):c||(P=kn(a,f),P!=null&&g.push(Ll(a,P,R)))),a=a.return}g.length!==0&&t.push({event:n,listeners:g})}var L1=/\r\n?/g,U1=/\u0000|\uFFFD/g;function ly(t){return(typeof t=="string"?t:""+t).replace(L1,`
49`).replace(U1,"")}function oy(t,n){return n=ly(n),ly(t)===n}function Yt(t,n,a,l,c,f){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||an(t,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&an(t,""+l);break;case"className":fn(t,"class",l);break;case"tabIndex":fn(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":fn(t,a,l);break;case"style":nl(t,l,f);break;case"data":if(n!=="object"){fn(t,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}l=ks(""+l),t.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(n!=="input"&&Yt(t,n,"name",c.name,c,null),Yt(t,n,"formEncType",c.formEncType,c,null),Yt(t,n,"formMethod",c.formMethod,c,null),Yt(t,n,"formTarget",c.formTarget,c,null)):(Yt(t,n,"encType",c.encType,c,null),Yt(t,n,"method",c.method,c,null),Yt(t,n,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}l=ks(""+l),t.setAttribute(a,l);break;case"onClick":l!=null&&(t.onclick=Bn);break;case"onScroll":l!=null&&wt("scroll",t);break;case"onScrollEnd":l!=null&&wt("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}a=ks(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""+l):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":l===!0?t.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,l):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(a,l):t.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(a):t.setAttribute(a,l);break;case"popover":wt("beforetoggle",t),wt("toggle",t),Us(t,"popover",l);break;case"xlinkActuate":_e(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":_e(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":_e(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":_e(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":_e(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":_e(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":_e(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":_e(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":_e(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Us(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Mo.get(a)||a,Us(t,a,l))}}function Sf(t,n,a,l,c,f){switch(a){case"style":nl(t,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"children":typeof l=="string"?an(t,l):(typeof l=="number"||typeof l=="bigint")&&an(t,""+l);break;case"onScroll":l!=null&&wt("scroll",t);break;case"onScrollEnd":l!=null&&wt("scrollend",t);break;case"onClick":l!=null&&(t.onclick=Bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xr.hasOwnProperty(a))t:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),f=t[Ve]||null,f=f!=null?f[a]:null,typeof f=="function"&&t.removeEventListener(n,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,l,c);break t}a in t?t[a]=l:l===!0?t.setAttribute(a,""):Us(t,a,l)}}}function He(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",t),wt("load",t);var l=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Yt(t,n,f,g,a,null)}}c&&Yt(t,n,"srcSet",a.srcSet,a,null),l&&Yt(t,n,"src",a.src,a,null);return;case"input":wt("invalid",t);var E=f=g=c=null,R=null,P=null;for(l in a)if(a.hasOwnProperty(l)){var H=a[l];if(H!=null)switch(l){case"name":c=H;break;case"type":g=H;break;case"checked":R=H;break;case"defaultChecked":P=H;break;case"value":f=H;break;case"defaultValue":E=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,n));break;default:Yt(t,n,l,H,a,null)}}Do(t,f,E,R,P,g,c,!1);return;case"select":wt("invalid",t),l=g=f=null;for(c in a)if(a.hasOwnProperty(c)&&(E=a[c],E!=null))switch(c){case"value":f=E;break;case"defaultValue":g=E;break;case"multiple":l=E;default:Yt(t,n,c,E,a,null)}n=f,a=g,t.multiple=!!l,n!=null?Wi(t,!!l,n,!1):a!=null&&Wi(t,!!l,a,!0);return;case"textarea":wt("invalid",t),f=c=l=null;for(g in a)if(a.hasOwnProperty(g)&&(E=a[g],E!=null))switch(g){case"value":l=E;break;case"defaultValue":c=E;break;case"children":f=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:Yt(t,n,g,E,a,null)}ta(t,l,c,f);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(l=a[R],l!=null))switch(R){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Yt(t,n,R,l,a,null)}return;case"dialog":wt("beforetoggle",t),wt("toggle",t),wt("cancel",t),wt("close",t);break;case"iframe":case"object":wt("load",t);break;case"video":case"audio":for(l=0;l<jl.length;l++)wt(jl[l],t);break;case"image":wt("error",t),wt("load",t);break;case"details":wt("toggle",t);break;case"embed":case"source":case"link":wt("error",t),wt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in a)if(a.hasOwnProperty(P)&&(l=a[P],l!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Yt(t,n,P,l,a,null)}return;default:if(Bs(n)){for(H in a)a.hasOwnProperty(H)&&(l=a[H],l!==void 0&&Sf(t,n,H,l,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null&&Yt(t,n,E,l,a,null))}function P1(t,n,a,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,g=null,E=null,R=null,P=null,H=null;for(q in a){var Y=a[q];
vendor: 4,305 bytes, line 49
49if(a.hasOwnProperty(q)&&Y!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":R=Y;default:l.hasOwnProperty(q)||Yt(t,n,q,null,l,Y)}}for(var B in l){var q=l[B];if(Y=a[B],l.hasOwnProperty(B)&&(q!=null||Y!=null))switch(B){case"type":f=q;break;case"name":c=q;break;case"checked":P=q;break;case"defaultChecked":H=q;break;case"value":g=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,n));break;default:q!==Y&&Yt(t,n,B,q,l,Y)}}Ps(t,g,E,R,P,H,f,c);return;case"select":q=g=E=B=null;for(f in a)if(R=a[f],a.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":q=R;default:l.hasOwnProperty(f)||Yt(t,n,f,null,l,R)}for(c in l)if(f=l[c],R=a[c],l.hasOwnProperty(c)&&(f!=null||R!=null))switch(c){case"value":B=f;break;case"defaultValue":E=f;break;case"multiple":g=f;default:f!==R&&Yt(t,n,c,f,l,R)}n=E,a=g,l=q,B!=null?Wi(t,!!a,B,!1):!!l!=!!a&&(n!=null?Wi(t,!!a,n,!0):Wi(t,!!a,a?[]:"",!1));return;case"textarea":q=B=null;for(E in a)if(c=a[E],a.hasOwnProperty(E)&&c!=null&&!l.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Yt(t,n,E,null,l,c)}for(g in l)if(c=l[g],f=a[g],l.hasOwnProperty(g)&&(c!=null||f!=null))switch(g){case"value":B=c;break;case"defaultValue":q=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==f&&Yt(t,n,g,c,l,f)}Vo(t,B,q);return;case"option":for(var rt in a)if(B=a[rt],a.hasOwnProperty(rt)&&B!=null&&!l.hasOwnProperty(rt))switch(rt){case"selected":t.selected=!1;break;default:Yt(t,n,rt,null,l,B)}for(R in l)if(B=l[R],q=a[R],l.hasOwnProperty(R)&&B!==q&&(B!=null||q!=null))switch(R){case"selected":t.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Yt(t,n,R,B,l,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ht in a)B=a[ht],a.hasOwnProperty(ht)&&B!=null&&!l.hasOwnProperty(ht)&&Yt(t,n,ht,null,l,B);for(P in l)if(B=l[P],q=a[P],l.hasOwnProperty(P)&&B!==q&&(B!=null||q!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,n));break;default:Yt(t,n,P,B,l,q)}return;default:if(Bs(n)){for(var Kt in a)B=a[Kt],a.hasOwnProperty(Kt)&&B!==void 0&&!l.hasOwnProperty(Kt)&&Sf(t,n,Kt,void 0,l,B);for(H in l)B=l[H],q=a[H],!l.hasOwnProperty(H)||B===q||B===void 0&&q===void 0||Sf(t,n,H,B,l,q);return}}for(var z in a)B=a[z],a.hasOwnProperty(z)&&B!=null&&!l.hasOwnProperty(z)&&Yt(t,n,z,null,l,B);for(Y in l)B=l[Y],q=a[Y],!l.hasOwnProperty(Y)||B===q||B==null&&q==null||Yt(t,n,Y,B,l,q)}function uy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function B1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],f=c.transferSize,g=c.initiatorType,E=c.duration;if(f&&E&&uy(g)){for(g=0,E=c.responseEnd,l+=1;l<a.length;l++){var R=a[l],P=R.startTime;if(P>E)break;var H=R.transferSize,Y=R.initiatorType;H&&uy(Y)&&(R=R.responseEnd,g+=H*(R<E?1:(E-P)/(R-P)))}if(--l,n+=8*(f+g)/(c.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var wf=null,Rf=null;function zu(t){return t.nodeType===9?t:t.ownerDocument}function cy(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hy(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function Cf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var xf=null;function k1(){var t=window.event;return t&&t.type==="popstate"?t===xf?!1:(xf=t,!0):(xf=null,!1)}var fy=typeof setTimeout=="function"?setTimeout:void 0,q1=typeof clearTimeout=="function"?clearTimeout:void 0,dy=typeof Promise=="function"?Promise:void 0,H1=typeof queueMicrotask=="function"?queueMicrotask:typeof dy<"u"?function(t){return dy.resolve(null).then(t).cat
vendor: 12,211 bytes, line 49
49ch(G1)}:fy;function G1(t){setTimeout(function(){throw t})}function Aa(t){return t==="head"}function my(t,n){var a=n,l=0;do{var c=a.nextSibling;if(t.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){t.removeChild(c),Tr(n);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ul(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Ul(a);for(var f=a.firstChild;f;){var g=f.nextSibling,E=f.nodeName;f[ii]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&Ul(t.ownerDocument.body);a=c}while(a);Tr(n)}function gy(t,n){var a=t;t=0;do{var l=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=l}while(a)}function Nf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Nf(a),Ls(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function F1(t,n,a,l){for(;t.nodeType===1;){var c=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[ii])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==c.rel||t.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||t.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||t.getAttribute("title")!==(c.title==null?null:c.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(f=t.getAttribute("src"),(f!==(c.src==null?null:c.src)||t.getAttribute("type")!==(c.type==null?null:c.type)||t.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=Vn(t.nextSibling),t===null)break}return null}function Q1(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Vn(t.nextSibling),t===null))return null;return t}function py(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Vn(t.nextSibling),t===null))return null;return t}function If(t){return t.data==="$?"||t.data==="$~"}function Df(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Y1(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Vn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var Vf=null;function yy(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return Vn(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function _y(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function vy(t,n,a){switch(n=zu(a),t){case"html":if(t=n.documentElement,!t)throw Error(r(452));return t;case"head":if(t=n.head,!t)throw Error(r(453));return t;case"body":if(t=n.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Ul(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ls(t)}var On=new Map,Ey=new Set;function ju(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Hi=W.d;W.d={f:K1,r:X1,D:Z1,C:$1,L:J1,m:W1,X:eT,S:tT,M:nT};function K1(){var t=Hi.f(),n=Cu();return t||n}function X1(t){var n=bn(t);n!==null&&n.tag===5&&n.type==="form"?Lg(n):Hi.r(t)}var _r=typeof document>"u"?null:document;function Ty(t,n,a){var l=_r;if(l&&typeof n=="string"&&n){var c=nn(n);c='link[rel="'+t+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Ey.has(c)||(Ey.add(c),t={rel:t,crossOrigin:a,href:n},l.querySelector(c)===null&&(n=l.createElement("link"),He(n,"link",t),ye(n),l.head.appendChild(n)))}}function Z1(t){Hi.D(t),Ty("dns-prefetch",t,null)}function $1(t,n){Hi.C(t,n),Ty("preconnect",t,n)}function J1(t,n,a){Hi.L(t,n,a);var l=_r;if(l&&t&&n){var c='link[rel="preload"][as="'+nn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+nn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+nn(a.imageSizes)+'"]')):c+='[href="'+nn(t)+'"]';var f=c;switch(n){case"style":f=vr(t);break;case"script":f=Er(t)}On.has(f)||(t=A({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),On.set(f,t),l.querySelector(c)!==null||n==="style"&&l.querySelector(Pl(f))||n==="script"&&l.querySelector(Bl(f))||(n=l.createElement("link"),He(n,"link",t),ye(n),l.head.appendChild(n)))}}function W1(t,n){Hi.m(t,n);var a=_r;if(a&&t){var l=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+nn(l)+'"][href="'+nn(t)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Er(t)}if(!On.has(f)&&(t=A({rel:"modulepreload",href:t},n),On.set(f,t),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bl(f)))return}l=a.createElement("link"),He(l,"link",t),ye(l),a.head.appendChild(l)}}}function tT(t,n,a){Hi.S(t,n,a);var l=_r;if(l&&t){var c=si(l).hoistableStyles,f=vr(t);n=n||"default";var g=c.get(f);if(!g){var E={loading:0,preload:null};if(g=l.querySelector(Pl(f)))E.loading=5;else{t=A({rel:"stylesheet",href:t,"data-precedence":n},a),(a=On.get(f))&&Of(t,a);var R=g=l.createElement("link");ye(R),He(R,"link",t),R._p=new Promise(function(P,H){R.onload=P,R.onerror=H}),R.addEventListener("load",function(){E.loading|=1}),R.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Lu(g,n,l)}g={type:"stylesheet",instance:g,count:1,state:E},c.set(f,g)}}}function eT(t,n){Hi.X(t,n);var a=_r;if(a&&t){var l=si(a).hoistableScripts,c=Er(t),f=l.get(c);f||(f=a.querySelector(Bl(c)),f||(t=A({src:t,async:!0},n),(n=On.get(c))&&Mf(t,n),f=a.createElement("script"),ye(f),He(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function nT(t,n){Hi.M(t,n);var a=_r;if(a&&t){var l=si(a).hoistableScripts,c=Er(t),f=l.get(c);f||(f=a.querySelector(Bl(c)),f||(t=A({src:t,async:!0,type:"module"},n),(n=On.get(c))&&Mf(t,n),f=a.createElement("script"),ye(f),He(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function by(t,n,a,l){var c=(c=bt.current)?ju(c):null;if(!c)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=vr(a.href),a=si(c).hoistableStyles,l=a.get(n),l||(l={type:"style",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=vr(a.href);var f=si(c).hoistableStyles,g=f.get(t);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(t,g),(f=c.querySelector(Pl(t)))&&!f._p&&(g.instance=f,g.state.loading=5),On.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},On.set(t,a),f||iT(c,t,a,g.state))),n&&l===null)throw Error(r(528,""));return g}if(n&&l!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Er(a),a=si(c).hoistableScripts,l=a.get(n),l||(l={type:"script",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function vr(t){return'href="'+nn(t)+'"'}function Pl(t){return'link[rel="stylesheet"]['+t+"]"}function Ay(t){return A({},t,{"data-precedence":t.precedence,precedence:null})}function iT(t,n,a,l){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=t.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),He(n,"link",a),ye(n),t.head.appendChild(n))}function Er(t){return'[src="'+nn(t)+'"]'}function Bl(t){return"script[async]"+t}function Sy(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=t.querySelector('style[data-href~="'+nn(a.href)+'"]');if(l)return n.instance=l,ye(l),l;var c=A({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),ye(l),He(l,"style",c),Lu(l,a.precedence,t),n.instance=l;case"stylesheet":c=vr(a.href);var f=t.querySelector(Pl(c));if(f)return n.state.loading|=4,n.instance=f,ye(f),f;l=Ay(a),(c=On.get(c))&&Of(l,c),f=(t.ownerDocument||t).createElement("link"),ye(f);var g=f;return g._p=new Promise(function(E,R){g.onload=E,g.onerror=R}),He(f,"link",l),n.state.loading|=4,Lu(f,a.precedence,t),n.instance=f;case"script":return f=Er(a.src),(c=t.querySelector(Bl(f)))?(n.instance=c,ye(c),c):(l=a,(c=On.get(f))&&(l=A({},a),Mf(l,c)),t=t.ownerDocument||t,c=t.createElement("script"),ye(c),He(c,"link",l),t.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,Lu(l,a.precedence,t));return n.instance}function Lu(t,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,g=0;g<l.length;g++){var E=l[g];if(E.dataset.precedence===n)f=E;else if(f!==c)break}f?f.parentNode.insertBefore(t,f.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Of(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Mf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var Uu=null;function wy(t,n,a){if(Uu===null){var l=new Map,c=Uu=new Map;c.set(a,l)}else c=Uu,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(t))return l;for(l.set(t,null),a=a.getElementsByTagName(t),c=0;c<a.length;c++){var f=a[c];if(!(f[ii]||f[pe]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(n)||"";g=t+g;var E=l.get(g);E?E.push(f):l.set(g,[f])}}return l}function Ry(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function aT(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Cy(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function sT(t,n,a,l){if(a.type==="stylesheet"&&(typeof l.media!="str
49ing"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=vr(l.href),f=n.querySelector(Pl(c));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Pu.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=f,ye(f);return}f=n.ownerDocument||n,l=Ay(l),(c=On.get(c))&&Of(l,c),f=f.createElement("link"),ye(f);var g=f;g._p=new Promise(function(E,R){g.onload=E,g.onerror=R}),He(f,"link",l),a.instance=f}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=Pu.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var zf=0;function rT(t,n){return t.stylesheets&&t.count===0&&ku(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var l=setTimeout(function(){if(t.stylesheets&&ku(t,t.stylesheets),t.unsuspend){var f=t.unsuspend;t.unsuspend=null,f()}},6e4+n);0<t.imgBytes&&zf===0&&(zf=62500*B1());var c=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ku(t,t.stylesheets),t.unsuspend)){var f=t.unsuspend;t.unsuspend=null,f()}},(t.imgBytes>zf?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ku(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Bu=null;function ku(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Bu=new Map,n.forEac
vendor: 9,857 bytes, line 49
49h(lT,t),Bu=null,Pu.call(t))}function lT(t,n){if(!(n.state.loading&4)){var a=Bu.get(t);if(a)var l=a.get(null);else{a=new Map,Bu.set(t,a);for(var c=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var g=c[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}c=n.instance,g=c.getAttribute("data-precedence"),f=a.get(g)||l,f===l&&a.set(null,c),a.set(g,c),this.count++,l=Pu.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(c,t.firstChild)),n.state.loading|=4}}var kl={$$typeof:_t,Provider:null,Consumer:null,_currentValue:ct,_currentValue2:ct,_threadCount:0};function oT(t,n,a,l,c,f,g,E,R){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.hiddenUpdates=ei(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function xy(t,n,a,l,c,f,g,E,R,P,H,Y){return t=new oT(t,n,a,g,R,P,H,Y,E),n=1,f===!0&&(n|=24),f=mn(3,null,null,n),t.current=f,f.stateNode=t,n=dh(),n.refCount++,t.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:n},yh(f),t}function Ny(t){return t?(t=$s,t):$s}function Iy(t,n,a,l,c,f){c=Ny(c),l.context===null?l.context=c:l.pendingContext=c,l=fa(n),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=da(t,l,n),a!==null&&(un(a,t,n),vl(a,t,n))}function Dy(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function jf(t,n){Dy(t,n),(t=t.alternate)&&Dy(t,n)}function Vy(t){if(t.tag===13||t.tag===31){var n=ls(t,67108864);n!==null&&un(n,t,67108864),jf(t,67108864)}}function Oy(t){if(t.tag===13||t.tag===31){var n=vn();n=Xa(n);var a=ls(t,n);a!==null&&un(a,t,n),jf(t,n)}}var qu=!0;function uT(t,n,a,l){var c=G.T;G.T=null;var f=W.p;try{W.p=2,Lf(t,n,a,l)}finally{W.p=f,G.T=c}}function cT(t,n,a,l){var c=G.T;G.T=null;var f=W.p;try{W.p=8,Lf(t,n,a,l)}finally{W.p=f,G.T=c}}function Lf(t,n,a,l){if(qu){var c=Uf(l);if(c===null)Af(t,n,l,Hu,a),zy(t,l);else if(fT(c,t,n,a,l))l.stopPropagation();else if(zy(t,l),n&4&&-1<hT.indexOf(t)){for(;c!==null;){var f=bn(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=Wn(f.pendingLanes);if(g!==0){var E=f;for(E.pendingLanes|=2,E.entangledLanes|=2;g;){var R=1<<31-ue(g);E.entanglements[1]|=R,g&=~R}_i(f),(Pt&6)===0&&(wu=$e()+500,zl(0))}}break;case 31:case 13:E=ls(f,2),E!==null&&un(E,f,2),Cu(),jf(f,2)}if(f=Uf(l),f===null&&Af(t,n,l,Hu,a),f===c)break;c=f}c!==null&&l.stopPropagation()}else Af(t,n,l,null,a)}}function Uf(t){return t=An(t),Pf(t)}var Hu=null;function Pf(t){if(Hu=null,t=ai(t),t!==null){var n=h(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=d(n),t!==null)return t;t=null}else if(a===31){if(t=y(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Hu=t,null}function My(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Fa()){case Gr:return 2;case Fr:return 8;case $i:case Gc:return 32;case To:return 268435456;default:return 32}default:return 32}}var Bf=!1,Sa=null,wa=null,Ra=null,ql=new Map,Hl=new Map,Ca=[],hT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function zy(t,n){switch(t){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":wa=null;break;case"mouseover":case"mouseout":Ra=null;break;case"pointerover":case"pointerout":ql.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hl.delete(n.pointerId)}}function Gl(t,n,a,l,c,f){return t===null||t.nativeEvent!==f?(t={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},n!==null&&(n=bn(n),n!==null&&Vy(n)),t):(t.eventSystemFlags|=l,n=t.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),t)}function fT(t,n,a,l,c){switch(n){case"focusin":return Sa=Gl(Sa,t,n,a,l,c),!0;case"dragenter":return wa=Gl(wa,t,n,a,l,c),!0;case"mouseover":return Ra=Gl(Ra,t,n,a,l,c),!0;case"pointerover":var f=c.pointerId;return ql.set(f,Gl(ql.get(f)||null,t,n,a,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Hl.set(f,Gl(Hl.get(f)||null,t,n,a,l,c)),!0}return!1}function jy(t){var n=ai(t.target);if(n!==null){var a=h(n);if(a!==null){if(n=a.tag,n===13){if(n=d(a),n!==null){t.blockedOn=n,Un(t.priority,function(){Oy(a)});return}}else if(n===31){if(n=y(a),n!==null){t.blockedOn=n,Un(t.priority,function(){Oy(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Gu(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=Uf(t.nativeEvent);if(a===null){a=t.nativeEvent;var l=new a.constructor(a.type,a);il=l,a.target.dispatchEvent(l),il=null}else return n=bn(a),n!==null&&Vy(n),t.blockedOn=a,!1;n.shift()}return!0}function Ly(t,n,a){Gu(t)&&a.delete(n)}function dT(){Bf=!1,Sa!==null&&Gu(Sa)&&(Sa=null),wa!==null&&Gu(wa)&&(wa=null),Ra!==null&&Gu(Ra)&&(Ra=null),ql.forEach(Ly),Hl.forEach(Ly)}function Fu(t,n){t.blockedOn===n&&(t.blockedOn=null,Bf||(Bf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,dT)))}var Qu=null;function Uy(t){Qu!==t&&(Qu=t,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Qu===t&&(Qu=null);for(var n=0;n<t.length;n+=3){var a=t[n],l=t[n+1],c=t[n+2];if(typeof l!="function"){if(Pf(l||a)===null)continue;break}var f=bn(a);f!==null&&(t.splice(n,3),n-=3,Lh(f,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Tr(t){function n(R){return Fu(R,t)}Sa!==null&&Fu(Sa,t),wa!==null&&Fu(wa,t),Ra!==null&&Fu(Ra,t),ql.forEach(n),Hl.forEach(n);for(var a=0;a<Ca.length;a++){var l=Ca[a];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Ca.length&&(a=Ca[0],a.blockedOn===null);)jy(a),a.blockedOn===null&&Ca.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],f=a[l+1],g=c[Ve]||null;if(typeof f=="function")g||Uy(a);else if(g){var E=null;if(f&&f.hasAttribute("formAction")){if(c=f,g=f[Ve]||null)E=g.formAction;else if(Pf(c)!==null)continue}else E=g.action;typeof E=="function"?a[l+1]=E:(a.splice(l,3),l-=3),Uy(a)}}}function Py(){function t(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return c=g})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function kf(t){this._internalRoot=t}Yu.prototype.render=kf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,l=vn();Iy(a,l,t,n,null,null)},Yu.prototype.unmount=kf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Iy(t.current,2,null,t,null,null),Cu(),n[ni]=null}};function Yu(t){this._internalRoot=t}Yu.prototype.unstable_scheduleHydration=function(t){if(t){var n=Co();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Ca.length&&n!==0&&n<Ca[a].priority;a++);Ca.splice(a,0,t),a===0&&jy(t)}};var By=e.version;if(By!=="19.2.4")throw Error(r(527,By,"19.2.4"));W.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=p(n),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var mT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};
vendor: 8,707 bytes, lines 49-149
49if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{jn=Ku.inject(mT),Ue=Ku}catch{}}return Ql.createRoot=function(t,n){if(!o(t))throw Error(r(299));var a=!1,l="",c=Yg,f=Kg,g=Xg;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError)),n=xy(t,1,!1,null,null,a,l,null,c,f,g,Py),t[ni]=n.current,bf(t),new kf(n)},Ql.hydrateRoot=function(t,n,a){if(!o(t))throw Error(r(299));var l=!1,c="",f=Yg,g=Kg,E=Xg,R=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),n=xy(t,1,!0,n,a??null,l,c,R,f,g,E,Py),n.context=Ny(null),a=n.current,l=vn(),l=Xa(l),c=fa(l),c.callback=null,da(a,c,l),a=l,n.current.lanes=a,Ya(n,a),_i(n),t[ni]=n.current,bf(t),new Yu(n)},Ql.version="19.2.4",Ql}var Zy;function ST(){if(Zy)return Gf.exports;Zy=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),Gf.exports=AT(),Gf.exports}var wT=ST();const RT=S0(wT),CT=["Badajoz","Cáceres"],xT=["Oficinas y Despachos","Comercio Minorista","Hostelería y Restauración","Construcción y Reformas","Industria Manufacturera","Transporte y Logística","Agricultura y Ganadería","Sanidad y Servicios Sociales","Educación","Tecnología e Informática","Talleres Mecánicos","Limpieza y Mantenimiento"],NT="Incluye trabajos con radiaciones, agentes cancerígenos, productos químicos de alto riesgo, inmersión, minería, explosivos, alta tensión, construcción, etc. (Anexo I RD 39/1997)";/**
50 * @license lucide-react v0.563.0 - ISC
51 *
52 * This source code is licensed under the ISC license.
53 * See the LICENSE file in the root directory of this source tree.
54 */const R0=(...s)=>s.filter((e,i,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===i).join(" ").trim();/**
55 * @license lucide-react v0.563.0 - ISC
56 *
57 * This source code is licensed under the ISC license.
58 * See the LICENSE file in the root directory of this source tree.
59 */const IT=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
60 * @license lucide-react v0.563.0 - ISC
61 *
62 * This source code is licensed under the ISC license.
63 * See the LICENSE file in the root directory of this source tree.
64 */const DT=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,i,r)=>r?r.toUpperCase():i.toLowerCase());/**
65 * @license lucide-react v0.563.0 - ISC
66 *
67 * This source code is licensed under the ISC license.
68 * See the LICENSE file in the root directory of this source tree.
69 */const $y=s=>{const e=DT(s);return e.charAt(0).toUpperCase()+e.slice(1)};/**
70 * @license lucide-react v0.563.0 - ISC
71 *
72 * This source code is licensed under the ISC license.
73 * See the LICENSE file in the root directory of this source tree.
74 */var VT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
75 * @license lucide-react v0.563.0 - ISC
76 *
77 * This source code is licensed under the ISC license.
78 * See the LICENSE file in the root directory of this source tree.
79 */const OT=s=>{for(const e in s)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
80 * @license lucide-react v0.563.0 - ISC
81 *
82 * This source code is licensed under the ISC license.
83 * See the LICENSE file in the root directory of this source tree.
84 */const MT=je.forwardRef(({color:s="currentColor",size:e=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:o="",children:h,iconNode:d,...y},v)=>je.createElement("svg",{ref:v,...VT,width:e,height:e,stroke:s,strokeWidth:r?Number(i)*24/Number(e):i,className:R0("lucide",o),...!h&&!OT(y)&&{"aria-hidden":"true"},...y},[...d.map(([p,b])=>je.createElement(p,b)),...Array.isArray(h)?h:[h]]));/**
85 * @license lucide-react v0.563.0 - ISC
86 *
87 * This source code is licensed under the ISC license.
88 * See the LICENSE file in the root directory of this source tree.
89 */const en=(s,e)=>{const i=je.forwardRef(({className:r,...o},h)=>je.createElement(MT,{ref:h,iconNode:e,className:R0(`lucide-${IT($y(s))}`,`lucide-${s}`,r),...o}));return i.displayName=$y(s),i};/**
90 * @license lucide-react v0.563.0 - ISC
91 *
92 * This source code is licensed under the ISC license.
93 * See the LICENSE file in the root directory of this source tree.
94 */const zT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],jT=en("arrow-right",zT);/**
95 * @license lucide-react v0.563.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const LT=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],UT=en("badge-check",LT);/**
100 * @license lucide-react v0.563.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */const PT=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],BT=en("building",PT);/**
105 * @license lucide-react v0.563.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const kT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qT=en("chevron-down",kT);/**
110 * @license lucide-react v0.563.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const HT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],GT=en("chevron-up",HT);/**
115 * @license lucide-react v0.563.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const FT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],QT=en("circle-alert",FT);/**
120 * @license lucide-react v0.563.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const YT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],KT=en("circle-check-big",YT);/**
125 * @license lucide-react v0.563.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const XT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ec=en("circle-check",XT);/**
130 * @license lucide-react v0.563.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const ZT=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Jy=en("external-link",ZT);/**
135 * @license lucide-react v0.563.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const $T=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],JT=en("loader-circle",$T);/**
140 * @license lucide-react v0.563.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const WT=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],rd=en("map-pin",WT);/**
145 * @license lucide-react v0.563.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const tb=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 
1490 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Wy=en("phone",tb);/**
150 * @license lucide-react v0.563.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const eb=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],t_=en("shield",eb);/**
155 * @license lucide-react v0.563.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const nb=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],ib=en("star",nb);/**
160 * @license lucide-react v0.563.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const ab=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],e_=en("users",ab),sb=({onComplete:s,initialData:e})=>{const[i,r]=je.useState(e),[o,h]=je.useState({}),d=(p,b)=>{r(A=>({...A,[p]:b})),o[p]&&h(A=>{const O={...A};return delete O[p],O})},y=()=>{const p={};return i.sector||(p.sector="Selecciona un sector."),(!i.employees||i.employees<=0)&&(p.employees="Indica el nº de trabajadores."),i.province||(p.province="Selecciona tu provincia."),i.municipality||(p.municipality="Indica tu localidad."),i.companyName||(p.companyName="Indica el nombre de la empresa."),i.contactName||(p.contactName="Indica el nombre de contacto."),i.c
164ontactPhone||(p.contactPhone="Indica un teléfono de contacto."),h(p),Object.keys(p).length===0},v=p=>{p.preventDefault(),y()&&s(i)};return x.jsxs("div",{className:"max-w-2xl mx-auto bg-white rounded-xl shadow-lg border border-gray-100 overflow-hidden",children:[x.jsxs("div",{className:"bg-brand-600 p-6 text-white",children:[x.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Analicemos tu caso"}),x.jsx("p",{className:"text-brand-100",children:"Responde estas breves preguntas para recomendarte la mejor forma de llevar la PRL de tu empresa"})]}),x.jsxs("form",{onSubmit:v,className:"p-6 space-y-8",children:[x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[x.jsxs("div",{children:[x.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2 flex items-center gap-2",children:[x.jsx(BT,{className:"w-4 h-4 text-brand-600"})," Sector de Actividad"]}),x.jsxs("select",{className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.sector?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,value:i.sector||"",onChange:p=>d("sector",p.target.value),children:[x.jsx("option",{value:"",children:"Selecciona una opción..."}),xT.map(p=>x.jsx("option",{value:p,children:p},p))]}),o.sector&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.sector})]}),x.jsxs("div",{children:[x.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2 flex items-center gap-2",children:[x.jsx(e_,{className:"w-4 h-4 text-brand-600"})," Nº de Trabajadores"]}),x.jsx("input",{type:"number",min:"1",className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.employees?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,placeholder:"Ej: 5",value:i.employees||"",onChange:p=>d("employees",parseInt(p.target.value))}),o.employees&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.employees})]})]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[x.jsxs("div",{children:[x.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2 flex items-center gap-2",children:[x.jsx(rd,{className:"w-4 h-4 text-brand-600"})," Provincia"]}),x.jsxs("select",{className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.province?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,value:i.province||"",onChange:p=>d("province",p.target.value),children:[x.jsx("option",{value:"",children:"Selecciona..."}),CT.map(p=>x.jsx("option",{value:p,children:p},p))]}),o.province&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.province})]}),x.jsxs("div",{children:[x.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2 flex items-center gap-2",children:[x.jsx(rd,{className:"w-4 h-4 text-brand-600"})," Municipio"]}),x.jsx("input",{type:"text",className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.municipality?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,placeholder:"Ej: Mérida, Plasencia, Don Benito...",value:i.municipality||"",onChange:p=>d("municipality",p.target.value)}),o.municipality&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.municipality})]})]})]}),x.jsxs("div",{className:"space-y-6 pt-6 border-t border-gray-100",children:[x.jsxs("h3",{className:"text-lg font-semibold text-gray-800 flex items-center gap-2",children:[x.jsx(e_,{className:"w-5 h-5 text-brand-600"})," Datos de Contacto"]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Empresa / Razón Social"}),x.jsx("input",{type:"text",className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.companyName?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,placeholder:"Nombre de tu empresa",value:i.companyName||"",onChange:p=>d("companyName",p.target.value)}),o.companyName&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.companyName})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Nombre de Contacto"}),x.jsx("input",{type:"text",className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.contactName?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,placeholder:"Tu nombre",value:i.contactName||"",onChange:p=>d("contactName",p.target.value)}),o.contactName&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.contactName})]})]}),x.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Teléfono"}),x.jsx("input",{type:"tel",className:`w-full p-3 border rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 ${o.contactPhone?"border-red-500 bg-red-50":"border-gray-300 bg-white"}`,placeholder:"Ej: 600 000 000",value:i.contactPhone||"",onChange:p=>d("contactPhone",p.target.value)}),o.contactPhone&&x.jsx("p",{className:"text-red-500 text-xs mt-1",children:o.contactPhone})]})}),x.jsxs("div",{className:"space-y-4 pt-4",children:[x.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[x.jsxs("div",{className:"relative flex items-center",children:[x.jsx("input",{type:"checkbox",className:"peer h-5 w-5 cursor-pointer appearance-none rounded-md border border-gray-300 transition-all checked:border-brand-600 checked:bg-brand-600 bg-white",checked:!!i.isHighRisk,onChange:p=>d("isHighRisk",p.target.checked)}),x.jsx(ec,{className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-3.5 h-3.5 text-white opacity-0 peer-checked:opacity-100"})]}),x.jsxs("div",{className:"flex-1",children:[x.jsx("span",{className:"text-gray-800 font-medium",children:"¿Realiza actividades de alto riesgo?"}),x.jsx("p",{className:"text-sm text-gray-500 mt-1",children:NT})]})]}),x.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:x.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[x.jsxs("div",{className:"relative flex items-center",children:[x.jsx("input",{type:"checkbox",className:"peer h-5 w-5 cursor-pointer appearance-none rounded-md border border-gray-300 transition-all checked:border-brand-600 checked:bg-brand-600 bg-white",checked:!!i.hasMultipleCenters,onChange:p=>d("hasMultipleCenters",p.target.checked)}),x.jsx(ec,{className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-3.5 h-3.5 text-white opacity-0 peer-checked:opacity-100"})]}),x.jsx("span",{className:"text-gray-700",children:"¿Tienes varios centros de trabajo?"})]})}),x.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[x.jsxs("div",{className:"relative flex items-center mt-0.5",children:[x.jsx("input",{type:"checkbox",className:"peer h-5 w-5 cursor-pointer appearance-none rounded-md border border-gray-300 transition-all checked:border-brand-600 checked:bg-brand-600 bg-white",checked:!!i.hasBasicTraining,onChange:p=>d("hasBasicTraining",p.target.checked)}),x.jsx(ec,{className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-3.5 h-3.5 text-white opacity-0 peer-checked:opacity-100"})]}),x.jsxs("div",{className:"flex-1",children:[x.jsx("span",{className:"text-gray-800 font-medium",children:"¿El empresario dispone de formación mínima en PRL?"}),x.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Nivel Básico (30-50 horas) o superior."})]})]})]}),x.jsxs("div",{children:[x.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Completa tu consulta ",x.jsx("span",{className:"text-gray-400 font-normal",children:"(Opcional)"})]}),x.jsx("textarea",{className:"w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-brand-500 outline-none text-gray-900 bg-white h-24 resize-none",placeholder:"Cuéntanos más detalles sobre tu caso...",value:i.query||"",onChange:p=>d("query",p.target.value)})]})]}),x.jsxs("button",{type:"submit",className:"w-full bg-brand-600 hover:bg-brand-700 text-white font-bold py-4 rounded-lg shadow-lg transition transform hover:scale-[1.01] flex justify-center items-center gap-2",children:["Analizar mi caso",x.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]})]})]})},rb=({results:s,onConsult:e,onViewSPAs:i})=>{var v;const[r,o]=je.useState(((v=s[0])==null?void 0:v.type)||null),h=p=>{o(r===p?null:p)},d=s.find(p=>p.isRecommended),y=s.filter(p=>!p.isRecommended);
164return x.jsxs("div",{className:"max-w-3xl mx-auto space-y-8 animate-fade-in",children:[x.jsxs("div",{className:"text-center space-y-2",children:[x.jsx("h2",{className:"text-3xl font-bold text-gray-900",children:"Tu Análisis Personalizado"}),x.jsx("p",{className:"text-lg text-gray-600",children:"Basado en tus datos, estas son tus opciones de prevención."})]}),d&&x.jsxs("div",{className:"bg-white rounded-xl shadow-xl border-2 border-secondary-600 overflow-hidden relative",children:[x.jsx("div",{className:"absolute top-0 right-0 bg-secondary-600 text-white text-xs font-bold px-3 py-1 rounded-bl-lg uppercase tracking-wide",children:"Opción Recomendada"}),x.jsxs("div",{className:"p-6 md:p-8",children:[x.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[x.jsx("div",{className:"bg-secondary-100 p-3 rounded-full",children:x.jsx(t_,{className:"w-8 h-8 text-secondary-600"})}),x.jsxs("div",{children:[x.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:d.title}),x.jsx("p",{className:"text-secondary-700 font-medium mt-1",children:d.whyRecommended})]})]}),x.jsx("p",{className:"text-gray-600 mb-6 text-lg leading-relaxed",children:d.description}),x.jsxs("div",{className:"bg-secondary-50 rounded-lg p-5",children:[x.jsxs("h4",{className:"font-semibold text-secondary-900 mb-3 flex items-center gap-2",children:[x.jsx(KT,{className:"w-5 h-5"})," ¿Qué implica esta opción?"]}),x.jsx("ul",{className:"space-y-2",children:d.details.map((p,b)=>x.jsxs("li",{className:"flex items-start gap-2 text-secondary-800 text-sm",children:[x.jsx("span",{className:"mt-1.5 w-1.5 h-1.5 bg-secondary-600 rounded-full flex-shrink-0"}),p]},b))})]})]})]}),x.jsx("div",{className:"my-8",children:x.jsxs("button",{onClick:i,className:"w-full group relative bg-gradient-to-br from-brand-600 to-brand-700 text-white p-6 rounded-xl text-left shadow-lg hover:shadow-xl hover:scale-[1.01] transition-all flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx("div",{className:"bg-white/20 p-3 rounded-lg",children:x.jsx(t_,{className:"w-8 h-8"})}),x.jsxs("div",{children:[x.jsx("span",{className:"block font-bold text-xl",children:"Ver SPAs Recomendados"}),x.jsx("span",{className:"text-brand-100 text-sm",children:"Compara las mejores opciones en tu zona"})]})]}),x.jsx(jT,{className:"w-6 h-6 opacity-80 group-hover:translate-x-1 transition-transform"})]})}),x.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:[x.jsx("div",{className:"bg-gray-50 p-4 border-b border-gray-200",children:x.jsx("h3",{className:"font-semibold text-gray-700",children:"Otras modalidades permitidas legalmente"})}),x.jsx("div",{className:"divide-y divide-gray-100",children:y.map(p=>x.jsxs("div",{className:"transition-colors hover:bg-gray-50",children:[x.jsxs("button",{onClick:()=>h(p.type),className:"w-full flex items-center justify-between p-5 text-left focus:outline-none",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:`w-3 h-3 rounded-full ${p.isRecommended?"bg-secondary-500":"bg-gray-300"}`}),x.jsx("span",{className:"font-medium text-gray-900",children:p.title})]}),r===p.type?x.jsx(GT,{className:"w-5 h-5 text-gray-400"}):x.jsx(qT,{className:"w-5 h-5 text-gray-400"})]}),r===p.type&&x.jsxs("div",{className:"px-5 pb-5 pl-11",children:[x.jsx("p",{className:"text-gray-600 mb-3 text-sm",children:p.description}),x.jsx("ul",{className:"space-y-1",children:p.details.map((b,A)=>x.jsxs("li",{className:"text-xs text-gray-500 flex items-start gap-2",children:[x.jsx("span",{className:"mt-1 w-1 h-1 bg-gray-400 rounded-full flex-shrink-0"}),b]},A))})]})]},p.type))})]}),x.jsxs("div",{className:"bg-orange-50 rounded-lg p-5 border border-orange-100 flex gap-4",children:[x.jsx(QT,{className:"w-6 h-6 text-orange-500 flex-shrink-0"}),x.jsxs("div",{children:[x.jsx("h4",{className:"font-bold text-orange-900 mb-1",children:"Importante: Elijas lo que elijas"}),x.jsxs("p",{className:"text-sm text-orange-800 leading-relaxed",children:["Siempre necesitarás tener: ",x.jsx("strong",{children:"Evaluación de Riesgos"}),", ",x.jsx("strong",{children:"Planificación Preventiva"}),", ",x.jsx("strong",{children:"Formación"})," a trabajadores y ofrecer ",x.jsx("strong",{children:"Vigilancia de la Salud"}),"."]})]})]})]})},lb=()=>{};var n_={};/**
165 * @license
166 * Copyright 2017 Google LLC
167 *
168 * Licensed under the Apache License, Version 2.0 (the "License");
169 * you may not use this file except in compliance with the License.
170 * You may obtain a copy of the License at
171 *
172 *   http://www.apache.org/licenses/LICENSE-2.0
173 *
174 * Unless required by applicable law or agreed to in writing, software
175 * distributed under the License is distributed on an "AS IS" BASIS,
176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
177 * See the License for the specific language governing permissions and
178 * limitations under the License.
179 */const C0=function(s){const e=[];let i=0;for(let r=0;r<s.length;r++){let o=s.charCodeAt(r);o<128?e[i++]=o:o<2048?(e[i++]=o>>6|192,e[i++]=o&63|128):(o&64512)===55296&&r+1<s.length&&(s.charCodeAt(r+1)&64512)===56320?(o=65536+((o&1023)<<10)+(s.charCodeAt(++r)&1023),e[i++]=o>>18|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128,e[i++]=o&63|128):(e[i++]=o>>12|224,e[i++]=o>>6&63|128,e[i++]=o&63|128)}return e},ob=function(s){const e=[];let i=0,r=0;for(;i<s.length;){const o=s[i++];if(o<128)e[r++]=String.fromCharCode(o);else if(o>191&&o<224){const h=s[i++];e[r++]=String.fromCharCode((o&31)<<6|h&63)}else if(o>239&&o<365){const h=s[i++],d=s[i++],y=s[i++],v=((o&7)<<18|(h&63)<<12|(d&63)<<6|y&63)-65536;e[r++]=String.fromCharCode(55296+(v>>10)),e[r++]=String.fromCharCode(56320+(v&1023))}else{const h=s[i++],d=s[i++];e[r++]=String.fromCharCode((o&15)<<12|(h&63)<<6|d&63)}}return e.join("")},x0={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(s,e){if(!Array.isArray(s))throw Error("encodeByteArray takes an array as a parameter");this.init_();const i=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let o=0;o<s.length;o+=3){const h=s[o],d=o+1<s.length,y=d?s[o+1]:0,v=o+2<s.length,p=v?s[o+2]:0,b=h>>2,A=(h&3)<<4|y>>4;let O=(y&15)<<2|p>>6,Q=p&63;v||(Q=64,d||(O=64)),r.push(i[b],i[A],i[O],i[Q])}return r.join("")},encodeString(s,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(s):this.encodeByteArray(C0(s),e)},decodeString(s,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(s):ob(this.decodeStringToByteArray(s,e))},decodeStringToByteArray(s,e){this.init_();const i=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let o=0;o<s.length;){const h=i[s.charAt(o++)],y=o<s.length?i[s.charAt(o)]:0;++o;const p=o<s.length?i[s.charAt(o)]:64;++o;const A=o<s.length?i[s.charAt(o)]:64;if(++o,h==null||y==null||p==null||A==null)throw new ub;const O=h<<2|y>>4;if(r.push(O),p!==64){const Q=y<<4&240|p>>2;if(r.push(Q),A!==64){const J=p<<6&192|A;r.push(J)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let s=0;s<this.ENCODED_VALS.length;s++)this.byteToCharMap_[s]=this.ENCODED_VALS.charAt(s),this.charToByteMap_[this.byteToCharMap_[s]]=s,this.byteToCharMapWebSafe_[s]=this.ENCODED_VALS_WEBSAFE.charAt(s),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[s]]=s,s>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(s)]=s,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(s)]=s)}}};class ub extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const cb=function(s){const e=C0(s);return x0.encodeByteArray(e,!0)},oc=function(s){return cb(s).replace(/\./g,"")},hb=function(s){try{return x0.decodeString(s,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
180 * @license
181 * Copyright 2022 Google LLC
182 *
183 * Licensed under the Apache License, Version 2.0 (the "License");
184 * you may not use this file except in compliance with the License.
185 * You may obtain a copy of the License at
186 *
187 *   http://www.apache.org/licenses/LICENSE-2.0
188 *
189 * Unless required by applicable law or agreed to in writing, software
190 * distributed under the License is distributed on an "AS IS" BASIS,
191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192 * See the License for the specific language governing permissions and
193 * limitations under the License.
194 */function fb(){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.")}/**
195 * @license
196 * Copyright 2022 Google LLC
197 *
198 * Licensed under the Apache License, Version 2.0 (the "License");
199 * you may not use this file except in compliance with the License.
200 * You may obtain a copy of the License at
201 *
202 *   http://www.apache.org/licenses/LICENSE-2.0
203 *
204 * Unless required by applicable law or agreed to in writing, software
205 * distributed under the License is distributed on an "AS IS" BASIS,
206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
207 * See the License for the specific language governing permissions and
208 * limitations under the License.
209 */const db=()=>fb().__FIREBASE_DEFAULTS__,mb=()=>{if(typeof process>"u"||typeof n_>"u")return;const s=n_.__FIREBASE_DEFAULTS__;if(s)return JSON.parse(s)},gb=()=>{if(typeof document>"u")return;let s;try{s=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=s&&hb(s[1]);return e&&JSON.parse(e)},jd=()=>{try{return lb()||db()||mb()||gb()}catch(s){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${s}`);return}},pb=s=>{var e,i;return(i=(e=jd())==null?void 0:e.emulatorHosts)==null?void 0:i[s]},yb=s=>{const e=pb(s);if(!e)return;const i=e.lastIndexOf(":");if(i<=0||i+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(i+1),10);return e[0]==="["?[e.substring(1,i-1),r]:[e.substring(0,i),r]},N0=()=>{var s;return(s=jd())==null?void 0:s.config};/**
210 * @license
211 * Copyright 2017 Google LLC
212 *
213 * Licensed under the Apache License, Version 2.0 (the "License");
214 * you may not use this file except in compliance with the License.
215 * You may obtain a copy of the License at
216 *
217 *   http://www.apache.org/licenses/LICENSE-2.0
218 *
219 * Unless required by applicable law or agreed to in writing, software
220 * distributed under the License is distributed on an "AS IS" BASIS,
221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
222 * See the License for the specific language governing permissions and
223 * limitations under the License.
224 */class _b{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,i)=>{this.resolve=e,this.reject=i})}wrapCallback(e){return(i,r)=>{i?this.reject(i):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(i):e(i,r))}}}/**
225 * @license
226 * Copyright 2025 Google LLC
227 *
228 * Licensed under the Apache License, Version 2.0 (the "License");
229 * you may not use this file except in compliance with the License.
230 * You may obtain a copy of the License at
231 *
232 *   http://www.apache.org/licenses/LICENSE-2.0
233 *
234 * Unless required by applicable law or agreed to in writing, software
235 * distributed under the License is distributed on an "AS IS" BASIS,
236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237 * See the License for the specific language governing permissions and
238 * limitations under the License.
239 */function Ld(s){try{return(s.startsWith("http://")||s.startsWith("https://")?new URL(s).hostname:s).endsWith(".cloudworkstations.dev")}catch{return!1}}async function vb(s){return(await fetch(s,{credentials:"include"})).ok}/**
240 * @license
241 * Copyright 2021 Google LLC
242 *
243 * Licensed under the Apache License, Version 2.0 (the "License");
244 * you may not use this file except in compliance with the License.
245 * You may obtain a copy of the License at
246 *
247 *   http://www.apache.org/licenses/LICENSE-2.0
248 *
249 * Unless required by applicable law or agreed to in writing, software
250 * distributed under the License is distributed on an "AS IS" BASIS,
251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
252 * See the License for the specific language governing permissions and
253 * limitations under the License.
254 */function Eb(s,e){if(s.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const i={alg:"none",type:"JWT"},r=e||"demo-project",o=s.iat||0,h=s.sub||s.user_id;if(!h)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const d={iss:`https://securetoken.google.com/${r}`,aud:r,iat:o,exp:o+3600,auth_time:o,sub:h,user_id:h,firebase:{sign_in_provider:"custom",identities:{}},...s};return[oc(JSON.stringify(i)),oc(JSON.stringify(d)),""].join(".")}const Wl={};function Tb(){const s={prod:[],emulator:[]};for(const e of Object.keys(Wl))Wl[e]?s.emulator.push(e):s.prod.push(e);return s}function bb(s){let e=document.getElementById(s),i=!1;return e||(e=document.createElement("div"),e.setAttribute("id",s),i=!0),{created:i,element:e}}let i_=!1;function Ab(s,e){if(typeof window>"u"||typeof document>"u"||!Ld(window.location.host)||Wl[s]===e||Wl[s]||i_)return;Wl[s]=e;function i(O){return`__firebase__banner__${O}`}const r="__firebase__banner",h=Tb().prod.length>0;function d(){const O=document.getElementById(r);O&&O.remove()}function y(O){O.style.display="flex",O.style.background="#7faaf0",O.style.position="fixed",O.style.bottom="5px",O.style.left="5px",O.style.padding=".5em",O.style.borderRadius="5px",O.style.alignItems="center"}function v(O,Q){O.setAttribute("width","24"),O.setAttribute("id",Q),O.setAttribute("height","24"),O.setAttribute("viewBox","0 0 24 24"),O.setAttribute("fill","none"),O.style.marginLeft="-6px"}function p(){const O=document.createElement("span");
254return O.style.cursor="pointer",O.style.marginLeft="16px",O.style.fontSize="24px",O.innerHTML=" &times;",O.onclick=()=>{i_=!0,d()},O}function b(O,Q){O.setAttribute("id",Q),O.innerText="Learn more",O.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",O.setAttribute("target","__blank"),O.style.paddingLeft="5px",O.style.textDecoration="underline"}function A(){const O=bb(r),Q=i("text"),J=document.getElementById(Q)||document.createElement("span"),et=i("learnmore"),nt=document.getElementById(et)||document.createElement("a"),yt=i("preprendIcon"),Tt=document.getElementById(yt)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(O.created){const _t=O.element;y(_t),b(nt,et);const Xt=p();v(Tt,yt),_t.append(Tt,J,nt,Xt),document.body.appendChild(_t)}h?(J.innerText="Preview backend disconnected.",Tt.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
255<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"/>
256</g>
257<defs>
258<clipPath id="clip0_6013_33858">
259<rect width="24" height="24" fill="white"/>
260</clipPath>
261</defs>`):(Tt.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
262<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"/>
263</g>
264<defs>
265<clipPath id="clip0_6083_34804">
266<rect width="24" height="24" fill="white"/>
267</clipPath>
268</defs>`,J.innerText="Preview backend running in this workspace."),J.setAttribute("id",Q)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",A):A()}/**
269 * @license
270 * Copyright 2017 Google LLC
271 *
272 * Licensed under the Apache License, Version 2.0 (the "License");
273 * you may not use this file except in compliance with the License.
274 * You may obtain a copy of the License at
275 *
276 *   http://www.apache.org/licenses/LICENSE-2.0
277 *
278 * Unless required by applicable law or agreed to in writing, software
279 * distributed under the License is distributed on an "AS IS" BASIS,
280 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
281 * See the License for the specific language governing permissions and
282 * limitations under the License.
283 */function Sb(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function wb(){var e;const s=(e=jd())==null?void 0:e.forceEnvironment;if(s==="node")return!0;if(s==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function Rb(){const s=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof s=="object"&&s.id!==void 0}function Cb(){return!wb()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function I0(){try{return typeof indexedDB=="object"}catch{return!1}}function D0(){return new Promise((s,e)=>{try{let i=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),i||self.indexedDB.deleteDatabase(r),s(!0)},o.onupgradeneeded=()=>{i=!1},o.onerror=()=>{var h;e(((h=o.error)==null?void 0:h.message)||"")}}catch(i){e(i)}})}function xb(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
284 * @license
285 * Copyright 2017 Google LLC
286 *
287 * Licensed under the Apache License, Version 2.0 (the "License");
288 * you may not use this file except in compliance with the License.
289 * You may obtain a copy of the License at
290 *
291 *   http://www.apache.org/licenses/LICENSE-2.0
292 *
293 * Unless required by applicable law or agreed to in writing, software
294 * distributed under the License is distributed on an "AS IS" BASIS,
295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
296 * See the License for the specific language governing permissions and
297 * limitations under the License.
298 */const Nb="FirebaseError";class qa extends Error{constructor(e,i,r){super(i),this.code=e,this.customData=r,this.name=Nb,Object.setPrototypeOf(this,qa.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,wc.prototype.create)}}class wc{constructor(e,i,r){this.service=e,this.serviceName=i,this.errors=r}create(e,...i){const r=i[0]||{},o=`${this.service}/${e}`,h=this.errors[e],d=h?Ib(h,r):"Error",y=`${this.serviceName}: ${d} (${o}).`;return new qa(o,y,r)}}function Ib(s,e){return s.replace(Db,(i,r)=>{const o=e[r];return o!=null?String(o):`<${r}?>`})}const Db=/\{\$([^}]+)}/g;function ao(s,e){if(s===e)return!0;const i=Object.keys(s),r=Object.keys(e);for(const o of i){if(!r.includes(o))return!1;const h=s[o],d=e[o];if(a_(h)&&a_(d)){if(!ao(h,d))return!1}else if(h!==d)return!1}for(const o of r)if(!i.includes(o))return!1;return!0}function a_(s){return s!==null&&typeof s=="object"}/**
299 * @license
300 * Copyright 2019 Google LLC
301 *
302 * Licensed under the Apache License, Version 2.0 (the "License");
303 * you may not use this file except in compliance with the License.
304 * You may obtain a copy of the License at
305 *
306 *   http://www.apache.org/licenses/LICENSE-2.0
307 *
308 * Unless required by applicable law or agreed to in writing, software
309 * distributed under the License is distributed on an "AS IS" BASIS,
310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
311 * See the License for the specific language governing permissions and
312 * limitations under the License.
313 */const Vb=1e3,Ob=2,Mb=14400*1e3,zb=.5;function s_(s,e=Vb,i=Ob){const r=e*Math.pow(i,s),o=Math.round(zb*r*(Math.random()-.5)*2);return Math.min(Mb,r+o)}/**
314 * @license
315 * Copyright 2021 Google LLC
316 *
317 * Licensed under the Apache License, Version 2.0 (the "License");
318 * you may not use this file except in compliance with the License.
319 * You may obtain a copy of the License at
320 *
321 *   http://www.apache.org/licenses/LICENSE-2.0
322 *
323 * Unless required by applicable law or agreed to in writing, software
324 * distributed under the License is distributed on an "AS IS" BASIS,
325 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
326 * See the License for the specific language governing permissions and
327 * limitations under the License.
328 */function Fi(s){return s&&s._delegate?s._delegate:s}class Qi{constructor(e,i,r){this.name=e,this.instanceFactory=i,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
329 * @license
330 * Copyright 2019 Google LLC
331 *
332 * Licensed under the Apache License, Version 2.0 (the "License");
333 * you may not use this file except in compliance with the License.
334 * You may obtain a copy of the License at
335 *
336 *   http://www.apache.org/licenses/LICENSE-2.0
337 *
338 * Unless required by applicable law or agreed to in writing, software
339 * distributed under the License is distributed on an "AS IS" BASIS,
340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
341 * See the License for the specific language governing permissions and
342 * limitations under the License.
343 */const Es="[DEFAULT]";/**
344 * @license
345 * Copyright 2019 Google LLC
346 *
347 * Licensed under the Apache License, Version 2.0 (the "License");
348 * you may not use this file except in compliance with the License.
349 * You may obtain a copy of the License at
350 *
351 *   http://www.apache.org/licenses/LICENSE-2.0
352 *
353 * Unless required by applicable law or agreed to in writing, softw
353are
354 * distributed under the License is distributed on an "AS IS" BASIS,
355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
356 * See the License for the specific language governing permissions and
357 * limitations under the License.
358 */class jb{constructor(e,i){this.name=e,this.container=i,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const i=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(i)){const r=new _b;if(this.instancesDeferred.set(i,r),this.isInitialized(i)||this.shouldAutoInitialize())try{const o=this.getOrInitializeService({instanceIdentifier:i});o&&r.resolve(o)}catch{}}return this.instancesDeferred.get(i).promise}getImmediate(e){const i=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),r=(e==null?void 0:e.optional)??!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(o){if(r)return null;throw o}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Ub(e))try{this.getOrInitializeService({instanceIdentifier:Es})}catch{}for(const[i,r]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(i);try{const h=this.getOrInitializeService({instanceIdentifier:o});r.resolve(h)}catch{}}}}clearInstance(e=Es){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(i=>"INTERNAL"in i).map(i=>i.INTERNAL.delete()),...e.filter(i=>"_delete"in i).map(i=>i._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Es){return this.instances.has(e)}getOptions(e=Es){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:i={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const o=this.getOrInitializeService({instanceIdentifier:r,options:i});for(const[h,d]of this.instancesDeferred.entries()){const y=this.normalizeInstanceIdentifier(h);r===y&&d.resolve(o)}return o}onInit(e,i){const r=this.normalizeInstanceIdentifier(i),o=this.onInitCallbacks.get(r)??new Set;o.add(e),this.onInitCallbacks.set(r,o);const h=this.instances.get(r);return h&&e(h,r),()=>{o.delete(e)}}invokeOnInitCallbacks(e,i){const r=this.onInitCallbacks.get(i);if(r)for(const o of r)try{o(e,i)}catch{}}getOrInitializeService({instanceIdentifier:e,options:i={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Lb(e),options:i}),this.instances.set(e,r),this.instancesOptions.set(e,i),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Es){return this.component?this.component.multipleInstances?e:Es:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Lb(s){return s===Es?void 0:s}function Ub(s){return s.instantiationMode==="EAGER"}/**
359 * @license
360 * Copyright 2019 Google LLC
361 *
362 * Licensed under the Apache License, Version 2.0 (the "License");
363 * you may not use this file except in compliance with the License.
364 * You may obtain a copy of the License at
365 *
366 *   http://www.apache.org/licenses/LICENSE-2.0
367 *
368 * Unless required by applicable law or agreed to in writing, software
369 * distributed under the License is distributed on an "AS IS" BASIS,
370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
371 * See the License for the specific language governing permissions and
372 * limitations under the License.
373 */class Pb{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const i=this.getProvider(e.name);if(i.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);i.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const i=new jb(e,this);return this.providers.set(e,i),i}getProviders(){return Array.from(this.providers.values())}}/**
374 * @license
375 * Copyright 2017 Google LLC
376 *
377 * Licensed under the Apache License, Version 2.0 (the "License");
378 * you may not use this file except in compliance with the License.
379 * You may obtain a copy of the License at
380 *
381 *   http://www.apache.org/licenses/LICENSE-2.0
382 *
383 * Unless required by applicable law or agreed to in writing, software
384 * distributed under the License is distributed on an "AS IS" BASIS,
385 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
386 * See the License for the specific language governing permissions and
387 * limitations under the License.
388 */var Ot;(function(s){s[s.DEBUG=0]="DEBUG",s[s.VERBOSE=1]="VERBOSE",s[s.INFO=2]="INFO",s[s.WARN=3]="WARN",s[s.ERROR=4]="ERROR",s[s.SILENT=5]="SILENT"})(Ot||(Ot={}));const Bb={debug:Ot.DEBUG,verbose:Ot.VERBOSE,info:Ot.INFO,warn:Ot.WARN,error:Ot.ERROR,silent:Ot.SILENT},kb=Ot.INFO,qb={[Ot.DEBUG]:"log",[Ot.VERBOSE]:"log",[Ot.INFO]:"info",[Ot.WARN]:"warn",[Ot.ERROR]:"error"},Hb=(s,e,...i)=>{if(e<s.logLevel)return;const r=new Date().toISOString(),o=qb[e];if(o)console[o](`[${r}]  ${s.name}:`,...i);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Ud{constructor(e){this.name=e,this._logLevel=kb,this._logHandler=Hb,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Ot))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?Bb[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Ot.DEBUG,...e),this._logHandler(this,Ot.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Ot.VERBOSE,...e),this._logHandler(this,Ot.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Ot.INFO,...e),this._logHandler(this,Ot.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Ot.WARN,...e),this._logHandler(this,Ot.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Ot.ERROR,...e),this._logHandler(this,Ot.ERROR,...e)}}const Gb=(s,e)=>e.some(i=>s instanceof i);let r_,l_;function Fb(){return r_||(r_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Qb(){return l_||(l_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V0=new WeakMap,ld=new WeakMap,O0=new WeakMap,Kf=new WeakMap,Pd=new WeakMap;function Yb(s){const e=new Promise((i,r)=>{const o=()=>{s.removeEventListener("success",h),s.removeEventListener("error",d)},h=()=>{i(Ia(s.result)),o()},d=()=>{r(s.error),o()};s.addEventListener("success",h),s.addEventListener("error",d)});return e.then(i=>{i instanceof IDBCursor&&V0.set(i,s)}).catch(()=>{}),Pd.set(e,s),e}function Kb(s){if(ld.has(s))return;const e=new Promise((i,r)=>{const o=()=>{s.removeEventListener("complete",h),s.removeEventListener("error",d),s.removeEventListener("abort",d)},h=()=>{i(),o()},d=()=>{r(s.error||new DOMException("AbortError","AbortError")),o()};s.addEventListener("complete",h),s.addEventListener("error",d),s.addEventListener("abort",d)});ld.set(s,e)}let od={get(s,e,i){if(s instanceof IDBTransaction){if(e==="done")return ld.get(s);if(e==="objectStoreNames")return s.objectStoreNames||O0.get(s);if(e==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return Ia(s[e])},set(s,e,i){return s[e]=i,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Xb(s){od=s(od)}function Zb(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...i){const r=s.call(Xf(this),e,...i);return O0.set(r,e.sort?e.sort():[e]),Ia(r)}:Qb().includes(s)?function(...e){return s.apply(Xf(this),e),Ia(V0.get(this))}:function(...e){return Ia(s.apply(Xf(this),e))}}function $b(s){return typeof s=="function"?Zb(s):(s instanceof IDBTransaction&&Kb(s),Gb(s,Fb())?new Proxy(s,od):s)}function Ia(s){if(s instanceof IDBRequest)return Yb(s);if(Kf.has(s))return Kf.get(s);const e=$b(s);return e!==s&&(Kf.set(s,e),Pd.set(e,s)),e}const Xf=s=>Pd.get(s);function M0(s,e,{blocked:i,upgrade:r,blocking:o,terminated:h}={}){const d=indexedDB.open(s,e),y=Ia(d);return r&&d.addEventListener("upgradeneeded",v=>{r(Ia(d.result),v.oldVersion,v.newVersion,Ia(d.transaction),v)}),i&&d.addEventListener("blocked",v=>i(v.oldVersion,v.newVersion,v)),y.then(v=>{h&&v.addEventListener("close",()=>h()),o&&v.addEventListener("versionchange",p=>o(p.oldVersion,p.newVersion,p))}).catch(()=>{}),y}const Jb=["get","getKey","getAll","getAllKeys","count"],Wb=["put","add","delete","clear"],Zf=new Map;function o_(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(Zf.get(e))return Zf.get(e);const i=e.replace(/FromIndex$/,""),r=e!==i,o=Wb.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Jb.includes(i)))return;const h=async function(d,...y){const v=this.transaction(d,o?"readwrite":"readonly");let p=v.store;
388return r&&(p=p.index(y.shift())),(await Promise.all([p[i](...y),o&&v.done]))[0]};return Zf.set(e,h),h}Xb(s=>({...s,get:(e,i,r)=>o_(e,i)||s.get(e,i,r),has:(e,i)=>!!o_(e,i)||s.has(e,i)}));/**
389 * @license
390 * Copyright 2019 Google LLC
391 *
392 * Licensed under the Apache License, Version 2.0 (the "License");
393 * you may not use this file except in compliance with the License.
394 * You may obtain a copy of the License at
395 *
396 *   http://www.apache.org/licenses/LICENSE-2.0
397 *
398 * Unless required by applicable law or agreed to in writing, software
399 * distributed under the License is distributed on an "AS IS" BASIS,
400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
401 * See the License for the specific language governing permissions and
402 * limitations under the License.
403 */class tA{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(i=>{if(eA(i)){const r=i.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(i=>i).join(" ")}}function eA(s){const e=s.getComponent();return(e==null?void 0:e.type)==="VERSION"}const ud="@firebase/app",u_="0.14.9";/**
404 * @license
405 * Copyright 2019 Google LLC
406 *
407 * Licensed under the Apache License, Version 2.0 (the "License");
408 * you may not use this file except in compliance with the License.
409 * You may obtain a copy of the License at
410 *
411 *   http://www.apache.org/licenses/LICENSE-2.0
412 *
413 * Unless required by applicable law or agreed to in writing, software
414 * distributed under the License is distributed on an "AS IS" BASIS,
415 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
416 * See the License for the specific language governing permissions and
417 * limitations under the License.
418 */const Yi=new Ud("@firebase/app"),nA="@firebase/app-compat",iA="@firebase/analytics-compat",aA="@firebase/analytics",sA="@firebase/app-check-compat",rA="@firebase/app-check",lA="@firebase/auth",oA="@firebase/auth-compat",uA="@firebase/database",cA="@firebase/data-connect",hA="@firebase/database-compat",fA="@firebase/functions",dA="@firebase/functions-compat",mA="@firebase/installations",gA="@firebase/installations-compat",pA="@firebase/messaging",yA="@firebase/messaging-compat",_A="@firebase/performance",vA="@firebase/performance-compat",EA="@firebase/remote-config",TA="@firebase/remote-config-compat",bA="@firebase/storage",AA="@firebase/storage-compat",SA="@firebase/firestore",wA="@firebase/ai",RA="@firebase/firestore-compat",CA="firebase",xA="12.10.0";/**
419 * @license
420 * Copyright 2019 Google LLC
421 *
422 * Licensed under the Apache License, Version 2.0 (the "License");
423 * you may not use this file except in compliance with the License.
424 * You may obtain a copy of the License at
425 *
426 *   http://www.apache.org/licenses/LICENSE-2.0
427 *
428 * Unless required by applicable law or agreed to in writing, software
429 * distributed under the License is distributed on an "AS IS" BASIS,
430 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431 * See the License for the specific language governing permissions and
432 * limitations under the License.
433 */const cd="[DEFAULT]",NA={[ud]:"fire-core",[nA]:"fire-core-compat",[aA]:"fire-analytics",[iA]:"fire-analytics-compat",[rA]:"fire-app-check",[sA]:"fire-app-check-compat",[lA]:"fire-auth",[oA]:"fire-auth-compat",[uA]:"fire-rtdb",[cA]:"fire-data-connect",[hA]:"fire-rtdb-compat",[fA]:"fire-fn",[dA]:"fire-fn-compat",[mA]:"fire-iid",[gA]:"fire-iid-compat",[pA]:"fire-fcm",[yA]:"fire-fcm-compat",[_A]:"fire-perf",[vA]:"fire-perf-compat",[EA]:"fire-rc",[TA]:"fire-rc-compat",[bA]:"fire-g
433cs",[AA]:"fire-gcs-compat",[SA]:"fire-fst",[RA]:"fire-fst-compat",[wA]:"fire-vertex","fire-js":"fire-js",[CA]:"fire-js-all"};/**
434 * @license
435 * Copyright 2019 Google LLC
436 *
437 * Licensed under the Apache License, Version 2.0 (the "License");
438 * you may not use this file except in compliance with the License.
439 * You may obtain a copy of the License at
440 *
441 *   http://www.apache.org/licenses/LICENSE-2.0
442 *
443 * Unless required by applicable law or agreed to in writing, software
444 * distributed under the License is distributed on an "AS IS" BASIS,
445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
446 * See the License for the specific language governing permissions and
447 * limitations under the License.
448 */const uc=new Map,IA=new Map,hd=new Map;function c_(s,e){try{s.container.addComponent(e)}catch(i){Yi.debug(`Component ${e.name} failed to register with FirebaseApp ${s.name}`,i)}}function za(s){const e=s.name;if(hd.has(e))return Yi.debug(`There were multiple attempts to register component ${e}.`),!1;hd.set(e,s);for(const i of uc.values())c_(i,s);for(const i of IA.values())c_(i,s);return!0}function fo(s,e){const i=s.container.getProvider("heartbeat").getImmediate({optional:!0});return i&&i.triggerHeartbeat(),s.container.getProvider(e)}function DA(s){return s==null?!1:s.settings!==void 0}/**
449 * @license
450 * Copyright 2019 Google LLC
451 *
452 * Licensed under the Apache License, Version 2.0 (the "License");
453 * you may not use this file except in compliance with the License.
454 * You may obtain a copy of the License at
455 *
456 *   http://www.apache.org/licenses/LICENSE-2.0
457 *
458 * Unless required by applicable law or agreed to in writing, software
459 * distributed under the License is distributed on an "AS IS" BASIS,
460 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
461 * See the License for the specific language governing permissions and
462 * limitations under the License.
463 */const VA={"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
463d-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."},Da=new wc("app","Firebase",VA);/**
464 * @license
465 * Copyright 2019 Google LLC
466 *
467 * Licensed under the Apache License, Version 2.0 (the "License");
468 * you may not use this file except in compliance with the License.
469 * You may obtain a copy of the License at
470 *
471 *   http://www.apache.org/licenses/LICENSE-2.0
472 *
473 * Unless required by applicable law or agreed to in writing, software
474 * distributed under the License is distributed on an "AS IS" BASIS,
475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
476 * See the License for the specific language governing permissions and
477 * limitations under the License.
478 */class OA{constructor(e,i,r){this._isDeleted=!1,this._options={...e},this._config={...i},this._name=i.name,this._automaticDataCollectionEnabled=i.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Qi("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Da.create("app-deleted",{appName:this._name})}}/**
479 * @license
480 * Copyright 2019 Google LLC
481 *
482 * Licensed under the Apache License, Version 2.0 (the "License");
483 * you may not use this file except in compliance with the License.
484 * You may obtain a copy of the License at
485 *
486 *   http://www.apache.org/licenses/LICENSE-2.0
487 *
488 * Unless required by applicable law or agreed to in writing, software
489 * distributed under the License is distributed on an "AS IS" BASIS,
490 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
491 * See the License for the specific language governing permissions and
492 * limitations under the License.
493 */const MA=xA;function z0(s,e={}){let i=s;typeof e!="object"&&(e={name:e});const r={name:cd,automaticDataCollectionEnabled:!0,...e},o=r.name;if(typeof o!="string"||!o)throw Da.create("bad-app-name",{appName:String(o)});if(i||(i=N0()),!i)throw Da.create("no-options");const h=uc.get(o);if(h){if(ao(i,h.options)&&ao(r,h.config))return h;throw Da.create("duplicate-app",{appName:o})}const d=new Pb(o);for(const v of hd.values())d.addComponent(v);const y=new OA(i,r,d);return uc.set(o,y),y}function j0(s=cd){const e=uc.get(s);if(!e&&s===cd&&N0())return z0();if(!e)throw Da.create("no-app",{appName:s});return e}function Ei(s,e,i){let r=NA[s]??s;i&&(r+=`-${i}`);const o=r.match(/\s|\//),h=e.match(/\s|\//);if(o||h){const d=[`Unable to register library "${r}" with version "${e}":`];o&&d.push(`library name "${r}" contains illegal characters (whitespace or "/")`),o&&h&&d.push("and"),h&&d.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Yi.warn(d.join(" "));return}za(new Qi(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/**
494 * @license
495 * Copyright 2021 Google LLC
496 *
497 * Licensed under the Apache License, Version 2.0 (the "License");
498 * you may not use this file except in compliance with the License.
499 * You may obtain a copy of the License at
500 *
501 *   http://www.apache.org/licenses/LICENSE-2.0
502 *
503 * Unless required by applicable law or agreed to in writing, softw
503are
504 * distributed under the License is distributed on an "AS IS" BASIS,
505 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
506 * See the License for the specific language governing permissions and
507 * limitations under the License.
508 */const zA="firebase-heartbeat-database",jA=1,so="firebase-heartbeat-store";let $f=null;function L0(){return $f||($f=M0(zA,jA,{upgrade:(s,e)=>{switch(e){case 0:try{s.createObjectStore(so)}catch(i){console.warn(i)}}}}).catch(s=>{throw Da.create("idb-open",{originalErrorMessage:s.message})})),$f}async function LA(s){try{const i=(await L0()).transaction(so),r=await i.objectStore(so).get(U0(s));return await i.done,r}catch(e){if(e instanceof qa)Yi.warn(e.message);else{const i=Da.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Yi.warn(i.message)}}}async function h_(s,e){try{const r=(await L0()).transaction(so,"readwrite");await r.objectStore(so).put(e,U0(s)),await r.done}catch(i){if(i instanceof qa)Yi.warn(i.message);else{const r=Da.create("idb-set",{originalErrorMessage:i==null?void 0:i.message});Yi.warn(r.message)}}}function U0(s){return`${s.name}!${s.options.appId}`}/**
509 * @license
510 * Copyright 2021 Google LLC
511 *
512 * Licensed under the Apache License, Version 2.0 (the "License");
513 * you may not use this file except in compliance with the License.
514 * You may obtain a copy of the License at
515 *
516 *   http://www.apache.org/licenses/LICENSE-2.0
517 *
518 * Unless required by applicable law or agreed to in writing, software
519 * distributed under the License is distributed on an "AS IS" BASIS,
520 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
521 * See the License for the specific language governing permissions and
522 * limitations under the License.
523 */const UA=1024,PA=30;class BA{constructor(e){this.container=e,this._heartbeatsCache=null;const i=this.container.getProvider("app").getImmediate();this._storage=new qA(i),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,i;try{const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),h=f_();if(((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((i=this._heartbeatsCache)==null?void 0:i.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===h||this._heartbeatsCache.heartbeats.some(d=>d.date===h))return;if(this._heartbeatsCache.heartbeats.push({date:h,agent:o}),this._heartbeatsCache.heartbeats.length>PA){const d=HA(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(d,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){Yi.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const i=f_(),{heartbeatsToSend:r,unsentEntries:o}=kA(this._heartbeatsCache.heartbeats),h=oc(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=i,o.length>0?(this._heartbeatsCache.heartbeats=o,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),h}catch(i){return Yi.warn(i),""}}}function f_(){return new Date().toISOString().substring(0,10)}function kA(s,e=UA){const i=[];let r=s.slice();for(const o of s){const h=i.find(d=>d.agent===o.agent);if(h){if(h.dates.push(o.date),d_(i)>e){h.dates.pop();break}}else if(i.push({agent:o.agent,dates:[o.date]}),d_(i)>e){i.pop();break}r=r.slice(1)}return{heartbeatsToSend:i,unsentEntries:r}}class qA{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return I0()?D0().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const i=await LA(this.app);return i!=null&&i.heartbeats?i:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return h_(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return h_(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function d_(s){return oc(JSON.stringify({version:2,heartbeats:s})).length}function HA(s){if(s.length===0)return-1;let e=0,i=s[0].date;for(let r=1;r<s.length;r++)s[r].date<i&&(i=s[r].date,e=r);return e}/**
524 * @license
525 * Copyright 2019 Google LLC
526 *
527 * Licensed under the Apache License, Version 2.0 (the "License");
528 * you may not use this file except in compliance with the License.
529 * You may obtain a copy of the License at
530 *
531 *   http://www.apache.org/licenses/LICENSE-2.0
532 *
533 * Unless required by applicable law or agreed to in writing, software
534 * distributed under the License is distributed on an "AS IS" BASIS,
535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
536 * See the License for the specific language governing permissions and
537 * limitations under the License.
538 */function GA(s){za(new Qi("platform-logger",e=>new tA(e),"PRIVATE")),za(new Qi("heartbeat",e=>new BA(e),"PRIVATE")),Ei(ud,u_,s),Ei(ud,u_,"esm2020"),Ei("fire-js","")}GA("");var FA="firebase",QA="12.10.0";/**
539 * @license
540 * Copyright 2020 Google LLC
541 *
542 * Licensed under the Apache License, Version 2.0 (the "License");
543 * you may not use this file except in compliance with the License.
544 * You may obtain a copy of the License at
545 *
546 *   http://www.apache.org/licenses/LICENSE-2.0
547 *
548 * Unless required by applicable law or agreed to in writing, software
549 * distributed under the License is distributed on an "AS IS" BASIS,
550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
551 * See the License for the specific language governing permissions and
552 * limitations under the License.
553 */Ei(FA,QA,"app");var m_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
554Copyright The Closure Library Authors.
555SPDX-License-Identifier: Apache-2.0
556*/var Va,P0;(function(){var s;/** @license
557
558 Copyright The Closure Library Authors.
559 SPDX-License-Identifier: Apache-2.0
560*/function e(N,S){function C(){}C.prototype=S.prototype,N.F=S.prototype,N.prototype=new C,N.prototype.constructor=N,N.D=function(M,D,j){for(var w=Array(arguments.length-2),ne=2;ne<arguments.length;ne++)w[ne-2]=arguments[ne];return S.prototype[D].apply(M,w)}}function i(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}e(r,i),r.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function o(N,S,C){C||(C=0);const M=Array(16);if(typeof S=="string")for(var D=0;D<16;++D)M[D]=S.charCodeAt(C++)|S.charCodeAt(C++)<<8|S.charCodeAt(C++)<<16|S.charCodeAt(C++)<<24;else for(D=0;D<16;++D)M[D]=S[C++]|S[C++]<<8|S[C++]<<16|S[C++]<<24;S=N.g[0],C=N.g[1],D=N.g[2];let j=N.g[3],w;w=S+(j^C&(D^j))+M[0]+3614090360&4294967295,S=C+(w<<7&4294967295|w>>>25),w=j+(D^S&(C^D))+M[1]+3905402710&4294967295,j=S+(w<<12&4294967295|w>>>20),w=D+(C^j&(S^C))+M[2]+606105819&4294967295,D=j+(w<<17&4294967295|w>>>15),w=C+(S^D&(j^S))+M[3]+3250441966&4294967295,C=D+(w<<22&4294967295|w>>>10),w=S+(j^C&(D^j))+M[4]+4118548399&4294967295,S=C+(w<<7&4294967295|w>>>25),w=j+(D^S&(C^D))+M[5]+1200080426&4294967295,j=S+(w<<12&4294967295|w>>>20),w=D+(C^j&(S^C))+M[6]+2821735955&4294967295,D=j+(w<<17&4294967295|w>>>15),w=C+(S^D&(j^S))+M[7]+4249261313&4294967295,C=D+(w<<22&4294967295|w>>>10),w=S+(j^C&(D^j))+M[8]+1770035416&4294967295,S=C+(w<<7&4294967295|w>>>25),w=j+(D^S&(C^D))+M[9]+2336552879&4294967295,j=S+(w<<12&4294967295|w>>>20),w=D+(C^j&(S^C))+M[10]+4294925233&4294967295,D=j+(w<<17&4294967295|w>>>15),w=C+(S^D&(j^S))+M[11]+2304563134&4294967295,C=D+(w<<22&4294967295|w>>>10),w=S+(j^C&(D^j))+M[12]+1804603682&4294967295,S=C+(w<<7&4294967295|w>>>25),w=j+(D^S&(C^D))+M[13]+4254626195&4294967295,j=S+(w<<12&4294967295|w>>>20),w=D+(C^j&(S^C))+M[14]+2792965006&4294967295,D=j+(w<<17&4294967295|w>>>15),w=C+(S^D&(j^S))+M[15]+1236535329&4294967295,C=D+(w<<22&4294967295|w>>>10),w=S+(D^j&(C^D))+M[1]+4129170786&4294967295,S=C+(w<<5&4294967295|w>>>27),w=j+(C^D&(S^C))+M[6]+3225465664&4294967295,j=S+(w<<9&4294967295|w>>>23),w=D+(S^C&(j^S))+M[11]+643717713&4294967295,D=j+(w<<14&4294967295|w>>>18),w=C+(j^S&(D^j))+M[0]+3921069994&4294967295,C=D+(w<<20&4294967295|w>>>12),w=S+(D^j&(C^D))+M[5]+3593408605&4294967295,S=C+(w<<5&4294967295|w>>>27),w=j+(C^D&(S^C))+M[10]+38016083&4294967295,j=S+(w<<9&4294967295|w>>>23),w=D+(S^C&(j^S))+M[15]+3634488961&4294967295,D=j+(w<<14&4294967295|w>>>
vendor: 6,785 bytes, line 560
56018),w=C+(j^S&(D^j))+M[4]+3889429448&4294967295,C=D+(w<<20&4294967295|w>>>12),w=S+(D^j&(C^D))+M[9]+568446438&4294967295,S=C+(w<<5&4294967295|w>>>27),w=j+(C^D&(S^C))+M[14]+3275163606&4294967295,j=S+(w<<9&4294967295|w>>>23),w=D+(S^C&(j^S))+M[3]+4107603335&4294967295,D=j+(w<<14&4294967295|w>>>18),w=C+(j^S&(D^j))+M[8]+1163531501&4294967295,C=D+(w<<20&4294967295|w>>>12),w=S+(D^j&(C^D))+M[13]+2850285829&4294967295,S=C+(w<<5&4294967295|w>>>27),w=j+(C^D&(S^C))+M[2]+4243563512&4294967295,j=S+(w<<9&4294967295|w>>>23),w=D+(S^C&(j^S))+M[7]+1735328473&4294967295,D=j+(w<<14&4294967295|w>>>18),w=C+(j^S&(D^j))+M[12]+2368359562&4294967295,C=D+(w<<20&4294967295|w>>>12),w=S+(C^D^j)+M[5]+4294588738&4294967295,S=C+(w<<4&4294967295|w>>>28),w=j+(S^C^D)+M[8]+2272392833&4294967295,j=S+(w<<11&4294967295|w>>>21),w=D+(j^S^C)+M[11]+1839030562&4294967295,D=j+(w<<16&4294967295|w>>>16),w=C+(D^j^S)+M[14]+4259657740&4294967295,C=D+(w<<23&4294967295|w>>>9),w=S+(C^D^j)+M[1]+2763975236&4294967295,S=C+(w<<4&4294967295|w>>>28),w=j+(S^C^D)+M[4]+1272893353&4294967295,j=S+(w<<11&4294967295|w>>>21),w=D+(j^S^C)+M[7]+4139469664&4294967295,D=j+(w<<16&4294967295|w>>>16),w=C+(D^j^S)+M[10]+3200236656&4294967295,C=D+(w<<23&4294967295|w>>>9),w=S+(C^D^j)+M[13]+681279174&4294967295,S=C+(w<<4&4294967295|w>>>28),w=j+(S^C^D)+M[0]+3936430074&4294967295,j=S+(w<<11&4294967295|w>>>21),w=D+(j^S^C)+M[3]+3572445317&4294967295,D=j+(w<<16&4294967295|w>>>16),w=C+(D^j^S)+M[6]+76029189&4294967295,C=D+(w<<23&4294967295|w>>>9),w=S+(C^D^j)+M[9]+3654602809&4294967295,S=C+(w<<4&4294967295|w>>>28),w=j+(S^C^D)+M[12]+3873151461&4294967295,j=S+(w<<11&4294967295|w>>>21),w=D+(j^S^C)+M[15]+530742520&4294967295,D=j+(w<<16&4294967295|w>>>16),w=C+(D^j^S)+M[2]+3299628645&4294967295,C=D+(w<<23&4294967295|w>>>9),w=S+(D^(C|~j))+M[0]+4096336452&4294967295,S=C+(w<<6&4294967295|w>>>26),w=j+(C^(S|~D))+M[7]+1126891415&4294967295,j=S+(w<<10&4294967295|w>>>22),w=D+(S^(j|~C))+M[14]+2878612391&4294967295,D=j+(w<<15&4294967295|w>>>17),w=C+(j^(D|~S))+M[5]+4237533241&4294967295,C=D+(w<<21&4294967295|w>>>11),w=S+(D^(C|~j))+M[12]+1700485571&4294967295,S=C+(w<<6&4294967295|w>>>26),w=j+(C^(S|~D))+M[3]+2399980690&4294967295,j=S+(w<<10&4294967295|w>>>22),w=D+(S^(j|~C))+M[10]+4293915773&4294967295,D=j+(w<<15&4294967295|w>>>17),w=C+(j^(D|~S))+M[1]+2240044497&4294967295,C=D+(w<<21&4294967295|w>>>11),w=S+(D^(C|~j))+M[8]+1873313359&4294967295,S=C+(w<<6&4294967295|w>>>26),w=j+(C^(S|~D))+M[15]+4264355552&4294967295,j=S+(w<<10&4294967295|w>>>22),w=D+(S^(j|~C))+M[6]+2734768916&4294967295,D=j+(w<<15&4294967295|w>>>17),w=C+(j^(D|~S))+M[13]+1309151649&4294967295,C=D+(w<<21&4294967295|w>>>11),w=S+(D^(C|~j))+M[4]+4149444226&4294967295,S=C+(w<<6&4294967295|w>>>26),w=j+(C^(S|~D))+M[11]+3174756917&4294967295,j=S+(w<<10&4294967295|w>>>22),w=D+(S^(j|~C))+M[2]+718787259&4294967295,D=j+(w<<15&4294967295|w>>>17),w=C+(j^(D|~S))+M[9]+3951481745&4294967295,N.g[0]=N.g[0]+S&4294967295,N.g[1]=N.g[1]+(D+(w<<21&4294967295|w>>>11))&4294967295,N.g[2]=N.g[2]+D&4294967295,N.g[3]=N.g[3]+j&4294967295}r.prototype.v=function(N,S){S===void 0&&(S=N.length);const C=S-this.blockSize,M=this.C;let D=this.h,j=0;for(;j<S;){if(D==0)for(;j<=C;)o(this,N,j),j+=this.blockSize;if(typeof N=="string"){for(;j<S;)if(M[D++]=N.charCodeAt(j++),D==this.blockSize){o(this,M),D=0;break}}else for(;j<S;)if(M[D++]=N[j++],D==this.blockSize){o(this,M),D=0;break}}this.h=D,this.o+=S},r.prototype.A=function(){var N=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);N[0]=128;for(var S=1;S<N.length-8;++S)N[S]=0;S=this.o*8;for(var C=N.length-8;C<N.length;++C)N[C]=S&255,S/=256;for(this.v(N),N=Array(16),S=0,C=0;C<4;++C)for(let M=0;M<32;M+=8)N[S++]=this.g[C]>>>M&255;return N};function h(N,S){var C=y;return Object.prototype.hasOwnProperty.call(C,N)?C[N]:C[N]=S(N)}function d(N,S){this.h=S;const C=[];let M=!0;for(let D=N.length-1;D>=0;D--){const j=N[D]|0;M&&j==S||(C[D]=j,M=!1)}this.g=C}var y={};function v(N){return-128<=N&&N<128?h(N,function(S){return new d([S|0],S<0?-1:0)}):new d([N|0],N<0?-1:0)}function p(N){if(isNaN(N)||!isFinite(N))return A;if(N<0)return nt(p(-N));const S=[];let C=1;for(let M=0;N>=C;M++)S[M]=N/C|0,C*=4294967296;return new d(S,0)}function b(N,S){if(N.length==0)throw Error("number format error: empty string");if(S=S||10,S<2||36<S)throw Error("radix out of range: "+S);if(N.charAt(0)=="-")return nt(b(N.substring(1),S));if(N.indexOf("-")>=0)throw Error('number format error: interior "-" character');const C=p(Math.pow(S,8));let M=A;for(let j=0;j<N.length;j+=8){var D=Math.min(8,N.length-j);const w=parseInt(N.substring(j,j+D),S);D<8?(D=p(Math.pow(S,D)),M=M.j(D).add(p(w))):(M=M.j(C),M=M.add(p(w)))}return M}var A=v(0),O=v(1),Q=v(16777216);s=d.prototype,s.m=function(){if(et(this))return-nt(this).m();let N=0,S=1;for(let C=0;C<this.g.length;C++){const M=this.i(C);N+=(M>=0?M:4294967296+M)*S,S*=4294967296}return N},s.toString=function(N){if(N=N||10,N<2||36<N)throw Error("radix out of range: "+N);if(J(this))return"0";if(et(this))return"-"+nt(this).toString(N);const S=p(Math.pow(N,6));var C=this;let M="";for(;;){const D=Xt(C,S).g;C=yt(C,D.j(S));let j=((C.g.length>0?C.g[0]:C.h)>>>0).toString(N);if(C=D,J(C))return j+M;for(;j.length<6;)j="0"+j;M=j+M}},s.i=function(N){return N<0?0:N<this.g.length?this.g[N]:this.h};function J(N){if(N.h!=0)return!1;for(let S=0;S<N.g.length;S++)if(N.g[S]!=0)return!1;return!0}function et(N){return N.h==-1}s.l=function(N){return N=yt(this,N),et(N)?-1:J(N)?0:1};function nt(N){const S=N.g.length,C=[];for(let M=0;M<S;M++)C[M]=~N.g[M];return new d(C,~N.h).add(O)}s.abs=function(){return et(this)?nt(this):this},s.add=function(N){const S=Math.max(this.g.length,N.g.length),C=[];let M=0;for(let D=0;D<=S;D++){let j=M+(this.i(D)&65535)+(N.i(D)&65535),w=(j>>>16)+(this.i(D)>>>16)+(N.i(D)>>>16);M=w>>>16,j&=65535,w&=65535,C[D]=w<<16|j}return new d(C,C[C.length-1]&-2147483648?-1:0)};function yt(N,S){return N.add(nt(S))}s.j=function(N){if(J(this)||J(N))return A;if(et(this))return et(N)?nt(this).j(nt(N)):nt(nt(this).j(N));if(et(N))return nt(this.j(nt(N)));if(this.l(Q)<0&&N.l(Q)<0)return p(this.m()*N.m());const S=this.g.length+N.g.length,C=[];for(var M=0;M<2*S;M++)C[M]=0;for(M=0;M<this.g.length;M++)for(let D=0;D<N.g.length;D++){const j=this.i(M)>>>16,w=this.i(M)&65535,ne=N.i(D)>>>16,Ce=N.i(D)&65535;C[2*M+2*D]+=w*Ce,Tt(C,2*M+2*D),C[2*M+2*D+1]+=j*Ce,Tt(C,2*M+2*D+1),C[2*M+2*D+1]+=w*ne,Tt(C,2*M+2*D+1),C[2*M+2*D+2]+=j*ne,Tt(C,2*M+2*D+2)}for(N=0;N<S;N++)C[N]=C[2*N+1]<<16|C[2*N];for(N=S;N<2*S;N++)C[N]=0;return new d(C,0)};function Tt(N,S){for(;(N[S]&65535)!=N[S];)N[S+1]+=N[S]>>>16,N[S]&=65535,S++}function _t(N,S){this.g=N,this.h=S}function Xt(N,S){if(J(S))throw Error("division by zero");if(J(N))return new _t(A,A);if(et(N))return S=Xt(nt(N),S),new _t(nt(S.g),nt(S.h));if(et(S))return S=Xt(N,nt(S)),new _t(nt(S.g),S.h);if(N.g.length>
56030){if(et(N)||et(S))throw Error("slowDivide_ only works with positive integers.");for(var C=O,M=S;M.l(N)<=0;)C=Zt(C),M=Zt(M);var D=Lt(C,1),j=Lt(M,1);for(M=Lt(M,2),C=Lt(C,2);!J(M);){var w=j.add(M);w.l(N)<=0&&(D=D.add(C),j=w),M=Lt(M,1),C=Lt(C,1)}return S=yt(N,D.j(S)),new _t(D,S)}for(D=A;N.l(S)>=0;){for(C=Math.max(1,Math.floor(N.m()/S.m())),M=Math.ceil(Math.log(C)/Math.LN2),M=M<=48?1:Math.pow(2,M-48),j=p(C),w=j.j(S);et(w)||w.l(N)>0;)C-=M,j=p(C),w=j.j(S);J(j)&&(j=O),D=D.add(j),N=yt(N,w)}return new _t(D,N)}s.B=function(N){return Xt(this,N).h},s.and=function(N){const S=Math.max(this.g.length,N.g.length),C=[];for(let M=0;M<S;M++)C[M]=this.i(M)&N.i(M);return new d(C,this.h&N.h)},s.or=function(N){const S=Math.max(this.g.length,N.g.length),C=[];for(let M=0;M<S;M++)C[M]=this.i(M)|N.i(M);return new d(C,this.h|N.h)},s.xor=function(N){const S=Math.max(this.g.length,N.g.length),C=[];for(let M=0;M<S;M++)C[M]=this.i(M)^N.i(M);return new d(C,this.h^N.h)};function Zt(N){const S=N.g.length+1,C=[];for(let M=0;M<S;M++)C[M]=N.i(M)<<1|N.i(M-1)>>>31;return new d(C,N.h)}function Lt(N,S){const C=S>>5;S%=32;const M=N.g.length-C,D=[];for(let j=0;j<M;j++)D[j]=S>0?N.i(j+C)>>>S|N.i(j+C+1)<<32-S:N.i(j+C);return new d(D,N.h)}r.prototype.digest=r.prototype.A,r.prototype.reset=r.prototype.u,r.prototype.update=r.prototype.v,P0=r,d.prototype.add=d.prototype.add,d.prototype.multiply=d.prototype.j,d.prototype.modulo=d.prototype.B,d.prototype.compare=d.prototype.l,d.prototype.toNumber=d.prototype.m,d.prototype.toString=d.prototype.toString,d.prototype.getBits=d.prototype.i,d.fromNumber=p,d.fromString=b,Va=d}).apply(typeof m_<"u"?m_:typeof self<"u"?self:typeof window<"u"?window:{});var Xu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
561Copyright The Closure Library Authors.
562SPDX-License-Identifier: Apache-2.0
563*/var B0,Kl,k0,nc,fd,q0,H0,G0;(function(){var s,e=Object.defineProperty;function i(u){u=[typeof globalThis=="object"&&globalThis,u,typeof window=="object"&&window,typeof self=="object"&&self,typeof Xu=="object"&&Xu];for(var m=0;m<u.length;++m){var _=u[m];if(_&&_.Math==Math)return _}throw Error("Cannot find global object")}var r=i(this);function o(u,m){if(m)t:{var _=r;u=u.split(".");for(var T=0;T<u.length-1;T++){var L=u[T];if(!(L in _))break t;_=_[L]}u=u[u.length-1],T=_[u],m=m(T),m!=T&&m!=null&&e(_,u,{configurable:!0,writable:!0,value:m})}}o("Symbol.dispose",function(u){return u||Symbol("Symbol.dispose")}),o("Array.prototype.values",function(u){return u||function(){return this[Symbol.iterator]()}}),o("Object.entries",function(u){return u||function(m){var _=[],T;for(T in m)Object.prototype.hasOwnProperty.call(m,T)&&_.push([T,m[T]]);return _}});/** @license
564
565 Copyright The Closure Library Authors.
566 SPDX-License-Identifier: Apache-2.0
567*/var h=h||{},d=this||self;function y(u){var m=typeof u;return m=="object"&&u!=null||m=="function"}function v(u,m,_){return u.call.apply(u.bind,arguments)}function p(u,m,_){return p=v,p.apply(null,arguments)}function b(u,m){var _=Array.prototype.slice.call(arguments,1);return function(){var T=_.slice();return T.push.apply(T,arguments),u.apply(this,T)}}function A(u,m){function _(){}_.prototype=m.prototype,u.Z=m.prototype,u.prototype=new _,u.prototype.constructor=u,u.Ob=function(T,L,k){for(var $=Array(arguments.length-2),vt=2;vt<arguments.length;vt++)$[vt-2]=arguments[vt];return m.prototype[L].apply(T,$)}}var O=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?u=>u&&AsyncContext.Snapshot.wrap(u):u=>u;function Q(u){const m=u.length;if(m>0){const _=Array(m);for(let T=0;T<m;T++)_[T]=u[T];return _}return[]}function J(u,m){for(let T=1;T<arguments.length;T++){const L=arguments[T];var _=typeof L;if(_=_!="object"?_:L?Array.isArray(L)?"array":_:"null",_=="array"||_=="object"&&typeof L.length=="number"){_=u.length||0;const k=L.length||0;u.length=_+k;for(let $=0;$<k;$++)u[_+$]=L[$]}else u.push(L)}}class et{constructor(m,_){this.i=m,this.j=_,this.h=0,this.g=null}get(){let m;return this.h>0?(this.h--,m=this.g,this.g=m.next,m.next=null):m=this.i(),m}}function nt(u){d.setTimeout(()=>{throw u},0)}function yt(){var u=N;let m=null;return u.g&&(m=u.g,u.g=u.g.next,u.g||(u.h=null),m.next=null),m}class Tt{constructor(){this.h=this.g=null}add(m,_){const T=_t.get();T.set(m,_),this.h?this.h.next=T:this.g=T,this.h=T}}var _t=new et(()=>new Xt,u=>u.reset());class Xt{constructor(){this.next=this.g=this.h=null}set(m,_){this.h=m,this.g=_,this.next=null}reset(){this.next=this.g=this.h=null}}let Zt,Lt=!1,N=new Tt,S=()=>{const u=Promise.resolve(void 0);Zt=()=>{u.then(C)}};function C(){for(var u;u=yt();){try{u.h.call(u.g)}catch(_){nt(_)}var m=_t;m.j(u),m.h<100&&(m.h++,u.next=m.g,m.g=u)}Lt=!1}function M(){this.u=this.u,this.C=this.C}M.prototype.u=!1,M.prototype.dispose=function(){this.u||(this.u=!0,this.N())},M.prototype[Symbol.dispose]=function(){this.dispose()},M.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function D(u,m){this.type=u,this.g=this.target=m,this.defaultPrevented=!1}D.prototype.h=function(){this.defaultPrevented=!0};var j=(function(){if(!d.addEventListener||!Object.defineProperty)return!1;var u=!1,m=Object.defineProperty({},"passive",{get:function(){u=!0}});try{const _=()=>{};d.addEventListener("test",_,m),d.removeEventListener("test",_,m)}catch{}return u})();function w(u){return/^[\s\xa0]*$/.test(u)}function ne(u,m){D.call(this,u?u.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,u&&this.init(u,m)}A(ne,D),ne.prototype.init=function(u,m){const _=this.type=u.type,T=u.changedTouches&&u.changedTouches.length?u.changedTouches[0]:null;this.target=u.target||u.srcElement,this.g=m,m=u.relatedTarget,m||(_=="mouseover"?m=u.fromElement:_=="mouseout"&&(m=u.toElement)),this.relatedTarget=m,T?(this.clientX=T.clientX!==void 0?T.clientX:T.pageX,this.clientY=T.clientY!==void 0?T.clientY:T.pageY,this.screenX=T.screenX||0,this.screenY=T.screenY||0):(this.clientX=u.clientX!==void 0?u.clientX:u.pageX,this.clientY=u.clientY!==void 0?u.clientY:u.pageY,this.screenX=u.screenX||0,this.screenY=u.screenY||0),this.button=u.button,this.key=u.key||"",this.ctrlKey=u.ctrlKey,this.altKey=u.altKey,this.shiftKey=u.shiftKey,this.metaKey=u.metaKey,this.pointerId=u.pointerId||0,this.pointerType=u.pointerType,this.state=u.state,this.i=u,u.defaultPrevented&&ne.Z.h.call(this)},ne.prototype.h=function(){ne.Z.h.call(this);const u=this.i;u.preventDefault?u.preventDefault():u.returnValue=!1};var Ce="closure_listenable_"+(Math.random()*1e6|0),G=0;function W(u,m,_,T,L){this.listener=u,this.proxy=null,this.src=m,this.type=_,this.capture=!!T,this.ha=L,this.key=++G,this.da=this.fa=!1}function ct(u){u.da=!0,u.listener=null,u.proxy=null,u.src=null,u.ha=null}function Mt(u,m,_){for(const T in u)m.call(_,u[T],T,u)}function kt(u,m){for(const _ in u)m.call(void 0,u[_],_,u)}function V(u){const m={};for(const _ in u)m[_]=u[_];return m}const K="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
567ing toString valueOf".split(" ");function tt(u,m){let _,T;for(let L=1;L<arguments.length;L++){T=arguments[L];for(_ in T)u[_]=T[_];for(let k=0;k<K.length;k++)_=K[k],Object.prototype.hasOwnProperty.call(T,_)&&(u[_]=T[_])}}function st(u){this.src=u,this.g={},this.h=0}st.prototype.add=function(u,m,_,T,L){const k=u.toString();u=this.g[k],u||(u=this.g[k]=[],this.h++);const $=bt(u,m,T,L);return $>-1?(m=u[$],_||(m.fa=!1)):(m=new W(m,this.src,k,!!T,L),m.fa=_,u.push(m)),m};function dt(u,m){const _=m.type;if(_ in u.g){var T=u.g[_],L=Array.prototype.indexOf.call(T,m,void 0),k;(k=L>=0)&&Array.prototype.splice.call(T,L,1),k&&(ct(m),u.g[_].length==0&&(delete u.g[_],u.h--))}}function bt(u,m,_,T){for(let L=0;L<u.length;++L){const k=u[L];if(!k.da&&k.listener==m&&k.capture==!!_&&k.ha==T)return L}return-1}var Dt="closure_lm_"+(Math.random()*1e6|0),xe={};function ie(u,m,_,T,L){if(Array.isArray(m)){for(let k=0;k<m.length;k++)ie(u,m[k],_,T,L);return null}return _=Hr(_),u&&u[Ce]?u.J(m,_,y(T)?!!T.capture:!1,L):Ha(u,m,_,!1,T,L)}function Ha(u,m,_,T,L,k){if(!m)throw Error("Invalid event type");const $=y(L)?!!L.capture:!!L;let vt=Ga(u);if(vt||(u[Dt]=vt=new st(u)),_=vt.add(m,_,T,$,k),_.proxy)return _;if(T=Vs(),_.proxy=T,T.src=u,T.listener=_,u.addEventListener)j||(L=$),L===void 0&&(L=!1),u.addEventListener(m.toString(),T,L);else if(u.attachEvent)u.attachEvent($n(m.toString()),T);else if(u.addListener&&u.removeListener)u.addListener(T);else throw Error("addEventListener and attachEvent are unavailable.");return _}function Vs(){function u(_){return m.call(u.src,u.listener,_)}const m=kr;return u}function Os(u,m,_,T,L){if(Array.isArray(m))for(var k=0;k<m.length;k++)Os(u,m[k],_,T,L);else T=y(T)?!!T.capture:!!T,_=Hr(_),u&&u[Ce]?(u=u.i,k=String(m).toString(),k in u.g&&(m=u.g[k],_=bt(m,_,T,L),_>-1&&(ct(m[_]),Array.prototype.splice.call(m,_,1),m.length==0&&(delete u.g[k],u.h--)))):u&&(u=Ga(u))&&(m=u.g[m.toString()],u=-1,m&&(u=bt(m,_,T,L)),(_=u>-1?m[u]:null)&&Ms(_))}function Ms(u){if(typeof u!="number"&&u&&!u.da){var m=u.src;if(m&&m[Ce])dt(m.i,u);else{var _=u.type,T=u.proxy;m.removeEventListener?m.removeEventListener(_,T,u.capture):m.detachEvent?m.detachEvent($n(_),T):m.addListener&&m.removeListener&&m.removeListener(T),(_=Ga(m))?(dt(_,u),_.h==0&&(_.src=null,m[Dt]=null)):ct(u)}}}function $n(u){return u in xe?xe[u]:xe[u]="on"+u}function kr(u,m){if(u.da)u=!0;else{m=new ne(m,this);const _=u.listener,T=u.ha||u.src;u.fa&&Ms(u),u=_.call(T,m)}return u}function Ga(u){return u=u[Dt],u instanceof st?u:null}var qr="__closure_events_fn_"+(Math.random()*1e9>>>0);function Hr(u){return typeof u=="function"?u:(u[qr]||(u[qr]=function(m){return u.handleEvent(m)}),u[qr])}function me(){M.call(this),this.i=new st(this),this.M=this,this.G=null}A(me,M),me.prototype[Ce]=!0,me.prototype.removeEventListener=function(u,m,_,T){Os(this,u,m,_,T)};function Ne(u,m){var _,T=u.G;if(T)for(_=[];T;T=T.G)_.push(T);if(u=u.M,T=m.type||m,typeof m=="string")m=new D(m,u);else if(m instanceof D)m.target=m.target||u;else{var L=m;m=new D(T,u),tt(m,L)}L=!0;let k,$;if(_)for($=_.length-1;$>=0;$--)k=m.g=_[$],L=Zi(k,T,!0,m)&&L;if(k=m.g=u,L=Zi(k,T,!0,m)&&L,L=Zi(k,T,!1,m)&&L,_)for($=0;$<_.length;$++)k=m.g=_[$],L=Zi(k,T,!1,m)&&L}me.prototype.N=function(){if(me.Z.N.call(this),this.i){var u=this.i;for(const m in u.g){const _=u.g[m];for(let T=0;T<_.length;T++)ct(_[T]);delete u.g[m],u.h--}}this.G=null},me.prototype.J=function(u,m,_,T){return this.i.add(String(u),m,!1,_,T)},me.prototype.K=function(u,m,_,T){return this.i.add(String(u),m,!0,_,T)};function Zi(u,m,_,T){if(m=u.i.g[String(m)],!m)return!0;m=m.concat();let L=!0;for(let k=0;k<m.length;++k){const $=m[k];if($&&!$.da&&$.capture==_){const vt=$.listener,ce=$.ha||$.src;$.fa&&dt(u.i,$),L=vt.call(ce,T)!==!1&&L}}return L&&!T.defaultPrevented}function Hc(u,m){if(typeof u!="function")if(u&&typeof u.handleEvent=="function")u=p(u.handleEvent,u);else throw Error("Invalid listener argument");return Number(m)>2147483647?-1:d.setTimeout(u,m||0)}function Eo(u){u.g=Hc(()=>{u.g=null,u.i&&(u.i=!1,Eo(u))},u.l);const m=u.h;u.h=null,u.m.apply(null,m)}class $e extends M{constructor(m,_){super(),this.m=m,this.l=_,this.h=null,this.i=!1,this.g=null}j(m){this.h=arguments,this.g?this.i=!0:Eo(this)}N(){super.N(),this.g&&(d.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Fa(u){M.call(this),this.h=u,this.g={}}A(Fa,M);var Gr=[];function Fr(u){Mt(u.g,function(m,_){this.g.hasOwnProperty(_)&&Ms(m)},u),u.g={}}Fa.prototype.N=function(){Fa.Z.N.call(this),Fr(this)},Fa.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var $i=d.JSON.stringify,Gc=d.JSON.parse,To=class{stringify(u){return d.JSON.stringify(u,void 0)}parse(u){return d.JSON.parse(u,void 0)}};function bo(){}function Ao(){}var jn={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function Ue(){D.call(this,"d")}A(Ue,D);
567function Tn(){D.call(this,"c")}A(Tn,D);var ue={},So=null;function zs(){return So=So||new me}ue.Ia="serverreachability";function wo(u){D.call(this,ue.Ia,u)}A(wo,D);function Jn(u){const m=zs();Ne(m,new wo(m))}ue.STAT_EVENT="statevent";function Qa(u,m){D.call(this,ue.STAT_EVENT,u),this.stat=m}A(Qa,D);function ge(u){const m=zs();Ne(m,new Qa(m,u))}ue.Ja="timingevent";function Wn(u,m){D.call(this,ue.Ja,u),this.size=m}A(Wn,D);function ti(u,m){if(typeof u!="function")throw Error("Fn must not be null and must be a function");return d.setTimeout(function(){u()},m)}function Ln(){this.g=!0}Ln.prototype.ua=function(){this.g=!1};function Fc(u,m,_,T,L,k){u.info(function(){if(u.g)if(k){var $="",vt=k.split("&");for(let Ut=0;Ut<vt.length;Ut++){var ce=vt[Ut].split("=");if(ce.length>1){const ae=ce[0];ce=ce[1];const wn=ae.split("_");$=wn.length>=2&&wn[1]=="type"?$+(ae+"="+ce+"&"):$+(ae+"=redacted&")}}}else $=null;else $=k;return"XMLHTTP REQ ("+T+") [attempt "+L+"]: "+m+`
568`+_+`
569`+$})}function Ro(u,m,_,T,L,k,$){u.info(function(){return"XMLHTTP RESP ("+T+") [ attempt "+L+"]: "+m+`
570`+_+`
571`+k+" "+$})}function ei(u,m,_,T){u.info(function(){return"XMLHTTP TEXT ("+m+"): "+Qc(u,_)+(T?" "+T:"")})}function Ya(u,m){u.info(function(){return"TIMEOUT: "+m})}Ln.prototype.info=function(){};function Qc(u,m){if(!u.g)return m;if(!m)return null;try{const k=JSON.parse(m);if(k){for(u=0;u<k.length;u++)if(Array.isArray(k[u])){var _=k[u];if(!(_.length<2)){var T=_[1];if(Array.isArray(T)&&!(T.length<1)){var L=T[0];if(L!="noop"&&L!="stop"&&L!="close")for(let $=1;$<T.length;$++)T[$]=""}}}}return $i(k)}catch{return m}}var Ka={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},Qr={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"},Yr;function Xa(){}A(Xa,bo),Xa.prototype.g=function(){return new XMLHttpRequest},Yr=new Xa;function wi(u){return encodeURIComponent(String(u))}function Co(u){var m=1;u=u.split(":");const _=[];for(;m>0&&u.length;)_.push(u.shift()),m--;return u.length&&_.push(u.join(":")),_}function Un(u,m,_,T){this.j=u,this.i=m,this.l=_,this.S=T||1,this.V=new Fa(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new Pn}function Pn(){this.i=null,this.g="",this.h=!1}var pe={},Ve={};function ni(u,m,_){u.M=1,u.A=Za(_e(m)),u.u=_,u.R=!0,js(u,null)}function js(u,m){u.F=Date.now(),ii(u),u.B=_e(u.A);var _=u.B,T=u.S;Array.isArray(T)||(T=[String(T)]),Bs(_.i,"t",T),u.C=0,_=u.j.L,u.h=new Pn,u.g=qo(u.j,_?m:null,!u.u),u.P>0&&(u.O=new $e(p(u.Y,u,u.g),u.P)),m=u.V,_=u.g,T=u.ba;var L="readystatechange";Array.isArray(L)||(L&&(Gr[0]=L.toString()),L=Gr);for(let k=0;k<L.length;k++){const $=ie(_,L[k],T||m.handleEvent,!1,m.h||m);if(!$)break;m.g[$.key]=$}m=u.J?V(u.J):{},u.u?(u.v||(u.v="POST"),m["Content-Type"]="application/x-www-form-urlencoded",u.g.ea(u.B,u.v,u.u,m)):(u.v="GET",u.g.ea(u.B,u.v,null,m)),Jn(),Fc(u.i,u.v,u.B,u.l,u.S,u.u)}Un.prototype.ba=function(u){u=u.target;const m=this.O;m&&qn(u)==3?m.j():this.Y(u)},Un.prototype.Y=function(u){try{if(u==this.g)t:{const vt=qn(this.g),ce=this.g.ya(),Ut=this.g.ca();if(!(vt<3)&&(vt!=3||this.g&&(this.h.h||this.g.la()||Pe(this.g)))){this.K||vt!=4||ce==7||(ce==8||Ut<=0?Jn(3):Jn(2)),ai(this);var m=this.g.ca();this.X=m;var _=Yc(this);if(this.o=m==200,Ro(this.i,this.v,this.B,this.l,this.S,vt,m),this.o){if(this.U&&!this.L){e:{if(this.g){var T,L=this.g;if((T=L.g?L.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!w(T)){var k=T;break e}}k=null}if(u=k)ei(this.i,this.l,u,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,si(this,u);else{this.o=!1,this.m=3,ge(12),hn(this),bn(this);break t}}if(this.R){u=!0;let ae;for(;!this.K&&this.C<_.length;)if(ae=No(this,_),ae==Ve){vt==4&&(this.m=4,ge(14),u=!1),ei(this.i,this.l,null,"[Incomplete Response]");break}else if(ae==pe){this.m=4,ge(15),ei(this.i,this.l,_,"[Invalid Chunk]"),u=!1;break}else ei(this.i,this.l,ae,null),si(this,ae);if(xo(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),vt!=4||_.length!=0||this.h.h||(this.m=1,ge(16),u=!1),this.o=this.o&&u,!u)ei(this.i,this.l,_,"[Invalid Chunked Response]"),hn(this),bn(this);else if(_.length>0&&!this.W){this.W=!0;var $=this.j;$.g==this&&$.aa&&!$.P&&($.j.info("Great, no buffering proxy detected. Bytes received: "+_.length),ol($),$.P=!0,ge(11))}}else ei(this.i,this.l,_,null),si(this,_);vt==4&&hn(this),this.o&&!this.K&&(vt==4?Uo(this.j,this):(this.o=!1,ii(this)))}else Ci(this.g),m==400&&_.indexOf("Unknown SID")>0?(this.m=3,ge(12)):(this.m=0,ge(13)),hn(this),bn(this)}}}catch{}finally{}};function Yc(u){if(!xo(u))return u.g.la();const m=Pe(u.g);if(m==="")return"";let _="";const T=m.length,L=qn(u.g)==4;
571if(!u.h.i){if(typeof TextDecoder>"u")return hn(u),bn(u),"";u.h.i=new d.TextDecoder}for(let k=0;k<T;k++)u.h.h=!0,_+=u.h.i.decode(m[k],{stream:!(L&&k==T-1)});return m.length=0,u.h.g+=_,u.C=0,u.h.g}function xo(u){return u.g?u.v=="GET"&&u.M!=2&&u.j.Aa:!1}function No(u,m){var _=u.C,T=m.indexOf(`
572`,_);return T==-1?Ve:(_=Number(m.substring(_,T)),isNaN(_)?pe:(T+=1,T+_>m.length?Ve:(m=m.slice(T,T+_),u.C=T+_,m)))}Un.prototype.cancel=function(){this.K=!0,hn(this)};function ii(u){u.T=Date.now()+u.H,Ls(u,u.H)}function Ls(u,m){if(u.D!=null)throw Error("WatchDog timer not null");u.D=ti(p(u.aa,u),m)}function ai(u){u.D&&(d.clearTimeout(u.D),u.D=null)}Un.prototype.aa=function(){this.D=null;const u=Date.now();u-this.T>=0?(Ya(this.i,this.B),this.M!=2&&(Jn(),ge(17)),hn(this),this.m=2,bn(this)):Ls(this,this.T-u)};function bn(u){u.j.I==0||u.K||Uo(u.j,u)}function hn(u){ai(u);var m=u.O;m&&typeof m.dispose=="function"&&m.dispose(),u.O=null,Fr(u.V),u.g&&(m=u.g,u.g=null,m.abort(),m.dispose())}function si(u,m){try{var _=u.j;if(_.I!=0&&(_.g==u||li(_.h,u))){if(!u.L&&li(_.h,u)&&_.I==3){try{var T=_.Ba.g.parse(m)}catch{T=null}if(Array.isArray(T)&&T.length==3){var L=T;if(L[0]==0){t:if(!_.v){if(_.g)if(_.g.F+3e3<u.F)Fs(_),sa(_);else break t;is(_),ge(18)}}else _.xa=L[1],0<_.xa-_.K&&L[2]<37500&&_.F&&_.A==0&&!_.C&&(_.C=ti(p(_.Va,_),6e3));ri(_.h)<=1&&_.ta&&(_.ta=void 0)}else di(_,11)}else if((u.L||_.g==u)&&Fs(_),!w(m))for(L=_.Ba.g.parse(m),m=0;m<L.length;m++){let Ut=L[m];const ae=Ut[0];if(!(ae<=_.K))if(_.K=ae,Ut=Ut[1],_.I==2)if(Ut[0]=="c"){_.M=Ut[1],_.ba=Ut[2];const wn=Ut[3];wn!=null&&(_.ka=wn,_.j.info("VER="+_.ka));const mi=Ut[4];mi!=null&&(_.za=mi,_.j.info("SVER="+_.za));const Hn=Ut[5];Hn!=null&&typeof Hn=="number"&&Hn>0&&(T=1.5*Hn,_.O=T,_.j.info("backChannelRequestTimeoutMs_="+T)),T=_;const Gn=u.g;if(Gn){const as=Gn.g?Gn.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(as){var k=T.h;k.g||as.indexOf("spdy")==-1&&as.indexOf("quic")==-1&&as.indexOf("h2")==-1||(k.j=k.l,k.g=new Set,k.h&&(Zr(k,k.h),k.h=null))}if(T.G){const Qs=Gn.g?Gn.g.getResponseHeader("X-HTTP-Session-Id"):null;Qs&&(T.wa=Qs,qt(T.J,T.G,Qs))}}_.I=3,_.l&&_.l.ra(),_.aa&&(_.T=Date.now()-u.F,_.j.info("Handshake RTT: "+_.T+"ms")),T=_;var $=u;if(T.na=ko(T,T.L?T.ba:null,T.W),$.L){$r(T.h,$);var vt=$,ce=T.O;ce&&(vt.H=ce),vt.D&&(ai(vt),ii(vt)),T.g=$}else jo(T);_.i.length>0&&fi(_)}else Ut[0]!="stop"&&Ut[0]!="close"||di(_,7);else _.I==3&&(Ut[0]=="stop"||Ut[0]=="close"?Ut[0]=="stop"?di(_,7):rl(_):Ut[0]!="noop"&&_.l&&_.l.qa(Ut),_.A=0)}}Jn(4)}catch{}}var ye=class{constructor(u,m){this.g=u,this.map=m}};function Kr(u){this.l=u||10,d.PerformanceNavigationTiming?(u=d.performance.getEntriesByType("navigation"),u=u.length>0&&(u[0].nextHopProtocol=="hq"||u[0].nextHopProtocol=="h2")):u=!!(d.chrome&&d.chrome.loadTimes&&d.chrome.loadTimes()&&d.chrome.loadTimes().wasFetchedViaSpdy),this.j=u?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function Xr(u){return u.h?!0:u.g?u.g.size>=u.j:!1}function ri(u){return u.h?1:u.g?u.g.size:0}function li(u,m){return u.h?u.h==m:u.g?u.g.has(m):!1}function Zr(u,m){u.g?u.g.add(m):u.h=m}function $r(u,m){u.h&&u.h==m?u.h=null:u.g&&u.g.has(m)&&u.g.delete(m)}Kr.prototype.cancel=function(){if(this.i=Jr(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const u of this.g.values())u.cancel();this.g.clear()}};function Jr(u){if(u.h!=null)return u.i.concat(u.h.G);if(u.g!=null&&u.g.size!==0){let m=u.i;for(const _ of u.g.values())m=m.concat(_.G);return m}return Q(u.i)}var Io=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Us(u,m){if(u){u=u.split("&");for(let _=0;_<u.length;_++){const T=u[_].indexOf("=");let L,k=null;T>=0?(L=u[_].substring(0,T),k=u[_].substring(T+1)):L=u[_],m(L,k?decodeURIComponent(k.replace(/\+/g," ")):"")}}}function fn(u){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let m;u instanceof fn?(this.l=u.l,Oe(this,u.j),this.o=u.o,this.g=u.g,Ji(this,u.u),this.h=u.h,Wr(this,Mo(u.i)),this.m=u.m):u&&(m=String(u).match(Io))?(this.l=!1,Oe(this,m[1]||"",!0),this.o=oi(m[2]||""),this.g=oi(m[3]||"",!0),Ji(this,m[4]),this.h=oi(m[5]||"",!0),Wr(this,m[6]||"",!0),this.m=oi(m[7]||"")):(this.l=!1,this.i=new ta(null,this.l))}fn.prototype.toString=function(){const u=[];var m=this.j;m&&u.push($a(m,Ps,!0),":");var _=this.g;
572return(_||m=="file")&&(u.push("//"),(m=this.o)&&u.push($a(m,Ps,!0),"@"),u.push(wi(_).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),_=this.u,_!=null&&u.push(":",String(_))),(_=this.h)&&(this.g&&_.charAt(0)!="/"&&u.push("/"),u.push($a(_,_.charAt(0)=="/"?tl:Do,!0))),(_=this.i.toString())&&u.push("?",_),(_=this.m)&&u.push("#",$a(_,Vo)),u.join("")},fn.prototype.resolve=function(u){const m=_e(this);let _=!!u.j;_?Oe(m,u.j):_=!!u.o,_?m.o=u.o:_=!!u.g,_?m.g=u.g:_=u.u!=null;var T=u.h;if(_)Ji(m,u.u);else if(_=!!u.h){if(T.charAt(0)!="/")if(this.g&&!this.h)T="/"+T;else{var L=m.h.lastIndexOf("/");L!=-1&&(T=m.h.slice(0,L+1)+T)}if(L=T,L==".."||L==".")T="";else if(L.indexOf("./")!=-1||L.indexOf("/.")!=-1){T=L.lastIndexOf("/",0)==0,L=L.split("/");const k=[];for(let $=0;$<L.length;){const vt=L[$++];vt=="."?T&&$==L.length&&k.push(""):vt==".."?((k.length>1||k.length==1&&k[0]!="")&&k.pop(),T&&$==L.length&&k.push("")):(k.push(vt),T=!0)}T=k.join("/")}else T=L}return _?m.h=T:_=u.i.toString()!=="",_?Wr(m,Mo(u.i)):_=!!u.m,_&&(m.m=u.m),m};function _e(u){return new fn(u)}function Oe(u,m,_){u.j=_?oi(m,!0):m,u.j&&(u.j=u.j.replace(/:$/,""))}function Ji(u,m){if(m){if(m=Number(m),isNaN(m)||m<0)throw Error("Bad port number "+m);u.u=m}else u.u=null}function Wr(u,m,_){m instanceof ta?(u.i=m,ks(u.i,u.l)):(_||(m=$a(m,Wi)),u.i=new ta(m,u.l))}function qt(u,m,_){u.i.set(m,_)}function Za(u){return qt(u,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),u}function oi(u,m){return u?m?decodeURI(u.replace(/%25/g,"%2525")):decodeURIComponent(u):""}function $a(u,m,_){return typeof u=="string"?(u=encodeURI(u).replace(m,nn),_&&(u=u.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),u):null}function nn(u){return u=u.charCodeAt(0),"%"+(u>>4&15).toString(16)+(u&15).toString(16)}var Ps=/[#\/\?@]/g,Do=/[#\?:]/g,tl=/[#\?]/g,Wi=/[#\?@]/g,Vo=/#/g;function ta(u,m){this.h=this.g=null,this.i=u||null,this.j=!!m}function an(u){u.g||(u.g=new Map,u.h=0,u.i&&Us(u.i,function(m,_){u.add(decodeURIComponent(m.replace(/\+/g," ")),_)}))}s=ta.prototype,s.add=function(u,m){an(this),this.i=null,u=ea(this,u);let _=this.g.get(u);return _||this.g.set(u,_=[]),_.push(m),this.h+=1,this};function Oo(u,m){an(u),m=ea(u,m),u.g.has(m)&&(u.i=null,u.h-=u.g.get(m).length,u.g.delete(m))}function el(u,m){return an(u),m=ea(u,m),u.g.has(m)}s.forEach=function(u,m){an(this),this.g.forEach(function(_,T){_.forEach(function(L){u.call(m,L,T,this)},this)},this)};function nl(u,m){an(u);let _=[];if(typeof m=="string")el(u,m)&&(_=_.concat(u.g.get(ea(u,m))));else for(u=Array.from(u.g.values()),m=0;m<u.length;m++)_=_.concat(u[m]);return _}s.set=function(u,m){return an(this),this.i=null,u=ea(this,u),el(this,u)&&(this.h-=this.g.get(u).length),this.g.set(u,[m]),this.h+=1,this},s.get=function(u,m){return u?(u=nl(this,u),u.length>0?String(u[0]):m):m};function Bs(u,m,_){Oo(u,m),_.length>0&&(u.i=null,u.g.set(ea(u,m),Q(_)),u.h+=_.length)}s.toString=function(){if(this.i)return this.i;if(!this.g)return"";const u=[],m=Array.from(this.g.keys());for(let T=0;T<m.length;T++){var _=m[T];const L=wi(_);_=nl(this,_);for(let k=0;k<_.length;k++){let $=L;_[k]!==""&&($+="="+wi(_[k])),u.push($)}}return this.i=u.join("&")};function Mo(u){const m=new ta;return m.i=u.i,u.g&&(m.g=new Map(u.g),m.h=u.h),m}function ea(u,m){return m=String(m),u.j&&(m=m.toLowerCase()),m}function ks(u,m){m&&!u.j&&(an(u),u.i=null,u.g.forEach(function(_,T){const L=T.toLowerCase();T!=L&&(Oo(this,T),Bs(this,L,_))},u)),u.j=m}function Bn(u,m){const _=new Ln;if(d.Image){const T=new Image;T.onload=b(An,_,"TestLoadImage: loaded",!0,m,T),T.onerror=b(An,_,"TestLoadImage: error",!1,m,T),T.onabort=b(An,_,"TestLoadImage: abort",!1,m,T),T.ontimeout=b(An,_,"TestLoadImage: timeout",!1,m,T),d.setTimeout(function(){T.ontimeout&&T.ontimeout()},1e4),T.src=u}else m(!1)}function il(u,m){const _=new Ln,T=new AbortController,L=setTimeout(()=>{T.abort(),An(_,"TestPingServer: timeout",!1,m)},1e4);fetch(u,{signal:T.signal}).then(k=>{clearTimeout(L),k.ok?An(_,"TestPingServer: ok",!0,m):An(_,"TestPingServer: server error",!1,m)}).catch(()=>{clearTimeout(L),An(_,"TestPingServer: error",!1,m)})}function An(u,m,_,T,L){try{L&&(L.onload=null,L.onerror=null,L.onabort=null,L.ontimeout=null),T(_)}catch{}}function na(){this.g=new To}function ui(u){this.i=u.Sb||null,this.h=u.ab||!1}A(ui,bo),ui.prototype.g=function(){return new Ja(this.i,this.h)};function Ja(u,m){me.call(this),this.H=u,this.o=m,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}A(Ja,me),s=Ja.prototype,s.open=function(u,m){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=u,this.D=m,this.readyState=1,kn(this)},s.send=function(u){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");
vendor: 6,025 bytes, lines 572-575
572if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const m={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};u&&(m.body=u),(this.H||d).fetch(new Request(this.D,m)).then(this.Pa.bind(this),this.ga.bind(this))},s.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,ia(this)),this.readyState=0},s.Pa=function(u){if(this.g&&(this.l=u,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=u.headers,this.readyState=2,kn(this)),this.g&&(this.readyState=3,kn(this),this.g)))if(this.responseType==="arraybuffer")u.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof d.ReadableStream<"u"&&"body"in u){if(this.j=u.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.B=new TextDecoder;qs(this)}else u.text().then(this.Oa.bind(this),this.ga.bind(this))};function qs(u){u.j.read().then(u.Ma.bind(u)).catch(u.ga.bind(u))}s.Ma=function(u){if(this.g){if(this.o&&u.value)this.response.push(u.value);else if(!this.o){var m=u.value?u.value:new Uint8Array(0);(m=this.B.decode(m,{stream:!u.done}))&&(this.response=this.responseText+=m)}u.done?ia(this):kn(this),this.readyState==3&&qs(this)}},s.Oa=function(u){this.g&&(this.response=this.responseText=u,ia(this))},s.Na=function(u){this.g&&(this.response=u,ia(this))},s.ga=function(){this.g&&ia(this)};function ia(u){u.readyState=4,u.l=null,u.j=null,u.B=null,kn(u)}s.setRequestHeader=function(u,m){this.A.append(u,m)},s.getResponseHeader=function(u){return this.h&&this.h.get(u.toLowerCase())||""},s.getAllResponseHeaders=function(){if(!this.h)return"";const u=[],m=this.h.entries();for(var _=m.next();!_.done;)_=_.value,u.push(_[0]+": "+_[1]),_=m.next();return u.join(`\r
573`)};function kn(u){u.onreadystatechange&&u.onreadystatechange.call(u)}Object.defineProperty(Ja.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(u){this.m=u?"include":"same-origin"}});function Sn(u){let m="";return Mt(u,function(_,T){m+=T,m+=":",m+=_,m+=`\r
574`}),m}function Wa(u,m,_){t:{for(T in _){var T=!1;break t}T=!0}T||(_=Sn(_),typeof u=="string"?_!=null&&wi(_):qt(u,m,_))}function Ft(u){me.call(this),this.headers=new Map,this.L=u||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}A(Ft,me);var ci=/^https?$/i,al=["POST","PUT"];s=Ft.prototype,s.Fa=function(u){this.H=u},s.ea=function(u,m,_,T){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+u);m=m?m.toUpperCase():"GET",this.D=u,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():Yr.g(),this.g.onreadystatechange=O(p(this.Ca,this));try{this.B=!0,this.g.open(m,String(u),!0),this.B=!1}catch(k){ts(this,k);return}if(u=_||"",_=new Map(this.headers),T)if(Object.getPrototypeOf(T)===Object.prototype)for(var L in T)_.set(L,T[L]);else if(typeof T.keys=="function"&&typeof T.get=="function")for(const k of T.keys())_.set(k,T.get(k));else throw Error("Unknown input type for opt_headers: "+String(T));T=Array.from(_.keys()).find(k=>k.toLowerCase()=="content-type"),L=d.FormData&&u instanceof d.FormData,!(Array.prototype.indexOf.call(al,m,void 0)>=0)||T||L||_.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[k,$]of _)this.g.setRequestHeader(k,$);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(u),this.v=!1}catch(k){ts(this,k)}};function ts(u,m){u.h=!1,u.g&&(u.j=!0,u.g.abort(),u.j=!1),u.l=m,u.o=5,sl(u),Ri(u)}function sl(u){u.A||(u.A=!0,Ne(u,"complete"),Ne(u,"error"))}s.abort=function(u){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=u||7,Ne(this,"complete"),Ne(this,"abort"),Ri(this))},s.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Ri(this,!0)),Ft.Z.N.call(this)},s.Ca=function(){this.u||(this.B||this.v||this.j?es(this):this.Xa())},s.Xa=function(){es(this)};function es(u){if(u.h&&typeof h<"u"){if(u.v&&qn(u)==4)setTimeout(u.Ca.bind(u),0);else if(Ne(u,"readystatechange"),qn(u)==4){u.h=!1;try{const k=u.ca();t:switch(k){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var m=!0;break t;default:m=!1}var _;if(!(_=m)){var T;if(T=k===0){let $=String(u.D).match(Io)[1]||null;!$&&d.self&&d.self.location&&($=d.self.location.protocol.slice(0,-1)),T=!ci.test($?$.toLowerCase():"")}_=T}if(_)Ne(u,"complete"),Ne(u,"success");else{u.o=6;try{var L=qn(u)>2?u.g.statusText:""}catch{L=""}u.l=L+" ["+u.ca()+"]",sl(u)}}finally{Ri(u)}}}}function Ri(u,m){if(u.g){u.m&&(clearTimeout(u.m),u.m=null);const _=u.g;u.g=null,m||Ne(u,"ready");try{_.onreadystatechange=null}catch{}}}s.isActive=function(){return!!this.g};function qn(u){return u.g?u.g.readyState:0}s.ca=function(){try{return qn(this)>2?this.g.status:-1}catch{return-1}},s.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},s.La=function(u){if(this.g){var m=this.g.responseText;return u&&m.indexOf(u)==0&&(m=m.substring(u.length)),Gc(m)}};function Pe(u){try{if(!u.g)return null;if("response"in u.g)return u.g.response;switch(u.F){case"":case"text":return u.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in u.g)return u.g.mozResponseArrayBuffer}return null}catch{return null}}function Ci(u){const m={};u=(u.g&&qn(u)>=2&&u.g.getAllResponseHeaders()||"").split(`\r
575`);for(let T=0;T<u.length;T++){if(w(u[T]))continue;var _=Co(u[T]);const L=_[0];if(_=_[1],typeof _!="string")continue;_=_.trim();const k=m[L]||[];m[L]=k,k.push(_)}kt(m,function(T){return T.join(", ")})}s.ya=function(){return this.o},s.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};
vendor: 4,167 bytes, line 575
575function hi(u,m,_){return _&&_.internalChannelParams&&_.internalChannelParams[u]||m}function aa(u){this.za=0,this.i=[],this.j=new Ln,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=hi("failFast",!1,u),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=hi("baseRetryDelayMs",5e3,u),this.Za=hi("retryDelaySeedMs",1e4,u),this.Ta=hi("forwardChannelMaxRetries",2,u),this.va=hi("forwardChannelRequestTimeoutMs",2e4,u),this.ma=u&&u.xmlHttpFactory||void 0,this.Ua=u&&u.Rb||void 0,this.Aa=u&&u.useFetchStreams||!1,this.O=void 0,this.L=u&&u.supportsCrossDomainXhr||!1,this.M="",this.h=new Kr(u&&u.concurrentRequestLimit),this.Ba=new na,this.S=u&&u.fastHandshake||!1,this.R=u&&u.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=u&&u.Pb||!1,u&&u.ua&&this.j.ua(),u&&u.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&u&&u.detectBufferingProxy||!1,this.ia=void 0,u&&u.longPollingTimeout&&u.longPollingTimeout>0&&(this.ia=u.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}s=aa.prototype,s.ka=8,s.I=1,s.connect=function(u,m,_,T){ge(0),this.W=u,this.H=m||{},_&&T!==void 0&&(this.H.OSID=_,this.H.OAID=T),this.F=this.X,this.J=ko(this,null,this.W),fi(this)};function rl(u){if(Hs(u),u.I==3){var m=u.V++,_=_e(u.J);if(qt(_,"SID",u.M),qt(_,"RID",m),qt(_,"TYPE","terminate"),ns(u,_),m=new Un(u,u.j,m),m.M=2,m.A=Za(_e(_)),_=!1,d.navigator&&d.navigator.sendBeacon)try{_=d.navigator.sendBeacon(m.A.toString(),"")}catch{}!_&&d.Image&&(new Image().src=m.A,_=!0),_||(m.g=qo(m.j,null),m.g.ea(m.A)),m.F=Date.now(),ii(m)}Bo(u)}function sa(u){u.g&&(ol(u),u.g.cancel(),u.g=null)}function Hs(u){sa(u),u.v&&(d.clearTimeout(u.v),u.v=null),Fs(u),u.h.cancel(),u.m&&(typeof u.m=="number"&&d.clearTimeout(u.m),u.m=null)}function fi(u){if(!Xr(u.h)&&!u.m){u.m=!0;var m=u.Ea;Zt||S(),Lt||(Zt(),Lt=!0),N.add(m,u),u.D=0}}function Gs(u,m){return ri(u.h)>=u.h.j-(u.m?1:0)?!1:u.m?(u.i=m.G.concat(u.i),!0):u.I==1||u.I==2||u.D>=(u.Sa?0:u.Ta)?!1:(u.m=ti(p(u.Ea,u,m),Po(u,u.D)),u.D++,!0)}s.Ea=function(u){if(this.m)if(this.m=null,this.I==1){if(!u){this.V=Math.floor(Math.random()*1e5),u=this.V++;const L=new Un(this,this.j,u);let k=this.o;if(this.U&&(k?(k=V(k),tt(k,this.U)):k=this.U),this.u!==null||this.R||(L.J=k,k=null),this.S)t:{for(var m=0,_=0;_<this.i.length;_++){e:{var T=this.i[_];if("__data__"in T.map&&(T=T.map.__data__,typeof T=="string")){T=T.length;break e}T=void 0}if(T===void 0)break;if(m+=T,m>4096){m=_;break t}if(m===4096||_===this.i.length-1){m=_+1;break t}}m=1e3}else m=1e3;m=zo(this,L,m),_=_e(this.J),qt(_,"RID",u),qt(_,"CVER",22),this.G&&qt(_,"X-HTTP-Session-Id",this.G),ns(this,_),k&&(this.R?m="headers="+wi(Sn(k))+"&"+m:this.u&&Wa(_,this.u,k)),Zr(this.h,L),this.Ra&&qt(_,"TYPE","init"),this.S?(qt(_,"$req",m),qt(_,"SID","null"),L.U=!0,ni(L,_,null)):ni(L,_,m),this.I=2}}else this.I==3&&(u?ll(this,u):this.i.length==0||Xr(this.h)||ll(this))};function ll(u,m){var _;m?_=m.l:_=u.V++;const T=_e(u.J);qt(T,"SID",u.M),qt(T,"RID",_),qt(T,"AID",u.K),ns(u,T),u.u&&u.o&&Wa(T,u.u,u.o),_=new Un(u,u.j,_,u.D+1),u.u===null&&(_.J=u.o),m&&(u.i=m.G.concat(u.i)),m=zo(u,_,1e3),_.H=Math.round(u.va*.5)+Math.round(u.va*.5*Math.random()),Zr(u.h,_),ni(_,T,m)}function ns(u,m){u.H&&Mt(u.H,function(_,T){qt(m,T,_)}),u.l&&Mt({},function(_,T){qt(m,T,_)})}function zo(u,m,_){_=Math.min(u.i.length,_);const T=u.l?p(u.l.Ka,u.l,u):null;t:{var L=u.i;let vt=-1;for(;;){const ce=["count="+_];vt==-1?_>0?(vt=L[0].g,ce.push("ofs="+vt)):vt=0:ce.push("ofs="+vt);let Ut=!0;for(let ae=0;ae<_;ae++){var k=L[ae].g;const wn=L[ae].map;if(k-=vt,k<0)vt=Math.max(0,L[ae].g-100),Ut=!1;else try{k="req"+k+"_"||"";try{var $=wn instanceof Map?wn:Object.entries(wn);for(const[mi,Hn]of $){let Gn=Hn;y(Hn)&&(Gn=$i(Hn)),ce.push(k+mi+"="+encodeURIComponent(Gn))}}catch(mi){throw ce.push(k+"type="+encodeURIComponent("_badmap")),mi}}catch{T&&T(wn)}}if(Ut){$=ce.join("&");break t}}$=void 0}return u=u.i.splice(0,_),m.G=u,$}function jo(u){if(!u.g&&!u.v){u.Y=1;var m=u.Da;Zt||S(),Lt||(Zt(),Lt=!0),N.add(m,u),u.A=0}}function is(u){return u.g||u.v||u.A>=3?!1:(u.Y++,u.v=ti(p(u.Da,u),Po(u,u.A)),u.A++,!0)}
vendor: 5,497 bytes, lines 575-579
575s.Da=function(){if(this.v=null,Lo(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var u=4*this.T;this.j.info("BP detection timer enabled: "+u),this.B=ti(p(this.Wa,this),u)}},s.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,ge(10),sa(this),Lo(this))};function ol(u){u.B!=null&&(d.clearTimeout(u.B),u.B=null)}function Lo(u){u.g=new Un(u,u.j,"rpc",u.Y),u.u===null&&(u.g.J=u.o),u.g.P=0;var m=_e(u.na);qt(m,"RID","rpc"),qt(m,"SID",u.M),qt(m,"AID",u.K),qt(m,"CI",u.F?"0":"1"),!u.F&&u.ia&&qt(m,"TO",u.ia),qt(m,"TYPE","xmlhttp"),ns(u,m),u.u&&u.o&&Wa(m,u.u,u.o),u.O&&(u.g.H=u.O);var _=u.g;u=u.ba,_.M=1,_.A=Za(_e(m)),_.u=null,_.R=!0,js(_,u)}s.Va=function(){this.C!=null&&(this.C=null,sa(this),is(this),ge(19))};function Fs(u){u.C!=null&&(d.clearTimeout(u.C),u.C=null)}function Uo(u,m){var _=null;if(u.g==m){Fs(u),ol(u),u.g=null;var T=2}else if(li(u.h,m))_=m.G,$r(u.h,m),T=1;else return;if(u.I!=0){if(m.o)if(T==1){_=m.u?m.u.length:0,m=Date.now()-m.F;var L=u.D;T=zs(),Ne(T,new Wn(T,_)),fi(u)}else jo(u);else if(L=m.m,L==3||L==0&&m.X>0||!(T==1&&Gs(u,m)||T==2&&is(u)))switch(_&&_.length>0&&(m=u.h,m.i=m.i.concat(_)),L){case 1:di(u,5);break;case 4:di(u,10);break;case 3:di(u,6);break;default:di(u,2)}}}function Po(u,m){let _=u.Qa+Math.floor(Math.random()*u.Za);return u.isActive()||(_*=2),_*m}function di(u,m){if(u.j.info("Error code "+m),m==2){var _=p(u.bb,u),T=u.Ua;const L=!T;T=new fn(T||"//www.google.com/images/cleardot.gif"),d.location&&d.location.protocol=="http"||Oe(T,"https"),Za(T),L?Bn(T.toString(),_):il(T.toString(),_)}else ge(2);u.I=0,u.l&&u.l.pa(m),Bo(u),Hs(u)}s.bb=function(u){u?(this.j.info("Successfully pinged google.com"),ge(2)):(this.j.info("Failed to ping google.com"),ge(1))};function Bo(u){if(u.I=0,u.ja=[],u.l){const m=Jr(u.h);(m.length!=0||u.i.length!=0)&&(J(u.ja,m),J(u.ja,u.i),u.h.i.length=0,Q(u.i),u.i.length=0),u.l.oa()}}function ko(u,m,_){var T=_ instanceof fn?_e(_):new fn(_);if(T.g!="")m&&(T.g=m+"."+T.g),Ji(T,T.u);else{var L=d.location;T=L.protocol,m=m?m+"."+L.hostname:L.hostname,L=+L.port;const k=new fn(null);T&&Oe(k,T),m&&(k.g=m),L&&Ji(k,L),_&&(k.h=_),T=k}return _=u.G,m=u.wa,_&&m&&qt(T,_,m),qt(T,"VER",u.ka),ns(u,T),T}function qo(u,m,_){if(m&&!u.L)throw Error("Can't create secondary domain capable XhrIo object.");return m=u.Aa&&!u.ma?new Ft(new ui({ab:_})):new Ft(u.ma),m.Fa(u.L),m}s.isActive=function(){return!!this.l&&this.l.isActive(this)};function Ho(){}s=Ho.prototype,s.ra=function(){},s.qa=function(){},s.pa=function(){},s.oa=function(){},s.isActive=function(){return!0},s.Ka=function(){};function ra(){}ra.prototype.g=function(u,m){return new Je(u,m)};function Je(u,m){me.call(this),this.g=new aa(m),this.l=u,this.h=m&&m.messageUrlParams||null,u=m&&m.messageHeaders||null,m&&m.clientProtocolHeaderRequired&&(u?u["X-Client-Protocol"]="webchannel":u={"X-Client-Protocol":"webchannel"}),this.g.o=u,u=m&&m.initMessageHeaders||null,m&&m.messageContentType&&(u?u["X-WebChannel-Content-Type"]=m.messageContentType:u={"X-WebChannel-Content-Type":m.messageContentType}),m&&m.sa&&(u?u["X-WebChannel-Client-Profile"]=m.sa:u={"X-WebChannel-Client-Profile":m.sa}),this.g.U=u,(u=m&&m.Qb)&&!w(u)&&(this.g.u=u),this.A=m&&m.supportsCrossDomainXhr||!1,this.v=m&&m.sendRawJson||!1,(m=m&&m.httpSessionIdParam)&&!w(m)&&(this.g.G=m,u=this.h,u!==null&&m in u&&(u=this.h,m in u&&delete u[m])),this.j=new xi(this)}A(Je,me),Je.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},Je.prototype.close=function(){rl(this.g)},Je.prototype.o=function(u){var m=this.g;if(typeof u=="string"){var _={};_.__data__=u,u=_}else this.v&&(_={},_.__data__=$i(u),u=_);m.i.push(new ye(m.Ya++,u)),m.I==3&&fi(m)},Je.prototype.N=function(){this.g.l=null,delete this.j,rl(this.g),delete this.g,Je.Z.N.call(this)};function Go(u){Ue.call(this),u.__headers__&&(this.headers=u.__headers__,this.statusCode=u.__status__,delete u.__headers__,delete u.__status__);var m=u.__sm__;if(m){t:{for(const _ in m){u=_;break t}u=void 0}(this.i=u)&&(u=this.i,m=m!==null&&u in m?m[u]:void 0),this.data=m}else this.data=u}A(Go,Ue);function Fo(){Tn.call(this),this.status=1}A(Fo,Tn);function xi(u){this.g=u}A(xi,Ho),xi.prototype.ra=function(){Ne(this.g,"a")},xi.prototype.qa=function(u){Ne(this.g,new Go(u))},xi.prototype.pa=function(u){Ne(this.g,new Fo)},xi.prototype.oa=function(){Ne(this.g,"b")},ra.prototype.createWebChannel=ra.prototype.g,Je.prototype.send=Je.prototype.o,Je.prototype.open=Je.prototype.m,Je.prototype.close=Je.prototype.close,G0=function(){return new ra},H0=function(){return zs()},q0=ue,fd={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},Ka.NO_ERROR=0,Ka.TIMEOUT=8,Ka.HTTP_ERROR=6,nc=Ka,Qr.COMPLETE="complete",k0=Qr,Ao.EventType=jn,jn.OPEN="a",jn.CLOSE="b",jn.ERROR="c",jn.MESSAGE="d",me.prototype.listen=me.prototype.J,Kl=Ao,Ft.prototype.listenOnce=Ft.prototype.K,Ft.prototype.getLastError=Ft.prototype.Ha,Ft.prototype.getLastErrorCode=Ft.prototype.ya,Ft.prototype.getStatus=Ft.prototype.ca,Ft.prototype.getResponseJson=Ft.prototype.La,Ft.prototype.getResponseText=Ft.prototype.la,Ft.prototype.send=Ft.prototype.ea,Ft.prototype.setWithCredentials=Ft.prototype.Fa,B0=Ft}).apply(typeof Xu<"u"?Xu:typeof self<"u"?self:typeof window<"u"?window:{});/**
576 * @license
577 * Copyright 2017 Google LLC
578 *
579 * Licensed under the Apache License, Version 2.0 (the "License");
580 * you may not use this file except in compliance with the License.
581 * You may obtain a copy of the License at
582 *
583 *   http://www.apache.org/licenses/LICENSE-2.0
584 *
585 * Unless required by applicable law or agreed to in writing, software
586 * distributed under the License is distributed on an "AS IS" BASIS,
587 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
588 * See the License for the specific language governing permissions and
589 * limitations under the License.
590 */class Xe{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Xe.UNAUTHENTICATED=new Xe(null),Xe.GOOGLE_CREDENTIALS=new Xe("google-credentials-uid"),Xe.FIRST_PARTY=new Xe("first-party-uid"),Xe.MOCK_USER=new Xe("mock-user");/**
591 * @license
592 * Copyright 2017 Google LLC
593 *
594 * Licensed under the Apache License, Version 2.0 (the "License");
595 * you may not use this file except in compliance with the License.
596 * You may obtain a copy of the License at
597 *
598 *   http://www.apache.org/licenses/LICENSE-2.0
599 *
600 * Unless required by applicable law or agreed to in writing, software
601 * distributed under the License is distributed on an "AS IS" BASIS,
602 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
603 * See the License for the specific language governing permissions and
604 * limitations under the License.
605 */let jr="12.10.0";function YA(s){jr=s}/**
606 * @license
607 * Copyright 2020 Google LLC
608 *
609 * Licensed under the Apache License, Version 2.0 (the "License");
610 * you may not use this file except in compliance with the License.
611 * You may obtain a copy of the License at
612 *
613 *   http://www.apache.org/licenses/LICENSE-2.0
614 *
615 * Unless required by applicable law or agreed to in writing, software
616 * distributed under the License is distributed on an "AS IS" BASIS,
617 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
618 * See the License for the specific language governing permissions and
619 * limitations under the License.
620 *//**
621 * @license
622 * Copyright 2017 Google LLC
623 *
624 * Licensed under the Apache License, Version 2.0 (the "License");
625 * you may not use this file except in compliance with the License.
626 * You may obtain a copy of the License at
627 *
628 *   http://www.apache.org/licenses/LICENSE-2.0
629 *
630 * Unless required by applicable law or agreed to in writing, software
631 * distributed under the License is distributed on an "AS IS" BASIS,
632 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
633 * See the License for the specific language governing permissions and
634 * limitations under the License.
635 */const As=new Ud("@firebase/firestore");function br(){return As.logLevel}function it(s,...e){if(As.logLevel<=Ot.DEBUG){const i=e.map(Bd);As.debug(`Firestore (${jr}): ${s}`,...i)}}function Ki(s,...e){if(As.logLevel<=Ot.ERROR){const i=e.map(Bd);As.error(`Firestore (${jr}): ${s}`,...i)}}function Ss(s,...e){if(As.logLevel<=Ot.WARN){const i=e.map(Bd);As.warn(`Firestore (${jr}): ${s}`,...i)}}function Bd(s){if(typeof s=="string")return s;try{return(function(i){return JSON.stringify(i)})(s)}catch{return s}}/**
636 * @license
637 * Copyright 2017 Google LLC
638 *
639 * Licensed under the Apache License, Version 2.0 (the "License");
640 * you may not use this file except in compliance with the License.
641 * You may obtain a copy of the License at
642 *
643 *   http://www.apache.org/licenses/LICENSE-2.0
644 *
645 * Unless required by applicable law or agreed to in writing, software
646 * distributed under the License is distributed on an "AS IS" BASIS,
647 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
648 * See the License for the specific language governing permissions and
649 * limitations under the License.
650 */function ft(s,e,i){let r="Unexpected state";typeof e=="string"?r=e:i=e,F0(s,r,i)}function F0(s,e,i){let r=`FIRESTORE (${jr}) INTERNAL ASSERTION FAILED: ${e} (ID: ${s.toString(16)})`;if(i!==void 0)try{r+=" CONTEXT: "+JSON.stringify(i)}catch{r+=" CONTEXT: "+i}throw Ki(r),new Error(r)}function Bt(s,e,i,r){let o="Unexpected state";
vendor: 5,858 bytes, lines 650-695
650typeof i=="string"?o=i:r=i,s||F0(e,o,r)}function pt(s,e){return s}/**
651 * @license
652 * Copyright 2017 Google LLC
653 *
654 * Licensed under the Apache License, Version 2.0 (the "License");
655 * you may not use this file except in compliance with the License.
656 * You may obtain a copy of the License at
657 *
658 *   http://www.apache.org/licenses/LICENSE-2.0
659 *
660 * Unless required by applicable law or agreed to in writing, software
661 * distributed under the License is distributed on an "AS IS" BASIS,
662 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
663 * See the License for the specific language governing permissions and
664 * limitations under the License.
665 */const X={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 at extends qa{constructor(e,i){super(e,i),this.code=e,this.message=i,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
666 * @license
667 * Copyright 2017 Google LLC
668 *
669 * Licensed under the Apache License, Version 2.0 (the "License");
670 * you may not use this file except in compliance with the License.
671 * You may obtain a copy of the License at
672 *
673 *   http://www.apache.org/licenses/LICENSE-2.0
674 *
675 * Unless required by applicable law or agreed to in writing, software
676 * distributed under the License is distributed on an "AS IS" BASIS,
677 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
678 * See the License for the specific language governing permissions and
679 * limitations under the License.
680 */class Oa{constructor(){this.promise=new Promise(((e,i)=>{this.resolve=e,this.reject=i}))}}/**
681 * @license
682 * Copyright 2017 Google LLC
683 *
684 * Licensed under the Apache License, Version 2.0 (the "License");
685 * you may not use this file except in compliance with the License.
686 * You may obtain a copy of the License at
687 *
688 *   http://www.apache.org/licenses/LICENSE-2.0
689 *
690 * Unless required by applicable law or agreed to in writing, software
691 * distributed under the License is distributed on an "AS IS" BASIS,
692 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
693 * See the License for the specific language governing permissions and
694 * limitations under the License.
695 */class Q0{constructor(e,i){this.user=i,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class KA{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,i){e.enqueueRetryable((()=>i(Xe.UNAUTHENTICATED)))}shutdown(){}}class XA{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,i){this.changeListener=i,e.enqueueRetryable((()=>i(this.token.user)))}shutdown(){this.changeListener=null}}class ZA{constructor(e){this.t=e,this.currentUser=Xe.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,i){Bt(this.o===void 0,42304);let r=this.i;const o=v=>this.i!==r?(r=this.i,i(v)):Promise.resolve();let h=new Oa;this.o=()=>{this.i++,this.currentUser=this.u(),h.resolve(),h=new Oa,e.enqueueRetryable((()=>o(this.currentUser)))};const d=()=>{const v=h;e.enqueueRetryable((async()=>{await v.promise,await o(this.currentUser)}))},y=v=>{it("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=v,this.o&&(this.auth.addAuthTokenListener(this.o),d())};this.t.onInit((v=>y(v))),setTimeout((()=>{if(!this.auth){const v=this.t.getImmediate({optional:!0});v?y(v):(it("FirebaseAuthCredentialsProvider","Auth not yet detected"),h.resolve(),h=new Oa)}}),0),d()}getToken(){const e=this.i,i=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(i).then((r=>this.i!==e?(it("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Bt(typeof r.accessToken=="string",31837,{l:r}),new Q0(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 e=this.auth&&this.auth.getUid();return Bt(e===null||typeof e=="string",2055,{h:e}),new Xe(e)}}class $A{constructor(e,i,r){this.P=e,this.T=i,this.I=r,this.type="FirstParty",this.user=Xe.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const e=this.A();return e&&this.R.set("Authorization",e),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class JA{constructor(e,i,r){this.P=e,this.T=i,this.I=r}getToken(){return Promise.resolve(new $A(this.P,this.T,this.I))}start(e,i){e.enqueueRetryable((()=>i(Xe.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class g_{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class WA{constructor(e,i){this.V=i,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,DA(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,i){Bt(this.o===void 0,3512);const r=h=>{h.error!=null&&it("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${h.error.message}`);const d=h.token!==this.m;return this.m=h.token,it("FirebaseAppCheckTokenProvider",`Received ${d?"new":"existing"} token.`),d?i(h.token):Promise.resolve()};this.o=h=>{e.enqueueRetryable((()=>r(h)))};const o=h=>{it("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=h,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((h=>o(h))),setTimeout((()=>
695{if(!this.appCheck){const h=this.V.getImmediate({optional:!0});h?o(h):it("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new g_(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((i=>i?(Bt(typeof i.token=="string",44558,{tokenResult:i}),this.m=i.token,new g_(i.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/**
696 * @license
697 * Copyright 2020 Google LLC
698 *
699 * Licensed under the Apache License, Version 2.0 (the "License");
700 * you may not use this file except in compliance with the License.
701 * You may obtain a copy of the License at
702 *
703 *   http://www.apache.org/licenses/LICENSE-2.0
704 *
705 * Unless required by applicable law or agreed to in writing, software
706 * distributed under the License is distributed on an "AS IS" BASIS,
707 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
708 * See the License for the specific language governing permissions and
709 * limitations under the License.
710 */function tS(s){const e=typeof self<"u"&&(self.crypto||self.msCrypto),i=new Uint8Array(s);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(i);else for(let r=0;r<s;r++)i[r]=Math.floor(256*Math.random());return i}/**
711 * @license
712 * Copyright 2017 Google LLC
713 *
714 * Licensed under the Apache License, Version 2.0 (the "License");
715 * you may not use this file except in compliance with the License.
716 * You may obtain a copy of the License at
717 *
718 *   http://www.apache.org/licenses/LICENSE-2.0
719 *
720 * Unless required by applicable law or agreed to in writing, software
721 * distributed under the License is distributed on an "AS IS" BASIS,
722 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
723 * See the License for the specific language governing permissions and
724 * limitations under the License.
725 */class kd{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const o=tS(40);for(let h=0;h<o.length;++h)r.length<20&&o[h]<i&&(r+=e.charAt(o[h]%62))}return r}}function xt(s,e){return s<e?-1:s>e?1:0}function dd(s,e){const i=Math.min(s.length,e.length);for(let r=0;r<i;r++){const o=s.charAt(r),h=e.charAt(r);if(o!==h)return Jf(o)===Jf(h)?xt(o,h):Jf(o)?1:-1}return xt(s.length,e.length)}const eS=55296,nS=57343;function Jf(s){const e=s.charCodeAt(0);return e>=eS&&e<=nS}function Dr(s,e,i){return s.length===e.length&&s.every(((r,o)=>i(r,e[o])))}/**
726 * @license
727 * Copyright 2017 Google LLC
728 *
729 * Licensed under the Apache License, Version 2.0 (the "License");
730 * you may not use this file except in compliance with the License.
731 * You may obtain a copy of the License at
732 *
733 *   http://www.apache.org/licenses/LICENSE-2.0
734 *
735 * Unless required by applicable law or agreed to in writing, software
736 * distributed under the License is distributed on an "AS IS" BASIS,
737 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
738 * See the License for the specific language governing permissions and
739 * limitations under the License.
740 */const p_="__name__";class vi{constructor(e,i,r){i===void 0?i=0:i>e.length&&ft(637,{offset:i,range:e.length}),r===void 0?r=e.length-i:r>e.length-i&&ft(1746,{length:r,range:e.length-i}),this.segments=e,this.offset=i,this.len=r}get length(){return this.len}isEqual(e){return vi.comparator(this,e)===0}child(e){const i=this.segments.slice(this.offset,this.limit());return e instanceof vi?e.forEach((r=>{i.push(r)})):i.push(e),this.construct(i)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let i=0;i<this.length;i++)if(this.get(i)!==e.get(i))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let i=0;i<this.length;i++)if(this.get(i)!==e.get(i))return!1;return!0}forEach(e){for(let i=this.offset,r=this.limit();i<r;i++)e(this.segments[i])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,i){const r=Math.min(e.length,i.length);for(let o=0;o<r;o++){const h=vi.compareSegments(e.get(o),i.get(o));if(h!==0)return h}return xt(e.length,i.length)}static compareSegments(e,i){const r=vi.isNumericId(e),o=vi.isNumericId(i);return r&&!o?-1:!r&&o?1:r&&o?vi.extractNumericId(e).compare(vi.extractNumericId(i)):dd(e,i)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return Va.fromString(e.substring(4,e.length-2))}}class Jt extends vi{construct(e,i,r){return new Jt(e,i,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
740toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const i=[];for(const r of e){if(r.indexOf("//")>=0)throw new at(X.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);i.push(...r.split("/").filter((o=>o.length>0)))}return new Jt(i)}static emptyPath(){return new Jt([])}}const iS=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Fe extends vi{construct(e,i,r){return new Fe(e,i,r)}static isValidIdentifier(e){return iS.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Fe.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===p_}static keyField(){return new Fe([p_])}static fromServerFormat(e){const i=[];let r="",o=0;const h=()=>{if(r.length===0)throw new at(X.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);i.push(r),r=""};let d=!1;for(;o<e.length;){const y=e[o];if(y==="\\"){if(o+1===e.length)throw new at(X.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const v=e[o+1];if(v!=="\\"&&v!=="."&&v!=="`")throw new at(X.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=v,o+=2}else y==="`"?(d=!d,o++):y!=="."||d?(r+=y,o++):(h(),o++)}if(h(),d)throw new at(X.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new Fe(i)}static emptyPath(){return new Fe([])}}/**
741 * @license
742 * Copyright 2017 Google LLC
743 *
744 * Licensed under the Apache License, Version 2.0 (the "License");
745 * you may not use this file except in compliance with the License.
746 * You may obtain a copy of the License at
747 *
748 *   http://www.apache.org/licenses/LICENSE-2.0
749 *
750 * Unless required by applicable law or agreed to in writing, software
751 * distributed under the License is distributed on an "AS IS" BASIS,
752 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
753 * See the License for the specific language governing permissions and
754 * limitations under the License.
755 */class ut{constructor(e){this.path=e}static fromPath(e){return new ut(Jt.fromString(e))}static fromName(e){return new ut(Jt.fromString(e).popFirst(5))}static empty(){return new ut(Jt.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Jt.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,i){return Jt.comparator(e.path,i.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ut(new Jt(e.slice()))}}/**
756 * @license
757 * Copyright 2017 Google LLC
758 *
759 * Licensed under the Apache License, Version 2.0 (the "License");
760 * you may not use this file except in compliance with the License.
761 * You may obtain a copy of the License at
762 *
763 *   http://www.apache.org/licenses/LICENSE-2.0
764 *
765 * Unless required by applicable law or agreed to in writing, software
766 * distributed under the License is distributed on an "AS IS" BASIS,
767 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
768 * See the License for the specific language governing permissions and
769 * limitations under the License.
770 */function Y0(s,e,i){if(!i)throw new at(X.INVALID_ARGUMENT,`Function ${s}() cannot be called with an empty ${e}.`)}function aS(s,e,i,r){if(e===!0&&r===!0)throw new at(X.INVALID_ARGUMENT,`${s} and ${i} cannot be used together.`)}function y_(s){if(!ut.isDocumentKey(s))throw new at(X.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${s} has ${s.length}.`)}function __(s){if(ut.isDocumentKey(s))throw new at(X.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${s} has ${s.length}.`)}function K0(s){return typeof s=="object"&&s!==null&&(Object.getPrototypeOf(s)===Object.prototype||Object.getPrototypeOf(s)===null)}function Rc(s){if(s===void 0)return"undefined";if(s===null)return"null";if(typeof s=="string")return s.length>20&&(s=`${s.substring(0,20)}...`),JSON.stringify(s);if(typeof s=="number"||typeof s=="boolean")return""+s;if(typeof s=="object"){if(s instanceof Array)return"an array";{const e=(function(r){return r.constructor?r.constructor.name:null})(s);return e?`a custom ${e} object`:"an object"}}return typeof s=="function"?"a function":ft(12329,{type:typeof s})}function cc(s,e){if("_delegate"in s&&(s=s._delegate),!(s instanceof e)){if(e.name===s.constructor.name)throw new at(X.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const i=Rc(s);throw new at(X.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${i}`)}}return s}/**
771 * @license
772 * Copyright 2025 Google LLC
773 *
774 * Licensed under the Apache License, Version 2.0 (the "License");
775 * you may not use this file except in compliance with the License.
776 * You may obtain a copy of the License at
777 *
778 *   http://www.apache.org/licenses/LICENSE-2.0
779 *
780 * Unless required by applicable law or agreed to in writing, software
781 * distributed under the License is distributed on an "AS IS" BASIS,
782 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
783 * See the License for the specific language governing permissions and
784 * limitations under the License.
785 */function Re(s,e){const i={typeString:s};return e&&(i.value=e),i}function mo(s,e){if(!K0(s))throw new at(X.INVALID_ARGUMENT,"JSON must be an object");let i;for(const r in e)if(e[r]){const o=e[r].typeString,h="value"in e[r]?{value:e[r].value}:void 0;if(!(r in s)){i=`JSON missing required field: '${r}'`;break}const d=s[r];if(o&&typeof d!==o){i=`JSON field '${r}' must be a ${o}.`;break}if(h!==void 0&&d!==h.value){i=`Expected '${r}' field to equal '${h.value}'`;break}}if(i)throw new at(X.INVALID_ARGUMENT,i);return!0}/**
786 * @license
787 * Copyright 2017 Google LLC
788 *
789 * Licensed under the Apache License, Version 2.0 (the "License");
790 * you may not use this file except in compliance with the License.
791 * You may obtain a copy of the License at
792 *
793 *   http://www.apache.org/licenses/LICENSE-2.0
794 *
795 * Unless required by applicable law or agreed to in writing, software
796 * distributed under the License is distributed on an "AS IS" BASIS,
797 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
798 * See the License for the specific language governing permissions and
799 * limitations under the License.
800 */const v_=-62135596800,E_=1e6;class ee{static now(){return ee.fromMillis(Date.now())}static fromDate(e){return ee.fromMillis(e.getTime())}static fromMillis(e){const i=Math.floor(e/1e3),r=Math.floor((e-1e3*i)*E_);return new ee(i,r)}constructor(e,i){if(this.seconds=e,this.nanoseconds=i,i<0)throw new at(X.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+i);if(i>=1e9)throw new at(X.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+i);if(e<v_)throw new at(X.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new at(X.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/E_}_compareTo(e){return this.seconds===e.seconds?xt(this.nanoseconds,e.nanoseconds):xt(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:ee._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(mo(e,ee._jsonSchema))return new ee(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-v_;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}ee._jsonSchemaVersion="firestore/timestamp/1.0",ee._jsonSchema={type:Re("string",ee._jsonSchemaVersion),seconds:Re("number"),nanoseconds:Re("number")};/**
801 * @license
802 * Copyright 2017 Google LLC
803 *
804 * Licensed under the Apache License, Version 2.0 (the "License");
805 * you may not use this file except in compliance with the License.
806 * You may obtain a copy of the License at
807 *
808 *   http://www.apache.org/licenses/LICENSE-2.0
809 *
810 * Unless required by applicable law or agreed to in writing, software
811 * distributed under the License is distributed on an "AS IS" BASIS,
812 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
813 * See the License for the specific language governing permissions and
814 * limitations under the License.
815 */class mt{static fromTimestamp(e){return new mt(e)}static min(){return new mt(new ee(0,0))}static max(){return new mt(new ee(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
816 * @license
817 * Copyright 2021 Google LLC
818 *
819 * Licensed under the Apache License, Version 2.0 (the "License");
820 * you may not use this file except in compliance with the License.
821 * You may obtain a copy of the License at
822 *
823 *   http://www.apache.org/licenses/LICENSE-2.0
824 *
825 * Unless required by applicable law or agreed to in writing, software
826 * distributed under the License is distributed on an "AS IS" BASIS,
827 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
828 * See the License for the specific language governing permissions and
829 * limitations under the License.
830 */const ro=-1;function sS(s,e){const i=s.toTimestamp().seconds,r=s.toTimestamp().nanoseconds+1,o=mt.fromTimestamp(r===1e9?new ee(i+1,0):new ee(i,r));return new ja(o,ut.empty(),e)}function rS(s){return new ja(s.readTime,s.key,ro)}class ja{constructor(e,i,r){this.readTime=e,this.documentKey=i,this.largestBatchId=r}static min(){return new ja(mt.min(),ut.empty(),ro)}static max(){return new ja(mt.max(),ut.empty(),ro)}}function lS(s,e){let i=s.readTime.compareTo(e.readTime);return i!==0?i:(i=ut.comparator(s.documentKey,e.documentKey),i!==0?i:xt(s.largestBatchId,e.largestBatchId))}/**
831 * @license
832 * Copyright 2020 Google LLC
833 *
834 * Licensed under the Apache License, Version 2.0 (the "License");
835 * you may not use this file except in compliance with the License.
836 * You may obtain a copy of the License at
837 *
838 *   http://www.apache.org/licenses/LICENSE-2.0
839 *
840 * Unless required by applicable law or agreed to in writing, software
841 * distributed under the License is distributed on an "AS IS" BASIS,
842 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
843 * See the License for the specific language governing permissions and
844 * limitations under the License.
845 */const oS="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class uS{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}/**
846 * @license
847 * Copyright 2017 Google LLC
848 *
849 * Licensed under the Apache License, Version 2.0 (the "License");
850 * you may not use this file except in compliance with the License.
851 * You may obtain a copy of the License at
852 *
853 *   http://www.apache.org/licenses/LICENSE-2.0
854 *
855 * Unless required by applicable law or agreed to in writing, software
856 * distributed under the License is distributed on an "AS IS" BASIS,
857 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
858 * See the License for the specific language governing permissions and
859 * limitations under the License.
860 */async function Lr(s){if(s.code!==X.FAILED_PRECONDITION||s.message!==oS)throw s;it("LocalStore","Unexpectedly lost primary lease")}/**
861 * @license
862 * Copyright 2017 Google LLC
863 *
864 * Licensed under the Apache License, Version 2.0 (the "License");
865 * you may not use this file except in compliance with the License.
866 * You may obtain a copy of the License at
867 *
868 *   http://www.apache.org/licenses/LICENSE-2.0
869 *
870 * Unless required by applicable law or agreed to in writing, software
871 * distributed under the License is distributed on an "AS IS" BASIS,
872 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
873 * See the License for the specific language governing permissions and
874 * limitations under the License.
875 */class Z{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((i=>{this.isDone=!0,this.result=i,this.nextCallback&&this.nextCallback(i)}),(i=>{this.isDone=!0,this.error=i,this.catchCallback&&this.catchCallback(i)}))}catch(e){return this.next(void 0,e)}next(e,i){return this.callbackAttached&&ft(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(i,this.error):this.wrapSuccess(e,this.result):new Z(((r,o)=>{this.nextCallback=h=>{this.wrapSuccess(e,h).next(r,o)},this.catchCallback=h=>{this.wrapFailure(i,h).next(r,o)}}))}toPromise(){return new Promise(((e,i)=>{this.next(e,i)}))}wrapUserFunction(e){try{const i=e();return i instanceof Z?i:Z.resolve(i)}catch(i){return Z.reject(i)}}wrapSuccess(e,i){return e?this.wrapUserFunction((()=>e(i))):Z.resolve(i)}wrapFailure(e,i){return e?this.wrapUserFunction((()=>e(i))):Z.reject(i)}static resolve(e){return new Z(((i,r)=>{i(e)}))}static reject(e){return new Z(((i,r)=>{r(e)}))}static waitFor(e){return new Z(((i,r)=>{let o=0,h=0,d=!1;e.forEach((y=>{++o,y.next((()=>{++h,d&&h===o&&i()}),(v=>r(v)))})),d=!0,h===o&&i()}))}static or(e){let i=Z.resolve(!1);for(const r of e)i=i.next((o=>o?Z.resolve(o):r()));return i}static forEach(e,i){const r=[];return e.forEach(((o,h)=>{r.push(i.call(this,o,h))})),this.waitFor(r)}static mapArray(e,i){return new Z(((r,o)=>{const h=e.length,d=new Array(h);let y=0;for(let v=0;v<h;v++){const p=v;i(e[p]).next((b=>{d[p]=b,++y,y===h&&r(d)}),(b=>o(b)))}}))}static doWhile(e,i){return new Z(((r,o)=>{const h=()=>{e()===!0?i().next((()=>{h()}),o):r()};h()}))}}function cS(s){const e=s.match(/Android ([\d.]+)/i),i=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(i)}function Ur(s){return s.name==="IndexedDbTransactionError"}/**
876 * @license
877 * Copyright 2018 Google LLC
878 *
879 * Licensed under the Apache License, Version 2.0 (the "License");
880 * you may not use this file except in compliance with the License.
881 * You may obtain a copy of the License at
882 *
883 *   http://www.apache.org/licenses/LICENSE-2.0
884 *
885 * Unless required by applicable law or agreed to in writing, software
886 * distributed under the License is distributed on an "AS IS" BASIS,
887 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
888 * See the License for the specific language governing permissions and
889 * limitations under the License.
890 */class Cc{constructor(e,i){this.previousValue=e,i&&(i.sequenceNumberHandler=r=>this.ae(r),this.ue=r=>i.writeSequenceNumber(r))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ue&&this.ue(e),e}}Cc.ce=-1;/**
891 * @license
892 * Copyright 2017 Google LLC
893 *
894 * Licensed under the Apache License, Version 2.0 (the "License");
895 * you may not use this file except in compliance with the License.
896 * You may obtain a copy of the License at
897 *
898 *   http://www.apache.org/licenses/LICENSE-2.0
899 *
900 * Unless required by applicable law or agreed to in writing, software
901 * distributed under the License is distributed on an "AS IS" BASIS,
902 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
903 * See the License for the specific language governing permissions and
904 * limitations under the License.
905 */const qd=-1;function xc(s){return s==null}function hc(s){return s===0&&1/s==-1/0}function hS(s){return typeof s=="number"&&Number.isInteger(s)&&!hc(s)&&s<=Number.MAX_SAFE_INTEGER&&s>=Number.MIN_SAFE_INTEGER}/**
906 * @license
907 * Copyright 2017 Google LLC
908 *
909 * Licensed under the Apache License, Version 2.0 (the "License");
910 * you may not use this file except in compliance with the License.
911 * You may obtain a copy of the License at
912 *
913 *   http://www.apache.org/licenses/LICENSE-2.0
914 *
915 * Unless required by applicable law or agreed to in writing, software
916 * distributed under the License is distributed on an "AS IS" BASIS,
917 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
918 * See the License for the specific language governing permissions and
919 * limitations under the License.
920 */const X0="�";function fS(s){let e="";for(let i=0;i<s.length;i++)e.length>0&&(e=T_(e)),e=dS(s.get(i),e);return T_(e)}function dS(s,e){let i=e;const r=s.length;for(let o=0;o<r;o++){const h=s.charAt(o);switch(h){case"\0":i+="��";break;case X0:i+="��";break;default:i+=h}}return i}function T_(s){return s+X0+"�"}/**
921 * @license
922 * Copyright 2017 Google LLC
923 *
924 * Licensed under the Apache License, Version 2.0 (the "License");
925 * you may not use this file except in compliance with the License.
926 * You may obtain a copy of the License at
927 *
928 *   http://www.apache.org/licenses/LICENSE-2.0
929 *
930 * Unless required by applicable law or agreed to in writing, software
931 * distributed under the License is distributed on an "AS IS" BASIS,
932 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
933 * See the License for the specific language governing permissions and
934 * limitations under the License.
935 */function b_(s){let e=0;for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&e++;return e}function xs(s,e){for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&e(i,s[i])}function Z0(s){for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e))return!1;return!0}/**
936 * @license
937 * Copyright 2017 Google LLC
938 *
939 * Licensed under the Apache License, Version 2.0 (the "License");
940 * you may not use this file except in compliance with the License.
941 * You may obtain a copy of the License at
942 *
943 *   http://www.apache.org/licenses/LICENSE-2.0
944 *
945 * Unless required by applicable law or agreed to in writing, software
946 * distributed under the License is distributed on an "AS IS" BASIS,
947 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
948 * See the License for the specific language governing permissions and
949 * limitations under the License.
950 */class re{constructor(e,i){this.comparator=e,this.root=i||Ge.EMPTY}insert(e,i){return new re(this.comparator,this.root.insert(e,i,this.comparator).copy(null,null,Ge.BLACK,null,
vendor: 4,548 bytes, line 950
950null))}remove(e){return new re(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Ge.BLACK,null,null))}get(e){let i=this.root;for(;!i.isEmpty();){const r=this.comparator(e,i.key);if(r===0)return i.value;r<0?i=i.left:r>0&&(i=i.right)}return null}indexOf(e){let i=0,r=this.root;for(;!r.isEmpty();){const o=this.comparator(e,r.key);if(o===0)return i+r.left.size;o<0?r=r.left:(i+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((i,r)=>(e(i,r),!1)))}toString(){const e=[];return this.inorderTraversal(((i,r)=>(e.push(`${i}:${r}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Zu(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Zu(this.root,e,this.comparator,!1)}getReverseIterator(){return new Zu(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Zu(this.root,e,this.comparator,!0)}}class Zu{constructor(e,i,r,o){this.isReverse=o,this.nodeStack=[];let h=1;for(;!e.isEmpty();)if(h=i?r(e.key,i):1,i&&o&&(h*=-1),h<0)e=this.isReverse?e.left:e.right;else{if(h===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const i={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return i}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Ge{constructor(e,i,r,o,h){this.key=e,this.value=i,this.color=r??Ge.RED,this.left=o??Ge.EMPTY,this.right=h??Ge.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,i,r,o,h){return new Ge(e??this.key,i??this.value,r??this.color,o??this.left,h??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,i,r){let o=this;const h=r(e,o.key);return o=h<0?o.copy(null,null,null,o.left.insert(e,i,r),null):h===0?o.copy(null,i,null,null,null):o.copy(null,null,null,null,o.right.insert(e,i,r)),o.fixUp()}removeMin(){if(this.left.isEmpty())return Ge.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,i){let r,o=this;if(i(e,o.key)<0)o.left.isEmpty()||o.left.isRed()||o.left.left.isRed()||(o=o.moveRedLeft()),o=o.copy(null,null,null,o.left.remove(e,i),null);else{if(o.left.isRed()&&(o=o.rotateRight()),o.right.isEmpty()||o.right.isRed()||o.right.left.isRed()||(o=o.moveRedRight()),i(e,o.key)===0){if(o.right.isEmpty())return Ge.EMPTY;r=o.right.min(),o=o.copy(r.key,r.value,null,null,o.right.removeMin())}o=o.copy(null,null,null,null,o.right.remove(e,i))}return o.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Ge.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Ge.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),i=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,i)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw ft(43730,{key:this.key,value:this.value});if(this.right.isRed())throw ft(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw ft(27949);return e+(this.isRed()?0:1)}}Ge.EMPTY=null,Ge.RED=!0,Ge.BLACK=!1;
vendor: 4,232 bytes, lines 950-994
950Ge.EMPTY=new class{constructor(){this.size=0}get key(){throw ft(57766)}get value(){throw ft(16141)}get color(){throw ft(16727)}get left(){throw ft(29726)}get right(){throw ft(36894)}copy(e,i,r,o,h){return this}insert(e,i,r){return new Ge(e,i)}remove(e,i){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/**
951 * @license
952 * Copyright 2017 Google LLC
953 *
954 * Licensed under the Apache License, Version 2.0 (the "License");
955 * you may not use this file except in compliance with the License.
956 * You may obtain a copy of the License at
957 *
958 *   http://www.apache.org/licenses/LICENSE-2.0
959 *
960 * Unless required by applicable law or agreed to in writing, software
961 * distributed under the License is distributed on an "AS IS" BASIS,
962 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
963 * See the License for the specific language governing permissions and
964 * limitations under the License.
965 */class De{constructor(e){this.comparator=e,this.data=new re(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((i,r)=>(e(i),!1)))}forEachInRange(e,i){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const o=r.getNext();if(this.comparator(o.key,e[1])>=0)return;i(o.key)}}forEachWhile(e,i){let r;for(r=i!==void 0?this.data.getIteratorFrom(i):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const i=this.data.getIteratorFrom(e);return i.hasNext()?i.getNext().key:null}getIterator(){return new A_(this.data.getIterator())}getIteratorFrom(e){return new A_(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let i=this;return i.size<e.size&&(i=e,e=this),e.forEach((r=>{i=i.add(r)})),i}isEqual(e){if(!(e instanceof De)||this.size!==e.size)return!1;const i=this.data.getIterator(),r=e.data.getIterator();for(;i.hasNext();){const o=i.getNext().key,h=r.getNext().key;if(this.comparator(o,h)!==0)return!1}return!0}toArray(){const e=[];return this.forEach((i=>{e.push(i)})),e}toString(){const e=[];return this.forEach((i=>e.push(i))),"SortedSet("+e.toString()+")"}copy(e){const i=new De(this.comparator);return i.data=e,i}}class A_{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
966 * @license
967 * Copyright 2020 Google LLC
968 *
969 * Licensed under the Apache License, Version 2.0 (the "License");
970 * you may not use this file except in compliance with the License.
971 * You may obtain a copy of the License at
972 *
973 *   http://www.apache.org/licenses/LICENSE-2.0
974 *
975 * Unless required by applicable law or agreed to in writing, software
976 * distributed under the License is distributed on an "AS IS" BASIS,
977 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
978 * See the License for the specific language governing permissions and
979 * limitations under the License.
980 */class Kn{constructor(e){this.fields=e,e.sort(Fe.comparator)}static empty(){return new Kn([])}unionWith(e){let i=new De(Fe.comparator);for(const r of this.fields)i=i.add(r);for(const r of e)i=i.add(r);return new Kn(i.toArray())}covers(e){for(const i of this.fields)if(i.isPrefixOf(e))return!0;return!1}isEqual(e){return Dr(this.fields,e.fields,((i,r)=>i.isEqual(r)))}}/**
981 * @license
982 * Copyright 2023 Google LLC
983 *
984 * Licensed under the Apache License, Version 2.0 (the "License");
985 * you may not use this file except in compliance with the License.
986 * You may obtain a copy of the License at
987 *
988 *   http://www.apache.org/licenses/LICENSE-2.0
989 *
990 * Unless required by applicable law or agreed to in writing, software
991 * distributed under the License is distributed on an "AS IS" BASIS,
992 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
993 * See the License for the specific language governing permissions and
994 * limitations under the License.
995 */class $0 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
996 * @license
997 * Copyright 2020 Google LLC
998 *
999 * Licensed under the Apache License, Version 2.0 (the "License");
1000 * you may not use this file except in compliance with the License.
1001 * You may obtain a copy of the License at
1002 *
1003 *   http://www.apache.org/licenses/LICENSE-2.0
1004 *
1005 * Unless required by applicable law or agreed to in writing, software
1006 * distributed under the License is distributed on an "AS IS" BASIS,
1007 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1008 * See the License for the specific language governing permissions and
1009 * limitations under the License.
1010 */class Qe{constructor(e){this.binaryString=e}static fromBase64String(e){const i=(function(o){try{return atob(o)}catch(h){throw typeof DOMException<"u"&&h instanceof DOMException?new $0("Invalid base64 string: "+h):h}})(e);return new Qe(i)}static fromUint8Array(e){const i=(function(o){let h="";for(let d=0;d<o.length;++d)h+=String.fromCharCode(o[d]);return h})(e);return new Qe(i)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return(function(i){return btoa(i)})(this.binaryString)}toUint8Array(){return(function(i){const r=new Uint8Array(i.length);for(let o=0;o<i.length;o++)r[o]=i.charCodeAt(o);return r})(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return xt(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Qe.EMPTY_BYTE_STRING=new Qe("");const mS=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function La(s){if(Bt(!!s,39018),typeof s=="string"){let e=0;const i=mS.exec(s);if(Bt(!!i,46558,{timestamp:s}),i[1]){let o=i[1];o=(o+"000000000").substr(0,9),e=Number(o)}const r=new Date(s);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:de(s.seconds),nanos:de(s.nanos)}}function de(s){return typeof s=="number"?s:typeof s=="string"?Number(s):0}function Ua(s){return typeof s=="string"?Qe.fromBase64String(s):Qe.fromUint8Array(s)}/**
1011 * @license
1012 * Copyright 2020 Google LLC
1013 *
1014 * Licensed under the Apache License, Version 2.0 (the "License");
1015 * you may not use this file except in compliance with the License.
1016 * You may obtain a copy of the License at
1017 *
1018 *   http://www.apache.org/licenses/LICENSE-2.0
1019 *
1020 * Unless required by applicable law or agreed to in writing, software
1021 * distributed under the License is distributed on an "AS IS" BASIS,
1022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1023 * See the License for the specific language governing permissions and
1024 * limitations under the License.
1025 */const J0="server_timestamp",W0="__type__",tv="__previous_value__",ev="__local_write_time__";function Hd(s){var i,r;return((r=(((i=s==null?void 0:s.mapValue)==null?void 0:i.fields)||{})[W0])==null?void 0:r.stringValue)===J0}function Nc(s){const e=s.mapValue.fields[tv];return Hd(e)?Nc(e):e}function lo(s){const e=La(s.mapValue.fields[ev].timestampValue);return new ee(e.seconds,e.nanos)}/**
1026 * @license
1027 * Copyright 2017 Google LLC
1028 *
1029 * Licensed under the Apache License, Version 2.0 (the "License");
1030 * you may not use this file except in compliance with the License.
1031 * You may obtain a copy of the License at
1032 *
1033 *   http://www.apache.org/licenses/LICENSE-2.0
1034 *
1035 * Unless required by applicable law or agreed to in writing, software
1036 * distributed under the License is distributed on an "AS IS" BASIS,
1037 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1038 * See the License for the specific language governing permissions and
1039 * limitations under the License.
1040 */class gS{constructor(e,i,r,o,h,d,y,v,p,b,A){this.databaseId=e,this.appId=i,this.persistenceKey=r,this.host=o,this.ssl=h,this.forceLongPolling=d,this.autoDetectLongPolling=y,this.longPollingOptions=v,this.useFetchStreams=p,this.isUsingEmulator=b,this.apiKey=A}}const fc="(default)";class oo{constructor(e,i){this.projectId=e,this.database=i||fc}static empty(){return new oo("","")}get isDefaultDatabase(){return this.database===fc}isEqual(e){return e instanceof oo&&e.projectId===this.projectId&&e.database===this.database}}function pS(s,e){if(!Object.prototype.hasOwnProperty.apply(s.options,["projectId"]))throw new at(X.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new oo(s.options.projectId,e)}/**
1041 * @license
1042 * Copyright 2020 Google LLC
1043 *
1044 * Licensed under the Apache License, Version 2.0 (the "License");
1045 * you may not use this file except in compliance with the License.
1046 * You may obtain a copy of the License at
1047 *
1048 *   http://www.apache.org/licenses/LICENSE-2.0
1049 *
1050 * Unless required by applicable law or agreed to in writing, software
1051 * distributed under the License is distributed on an "AS IS" BASIS,
1052 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1053 * See the License for the specific language governing permissions and
1054 * limitations under the License.
1055 */const nv="__type__",yS="__max__",$u={mapValue:{}},iv="__vector__",dc="value";function Pa(s){return"nullValue"in s?0:"booleanValue"in s?1:"integerValue"in s||"doubleValue"in s?2:"timestampValue"in s?3:"stringValue"in s?5:"bytesValue"in s?6:"referenceValue"in s?7:"geoPointValue"in s?8:"arrayValue"in s?9:"mapValue"in s?Hd(s)?4:vS(s)?9007199254740991:_S(s)?10:11:ft(28295,{value:s})}function Si(s,e){if(s===e)return!0;const i=Pa(s);if(i!==Pa(e))return!1;switch(i){case 0:case 9007199254740991:return!0;case 1:return s.booleanValue===e.booleanValue;case 4:return lo(s).isEqual(lo(e));case 3:return(function(o,h){if(typeof o.timestampValue=="string"&&typeof h.timestampValue=="string"&&o.timestampValue.length===h.timestampValue.length)return o.timestampValue===h.timestampValue;const d=La(o.timestampValue),y=La(h.timestampValue);return d.seconds===y.seconds&&d.nanos===y.nanos})(s,e);case 5:return s.stringValue===e.stringValue;case 6:return(function(o,h){return Ua(o.bytesValue).isEqual(Ua(h.bytesValue))})(s,e);case 7:return s.referenceValue===e.referenceValue;case 8:return(function(o,h){return de(o.geoPointValue.latitude)===de(h.geoPointValue.latitude)&&de(o.geoPointValue.longitude)===de(h.geoPointValue.longitude)})(s,e);case 2:return(function(o,h){if("integerValue"in o&&"integerValue"in h)return de(o.integerValue)===de(h.integerValue);if("doubleValue"in o&&"doubleValue"in h){const d=de(o.doubleValue),y=de(h.doubleValue);return d===y?hc(d)===hc(y):isNaN(d)&&isNaN(y)}return!1})(s,e);case 9:return Dr(s.arrayValue.values||[],e.arrayValue.values||[],Si);case 10:case 11:return(function(o,h){const d=o.mapValue.fields||{},y=h.mapValue.fields||{};if(b_(d)!==b_(y))return!1;for(const v in d)if(d.hasOwnProperty(v)&&(y[v]===void 0||!Si(d[v],y[v])))return!1;return!0})(s,e);default:return ft(52216,{left:s})}}function uo(s,e){return(s.values||[]).find((i=>Si(i,e)))!==void 0}function Vr(s,e){if(s===e)return 0;const i=Pa(s),r=Pa(e);if(i!==r)return xt(i,r);switch(i){case 0:case 9007199254740991:return 0;case 1:return xt(s.booleanValue,e.booleanValue);case 2:return(function(h,d){const y=de(h.integerValue||h.doubleValue),v=de(d.integerValue||d.doubleValue);return y<v?-1:y>v?1:y===v?0:isNaN(y)?isNaN(v)?0:-1:1})(s,e);case 3:return S_(s.timestampValue,e.timestampValue);case 4:return S_(lo(s),lo(e));case 5:return dd(s.stringValue,e.stringValue);case 6:return(function(h,d){const y=Ua(h),v=Ua(d);return y.compareTo(v)})(s.bytesValue,e.bytesValue);case 7:return(function(h,d){const y=h.split("/"),v=d.split("/");for(let p=0;p<y.length&&p<v.length;p++){const b=xt(y[p],v[p]);if(b!==0)return b}return xt(y.length,v.length)})(s.referenceValue,e.referenceValue);case 8:return(function(h,d){const y=xt(de(h.latitude),de(d.latitude));return y!==0?y:xt(de(h.longitude),de(d.longitude))})(s.geoPointValue,e.geoPointValue);case 9:return w_(s.arrayValue,e.arrayValue);case 10:return(function(h,d){var O,Q,J,et;const y=h.fields||{},v=d.fields||{},p=(O=y[dc])==null?void 0:O.arrayValue,b=(Q=v[dc])==null?void 0:Q.arrayValue,A=xt(((J=p==null?void 0:p.values)==null?void 0:J.length)||0,((et=b==null?void 0:b.values)==null?void 0:et.length)||0);return A!==0?A:w_(p,b)})(s.mapValue,e.mapValue);case 11:return(function(h,d){if(h===$u.mapValue&&d===$u.mapValue)return 0;if(h===$u.mapValue)return 1;if(d===$u.mapValue)return-1;const y=h.fields||{},v=Object.keys(y),p=d.fields||{},b=Object.keys(p);v.sort(),b.sort();for(let A=0;A<v.length&&A<b.length;++A){const O=dd(v[A],b[A]);if(O!==0)return O;const Q=Vr(y[v[A]],p[b[A]]);if(Q!==0)return Q}return xt(v.length,b.length)})(s.mapValue,e.mapValue);default:throw ft(23264,{he:i})}}function S_(s,e){if(typeof s=="string"&&typeof e=="string"&&s.length===e.length)return xt(s,e);const i=La(s),r=La(e),o=xt(i.seconds,r.seconds);return o!==0?o:xt(i.nanos,r.nanos)}function w_(s,e){const i=s.values||[],r=e.values||[];for(let o=0;o<i.length&&o<r.length;++o){const h=Vr(i[o],r[o]);if(h)return h}return xt(i.length,r.length)}function Or(s){return md(s)}function md(s){return"nullValue"in s?"null":"booleanValue"in s?""+s.booleanValue:"integerValue"in s?""+s.integerValue:"doubleValue"in s?""+s.doubleValue:"timestampValue"in s?(function(i){const r=La(i);return`time(${r.seconds},${r.nanos})`})(s.timestampValue):"stringValue"in s?s.stringValue:"bytesValue"in s?(function(i){return Ua(i).toBase64()})(s.bytesValue):"referenceValue"in s?(function(i){return ut.fromName(i).toString()})(s.referenceValue):"geoPointValue"in s?(function(i){return`geo(${i.latitude},${i.longitude})`})(s.geoPointValue):"arrayValue"in s?(function(i){let r="[",o=!0;for(const h of i.values||[])o?o=!1:r+=",",r+=md(h);return r+"]"})(s.arrayValue):"mapValue"in s?(function(i){const r=Object.keys(i.fields||{}).sort();let o="{",h=!0;for(const d of r)h?h=!1:o+=",",o+=`${d}:${md(i.fields[d])}`;return o+"}"})(s.mapValue):ft(61005,{value:s})}function ic(s){switch(Pa(s)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=Nc(s);return e?16+ic(e):16;case 5:return 2*s.stringValue.length;case 6:return Ua(s.bytesValue).approximateByteSize();case 7:return s.referenceValue.length;case 9:return(function(r){return(r.values||[]).reduce(((o,h)=>o+ic(h)),0)})(s.arrayValue);case 10:case 11:return(function(r){let o=0;return xs(r.fields,((h,d)=>{o+=h.length+ic(d)})),o})(s.mapValue);default:throw ft(13486,{value:s})}}function R_(s,e){return{referenceValue:`projects/${s.projectId}/databases/${s.database}/documents/${e.path.canonicalString()}`}}function gd(s){return!!s&&"integerValue"in s}function Gd(s){return!!s&&"arrayValue"in s}function C_(s){return!!s&&"nullValue"in s}function x_(s){return!!s&&"doubleValue"in s&&isNaN(Number(s.doubleValue))}function ac(s){return!!s&&"mapValue"in s}function _S(s){var i,r;return((r=(((i=s==null?void 0:s.mapValue)==null?void 0:i.fields)||{})[nv])==null?void 0:r.stringValue)===iv}function to(s){if(s.geoPointValue)return{geoPointValue:{...s.geoPointValue}};if(s.timestampValue&&typeof s.timestampValue=="object")return{timestampValue:{...s.timestampValue}};if(s.mapValue){const e={mapValue:{fields:{}}};return xs(s.mapValue.fields,((i,r)=>e.mapValue.fields[i]=to(r))),e}if(s.arrayValue){const e={arrayValue:{values:[]}};for(let i=0;i<(s.arrayValue.values||[]).length;++i)e.arrayValue.values[i]=to(s.arrayValue.values[i]);return e}return{...s}}function vS(s){return(((s.mapValue||{}).fields||{}).__type__||{}).stringValue===yS}/**
1056 * @license
1057 * Copyright 2017 Google LLC
1058 *
1059 * Licensed under the Apache License, Version 2.0 (the "License");
1060 * you may not use this file except in compliance with the License.
1061 * You may obtain a copy of the License at
1062 *
1063 *   http://www.apache.org/licenses/LICENSE-2.0
1064 *
1065 * Unless required by applicable law or agreed to in writing, software
1066 * distributed under the License is distributed on an "AS IS" BASIS,
1067 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1068 * See the License for the specific language governing permissions and
1069 * limitations under the License.
1070 */class Mn{constructor(e){this.value=e}static empty(){return new Mn({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let i=this.value;for(let r=0;r<e.length-1;++r)if(i=(i.mapValue.fields||{})[e.get(r)],!ac(i))return null;return i=(i.mapValue.fields||{})[e.lastSegment()],i||null}}set(e,i){this.getFieldsMap(e.popLast())[e.lastSegment()]=to(i)}setAll(e){let i=Fe.emptyPath(),r={},o=[];e.forEach(((d,y)=>{if(!i.isImmediateParentOf(y)){const v=this.getFieldsMap(i);this.applyChanges(v,r,o),r={},o=[],i=y.popLast()}d?r[y.lastSegment()]=to(d):o.push(y.lastSegment())}));const h=this.getFieldsMap(i);this.applyChanges(h,r,o)}delete(e){const i=this.field(e.popLast());ac(i)&&i.mapValue.fields&&delete i.mapValue.fields[e.lastSegment()]}isEqual(e){return Si(this.value,e.value)}getFieldsMap(e){let i=this.value;i.mapValue.fields||(i.mapValue={fields:{}});for(let r=0;r<e.length;++r){let o=i.mapValue.fields[e.get(r)];ac(o)&&o.mapValue.fields||(o={mapValue:{fields:{}}},i.mapValue.fields[e.get(r)]=o),i=o}return i.mapValue.fields}applyChanges(e,i,r){xs(i,((o,h)=>e[o]=h));for(const o of r)delete e[o]}clone(){return new Mn(to(this.value))}}function av(s){const e=[];return xs(s.fields,((i,r)=>{const o=new Fe([i]);if(ac(r)){const h=av(r.mapValue).fields;
vendor: 4,181 bytes, lines 1070-1110
1070if(h.length===0)e.push(o);else for(const d of h)e.push(o.child(d))}else e.push(o)})),new Kn(e)}/**
1071 * @license
1072 * Copyright 2017 Google LLC
1073 *
1074 * Licensed under the Apache License, Version 2.0 (the "License");
1075 * you may not use this file except in compliance with the License.
1076 * You may obtain a copy of the License at
1077 *
1078 *   http://www.apache.org/licenses/LICENSE-2.0
1079 *
1080 * Unless required by applicable law or agreed to in writing, software
1081 * distributed under the License is distributed on an "AS IS" BASIS,
1082 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1083 * See the License for the specific language governing permissions and
1084 * limitations under the License.
1085 */class Ze{constructor(e,i,r,o,h,d,y){this.key=e,this.documentType=i,this.version=r,this.readTime=o,this.createTime=h,this.data=d,this.documentState=y}static newInvalidDocument(e){return new Ze(e,0,mt.min(),mt.min(),mt.min(),Mn.empty(),0)}static newFoundDocument(e,i,r,o){return new Ze(e,1,i,mt.min(),r,o,0)}static newNoDocument(e,i){return new Ze(e,2,i,mt.min(),mt.min(),Mn.empty(),0)}static newUnknownDocument(e,i){return new Ze(e,3,i,mt.min(),mt.min(),Mn.empty(),2)}convertToFoundDocument(e,i){return!this.createTime.isEqual(mt.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=i,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Mn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Mn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=mt.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Ze&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Ze(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}})`}}/**
1086 * @license
1087 * Copyright 2022 Google LLC
1088 *
1089 * Licensed under the Apache License, Version 2.0 (the "License");
1090 * you may not use this file except in compliance with the License.
1091 * You may obtain a copy of the License at
1092 *
1093 *   http://www.apache.org/licenses/LICENSE-2.0
1094 *
1095 * Unless required by applicable law or agreed to in writing, software
1096 * distributed under the License is distributed on an "AS IS" BASIS,
1097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1098 * See the License for the specific language governing permissions and
1099 * limitations under the License.
1100 */class mc{constructor(e,i){this.position=e,this.inclusive=i}}function N_(s,e,i){let r=0;for(let o=0;o<s.position.length;o++){const h=e[o],d=s.position[o];if(h.field.isKeyField()?r=ut.comparator(ut.fromName(d.referenceValue),i.key):r=Vr(d,i.data.field(h.field)),h.dir==="desc"&&(r*=-1),r!==0)break}return r}function I_(s,e){if(s===null)return e===null;if(e===null||s.inclusive!==e.inclusive||s.position.length!==e.position.length)return!1;for(let i=0;i<s.position.length;i++)if(!Si(s.position[i],e.position[i]))return!1;return!0}/**
1101 * @license
1102 * Copyright 2022 Google LLC
1103 *
1104 * Licensed under the Apache License, Version 2.0 (the "License");
1105 * you may not use this file except in compliance with the License.
1106 * You may obtain a copy of the License at
1107 *
1108 *   http://www.apache.org/licenses/LICENSE-2.0
1109 *
1110 * Unless required by applicable law or agreed to in writing, softw
1110are
1111 * distributed under the License is distributed on an "AS IS" BASIS,
1112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1113 * See the License for the specific language governing permissions and
1114 * limitations under the License.
1115 */class gc{constructor(e,i="asc"){this.field=e,this.dir=i}}function ES(s,e){return s.dir===e.dir&&s.field.isEqual(e.field)}/**
1116 * @license
1117 * Copyright 2022 Google LLC
1118 *
1119 * Licensed under the Apache License, Version 2.0 (the "License");
1120 * you may not use this file except in compliance with the License.
1121 * You may obtain a copy of the License at
1122 *
1123 *   http://www.apache.org/licenses/LICENSE-2.0
1124 *
1125 * Unless required by applicable law or agreed to in writing, software
1126 * distributed under the License is distributed on an "AS IS" BASIS,
1127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1128 * See the License for the specific language governing permissions and
1129 * limitations under the License.
1130 */class sv{}class we extends sv{constructor(e,i,r){super(),this.field=e,this.op=i,this.value=r}static create(e,i,r){return e.isKeyField()?i==="in"||i==="not-in"?this.createKeyFieldInFilter(e,i,r):new bS(e,i,r):i==="array-contains"?new wS(e,r):i==="in"?new RS(e,r):i==="not-in"?new CS(e,r):i==="array-contains-any"?new xS(e,r):new we(e,i,r)}static createKeyFieldInFilter(e,i,r){return i==="in"?new AS(e,r):new SS(e,r)}matches(e){const i=e.data.field(this.field);return this.op==="!="?i!==null&&i.nullValue===void 0&&this.matchesComparison(Vr(i,this.value)):i!==null&&Pa(this.value)===Pa(i)&&this.matchesComparison(Vr(i,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return ft(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Zn extends sv{constructor(e,i){super(),this.filters=e,this.op=i,this.Pe=null}static create(e,i){return new Zn(e,i)}matches(e){return rv(this)?this.filters.find((i=>!i.matches(e)))===void 0:this.filters.find((i=>i.matches(e)))!==void 0}getFlattenedFilters(){return this.Pe!==null||(this.Pe=this.filters.reduce(((e,i)=>e.concat(i.getFlattenedFilters())),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}}function rv(s){return s.op==="and"}function lv(s){return TS(s)&&rv(s)}function TS(s){for(const e of s.filters)if(e instanceof Zn)return!1;return!0}function pd(s){if(s instanceof we)return s.field.canonicalString()+s.op.toString()+Or(s.value);if(lv(s))return s.filters.map((e=>pd(e))).join(",");{const e=s.filters.map((i=>pd(i))).join(",");return`${s.op}(${e})`}}function ov(s,e){return s instanceof we?(function(r,o){return o instanceof we&&r.op===o.op&&r.field.isEqual(o.field)&&Si(r.value,o.value)})(s,e):s instanceof Zn?(function(r,o){return o instanceof Zn&&r.op===o.op&&r.filters.length===o.filters.length?r.filters.reduce(((h,d,y)=>h&&ov(d,o.filters[y])),!0):!1})(s,e):void ft(19439)}function uv(s){return s instanceof we?(function(i){return`${i.field.canonicalString()} ${i.op} ${Or(i.value)}`})(s):s instanceof Zn?(function(i){return i.op.toString()+" {"+i.getFilters().map(uv).join(" ,")+"}"})(s):"Filter"}class bS extends we{constructor(e,i,r){super(e,i,r),this.key=ut.fromName(r.referenceValue)}matches(e){const i=ut.comparator(e.key,this.key);return this.matchesComparison(i)}}class AS extends we{constructor(e,i){super(e,"in",i),this.keys=cv("in",i)}matches(e){return this.keys.some((i=>i.isEqual(e.key)))}}class SS extends we{constructor(e,i){super(e,"not-in",i),this.keys=cv("not-in",i)}matches(e){return!this.keys.some((i=>i.isEqual(e.key)))}}function cv(s,e){var i;return(((i=e.arrayValue)==null?void 0:i.values)||[]).map((r=>ut.fromName(r.referenceValue)))}class wS extends we{constructor(e,i){super(e,"array-contains",i)}matches(e){const i=e.data.field(this.field);return Gd(i)&&uo(i.arrayValue,this.value)}}class RS extends we{constructor(e,i){super(e,"in",i)}matches(e){const i=e.data.field(this.field);return i!==null&&uo(this.value.arrayValue,i)}}class CS extends we{constructor(e,i){super(e,"not-in",i)}matches(e){if(uo(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const i=e.data.field(this.field);return i!==null&&i.nullValue===void 0&&!uo(this.value.arrayValue,i)}}class xS extends we{constructor(e,i){super(e,"array-contains-any",i)}matches(e){const i=e.data.field(this.field);return!(!Gd(i)||!i.arrayValue.values)&&i.arrayValue.values.some((r=>uo(this.value.arrayValue,r)))}}/**
1131 * @license
1132 * Copyright 2019 Google LLC
1133 *
1134 * Licensed under the Apache License, Version 2.0 (the "License");
1135 * you may not use this file except in compliance with the License.
1136 * You may obtain a copy of the License at
1137 *
1138 *   http://www.apache.org/licenses/LICENSE-2.0
1139 *
1140 * Unless required by applicable law or agreed to in writing, software
1141 * distributed under the License is distributed on an "AS IS" BASIS,
1142 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1143 * See the License for the specific language governing permissions and
1144 * limitations under the License.
1145 */class NS{constructor(e,i=null,r=[],o=[],h=null,d=null,y=null){this.path=e,this.collectionGroup=i,this.orderBy=r,this.filters=o,this.limit=h,this.startAt=d,this.endAt=y,this.Te=null}}function D_(s,e=null,i=[],r=[],o=null,h=null,d=null){return new NS(s,e,i,r,o,h,d)}function Fd(s){const e=pt(s);if(e.Te===null){let i=e.path.canonicalString();e.collectionGroup!==null&&(i+="|cg:"+e.collectionGroup),i+="|f:",i+=e.filters.map((r=>pd(r))).join(","),i+="|ob:",i+=e.orderBy.map((r=>(function(h){return h.field.canonicalString()+h.dir})(r))).join(","),xc(e.limit)||(i+="|l:",i+=e.limit),e.startAt&&(i+="|lb:",i+=e.startAt.inclusive?"b:":"a:",i+=e.startAt.position.map((r=>Or(r))).join(",")),e.endAt&&(i+="|ub:",i+=e.endAt.inclusive?"a:":"b:",i+=e.endAt.position.map((r=>Or(r))).join(",")),e.Te=i}return e.Te}function Qd(s,e){if(s.limit!==e.limit||s.orderBy.length!==e.orderBy.length)return!1;for(let i=0;i<s.orderBy.length;i++)if(!ES(s.orderBy[i],e.orderBy[i]))return!1;if(s.filters.length!==e.filters.length)return!1;for(let i=0;i<s.filters.length;i++)if(!ov(s.filters[i],e.filters[i]))return!1;return s.collectionGroup===e.collectionGroup&&!!s.path.isEqual(e.path)&&!!I_(s.startAt,e.startAt)&&I_(s.endAt,e.endAt)}function yd(s){return ut.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}/**
1146 * @license
1147 * Copyright 2017 Google LLC
1148 *
1149 * Licensed under the Apache License, Version 2.0 (the "License");
1150 * you may not use this file except in compliance with the License.
1151 * You may obtain a copy of the License at
1152 *
1153 *   http://www.apache.org/licenses/LICENSE-2.0
1154 *
1155 * Unless required by applicable law or agreed to in writing, software
1156 * distributed under the License is distributed on an "AS IS" BASIS,
1157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1158 * See the License for the specific language governing permissions and
1159 * limitations under the License.
1160 */class go{constructor(e,i=null,r=[],o=[],h=null,d="F",y=null,v=null){this.path=e,this.collectionGroup=i,this.explicitOrderBy=r,this.filters=o,this.limit=h,this.limitType=d,this.startAt=y,this.endAt=v,this.Ie=null,this.Ee=null,this.Re=null,this.startAt,this.endAt}}function IS(s,e,i,r,o,h,d,y){return new go(s,e,i,r,o,h,d,y)}function hv(s){return new go(s)}function V_(s){return s.filters.length===0&&s.limit===null&&s.startAt==null&&s.endAt==null&&(s.explicitOrderBy.length===0||s.explicitOrderBy.length===1&&s.explicitOrderBy[0].field.isKeyField())}function DS(s){return ut.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}function fv(s){return s.collectionGroup!==null}function eo(s){const e=pt(s);if(e.Ie===null){e.Ie=[];const i=new Set;for(const h of e.explicitOrderBy)e.Ie.push(h),i.add(h.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(d){let y=new De(Fe.comparator);return d.filters.forEach((v=>{v.getFlattenedFilters().forEach((p=>{p.isInequality()&&(y=y.add(p.field))}))})),y})(e).forEach((h=>{i.has(h.canonicalString())||h.isKeyField()||e.Ie.push(new gc(h,r))})),i.has(Fe.keyField().canonicalString())||e.Ie.push(new gc(Fe.keyField(),r))}return e.Ie}function Ti(s){const e=pt(s);return e.Ee||(e.Ee=VS(e,eo(s))),e.Ee}function VS(s,e){if(s.limitType==="F")return D_(s.path,s.collectionGroup,e,s.filters,s.limit,s.startAt,s.endAt);{e=e.map((o=>{const h=o.dir==="desc"?"asc":"desc";return new gc(o.field,h)}));const i=s.endAt?new mc(s.endAt.position,s.endAt.inclusive):null,r=s.startAt?new mc(s.startAt.position,s.startAt.inclusive):null;return D_(s.path,s.collectionGroup,e,s.filters,s.limit,i,r)}}function _d(s,e){const i=s.filters.concat([e]);return new go(s.path,s.collectionGroup,s.explicitOrderBy.slice(),i,s.limit,s.limitType,s.startAt,s.endAt)}function vd(s,e,i){return new go(s.path,s.collectionGroup,s.explicitOrderBy.slice(),s.filters.slice(),e,i,s.startAt,s.endAt)}function Ic(s,e){return Qd(Ti(s),Ti(e))&&s.limitType===e.limitType}function dv(s){return`${Fd(Ti(s))}|lt:${s.limitType}`}function Ar(s){return`Query(target=${(function(i){let r=i.path.canonicalString();return i.collectionGroup!==null&&(r+=" collectionGroup="+i.collectionGroup),i.filters.length>0&&(r+=`, filters: [${i.filters.map((o=>uv(o))).join(", ")}]`),xc(i.limit)||(r+=", limit: "+i.limit),i.orderBy.length>0&&(r+=`, orderBy: [${i.orderBy.map((o=>(function(d){return`${d.field.canonicalString()} (${d.dir})`}
1160)(o))).join(", ")}]`),i.startAt&&(r+=", startAt: ",r+=i.startAt.inclusive?"b:":"a:",r+=i.startAt.position.map((o=>Or(o))).join(",")),i.endAt&&(r+=", endAt: ",r+=i.endAt.inclusive?"a:":"b:",r+=i.endAt.position.map((o=>Or(o))).join(",")),`Target(${r})`})(Ti(s))}; limitType=${s.limitType})`}function Dc(s,e){return e.isFoundDocument()&&(function(r,o){const h=o.key.path;return r.collectionGroup!==null?o.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(h):ut.isDocumentKey(r.path)?r.path.isEqual(h):r.path.isImmediateParentOf(h)})(s,e)&&(function(r,o){for(const h of eo(r))if(!h.field.isKeyField()&&o.data.field(h.field)===null)return!1;return!0})(s,e)&&(function(r,o){for(const h of r.filters)if(!h.matches(o))return!1;return!0})(s,e)&&(function(r,o){return!(r.startAt&&!(function(d,y,v){const p=N_(d,y,v);return d.inclusive?p<=0:p<0})(r.startAt,eo(r),o)||r.endAt&&!(function(d,y,v){const p=N_(d,y,v);return d.inclusive?p>=0:p>0})(r.endAt,eo(r),o))})(s,e)}function OS(s){return s.collectionGroup||(s.path.length%2==1?s.path.lastSegment():s.path.get(s.path.length-2))}function mv(s){return(e,i)=>{let r=!1;for(const o of eo(s)){const h=MS(o,e,i);if(h!==0)return h;r=r||o.field.isKeyField()}return 0}}function MS(s,e,i){const r=s.field.isKeyField()?ut.comparator(e.key,i.key):(function(h,d,y){const v=d.data.field(h),p=y.data.field(h);return v!==null&&p!==null?Vr(v,p):ft(42886)})(s.field,e,i);switch(s.dir){case"asc":return r;case"desc":return-1*r;default:return ft(19790,{direction:s.dir})}}/**
1161 * @license
1162 * Copyright 2017 Google LLC
1163 *
1164 * Licensed under the Apache License, Version 2.0 (the "License");
1165 * you may not use this file except in compliance with the License.
1166 * You may obtain a copy of the License at
1167 *
1168 *   http://www.apache.org/licenses/LICENSE-2.0
1169 *
1170 * Unless required by applicable law or agreed to in writing, software
1171 * distributed under the License is distributed on an "AS IS" BASIS,
1172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1173 * See the License for the specific language governing permissions and
1174 * limitations under the License.
1175 */class Ns{constructor(e,i){this.mapKeyFn=e,this.equalsFn=i,this.inner={},this.innerSize=0}get(e){const i=this.mapKeyFn(e),r=this.inner[i];if(r!==void 0){for(const[o,h]of r)if(this.equalsFn(o,e))return h}}has(e){return this.get(e)!==void 0}set(e,i){const r=this.mapKeyFn(e),o=this.inner[r];if(o===void 0)return this.inner[r]=[[e,i]],void this.innerSize++;for(let h=0;h<o.length;h++)if(this.equalsFn(o[h][0],e))return void(o[h]=[e,i]);o.push([e,i]),this.innerSize++}delete(e){const i=this.mapKeyFn(e),r=this.inner[i];if(r===void 0)return!1;for(let o=0;o<r.length;o++)if(this.equalsFn(r[o][0],e))return r.length===1?delete this.inner[i]:r.splice(o,1),this.innerSize--,!0;return!1}forEach(e){xs(this.inner,((i,r)=>{for(const[o,h]of r)e(o,h)}))}isEmpty(){return Z0(this.inner)}size(){return this.innerSize}}/**
1176 * @license
1177 * Copyright 2017 Google LLC
1178 *
1179 * Licensed under the Apache License, Version 2.0 (the "License");
1180 * you may not use this file except in compliance with the License.
1181 * You may obtain a copy of the License at
1182 *
1183 *   http://www.apache.org/licenses/LICENSE-2.0
1184 *
1185 * Unless required by applicable law or agreed to in writing, software
1186 * distributed under the License is distributed on an "AS IS" BASIS,
1187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1188 * See the License for the specific language governing permissions and
1189 * limitations under the License.
1190 */const zS=new re(ut.comparator);function Xi(){return zS}const gv=new re(ut.comparator);function Xl(...s){let e=gv;for(const i of s)e=e.insert(i.key,i);return e}function pv(s){let e=gv;return s.forEach(((i,r)=>e=e.insert(i,r.overlayedDocument))),e}function Ts(){return no()}function yv(){return no()}function no(){return new Ns((s=>s.toString()),((s,e)=>s.isEqual(e)))}const jS=new re(ut.comparator),LS=new De(ut.comparator);function Nt(...s){let e=LS;for(const i of s)e=e.add(i);return e}const US=new De(xt);function PS(){return US}/**
1191 * @license
1192 * Copyright 2020 Google LLC
1193 *
1194 * Licensed under the Apache License, Version 2.0 (the "License");
1195 * you may not use this file except in compliance with the License.
1196 * You may obtain a copy of the License at
1197 *
1198 *   http://www.apache.org/licenses/LICENSE-2.0
1199 *
1200 * Unless required by applicable law or agreed to in writing, software
1201 * distributed under the License is distributed on an "AS IS" BASIS,
1202 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1203 * See the License for the specific language governing permissions and
1204 * limitations under the License.
1205 */function Yd(s,e){if(s.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:hc(e)?"-0":e}}function _v(s){return{integerValue:""+s}}function BS(s,e){return hS(e)?_v(e):Yd(s,e)}/**
1206 * @license
1207 * Copyright 2018 Google LLC
1208 *
1209 * Licensed under the Apache License, Version 2.0 (the "License");
1210 * you may not use this file except in compliance with the License.
1211 * You may obtain a copy of the License at
1212 *
1213 *   http://www.apache.org/licenses/LICENSE-2.0
1214 *
1215 * Unless required by applicable law or agreed to in writing, software
1216 * distributed under the License is distributed on an "AS IS" BASIS,
1217 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1218 * See the License for the specific language governing permissions and
1219 * limitations under the License.
1220 */class Vc{constructor(){this._=void 0}}function kS(s,e,i){return s instanceof pc?(function(o,h){const d={fields:{[W0]:{stringValue:J0},[ev]:{timestampValue:{seconds:o.seconds,nanos:o.nanoseconds}}}};return h&&Hd(h)&&(h=Nc(h)),h&&(d.fields[tv]=h),{mapValue:d}})(i,e):s instanceof co?Ev(s,e):s instanceof ho?Tv(s,e):(function(o,h){const d=vv(o,h),y=O_(d)+O_(o.Ae);return gd(d)&&gd(o.Ae)?_v(y):Yd(o.serializer,y)})(s,e)}function qS(s,e,i){return s instanceof co?Ev(s,e):s instanceof ho?Tv(s,e):i}function vv(s,e){return s instanceof yc?(function(r){return gd(r)||(function(h){return!!h&&"doubleValue"in h})(r)})(e)?e:{integerValue:0}:null}class pc extends Vc{}class co extends Vc{constructor(e){super(),this.elements=e}}function Ev(s,e){const i=bv(e);for(const r of s.elements)i.some((o=>Si(o,r)))||i.push(r);return{arrayValue:{values:i}}}class ho extends Vc{constructor(e){super(),this.elements=e}}function Tv(s,e){let i=bv(e);for(const r of s.elements)i=i.filter((o=>!Si(o,r)));return{arrayValue:{values:i}}}class yc extends Vc{constructor(e,i){super(),this.serializer=e,this.Ae=i}}function O_(s){return de(s.integerValue||s.doubleValue)}function bv(s){return Gd(s)&&s.arrayValue.values?s.arrayValue.values.slice():[]}function HS(s,e){return s.field.isEqual(e.field)&&(function(r,o){return r instanceof co&&o instanceof co||r instanceof ho&&o instanceof ho?Dr(r.elements,o.elements,Si):r instanceof yc&&o instanceof yc?Si(r.Ae,o.Ae):r instanceof pc&&o instanceof pc})(s.transform,e.transform)}class GS{constructor(e,i){this.version=e,this.transformResults=i}}class Gi{constructor(e,i){this.updateTime=e,this.exists=i}static none(){return new Gi}static exists(e){return new Gi(void 0,e)}static updateTime(e){return new Gi(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function sc(s,e){return s.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(s.updateTime):s.exists===void 0||s.exists===e.isFoundDocument()}class Oc{}function Av(s,e){if(!s.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return s.isNoDocument()?new wv(s.key,Gi.none()):new po(s.key,s.data,Gi.none());{const i=s.data,r=Mn.empty();let o=new De(Fe.comparator);for(let h of e.fields)if(!o.has(h)){let d=i.field(h);d===null&&h.length>1&&(h=h.popLast(),d=i.field(h)),d===null?r.delete(h):r.set(h,d),o=o.add(h)}return new Is(s.key,r,new Kn(o.toArray()),Gi.none())}}function FS(s,e,i){s instanceof po?(function(o,h,d){const y=o.value.clone(),v=z_(o.fieldTransforms,h,d.transformResults);y.setAll(v),h.convertToFoundDocument(d.version,y).setHasCommittedMutations()})(s,e,i):s instanceof Is?(function(o,h,d){if(!sc(o.precondition,h))return void h.convertToUnknownDocument(d.version);const y=z_(o.fieldTransforms,h,d.transformResults),v=h.data;v.setAll(Sv(o)),v.setAll(y),h.convertToFoundDocument(d.version,v).setHasCommittedMutations()})(s,e,i):(function(o,h,d){h.convertToNoDocument(d.version).setHasCommittedMutations()})(0,e,i)}function io(s,e,i,r){return s instanceof po?(function(h,d,y,v){if(!sc(h.precondition,d))return y;const p=h.value.clone(),b=j_(h.fieldTransforms,v,d);return p.setAll(b),d.convertToFoundDocument(d.version,p).setHasLocalMutations(),null})(s,e,i,r):s instanceof Is?(function(h,d,y,v){if(!sc(h.precondition,d))return y;const p=j_(h.fieldTransforms,v,d),b=d.data;return b.setAll(Sv(h)),b.setAll(p),d.convertToFoundDocument(d.version,b).setHasLocalMutations(),y===null?null:y.unionWith(h.fieldMask.fields).unionWith(h.fieldTransforms.map((A=>A.field)))})(s,e,i,r):(function(h,d,y){return sc(h.precondition,d)?(d.convertToNoDocument(d.version).setHasLocalMutations(),null):y})(s,e,i)}function QS(s,e){let i=null;for(const r of s.fieldTransforms){const o=e.data.field(r.field),h=vv(r.transform,o||null);h!=null&&(i===null&&(i=Mn.empty()),i.set(r.field,h))}return i||null}function M_(s,e){return s.type===e.type&&!!s.key.isEqual(e.key)&&!!s.prec
1220ondition.isEqual(e.precondition)&&!!(function(r,o){return r===void 0&&o===void 0||!(!r||!o)&&Dr(r,o,((h,d)=>HS(h,d)))})(s.fieldTransforms,e.fieldTransforms)&&(s.type===0?s.value.isEqual(e.value):s.type!==1||s.data.isEqual(e.data)&&s.fieldMask.isEqual(e.fieldMask))}class po extends Oc{constructor(e,i,r,o=[]){super(),this.key=e,this.value=i,this.precondition=r,this.fieldTransforms=o,this.type=0}getFieldMask(){return null}}class Is extends Oc{constructor(e,i,r,o,h=[]){super(),this.key=e,this.data=i,this.fieldMask=r,this.precondition=o,this.fieldTransforms=h,this.type=1}getFieldMask(){return this.fieldMask}}function Sv(s){const e=new Map;return s.fieldMask.fields.forEach((i=>{if(!i.isEmpty()){const r=s.data.field(i);e.set(i,r)}})),e}function z_(s,e,i){const r=new Map;Bt(s.length===i.length,32656,{Ve:i.length,de:s.length});for(let o=0;o<i.length;o++){const h=s[o],d=h.transform,y=e.data.field(h.field);r.set(h.field,qS(d,y,i[o]))}return r}function j_(s,e,i){const r=new Map;for(const o of s){const h=o.transform,d=i.data.field(o.field);r.set(o.field,kS(h,d,e))}return r}class wv extends Oc{constructor(e,i){super(),this.key=e,this.precondition=i,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class YS extends Oc{constructor(e,i){super(),this.key=e,this.precondition=i,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
1221 * @license
1222 * Copyright 2017 Google LLC
1223 *
1224 * Licensed under the Apache License, Version 2.0 (the "License");
1225 * you may not use this file except in compliance with the License.
1226 * You may obtain a copy of the License at
1227 *
1228 *   http://www.apache.org/licenses/LICENSE-2.0
1229 *
1230 * Unless required by applicable law or agreed to in writing, software
1231 * distributed under the License is distributed on an "AS IS" BASIS,
1232 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1233 * See the License for the specific language governing permissions and
1234 * limitations under the License.
1235 */class KS{constructor(e,i,r,o){this.batchId=e,this.localWriteTime=i,this.baseMutations=r,this.mutations=o}applyToRemoteDocument(e,i){const r=i.mutationResults;for(let o=0;o<this.mutations.length;o++){const h=this.mutations[o];h.key.isEqual(e.key)&&FS(h,e,r[o])}}applyToLocalView(e,i){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(i=io(r,e,i,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(i=io(r,e,i,this.localWriteTime));return i}applyToLocalDocumentSet(e,i){const r=yv();return this.mutations.forEach((o=>{const h=e.get(o.key),d=h.overlayedDocument;let y=this.applyToLocalView(d,h.mutatedFields);y=i.has(o.key)?null:y;const v=Av(d,y);v!==null&&r.set(o.key,v),d.isValidDocument()||d.convertToNoDocument(mt.min())})),r}keys(){return this.mutations.reduce(((e,i)=>e.add(i.key)),Nt())}isEqual(e){return this.batchId===e.batchId&&Dr(this.mutations,e.mutations,((i,r)=>M_(i,r)))&&Dr(this.baseMutations,e.baseMutations,((i,r)=>M_(i,r)))}}class Kd{constructor(e,i,r,o){this.batch=e,this.commitVersion=i,this.mutationResults=r,this.docVersions=o}static from(e,i,r){Bt(e.mutations.length===r.length,58842,{me:e.mutations.length,fe:r.length});let o=(function(){return jS})();const h=e.mutations;for(let d=0;d<h.length;d++)o=o.insert(h[d].key,r[d].version);return new Kd(e,i,r,o)}}/**
1236 * @license
1237 * Copyright 2022 Google LLC
1238 *
1239 * Licensed under the Apache License, Version 2.0 (the "License");
1240 * you may not use this file except in compliance with the License.
1241 * You may obtain a copy of the License at
1242 *
1243 *   http://www.apache.org/licenses/LICENSE-2.0
1244 *
1245 * Unless required by applicable law or agreed to in writing, software
1246 * distributed under the License is distributed on an "AS IS" BASIS,
1247 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1248 * See the License for the specific language governing permissions and
1249 * limitations under the License.
1250 */class XS{constructor(e,i){this.largestBatchId=e,this.mutation=i}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{
1251      largestBatchId: ${this.largestBatchId},
1252      mutation: ${this.mutation.toString()}
1253    }`}}/**
1254 * @license
1255 * Copyright 2017 Google LLC
1256 *
1257 * Licensed under the Apache License, Version 2.0 (the "License");
1258 * you may not use this file except in compliance with the License.
1259 * You may obtain a copy of the License at
1260 *
1261 *   http://www.apache.org/licenses/LICENSE-2.0
1262 *
1263 * Unless required by applicable law or agreed to in writing, software
1264 * distributed under the License is distributed on an "AS IS" BASIS,
1265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1266 * See the License for the specific language governing permissions and
1267 * limitations under the License.
1268 */class ZS{constructor(e,i){this.count=e,this.unchangedNames=i}}/**
1269 * @license
1270 * Copyright 2017 Google LLC
1271 *
1272 * Licensed under the Apache License, Version 2.0 (the "License");
1273 * you may not use this file except in compliance with the License.
1274 * You may obtain a copy of the License at
1275 *
1276 *   http://www.apache.org/licenses/LICENSE-2.0
1277 *
1278 * Unless required by applicable law or agreed to in writing, software
1279 * distributed under the License is distributed on an "AS IS" BASIS,
1280 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1281 * See the License for the specific language governing permissions and
1282 * limitations under the License.
1283 */var Se,Vt;function $S(s){switch(s){case X.OK:return ft(64938);case X.CANCELLED:case X.UNKNOWN:case X.DEADLINE_EXCEEDED:case X.RESOURCE_EXHAUSTED:case X.INTERNAL:case X.UNAVAILABLE:case X.UNAUTHENTICATED:return!1;case X.INVALID_ARGUMENT:case X.NOT_FOUND:case X.ALREADY_EXISTS:case X.PERMISSION_DENIED:case X.FAILED_PRECONDITION:case X.ABORTED:case X.OUT_OF_RANGE:case X.UNIMPLEMENTED:case X.DATA_LOSS:return!0;default:return ft(15467,{code:s})}}function Rv(s){if(s===void 0)return Ki("GRPC error has no .code"),X.UNKNOWN;switch(s){case Se.OK:return X.OK;case Se.CANCELLED:return X.CANCELLED;case Se.UNKNOWN:return X.UNKNOWN;case Se.DEADLINE_EXCEEDED:return X.DEADLINE_EXCEEDED;case Se.RESOURCE_EXHAUSTED:return X.RESOURCE_EXHAUSTED;case Se.INTERNAL:return X.INTERNAL;case Se.UNAVAILABLE:return X.UNAVAILABLE;case Se.UNAUTHENTICATED:return X.UNAUTHENTICATED;case Se.INVALID_ARGUMENT:return X.INVALID_ARGUMENT;case Se.NOT_FOUND:return X.NOT_FOUND;case Se.ALREADY_EXISTS:return X.ALREADY_EXISTS;case Se.PERMISSION_DENIED:return X.PERMISSION_DENIED;case Se.FAILED_PRECONDITION:return X.FAILED_PRECONDITION;case Se.ABORTED:return X.ABORTED;case Se.OUT_OF_RANGE:return X.OUT_OF_RANGE;case Se.UNIMPLEMENTED:return X.UNIMPLEMENTED;case Se.DATA_LOSS:return X.DATA_LOSS;default:return ft(39323,{code:s})}}(Vt=Se||(Se={}))[Vt.OK=0]="OK",Vt[Vt.CANCELLED=1]="CANCELLED",Vt[Vt.UNKNOWN=2]="UNKNOWN",Vt[Vt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Vt[Vt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Vt[Vt.NOT_FOUND=5]="NOT_FOUND",Vt[Vt.ALREADY_EXISTS=6]="ALREADY_EXISTS",Vt[Vt.PERMISSION_DENIED=7]="PERMISSION_DENIED",Vt[Vt.UNAUTHENTICATED=16]="UNAUTHENTICATED",Vt[Vt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Vt[Vt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Vt[Vt.ABORTED=10]="ABORTED",Vt[Vt.OUT_OF_RANGE=11]="OUT_OF_RANGE",Vt[Vt.UNIMPLEMENTED=12]="UNIMPLEMENTED",Vt[Vt.INTERNAL=13]="INTERNAL",Vt[Vt.UNAVAILABLE=14]="UNAVAILABLE",Vt[Vt.DATA_LOSS=15]="DATA_LOSS";/**
1284 * @license
1285 * Copyright 2023 Google LLC
1286 *
1287 * Licensed under the Apache License, Version 2.0 (the "License");
1288 * you may not use this file except in compliance with the License.
1289 * You may obtain a copy of the License at
1290 *
1291 *   http://www.apache.org/licenses/LICENSE-2.0
1292 *
1293 * Unless required by applicable law or agreed to in writing, software
1294 * distributed under the License is distributed on an "AS IS" BASIS,
1295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1296 * See the License for the specific language governing permissions and
1297 * limitations under the License.
1298 */function JS(){return new TextEncoder}/**
1299 * @license
1300 * Copyright 2022 Google LLC
1301 *
1302 * Licensed under the Apache License, Version 2.0 (the "License");
1303 * you may not use this file except in compliance with the License.
1304 * You may obtain a copy of the License at
1305 *
1306 *   http://www.apache.org/licenses/LICENSE-2.0
1307 *
1308 * Unless required by applicable law or agreed to in writing, software
1309 * distributed under the License is distributed on an "AS IS" BASIS,
1310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1311 * See the License for the specific language governing permissions and
1312 * limitations under the License.
1313 */const WS=new Va([4294967295,4294967295],0);function L_(s){const e=JS().encode(s),i=new P0;return i.update(e),new Uint8Array(i.digest())}function U_(s){const e=new DataView(s.buffer),i=e.getUint32(0,!0),r=e.getUint32(4,!0),o=e.getUint32(8,!0),h=e.getUint32(12,!0);
vendor: 4,619 bytes, lines 1313-1343
1313return[new Va([i,r],0),new Va([o,h],0)]}class Xd{constructor(e,i,r){if(this.bitmap=e,this.padding=i,this.hashCount=r,i<0||i>=8)throw new Zl(`Invalid padding: ${i}`);if(r<0)throw new Zl(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Zl(`Invalid hash count: ${r}`);if(e.length===0&&i!==0)throw new Zl(`Invalid padding when bitmap length is 0: ${i}`);this.ge=8*e.length-i,this.pe=Va.fromNumber(this.ge)}ye(e,i,r){let o=e.add(i.multiply(Va.fromNumber(r)));return o.compare(WS)===1&&(o=new Va([o.getBits(0),o.getBits(1)],0)),o.modulo(this.pe).toNumber()}we(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.ge===0)return!1;const i=L_(e),[r,o]=U_(i);for(let h=0;h<this.hashCount;h++){const d=this.ye(r,o,h);if(!this.we(d))return!1}return!0}static create(e,i,r){const o=e%8==0?0:8-e%8,h=new Uint8Array(Math.ceil(e/8)),d=new Xd(h,o,i);return r.forEach((y=>d.insert(y))),d}insert(e){if(this.ge===0)return;const i=L_(e),[r,o]=U_(i);for(let h=0;h<this.hashCount;h++){const d=this.ye(r,o,h);this.be(d)}}be(e){const i=Math.floor(e/8),r=e%8;this.bitmap[i]|=1<<r}}class Zl extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
1314 * @license
1315 * Copyright 2017 Google LLC
1316 *
1317 * Licensed under the Apache License, Version 2.0 (the "License");
1318 * you may not use this file except in compliance with the License.
1319 * You may obtain a copy of the License at
1320 *
1321 *   http://www.apache.org/licenses/LICENSE-2.0
1322 *
1323 * Unless required by applicable law or agreed to in writing, software
1324 * distributed under the License is distributed on an "AS IS" BASIS,
1325 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1326 * See the License for the specific language governing permissions and
1327 * limitations under the License.
1328 */class Mc{constructor(e,i,r,o,h){this.snapshotVersion=e,this.targetChanges=i,this.targetMismatches=r,this.documentUpdates=o,this.resolvedLimboDocuments=h}static createSynthesizedRemoteEventForCurrentChange(e,i,r){const o=new Map;return o.set(e,yo.createSynthesizedTargetChangeForCurrentChange(e,i,r)),new Mc(mt.min(),o,new re(xt),Xi(),Nt())}}class yo{constructor(e,i,r,o,h){this.resumeToken=e,this.current=i,this.addedDocuments=r,this.modifiedDocuments=o,this.removedDocuments=h}static createSynthesizedTargetChangeForCurrentChange(e,i,r){return new yo(r,i,Nt(),Nt(),Nt())}}/**
1329 * @license
1330 * Copyright 2017 Google LLC
1331 *
1332 * Licensed under the Apache License, Version 2.0 (the "License");
1333 * you may not use this file except in compliance with the License.
1334 * You may obtain a copy of the License at
1335 *
1336 *   http://www.apache.org/licenses/LICENSE-2.0
1337 *
1338 * Unless required by applicable law or agreed to in writing, software
1339 * distributed under the License is distributed on an "AS IS" BASIS,
1340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1341 * See the License for the specific language governing permissions and
1342 * limitations under the License.
1343 */class rc{constructor(e,i,r,o){this.Se=e,this.removedTargetIds=i,this.key=r,this.De=o}}class Cv{constructor(e,i){this.targetId=e,this.Ce=i}}class xv{constructor(e,i,r=Qe.EMPTY_BYTE_STRING,o=null){this.state=e,this.targetIds=i,this.resumeToken=r,this.cause=o}}class P_{constructor(){this.ve=0,this.Fe=B_(),this.Me=Qe.EMPTY_BYTE_STRING,this.xe=!1,this.Oe=!0}get current(){return this.xe}get resumeToken(){return this.Me}get Ne(){return this.ve!==0}get Be(){return this.Oe}Le(e){e.approximateByteSize()>0&&(this.Oe=!0,this.Me=e)}ke(){let e=Nt(),i=Nt(),r=Nt();return this.Fe.forEach(((o,h)=>{switch(h){case 0:e=e.add(o);break;case 2:i=i.add(o);break;case 1:r=r.add(o);break;default:ft(38017,{changeType:h})}})),new yo(this.Me,this.xe,e,i,r)}Ke(){this.Oe=!1,this.Fe=B_()}qe(e,i){this.Oe=!0,this.Fe=this.Fe.insert(e,i)}Ue(e){this.Oe=!0,this.Fe=this.Fe.remove(e)}$e(){this.ve+=1}We(){this.ve-=1,Bt(this.ve>=0,3241,{ve:this.ve})}Qe(){this.Oe=!0,this.xe=!0}}class t2{constructor(e){this.Ge=e,this.ze=new Map,this.je=Xi(),this.He=Ju(),this.Je=Ju(),this.Ze=new re(xt)}Xe(e){for(const i of e.Se)e.De&&e.De.isFoundDocument()?this.Ye(i,e.De):this.et(i,e.key,e.De);for(const i of e.removedTargetIds)this.et(i,e.key,e.De)}tt(e){this.forEachTarget(e,(i=>{const r=this.nt(i);switch(e.state){case 0:this.rt(i)&&r.Le(e.resumeToken);break;case 1:r.We(),r.Ne||r.Ke(),r.Le(e.resumeToken);break;case 2:r.We(),r.Ne||this.removeTarget(i);break;case 3:this.rt(i)&&(r.Qe(),r.Le(e.resumeToken));break;case 4:this.rt(i)&&(this.it(i),r.Le(e.resumeToken));break;default:ft(56790,{state:e.state})}}))}forEachTarget(e,i){e.targetIds.length>0?e.targetIds.forEach(i):this.ze.forEach(((r,o)=>
1343{this.rt(o)&&i(o)}))}st(e){const i=e.targetId,r=e.Ce.count,o=this.ot(i);if(o){const h=o.target;if(yd(h))if(r===0){const d=new ut(h.path);this.et(i,d,Ze.newNoDocument(d,mt.min()))}else Bt(r===1,20013,{expectedCount:r});else{const d=this._t(i);if(d!==r){const y=this.ut(e),v=y?this.ct(y,e,d):1;if(v!==0){this.it(i);const p=v===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ze=this.Ze.insert(i,p)}}}}}ut(e){const i=e.Ce.unchangedNames;if(!i||!i.bits)return null;const{bits:{bitmap:r="",padding:o=0},hashCount:h=0}=i;let d,y;try{d=Ua(r).toUint8Array()}catch(v){if(v instanceof $0)return Ss("Decoding the base64 bloom filter in existence filter failed ("+v.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw v}try{y=new Xd(d,o,h)}catch(v){return Ss(v instanceof Zl?"BloomFilter error: ":"Applying bloom filter failed: ",v),null}return y.ge===0?null:y}ct(e,i,r){return i.Ce.count===r-this.Pt(e,i.targetId)?0:2}Pt(e,i){const r=this.Ge.getRemoteKeysForTarget(i);let o=0;return r.forEach((h=>{const d=this.Ge.ht(),y=`projects/${d.projectId}/databases/${d.database}/documents/${h.path.canonicalString()}`;e.mightContain(y)||(this.et(i,h,null),o++)})),o}Tt(e){const i=new Map;this.ze.forEach(((h,d)=>{const y=this.ot(d);if(y){if(h.current&&yd(y.target)){const v=new ut(y.target.path);this.It(v).has(d)||this.Et(d,v)||this.et(d,v,Ze.newNoDocument(v,e))}h.Be&&(i.set(d,h.ke()),h.Ke())}}));let r=Nt();this.Je.forEach(((h,d)=>{let y=!0;d.forEachWhile((v=>{const p=this.ot(v);return!p||p.purpose==="TargetPurposeLimboResolution"||(y=!1,!1)})),y&&(r=r.add(h))})),this.je.forEach(((h,d)=>d.setReadTime(e)));const o=new Mc(e,i,this.Ze,this.je,r);return this.je=Xi(),this.He=Ju(),this.Je=Ju(),this.Ze=new re(xt),o}Ye(e,i){if(!this.rt(e))return;const r=this.Et(e,i.key)?2:0;this.nt(e).qe(i.key,r),this.je=this.je.insert(i.key,i),this.He=this.He.insert(i.key,this.It(i.key).add(e)),this.Je=this.Je.insert(i.key,this.Rt(i.key).add(e))}et(e,i,r){if(!this.rt(e))return;const o=this.nt(e);this.Et(e,i)?o.qe(i,1):o.Ue(i),this.Je=this.Je.insert(i,this.Rt(i).delete(e)),this.Je=this.Je.insert(i,this.Rt(i).add(e)),r&&(this.je=this.je.insert(i,r))}removeTarget(e){this.ze.delete(e)}_t(e){const i=this.nt(e).ke();return this.Ge.getRemoteKeysForTarget(e).size+i.addedDocuments.size-i.removedDocuments.size}$e(e){this.nt(e).$e()}nt(e){let i=this.ze.get(e);return i||(i=new P_,this.ze.set(e,i)),i}Rt(e){let i=this.Je.get(e);return i||(i=new De(xt),this.Je=this.Je.insert(e,i)),i}It(e){let i=this.He.get(e);return i||(i=new De(xt),this.He=this.He.insert(e,i)),i}rt(e){const i=this.ot(e)!==null;return i||it("WatchChangeAggregator","Detected inactive target",e),i}ot(e){const i=this.ze.get(e);return i&&i.Ne?null:this.Ge.At(e)}it(e){this.ze.set(e,new P_),this.Ge.getRemoteKeysForTarget(e).forEach((i=>{this.et(e,i,null)}))}Et(e,i){return this.Ge.getRemoteKeysForTarget(e).has(i)}}function Ju(){return new re(ut.comparator)}function B_(){return new re(ut.comparator)}const e2={asc:"ASCENDING",desc:"DESCENDING"},n2={"<":"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"},i2={and:"AND",or:"OR"};class a2{constructor(e,i){this.databaseId=e,this.useProto3Json=i}}function Ed(s,e){return s.useProto3Json||xc(e)?e:{value:e}}function _c(s,e){return s.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Nv(s,e){return s.useProto3Json?e.toBase64():e.toUint8Array()}function s2(s,e){return _c(s,e.toTimestamp())}function bi(s){return Bt(!!s,49232),mt.fromTimestamp((function(i){const r=La(i);return new ee(r.seconds,r.nanos)})(s))}function Zd(s,e){return Td(s,e).canonicalString()}function Td(s,e){const i=(function(o){return new Jt(["projects",o.projectId,"databases",o.database])})(s).child("documents");return e===void 0?i:i.child(e)}function Iv(s){const e=Jt.fromString(s);return Bt(zv(e),10190,{key:e.toString()}),e}function bd(s,e){return Zd(s.databaseId,e.path)}function Wf(s,e){const i=Iv(e);if(i.get(1)!==s.databaseId.projectId)throw new at(X.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+i.get(1)+" vs "+s.databaseId.projectId);if(i.get(3)!==s.databaseId.database)throw new at(X.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+i.get(3)+" vs "+s.databaseId.database);return new ut(Vv(i))}function Dv(s,e){return Zd(s.databaseId,e)}function r2(s){const e=Iv(s);return e.length===4?Jt.emptyPath():Vv(e)}function Ad(s){return new Jt(["projects",s.databaseId.projectId,"databases",s.databaseId.database]).canonicalString()}function Vv(s){return Bt(s.length>4&&s.get(4)==="documents",29091,{key:s.toString()}),s.popFirst(5)}function k_(s,e,i){return{name:bd(s,e),fields:i.value.mapValue.fields}}function l2(s,e){let i;if("targetChange"in e){e.targetChange;const r=(function(p){return p==="NO_CHANGE"?0:p==="ADD"?1:p==="REMOVE"?2:p==="CURRENT"?3:p==="RESET"?4:ft(39313,{state:p})})(e.targetChange.targetChangeType||"NO_CHANGE"),o=e.targetChange.targetIds||[],h=(function(p,b){return p.useProto3Json?(Bt(b===void 0||typeof b=="string",58123),Qe.fromBase64String(b||"")):(Bt(b===void 0||b instanceof Buffer||b instanceof Uint8Array,16193),Qe.fromUint8Array(b||new Uint8Array))})(s,e.targetChange.resumeToken),d=e.targetChange.cause,y=d&&(function(p){const b=p.code===void 0?X.UNKNOWN:Rv(p.code);return new at(b,p.message||"")})(d);i=new xv(r,o,h,y||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const o=Wf(s,r.document.name),h=bi(r.document.updateTime),d=r.document.createTime?bi(r.document.createTime):mt.min(),y=new Mn({mapValue:{fields:r.document.fields}}),v=Ze.newFoundDocument(o,h,d,y),p=r.targetIds||[],b=r.removedTargetIds||[];i=new rc(p,b,v.key,v)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const o=Wf(s,r.document),h=r.readTime?bi(r.readTime):mt.min(),d=Ze.newNoDocument(o,h),y=r.removedTargetIds||[];i=new rc([],y,d.key,d)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const o=Wf(s,r.document),h=r.removedTargetIds||[];i=new rc([],h,o,null)}else{if(!("filter"in e))return ft(11601,{Vt:e});{e.filter;const r=e.filter;r.targetId;const{count:o=0,unchangedNames:h}=r,d=new ZS(o,h),y=r.targetId;i=new Cv(y,d)}}return i}function o2(s,e){let i;if(e instanceof po)i={update:k_(s,e.key,e.value)};else if(e instanceof wv)i={delete:bd(s,e.key)};else if(e instanceof Is)i={update:k_(s,e.key,e.data),updateMask:y2(e.fieldMask)};else{if(!(e instanceof YS))return ft(16599,{dt:e.type});i={verify:bd(s,e.key)}}return e.fieldTransforms.length>0&&(i.updateTransforms=e.fieldTransforms.map((r=>(function(h,d){const y=d.transform;if(y instanceof pc)return{fieldPath:d.field.canonicalString(),setToServerValue:"REQUEST_TIME"};
1343if(y instanceof co)return{fieldPath:d.field.canonicalString(),appendMissingElements:{values:y.elements}};if(y instanceof ho)return{fieldPath:d.field.canonicalString(),removeAllFromArray:{values:y.elements}};if(y instanceof yc)return{fieldPath:d.field.canonicalString(),increment:y.Ae};throw ft(20930,{transform:d.transform})})(0,r)))),e.precondition.isNone||(i.currentDocument=(function(o,h){return h.updateTime!==void 0?{updateTime:s2(o,h.updateTime)}:h.exists!==void 0?{exists:h.exists}:ft(27497)})(s,e.precondition)),i}function u2(s,e){return s&&s.length>0?(Bt(e!==void 0,14353),s.map((i=>(function(o,h){let d=o.updateTime?bi(o.updateTime):bi(h);return d.isEqual(mt.min())&&(d=bi(h)),new GS(d,o.transformResults||[])})(i,e)))):[]}function c2(s,e){return{documents:[Dv(s,e.path)]}}function h2(s,e){const i={structuredQuery:{}},r=e.path;let o;e.collectionGroup!==null?(o=r,i.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(o=r.popLast(),i.structuredQuery.from=[{collectionId:r.lastSegment()}]),i.parent=Dv(s,o);const h=(function(p){if(p.length!==0)return Mv(Zn.create(p,"and"))})(e.filters);h&&(i.structuredQuery.where=h);const d=(function(p){if(p.length!==0)return p.map((b=>(function(O){return{field:Sr(O.field),direction:m2(O.dir)}})(b)))})(e.orderBy);d&&(i.structuredQuery.orderBy=d);const y=Ed(s,e.limit);return y!==null&&(i.structuredQuery.limit=y),e.startAt&&(i.structuredQuery.startAt=(function(p){return{before:p.inclusive,values:p.position}})(e.startAt)),e.endAt&&(i.structuredQuery.endAt=(function(p){return{before:!p.inclusive,values:p.position}})(e.endAt)),{ft:i,parent:o}}function f2(s){let e=r2(s.parent);const i=s.structuredQuery,r=i.from?i.from.length:0;let o=null;if(r>0){Bt(r===1,65062);const b=i.from[0];b.allDescendants?o=b.collectionId:e=e.child(b.collectionId)}let h=[];i.where&&(h=(function(A){const O=Ov(A);return O instanceof Zn&&lv(O)?O.getFilters():[O]})(i.where));let d=[];i.orderBy&&(d=(function(A){return A.map((O=>(function(J){return new gc(wr(J.field),(function(nt){switch(nt){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}})(J.direction))})(O)))})(i.orderBy));let y=null;i.limit&&(y=(function(A){let O;return O=typeof A=="object"?A.value:A,xc(O)?null:O})(i.limit));let v=null;i.startAt&&(v=(function(A){const O=!!A.before,Q=A.values||[];return new mc(Q,O)})(i.startAt));let p=null;return i.endAt&&(p=(function(A){const O=!A.before,Q=A.values||[];return new mc(Q,O)})(i.endAt)),IS(e,o,d,h,y,"F",v,p)}function d2(s,e){const i=(function(o){switch(o){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return ft(28987,{purpose:o})}})(e.purpose);return i==null?null:{"goog-listen-tags":i}}function Ov(s){return s.unaryFilter!==void 0?(function(i){switch(i.unaryFilter.op){case"IS_NAN":const r=wr(i.unaryFilter.field);return we.create(r,"==",{doubleValue:NaN});case"IS_NULL":const o=wr(i.unaryFilter.field);return we.create(o,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const h=wr(i.unaryFilter.field);return we.create(h,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const d=wr(i.unaryFilter.field);return we.create(d,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return ft(61313);default:return ft(60726)}})(s):s.fieldFilter!==void 0?(function(i){return we.create(wr(i.fieldFilter.field),(function(o){switch(o){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 ft(58110);default:return ft(50506)}})(i.fieldFilter.op),i.fieldFilter.value)})(s):s.compositeFilter!==void 0?(function(i){return Zn.create(i.compositeFilter.filters.map((r=>Ov(r))),(function(o){switch(o){case"AND":return"and";case"OR":return"or";default:return ft(1026)}})(i.compositeFilter.op))})(s):ft(30097,{filter:s})}function m2(s){return e2[s]}function g2(s){return n2[s]}function p2(s){return i2[s]}function Sr(s){return{fieldPath:s.canonicalString()}}function wr(s){return Fe.fromServerFormat(s.fieldPath)}function Mv(s){return s instanceof we?(function(i){if(i.op==="=="){if(x_(i.value))return{unaryFilter:{field:Sr(i.field),op:"IS_NAN"}};if(C_(i.value))return{unaryFilter:{field:Sr(i.field),op:"IS_NULL"}}}else if(i.op==="!="){if(x_(i.value))return{unaryFilter:{field:Sr(i.field),op:"IS_NOT_NA
1343N"}};if(C_(i.value))return{unaryFilter:{field:Sr(i.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Sr(i.field),op:g2(i.op),value:i.value}}})(s):s instanceof Zn?(function(i){const r=i.getFilters().map((o=>Mv(o)));return r.length===1?r[0]:{compositeFilter:{op:p2(i.op),filters:r}}})(s):ft(54877,{filter:s})}function y2(s){const e=[];return s.fields.forEach((i=>e.push(i.canonicalString()))),{fieldPaths:e}}function zv(s){return s.length>=4&&s.get(0)==="projects"&&s.get(2)==="databases"}function jv(s){return!!s&&typeof s._toProto=="function"&&s._protoValueType==="ProtoValue"}/**
1344 * @license
1345 * Copyright 2017 Google LLC
1346 *
1347 * Licensed under the Apache License, Version 2.0 (the "License");
1348 * you may not use this file except in compliance with the License.
1349 * You may obtain a copy of the License at
1350 *
1351 *   http://www.apache.org/licenses/LICENSE-2.0
1352 *
1353 * Unless required by applicable law or agreed to in writing, software
1354 * distributed under the License is distributed on an "AS IS" BASIS,
1355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1356 * See the License for the specific language governing permissions and
1357 * limitations under the License.
1358 */class Na{constructor(e,i,r,o,h=mt.min(),d=mt.min(),y=Qe.EMPTY_BYTE_STRING,v=null){this.target=e,this.targetId=i,this.purpose=r,this.sequenceNumber=o,this.snapshotVersion=h,this.lastLimboFreeSnapshotVersion=d,this.resumeToken=y,this.expectedCount=v}withSequenceNumber(e){return new Na(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,i){return new Na(this.target,this.targetId,this.purpose,this.sequenceNumber,i,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Na(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Na(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
1359 * @license
1360 * Copyright 2017 Google LLC
1361 *
1362 * Licensed under the Apache License, Version 2.0 (the "License");
1363 * you may not use this file except in compliance with the License.
1364 * You may obtain a copy of the License at
1365 *
1366 *   http://www.apache.org/licenses/LICENSE-2.0
1367 *
1368 * Unless required by applicable law or agreed to in writing, software
1369 * distributed under the License is distributed on an "AS IS" BASIS,
1370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1371 * See the License for the specific language governing permissions and
1372 * limitations under the License.
1373 */class _2{constructor(e){this.yt=e}}function v2(s){const e=f2({parent:s.parent,structuredQuery:s.structuredQuery});return s.limitType==="LAST"?vd(e,e.limit,"L"):e}/**
1374 * @license
1375 * Copyright 2019 Google LLC
1376 *
1377 * Licensed under the Apache License, Version 2.0 (the "License");
1378 * you may not use this file except in compliance with the License.
1379 * You may obtain a copy of the License at
1380 *
1381 *   http://www.apache.org/licenses/LICENSE-2.0
1382 *
1383 * Unless required by applicable law or agreed to in writing, software
1384 * distributed under the License is distributed on an "AS IS" BASIS,
1385 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1386 * See the License for the specific language governing permissions and
1387 * limitations under the License.
1388 */class E2{constructor(){this.Sn=new T2}addToCollectionParentIndex(e,i){return this.Sn.add(i),Z.resolve()}getCollectionParents(e,i){return Z.resolve(this.Sn.getEntries(i))}addFieldIndex(e,i){return Z.resolve()}deleteFieldIndex(e,i){return Z.resolve()}deleteAllFieldIndexes(e){return Z.resolve()}createTargetIndexes(e,i){return Z.resolve()}getDocumentsMatchingTarget(e,i){return Z.resolve(null)}getIndexType(e,i){return Z.resolve(0)}getFieldIndexes(e,i){return Z.resolve([])}getNextCollectionGroupToUpdate(e){return Z.resolve(null)}getMinOffset(e,i){return Z.resolve(ja.min())}getMinOffsetFromCollectionGroup(e,i){return Z.resolve(ja.min())}updateCollectionGroup(e,i,r){return Z.resolve()}updateIndexEntries(e,i){return Z.resolve()}}class T2{constructor(){this.index={}}add(e){const i=e.lastSegment(),r=e.popLast(),o=this.index[i]||new De(Jt.comparator),h=!o.has(r);return this.index[i]=o.add(r),h}has(e){const i=e.lastSegment(),r=e.popLast(),o=this.index[i];return o&&o.has(r)}getEntries(e){return(this.index[e]||new De(Jt.comparator)).toArray()}}/**
1389 * @license
1390 * Copyright 2018 Google LLC
1391 *
1392 * Licensed under the Apache License, Version 2.0 (the "License");
1393 * you may not use this file except in compliance with the License.
1394 * You may obtain a copy of the License at
1395 *
1396 *   http://www.apache.org/licenses/LICENSE-2.0
1397 *
1398 * Unless required by applicable law or agreed to in writing, software
1399 * distributed under the License is distributed on an "AS IS" BASIS,
1400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1401 * See the License for the specific language governing permissions and
1402 * limitations under the License.
1403 */const q_={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Lv=41943040;class cn{static withCacheSize(e){return new cn(e,cn.DEFAULT_COLLECTION_PERCENTILE,cn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,i,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=i,this.maximumSequenceNumbersToCollect=r}}/**
1404 * @license
1405 * Copyright 2017 Google LLC
1406 *
1407 * Licensed under the Apache License, Version 2.0 (the "License");
1408 * you may not use this file except in compliance with the License.
1409 * You may obtain a copy of the License at
1410 *
1411 *   http://www.apache.org/licenses/LICENSE-2.0
1412 *
1413 * Unless required by applicable law or agreed to in writing, software
1414 * distributed under the License is distributed on an "AS IS" BASIS,
1415 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1416 * See the License for the specific language governing permissions and
1417 * limitations under the License.
1418 */cn.DEFAULT_COLLECTION_PERCENTILE=10,cn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,cn.DEFAULT=new cn(Lv,cn.DEFAULT_COLLECTION_PERCENTILE,cn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),cn.DISABLED=new cn(-1,0,0);/**
1419 * @license
1420 * Copyright 2017 Google LLC
1421 *
1422 * Licensed under the Apache License, Version 2.0 (the "License");
1423 * you may not use this file except in compliance with the License.
1424 * You may obtain a copy of the License at
1425 *
1426 *   http://www.apache.org/licenses/LICENSE-2.0
1427 *
1428 * Unless required by applicable law or agreed to in writing, software
1429 * distributed under the License is distributed on an "AS IS" BASIS,
1430 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1431 * See the License for the specific language governing permissions and
1432 * limitations under the License.
1433 */class Mr{constructor(e){this.sr=e}next(){return this.sr+=2,this.sr}static _r(){return new Mr(0)}static ar(){return new Mr(-1)}}/**
1434 * @license
1435 * Copyright 2020 Google LLC
1436 *
1437 * Licensed under the Apache License, Version 2.0 (the "License");
1438 * you may not use this file except in compliance with the License.
1439 * You may obtain a copy of the License at
1440 *
1441 *   http://www.apache.org/licenses/LICENSE-2.0
1442 *
1443 * Unless required by applicable law or agreed to in writing, software
1444 * distributed under the License is distributed on an "AS IS" BASIS,
1445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1446 * See the License for the specific language governing permissions and
1447 * limitations under the License.
1448 */const H_="LruGarbageCollector",b2=1048576;function G_([s,e],[i,r]){const o=xt(s,i);return o===0?xt(e,r):o}class A2{constructor(e){this.Pr=e,this.buffer=new De(G_),this.Tr=0}Ir(){return++this.Tr}Er(e){const i=[e,this.Ir()];if(this.buffer.size<this.Pr)this.buffer=this.buffer.add(i);else{const r=this.buffer.last();G_(i,r)<0&&(this.buffer=this.buffer.delete(r).add(i))}}get maxValue(){return this.buffer.last()[0]}}class S2{constructor(e,i,r){this.garbageCollector=e,this.asyncQueue=i,this.localStore=r,this.Rr=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Ar(6e4)}stop(){this.Rr&&(this.Rr.cancel(),this.Rr=null)}get started(){return this.Rr!==null}Ar(e){it(H_,`Garbage collection scheduled in ${e}ms`),this.Rr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(async()=>{this.Rr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(i){Ur(i)?it(H_,"Ignoring IndexedDB error during garbage collection: ",i):await Lr(i)}await this.Ar(3e5)}))}}class w2{constructor(e,i){this.Vr=e,this.params=i}calculateTargetCount(e,i){return this.Vr.dr(e).next((r=>Math.floor(i/100*r)))}
1448nthSequenceNumber(e,i){if(i===0)return Z.resolve(Cc.ce);const r=new A2(i);return this.Vr.forEachTarget(e,(o=>r.Er(o.sequenceNumber))).next((()=>this.Vr.mr(e,(o=>r.Er(o))))).next((()=>r.maxValue))}removeTargets(e,i,r){return this.Vr.removeTargets(e,i,r)}removeOrphanedDocuments(e,i){return this.Vr.removeOrphanedDocuments(e,i)}collect(e,i){return this.params.cacheSizeCollectionThreshold===-1?(it("LruGarbageCollector","Garbage collection skipped; disabled"),Z.resolve(q_)):this.getCacheSize(e).next((r=>r<this.params.cacheSizeCollectionThreshold?(it("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),q_):this.gr(e,i)))}getCacheSize(e){return this.Vr.getCacheSize(e)}gr(e,i){let r,o,h,d,y,v,p;const b=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((A=>(A>this.params.maximumSequenceNumbersToCollect?(it("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${A}`),o=this.params.maximumSequenceNumbersToCollect):o=A,d=Date.now(),this.nthSequenceNumber(e,o)))).next((A=>(r=A,y=Date.now(),this.removeTargets(e,r,i)))).next((A=>(h=A,v=Date.now(),this.removeOrphanedDocuments(e,r)))).next((A=>(p=Date.now(),br()<=Ot.DEBUG&&it("LruGarbageCollector",`LRU Garbage Collection
1449	Counted targets in ${d-b}ms
1450	Determined least recently used ${o} in `+(y-d)+`ms
1451	Removed ${h} targets in `+(v-y)+`ms
1452	Removed ${A} documents in `+(p-v)+`ms
1453Total Duration: ${p-b}ms`),Z.resolve({didRun:!0,sequenceNumbersCollected:o,targetsRemoved:h,documentsRemoved:A}))))}}function R2(s,e){return new w2(s,e)}/**
1454 * @license
1455 * Copyright 2017 Google LLC
1456 *
1457 * Licensed under the Apache License, Version 2.0 (the "License");
1458 * you may not use this file except in compliance with the License.
1459 * You may obtain a copy of the License at
1460 *
1461 *   http://www.apache.org/licenses/LICENSE-2.0
1462 *
1463 * Unless required by applicable law or agreed to in writing, software
1464 * distributed under the License is distributed on an "AS IS" BASIS,
1465 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1466 * See the License for the specific language governing permissions and
1467 * limitations under the License.
1468 */class C2{constructor(){this.changes=new Ns((e=>e.toString()),((e,i)=>e.isEqual(i))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,i){this.assertNotApplied(),this.changes.set(e,Ze.newInvalidDocument(e).setReadTime(i))}getEntry(e,i){this.assertNotApplied();const r=this.changes.get(i);return r!==void 0?Z.resolve(r):this.getFromCache(e,i)}getEntries(e,i){return this.getAllFromCache(e,i)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/**
1469 * @license
1470 * Copyright 2017 Google LLC
1471 *
1472 * Licensed under the Apache License, Version 2.0 (the "License");
1473 * you may not use this file except in compliance with the License.
1474 * You may obtain a copy of the License at
1475 *
1476 *   http://www.apache.org/licenses/LICENSE-2.0
1477 *
1478 * Unless required by applicable law or agreed to in writing, software
1479 * distributed under the License is distributed on an "AS IS" BASIS,
1480 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1481 * See the License for the specific language governing permissions and
1482 * limitations under the License.
1483 *//**
1484 * @license
1485 * Copyright 2022 Google LLC
1486 *
1487 * Licensed under the Apache License, Version 2.0 (the "License");
1488 * you may not use this file except in compliance with the License.
1489 * You may obtain a copy of the License at
1490 *
1491 *   http://www.apache.org/licenses/LICENSE-2.0
1492 *
1493 * Unless required by applicable law or agreed to in writing, software
1494 * distributed under the License is distributed on an "AS IS" BASIS,
1495 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1496 * See the License for the specific language governing permissions and
1497 * limitations under the License.
1498 */class x2{constructor(e,i){this.overlayedDocument=e,this.mutatedFields=i}}/**
1499 * @license
1500 * Copyright 2017 Google LLC
1501 *
1502 * Licensed under the Apache License, Version 2.0 (the "License");
1503 * you may not use this file except in compliance with the License.
1504 * You may obtain a copy of the License at
1505 *
1506 *   http://www.apache.org/licenses/LICENSE-2.0
1507 *
1508 * Unless required by applicable law or agreed to in writing, software
1509 * distributed under the License is distributed on an "AS IS" BASIS,
1510 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1511 * See the License for the specific language governing permissions and
1512 * limitations under the License.
1513 */class N2{constructor(e,i,r,o){this.remoteDocumentCache=e,this.mutationQueue=i,this.documentOverlayCache=r,this.indexManager=o}getDocument(e,i){let r=null;return this.documentOverlayCache.getOverlay(e,i).next((o=>(r=o,this.remoteDocumentCache.getEntry(e,i)))).next((o=>(r!==null&&io(r.mutation,o,Kn.empty(),ee.now()),o)))}getDocuments(e,i){return this.remoteDocumentCache.getEntries(e,i).next((r=>this.getLocalViewOfDocuments(e,r,Nt()).next((()=>r))))}getLocalViewOfDocuments(e,i,r=Nt()){const o=Ts();return this.populateOverlays(e,o,i).next((()=>this.computeViews(e,i,o,r).next((h=>{let d=Xl();return h.forEach(((y,v)=>{d=d.insert(y,v.overlayedDocument)})),d}))))}getOverlayedDocuments(e,i){const r=Ts();return this.populateOverlays(e,r,i).next((()=>this.computeViews(e,i,r,Nt())))}populateOverlays(e,i,r){const o=[];return r.forEach((h=>{i.has(h)||o.push(h)})),this.documentOverlayCache.getOverlays(e,o).next((h=>{h.forEach(((d,y)=>{i.set(d,y)}))}))}computeViews(e,i,r,o){let h=Xi();const d=no(),y=(function(){return no()})();return i.forEach(((v,p)=>{const b=r.get(p.key);o.has(p.key)&&(b===void 0||b.mutation instanceof Is)?h=h.insert(p.key,p):b!==void 0?(d.set(p.key,b.mutation.getFieldMask()),io(b.mutation,p,b.mutation.getFieldMask(),ee.now())):d.set(p.key,Kn.empty())})),this.recalculateAndSaveOverlays(e,h).next((v=>(v.forEach(((p,b)=>
vendor: 4,099 bytes, lines 1513-1538
1513d.set(p,b))),i.forEach(((p,b)=>y.set(p,new x2(b,d.get(p)??null)))),y)))}recalculateAndSaveOverlays(e,i){const r=no();let o=new re(((d,y)=>d-y)),h=Nt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,i).next((d=>{for(const y of d)y.keys().forEach((v=>{const p=i.get(v);if(p===null)return;let b=r.get(v)||Kn.empty();b=y.applyToLocalView(p,b),r.set(v,b);const A=(o.get(y.batchId)||Nt()).add(v);o=o.insert(y.batchId,A)}))})).next((()=>{const d=[],y=o.getReverseIterator();for(;y.hasNext();){const v=y.getNext(),p=v.key,b=v.value,A=yv();b.forEach((O=>{if(!h.has(O)){const Q=Av(i.get(O),r.get(O));Q!==null&&A.set(O,Q),h=h.add(O)}})),d.push(this.documentOverlayCache.saveOverlays(e,p,A))}return Z.waitFor(d)})).next((()=>r))}recalculateAndSaveOverlaysForDocumentKeys(e,i){return this.remoteDocumentCache.getEntries(e,i).next((r=>this.recalculateAndSaveOverlays(e,r)))}getDocumentsMatchingQuery(e,i,r,o){return DS(i)?this.getDocumentsMatchingDocumentQuery(e,i.path):fv(i)?this.getDocumentsMatchingCollectionGroupQuery(e,i,r,o):this.getDocumentsMatchingCollectionQuery(e,i,r,o)}getNextDocuments(e,i,r,o){return this.remoteDocumentCache.getAllFromCollectionGroup(e,i,r,o).next((h=>{const d=o-h.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,i,r.largestBatchId,o-h.size):Z.resolve(Ts());let y=ro,v=h;return d.next((p=>Z.forEach(p,((b,A)=>(y<A.largestBatchId&&(y=A.largestBatchId),h.get(b)?Z.resolve():this.remoteDocumentCache.getEntry(e,b).next((O=>{v=v.insert(b,O)}))))).next((()=>this.populateOverlays(e,p,h))).next((()=>this.computeViews(e,v,p,Nt()))).next((b=>({batchId:y,changes:pv(b)})))))}))}getDocumentsMatchingDocumentQuery(e,i){return this.getDocument(e,new ut(i)).next((r=>{let o=Xl();return r.isFoundDocument()&&(o=o.insert(r.key,r)),o}))}getDocumentsMatchingCollectionGroupQuery(e,i,r,o){const h=i.collectionGroup;let d=Xl();return this.indexManager.getCollectionParents(e,h).next((y=>Z.forEach(y,(v=>{const p=(function(A,O){return new go(O,null,A.explicitOrderBy.slice(),A.filters.slice(),A.limit,A.limitType,A.startAt,A.endAt)})(i,v.child(h));return this.getDocumentsMatchingCollectionQuery(e,p,r,o).next((b=>{b.forEach(((A,O)=>{d=d.insert(A,O)}))}))})).next((()=>d))))}getDocumentsMatchingCollectionQuery(e,i,r,o){let h;return this.documentOverlayCache.getOverlaysForCollection(e,i.path,r.largestBatchId).next((d=>(h=d,this.remoteDocumentCache.getDocumentsMatchingQuery(e,i,r,h,o)))).next((d=>{h.forEach(((v,p)=>{const b=p.getKey();d.get(b)===null&&(d=d.insert(b,Ze.newInvalidDocument(b)))}));let y=Xl();return d.forEach(((v,p)=>{const b=h.get(v);b!==void 0&&io(b.mutation,p,Kn.empty(),ee.now()),Dc(i,p)&&(y=y.insert(v,p))})),y}))}}/**
1514 * @license
1515 * Copyright 2020 Google LLC
1516 *
1517 * Licensed under the Apache License, Version 2.0 (the "License");
1518 * you may not use this file except in compliance with the License.
1519 * You may obtain a copy of the License at
1520 *
1521 *   http://www.apache.org/licenses/LICENSE-2.0
1522 *
1523 * Unless required by applicable law or agreed to in writing, software
1524 * distributed under the License is distributed on an "AS IS" BASIS,
1525 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1526 * See the License for the specific language governing permissions and
1527 * limitations under the License.
1528 */class I2{constructor(e){this.serializer=e,this.Nr=new Map,this.Br=new Map}getBundleMetadata(e,i){return Z.resolve(this.Nr.get(i))}saveBundleMetadata(e,i){return this.Nr.set(i.id,(function(o){return{id:o.id,version:o.version,createTime:bi(o.createTime)}})(i)),Z.resolve()}getNamedQuery(e,i){return Z.resolve(this.Br.get(i))}saveNamedQuery(e,i){return this.Br.set(i.name,(function(o){return{name:o.name,query:v2(o.bundledQuery),readTime:bi(o.readTime)}})(i)),Z.resolve()}}/**
1529 * @license
1530 * Copyright 2022 Google LLC
1531 *
1532 * Licensed under the Apache License, Version 2.0 (the "License");
1533 * you may not use this file except in compliance with the License.
1534 * You may obtain a copy of the License at
1535 *
1536 *   http://www.apache.org/licenses/LICENSE-2.0
1537 *
1538 * Unless required by applicable law or agreed to in writing, softw
1538are
1539 * distributed under the License is distributed on an "AS IS" BASIS,
1540 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1541 * See the License for the specific language governing permissions and
1542 * limitations under the License.
1543 */class D2{constructor(){this.overlays=new re(ut.comparator),this.Lr=new Map}getOverlay(e,i){return Z.resolve(this.overlays.get(i))}getOverlays(e,i){const r=Ts();return Z.forEach(i,(o=>this.getOverlay(e,o).next((h=>{h!==null&&r.set(o,h)})))).next((()=>r))}saveOverlays(e,i,r){return r.forEach(((o,h)=>{this.bt(e,i,h)})),Z.resolve()}removeOverlaysForBatchId(e,i,r){const o=this.Lr.get(r);return o!==void 0&&(o.forEach((h=>this.overlays=this.overlays.remove(h))),this.Lr.delete(r)),Z.resolve()}getOverlaysForCollection(e,i,r){const o=Ts(),h=i.length+1,d=new ut(i.child("")),y=this.overlays.getIteratorFrom(d);for(;y.hasNext();){const v=y.getNext().value,p=v.getKey();if(!i.isPrefixOf(p.path))break;p.path.length===h&&v.largestBatchId>r&&o.set(v.getKey(),v)}return Z.resolve(o)}getOverlaysForCollectionGroup(e,i,r,o){let h=new re(((p,b)=>p-b));const d=this.overlays.getIterator();for(;d.hasNext();){const p=d.getNext().value;if(p.getKey().getCollectionGroup()===i&&p.largestBatchId>r){let b=h.get(p.largestBatchId);b===null&&(b=Ts(),h=h.insert(p.largestBatchId,b)),b.set(p.getKey(),p)}}const y=Ts(),v=h.getIterator();for(;v.hasNext()&&(v.getNext().value.forEach(((p,b)=>y.set(p,b))),!(y.size()>=o)););return Z.resolve(y)}bt(e,i,r){const o=this.overlays.get(r.key);if(o!==null){const d=this.Lr.get(o.largestBatchId).delete(r.key);this.Lr.set(o.largestBatchId,d)}this.overlays=this.overlays.insert(r.key,new XS(i,r));let h=this.Lr.get(i);h===void 0&&(h=Nt(),this.Lr.set(i,h)),this.Lr.set(i,h.add(r.key))}}/**
1544 * @license
1545 * Copyright 2024 Google LLC
1546 *
1547 * Licensed under the Apache License, Version 2.0 (the "License");
1548 * you may not use this file except in compliance with the License.
1549 * You may obtain a copy of the License at
1550 *
1551 *   http://www.apache.org/licenses/LICENSE-2.0
1552 *
1553 * Unless required by applicable law or agreed to in writing, software
1554 * distributed under the License is distributed on an "AS IS" BASIS,
1555 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1556 * See the License for the specific language governing permissions and
1557 * limitations under the License.
1558 */class V2{constructor(){this.sessionToken=Qe.EMPTY_BYTE_STRING}getSessionToken(e){return Z.resolve(this.sessionToken)}setSessionToken(e,i){return this.sessionToken=i,Z.resolve()}}/**
1559 * @license
1560 * Copyright 2017 Google LLC
1561 *
1562 * Licensed under the Apache License, Version 2.0 (the "License");
1563 * you may not use this file except in compliance with the License.
1564 * You may obtain a copy of the License at
1565 *
1566 *   http://www.apache.org/licenses/LICENSE-2.0
1567 *
1568 * Unless required by applicable law or agreed to in writing, software
1569 * distributed under the License is distributed on an "AS IS" BASIS,
1570 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1571 * See the License for the specific language governing permissions and
1572 * limitations under the License.
1573 */class $d{constructor(){this.kr=new De(ze.Kr),this.qr=new De(ze.Ur)}isEmpty(){return this.kr.isEmpty()}addReference(e,i){const r=new ze(e,i);this.kr=this.kr.add(r),this.qr=this.qr.add(r)}$r(e,i){e.forEach((r=>this.addReference(r,i)))}removeReference(e,i){this.Wr(new ze(e,i))}Qr(e,i){e.forEach((r=>this.removeReference(r,i)))}Gr(e){const i=new ut(new Jt([])),r=new ze(i,e),o=new ze(i,e+1),h=[];return this.qr.forEachInRange([r,o],(d=>{this.Wr(d),h.push(d.key)})),h}zr(){this.kr.forEach((e=>this.Wr(e)))}Wr(e){this.kr=this.kr.delete(e),this.qr=this.qr.delete(e)}jr(e){const i=new ut(new Jt([])),r=new ze(i,e),o=new ze(i,e+1);let h=Nt();return this.qr.forEachInRange([r,o],(d=>{h=h.add(d.key)})),h}containsKey(e){const i=new ze(e,0),r=this.kr.firstAfterOrEqual(i);return r!==null&&e.isEqual(r.key)}}class ze{constructor(e,i){this.key=e,this.Hr=i}static Kr(e,i){return ut.comparator(e.key,i.key)||xt(e.Hr,i.Hr)}static Ur(e,i){return xt(e.Hr,i.Hr)||ut.comparator(e.key,i.key)}}/**
1574 * @license
1575 * Copyright 2017 Google LLC
1576 *
1577 * Licensed under the Apache License, Version 2.0 (the "License");
1578 * you may not use this file except in compliance with the License.
1579 * You may obtain a copy of the License at
1580 *
1581 *   http://www.apache.org/licenses/LICENSE-2.0
1582 *
1583 * Unless required by applicable law or agreed to in writing, software
1584 * distributed under the License is distributed on an "AS IS" BASIS,
1585 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1586 * See the License for the specific language governing permissions and
1587 * limitations under the License.
1588 */class O2{constructor(e,i){this.indexManager=e,this.referenceDelegate=i,this.mutationQueue=[],this.Yn=1,this.Jr=new De(ze.Kr)}checkEmpty(e){return Z.resolve(this.mutationQueue.length===0)}addMutationBatch(e,i,r,o){const h=this.Yn;this.Yn++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const d=new KS(h,i,r,o);this.mutationQueue.push(d);for(const y of o)this.Jr=this.Jr.add(new ze(y.key,h)),this.indexManager.addToCollectionParentIndex(e,y.key.path.popLast());return Z.resolve(d)}lookupMutationBatch(e,i){return Z.resolve(this.Zr(i))}getNextMutationBatchAfterBatchId(e,i){const r=i+1,o=this.Xr(r),h=o<0?0:o;return Z.resolve(this.mutationQueue.length>h?this.mutationQueue[h]:null)}getHighestUnacknowledgedBatchId(){return Z.resolve(this.mutationQueue.length===0?qd:this.Yn-1)}getAllMutationBatches(e){return Z.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,i){const r=new ze(i,0),o=new ze(i,Number.POSITIVE_INFINITY),h=[];return this.Jr.forEachInRange([r,o],(d=>{const y=this.Zr(d.Hr);h.push(y)})),Z.resolve(h)}getAllMutationBatchesAffectingDocumentKeys(e,i){let r=new De(xt);return i.forEach((o=>{const h=new ze(o,0),d=new ze(o,Number.POSITIVE_INFINITY);this.Jr.forEachInRange([h,d],(y=>{r=r.add(y.Hr)}))})),Z.resolve(this.Yr(r))}getAllMutationBatchesAffectingQuery(e,i){const r=i.path,o=r.length+1;let h=r;ut.isDocumentKey(h)||(h=h.child(""));const d=new ze(new ut(h),0);let y=new De(xt);return this.Jr.forEachWhile((v=>{const p=v.key.path;return!!r.isPrefixOf(p)&&(p.length===o&&(y=y.add(v.Hr)),!0)}),d),Z.resolve(this.Yr(y))}Yr(e){const i=[];return e.forEach((r=>{const o=this.Zr(r);o!==null&&i.push(o)})),i}removeMutationBatch(e,i){Bt(this.ei(i.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Jr;return Z.forEach(i.mutations,(o=>{const h=new ze(o.key,i.batchId);return r=r.delete(h),this.referenceDelegate.markPotentiallyOrphaned(e,o.key)})).next((()=>{this.Jr=r}))}nr(e){}containsKey(e,i){const r=new ze(i,0),o=this.Jr.firstAfterOrEqual(r);return Z.resolve(i.isEqual(o&&o.key))}performConsistencyCheck(e){return this.mutationQueue.length,Z.resolve()}ei(e,i){return this.Xr(e)}Xr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Zr(e){const i=this.Xr(e);return i<0||i>=this.mutationQueue.length?null:this.mutationQueue[i]}}/**
1589 * @license
1590 * Copyright 2017 Google LLC
1591 *
1592 * Licensed under the Apache License, Version 2.0 (the "License");
1593 * you may not use this file except in compliance with the License.
1594 * You may obtain a copy of the License at
1595 *
1596 *   http://www.apache.org/licenses/LICENSE-2.0
1597 *
1598 * Unless required by applicable law or agreed to in writing, software
1599 * distributed under the License is distributed on an "AS IS" BASIS,
1600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1601 * See the License for the specific language governing permissions and
1602 * limitations under the License.
1603 */class M2{constructor(e){this.ti=e,this.docs=(function(){return new re(ut.comparator)})(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,i){const r=i.key,o=this.docs.get(r),h=o?o.size:0,d=this.ti(i);return this.docs=this.docs.insert(r,{document:i.mutableCopy(),size:d}),this.size+=d-h,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const i=this.docs.get(e);i&&(this.docs=this.docs.remove(e),this.size-=i.size)}getEntry(e,i){const r=this.docs.get(i);return Z.resolve(r?r.document.mutableCopy():Ze.newInvalidDocument(i))}getEntries(e,i){let r=Xi();return i.forEach((o=>{const h=this.docs.get(o);r=r.insert(o,h?h.document.mutableCopy():Ze.newInvalidDocument(o))})),Z.resolve(r)}getDocumentsMatchingQuery(e,i,r,o){let h=Xi();const d=i.path,y=new ut(d.child("__id-9223372036854775808__")),v=this.docs.getIteratorFrom(y);for(;v.hasNext();){const{key:p,value:{document:b}}=v.getNext();if(!d.isPrefixOf(p.path))break;p.path.length>d.length+1||lS(rS(b),r)<=0||(o.has(b.key)||Dc(i,b))&&(h=h.insert(b.key,b.mutableCopy()))}return Z.resolve(h)}getAllFromCollectionGroup(e,i,r,o){ft(9500)}ni(e,i){return Z.forEach(this.docs,(r=>i(r)))}newChangeBuffer(e){return new z2(this)}getSize(e){return Z.resolve(this.size)}}class z2 extends C2{constructor(e){super(),this.Mr=e}applyChanges(e){const i=[];
vendor: 9,124 bytes, lines 1603-1667
1603return this.changes.forEach(((r,o)=>{o.isValidDocument()?i.push(this.Mr.addEntry(e,o)):this.Mr.removeEntry(r)})),Z.waitFor(i)}getFromCache(e,i){return this.Mr.getEntry(e,i)}getAllFromCache(e,i){return this.Mr.getEntries(e,i)}}/**
1604 * @license
1605 * Copyright 2017 Google LLC
1606 *
1607 * Licensed under the Apache License, Version 2.0 (the "License");
1608 * you may not use this file except in compliance with the License.
1609 * You may obtain a copy of the License at
1610 *
1611 *   http://www.apache.org/licenses/LICENSE-2.0
1612 *
1613 * Unless required by applicable law or agreed to in writing, software
1614 * distributed under the License is distributed on an "AS IS" BASIS,
1615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1616 * See the License for the specific language governing permissions and
1617 * limitations under the License.
1618 */class j2{constructor(e){this.persistence=e,this.ri=new Ns((i=>Fd(i)),Qd),this.lastRemoteSnapshotVersion=mt.min(),this.highestTargetId=0,this.ii=0,this.si=new $d,this.targetCount=0,this.oi=Mr._r()}forEachTarget(e,i){return this.ri.forEach(((r,o)=>i(o))),Z.resolve()}getLastRemoteSnapshotVersion(e){return Z.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Z.resolve(this.ii)}allocateTargetId(e){return this.highestTargetId=this.oi.next(),Z.resolve(this.highestTargetId)}setTargetsMetadata(e,i,r){return r&&(this.lastRemoteSnapshotVersion=r),i>this.ii&&(this.ii=i),Z.resolve()}lr(e){this.ri.set(e.target,e);const i=e.targetId;i>this.highestTargetId&&(this.oi=new Mr(i),this.highestTargetId=i),e.sequenceNumber>this.ii&&(this.ii=e.sequenceNumber)}addTargetData(e,i){return this.lr(i),this.targetCount+=1,Z.resolve()}updateTargetData(e,i){return this.lr(i),Z.resolve()}removeTargetData(e,i){return this.ri.delete(i.target),this.si.Gr(i.targetId),this.targetCount-=1,Z.resolve()}removeTargets(e,i,r){let o=0;const h=[];return this.ri.forEach(((d,y)=>{y.sequenceNumber<=i&&r.get(y.targetId)===null&&(this.ri.delete(d),h.push(this.removeMatchingKeysForTargetId(e,y.targetId)),o++)})),Z.waitFor(h).next((()=>o))}getTargetCount(e){return Z.resolve(this.targetCount)}getTargetData(e,i){const r=this.ri.get(i)||null;return Z.resolve(r)}addMatchingKeys(e,i,r){return this.si.$r(i,r),Z.resolve()}removeMatchingKeys(e,i,r){this.si.Qr(i,r);const o=this.persistence.referenceDelegate,h=[];return o&&i.forEach((d=>{h.push(o.markPotentiallyOrphaned(e,d))})),Z.waitFor(h)}removeMatchingKeysForTargetId(e,i){return this.si.Gr(i),Z.resolve()}getMatchingKeysForTargetId(e,i){const r=this.si.jr(i);return Z.resolve(r)}containsKey(e,i){return Z.resolve(this.si.containsKey(i))}}/**
1619 * @license
1620 * Copyright 2017 Google LLC
1621 *
1622 * Licensed under the Apache License, Version 2.0 (the "License");
1623 * you may not use this file except in compliance with the License.
1624 * You may obtain a copy of the License at
1625 *
1626 *   http://www.apache.org/licenses/LICENSE-2.0
1627 *
1628 * Unless required by applicable law or agreed to in writing, software
1629 * distributed under the License is distributed on an "AS IS" BASIS,
1630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1631 * See the License for the specific language governing permissions and
1632 * limitations under the License.
1633 */class Uv{constructor(e,i){this._i={},this.overlays={},this.ai=new Cc(0),this.ui=!1,this.ui=!0,this.ci=new V2,this.referenceDelegate=e(this),this.li=new j2(this),this.indexManager=new E2,this.remoteDocumentCache=(function(o){return new M2(o)})((r=>this.referenceDelegate.hi(r))),this.serializer=new _2(i),this.Pi=new I2(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ui=!1,Promise.resolve()}get started(){return this.ui}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let i=this.overlays[e.toKey()];return i||(i=new D2,this.overlays[e.toKey()]=i),i}getMutationQueue(e,i){let r=this._i[e.toKey()];return r||(r=new O2(i,this.referenceDelegate),this._i[e.toKey()]=r),r}getGlobalsCache(){return this.ci}getTargetCache(){return this.li}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Pi}runTransaction(e,i,r){it("MemoryPersistence","Starting transaction:",e);const o=new L2(this.ai.next());return this.referenceDelegate.Ti(),r(o).next((h=>this.referenceDelegate.Ii(o).next((()=>h)))).toPromise().then((h=>(o.raiseOnCommittedEvent(),h)))}Ei(e,i){return Z.or(Object.values(this._i).map((r=>()=>r.containsKey(e,i))))}}class L2 extends uS{constructor(e){super(),this.currentSequenceNumber=e}}class Jd{constructor(e){this.persistence=e,this.Ri=new $d,this.Ai=null}static Vi(e){return new Jd(e)}get di(){if(this.Ai)return this.Ai;throw ft(60996)}addReference(e,i,r){return this.Ri.addReference(r,i),this.di.delete(r.toString()),Z.resolve()}removeReference(e,i,r){return this.Ri.removeReference(r,i),this.di.add(r.toString()),Z.resolve()}markPotentiallyOrphaned(e,i){return this.di.add(i.toString()),Z.resolve()}removeTarget(e,i){this.Ri.Gr(i.targetId).forEach((o=>this.di.add(o.toString())));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,i.targetId).next((o=>{o.forEach((h=>this.di.add(h.toString())))})).next((()=>r.removeTargetData(e,i)))}Ti(){this.Ai=new Set}Ii(e){const i=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Z.forEach(this.di,(r=>{const o=ut.fromPath(r);return this.mi(e,o).next((h=>{h||i.removeEntry(o,mt.min())}))})).next((()=>(this.Ai=null,i.apply(e))))}updateLimboDocument(e,i){return this.mi(e,i).next((r=>{r?this.di.delete(i.toString()):this.di.add(i.toString())}))}hi(e){return 0}mi(e,i){return Z.or([()=>Z.resolve(this.Ri.containsKey(i)),()=>this.persistence.getTargetCache().containsKey(e,i),()=>this.persistence.Ei(e,i)])}}class vc{constructor(e,i){this.persistence=e,this.fi=new Ns((r=>fS(r.path)),((r,o)=>r.isEqual(o))),this.garbageCollector=R2(this,i)}static Vi(e,i){return new vc(e,i)}Ti(){}Ii(e){return Z.resolve()}forEachTarget(e,i){return this.persistence.getTargetCache().forEachTarget(e,i)}dr(e){const i=this.pr(e);return this.persistence.getTargetCache().getTargetCount(e).next((r=>i.next((o=>r+o))))}pr(e){let i=0;return this.mr(e,(r=>{i++})).next((()=>i))}mr(e,i){return Z.forEach(this.fi,((r,o)=>this.wr(e,r,o).next((h=>h?Z.resolve():i(o)))))}removeTargets(e,i,r){return this.persistence.getTargetCache().removeTargets(e,i,r)}removeOrphanedDocuments(e,i){let r=0;const o=this.persistence.getRemoteDocumentCache(),h=o.newChangeBuffer();return o.ni(e,(d=>this.wr(e,d,i).next((y=>{y||(r++,h.removeEntry(d,mt.min()))})))).next((()=>h.apply(e))).next((()=>r))}markPotentiallyOrphaned(e,i){return this.fi.set(i,e.currentSequenceNumber),Z.resolve()}removeTarget(e,i){const r=i.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,i,r){return this.fi.set(r,e.currentSequenceNumber),Z.resolve()}removeReference(e,i,r){return this.fi.set(r,e.currentSequenceNumber),Z.resolve()}updateLimboDocument(e,i){return this.fi.set(i,e.currentSequenceNumber),Z.resolve()}hi(e){let i=e.key.toString().length;return e.isFoundDocument()&&(i+=ic(e.data.value)),i}wr(e,i,r){return Z.or([()=>this.persistence.Ei(e,i),()=>this.persistence.getTargetCache().containsKey(e,i),()=>{const o=this.fi.get(i);return Z.resolve(o!==void 0&&o>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/**
1634 * @license
1635 * Copyright 2017 Google LLC
1636 *
1637 * Licensed under the Apache License, Version 2.0 (the "License");
1638 * you may not use this file except in compliance with the License.
1639 * You may obtain a copy of the License at
1640 *
1641 *   http://www.apache.org/licenses/LICENSE-2.0
1642 *
1643 * Unless required by applicable law or agreed to in writing, software
1644 * distributed under the License is distributed on an "AS IS" BASIS,
1645 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1646 * See the License for the specific language governing permissions and
1647 * limitations under the License.
1648 */class Wd{constructor(e,i,r,o){this.targetId=e,this.fromCache=i,this.Ts=r,this.Is=o}static Es(e,i){let r=Nt(),o=Nt();for(const h of i.docChanges)switch(h.type){case 0:r=r.add(h.doc.key);break;case 1:o=o.add(h.doc.key)}return new Wd(e,i.fromCache,r,o)}}/**
1649 * @license
1650 * Copyright 2023 Google LLC
1651 *
1652 * Licensed under the Apache License, Version 2.0 (the "License");
1653 * you may not use this file except in compliance with the License.
1654 * You may obtain a copy of the License at
1655 *
1656 *   http://www.apache.org/licenses/LICENSE-2.0
1657 *
1658 * Unless required by applicable law or agreed to in writing, software
1659 * distributed under the License is distributed on an "AS IS" BASIS,
1660 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1661 * See the License for the specific language governing permissions and
1662 * limitations under the License.
1663 */class U2{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/**
1664 * @license
1665 * Copyright 2019 Google LLC
1666 *
1667 * Licensed under the Apache License, Version 2.0 (the "License");
1668 * you may not use this file except in compliance with the License.
1669 * You may obtain a copy of the License at
1670 *
1671 *   http://www.apache.org/licenses/LICENSE-2.0
1672 *
1673 * Unless required by applicable law or agreed to in writing, software
1674 * distributed under the License is distributed on an "AS IS" BASIS,
1675 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1676 * See the License for the specific language governing permissions and
1677 * limitations under the License.
1678 */class P2{constructor(){this.Rs=!1,this.As=!1,this.Vs=100,this.ds=(function(){return Cb()?8:cS(Sb())>0?6:4})()}initialize(e,i){this.fs=e,this.indexManager=i,this.Rs=!0}getDocumentsMatchingQuery(e,i,r,o){const h={result:null};return this.gs(e,i).next((d=>{h.result=d})).next((()=>{if(!h.result)return this.ps(e,i,o,r).next((d=>{h.result=d}))})).next((()=>{if(h.result)return;const d=new U2;return this.ys(e,i,d).next((y=>{if(h.result=y,this.As)return this.ws(e,i,d,y.size)}))})).next((()=>h.result))}ws(e,i,r,o){return r.documentReadCount<this.Vs?(br()<=Ot.DEBUG&&it("QueryEngine","SDK will not create cache indexes for query:",Ar(i),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),Z.resolve()):(br()<=Ot.DEBUG&&it("QueryEngine","Query:",Ar(i),"scans",r.documentReadCount,"local documents and returns",o,"documents as results."),r.documentReadCount>this.ds*o?(br()<=Ot.DEBUG&&it("QueryEngine","The SDK decides to create cache indexes for query:",Ar(i),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Ti(i))):Z.resolve())}gs(e,i){if(V_(i))return Z.resolve(null);let r=Ti(i);return this.indexManager.getIndexType(e,r).next((o=>o===0?null:(i.limit!==null&&o===1&&(i=vd(i,null,"F"),r=Ti(i)),this.indexManager.getDocumentsMatchingTarget(e,r).next((h=>{const d=Nt(...h);return this.fs.getDocuments(e,d).next((y=>this.indexManager.getMinOffset(e,r).next((v=>{const p=this.bs(i,y);return this.Ss(i,p,d,v.readTime)?this.gs(e,vd(i,null,"F")):this.Ds(e,p,i,v)}))))})))))}ps(e,i,r,o){return V_(i)||o.isEqual(mt.min())?Z.resolve(null):this.fs.getDocuments(e,r).next((h=>{const d=this.bs(i,h);return this.Ss(i,d,r,o)?Z.resolve(null):(br()<=Ot.DEBUG&&it("QueryEngine","Re-using previous result from %s to execute query: %s",o.toString(),Ar(i)),this.Ds(e,d,i,sS(o,ro)).next((y=>y)))}))}bs(e,i){let r=new De(mv(e));return i.forEach(((o,h)=>{Dc(e,h)&&(r=r.add(h))})),r}Ss(e,i,r,o){if(e.limit===null)return!1;if(r.size!==i.size)return!0;const h=e.limitType==="F"?i.last():i.first();return!!h&&(h.hasPendingWrites||h.version.compareTo(o)>0)}ys(e,i,r){return br()<=Ot.DEBUG&&it("QueryEngine","Using full collection scan to execute query:",Ar(i)),this.fs.getDocumentsMatchingQuery(e,i,ja.min(),r)}Ds(e,i,r,o){return this.fs.getDocumentsMatchingQuery(e,r,o).next((h=>(i.forEach((d=>{h=h.insert(d.key,d)})),h)))}}/**
1679 * @license
1680 * Copyright 2020 Google LLC
1681 *
1682 * Licensed under the Apache License, Version 2.0 (the "License");
1683 * you may not use this file except in compliance with the License.
1684 * You may obtain a copy of the License at
1685 *
1686 *   http://www.apache.org/licenses/LICENSE-2.0
1687 *
1688 * Unless required by applicable law or agreed to in writing, software
1689 * distributed under the License is distributed on an "AS IS" BASIS,
1690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1691 * See the License for the specific language governing permissions and
1692 * limitations under the License.
1693 */const tm="LocalStore",B2=3e8;class k2{constructor(e,i,r,o){this.persistence=e,this.Cs=i,this.serializer=o,this.vs=new re(xt),this.Fs=new Ns((h=>Fd(h)),Qd),this.Ms=new Map,this.xs=e.getRemoteDocumentCache(),this.li=e.getTargetCache(),this.Pi=e.getBundleCache(),this.Os(r)}Os(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new N2(this.xs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.xs.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(i=>e.collect(i,this.vs)))}}function q2(s,e,i,r){return new k2(s,e,i,r)}async function Pv(s,e){const i=pt(s);return await i.persistence.runTransaction("Handle user change","readonly",(r=>{let o;
1693return i.mutationQueue.getAllMutationBatches(r).next((h=>(o=h,i.Os(e),i.mutationQueue.getAllMutationBatches(r)))).next((h=>{const d=[],y=[];let v=Nt();for(const p of o){d.push(p.batchId);for(const b of p.mutations)v=v.add(b.key)}for(const p of h){y.push(p.batchId);for(const b of p.mutations)v=v.add(b.key)}return i.localDocuments.getDocuments(r,v).next((p=>({Ns:p,removedBatchIds:d,addedBatchIds:y})))}))}))}function H2(s,e){const i=pt(s);return i.persistence.runTransaction("Acknowledge batch","readwrite-primary",(r=>{const o=e.batch.keys(),h=i.xs.newChangeBuffer({trackRemovals:!0});return(function(y,v,p,b){const A=p.batch,O=A.keys();let Q=Z.resolve();return O.forEach((J=>{Q=Q.next((()=>b.getEntry(v,J))).next((et=>{const nt=p.docVersions.get(J);Bt(nt!==null,48541),et.version.compareTo(nt)<0&&(A.applyToRemoteDocument(et,p),et.isValidDocument()&&(et.setReadTime(p.commitVersion),b.addEntry(et)))}))})),Q.next((()=>y.mutationQueue.removeMutationBatch(v,A)))})(i,r,e,h).next((()=>h.apply(r))).next((()=>i.mutationQueue.performConsistencyCheck(r))).next((()=>i.documentOverlayCache.removeOverlaysForBatchId(r,o,e.batch.batchId))).next((()=>i.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,(function(y){let v=Nt();for(let p=0;p<y.mutationResults.length;++p)y.mutationResults[p].transformResults.length>0&&(v=v.add(y.batch.mutations[p].key));return v})(e)))).next((()=>i.localDocuments.getDocuments(r,o)))}))}function Bv(s){const e=pt(s);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(i=>e.li.getLastRemoteSnapshotVersion(i)))}function G2(s,e){const i=pt(s),r=e.snapshotVersion;let o=i.vs;return i.persistence.runTransaction("Apply remote event","readwrite-primary",(h=>{const d=i.xs.newChangeBuffer({trackRemovals:!0});o=i.vs;const y=[];
1693e.targetChanges.forEach(((b,A)=>{const O=o.get(A);if(!O)return;y.push(i.li.removeMatchingKeys(h,b.removedDocuments,A).next((()=>i.li.addMatchingKeys(h,b.addedDocuments,A))));let Q=O.withSequenceNumber(h.currentSequenceNumber);e.targetMismatches.get(A)!==null?Q=Q.withResumeToken(Qe.EMPTY_BYTE_STRING,mt.min()).withLastLimboFreeSnapshotVersion(mt.min()):b.resumeToken.approximateByteSize()>0&&(Q=Q.withResumeToken(b.resumeToken,r)),o=o.insert(A,Q),(function(et,nt,yt){return et.resumeToken.approximateByteSize()===0||nt.snapshotVersion.toMicroseconds()-et.snapshotVersion.toMicroseconds()>=B2?!0:yt.addedDocuments.size+yt.modifiedDocuments.size+yt.removedDocuments.size>0})(O,Q,b)&&y.push(i.li.updateTargetData(h,Q))}));let v=Xi(),p=Nt();if(e.documentUpdates.forEach((b=>{e.resolvedLimboDocuments.has(b)&&y.push(i.persistence.referenceDelegate.updateLimboDocument(h,b))})),y.push(F2(h,d,e.documentUpdates).next((b=>{v=b.Bs,p=b.Ls}))),!r.isEqual(mt.min())){const b=i.li.getLastRemoteSnapshotVersion(h).next((A=>i.li.setTargetsMetadata(h,h.currentSequenceNumber,r)));y.push(b)}return Z.waitFor(y).next((()=>d.apply(h))).next((()=>i.localDocuments.getLocalViewOfDocuments(h,v,p))).next((()=>v))})).then((h=>(i.vs=o,h)))}function F2(s,e,i){let r=Nt(),o=Nt();return i.forEach((h=>r=r.add(h))),e.getEntries(s,r).next((h=>{let d=Xi();return i.forEach(((y,v)=>{const p=h.get(y);v.isFoundDocument()!==p.isFoundDocument()&&(o=o.add(y)),v.isNoDocument()&&v.version.isEqual(mt.min())?(e.removeEntry(y,v.readTime),d=d.insert(y,v)):!p.isValidDocument()||v.version.compareTo(p.version)>0||v.version.compareTo(p.version)===0&&p.hasPendingWrites?(e.addEntry(v),d=d.insert(y,v)):it(tm,"Ignoring outdated watch update for ",y,". Current version:",p.version," Watch version:",v.version)})),{Bs:d,Ls:o}}))}function Q2(s,e){const i=pt(s);return i.persistence.runTransaction("Get next mutation batch","readonly",(r=>(e===void 0&&(e=qd),i.mutationQueue.getNextMutationBatchAfterBatchId(r,e))))}function Y2(s,e){const i=pt(s);return i.persistence.runTransaction("Allocate target","readwrite",(r=>{let o;return i.li.getTargetData(r,e).next((h=>h?(o=h,Z.resolve(o)):i.li.allocateTargetId(r).next((d=>(o=new Na(e,d,"TargetPurposeListen",r.currentSequenceNumber),i.li.addTargetData(r,o).next((()=>o)))))))})).then((r=>{const o=i.vs.get(r.targetId);return(o===null||r.snapshotVersion.compareTo(o.snapshotVersion)>0)&&(i.vs=i.vs.insert(r.targetId,r),i.Fs.set(e,r.targetId)),r}))}async function Sd(s,e,i){const r=pt(s),o=r.vs.get(e),h=i?"readwrite":"readwrite-primary";try{i||await r.persistence.runTransaction("Release target",h,(d=>r.persistence.referenceDelegate.removeTarget(d,o)))}catch(d){if(!Ur(d))throw d;it(tm,`Failed to update sequence numbers for target ${e}: ${d}`)}r.vs=r.vs.remove(e),r.Fs.delete(o.target)}function F_(s,e,i){const r=pt(s);let o=mt.min(),h=Nt();return r.persistence.runTransaction("Execute query","readwrite",(d=>(function(v,p,b){const A=pt(v),O=A.Fs.get(b);return O!==void 0?Z.resolve(A.vs.get(O)):A.li.getTargetData(p,b)})(r,d,Ti(e)).next((y=>{if(y)return o=y.lastLimboFreeSnapshotVersion,r.li.getMatchingKeysForTargetId(d,y.targetId).next((v=>{h=v}))})).next((()=>r.Cs.getDocumentsMatchingQuery(d,e,i?o:mt.min(),i?h:Nt()))).next((y=>(K2(r,OS(e),y),{documents:y,ks:h})))))}function K2(s,e,i){let r=s.Ms.get(e)||mt.min();i.forEach(((o,h)=>{h.readTime.compareTo(r)>0&&(r=h.readTime)})),s.Ms.set(e,r)}class Q_{constructor(){this.activeTargetIds=PS()}Qs(e){this.activeTargetIds=this.activeTargetIds.add(e)}Gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ws(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class X2{constructor(){this.vo=new Q_,this.Fo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,i,r){}addLocalQueryTarget(e,i=!0){return i&&this.vo.Qs(e),this.Fo[e]||"not-current"}updateQueryState(e,i,r){this.Fo[e]=i}removeLocalQueryTarget(e){this.vo.Gs(e)}isLocalQueryTarget(e){return this.vo.activeTargetIds.has(e)}clearQueryState(e){delete this.Fo[e]}getAllActiveQueryTargets(){return this.vo.activeTargetIds}isActiveQueryTarget(e){return this.vo.activeTargetIds.has(e)}start(){return this.vo=new Q_,Promise.resolve()}handleUserChange(e,i,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
1694 * @license
1695 * Copyright 2019 Google LLC
1696 *
1697 * Licensed under the Apache License, Version 2.0 (the "License");
1698 * you may not use this file except in compliance with the License.
1699 * You may obtain a copy of the License at
1700 *
1701 *   http://www.apache.org/licenses/LICENSE-2.0
1702 *
1703 * Unless required by applicable law or agreed to in writing, software
1704 * distributed under the License is distributed on an "AS IS" BASIS,
1705 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1706 * See the License for the specific language governing permissions and
1707 * limitations under the License.
1708 */class Z2{Mo(e){}shutdown(){}}/**
1709 * @license
1710 * Copyright 2019 Google LLC
1711 *
1712 * Licensed under the Apache License, Version 2.0 (the "License");
1713 * you may not use this file except in compliance with the License.
1714 * You may obtain a copy of the License at
1715 *
1716 *   http://www.apache.org/licenses/LICENSE-2.0
1717 *
1718 * Unless required by applicable law or agreed to in writing, software
1719 * distributed under the License is distributed on an "AS IS" BASIS,
1720 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1721 * See the License for the specific language governing permissions and
1722 * limitations under the License.
1723 */const Y_="ConnectivityMonitor";class K_{constructor(){this.xo=()=>this.Oo(),this.No=()=>this.Bo(),this.Lo=[],this.ko()}Mo(e){this.Lo.push(e)}shutdown(){window.removeEventListener("online",this.xo),window.removeEventListener("offline",this.No)}ko(){window.addEventListener("online",this.xo),window.addEventListener("offline",this.No)}Oo(){it(Y_,"Network connectivity changed: AVAILABLE");for(const e of this.Lo)e(0)}Bo(){it(Y_,"Network connectivity changed: UNAVAILABLE");for(const e of this.Lo)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
1724 * @license
1725 * Copyright 2023 Google LLC
1726 *
1727 * Licensed under the Apache License, Version 2.0 (the "License");
1728 * you may not use this file except in compliance with the License.
1729 * You may obtain a copy of the License at
1730 *
1731 *   http://www.apache.org/licenses/LICENSE-2.0
1732 *
1733 * Unless required by applicable law or agreed to in writing, software
1734 * distributed under the License is distributed on an "AS IS" BASIS,
1735 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1736 * See the License for the specific language governing permissions and
1737 * limitations under the License.
1738 */let Wu=null;function wd(){return Wu===null?Wu=(function(){return 268435456+Math.round(2147483648*Math.random())})():Wu++,"0x"+Wu.toString(16)}/**
1739 * @license
1740 * Copyright 2020 Google LLC
1741 *
1742 * Licensed under the Apache License, Version 2.0 (the "License");
1743 * you may not use this file except in compliance with the License.
1744 * You may obtain a copy of the License at
1745 *
1746 *   http://www.apache.org/licenses/LICENSE-2.0
1747 *
1748 * Unless required by applicable law or agreed to in writing, software
1749 * distributed under the License is distributed on an "AS IS" BASIS,
1750 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1751 * See the License for the specific language governing permissions and
1752 * limitations under the License.
1753 */const td="RestConnection",$2={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery",ExecutePipeline:"executePipeline"};class J2{get Ko(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const i=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),o=encodeURIComponent(this.databaseId.database);this.qo=i+"://"+e.host,this.Uo=`projects/${r}/databases/${o}`,this.$o=this.databaseId.database===fc?`project_id=${r}`:`project_id=${r}&database_id=${o}`}Wo(e,i,r,o,h){const d=wd(),y=this.Qo(e,i.toUriEncodedString());it(td,`Sending RPC '${e}' ${d}:`,y,r);const v={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.$o};this.Go(v,o,h);const{host:p}=new URL(y),b=Ld(p);return this.zo(e,y,v,r,b).then((A=>(it(td,`Received RPC '${e}' ${d}: `,A),A)),(A=>{throw Ss(td,`RPC '${e}' ${d} failed with error: `,A,"url: ",y,"request:",r),A}))}jo(e,i,r,o,h,d){return this.Wo(e,i,r,o,h)}Go(e,i,r){e["X-Goog-Api-Client"]=(function(){return"gl-js/ fire/"+jr})(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),i&&i.headers.forEac
vendor: 4,587 bytes, lines 1753-1783
1753h(((o,h)=>e[h]=o)),r&&r.headers.forEach(((o,h)=>e[h]=o))}Qo(e,i){const r=$2[e];let o=`${this.qo}/v1/${i}:${r}`;return this.databaseInfo.apiKey&&(o=`${o}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),o}terminate(){}}/**
1754 * @license
1755 * Copyright 2017 Google LLC
1756 *
1757 * Licensed under the Apache License, Version 2.0 (the "License");
1758 * you may not use this file except in compliance with the License.
1759 * You may obtain a copy of the License at
1760 *
1761 *   http://www.apache.org/licenses/LICENSE-2.0
1762 *
1763 * Unless required by applicable law or agreed to in writing, software
1764 * distributed under the License is distributed on an "AS IS" BASIS,
1765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1766 * See the License for the specific language governing permissions and
1767 * limitations under the License.
1768 */class W2{constructor(e){this.Ho=e.Ho,this.Jo=e.Jo}Zo(e){this.Xo=e}Yo(e){this.e_=e}t_(e){this.n_=e}onMessage(e){this.r_=e}close(){this.Jo()}send(e){this.Ho(e)}i_(){this.Xo()}s_(){this.e_()}o_(e){this.n_(e)}__(e){this.r_(e)}}/**
1769 * @license
1770 * Copyright 2017 Google LLC
1771 *
1772 * Licensed under the Apache License, Version 2.0 (the "License");
1773 * you may not use this file except in compliance with the License.
1774 * You may obtain a copy of the License at
1775 *
1776 *   http://www.apache.org/licenses/LICENSE-2.0
1777 *
1778 * Unless required by applicable law or agreed to in writing, software
1779 * distributed under the License is distributed on an "AS IS" BASIS,
1780 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1781 * See the License for the specific language governing permissions and
1782 * limitations under the License.
1783 */const Ke="WebChannelConnection",Yl=(s,e,i)=>{s.listen(e,(r=>{try{i(r)}catch(o){setTimeout((()=>{throw o}),0)}}))};class Rr extends J2{constructor(e){super(e),this.a_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static u_(){if(!Rr.c_){const e=H0();Yl(e,q0.STAT_EVENT,(i=>{i.stat===fd.PROXY?it(Ke,"STAT_EVENT: detected buffering proxy"):i.stat===fd.NOPROXY&&it(Ke,"STAT_EVENT: detected no buffering proxy")})),Rr.c_=!0}}zo(e,i,r,o,h){const d=wd();return new Promise(((y,v)=>{const p=new B0;p.setWithCredentials(!0),p.listenOnce(k0.COMPLETE,(()=>{try{switch(p.getLastErrorCode()){case nc.NO_ERROR:const A=p.getResponseJson();it(Ke,`XHR for RPC '${e}' ${d} received:`,JSON.stringify(A)),y(A);break;case nc.TIMEOUT:it(Ke,`RPC '${e}' ${d} timed out`),v(new at(X.DEADLINE_EXCEEDED,"Request time out"));break;case nc.HTTP_ERROR:const O=p.getStatus();if(it(Ke,`RPC '${e}' ${d} failed with status:`,O,"response text:",p.getResponseText()),O>0){let Q=p.getResponseJson();Array.isArray(Q)&&(Q=Q[0]);const J=Q==null?void 0:Q.error;if(J&&J.status&&J.message){const et=(function(yt){const Tt=yt.toLowerCase().replace(/_/g,"-");return Object.values(X).indexOf(Tt)>=0?Tt:X.UNKNOWN})(J.status);v(new at(et,J.message))}else v(new at(X.UNKNOWN,"Server responded with status "+p.getStatus()))}else v(new at(X.UNAVAILABLE,"Connection failed."));break;default:ft(9055,{l_:e,streamId:d,h_:p.getLastErrorCode(),P_:p.getLastError()})}}finally{it(Ke,`RPC '${e}' ${d} completed.`)}}));const b=JSON.stringify(o);it(Ke,`RPC '${e}' ${d} sending request:`,o),p.send(i,"POST",b,r,15)}))}T_(e,i,r){const o=wd(),h=[this.qo,"/","google.firestore.v1.Firestore","/",e,"/channel"],d=this.createWebChannelTransport(),y={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},v=this.longPollingOptions.timeoutSeconds;v!==void 0&&(y.longPollingTimeout=Math.round(1e3*v)),this.useFetchStreams&&(y.useFetchStreams=!0),this.Go(y.initMessageHeaders,i,r),y.encodeInitMessageHeaders=!0;const p=h.join("");it(Ke,`Creating RPC '${e}' stream ${o}: ${p}`,y);const b=d.createWebChannel(p,y);this.I_(b);let A=!1,O=!1;const Q=new W2({Ho:J=>{O?it(Ke,`Not sending because RPC '${e}' stream ${o} is closed:`,J):(A||(it(Ke,`Opening RPC '${e}' stream ${o} transport.`),b.open(),A=!0),it(Ke,`RPC '${e}' stream ${o} sending:`,J),b.send(J))},Jo:()=>b.close()});return Yl(b,Kl.EventType.OPEN,(()=>{O||(it(Ke,`RPC '${e}' stream ${o} transport opened.`),Q.i_())})),Yl(b,Kl.EventType.CLOSE,(()=>{O||(O=!0,it(Ke,`RPC '${e}' stream ${o} transport closed`),Q.o_(),this.E_(b))}
1783)),Yl(b,Kl.EventType.ERROR,(J=>{O||(O=!0,Ss(Ke,`RPC '${e}' stream ${o} transport errored. Name:`,J.name,"Message:",J.message),Q.o_(new at(X.UNAVAILABLE,"The operation could not be completed")))})),Yl(b,Kl.EventType.MESSAGE,(J=>{var et;if(!O){const nt=J.data[0];Bt(!!nt,16349);const yt=nt,Tt=(yt==null?void 0:yt.error)||((et=yt[0])==null?void 0:et.error);if(Tt){it(Ke,`RPC '${e}' stream ${o} received error:`,Tt);const _t=Tt.status;let Xt=(function(N){const S=Se[N];if(S!==void 0)return Rv(S)})(_t),Zt=Tt.message;_t==="NOT_FOUND"&&Zt.includes("database")&&Zt.includes("does not exist")&&Zt.includes(this.databaseId.database)&&Ss(`Database '${this.databaseId.database}' not found. Please check your project configuration.`),Xt===void 0&&(Xt=X.INTERNAL,Zt="Unknown error status: "+_t+" with message "+Tt.message),O=!0,Q.o_(new at(Xt,Zt)),b.close()}else it(Ke,`RPC '${e}' stream ${o} received:`,nt),Q.__(nt)}})),Rr.u_(),setTimeout((()=>{Q.s_()}),0),Q}terminate(){this.a_.forEach((e=>e.close())),this.a_=[]}I_(e){this.a_.push(e)}E_(e){this.a_=this.a_.filter((i=>i===e))}Go(e,i,r){super.Go(e,i,r),this.databaseInfo.apiKey&&(e["x-goog-api-key"]=this.databaseInfo.apiKey)}createWebChannelTransport(){return G0()}}/**
1784 * @license
1785 * Copyright 2020 Google LLC
1786 *
1787 * Licensed under the Apache License, Version 2.0 (the "License");
1788 * you may not use this file except in compliance with the License.
1789 * You may obtain a copy of the License at
1790 *
1791 *   http://www.apache.org/licenses/LICENSE-2.0
1792 *
1793 * Unless required by applicable law or agreed to in writing, software
1794 * distributed under the License is distributed on an "AS IS" BASIS,
1795 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1796 * See the License for the specific language governing permissions and
1797 * limitations under the License.
1798 */function tw(s){return new Rr(s)}function ed(){return typeof document<"u"?document:null}/**
1799 * @license
1800 * Copyright 2020 Google LLC
1801 *
1802 * Licensed under the Apache License, Version 2.0 (the "License");
1803 * you may not use this file except in compliance with the License.
1804 * You may obtain a copy of the License at
1805 *
1806 *   http://www.apache.org/licenses/LICENSE-2.0
1807 *
1808 * Unless required by applicable law or agreed to in writing, software
1809 * distributed under the License is distributed on an "AS IS" BASIS,
1810 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1811 * See the License for the specific language governing permissions and
1812 * limitations under the License.
1813 */function zc(s){return new a2(s,!0)}/**
1814 * @license
1815 * Copyright 2017 Google LLC
1816 *
1817 * Licensed under the Apache License, Version 2.0 (the "License");
1818 * you may not use this file except in compliance with the License.
1819 * You may obtain a copy of the License at
1820 *
1821 *   http://www.apache.org/licenses/LICENSE-2.0
1822 *
1823 * Unless required by applicable law or agreed to in writing, software
1824 * distributed under the License is distributed on an "AS IS" BASIS,
1825 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1826 * See the License for the specific language governing permissions and
1827 * limitations under the License.
1828 */Rr.c_=!1;class kv{constructor(e,i,r=1e3,o=1.5,h=6e4){this.Ci=e,this.timerId=i,this.R_=r,this.A_=o,this.V_=h,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(e){this.cancel();const i=Math.floor(this.d_+this.y_()),r=Math.max(0,Date.now()-this.f_),o=Math.max(0,i-r);o>0&&it("ExponentialBackoff",`Backing off for ${o} ms (base delay: ${this.d_} ms, delay with jitter: ${i} ms, last attempt: ${r} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,o,(()=>(this.f_=Date.now(),e()))),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}/**
1829 * @license
1830 * Copyright 2017 Google LLC
1831 *
1832 * Licensed under the Apache License, Version 2.0 (the "License");
1833 * you may not use this file except in compliance with the License.
1834 * You may obtain a copy of the License at
1835 *
1836 *   http://www.apache.org/licenses/LICENSE-2.0
1837 *
1838 * Unless required by applicable law or agreed to in writing, softw
1838are
1839 * distributed under the License is distributed on an "AS IS" BASIS,
1840 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1841 * See the License for the specific language governing permissions and
1842 * limitations under the License.
1843 */const X_="PersistentStream";class qv{constructor(e,i,r,o,h,d,y,v){this.Ci=e,this.b_=r,this.S_=o,this.connection=h,this.authCredentialsProvider=d,this.appCheckCredentialsProvider=y,this.listener=v,this.state=0,this.D_=0,this.C_=null,this.v_=null,this.stream=null,this.F_=0,this.M_=new kv(e,i)}x_(){return this.state===1||this.state===5||this.O_()}O_(){return this.state===2||this.state===3}start(){this.F_=0,this.state!==4?this.auth():this.N_()}async stop(){this.x_()&&await this.close(0)}B_(){this.state=0,this.M_.reset()}L_(){this.O_()&&this.C_===null&&(this.C_=this.Ci.enqueueAfterDelay(this.b_,6e4,(()=>this.k_())))}K_(e){this.q_(),this.stream.send(e)}async k_(){if(this.O_())return this.close(0)}q_(){this.C_&&(this.C_.cancel(),this.C_=null)}U_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,i){this.q_(),this.U_(),this.M_.cancel(),this.D_++,e!==4?this.M_.reset():i&&i.code===X.RESOURCE_EXHAUSTED?(Ki(i.toString()),Ki("Using maximum backoff delay to prevent overloading the backend."),this.M_.g_()):i&&i.code===X.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.W_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.t_(i)}W_(){}auth(){this.state=1;const e=this.Q_(this.D_),i=this.D_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([r,o])=>{this.D_===i&&this.G_(r,o)}),(r=>{e((()=>{const o=new at(X.UNKNOWN,"Fetching auth token failed: "+r.message);return this.z_(o)}))}))}G_(e,i){const r=this.Q_(this.D_);this.stream=this.j_(e,i),this.stream.Zo((()=>{r((()=>this.listener.Zo()))})),this.stream.Yo((()=>{r((()=>(this.state=2,this.v_=this.Ci.enqueueAfterDelay(this.S_,1e4,(()=>(this.O_()&&(this.state=3),Promise.resolve()))),this.listener.Yo())))})),this.stream.t_((o=>{r((()=>this.z_(o)))})),this.stream.onMessage((o=>{r((()=>++this.F_==1?this.H_(o):this.onNext(o)))}))}N_(){this.state=5,this.M_.p_((async()=>{this.state=0,this.start()}))}z_(e){return it(X_,`close with error: ${e}`),this.stream=null,this.close(4,e)}Q_(e){return i=>{this.Ci.enqueueAndForget((()=>this.D_===e?i():(it(X_,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class ew extends qv{constructor(e,i,r,o,h,d){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",i,r,o,d),this.serializer=h}j_(e,i){return this.connection.T_("Listen",e,i)}H_(e){return this.onNext(e)}onNext(e){this.M_.reset();const i=l2(this.serializer,e),r=(function(h){if(!("targetChange"in h))return mt.min();const d=h.targetChange;return d.targetIds&&d.targetIds.length?mt.min():d.readTime?bi(d.readTime):mt.min()})(e);return this.listener.J_(i,r)}Z_(e){const i={};i.database=Ad(this.serializer),i.addTarget=(function(h,d){let y;const v=d.target;if(y=yd(v)?{documents:c2(h,v)}:{query:h2(h,v).ft},y.targetId=d.targetId,d.resumeToken.approximateByteSize()>0){y.resumeToken=Nv(h,d.resumeToken);const p=Ed(h,d.expectedCount);p!==null&&(y.expectedCount=p)}else if(d.snapshotVersion.compareTo(mt.min())>0){y.readTime=_c(h,d.snapshotVersion.toTimestamp());const p=Ed(h,d.expectedCount);p!==null&&(y.expectedCount=p)}return y})(this.serializer,e);const r=d2(this.serializer,e);r&&(i.labels=r),this.K_(i)}X_(e){const i={};i.database=Ad(this.serializer),i.removeTarget=e,this.K_(i)}}class nw extends qv{constructor(e,i,r,o,h,d){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",i,r,o,d),this.serializer=h}get Y_(){return this.F_>0}start(){this.lastStreamToken=void 0,super.start()}W_(){this.Y_&&this.ea([])}j_(e,i){return this.connection.T_("Write",e,i)}H_(e){return Bt(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,Bt(!e.writeResults||e.writeResults.length===0,55816),this.listener.ta()}onNext(e){Bt(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.M_.reset();const i=u2(e.writeResults,e.commitTime),r=bi(e.commitTime);
1843return this.listener.na(r,i)}ra(){const e={};e.database=Ad(this.serializer),this.K_(e)}ea(e){const i={streamToken:this.lastStreamToken,writes:e.map((r=>o2(this.serializer,r)))};this.K_(i)}}/**
1844 * @license
1845 * Copyright 2017 Google LLC
1846 *
1847 * Licensed under the Apache License, Version 2.0 (the "License");
1848 * you may not use this file except in compliance with the License.
1849 * You may obtain a copy of the License at
1850 *
1851 *   http://www.apache.org/licenses/LICENSE-2.0
1852 *
1853 * Unless required by applicable law or agreed to in writing, software
1854 * distributed under the License is distributed on an "AS IS" BASIS,
1855 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1856 * See the License for the specific language governing permissions and
1857 * limitations under the License.
1858 */class iw{}class aw extends iw{constructor(e,i,r,o){super(),this.authCredentials=e,this.appCheckCredentials=i,this.connection=r,this.serializer=o,this.ia=!1}sa(){if(this.ia)throw new at(X.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(e,i,r,o){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([h,d])=>this.connection.Wo(e,Td(i,r),o,h,d))).catch((h=>{throw h.name==="FirebaseError"?(h.code===X.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),h):new at(X.UNKNOWN,h.toString())}))}jo(e,i,r,o,h){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([d,y])=>this.connection.jo(e,Td(i,r),o,d,y,h))).catch((d=>{throw d.name==="FirebaseError"?(d.code===X.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),d):new at(X.UNKNOWN,d.toString())}))}terminate(){this.ia=!0,this.connection.terminate()}}function sw(s,e,i,r){return new aw(s,e,i,r)}class rw{constructor(e,i){this.asyncQueue=e,this.onlineStateHandler=i,this.state="Unknown",this.oa=0,this._a=null,this.aa=!0}ua(){this.oa===0&&(this.ca("Unknown"),this._a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this._a=null,this.la("Backend didn't respond within 10 seconds."),this.ca("Offline"),Promise.resolve()))))}ha(e){this.state==="Online"?this.ca("Unknown"):(this.oa++,this.oa>=1&&(this.Pa(),this.la(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ca("Offline")))}set(e){this.Pa(),this.oa=0,e==="Online"&&(this.aa=!1),this.ca(e)}ca(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}la(e){const i=`Could not reach Cloud Firestore backend. ${e}
1859This 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.aa?(Ki(i),this.aa=!1):it("OnlineStateTracker",i)}Pa(){this._a!==null&&(this._a.cancel(),this._a=null)}}/**
1860 * @license
1861 * Copyright 2017 Google LLC
1862 *
1863 * Licensed under the Apache License, Version 2.0 (the "License");
1864 * you may not use this file except in compliance with the License.
1865 * You may obtain a copy of the License at
1866 *
1867 *   http://www.apache.org/licenses/LICENSE-2.0
1868 *
1869 * Unless required by applicable law or agreed to in writing, software
1870 * distributed under the License is distributed on an "AS IS" BASIS,
1871 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1872 * See the License for the specific language governing permissions and
1873 * limitations under the License.
1874 */const ws="RemoteStore";class lw{constructor(e,i,r,o,h){this.localStore=e,this.datastore=i,this.asyncQueue=r,this.remoteSyncer={},this.Ta=[],this.Ia=new Map,this.Ea=new Set,this.Ra=[],this.Aa=h,this.Aa.Mo((d=>{r.enqueueAndForget((async()=>{Ds(this)&&(it(ws,"Restarting streams for network reachability change."),await(async function(v){const p=pt(v);p.Ea.add(4),await _o(p),p.Va.set("Unknown"),p.Ea.delete(4),await jc(p)})(this))}))})),this.Va=new rw(r,o)}}async function jc(s){if(Ds(s))for(const e of s.Ra)await e(!0)}async function _o(s){for(const e of s.Ra)await e(!1)}function Hv(s,e){const i=pt(s);i.Ia.has(e.targetId)||(i.Ia.set(e.targetId,e),am(i)?im(i):Pr(i).O_()&&nm(i,e))}function em(s,e){const i=pt(s),r=Pr(i);i.Ia.delete(e),r.O_()&&Gv(i,e),i.Ia.size===0&&(r.O_()?r.L_():Ds(i)&&i.Va.set("Unknown"))}function nm(s,e){if(s.da.$e(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(mt.min())>0){const i=s.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(i)}Pr(s).Z_(e)}function Gv(s,e){s.da.$e(e),Pr(s).X_(e)}function im(s){s.da=new t2({getRemoteKeysForTarget:e=>s.remoteSyncer.getRemoteKeysForTarget(e),At:e=>s.Ia.get(e)||null,ht:()=>s.datastore.serializer.databaseId}),Pr(s).start(),s.Va.ua()}function am(s){return Ds(s)&&!Pr(s).x_()&&s.Ia.size>0}function Ds(s){return pt(s).Ea.size===0}function Fv(s){s.da=void 0}async function ow(s){s.Va.set("Online")}
1874async function uw(s){s.Ia.forEach(((e,i)=>{nm(s,e)}))}async function cw(s,e){Fv(s),am(s)?(s.Va.ha(e),im(s)):s.Va.set("Unknown")}async function hw(s,e,i){if(s.Va.set("Online"),e instanceof xv&&e.state===2&&e.cause)try{await(async function(o,h){const d=h.cause;for(const y of h.targetIds)o.Ia.has(y)&&(await o.remoteSyncer.rejectListen(y,d),o.Ia.delete(y),o.da.removeTarget(y))})(s,e)}catch(r){it(ws,"Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Ec(s,r)}else if(e instanceof rc?s.da.Xe(e):e instanceof Cv?s.da.st(e):s.da.tt(e),!i.isEqual(mt.min()))try{const r=await Bv(s.localStore);i.compareTo(r)>=0&&await(function(h,d){const y=h.da.Tt(d);return y.targetChanges.forEach(((v,p)=>{if(v.resumeToken.approximateByteSize()>0){const b=h.Ia.get(p);b&&h.Ia.set(p,b.withResumeToken(v.resumeToken,d))}})),y.targetMismatches.forEach(((v,p)=>{const b=h.Ia.get(v);if(!b)return;h.Ia.set(v,b.withResumeToken(Qe.EMPTY_BYTE_STRING,b.snapshotVersion)),Gv(h,v);const A=new Na(b.target,v,p,b.sequenceNumber);nm(h,A)})),h.remoteSyncer.applyRemoteEvent(y)})(s,i)}catch(r){it(ws,"Failed to raise snapshot:",r),await Ec(s,r)}}async function Ec(s,e,i){if(!Ur(e))throw e;s.Ea.add(1),await _o(s),s.Va.set("Offline"),i||(i=()=>Bv(s.localStore)),s.asyncQueue.enqueueRetryable((async()=>{it(ws,"Retrying IndexedDB access"),await i(),s.Ea.delete(1),await jc(s)}))}function Qv(s,e){return e().catch((i=>Ec(s,i,e)))}async function Lc(s){const e=pt(s),i=Ba(e);let r=e.Ta.length>0?e.Ta[e.Ta.length-1].batchId:qd;for(;fw(e);)try{const o=await Q2(e.localStore,r);if(o===null){e.Ta.length===0&&i.L_();break}r=o.batchId,dw(e,o)}catch(o){await Ec(e,o)}Yv(e)&&Kv(e)}function fw(s){return Ds(s)&&s.Ta.length<10}function dw(s,e){s.Ta.push(e);const i=Ba(s);i.O_()&&i.Y_&&i.ea(e.mutations)}function Yv(s){return Ds(s)&&!Ba(s).x_()&&s.Ta.length>0}function Kv(s){Ba(s).start()}async function mw(s){Ba(s).ra()}async function gw(s){const e=Ba(s);for(const i of s.Ta)e.ea(i.mutations)}async function pw(s,e,i){const r=s.Ta.shift(),o=Kd.from(r,e,i);await Qv(s,(()=>s.remoteSyncer.applySuccessfulWrite(o))),await Lc(s)}async function yw(s,e){e&&Ba(s).Y_&&await(async function(r,o){if((function(d){return $S(d)&&d!==X.ABORTED})(o.code)){const h=r.Ta.shift();Ba(r).B_(),await Qv(r,(()=>r.remoteSyncer.rejectFailedWrite(h.batchId,o))),await Lc(r)}})(s,e),Yv(s)&&Kv(s)}async function Z_(s,e){const i=pt(s);i.asyncQueue.verifyOperationInProgress(),it(ws,"RemoteStore received new credentials");const r=Ds(i);i.Ea.add(3),await _o(i),r&&i.Va.set("Unknown"),await i.remoteSyncer.handleCredentialChange(e),i.Ea.delete(3),await jc(i)}async function _w(s,e){const i=pt(s);e?(i.Ea.delete(2),await jc(i)):e||(i.Ea.add(2),await _o(i),i.Va.set("Unknown"))}function Pr(s){return s.ma||(s.ma=(function(i,r,o){const h=pt(i);return h.sa(),new ew(r,h.connection,h.authCredentials,h.appCheckCredentials,h.serializer,o)})(s.datastore,s.asyncQueue,{Zo:ow.bind(null,s),Yo:uw.bind(null,s),t_:cw.bind(null,s),J_:hw.bind(null,s)}),s.Ra.push((async e=>{e?(s.ma.B_(),am(s)?im(s):s.Va.set("Unknown")):(await s.ma.stop(),Fv(s))}))),s.ma}function Ba(s){return s.fa||(s.fa=(function(i,r,o){const h=pt(i);return h.sa(),new nw(r,h.connection,h.authCredentials,h.appCheckCredentials,h.serializer,o)})(s.datastore,s.asyncQueue,{Zo:()=>Promise.resolve(),Yo:mw.bind(null,s),t_:yw.bind(null,s),ta:gw.bind(null,s),na:pw.bind(null,s)}),s.Ra.push((async e=>{e?(s.fa.B_(),await Lc(s)):(await s.fa.stop(),s.Ta.length>0&&(it(ws,`Stopping write stream with ${s.Ta.length} pending writes`),s.Ta=[]))}))),s.fa}/**
1875 * @license
1876 * Copyright 2017 Google LLC
1877 *
1878 * Licensed under the Apache License, Version 2.0 (the "License");
1879 * you may not use this file except in compliance with the License.
1880 * You may obtain a copy of the License at
1881 *
1882 *   http://www.apache.org/licenses/LICENSE-2.0
1883 *
1884 * Unless required by applicable law or agreed to in writing, software
1885 * distributed under the License is distributed on an "AS IS" BASIS,
1886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1887 * See the License for the specific language governing permissions and
1888 * limitations under the License.
1889 */class sm{constructor(e,i,r,o,h){this.asyncQueue=e,this.timerId=i,this.targetTimeMs=r,this.op=o,this.removalCallback=h,this.deferred=new Oa,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((d=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,i,r,o,h){const d=Date.now()+r,y=new sm(e,i,d,o,h);return y.start(r),y}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new at(X.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((e=>
1889this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function rm(s,e){if(Ki("AsyncQueue",`${e}: ${s}`),Ur(s))return new at(X.UNAVAILABLE,`${e}: ${s}`);throw s}/**
1890 * @license
1891 * Copyright 2017 Google LLC
1892 *
1893 * Licensed under the Apache License, Version 2.0 (the "License");
1894 * you may not use this file except in compliance with the License.
1895 * You may obtain a copy of the License at
1896 *
1897 *   http://www.apache.org/licenses/LICENSE-2.0
1898 *
1899 * Unless required by applicable law or agreed to in writing, software
1900 * distributed under the License is distributed on an "AS IS" BASIS,
1901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1902 * See the License for the specific language governing permissions and
1903 * limitations under the License.
1904 */class Cr{static emptySet(e){return new Cr(e.comparator)}constructor(e){this.comparator=e?(i,r)=>e(i,r)||ut.comparator(i.key,r.key):(i,r)=>ut.comparator(i.key,r.key),this.keyedMap=Xl(),this.sortedSet=new re(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const i=this.keyedMap.get(e);return i?this.sortedSet.indexOf(i):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((i,r)=>(e(i),!1)))}add(e){const i=this.delete(e.key);return i.copy(i.keyedMap.insert(e.key,e),i.sortedSet.insert(e,null))}delete(e){const i=this.get(e);return i?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(i)):this}isEqual(e){if(!(e instanceof Cr)||this.size!==e.size)return!1;const i=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;i.hasNext();){const o=i.getNext().key,h=r.getNext().key;if(!o.isEqual(h))return!1}return!0}toString(){const e=[];return this.forEach((i=>{e.push(i.toString())})),e.length===0?"DocumentSet ()":`DocumentSet (
1905  `+e.join(`  
1906`)+`
1907)`}copy(e,i){const r=new Cr;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=i,r}}/**
1908 * @license
1909 * Copyright 2017 Google LLC
1910 *
1911 * Licensed under the Apache License, Version 2.0 (the "License");
1912 * you may not use this file except in compliance with the License.
1913 * You may obtain a copy of the License at
1914 *
1915 *   http://www.apache.org/licenses/LICENSE-2.0
1916 *
1917 * Unless required by applicable law or agreed to in writing, software
1918 * distributed under the License is distributed on an "AS IS" BASIS,
1919 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1920 * See the License for the specific language governing permissions and
1921 * limitations under the License.
1922 */class $_{constructor(){this.ga=new re(ut.comparator)}track(e){const i=e.doc.key,r=this.ga.get(i);r?e.type!==0&&r.type===3?this.ga=this.ga.insert(i,e):e.type===3&&r.type!==1?this.ga=this.ga.insert(i,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.ga=this.ga.insert(i,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.ga=this.ga.insert(i,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.ga=this.ga.remove(i):e.type===1&&r.type===2?this.ga=this.ga.insert(i,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.ga=this.ga.insert(i,{type:2,doc:e.doc}):ft(63341,{Vt:e,pa:r}):this.ga=this.ga.insert(i,e)}ya(){const e=[];return this.ga.inorderTraversal(((i,r)=>{e.push(r)})),e}}class zr{constructor(e,i,r,o,h,d,y,v,p){this.query=e,this.docs=i,this.oldDocs=r,this.docChanges=o,this.mutatedKeys=h,this.fromCache=d,this.syncStateChanged=y,this.excludesMetadataChanges=v,this.hasCachedResults=p}static fromInitialDocuments(e,i,r,o,h){const d=[];return i.forEach((y=>{d.push({type:0,doc:y})})),new zr(e,i,Cr.emptySet(i),d,r,o,!0,!1,h)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Ic(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const i=this.docChanges,r=e.docChanges;if(i.length!==r.length)return!1;for(let o=0;o<i.length;o++)if(i[o].type!==r[o].type||!i[o].doc.isEqual(r[o].doc))return!1;return!0}}/**
1923 * @license
1924 * Copyright 2017 Google LLC
1925 *
1926 * Licensed under the Apache License, Version 2.0 (the "License");
1927 * you may not use this file except in compliance with the License.
1928 * You may obtain a copy of the License at
1929 *
1930 *   http://www.apache.org/licenses/LICENSE-2.0
1931 *
1932 * Unless required by applicable law or agreed to in writing, software
1933 * distributed under the License is distributed on an "AS IS" BASIS,
1934 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1935 * See the License for the specific language governing permissions and
1936 * limitations under the License.
1937 */class vw{constructor(){this.wa=void 0,this.ba=[]}Sa(){return this.ba.some((e=>e.Da()))}}class Ew{constructor(){this.queries=J_(),this.onlineState="Unknown",this.Ca=new Set}terminate(){(function(i,r){const o=pt(i),h=o.queries;o.queries=J_(),h.forEach(((d,y)=>{for(const v of y.ba)v.onError(r)}))})(this,new at(X.ABORTED,"Firestore shutting down"))}}function J_(){return new Ns((s=>dv(s)),Ic)}async function Tw(s,e){const i=pt(s);let r=3;const o=e.query;let h=i.queries.get(o);h?!h.Sa()&&e.Da()&&(r=2):(h=new vw,r=e.Da()?0:1);try{switch(r){case 0:h.wa=await i.onListen(o,!0);break;case 1:h.wa=await i.onListen(o,!1);break;case 2:await i.onFirstRemoteStoreListen(o)}}catch(d){const y=rm(d,`Initialization of query '${Ar(e.query)}' failed`);return void e.onError(y)}i.queries.set(o,h),h.ba.push(e),e.va(i.onlineState),h.wa&&e.Fa(h.wa)&&lm(i)}async function bw(s,e){const i=pt(s),r=e.query;let o=3;const h=i.queries.get(r);if(h){const d=h.ba.indexOf(e);d>=0&&(h.ba.splice(d,1),h.ba.length===0?o=e.Da()?0:1:!h.Sa()&&e.Da()&&(o=2))}switch(o){case 0:return i.queries.delete(r),i.onUnlisten(r,!0);case 1:return i.queries.delete(r),i.onUnlisten(r,!1);case 2:return i.onLastRemoteStoreUnlisten(r);default:return}}function Aw(s,e){const i=pt(s);let r=!1;for(const o of e){const h=o.query,d=i.queries.get(h);if(d){for(const y of d.ba)y.Fa(o)&&(r=!0);d.wa=o}}r&&lm(i)}function Sw(s,e,i){const r=pt(s),o=r.queries.get(e);if(o)for(const h of o.ba)h.onError(i);r.queries.delete(e)}function lm(s){s.Ca.forEach((e=>{e.next()}))}var Rd,W_;(W_=Rd||(Rd={})).Ma="default",W_.Cache="cache";class ww{constructor(e,i,r){this.query=e,this.xa=i,this.Oa=!1,this.Na=null,this.onlineState="Unknown",this.options=r||{}}Fa(e){if(!this.options.includeMetadataChanges){const r=[];for(const o of e.docChanges)o.type!==3&&r.push(o);e=new zr(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let i=!1;return this.Oa?this.Ba(e)&&(this.xa.next(e),i=!0):this.La(e,this.onlineState)&&(this.ka(e),i=!0),this.Na=e,i}onError(e){this.xa.error(e)}va(e){this.onlineState=e;let i=!1;return this.Na&&!this.Oa&&this.La(this.Na,e)&&(this.ka(this.Na),i=!0),i}La(e,i){if(!e.fromCache||!this.Da())return!0;const r=i!=="Offline";return(!this.options.Ka||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||i==="Offline")}Ba(e){if(e.docChanges.length>0)return!0;const i=this.Na&&this.Na.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!i)&&this.options.includeMetadataChanges===!0}ka(e){e=zr.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Oa=!0,this.xa.next(e)}Da(){return this.options.source!==Rd.Cache}}/**
1938 * @license
1939 * Copyright 2017 Google LLC
1940 *
1941 * Licensed under the Apache License, Version 2.0 (the "License");
1942 * you may not use this file except in compliance with the License.
1943 * You may obtain a copy of the License at
1944 *
1945 *   http://www.apache.org/licenses/LICENSE-2.0
1946 *
1947 * Unless required by applicable law or agreed to in writing, software
1948 * distributed under the License is distributed on an "AS IS" BASIS,
1949 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1950 * See the License for the specific language governing permissions and
1951 * limitations under the License.
1952 */class Xv{constructor(e){this.key=e}}class Zv{constructor(e){this.key=e}}class Rw{constructor(e,i){this.query=e,this.Za=i,this.Xa=null,this.hasCachedResults=!1,this.current=!1,this.Ya=Nt(),this.mutatedKeys=Nt(),this.eu=mv(e),this.tu=new Cr(this.eu)}get nu(){return this.Za}ru(e,i){const r=i?i.iu:new $_,o=i?i.tu:this.tu;let h=i?i.mutatedKeys:this.mutatedKeys,d=o,y=!1;const v=this.query.limitType==="F"&&o.size===this.query.limit?o.last():null,p=this.query.limitType==="L"&&o.size===this.query.limit?o.first():null;if(e.inorderTraversal(((b,A)=>{const O=o.get(b),Q=Dc(this.query,A)?A:null,J=!!O&&this.mutatedKeys.has(O.key),et=!!Q&&(Q.hasLocalMutations||this.mutatedKeys.has(Q.key)&&Q.hasCommittedMutations);let nt=!1;O&&Q?O.data.isEqual(Q.data)?J!==et&&(r.track({type:3,doc:Q}),nt=!0):this.su(O,Q)||(r.track({type:2,doc:Q}),nt=!0,(v&&this.eu(Q,v)>0||p&&this.eu(Q,p)<0)&&(y=!0)):!O&&Q?(r.track({type:0,doc:Q}),nt=!0):O&&!Q&&(r.track({type:1,doc:O}),nt=!0,(v||p)&&(y=!0)),nt&&(Q?(d=d.add(Q),h=et?h.add(b):h.delete(b)):(d=d.delete(b),h=h.delete(b)))})),this.query.limit!==null)for(;d.size>this.query.limit;){const b=this.query.limitType==="F"?d.last():d.first();
1952d=d.delete(b.key),h=h.delete(b.key),r.track({type:1,doc:b})}return{tu:d,iu:r,Ss:y,mutatedKeys:h}}su(e,i){return e.hasLocalMutations&&i.hasCommittedMutations&&!i.hasLocalMutations}applyChanges(e,i,r,o){const h=this.tu;this.tu=e.tu,this.mutatedKeys=e.mutatedKeys;const d=e.iu.ya();d.sort(((b,A)=>(function(Q,J){const et=nt=>{switch(nt){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ft(20277,{Vt:nt})}};return et(Q)-et(J)})(b.type,A.type)||this.eu(b.doc,A.doc))),this.ou(r),o=o??!1;const y=i&&!o?this._u():[],v=this.Ya.size===0&&this.current&&!o?1:0,p=v!==this.Xa;return this.Xa=v,d.length!==0||p?{snapshot:new zr(this.query,e.tu,h,d,e.mutatedKeys,v===0,p,!1,!!r&&r.resumeToken.approximateByteSize()>0),au:y}:{au:y}}va(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({tu:this.tu,iu:new $_,mutatedKeys:this.mutatedKeys,Ss:!1},!1)):{au:[]}}uu(e){return!this.Za.has(e)&&!!this.tu.has(e)&&!this.tu.get(e).hasLocalMutations}ou(e){e&&(e.addedDocuments.forEach((i=>this.Za=this.Za.add(i))),e.modifiedDocuments.forEach((i=>{})),e.removedDocuments.forEach((i=>this.Za=this.Za.delete(i))),this.current=e.current)}_u(){if(!this.current)return[];const e=this.Ya;this.Ya=Nt(),this.tu.forEach((r=>{this.uu(r.key)&&(this.Ya=this.Ya.add(r.key))}));const i=[];return e.forEach((r=>{this.Ya.has(r)||i.push(new Zv(r))})),this.Ya.forEach((r=>{e.has(r)||i.push(new Xv(r))})),i}cu(e){this.Za=e.ks,this.Ya=Nt();const i=this.ru(e.documents);return this.applyChanges(i,!0)}lu(){return zr.fromInitialDocuments(this.query,this.tu,this.mutatedKeys,this.Xa===0,this.hasCachedResults)}}const om="SyncEngine";class Cw{constructor(e,i,r){this.query=e,this.targetId=i,this.view=r}}class xw{constructor(e){this.key=e,this.hu=!1}}class Nw{constructor(e,i,r,o,h,d){this.localStore=e,this.remoteStore=i,this.eventManager=r,this.sharedClientState=o,this.currentUser=h,this.maxConcurrentLimboResolutions=d,this.Pu={},this.Tu=new Ns((y=>dv(y)),Ic),this.Iu=new Map,this.Eu=new Set,this.Ru=new re(ut.comparator),this.Au=new Map,this.Vu=new $d,this.du={},this.mu=new Map,this.fu=Mr.ar(),this.onlineState="Unknown",this.gu=void 0}get isPrimaryClient(){return this.gu===!0}}async function Iw(s,e,i=!0){const r=nE(s);let o;const h=r.Tu.get(e);return h?(r.sharedClientState.addLocalQueryTarget(h.targetId),o=h.view.lu()):o=await $v(r,e,i,!0),o}async function Dw(s,e){const i=nE(s);await $v(i,e,!0,!1)}async function $v(s,e,i,r){const o=await Y2(s.localStore,Ti(e)),h=o.targetId,d=s.sharedClientState.addLocalQueryTarget(h,i);let y;return r&&(y=await Vw(s,e,h,d==="current",o.resumeToken)),s.isPrimaryClient&&i&&Hv(s.remoteStore,o),y}async function Vw(s,e,i,r,o){s.pu=(A,O,Q)=>(async function(et,nt,yt,Tt){let _t=nt.view.ru(yt);_t.Ss&&(_t=await F_(et.localStore,nt.query,!1).then((({documents:N})=>nt.view.ru(N,_t))));const Xt=Tt&&Tt.targetChanges.get(nt.targetId),Zt=Tt&&Tt.targetMismatches.get(nt.targetId)!=null,Lt=nt.view.applyChanges(_t,et.isPrimaryClient,Xt,Zt);return e0(et,nt.targetId,Lt.au),Lt.snapshot})(s,A,O,Q);const h=await F_(s.localStore,e,!0),d=new Rw(e,h.ks),y=d.ru(h.documents),v=yo.createSynthesizedTargetChangeForCurrentChange(i,r&&s.onlineState!=="Offline",o),p=d.applyChanges(y,s.isPrimaryClient,v);e0(s,i,p.au);const b=new Cw(e,i,d);return s.Tu.set(e,b),s.Iu.has(i)?s.Iu.get(i).push(e):s.Iu.set(i,[e]),p.snapshot}async function Ow(s,e,i){const r=pt(s),o=r.Tu.get(e),h=r.Iu.get(o.targetId);if(h.length>1)return r.Iu.set(o.targetId,h.filter((d=>!Ic(d,e)))),void r.Tu.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(o.targetId),r.sharedCl
1952ientState.isActiveQueryTarget(o.targetId)||await Sd(r.localStore,o.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(o.targetId),i&&em(r.remoteStore,o.targetId),Cd(r,o.targetId)})).catch(Lr)):(Cd(r,o.targetId),await Sd(r.localStore,o.targetId,!0))}async function Mw(s,e){const i=pt(s),r=i.Tu.get(e),o=i.Iu.get(r.targetId);i.isPrimaryClient&&o.length===1&&(i.sharedClientState.removeLocalQueryTarget(r.targetId),em(i.remoteStore,r.targetId))}async function zw(s,e,i){const r=qw(s);try{const o=await(function(d,y){const v=pt(d),p=ee.now(),b=y.reduce(((Q,J)=>Q.add(J.key)),Nt());let A,O;return v.persistence.runTransaction("Locally write mutations","readwrite",(Q=>{let J=Xi(),et=Nt();return v.xs.getEntries(Q,b).next((nt=>{J=nt,J.forEach(((yt,Tt)=>{Tt.isValidDocument()||(et=et.add(yt))}))})).next((()=>v.localDocuments.getOverlayedDocuments(Q,J))).next((nt=>{A=nt;const yt=[];for(const Tt of y){const _t=QS(Tt,A.get(Tt.key).overlayedDocument);_t!=null&&yt.push(new Is(Tt.key,_t,av(_t.value.mapValue),Gi.exists(!0)))}return v.mutationQueue.addMutationBatch(Q,p,yt,y)})).next((nt=>{O=nt;const yt=nt.applyToLocalDocumentSet(A,et);return v.documentOverlayCache.saveOverlays(Q,nt.batchId,yt)}))})).then((()=>({batchId:O.batchId,changes:pv(A)})))})(r.localStore,e);r.sharedClientState.addPendingMutation(o.batchId),(function(d,y,v){let p=d.du[d.currentUser.toKey()];p||(p=new re(xt)),p=p.insert(y,v),d.du[d.currentUser.toKey()]=p})(r,o.batchId,i),await vo(r,o.changes),await Lc(r.remoteStore)}catch(o){const h=rm(o,"Failed to persist write");i.reject(h)}}async function Jv(s,e){const i=pt(s);try{const r=await G2(i.localStore,e);
vendor: 3,533 bytes, line 1952
1952e.targetChanges.forEach(((o,h)=>{const d=i.Au.get(h);d&&(Bt(o.addedDocuments.size+o.modifiedDocuments.size+o.removedDocuments.size<=1,22616),o.addedDocuments.size>0?d.hu=!0:o.modifiedDocuments.size>0?Bt(d.hu,14607):o.removedDocuments.size>0&&(Bt(d.hu,42227),d.hu=!1))})),await vo(i,r,e)}catch(r){await Lr(r)}}function t0(s,e,i){const r=pt(s);if(r.isPrimaryClient&&i===0||!r.isPrimaryClient&&i===1){const o=[];r.Tu.forEach(((h,d)=>{const y=d.view.va(e);y.snapshot&&o.push(y.snapshot)})),(function(d,y){const v=pt(d);v.onlineState=y;let p=!1;v.queries.forEach(((b,A)=>{for(const O of A.ba)O.va(y)&&(p=!0)})),p&&lm(v)})(r.eventManager,e),o.length&&r.Pu.J_(o),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function jw(s,e,i){const r=pt(s);r.sharedClientState.updateQueryState(e,"rejected",i);const o=r.Au.get(e),h=o&&o.key;if(h){let d=new re(ut.comparator);d=d.insert(h,Ze.newNoDocument(h,mt.min()));const y=Nt().add(h),v=new Mc(mt.min(),new Map,new re(xt),d,y);await Jv(r,v),r.Ru=r.Ru.remove(h),r.Au.delete(e),um(r)}else await Sd(r.localStore,e,!1).then((()=>Cd(r,e,i))).catch(Lr)}async function Lw(s,e){const i=pt(s),r=e.batch.batchId;try{const o=await H2(i.localStore,e);tE(i,r,null),Wv(i,r),i.sharedClientState.updateMutationState(r,"acknowledged"),await vo(i,o)}catch(o){await Lr(o)}}async function Uw(s,e,i){const r=pt(s);try{const o=await(function(d,y){const v=pt(d);return v.persistence.runTransaction("Reject batch","readwrite-primary",(p=>{let b;return v.mutationQueue.lookupMutationBatch(p,y).next((A=>(Bt(A!==null,37113),b=A.keys(),v.mutationQueue.removeMutationBatch(p,A)))).next((()=>v.mutationQueue.performConsistencyCheck(p))).next((()=>v.documentOverlayCache.removeOverlaysForBatchId(p,b,y))).next((()=>v.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(p,b))).next((()=>v.localDocuments.getDocuments(p,b)))}))})(r.localStore,e);tE(r,e,i),Wv(r,e),r.sharedClientState.updateMutationState(e,"rejected",i),await vo(r,o)}catch(o){await Lr(o)}}function Wv(s,e){(s.mu.get(e)||[]).forEach((i=>{i.resolve()})),s.mu.delete(e)}function tE(s,e,i){const r=pt(s);let o=r.du[r.currentUser.toKey()];if(o){const h=o.get(e);h&&(i?h.reject(i):h.resolve(),o=o.remove(e)),r.du[r.currentUser.toKey()]=o}}function Cd(s,e,i=null){s.sharedClientState.removeLocalQueryTarget(e);for(const r of s.Iu.get(e))s.Tu.delete(r),i&&s.Pu.yu(r,i);s.Iu.delete(e),s.isPrimaryClient&&s.Vu.Gr(e).forEach((r=>{s.Vu.containsKey(r)||eE(s,r)}))}function eE(s,e){s.Eu.delete(e.path.canonicalString());const i=s.Ru.get(e);i!==null&&(em(s.remoteStore,i),s.Ru=s.Ru.remove(e),s.Au.delete(i),um(s))}function e0(s,e,i){for(const r of i)r instanceof Xv?(s.Vu.addReference(r.key,e),Pw(s,r)):r instanceof Zv?(it(om,"Document no longer in limbo: "+r.key),s.Vu.removeReference(r.key,e),s.Vu.containsKey(r.key)||eE(s,r.key)):ft(19791,{wu:r})}function Pw(s,e){const i=e.key,r=i.path.canonicalString();s.Ru.get(i)||s.Eu.has(r)||(it(om,"New document in limbo: "+i),s.Eu.add(r),um(s))}function um(s){for(;s.Eu.size>0&&s.Ru.size<s.maxConcurrentLimboResolutions;){const e=s.Eu.values().next().value;s.Eu.delete(e);const i=new ut(Jt.fromString(e)),r=s.fu.next();s.Au.set(r,new xw(i)),s.Ru=s.Ru.insert(i,r),Hv(s.remoteStore,new Na(Ti(hv(i.path)),r,"TargetPurposeLimboResolution",Cc.ce))}}async function vo(s,e,i){const r=pt(s),o=[],h=[],d=[];r.Tu.isEmpty()||(r.Tu.forEach(((y,v)=>{d.push(r.pu(v,e,i).then((p=>{var b;if((p||i)&&r.isPrimaryClient){const A=p?!p.fromCache:(b=i==null?void 0:i.targetChanges.get(v.targetId))==null?void 0:b.current;
1952r.sharedClientState.updateQueryState(v.targetId,A?"current":"not-current")}if(p){o.push(p);const A=Wd.Es(v.targetId,p);h.push(A)}})))})),await Promise.all(d),r.Pu.J_(o),await(async function(v,p){const b=pt(v);try{await b.persistence.runTransaction("notifyLocalViewChanges","readwrite",(A=>Z.forEach(p,(O=>Z.forEach(O.Ts,(Q=>b.persistence.referenceDelegate.addReference(A,O.targetId,Q))).next((()=>Z.forEach(O.Is,(Q=>b.persistence.referenceDelegate.removeReference(A,O.targetId,Q)))))))))}catch(A){if(!Ur(A))throw A;it(tm,"Failed to update sequence numbers: "+A)}for(const A of p){const O=A.targetId;if(!A.fromCache){const Q=b.vs.get(O),J=Q.snapshotVersion,et=Q.withLastLimboFreeSnapshotVersion(J);b.vs=b.vs.insert(O,et)}}})(r.localStore,h))}async function Bw(s,e){const i=pt(s);if(!i.currentUser.isEqual(e)){it(om,"User change. New user:",e.toKey());const r=await Pv(i.localStore,e);i.currentUser=e,(function(h,d){h.mu.forEach((y=>{y.forEach((v=>{v.reject(new at(X.CANCELLED,d))}))})),h.mu.clear()})(i,"'waitForPendingWrites' promise is rejected due to a user change."),i.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await vo(i,r.Ns)}}function kw(s,e){const i=pt(s),r=i.Au.get(e);if(r&&r.hu)return Nt().add(r.key);{let o=Nt();const h=i.Iu.get(e);if(!h)return o;for(const d of h){const y=i.Tu.get(d);o=o.unionWith(y.view.nu)}return o}}function nE(s){const e=pt(s);return e.remoteStore.remoteSyncer.applyRemoteEvent=Jv.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=kw.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=jw.bind(null,e),e.Pu.J_=Aw.bind(null,e.eventManager),e.Pu.yu=Sw.bind(null,e.eventManager),e}function qw(s){const e=pt(s);return e.remoteStore.remoteSyncer.applySuccessfulWrite=Lw.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=Uw.bind(null,e),e}class Tc{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=zc(e.databaseInfo.databaseId),this.sharedClientState=this.Du(e),this.persistence=this.Cu(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Fu(e,this.localStore),this.indexBackfillerScheduler=this.Mu(e,this.localStore)}Fu(e,i){return null}Mu(e,i){return null}vu(e){return q2(this.persistence,new P2,e.initialUser,this.serializer)}Cu(e){return new Uv(Jd.Vi,this.serializer)}Du(e){return new X2}async terminate(){var e,i;(e=this.gcScheduler)==null||e.stop(),(i=this.indexBackfillerScheduler)==null||i.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}Tc.provider={build:()=>new Tc};class Hw extends Tc{constructor(e){super(),this.cacheSizeBytes=e}Fu(e,i){Bt(this.persistence.referenceDelegate instanceof vc,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new S2(r,e.asyncQueue,i)}Cu(e){const i=this.cacheSizeBytes!==void 0?cn.withCacheSize(this.cacheSizeBytes):cn.DEFAULT;return new Uv((r=>vc.Vi(r,i)),this.serializer)}}class xd{async initialize(e,i){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(i),this.remoteStore=this.createRemoteStore(i),this.eventManager=this.createEventManager(i),this.syncEngine=this.createSyncEngine(i,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>t0(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=Bw.bind(null,this.syncEngine),await _w(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return(function(){return new Ew})()}createDatastore(e){const i=zc(e.databaseInfo.databaseId),r=tw(e.databaseInfo);return sw(e.authCredentials,e.appCheckCredentials,r,i)}createRemoteStore(e){return(function(r,o,h,d,y){return new lw(r,o,h,d,y)})(this.localStore,this.datastore,e.asyncQueue,(i=>t0(this.syncEngine,i,0)),(function(){return K_.v()?new K_:new Z2})())}createSyncEngine(e,i){return(function(o,h,d,y,v,p,b){const A=new Nw(o,h,d,y,v,p);return b&&(A.gu=!0),A})(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,i)}async terminate(){var e,i;await(async function(o){const h=pt(o);it(ws,"RemoteStore shutting down."),h.Ea.add(5),await _o(h),h.Aa.shutdown(),h.Va.set("Unknown")})(this.remoteStore),(e=this.datastore)==null||e.terminate(),(i=this.eventManager)==null||i.terminate()}}xd.provider={build:()=>new xd};/**
1953 * @license
1954 * Copyright 2020 Google LLC
1955 *
1956 * Licensed under the Apache License, Version 2.0 (the "License");
1957 * you may not use this file except in compliance with the License.
1958 * You may obtain a copy of the License at
1959 *
1960 *   http://www.apache.org/licenses/LICENSE-2.0
1961 *
1962 * Unless required by applicable law or agreed to in writing, software
1963 * distributed under the License is distributed on an "AS IS" BASIS,
1964 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1965 * See the License for the specific language governing permissions and
1966 * limitations under the License.
1967 *//**
1968 * @license
1969 * Copyright 2017 Google LLC
1970 *
1971 * Licensed under the Apache License, Version 2.0 (the "License");
1972 * you may not use this file except in compliance with the License.
1973 * You may obtain a copy of the License at
1974 *
1975 *   http://www.apache.org/licenses/LICENSE-2.0
1976 *
1977 * Unless required by applicable law or agreed to in writing, software
1978 * distributed under the License is distributed on an "AS IS" BASIS,
1979 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1980 * See the License for the specific language governing permissions and
1981 * limitations under the License.
1982 */class Gw{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ou(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ou(this.observer.error,e):Ki("Uncaught Error in snapshot listener:",e.toString()))}Nu(){this.muted=!0}Ou(e,i){setTimeout((()=>{this.muted||e(i)}),0)}}/**
1983 * @license
1984 * Copyright 2017 Google LLC
1985 *
1986 * Licensed under the Apache License, Version 2.0 (the "License");
1987 * you may not use this file except in compliance with the License.
1988 * You may obtain a copy of the License at
1989 *
1990 *   http://www.apache.org/licenses/LICENSE-2.0
1991 *
1992 * Unless required by applicable law or agreed to in writing, software
1993 * distributed under the License is distributed on an "AS IS" BASIS,
1994 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1995 * See the License for the specific language governing permissions and
1996 * limitations under the License.
1997 */const ka="FirestoreClient";class Fw{constructor(e,i,r,o,h){this.authCredentials=e,this.appCheckCredentials=i,this.asyncQueue=r,this._databaseInfo=o,this.user=Xe.UNAUTHENTICATED,this.clientId=kd.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=h,this.authCredentials.start(r,(async d=>{it(ka,"Received user=",d.uid),await this.authCredentialListener(d),this.user=d})),this.appCheckCredentials.start(r,(d=>(it(ka,"Received new app check token=",d),this.appCheckCredentialListener(d,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this._databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Oa;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(i){const r=rm(i,"Failed to shutdown persistence");e.reject(r)}})),e.promise}}async function nd(s,e){s.asyncQueue.verifyOperationInProgress(),it(ka,"Initializing OfflineComponentProvider");const i=s.configuration;await e.initialize(i);let r=i.initialUser;s.setCredentialChangeListener((async o=>{r.isEqual(o)||(await Pv(e.localStore,o),r=o)})),e.persistence.setDatabaseDeletedListener((()=>s.terminate())),s._offlineComponents=e}async function n0(s,e){s.asyncQueue.verifyOperationInProgress();const i=await Qw(s);it(ka,"Initializing OnlineComponentProvider"),await e.initialize(i,s.configuration),s.setCredentialChangeListener((r=>Z_(e.remoteStore,r))),s.setAppCheckTokenChangeListener(((r,o)=>Z_(e.remoteStore,o))),s._onlineComponents=e}async function Qw(s){if(!s._offlineComponents)if(s._uninitializedComponentsProvider){it(ka,"Using user provided OfflineComponentProvider");try{await nd(s,s._uninitializedComponentsProvider._offline)}catch(e){const i=e;if(!(function(o){return o.name==="FirebaseError"?o.code===X.FAILED_PRECONDITION||o.code===X.UNI
1997MPLEMENTED:!(typeof DOMException<"u"&&o instanceof DOMException)||o.code===22||o.code===20||o.code===11})(i))throw i;Ss("Error using user provided cache. Falling back to memory cache: "+i),await nd(s,new Tc)}}else it(ka,"Using default OfflineComponentProvider"),await nd(s,new Hw(void 0));return s._offlineComponents}async function iE(s){return s._onlineComponents||(s._uninitializedComponentsProvider?(it(ka,"Using user provided OnlineComponentProvider"),await n0(s,s._uninitializedComponentsProvider._online)):(it(ka,"Using default OnlineComponentProvider"),await n0(s,new xd))),s._onlineComponents}function Yw(s){return iE(s).then((e=>e.syncEngine))}async function Kw(s){const e=await iE(s),i=e.eventManager;return i.onListen=Iw.bind(null,e.syncEngine),i.onUnlisten=Ow.bind(null,e.syncEngine),i.onFirstRemoteStoreListen=Dw.bind(null,e.syncEngine),i.onLastRemoteStoreUnlisten=Mw.bind(null,e.syncEngine),i}function Xw(s,e,i={}){const r=new Oa;return s.asyncQueue.enqueueAndForget((async()=>(function(h,d,y,v,p){const b=new Gw({next:O=>{b.Nu(),d.enqueueAndForget((()=>bw(h,A))),O.fromCache&&v.source==="server"?p.reject(new at(X.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.)')):p.resolve(O)},error:O=>p.reject(O)}),A=new ww(y,b,{includeMetadataChanges:!0,Ka:!0});return Tw(h,A)})(await Kw(s),s.asyncQueue,e,i,r))),r.promise}function Zw(s,e){const i=new Oa;return s.asyncQueue.enqueueAndForget((async()=>zw(await Yw(s),e,i))),i.promise}/**
1998 * @license
1999 * Copyright 2023 Google LLC
2000 *
2001 * Licensed under the Apache License, Version 2.0 (the "License");
2002 * you may not use this file except in compliance with the License.
2003 * You may obtain a copy of the License at
2004 *
2005 *   http://www.apache.org/licenses/LICENSE-2.0
2006 *
2007 * Unless required by applicable law or agreed to in writing, software
2008 * distributed under the License is distributed on an "AS IS" BASIS,
2009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2010 * See the License for the specific language governing permissions and
2011 * limitations under the License.
2012 */function aE(s){const e={};return s.timeoutSeconds!==void 0&&(e.timeoutSeconds=s.timeoutSeconds),e}/**
2013 * @license
2014 * Copyright 2020 Google LLC
2015 *
2016 * Licensed under the Apache License, Version 2.0 (the "License");
2017 * you may not use this file except in compliance with the License.
2018 * You may obtain a copy of the License at
2019 *
2020 *   http://www.apache.org/licenses/LICENSE-2.0
2021 *
2022 * Unless required by applicable law or agreed to in writing, software
2023 * distributed under the License is distributed on an "AS IS" BASIS,
2024 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2025 * See the License for the specific language governing permissions and
2026 * limitations under the License.
2027 */const $w="ComponentProvider",i0=new Map;function Jw(s,e,i,r,o){return new gS(s,e,i,o.host,o.ssl,o.experimentalForceLongPolling,o.experimentalAutoDetectLongPolling,aE(o.experimentalLongPollingOptions),o.useFetchStreams,o.isUsingEmulator,r)}/**
2028 * @license
2029 * Copyright 2020 Google LLC
2030 *
2031 * Licensed under the Apache License, Version 2.0 (the "License");
2032 * you may not use this file except in compliance with the License.
2033 * You may obtain a copy of the License at
2034 *
2035 *   http://www.apache.org/licenses/LICENSE-2.0
2036 *
2037 * Unless required by applicable law or agreed to in writing, software
2038 * distributed under the License is distributed on an "AS IS" BASIS,
2039 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2040 * See the License for the specific language governing permissions and
2041 * limitations under the License.
2042 */const sE="firestore.googleapis.com",a0=!0;class s0{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new at(X.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=sE,this.ssl=a0}else this.host=e.host,this.ssl=e.ssl??a0;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=Lv;
vendor: 4,398 bytes, lines 2042-2046
2042else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<b2)throw new at(X.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}aS("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=aE(e.experimentalLongPollingOptions??{}),(function(r){if(r.timeoutSeconds!==void 0){if(isNaN(r.timeoutSeconds))throw new at(X.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (must not be NaN)`);if(r.timeoutSeconds<5)throw new at(X.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (minimum allowed value is 5)`);if(r.timeoutSeconds>30)throw new at(X.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(function(r,o){return r.timeoutSeconds===o.timeoutSeconds})(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Uc{constructor(e,i,r,o){this._authCredentials=e,this._appCheckCredentials=i,this._databaseId=r,this._app=o,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new s0({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new at(X.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(e){if(this._settingsFrozen)throw new at(X.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 s0(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=(function(r){if(!r)return new KA;switch(r.type){case"firstParty":return new JA(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new at(X.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}})(e.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(i){const r=i0.get(i);r&&(it($w,"Removing Datastore"),i0.delete(i),r.terminate())})(this),Promise.resolve()}}function Ww(s,e,i,r={}){var p;s=cc(s,Uc);const o=Ld(e),h=s._getSettings(),d={...h,emulatorOptions:s._getEmulatorOptions()},y=`${e}:${i}`;o&&(vb(`https://${y}`),Ab("Firestore",!0)),h.host!==sE&&h.host!==y&&Ss("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const v={...h,host:y,ssl:o,emulatorOptions:r};if(!ao(v,d)&&(s._setSettings(v),r.mockUserToken)){let b,A;if(typeof r.mockUserToken=="string")b=r.mockUserToken,A=Xe.MOCK_USER;else{b=Eb(r.mockUserToken,(p=s._app)==null?void 0:p.options.projectId);const O=r.mockUserToken.sub||r.mockUserToken.user_id;if(!O)throw new at(X.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");A=new Xe(O)}s._authCredentials=new XA(new Q0(b,A))}}/**
2043 * @license
2044 * Copyright 2020 Google LLC
2045 *
2046 * Licensed under the Apache License, Version 2.0 (the "License");
2047 * you may not use this file except in compliance with the License.
2048 * You may obtain a copy of the License at
2049 *
2050 *   http://www.apache.org/licenses/LICENSE-2.0
2051 *
2052 * Unless required by applicable law or agreed to in writing, software
2053 * distributed under the License is distributed on an "AS IS" BASIS,
2054 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2055 * See the License for the specific language governing permissions and
2056 * limitations under the License.
2057 */class Br{constructor(e,i,r){this.converter=i,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new Br(this.firestore,e,this._query)}}class Le{constructor(e,i,r){this.converter=i,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Ma(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Le(this.firestore,e,this._key)}toJSON(){return{type:Le._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,i,r){if(mo(i,Le._jsonSchema))return new Le(e,r||null,new ut(Jt.fromString(i.referencePath)))}}Le._jsonSchemaVersion="firestore/documentReference/1.0",Le._jsonSchema={type:Re("string",Le._jsonSchemaVersion),referencePath:Re("string")};class Ma extends Br{constructor(e,i,r){super(e,i,hv(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Le(this.firestore,null,new ut(e))}withConverter(e){return new Ma(this.firestore,e,this._path)}}function Nd(s,e,...i){if(s=Fi(s),Y0("collection","path",e),s instanceof Uc){const r=Jt.fromString(e,...i);return __(r),new Ma(s,null,r)}{if(!(s instanceof Le||s instanceof Ma))throw new at(X.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=s._path.child(Jt.fromString(e,...i));return __(r),new Ma(s.firestore,null,r)}}function tR(s,e,...i){if(s=Fi(s),arguments.length===1&&(e=kd.newId()),Y0("doc","path",e),s instanceof Uc){const r=Jt.fromString(e,...i);return y_(r),new Le(s,null,new ut(r))}{if(!(s instanceof Le||s instanceof Ma))throw new at(X.INVALID_ARGUMENT,"Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=s._path.child(Jt.fromString(e,...i));return y_(r),new Le(s.firestore,s instanceof Ma?s.converter:null,new ut(r))}}/**
2058 * @license
2059 * Copyright 2020 Google LLC
2060 *
2061 * Licensed under the Apache License, Version 2.0 (the "License");
2062 * you may not use this file except in compliance with the License.
2063 * You may obtain a copy of the License at
2064 *
2065 *   http://www.apache.org/licenses/LICENSE-2.0
2066 *
2067 * Unless required by applicable law or agreed to in writing, software
2068 * distributed under the License is distributed on an "AS IS" BASIS,
2069 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2070 * See the License for the specific language governing permissions and
2071 * limitations under the License.
2072 */const r0="AsyncQueue";class l0{constructor(e=Promise.resolve()){this.Yu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new kv(this,"async_queue_retry"),this._c=()=>{const r=ed();r&&it(r0,"Visibility state changed to "+r.visibilityState),this.M_.w_()},this.ac=e;const i=ed();i&&typeof i.addEventListener=="function"&&i.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const i=ed();i&&typeof i.removeEventListener=="function"&&i.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise((()=>{}));const i=new Oa;return this.cc((()=>this.ec&&this.sc?Promise.resolve():(e().then(i.resolve,i.reject),i.promise))).then((()=>i.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Yu.push(e),this.lc())))}async lc(){if(this.Yu.length!==0){try{await this.Yu[0](),this.Yu.shift(),this.M_.reset()}catch(e){if(!Ur(e))throw e;it(r0,"Operation failed with retryable error: "+e)}this.Yu.length>0&&this.M_.p_((()=>this.lc()))}}cc(e){const i=this.ac.then((()=>(this.rc=!0,e().catch((r=>{throw this.nc=r,this.rc=!1,Ki("INTERNAL UNHANDLED ERROR: ",o0(r)),r})).then((r=>(this.rc=!1,r))))));return this.ac=i,i}enqueueAfterDelay(e,i,r){this.uc(),this.oc.indexOf(e)>-1&&(i=0);const o=sm.createAndSchedule(this,e,i,r,(h=>this.hc(h)));return this.tc.push(o),o}uc(){this.nc&&ft(47125,{Pc:o0(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do e=this.ac,await e;while(e!==this.ac)}Ic(e){for(const i of this.tc)if(i.timerId===e)return!0;return!1}Ec(e){return this.Tc().then((()=>{this.tc.sort(((i,r)=>i.targetTimeMs-r.targetTimeMs));for(const i of this.tc)if(i.skipDelay(),e!=="all"&&i.timerId===e)break;return this.Tc()}))}Rc(e){this.oc.push(e)}hc(e){const i=this.tc.indexOf(e);this.tc.splice(i,1)}}function o0(s){let e=s.message||"";return s.stack&&(e=s.stack.includes(s.message)?s.stack:s.message+`
2073`+s.stack),e}class cm extends Uc{constructor(e,i,r,o){super(e,i,r,o),this.type="firestore",this._queue=new l0,this._persistenceKey=(o==null?void 0:o.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new l0(e),this._firestoreClient=void 0,await e}}}function eR(s,e){const i=typeof s=="object"?s:j0(),r=typeof s=="string"?s:fc,o=fo(i,"firestore").getImmediate({identifier:r});if(!o._initialized){const h=yb("firestore");h&&Ww(o,...h)}return o}function rE(s){if(s._terminated)throw new at(X.FAILED_PRECONDITION,"The client has already been terminated.");return s._firestoreClient||nR(s),s._firestoreClient}function nR(s){var r,o,h,d;const e=s._freezeSettings(),i=Jw(s._databaseId,((r=s._app)==null?void 0:r.options.appId)||"",s._persistenceKey,(o=s._app)==null?void 0:o.options.apiKey,e);s._componentsProvider||(h=e.localCache)!=null&&h._offlineComponentProvider&&((d=e.localCache)!=null&&d._onlineComponentProvider)&&(s._componentsProvider={_offline:e.localCache._offlineComponentProvider,_online:e.localCache._onlineComponentProvider}),s._firestoreClient=new Fw(s._authCredentials,s._appCheckCredentials,s._queue,i,s._componentsProvider&&(function(v){const p=v==null?void 0:v._online.build();return{_offline:v==null?void 0:v._offline.build(p),_online:p}})(s._componentsProvider))}/**
2074 * @license
2075 * Copyright 2020 Google LLC
2076 *
2077 * Licensed under the Apache License, Version 2.0 (the "License");
2078 * you may not use this file except in compliance with the License.
2079 * You may obtain a copy of the License at
2080 *
2081 *   http://www.apache.org/licenses/LICENSE-2.0
2082 *
2083 * Unless required by applicable law or agreed to in writing, software
2084 * distributed under the License is distributed on an "AS IS" BASIS,
2085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2086 * See the License for the specific language governing permissions and
2087 * limitations under the License.
2088 */class zn{constructor(e){this._byteString=e}static fromBase64String(e){try{return new zn(Qe.fromBase64String(e))}catch(i){throw new at(X.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+i)}}static fromUint8Array(e){return new zn(Qe.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:zn._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(mo(e,zn._jsonSchema))return zn.fromBase64String(e.bytes)}}zn._jsonSchemaVersion="firestore/bytes/1.0",zn._jsonSchema={type:Re("string",zn._jsonSchemaVersion),bytes:Re("string")};/**
2089 * @license
2090 * Copyright 2020 Google LLC
2091 *
2092 * Licensed under the Apache License, Version 2.0 (the "License");
2093 * you may not use this file except in compliance with the License.
2094 * You may obtain a copy of the License at
2095 *
2096 *   http://www.apache.org/licenses/LICENSE-2.0
2097 *
2098 * Unless required by applicable law or agreed to in writing, software
2099 * distributed under the License is distributed on an "AS IS" BASIS,
2100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2101 * See the License for the specific language governing permissions and
2102 * limitations under the License.
2103 */class lE{constructor(...e){for(let i=0;i<e.length;++i)if(e[i].length===0)throw new at(X.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Fe(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/**
2104 * @license
2105 * Copyright 2020 Google LLC
2106 *
2107 * Licensed under the Apache License, Version 2.0 (the "License");
2108 * you may not use this file except in compliance with the License.
2109 * You may obtain a copy of the License at
2110 *
2111 *   http://www.apache.org/licenses/LICENSE-2.0
2112 *
2113 * Unless required by applicable law or agreed to in writing, software
2114 * distributed under the License is distributed on an "AS IS" BASIS,
2115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2116 * See the License for the specific language governing permissions and
2117 * limitations under the License.
2118 */class oE{constructor(e){this._methodName=e}}/**
2119 * @license
2120 * Copyright 2017 Google LLC
2121 *
2122 * Licensed under the Apache License, Version 2.0 (the "License");
2123 * you may not use this file except in compliance with the License.
2124 * You may obtain a copy of the License at
2125 *
2126 *   http://www.apache.org/licenses/LICENSE-2.0
2127 *
2128 * Unless required by applicable law or agreed to in writing, software
2129 * distributed under the License is distributed on an "AS IS" BASIS,
2130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2131 * See the License for the specific language governing permissions and
2132 * limitations under the License.
2133 */class Ai{constructor(e,i){if(!isFinite(e)||e<-90||e>90)throw new at(X.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(i)||i<-180||i>180)throw new at(X.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+i);this._lat=e,this._long=i}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return xt(this._lat,e._lat)||xt(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:Ai._jsonSchemaVersion}}static fromJSON(e){if(mo(e,Ai._jsonSchema))return new Ai(e.latitude,e.longitude)}}Ai._jsonSchemaVersion="firestore/geoPoint/1.0",Ai._jsonSchema={type:Re("string",Ai._jsonSchemaVersion),latitude:Re("number"),longitude:Re("number")};/**
2134 * @license
2135 * Copyright 2024 Google LLC
2136 *
2137 * Licensed under the Apache License, Version 2.0 (the "License");
2138 * you may not use this file except in compliance with the License.
2139 * You may obtain a copy of the License at
2140 *
2141 *   http://www.apache.org/licenses/LICENSE-2.0
2142 *
2143 * Unless required by applicable law or agreed to in writing, software
2144 * distributed under the License is distributed on an "AS IS" BASIS,
2145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2146 * See the License for the specific language governing permissions and
2147 * limitations under the License.
2148 */class Xn{constructor(e){this._values=(e||[]).map((i=>i))}toArray(){return this._values.map((e=>e))}isEqual(e){return(function(r,o){if(r.length!==o.length)return!1;for(let h=0;h<r.length;++h)if(r[h]!==o[h])return!1;return!0})(this._values,e._values)}toJSON(){return{type:Xn._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(mo(e,Xn._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every((i=>typeof i=="number")))return new Xn(e.vectorValues);throw new at(X.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}Xn._jsonSchemaVersion="firestore/vectorValue/1.0",Xn._jsonSchema={type:Re("string",Xn._jsonSchemaVersion),vectorValues:Re("object")};/**
2149 * @license
2150 * Copyright 2017 Google LLC
2151 *
2152 * Licensed under the Apache License, Version 2.0 (the "License");
2153 * you may not use this file except in compliance with the License.
2154 * You may obtain a copy of the License at
2155 *
2156 *   http://www.apache.org/licenses/LICENSE-2.0
2157 *
2158 * Unless required by applicable law or agreed to in writing, software
2159 * distributed under the License is distributed on an "AS IS" BASIS,
2160 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2161 * See the License for the specific language governing permissions and
2162 * limitations under the License.
2163 */const iR=/^__.*__$/;class aR{constructor(e,i,r){this.data=e,this.fieldMask=i,this.fieldTransforms=r}toMutation(e,i){return this.fieldMask!==null?new Is(e,this.data,this.fieldMask,i,this.fieldTransforms):new po(e,this.data,i,this.fieldTransforms)}}function uE(s){switch(s){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ft(40011,{dataSource:s})}}class hm{constructor(e,i,r,o,h,d){this.settings=e,this.databaseId=i,this.serializer=r,this.ignoreUndefinedProperties=o,h===void 0&&this.validatePath(),this.fieldTransforms=h||[],this.fieldMask=d||[]}get path(){return this.settings.path}get dataSource(){return this.settings.dataSource}contextWith(e){return new hm({...this.settings,...e},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}childContextForField(e){var o;const i=(o=this.path)==null?void 0:o.child(e),r=this.contextWith({path:i,arrayElement:!1});return r.validatePathSegment(e),r}childContextForFieldPath(e){var o;const i=(o=this.path)==null?void 0:o.child(e),r=this.contextWith({path:i,arrayElement:!1});return r.validatePath(),r}childContextForArray(e){return this.contextWith({path:void 0,arrayElement:!0})}createError(e){return bc(e,this.settings.methodName,this.settings.hasConverter||!1,this.path,this.settings.targetDoc)}contains(e){return this.fieldMask.find((i=>e.isPrefixOf(i)))!==void 0||this.fieldTransforms.find((i=>e.isPrefixOf(i.field)))!==void 0}validatePath(){if(this.path)for(let e=0;e<this.path.length;e++)this.validatePathSegment(this.path.get(e))}validatePathSegment(e){if(e.length===0)throw this.createError("Document fields must not be empty");if(uE(this.dataSource)&&iR.test(e))throw this.createError('Document fields cannot begin and end with "__"')}}class sR{constructor(e,i,r){this.databaseId=e,this.ignoreUndefinedProperties=i,this.serializer=r||zc(e)}createContext(e,i,r,o=!1){return new hm({dataSource:e,methodName:i,targetDoc:r,path:Fe.emptyPath(),arrayElement:!1,hasConverter:o},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function cE(s){const e=s._freezeSettings(),i=zc(s._databaseId);return new sR(s._databaseId,!!e.ignoreUndefinedProperties,i)}function rR(s,e,i,r,o,h={}){const d=s.createContext(h.merge||h.mergeFields?2:0,e,i,o);dE("Data must be an object, but it was:",d,r);const y=hE(r,d);let v,p;if(h.merge)v=new Kn(d.fieldMask),p=d.fieldTransforms;else if(h.mergeFields){const b=[];for(const A of h.mergeFields){const O=Pc(e,A,i);if(!d.contains(O))throw new at(X.INVALID_ARGUMENT,`Field '${O}' is specified in your field mask but missing from your input data.`);cR(b,O)||b.push(O)}v=new Kn(b),p=d.fieldTransforms.filter((A=>v.covers(A.field)))}else v=null,p=d.fieldTransforms;return new aR(new Mn(y),v,p)}function lR(s,e,i,r=!1){return fm(i,s.createContext(r?4:3,e))}function fm(s,e){if(fE(s=Fi(s)))return dE("Unsupported field value:",e,s),hE(s,e);if(s instanceof oE)return(function(r,o){if(!uE(o.dataSource))throw o.createError(`${r._methodName}
2163() can only be used with update() and set()`);if(!o.path)throw o.createError(`${r._methodName}() is not currently supported inside arrays`);const h=r._toFieldTransform(o);h&&o.fieldTransforms.push(h)})(s,e),null;if(s===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),s instanceof Array){if(e.settings.arrayElement&&e.dataSource!==4)throw e.createError("Nested arrays are not supported");return(function(r,o){const h=[];let d=0;for(const y of r){let v=fm(y,o.childContextForArray(d));v==null&&(v={nullValue:"NULL_VALUE"}),h.push(v),d++}return{arrayValue:{values:h}}})(s,e)}return(function(r,o){if((r=Fi(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return BS(o.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const h=ee.fromDate(r);return{timestampValue:_c(o.serializer,h)}}if(r instanceof ee){const h=new ee(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:_c(o.serializer,h)}}if(r instanceof Ai)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof zn)return{bytesValue:Nv(o.serializer,r._byteString)};if(r instanceof Le){const h=o.databaseId,d=r.firestore._databaseId;if(!d.isEqual(h))throw o.createError(`Document reference is for database ${d.projectId}/${d.database} but should be for database ${h.projectId}/${h.database}`);return{referenceValue:Zd(r.firestore._databaseId||o.databaseId,r._key.path)}}if(r instanceof Xn)return(function(d,y){const v=d instanceof Xn?d.toArray():d;return{mapValue:{fields:{[nv]:{stringValue:iv},[dc]:{arrayValue:{values:v.map((b=>{if(typeof b!="number")throw y.createError("VectorValues must only contain numeric values.");return Yd(y.serializer,b)}))}}}}}})(r,o);if(jv(r))return r._toProto(o.serializer);throw o.createError(`Unsupported field value: ${Rc(r)}`)})(s,e)}function hE(s,e){const i={};return Z0(s)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):xs(s,((r,o)=>{const h=fm(o,e.childContextForField(r));h!=null&&(i[r]=h)})),{mapValue:{fields:i}}}function fE(s){return!(typeof s!="object"||s===null||s instanceof Array||s instanceof Date||s instanceof ee||s instanceof Ai||s instanceof zn||s instanceof Le||s instanceof oE||s instanceof Xn||jv(s))}function dE(s,e,i){if(!fE(i)||!K0(i)){const r=Rc(i);throw r==="an object"?e.createError(s+" a custom object"):e.createError(s+" "+r)}}function Pc(s,e,i){if((e=Fi(e))instanceof lE)return e._internalPath;if(typeof e=="string")return uR(s,e);throw bc("Field path arguments must be of type string or ",s,!1,void 0,i)}const oR=new RegExp("[~\\*/\\[\\]]");function uR(s,e,i){if(e.search(oR)>=0)throw bc(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,s,!1,void 0,i);try{return new lE(...e.split("."))._internalPath}catch{throw bc(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,s,!1,void 0,i)}}function bc(s,e,i,r,o){const h=r&&!r.isEmpty(),d=o!==void 0;let y=`Function ${e}() called with invalid data`;i&&(y+=" (via `toFirestore()`)"),y+=". ";let v="";return(h||d)&&(v+=" (found",h&&(v+=` in field ${r}`),d&&(v+=` in document ${o}`),v+=")"),new at(X.INVALID_ARGUMENT,y+s+v)}function cR(s,e){return s.some((i=>i.isEqual(e)))}/**
2164 * @license
2165 * Copyright 2020 Google LLC
2166 *
2167 * Licensed under the Apache License, Version 2.0 (the "License");
2168 * you may not use this file except in compliance with the License.
2169 * You may obtain a copy of the License at
2170 *
2171 *   http://www.apache.org/licenses/LICENSE-2.0
2172 *
2173 * Unless required by applicable law or agreed to in writing, software
2174 * distributed under the License is distributed on an "AS IS" BASIS,
2175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2176 * See the License for the specific language governing permissions and
2177 * limitations under the License.
2178 */class hR{convertValue(e,i="none"){switch(Pa(e)){case 0:return null;case 1:return e.booleanValue;case 2:return de(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,i);case 5:return e.stringValue;case 6:return this.convertBytes(Ua(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,i);case 11:return this.convertObject(e.mapValue,i);case 10:return this.convertVectorValue(e.mapValue);default:throw ft(62114,{value:e})}}convertObject(e,i){return this.convertObjectMap(e.fields,i)}convertObjectMap(e,i="none"){const r={};return xs(e,((o,h)=>{r[o]=this.convertValue(h,i)})),r}convertVectorValue(e){var r,o,h;const i=(h=(o=(r=e.fields)==null?void 0:r[dc].arrayValue)==null?void 0:o.values)==null?void 0:h.map((d=>de(d.doubleValue)));return new Xn(i)}convertGeoPoint(e){return new Ai(de(e.latitude),de(e.longitude))}convertArray(e,i){return(e.values||[]).map((r=>this.convertValue(r,i)))}convertServerTimestamp(e,i){switch(i){case"previous":const r=Nc(e);return r==null?null:this.convertValue(r,i);case"estimate":return this.convertTimestamp(lo(e));default:return null}}convertTimestamp(e){const i=La(e);return new ee(i.seconds,i.nanos)}convertDocumentKey(e,i){const r=Jt.fromString(e);Bt(zv(r),9688,{name:e});const o=new oo(r.get(1),r.get(3)),h=new ut(r.popFirst(5));return o.isEqual(i)||Ki(`Document ${h} contains a document reference within a different database (${o.projectId}/${o.database}) which is not supported. It will be treated as a reference in the current database (${i.projectId}/${i.database}) instead.`),h}}/**
2179 * @license
2180 * Copyright 2024 Google LLC
2181 *
2182 * Licensed under the Apache License, Version 2.0 (the "License");
2183 * you may not use this file except in compliance with the License.
2184 * You may obtain a copy of the License at
2185 *
2186 *   http://www.apache.org/licenses/LICENSE-2.0
2187 *
2188 * Unless required by applicable law or agreed to in writing, software
2189 * distributed under the License is distributed on an "AS IS" BASIS,
2190 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2191 * See the License for the specific language governing permissions and
2192 * limitations under the License.
2193 */class fR extends hR{constructor(e){super(),this.firestore=e}convertBytes(e){return new zn(e)}convertReference(e){const i=this.convertDocumentKey(e,this.firestore._databaseId);return new Le(this.firestore,null,i)}}const u0="@firebase/firestore",c0="4.12.0";/**
2194 * @license
2195 * Copyright 2020 Google LLC
2196 *
2197 * Licensed under the Apache License, Version 2.0 (the "License");
2198 * you may not use this file except in compliance with the License.
2199 * You may obtain a copy of the License at
2200 *
2201 *   http://www.apache.org/licenses/LICENSE-2.0
2202 *
2203 * Unless required by applicable law or agreed to in writing, software
2204 * distributed under the License is distributed on an "AS IS" BASIS,
2205 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2206 * See the License for the specific language governing permissions and
2207 * limitations under the License.
2208 */class mE{constructor(e,i,r,o,h){this._firestore=e,this._userDataWriter=i,this._key=r,this._document=o,this._converter=h}get id(){return this._key.path.lastSegment()}get ref(){return new Le(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new dR(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){var e;return((e=this._document)==null?void 0:e.data.clone().value.mapValue.fields)??void 0}get(e){if(this._document){const i=this._document.data.field(Pc("DocumentSnapshot.get",e));if(i!==null)return this._userDataWriter.convertValue(i)}}}class dR extends mE{data(){return super.data()}}/**
2209 * @license
2210 * Copyright 2020 Google LLC
2211 *
2212 * Licensed under the Apache License, Version 2.0 (the "License");
2213 * you may not use this file except in compliance with the License.
2214 * You may obtain a copy of the License at
2215 *
2216 *   http://www.apache.org/licenses/LICENSE-2.0
2217 *
2218 * Unless required by applicable law or agreed to in writing, software
2219 * distributed under the License is distributed on an "AS IS" BASIS,
2220 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2221 * See the License for the specific language governing permissions and
2222 * limitations under the License.
2223 */function mR(s){if(s.limitType==="L"&&s.explicitOrderBy.length===0)throw new at(X.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class dm{}class gR extends dm{}function h0(s,e,...i){let r=[];e instanceof dm&&r.push(e),r=r.concat(i),(function(h){const d=h.filter((v=>v instanceof mm)).length,y=h.filter((v=>v instanceof Bc)).length;if(d>1||d>0&&y>0)throw new at(X.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 o of r)s=o._apply(s);return s}class Bc extends gR{constructor(e,i,r){super(),this._field=e,this._op=i,this._value=r,this.type="where"}static _create(e,i,r){return new Bc(e,i,r)}_apply(e){const i=this._parse(e);return gE(e._query,i),new Br(e.firestore,e.converter,_d(e._query,i))}_parse(e){const i=cE(e.firestore);return(function(h,d,y,v,p,b,A){let O;if(p.isKeyField()){if(b==="array-contains"||b==="array-contains-any")throw new at(X.INVALID_ARGUMENT,`Invalid Query. You can't perform '${b}' queries on documentId().`);if(b==="in"||b==="not-in"){m0(A,b);const J=[];for(const et of A)J.push(d0(v,h,et));O={arrayValue:{values:J}}}else O=d0(v,h,A)}else b!=="in"&&b!=="not-in"&&b!=="array-contains-any"||m0(A,b),O=lR(y,d,A,b==="in"||b==="not-in");return we.create(p,b,O)})(e._query,"where",i,e.firestore._databaseId,this._field,this._op,this._value)}}function f0(s,e,i){const r=e,o=Pc("where",s);return Bc._create(o,r,i)}class mm extends dm{constructor(e,i){super(),this.type=e,this._queryConstraints=i}static _create(e,i){return new mm(e,i)}_parse(e){const i=this._queryConstraints.map((r=>r._parse(e))).filter((r=>r.getFilters().length>0));return i.length===1?i[0]:Zn.create(i,this._getOperator())}_apply(e){const i=this._parse(e);return i.getFilters().length===0?e:((function(o,h){let d=o;const y=h.getFlattenedFilters();for(const v of y)gE(d,v),d=_d(d,v)})(e._query,i),new Br(e.firestore,e.converter,_d(e._query,i)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}
2223function d0(s,e,i){if(typeof(i=Fi(i))=="string"){if(i==="")throw new at(X.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!fv(e)&&i.indexOf("/")!==-1)throw new at(X.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${i}' contains a '/' character.`);const r=e.path.child(Jt.fromString(i));if(!ut.isDocumentKey(r))throw new at(X.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 R_(s,new ut(r))}if(i instanceof Le)return R_(s,i._key);throw new at(X.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Rc(i)}.`)}function m0(s,e){if(!Array.isArray(s)||s.length===0)throw new at(X.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function gE(s,e){const i=(function(o,h){for(const d of o)for(const y of d.getFlattenedFilters())if(h.indexOf(y.op)>=0)return y.op;return null})(s.filters,(function(o){switch(o){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}})(e.op));if(i!==null)throw i===e.op?new at(X.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new at(X.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${i.toString()}' filters.`)}function pR(s,e,i){let r;return r=s?s.toFirestore(e):e,r}class tc{constructor(e,i){this.hasPendingWrites=e,this.fromCache=i}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class xr extends mE{constructor(e,i,r,o,h,d){super(e,i,r,o,d),this._firestore=e,this._firestoreImpl=e,this.metadata=h}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const i=new lc(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(i,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,i={}){if(this._document){const r=this._document.data.field(Pc("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,i.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new at(X.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,i={};return i.type=xr._jsonSchemaVersion,i.bundle="",i.bundleSource="DocumentSnapshot",i.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?i:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),i.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),i)}}xr._jsonSchemaVersion="firestore/documentSnapshot/1.0",xr._jsonSchema={type:Re("string",xr._jsonSchemaVersion),bundleSource:Re("string","DocumentSnapshot"),bundleName:Re("string"),bundle:Re("string")};class lc extends xr{data(e={}){return super.data(e)}}class Nr{constructor(e,i,r,o){this._firestore=e,this._userDataWriter=i,this._snapshot=o,this.metadata=new tc(o.hasPendingWrites,o.fromCache),this.query=r}get docs(){const e=[];return this.forEach((i=>e.push(i))),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,i){this._snapshot.docs.forEach((r=>{e.call(i,new lc(this._firestore,this._userDataWriter,r.key,r,new tc(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const i=!!e.includeMetadataChanges;if(i&&this._snapshot.excludesMetadataChanges)throw new at(X.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===i||(this._cachedChanges=(function(o,h){
2223if(o._snapshot.oldDocs.isEmpty()){let d=0;return o._snapshot.docChanges.map((y=>{const v=new lc(o._firestore,o._userDataWriter,y.doc.key,y.doc,new tc(o._snapshot.mutatedKeys.has(y.doc.key),o._snapshot.fromCache),o.query.converter);return y.doc,{type:"added",doc:v,oldIndex:-1,newIndex:d++}}))}{let d=o._snapshot.oldDocs;return o._snapshot.docChanges.filter((y=>h||y.type!==3)).map((y=>{const v=new lc(o._firestore,o._userDataWriter,y.doc.key,y.doc,new tc(o._snapshot.mutatedKeys.has(y.doc.key),o._snapshot.fromCache),o.query.converter);let p=-1,b=-1;return y.type!==0&&(p=d.indexOf(y.doc.key),d=d.delete(y.doc.key)),y.type!==1&&(d=d.add(y.doc),b=d.indexOf(y.doc.key)),{type:yR(y.type),doc:v,oldIndex:p,newIndex:b}}))}})(this,i),this._cachedChangesIncludeMetadataChanges=i),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new at(X.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=Nr._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=kd.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const i=[],r=[],o=[];return this.docs.forEach((h=>{h._document!==null&&(i.push(h._document),r.push(this._userDataWriter.convertObjectMap(h._document.data.value.mapValue.fields,"previous")),o.push(h.ref.path))})),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function yR(s){switch(s){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ft(61501,{type:s})}}/**
2224 * @license
2225 * Copyright 2022 Google LLC
2226 *
2227 * Licensed under the Apache License, Version 2.0 (the "License");
2228 * you may not use this file except in compliance with the License.
2229 * You may obtain a copy of the License at
2230 *
2231 *   http://www.apache.org/licenses/LICENSE-2.0
2232 *
2233 * Unless required by applicable law or agreed to in writing, software
2234 * distributed under the License is distributed on an "AS IS" BASIS,
2235 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2236 * See the License for the specific language governing permissions and
2237 * limitations under the License.
2238 */Nr._jsonSchemaVersion="firestore/querySnapshot/1.0",Nr._jsonSchema={type:Re("string",Nr._jsonSchemaVersion),bundleSource:Re("string","QuerySnapshot"),bundleName:Re("string"),bundle:Re("string")};function $l(s){s=cc(s,Br);const e=cc(s.firestore,cm),i=rE(e),r=new fR(e);return mR(s._query),Xw(i,s._query).then((o=>new Nr(e,r,s,o)))}function g0(s,e){const i=cc(s.firestore,cm),r=tR(s),o=pR(s.converter,e),h=cE(s.firestore);return _R(i,[rR(h,"addDoc",r._key,o,s.converter!==null,{}).toMutation(r._key,Gi.exists(!1))]).then((()=>r))}function _R(s,e){const i=rE(s);return Zw(i,e)}(function(e,i=!0){YA(MA),za(new Qi("firestore",((r,{instanceIdentifier:o,options:h})=>{const d=r.getProvider("app").getImmediate(),y=new cm(new ZA(r.getProvider("auth-internal")),new WA(d,r.getProvider("app-check-internal")),pS(d,o),d);return h={useFetchStreams:i,...h},y._setSettings(h),y}),"PUBLIC").setMultipleInstances(!0)),Ei(u0,c0,e),Ei(u0,c0,"esm2020")})();const pE="@firebase/installations",gm="0.6.20";/**
2239 * @license
2240 * Copyright 2019 Google LLC
2241 *
2242 * Licensed under the Apache License, Version 2.0 (the "License");
2243 * you may not use this file except in compliance with the License.
2244 * You may obtain a copy of the License at
2245 *
2246 *   http://www.apache.org/licenses/LICENSE-2.0
2247 *
2248 * Unless required by applicable law or agreed to in writing, software
2249 * distributed under the License is distributed on an "AS IS" BASIS,
2250 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2251 * See the License for the specific language governing permissions and
2252 * limitations under the License.
2253 */const yE=1e4,_E=`w:${gm}`,vE="FIS_v2",vR="https://firebaseinstallations.googleapis.com/v1",ER=3600*1e3,TR="installations",bR="Installations";/**
2254 * @license
2255 * Copyright 2019 Google LLC
2256 *
2257 * Licensed under the Apache License, Version 2.0 (the "License");
2258 * you may not use this file except in compliance with the License.
2259 * You may obtain a copy of the License at
2260 *
2261 *   http://www.apache.org/licenses/LICENSE-2.0
2262 *
2263 * Unless required by applicable law or agreed to in writing, softw
2263are
2264 * distributed under the License is distributed on an "AS IS" BASIS,
2265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2266 * See the License for the specific language governing permissions and
2267 * limitations under the License.
2268 */const AR={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},Rs=new wc(TR,bR,AR);function EE(s){return s instanceof qa&&s.code.includes("request-failed")}/**
2269 * @license
2270 * Copyright 2019 Google LLC
2271 *
2272 * Licensed under the Apache License, Version 2.0 (the "License");
2273 * you may not use this file except in compliance with the License.
2274 * You may obtain a copy of the License at
2275 *
2276 *   http://www.apache.org/licenses/LICENSE-2.0
2277 *
2278 * Unless required by applicable law or agreed to in writing, software
2279 * distributed under the License is distributed on an "AS IS" BASIS,
2280 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2281 * See the License for the specific language governing permissions and
2282 * limitations under the License.
2283 */function TE({projectId:s}){return`${vR}/projects/${s}/installations`}function bE(s){return{token:s.token,requestStatus:2,expiresIn:wR(s.expiresIn),creationTime:Date.now()}}async function AE(s,e){const r=(await e.json()).error;return Rs.create("request-failed",{requestName:s,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function SE({apiKey:s}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":s})}function SR(s,{refreshToken:e}){const i=SE(s);return i.append("Authorization",RR(e)),i}async function wE(s){const e=await s();return e.status>=500&&e.status<600?s():e}function wR(s){return Number(s.replace("s","000"))}function RR(s){return`${vE} ${s}`}/**
2284 * @license
2285 * Copyright 2019 Google LLC
2286 *
2287 * Licensed under the Apache License, Version 2.0 (the "License");
2288 * you may not use this file except in compliance with the License.
2289 * You may obtain a copy of the License at
2290 *
2291 *   http://www.apache.org/licenses/LICENSE-2.0
2292 *
2293 * Unless required by applicable law or agreed to in writing, software
2294 * distributed under the License is distributed on an "AS IS" BASIS,
2295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2296 * See the License for the specific language governing permissions and
2297 * limitations under the License.
2298 */async function CR({appConfig:s,heartbeatServiceProvider:e},{fid:i}){const r=TE(s),o=SE(s),h=e.getImmediate({optional:!0});if(h){const p=await h.getHeartbeatsHeader();p&&o.append("x-firebase-client",p)}const d={fid:i,authVersion:vE,appId:s.appId,sdkVersion:_E},y={method:"POST",headers:o,body:JSON.stringify(d)},v=await wE(()=>fetch(r,y));if(v.ok){const p=await v.json();return{fid:p.fid||i,registrationStatus:2,refreshToken:p.refreshToken,authToken:bE(p.authToken)}}else throw await AE("Create Installation",v)}/**
2299 * @license
2300 * Copyright 2019 Google LLC
2301 *
2302 * Licensed under the Apache License, Version 2.0 (the "License");
2303 * you may not use this file except in compliance with the License.
2304 * You may obtain a copy of the License at
2305 *
2306 *   http://www.apache.org/licenses/LICENSE-2.0
2307 *
2308 * Unless required by applicable law or agreed to in writing, software
2309 * distributed under the License is distributed on an "AS IS" BASIS,
2310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2311 * See the License for the specific language governing permissions and
2312 * limitations under the License.
2313 */function RE(s){return new Promise(e=>{setTimeout(e,s)})}/**
2314 * @license
2315 * Copyright 2019 Google LLC
2316 *
2317 * Licensed under the Apache License, Version 2.0 (the "License");
2318 * you may not use this file except in compliance with the License.
2319 * You may obtain a copy of the License at
2320 *
2321 *   http://www.apache.org/licenses/LICENSE-2.0
2322 *
2323 * Unless required by applicable law or agreed to in writing, softw
2323are
2324 * distributed under the License is distributed on an "AS IS" BASIS,
2325 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2326 * See the License for the specific language governing permissions and
2327 * limitations under the License.
2328 */function xR(s){return btoa(String.fromCharCode(...s)).replace(/\+/g,"-").replace(/\//g,"_")}/**
2329 * @license
2330 * Copyright 2019 Google LLC
2331 *
2332 * Licensed under the Apache License, Version 2.0 (the "License");
2333 * you may not use this file except in compliance with the License.
2334 * You may obtain a copy of the License at
2335 *
2336 *   http://www.apache.org/licenses/LICENSE-2.0
2337 *
2338 * Unless required by applicable law or agreed to in writing, software
2339 * distributed under the License is distributed on an "AS IS" BASIS,
2340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2341 * See the License for the specific language governing permissions and
2342 * limitations under the License.
2343 */const NR=/^[cdef][\w-]{21}$/,Id="";function IR(){try{const s=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(s),s[0]=112+s[0]%16;const i=DR(s);return NR.test(i)?i:Id}catch{return Id}}function DR(s){return xR(s).substr(0,22)}/**
2344 * @license
2345 * Copyright 2019 Google LLC
2346 *
2347 * Licensed under the Apache License, Version 2.0 (the "License");
2348 * you may not use this file except in compliance with the License.
2349 * You may obtain a copy of the License at
2350 *
2351 *   http://www.apache.org/licenses/LICENSE-2.0
2352 *
2353 * Unless required by applicable law or agreed to in writing, software
2354 * distributed under the License is distributed on an "AS IS" BASIS,
2355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2356 * See the License for the specific language governing permissions and
2357 * limitations under the License.
2358 */function kc(s){return`${s.appName}!${s.appId}`}/**
2359 * @license
2360 * Copyright 2019 Google LLC
2361 *
2362 * Licensed under the Apache License, Version 2.0 (the "License");
2363 * you may not use this file except in compliance with the License.
2364 * You may obtain a copy of the License at
2365 *
2366 *   http://www.apache.org/licenses/LICENSE-2.0
2367 *
2368 * Unless required by applicable law or agreed to in writing, software
2369 * distributed under the License is distributed on an "AS IS" BASIS,
2370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2371 * See the License for the specific language governing permissions and
2372 * limitations under the License.
2373 */const CE=new Map;function xE(s,e){const i=kc(s);NE(i,e),VR(i,e)}function NE(s,e){const i=CE.get(s);if(i)for(const r of i)r(e)}function VR(s,e){const i=OR();i&&i.postMessage({key:s,fid:e}),MR()}let bs=null;function OR(){return!bs&&"BroadcastChannel"in self&&(bs=new BroadcastChannel("[Firebase] FID Change"),bs.onmessage=s=>{NE(s.data.key,s.data.fid)}),bs}function MR(){CE.size===0&&bs&&(bs.close(),bs=null)}/**
2374 * @license
2375 * Copyright 2019 Google LLC
2376 *
2377 * Licensed under the Apache License, Version 2.0 (the "License");
2378 * you may not use this file except in compliance with the License.
2379 * You may obtain a copy of the License at
2380 *
2381 *   http://www.apache.org/licenses/LICENSE-2.0
2382 *
2383 * Unless required by applicable law or agreed to in writing, software
2384 * distributed under the License is distributed on an "AS IS" BASIS,
2385 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2386 * See the License for the specific language governing permissions and
2387 * limitations under the License.
2388 */const zR="firebase-installations-database",jR=1,Cs="firebase-installations-store";let id=null;function pm(){return id||(id=M0(zR,jR,{upgrade:(s,e)=>{switch(e){case 0:s.createObjectStore(Cs)}}})),id}async function Ac(s,e){const i=kc(s),o=(await pm()).transaction(Cs,"readwrite"),h=o.objectStore(Cs),d=await h.get(i);return await h.put(e,i),await o.done,(!d||d.fid!==e.fid)&&xE(s,e.fid),e}async function IE(s){const e=kc(s),r=(await pm()).transaction(Cs,"readwrite");await r.objectStore(Cs).delete(e),await r.done}async function qc(s,e){const i=kc(s),o=(await pm()).transaction(Cs,"readwrite"),h=o.objectStore(Cs),d=await h.get(i),y=e(d);return y===void 0?await h.delete(i):await h.put(y,i),await o.done,y&&(!d||d.fid!==y.fid)&&xE(s,y.fid),y}/**
2389 * @license
2390 * Copyright 2019 Google LLC
2391 *
2392 * Licensed under the Apache License, Version 2.0 (the "License");
2393 * you may not use this file except in compliance with the License.
2394 * You may obtain a copy of the License at
2395 *
2396 *   http://www.apache.org/licenses/LICENSE-2.0
2397 *
2398 * Unless required by applicable law or agreed to in writing, software
2399 * distributed under the License is distributed on an "AS IS" BASIS,
2400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2401 * See the License for the specific language governing permissions and
2402 * limitations under the License.
2403 */async function ym(s){let e;const i=await qc(s.appConfig,r=>{const o=LR(r),h=UR(s,o);return e=h.registrationPromise,h.installationEntry});return i.fid===Id?{installationEntry:await e}:{installationEntry:i,registrationPromise:e}}function LR(s){const e=s||{fid:IR(),registrationStatus:0};return DE(e)}function UR(s,e){if(e.registrationStatus===0){if(!navigator.onLine){const o=Promise.reject(Rs.create("app-offline"));return{installationEntry:e,registrationPromise:o}}const i={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},r=PR(s,i);return{installationEntry:i,registrationPromise:r}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:BR(s)}:{installationEntry:e}}async function PR(s,e){try{const i=await CR(s,e);return Ac(s.appConfig,i)}catch(i){throw EE(i)&&i.customData.serverCode===409?await IE(s.appConfig):await Ac(s.appConfig,{fid:e.fid,registrationStatus:0}),i}}async function BR(s){let e=await p0(s.appConfig);for(;e.registrationStatus===1;)await RE(100),e=await p0(s.appConfig);if(e.registrationStatus===0){const{installationEntry:i,registrationPromise:r}=await ym(s);return r||i}return e}function p0(s){return qc(s,e=>{if(!e)throw Rs.create("installation-not-found");return DE(e)})}function DE(s){return kR(s)?{fid:s.fid,registrationStatus:0}:s}function kR(s){return s.registrationStatus===1&&s.registrationTime+yE<Date.now()}/**
2404 * @license
2405 * Copyright 2019 Google LLC
2406 *
2407 * Licensed under the Apache License, Version 2.0 (the "License");
2408 * you may not use this file except in compliance with the License.
2409 * You may obtain a copy of the License at
2410 *
2411 *   http://www.apache.org/licenses/LICENSE-2.0
2412 *
2413 * Unless required by applicable law or agreed to in writing, software
2414 * distributed under the License is distributed on an "AS IS" BASIS,
2415 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2416 * See the License for the specific language governing permissions and
2417 * limitations under the License.
2418 */async function qR({appConfig:s,heartbeatServiceProvider:e},i){const r=HR(s,i),o=SR(s,i),h=e.getImmediate({optional:!0});if(h){const p=await h.getHeartbeatsHeader();p&&o.append("x-firebase-client",p)}const d={installation:{sdkVersion:_E,appId:s.appId}},y={method:"POST",headers:o,body:JSON.stringify(d)},v=await wE(()=>fetch(r,y));if(v.ok){const p=await v.json();return bE(p)}else throw await AE("Generate Auth Token",v)}function HR(s,{fid:e}){return`${TE(s)}/${e}/authTokens:generate`}/**
2419 * @license
2420 * Copyright 2019 Google LLC
2421 *
2422 * Licensed under the Apache License, Version 2.0 (the "License");
2423 * you may not use this file except in compliance with the License.
2424 * You may obtain a copy of the License at
2425 *
2426 *   http://www.apache.org/licenses/LICENSE-2.0
2427 *
2428 * Unless required by applicable law or agreed to in writing, software
2429 * distributed under the License is distributed on an "AS IS" BASIS,
2430 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2431 * See the License for the specific language governing permissions and
2432 * limitations under the License.
2433 */async function _m(s,e=!1){let i;const r=await qc(s.appConfig,h=>{if(!VE(h))throw Rs.create("not-registered");const d=h.authToken;if(!e&&QR(d))return h;if(d.requestStatus===1)return i=GR(s,e),h;{if(!navigator.onLine)throw Rs.create("app-offline");const y=KR(h);return i=FR(s,y),y}});return i?await i:r.authToken}async function GR(s,e){let i=await y0(s.appConfig);for(;i.authToken.requestStatus===1;)await RE(100),i=await y0(s.appConfig);const r=i.authToken;return r.requestStatus===0?_m(s,e):r}function y0(s){return qc(s,e=>{if(!VE(e))throw Rs.create("not-registered");const i=e.authToken;return XR(i)?{...e,authToken:{requestStatus:0}}:e})}async function FR(s,e){try{const i=await qR(s,e),r={...e,authToken:i};return await Ac(s.appConfig,r),i}catch(i){if(EE(i)&&(i.customData.serverCode===401||i.customData.serverCode===404))await IE(s.appConfig);else{const r={...e,authToken:{requestStatus:0}};await Ac(s.appConfig,r)}throw i}}function VE(s){return s!==void 0&&s.registrationStatus===2}function QR(s){return s.requestStatus===2&&!YR(s)}function YR(s){const e=Date.now();return e<s.creationTime||s.creationTime+s.expiresIn<e+ER}function KR(s){const e={requestStatus:1,requestTime:Date.now()};return{...s,authToken:e}}function XR(s){return s.requestStatus===1&&s.requestTime+yE<Date.now()}/**
2434 * @license
2435 * Copyright 2019 Google LLC
2436 *
2437 * Licensed under the Apache License, Version 2.0 (the "License");
2438 * you may not use this file except in compliance with the License.
2439 * You may obtain a copy of the License at
2440 *
2441 *   http://www.apache.org/licenses/LICENSE-2.0
2442 *
2443 * Unless required by applicable law or agreed to in writing, software
2444 * distributed under the License is distributed on an "AS IS" BASIS,
2445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2446 * See the License for the specific language governing permissions and
2447 * limitations under the License.
2448 */async function ZR(s){const e=s,{installationEntry:i,registrationPromise:r}=await ym(e);return r?r.catch(console.error):_m(e).catch(console.error),i.fid}/**
2449 * @license
2450 * Copyright 2019 Google LLC
2451 *
2452 * Licensed under the Apache License, Version 2.0 (the "License");
2453 * you may not use this file except in compliance with the License.
2454 * You may obtain a copy of the License at
2455 *
2456 *   http://www.apache.org/licenses/LICENSE-2.0
2457 *
2458 * Unless required by applicable law or agreed to in writing, software
2459 * distributed under the License is distributed on an "AS IS" BASIS,
2460 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2461 * See the License for the specific language governing permissions and
2462 * limitations under the License.
2463 */async function $R(s,e=!1){const i=s;return await JR(i),(await _m(i,e)).token}async function JR(s){const{registrationPromise:e}=await ym(s);e&&await e}/**
2464 * @license
2465 * Copyright 2019 Google LLC
2466 *
2467 * Licensed under the Apache License, Version 2.0 (the "License");
2468 * you may not use this file except in compliance with the License.
2469 * You may obtain a copy of the License at
2470 *
2471 *   http://www.apache.org/licenses/LICENSE-2.0
2472 *
2473 * Unless required by applicable law or agreed to in writing, software
2474 * distributed under the License is distributed on an "AS IS" BASIS,
2475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2476 * See the License for the specific language governing permissions and
2477 * limitations under the License.
2478 */function WR(s){if(!s||!s.options)throw ad("App Configuration");if(!s.name)throw ad("App Name");const e=["projectId","apiKey","appId"];for(const i of e)if(!s.options[i])throw ad(i);return{appName:s.name,projectId:s.options.projectId,apiKey:s.options.apiKey,appId:s.options.appId}}function ad(s){return Rs.create("missing-app-config-values",{valueName:s})}/**
2479 * @license
2480 * Copyright 2020 Google LLC
2481 *
2482 * Licensed under the Apache License, Version 2.0 (the "License");
2483 * you may not use this file except in compliance with the License.
2484 * You may obtain a copy of the License at
2485 *
2486 *   http://www.apache.org/licenses/LICENSE-2.0
2487 *
2488 * Unless required by applicable law or agreed to in writing, software
2489 * distributed under the License is distributed on an "AS IS" BASIS,
2490 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2491 * See the License for the specific language governing permissions and
2492 * limitations under the License.
2493 */const OE="installations",tC="installations-internal",eC=s=>{const e=s.getProvider("app").getImmediate(),i=WR(e),r=fo(e,"heartbeat");return{app:e,appConfig:i,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},nC=s=>{const e=s.getProvider("app").getImmediate(),i=fo(e,OE).getImmediate();return{getId:()=>ZR(i),getToken:o=>$R(i,o)}};function iC(){za(new Qi(OE,eC,"PUBLIC")),za(new Qi(tC,nC,"PRIVATE"))}iC();Ei(pE,gm);Ei(pE,gm,"esm2020");/**
2494 * @license
2495 * Copyright 2019 Google LLC
2496 *
2497 * Licensed under the Apache License, Version 2.0 (the "License");
2498 * you may not use this file except in compliance with the License.
2499 * You may obtain a copy of the License at
2500 *
2501 *   http://www.apache.org/licenses/LICENSE-2.0
2502 *
2503 * Unless required by applicable law or agreed to in writing, software
2504 * distributed under the License is distributed on an "AS IS" BASIS,
2505 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2506 * See the License for the specific language governing permissions and
2507 * limitations under the License.
2508 */const Sc="analytics",aC="firebase_id",sC="origin",rC=60*1e3,lC="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",vm="https://www.googletagmanager.com/gtag/js";/**
2509 * @license
2510 * Copyright 2019 Google LLC
2511 *
2512 * Licensed under the Apache License, Version 2.0 (the "License");
2513 * you may not use this file except in compliance with the License.
2514 * You may obtain a copy of the License at
2515 *
2516 *   http://www.apache.org/licenses/LICENSE-2.0
2517 *
2518 * Unless required by applicable law or agreed to in writing, software
2519 * distributed under the License is distributed on an "AS IS" BASIS,
2520 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2521 * See the License for the specific language governing permissions and
2522 * limitations under the License.
2523 */const tn=new Ud("@firebase/analytics");/**
2524 * @license
2525 * Copyright 2019 Google LLC
2526 *
2527 * Licensed under the Apache License, Version 2.0 (the "License");
2528 * you may not use this file except in compliance with the License.
2529 * You may obtain a copy of the License at
2530 *
2531 *   http://www.apache.org/licenses/LICENSE-2.0
2532 *
2533 * Unless required by applicable law or agreed to in writing, software
2534 * distributed under the License is distributed on an "AS IS" BASIS,
2535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2536 * See the License for the specific language governing permissions and
2537 * limitations under the License.
2538 */const oC={"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},En=new wc("analytics","Analytics",oC);/**
2539 * @license
2540 * Copyright 2019 Google LLC
2541 *
2542 * Licensed under the Apache License, Version 2.0 (the "License");
2543 * you may not use this file except in compliance with the License.
2544 * You may obtain a copy of the License at
2545 *
2546 *   http://www.apache.org/licenses/LICENSE-2.0
2547 *
2548 * Unless required by applicable law or agreed to in writing, software
2549 * distributed under the License is distributed on an "AS IS" BASIS,
2550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2551 * See the License for the specific language governing permissions and
2552 * limitations under the License.
2553 */function uC(s){if(!s.startsWith(vm)){const e=En.create("invalid-gtag-resource",{gtagURL:s});return tn.warn(e.message),""}return s}function ME(s){return Promise.all(s.map(e=>e.catch(i=>i)))}function cC(s,e){let i;return window.trustedTypes&&(i=window.trustedTypes.createPolicy(s,e)),i}function hC(s,e){const i=cC("firebase-js-sdk-policy",{createScriptURL:uC}),r=document.createElement("script"),o=`${vm}?l=${s}&id=${e}`;r.src=i?i==null?void 0:i.createScriptURL(o):o,r.async=!0,document.head.appendChild(r)}function fC(s){let e=[];return Array.isArray(window[s])?e=window[s]:window[s]=e,e}async function dC(s,e,i,r,o,h){const d=r[o];try{if(d)await e[d];else{const v=(await ME(i)).find(p=>p.measurementId===o);v&&await e[v.appId]}}catch(y){tn.error(y)}s("config",o,h)}async function mC(s,e,i,r,o){try{let h=[];if(o&&o.send_to){let d=o.send_to;
2553Array.isArray(d)||(d=[d]);const y=await ME(i);for(const v of d){const p=y.find(A=>A.measurementId===v),b=p&&e[p.appId];if(b)h.push(b);else{h=[];break}}}h.length===0&&(h=Object.values(e)),await Promise.all(h),s("event",r,o||{})}catch(h){tn.error(h)}}function gC(s,e,i,r){async function o(h,...d){try{if(h==="event"){const[y,v]=d;await mC(s,e,i,y,v)}else if(h==="config"){const[y,v]=d;await dC(s,e,i,r,y,v)}else if(h==="consent"){const[y,v]=d;s("consent",y,v)}else if(h==="get"){const[y,v,p]=d;s("get",y,v,p)}else if(h==="set"){const[y]=d;s("set",y)}else s(h,...d)}catch(y){tn.error(y)}}return o}function pC(s,e,i,r,o){let h=function(...d){window[r].push(arguments)};return window[o]&&typeof window[o]=="function"&&(h=window[o]),window[o]=gC(h,s,e,i),{gtagCore:h,wrappedGtag:window[o]}}function yC(s){const e=window.document.getElementsByTagName("script");for(const i of Object.values(e))if(i.src&&i.src.includes(vm)&&i.src.includes(s))return i;return null}/**
2554 * @license
2555 * Copyright 2020 Google LLC
2556 *
2557 * Licensed under the Apache License, Version 2.0 (the "License");
2558 * you may not use this file except in compliance with the License.
2559 * You may obtain a copy of the License at
2560 *
2561 *   http://www.apache.org/licenses/LICENSE-2.0
2562 *
2563 * Unless required by applicable law or agreed to in writing, software
2564 * distributed under the License is distributed on an "AS IS" BASIS,
2565 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2566 * See the License for the specific language governing permissions and
2567 * limitations under the License.
2568 */const _C=30,vC=1e3;class EC{constructor(e={},i=vC){this.throttleMetadata=e,this.intervalMillis=i}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,i){this.throttleMetadata[e]=i}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const zE=new EC;function TC(s){return new Headers({Accept:"application/json","x-goog-api-key":s})}async function bC(s){var d;const{appId:e,apiKey:i}=s,r={method:"GET",headers:TC(i)},o=lC.replace("{app-id}",e),h=await fetch(o,r);if(h.status!==200&&h.status!==304){let y="";try{const v=await h.json();(d=v.error)!=null&&d.message&&(y=v.error.message)}catch{}throw En.create("config-fetch-failed",{httpStatus:h.status,responseMessage:y})}return h.json()}async function AC(s,e=zE,i){const{appId:r,apiKey:o,measurementId:h}=s.options;if(!r)throw En.create("no-app-id");if(!o){if(h)return{measurementId:h,appId:r};throw En.create("no-api-key")}const d=e.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},y=new RC;return setTimeout(async()=>{y.abort()},rC),jE({appId:r,apiKey:o,measurementId:h},d,y,e)}async function jE(s,{throttleEndTimeMillis:e,backoffCount:i},r,o=zE){var y;const{appId:h,measurementId:d}=s;try{await SC(r,e)}catch(v){if(d)return tn.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${d} provided in the "measurementId" field in the local Firebase config. [${v==null?void 0:v.message}]`),{appId:h,measurementId:d};throw v}try{const v=await bC(s);return o.deleteThrottleMetadata(h),v}catch(v){const p=v;if(!wC(p)){if(o.deleteThrottleMetadata(h),d)return tn.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${d} provided in the "measurementId" field in the local Firebase config. [${p==null?void 0:p.message}]`),{appId:h,measurementId:d};throw v}const b=Number((y=p==null?void 0:p.customData)==null?void 0:y.httpStatus)===503?s_(i,o.intervalMillis,_C):s_(i,o.intervalMillis),A={throttleEndTimeMillis:Date.now()+b,backoffCount:i+1};return o.setThrottleMetadata(h,A),tn.debug(`Calling attemptFetch again in ${b} millis`),jE(s,A,r,o)}}function SC(s,e){return new Promise((i,r)=>{const o=Math.max(e-Date.now(),0),h=setTimeout(i,o);s.addEventListener(()=>{clearTimeout(h),r(En.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function wC(s){if(!(s instanceof qa)||!s.customData)return!1;const e=Number(s.customData.httpStatus);return e===429||e===500||e===503||e===504}class RC{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}
2568abort(){this.listeners.forEach(e=>e())}}async function CC(s,e,i,r,o){if(o&&o.global){s("event",i,r);return}else{const h=await e,d={...r,send_to:h};s("event",i,d)}}async function xC(s,e,i,r){if(r&&r.global){const o={};for(const h of Object.keys(i))o[`user_properties.${h}`]=i[h];return s("set",o),Promise.resolve()}else{const o=await e;s("config",o,{update:!0,user_properties:i})}}/**
2569 * @license
2570 * Copyright 2020 Google LLC
2571 *
2572 * Licensed under the Apache License, Version 2.0 (the "License");
2573 * you may not use this file except in compliance with the License.
2574 * You may obtain a copy of the License at
2575 *
2576 *   http://www.apache.org/licenses/LICENSE-2.0
2577 *
2578 * Unless required by applicable law or agreed to in writing, software
2579 * distributed under the License is distributed on an "AS IS" BASIS,
2580 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2581 * See the License for the specific language governing permissions and
2582 * limitations under the License.
2583 */async function NC(){if(I0())try{await D0()}catch(s){return tn.warn(En.create("indexeddb-unavailable",{errorInfo:s==null?void 0:s.toString()}).message),!1}else return tn.warn(En.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function IC(s,e,i,r,o,h,d){const y=AC(s);y.then(O=>{i[O.measurementId]=O.appId,s.options.measurementId&&O.measurementId!==s.options.measurementId&&tn.warn(`The measurement ID in the local Firebase config (${s.options.measurementId}) does not match the measurement ID fetched from the server (${O.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(O=>tn.error(O)),e.push(y);const v=NC().then(O=>{if(O)return r.getId()}),[p,b]=await Promise.all([y,v]);yC(h)||hC(h,p.measurementId),o("js",new Date);const A=(d==null?void 0:d.config)??{};return A[sC]="firebase",A.update=!0,b!=null&&(A[aC]=b),o("config",p.measurementId,A),p.measurementId}/**
2584 * @license
2585 * Copyright 2019 Google LLC
2586 *
2587 * Licensed under the Apache License, Version 2.0 (the "License");
2588 * you may not use this file except in compliance with the License.
2589 * You may obtain a copy of the License at
2590 *
2591 *   http://www.apache.org/licenses/LICENSE-2.0
2592 *
2593 * Unless required by applicable law or agreed to in writing, software
2594 * distributed under the License is distributed on an "AS IS" BASIS,
2595 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2596 * See the License for the specific language governing permissions and
2597 * limitations under the License.
2598 */class DC{constructor(e){this.app=e}_delete(){return delete Ir[this.app.options.appId],Promise.resolve()}}let Ir={},_0=[];const v0={};let sd="dataLayer",VC="gtag",E0,Em,T0=!1;function OC(){const s=[];if(Rb()&&s.push("This is a browser extension environment."),xb()||s.push("Cookies are not available."),s.length>0){const e=s.map((r,o)=>`(${o+1}) ${r}`).join(" "),i=En.create("invalid-analytics-context",{errorInfo:e});tn.warn(i.message)}}function MC(s,e,i){OC();const r=s.options.appId;if(!r)throw En.create("no-app-id");if(!s.options.apiKey)if(s.options.measurementId)tn.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${s.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw En.create("no-api-key");if(Ir[r]!=null)throw En.create("already-exists",{id:r});if(!T0){fC(sd);const{wrappedGtag:h,gtagCore:d}=pC(Ir,_0,v0,sd,VC);Em=h,E0=d,T0=!0}return Ir[r]=IC(s,_0,v0,e,E0,sd,i),new DC(s)}function zC(s=j0()){s=Fi(s);const e=fo(s,Sc);return e.isInitialized()?e.getImmediate():jC(s)}function jC(s,e={}){const i=fo(s,Sc);if(i.isInitialized()){const o=i.getImmediate();if(ao(e,i.getOptions()))return o;throw En.create("already-initialized")}return i.initialize({options:e})}
2598function LC(s,e,i){s=Fi(s),xC(Em,Ir[s.app.options.appId],e,i).catch(r=>tn.error(r))}function UC(s,e,i,r){s=Fi(s),CC(Em,Ir[s.app.options.appId],e,i,r).catch(o=>tn.error(o))}const b0="@firebase/analytics",A0="0.10.20";function PC(){za(new Qi(Sc,(e,{options:i})=>{const r=e.getProvider("app").getImmediate(),o=e.getProvider("installations-internal").getImmediate();return MC(r,o,i)},"PUBLIC")),za(new Qi("analytics-internal",s,"PRIVATE")),Ei(b0,A0),Ei(b0,A0,"esm2020");function s(e){try{const i=e.getProvider(Sc).getImmediate();return{logEvent:(r,o,h)=>UC(i,r,o,h),setUserProperties:(r,o)=>LC(i,r,o)}}catch(i){throw En.create("interop-component-reg-failed",{reason:i})}}}PC();const BC={apiKey:"AIzaSyB7NOH00xqJUJ5oV6QHVpdcBKgsblCJjW4",authDomain:"asistente-prl.firebaseapp.com",projectId:"asistente-prl",storageBucket:"asistente-prl.firebasestorage.app",messagingSenderId:"914577563261",appId:"1:914577563261:web:3b8014006f0e5a015c1b14",measurementId:"G-8TTBEG047F"},LE=z0(BC),Dd=eR(LE);let kC;try{kC=zC(LE)}catch(s){console.warn("Firebase Analytics initialization failed",s)}const Vd="spas_badajoz",UE="spas_caceres",Od=[{name:"Quirónprevención",rating:3.3,phone:"924 22 73 27",website:"https://www.quironprevencion.com/es/informacion/solicita-presupuesto",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Badajoz"]},{name:"ASPY Prevención",rating:4.8,phone:"900 120 124",website:"https://www.aspyprevencion.com/presupuesto/",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Badajoz"]},{name:"Vitaly",rating:3.5,phone:"924 22 71 65",website:"https://vitaly.es/#contacto",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Badajoz"]},{name:"Grupo MPE",rating:4,phone:"924 22 72 65",website:"https://prevencionmpe.com/contacto",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Badajoz"]},{name:"Antea Prevención",rating:5,phone:"954 18 14 45",website:"https://www.anteaprevencion.com/ofertas/",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Mérida"]},{name:"Quirónprevención (Mérida)",rating:2.3,phone:"924 38 94 40",website:"https://www.quironprevencion.com/es/informacion/solicita-presupuesto",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Mérida"]},{name:"Laboral Group",rating:5,phone:"678 700 800",website:"https://www.laboralgroup.com/",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Badajoz"]},{name:"ASIPREX SL",rating:4.8,phone:"924 55 37 33",website:"https://asiprex.com",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Zafra"]},{name:"INPREX SERVICIO DE PREVENCION DE RIESGOS LABORALES SL",rating:4.3,phone:"924 67 72 22",website:"https://www.grupoinprex.com",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Almendralejo"]},{name:"METODO PREVENCION SL",rating:5,phone:"924 18 17 54",website:"https://www.metodoprevencion.es",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Badajoz"]},{name:"SEPREX AUDITORES SL",rating:2.3,phone:"924 84 78 88",website:"https://www.seprex.net",email:"[email protected]",provinces:["Badajoz"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Villanueva de la Serena"]}],Md=[{name:"Quirónprevención (Cáceres)",rating:4.6,phone:"927 62 98 08",website:"https://www.quironprevencion.com/es/informacion/solicita-presupuesto",email:"[email protected]",provinces:["Cáceres"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Cáceres"]},{name:"ASPY Prevención (Cáceres)",rating:2.3,phone:"900 120 124",website:"https://www.aspyprevencion.com/presupuesto/",email:"[email protected]",provinces:["Cáceres"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Cáceres"]}
2598,{name:"Vitaly (Cáceres)",rating:3.5,phone:"911 59 40 00",website:"https://vitaly.es/#contacto",email:"[email protected]",provinces:["Cáceres"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Cáceres"]},{name:"Grupo INPREX (Cáceres)",rating:5,phone:"927 24 00 87",website:"https://www.grupoinprex.com/index.php/es/component/sppagebuilder/26-presupuestos",email:"[email protected]",provinces:["Cáceres"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Cáceres"]},{name:"Laboral Group",rating:5,phone:"678 700 800",website:"https://www.laboralgroup.com/",email:"[email protected]",provinces:["Cáceres"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Cáceres"]},{name:"LOGOS SEGURIDAD Y PREVENCIÓN EXTREMEÑA SL",rating:4.3,phone:"927 22 77 92",website:"https://logosprevencion.com",email:"[email protected]",provinces:["Cáceres"],specialties:["Seguridad","Higiene","Ergonomía","Medicina"],tags:["Cáceres"]}],qC=async s=>{try{let e=Vd;if(s==="Cáceres")e=UE;else if(s==="Badajoz")e=Vd;else if(!s)return[];const i=Nd(Dd,e),r=await $l(i),o=[];return r.forEach(h=>{const d=h.data();o.push({id:h.id,...d})}),o.length===0?(console.warn("Firestore returned empty, using fallback data"),s==="Cáceres"?Md.map((h,d)=>({id:`fallback-cac-${d}`,...h})):Od.map((h,d)=>({id:`fallback-bad-${d}`,...h}))):o}catch(e){return console.error(`Error fetching SPAs for ${s}:`,e),s==="Cáceres"?Md.map((i,r)=>({id:`fallback-cac-${r}`,...i})):Od.map((i,r)=>({id:`fallback-bad-${r}`,...i}))}},HC=async()=>{try{const s=Nd(Dd,Vd);if(console.log("Checking Badajoz collection for seeding..."),!(await $l(s)).empty)console.log("Badajoz collection already has data. Skipping seed.");else for(const o of Od){const h=h0(s,f0("name","==",o.name));(await $l(h)).empty?(await g0(s,o),console.log(`Added ${o.name} to Badajoz collection.`)):console.log(`${o.name} already exists in Badajoz collection.`)}const i=Nd(Dd,UE);if(console.log("Checking Cáceres collection for seeding..."),!(await $l(i)).empty){console.log("Cáceres collection already has data. Skipping seed.");return}for(const o of Md){const h=h0(i,f0("name","==",o.name));(await $l(h)).empty?(await g0(i,o),console.log(`Added ${o.name} to Cáceres collection.`)):console.log(`${o.name} already exists in Cáceres collection.`)}}catch(s){console.error("Error seeding database:",s)}},GC=({userData:s,onContactSPA:e,onBack:i})=>{const[r,o]=je.useState([]),[h,d]=je.useState(!0);je.useEffect(()=>{let v=!0;return(async()=>{d(!0);try{try{await HC()}catch(A){console.error("Auto-seeding failed:",A)}const b=await qC(s.province);v&&o(b)}catch(b){console.error("Error in fetchSPAs:",b)}finally{v&&d(!1)}})(),()=>{v=!1}},[s.province]);const y=w0.useMemo(()=>[...r].sort((v,p)=>{const b=v.provinces.includes(s.province),A=p.provinces.includes(s.province);return b&&!A?-1:!b&&A?1:p.rating-v.rating}),[r,s.province]);return h?x.jsx("div",{className:"flex justify-center items-center py-20",children:x.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-brand-600"})}):x.jsxs("div",{className:"max-w-4xl mx-auto space-y-8 animate-fade-in pb-12",children:[x.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[x.jsxs("div",{children:[x.jsxs("h2",{className:"text-2xl font-bold text-gray-900",children:["Servicios Recomendados en ",s.province]}),x.jsx("p",{className:"text-gray-600",children:"Seleccionados por cercanía y especialización en tu sector."})]}),x.jsxs("div",{className:"flex flex-col items-end gap-2",children:[x.jsxs("a",{href:"https://www.prevengoprevencion.com/",target:"_blank",rel:"noopener noreferrer",className:"bg-green-600 text-white px-4 py-2 rounded-lg font-medium hover:bg-green-700 transition-colors flex items-center gap-2 shadow-sm text-sm",children:[x.jsx(Jy,{className:"w-4 h-4"}),"Comparador de precios SPAs"]}),x.jsx("button",{onClick:i,className:"text-sm text-gray-500 hover:text-brand-600 underline",children:"← Volver al análisis"})]})]}),x.jsx("div",{className:"grid gap-6",children:y.map((v,p)=>{const b=v.provinces.includes(s.province);return x.jsx("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden transition-all hover:shadow-md",children:x.jsxs("div",{className:"p-6 md:flex md:justify-between md:items-start gap-6",children:[x.jsxs("div",{className:"flex-1 space-y-3",children:[x.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[x.jsx("h3",{className:"text-xl font-bold text-gray-900",children:v.name}),v.isPremium&&x.jsx(UT,{className:"w-5 h-5 text-blue-500"})]}),x.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.tags.map(A=>x.jsx("span",{className:"inline-block bg-gray-100 text-gray-600 text-xs px-2 py-1 rounded-full",children:A},A)),b&&x.jsxs("span",{className:"inline-block bg-secondary-100 text-secondary-700 text-xs px-2 py-1 rounded-full flex items-center gap-1",children:[x.jsx(rd,{className:"w-3 h-3"})," Cerca de ti"]})]}),x.jsxs("div",{className:"space-y-1 pt-2",children:[x.jsxs("p",{className:"text-sm text-gray-600 flex items-center gap-2",children:[x.jsx(ib,{className:"w-4 h-4 text-yellow-400 fill-yellow-400"}),x.jsxs("span",{className:"font-semibold text-gray-900",children:[v.rating,"/5"]})," de valoración"]}),x.jsxs("p",{className:"text-sm text-gray-600",children:[x.jsx("strong",{children:"Especialidades:"}
2598)," ",v.specialties.join(", ")]})]})]}),x.jsxs("div",{className:"mt-6 md:mt-0 flex flex-col sm:flex-row gap-3 md:flex-col lg:flex-row min-w-[200px]",children:[x.jsxs("a",{href:`tel:${v.phone.replace(/\s/g,"")}`,className:"flex-1 bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 hover:text-brand-600 font-medium py-2 px-4 rounded-lg flex items-center justify-center gap-2 transition-colors",children:[x.jsx(Wy,{className:"w-4 h-4"}),"Llamar"]}),x.jsxs("a",{href:v.website,target:"_blank",rel:"noopener noreferrer",className:"flex-1 bg-brand-600 text-white hover:bg-brand-700 font-medium py-2 px-4 rounded-lg shadow flex items-center justify-center gap-2 transition-colors",children:[x.jsx(Jy,{className:"w-4 h-4"}),"Solicitar Presupuesto"]})]})]})},v.id)})}),x.jsxs("div",{className:"bg-gray-100 rounded-lg p-6 text-center",children:[x.jsx("h4",{className:"font-semibold text-gray-800 mb-2",children:"¿No encuentras lo que buscas?"}),x.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["Nuestro equipo de asesores puede buscar por ti la mejor opción en ",s.municipality," gratuitamente."]}),x.jsxs("div",{className:"text-brand-600 font-medium flex items-center justify-center gap-2",children:[x.jsx(Wy,{className:"w-4 h-4"}),x.jsxs("span",{children:["Para contactar con un asesor humano llama al: ",x.jsx("a",{href:"tel:924286161",className:"hover:underline font-bold",children:"924 28 61 61"})]})]})]})]})},FC=({selectedSPA:s,onSuccess:e,initialData:i})=>{const[r,o]=je.useState(!1),[h,d]=je.useState({name:(i==null?void 0:i.contactName)||"",phone:(i==null?void 0:i.contactPhone)||"",email:(i==null?void 0:i.contactEmail)||"",consent:!1}),y=async v=>{v.preventDefault(),o(!0);const p={...i,isHighRisk:i!=null&&i.isHighRisk?"Si":"No",hasMultipleCenters:i!=null&&i.hasMultipleCenters?"Si":"No",hasBasicTraining:i!=null&&i.hasBasicTraining?"Si":"No",contactName:h.name,contactPhone:h.phone,contactEmail:h.email,selectedSPA:s?s.name:"Asesoramiento General",step:"FINAL_CONTACT"};try{await fetch("https://hook.eu1.make.com/x1a43llfno9myc1wojji2wfk760c4gcb",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)})}catch(b){console.error("Error sending final data to webhook:",b)}o(!1),e()};return x.jsxs("div",{className:"max-w-md mx-auto bg-white rounded-xl shadow-lg border border-gray-100 overflow-hidden animate-fade-in",children:[x.jsxs("div",{className:"bg-brand-600 p-6 text-white text-center",children:[x.jsx("h2",{className:"text-xl font-bold mb-1",children:s?`Contactar con ${s.name}`:"Solicitar Asesoramiento Gratuito"}),x.jsx("p",{className:"text-brand-100 text-sm",children:"Déjanos tus datos y te contactaremos en breve."})]}),x.jsxs("form",{onSubmit:y,className:"p-6 space-y-4",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Nombre de contacto"}),x.jsx("input",{required:!0,type:"text",className:"w-full border border-gray-300 rounded-lg p-3 focus:ring-2 focus:ring-brand-500 outline-none bg-white text-gray-900",placeholder:"Tu nombre o el de la empresa",value:h.name,onChange:v=>d({...h,name:v.target.value})})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Teléfono"}),x.jsx("input",{required:!0,type:"tel",className:"w-full border border-gray-300 rounded-lg p-3 focus:ring-2 focus:ring-brand-500 outline-none bg-white text-gray-900",placeholder:"600 000 000",value:h.phone,onChange:v=>d({...h,phone:v.target.value})})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email (Opcional)"}),x.jsx("input",{type:"email",className:"w-full border border-gray-300 rounded-lg p-3 focus:ring-2 focus:ring-brand-500 outline-none bg-white text-gray-900",placeholder:"[email protected]",value:h.email,onChange:v=>d({...h,email:v.target.value})})]}),x.jsxs("label",{className:"flex items-start gap-3 mt-4 cursor-pointer",children:[x.jsx("input",{required:!0,type:"checkbox",className:"mt-1 h-4 w-4 rounded border-gray-300 text-brand-600 focus:ring-brand-500 bg-white",checked:h.consent,onChange:v=>d({...h,consent:v.target.checked})}),x.jsx("span",{className:"text-xs text-gray-500",children:"Acepto la política de privacidad y que me contacten para gestionar mi solicitud de prevención de riesgos laborales."})]}),x.jsx("button",{type:"submit",disabled:r,className:"w-full bg-brand-600 hover:bg-brand-700 text-white font-bold py-3 rounded-lg shadow transition flex items-center justify-center gap-2 mt-2 disabled:opacity-70",children:r?x.jsxs(x.Fragment,{children:[x.jsx(JT,{className:"w-5 h-5 animate-spin"}
2598)," Enviando..."]}):"Solicitar Contacto"})]})]})};var Ae=(s=>(s.FORM="FORM",s.ANALYSIS="ANALYSIS",s.SPA_LIST="SPA_LIST",s.CONTACT="CONTACT",s.SUCCESS="SUCCESS",s))(Ae||{}),Jl=(s=>(s.SELF_ASSUMPTION="SELF_ASSUMPTION",s.DESIGNATED_WORKER="DESIGNATED_WORKER",s.SPA="SPA",s.SPP="SPP",s))(Jl||{});const QC=s=>{const e=[],i=s.employees>500||s.employees>=250&&s.employees<=500&&s.isHighRisk;i&&e.push({type:Jl.SPP,title:"Servicio de Prevención Propio (SPP)",description:"Debido al tamaño o riesgo de tu empresa, la normativa exige una estructura propia.",details:["Obligatorio por superar los 500 trabajadores o tener entre 250-500 con alto riesgo.","Debes contar con instalaciones y personal sanitario propio.","Debes constituir al menos 2 de las 4 especialidades internamente.","Las especialidades no cubiertas se deben concertar con un SPA."],isRecommended:!0,whyRecommended:"Está obligado a constituir un Servicio de Prevención Propio (SPP) si su empresa supera los 500 trabajadores, o si cuenta con entre 250 y 500 trabajadores y realiza actividades de especial riesgo (Anexo I). También es obligatorio si la autoridad laboral lo exige."});const r=!i&&!s.isHighRisk&&s.hasBasicTraining&&(!s.hasMultipleCenters&&s.employees<=25||s.hasMultipleCenters&&s.employees<=10);return e.push({type:Jl.SPA,title:"Servicio de Prevención Ajeno (SPA)",description:"Contratas a una empresa especializada que se encarga de la gestión preventiva.",details:["Es la opción más cómoda y segura jurídicamente.","Incluye las 4 especialidades (Seguridad, Higiene, Ergonomía, Medicina).","Te visitan técnicos especialistas para la evaluación.",i?"En tu caso, sirve para complementar las especialidades que no cubra tu SPP.":"Coste anual variable según nº trabajadores y riesgo."],isRecommended:!i&&!r,whyRecommended:i?"Puede ser necesario para cubrir especialidades que no asuma tu servicio propio.":"Es la opción recomendada porque garantizas el cumplimiento legal total, delegas la responsabilidad técnica en expertos y evitas riesgos."}),r&&e.push({type:Jl.SELF_ASSUMPTION,title:"Asunción por el Empresario",description:"Tú mismo gestionas la prevención (excepto Vigilancia de la Salud).",details:["Cumples los requisitos: Formación básica y tamaño de plantilla.","Debes estar habitualmente en el centro de trabajo.","Ahorras costes fijos, pero inviertes tu tiempo.","La Vigilancia de la Salud debes contratarla aparte con un SPA."],isRecommended:!0,whyRecommended:"Es una opción legal y económica al cumplir con los requisitos de formación y tamaño. Sin embargo, si consideras que te falta tiempo para dedicarle a la PRL, sería mejor contratarla en un SPA."}),i||e.push({type:Jl.DESIGNATED_WORKER,title:"Designación de Trabajadores",description:"Designas a uno o varios empleados con formación para llevar la PRL.",details:["El trabajador debe tener formación (Nivel Básico/Intermedio/Superior según riesgo).","Debe disponer de tiempo (horas) dentro de su jornada.","Si no cubre todas las especialidades, debes complementar con SPA."],isRecommended:!1,whyRecommended:"Es legal si tienes plantilla cualificada, pero suele ser complejo de gestionar internamente."}),e.sort((o,h)=>o.isRecommended===h.isRecommended?0:o.isRecommended?-1:1)},YC=()=>{const[s,e]=je.useState(Ae.FORM),[i,r]=je.useState({}),[o,h]=je.useState(null),d=je.useMemo(()=>i.employees?QC(i):[],[i]),y=async Q=>{r(Q),window.scrollTo({top:0,behavior:"smooth"}),e(Ae.ANALYSIS);const J={...Q,isHighRisk:Q.isHighRisk?"Si":"No",hasMultipleCenters:Q.hasMultipleCenters?"Si":"No",hasBasicTraining:Q.hasBasicTraining?"Si":"No"};try{await fetch("https://hook.eu1.make.com/x1a43llfno9myc1wojji2wfk760c4gcb",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...J,step:"INITIAL_FORM"})})}catch(et){console.error("Error sending data to webhook:",et)}},v=()=>{h(null),window.scrollTo({top:0,behavior:"smooth"}),e(Ae.CONTACT)},p=()=>{window.scrollTo({top:0,behavior:"smooth"}),e(Ae.SPA_LIST)},b=Q=>{h(Q),window.scrollTo({top:0,behavior:"smooth"}),e(Ae.CONTACT)},A=()=>{e(Ae.SUCCESS),window.scrollTo({top:0,behavior:"smooth"})},O=()=>{switch(s){case Ae.FORM:return x.jsx(sb,{onComplete:y,initialData:i});case Ae.ANALYSIS:return x.jsx(rb,{results:d,onConsult:v,onViewSPAs:p});case Ae.SPA_LIST:return x.jsx(GC,{userData:i,onContactSPA:b,onBack:()=>e(Ae.ANALYSIS)});case Ae.CONTACT:return x.jsx(FC,{selectedSPA:o,onSuccess:A,initialData:i});case Ae.SUCCESS:return x.jsxs("div",{className:"text-center py-20 px-4 animate-fade-in",children:[x.jsx("div",{className:"w-20 h-20 bg-secondary-100 text-secondary-600 rounded-full flex items-center justify-center mx-auto mb-6",children:x.jsx(ec,{className:"w-10 h-10"})}),x.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"¡Solicitud Recibida!"}),x.jsxs("p",{className:"text-lg text-gray-600 max-w-lg mx-auto mb-8",children:["Hemos recibido tus datos correctamente. Uno de nuestros asesores expertos se pondrá en contacto contigo en menos de 24h para ",o?`conectarte con ${o.name}`:"resolver tus dudas","."]}),x.jsx("button",{onClick:()=>{r({}),e(Ae.FORM)},className:"text-brand-600 font-medium hover:underline",children:"Volver al inicio"})]});default:return null}};return x.jsxs("div",{className:"min-h-screen flex flex-col font-sans text-gray-900",children:[x.jsx("header",{className:"bg-white border-b border-gray-200 sticky top-0 z-50",children:x.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-16 flex items-center justify-center relative",children:[x.jsx("div",{className:"cursor-pointer",onClick:()=>e(Ae.FORM),children:x.jsx("img",{src:"https://i.postimg.cc/ZCNzFKHQ/image.png",alt:"Asesoramiento Técnico PRL",className:"h-8 md:h-10 object-contain",referrerPolicy:"no-referrer"})}),s!==Ae.FORM&&s!==Ae.SUCCESS&&x.jsxs("div",{className:"absolute right-4 text-xs md:text-sm font-medium text-gray-500 bg-gray-50 px-3 py-1 rounded-full border border-gray-100 hidden md:block",children:[s===Ae.ANALYSIS&&"Paso 2: Análisis",s===Ae.SPA_LIST&&"Paso 3: Comparador",s===Ae.CONTACT&&"Paso Final: Contacto"]})]})}),x.jsx("div",{className:"w-full bg-white flex justify-center border-b border-gray-200",children:x.jsx("img",{src:"https://drive.google.com/thumbnail?id=1H2rZY_asBokWWxg4UFCtI8kNWiXUR6HU&sz=w2000",alt:"Banner",className:"max-w-full h-auto",referrerPolicy:"no-referrer"})}),x.jsx("main",{className:"flex-grow bg-gray-50",children:x.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8 md:py-12",children:O()})}),x.jsx("footer",{className:"bg-white border-t border-gray-200 py-8 text-center text-sm text-gray-400",children:x.jsxs("div",{className:"max-w-6xl mx-auto px-4",children:[x.jsxs("p",{className:"mb-2",children:["© ",new Date().getFullYear()," PRL Fácil - Asistente de Prevención de Riesgos Laborales"]}),x.jsx("p",{className:"text-xs max-w-2xl mx-auto",children:"Aviso: Esta herramienta ofrece orientación basada en la normativa general española. No sustituye el asesoramiento legal profesional. Para una validación oficial, contacte con nuestros asesores."})]})})]})},PE=document.getElementById("root");
2598if(!PE)throw new Error("Could not find root element to mount to");const KC=RT.createRoot(PE);KC.render(x.jsx(w0.StrictMode,{children:x.jsx(YC,{})}));

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.