vendor: 4,471 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OnboardingPage-n4j0gky0.js","assets/check-circle-B8odza-O.js","assets/loader-2-BaQHybQA.js","assets/DashboardPage-CoczwngL.js","assets/format-B2FXVs-x.js","assets/plus-circle-aW95Of2x.js","assets/plus-BsOPFkD3.js","assets/SitesPage-DZKc1Y2P.js","assets/HistoryPage-Dpmm0TXE.js","assets/download-DBOVQEJz.js","assets/SettingsPage-CZm3vrI6.js","assets/BillingPage-DCrzzZjb.js"])))=>i.map(i=>d[i]); 2function TT(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var W2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function IT(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nv={exports:{}},Yl={},rv={exports:{}},Z={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var bo=Symbol.for("react.element"),xT=Symbol.for("react.portal"),ST=Symbol.for("react.fragment"),AT=Symbol.for("react.strict_mode"),kT=Symbol.for("react.profiler"),CT=Symbol.for("react.provider"),RT=Symbol.for("react.context"),PT=Symbol.for("react.forward_ref"),NT=Symbol.for("react.suspense"),bT=Symbol.for("react.memo"),DT=Symbol.for("react.lazy"),mm=Symbol.iterator;function OT(t){return t===null||typeof t!="object"?null:(t=mm&&t[mm]||t["@@iterator"],typeof t=="function"?t:null)}var iv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sv=Object.assign,ov={};function Qi(t,e,n){this.props=t,this.context=e,this.refs=ov,this.updater=n||iv}Qi.prototype.isReactComponent={};Qi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Qi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function av(){}av.prototype=Qi.prototype;function dd(t,e,n){this.props=t,this.context=e,this.refs=ov,this.updater=n||iv}var fd=dd.prototype=new av;fd.constructor=dd;sv(fd,Qi.prototype);fd.isPureReactComponent=!0;var gm=Array.isArray,lv=Object.prototype.hasOwnProperty,pd={current:null},uv={key:!0,ref:!0,__self:!0,__source:!0};function cv(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)lv.call(e,r)&&!uv.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var u=Array(l),h=0;h<l;h++)u[h]=arguments[h+2];i.children=u}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:bo,type:t,key:s,ref:o,props:i,_owner:pd.current}}function VT(t,e){return{$$typeof:bo,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function md(t){return typeof t=="object"&&t!==null&&t.$$typeof===bo}function LT(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var ym=/\/+/g;function rc(t,e){return typeof t=="object"&&t!==null&&t.key!=null?LT(""+t.key):e.toString(36)}function Ua(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case bo:case xT:o=!0}}
vendor: 4,538 bytes, lines 10-18
10if(o)return o=t,i=i(o),t=r===""?"."+rc(o,0):r,gm(i)?(n="",t!=null&&(n=t.replace(ym,"$&/")+"/"),Ua(i,e,n,"",function(h){return h})):i!=null&&(md(i)&&(i=VT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(ym,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",gm(t))for(var l=0;l<t.length;l++){s=t[l];var u=r+rc(s,l);o+=Ua(s,e,n,u,i)}else if(u=OT(t),typeof u=="function")for(t=u.call(t),l=0;!(s=t.next()).done;)s=s.value,u=r+rc(s,l++),o+=Ua(s,e,n,u,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function va(t,e,n){if(t==null)return t;var r=[],i=0;return Ua(t,r,"","",function(s){return e.call(n,s,i++)}),r}function jT(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var ct={current:null},za={transition:null},MT={ReactCurrentDispatcher:ct,ReactCurrentBatchConfig:za,ReactCurrentOwner:pd};function hv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:va,forEach:function(t,e,n){va(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return va(t,function(){e++}),e},toArray:function(t){return va(t,function(e){return e})||[]},only:function(t){if(!md(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Z.Component=Qi;Z.Fragment=ST;Z.Profiler=kT;Z.PureComponent=dd;Z.StrictMode=AT;Z.Suspense=NT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MT;Z.act=hv;Z.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=sv({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=pd.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(u in e)lv.call(e,u)&&!uv.hasOwnProperty(u)&&(r[u]=e[u]===void 0&&l!==void 0?l[u]:e[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var h=0;h<u;h++)l[h]=arguments[h+2];r.children=l}return{$$typeof:bo,type:t.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(t){return t={$$typeof:RT,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:CT,_context:t},t.Consumer=t};Z.createElement=cv;Z.createFactory=function(t){var e=cv.bind(null,t);return e.type=t,e};Z.createRef=function(){return{current:null}};Z.forwardRef=function(t){return{$$typeof:PT,render:t}};Z.isValidElement=md;Z.lazy=function(t){return{$$typeof:DT,_payload:{_status:-1,_result:t},_init:jT}};Z.memo=function(t,e){return{$$typeof:bT,type:t,compare:e===void 0?null:e}};Z.startTransition=function(t){var e=za.transition;za.transition={};try{t()}finally{za.transition=e}};Z.unstable_act=hv;Z.useCallback=function(t,e){return ct.current.useCallback(t,e)};Z.useContext=function(t){return ct.current.useContext(t)};Z.useDebugValue=function(){};Z.useDeferredValue=function(t){return ct.current.useDeferredValue(t)};Z.useEffect=function(t,e){return ct.current.useEffect(t,e)};Z.useId=function(){return ct.current.useId()};Z.useImperativeHandle=function(t,e,n){return ct.current.useImperativeHandle(t,e,n)};Z.useInsertionEffect=function(t,e){return ct.current.useInsertionEffect(t,e)};Z.useLayoutEffect=function(t,e){return ct.current.useLayoutEffect(t,e)};Z.useMemo=function(t,e){return ct.current.useMemo(t,e)};Z.useReducer=function(t,e,n){return ct.current.useReducer(t,e,n)};Z.useRef=function(t){return ct.current.useRef(t)};Z.useState=function(t){return ct.current.useState(t)};Z.useSyncExternalStore=function(t,e,n){return ct.current.useSyncExternalStore(t,e,n)};Z.useTransition=function(){return ct.current.useTransition()};Z.version="18.3.1";rv.exports=Z;var V=rv.exports;const FT=IT(V),UT=TT({__proto__:null,default:FT},[V]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var zT=V,BT=Symbol.for("react.element"),$T=Symbol.for("react.fragment"),qT=Object.prototype.hasOwnProperty,WT=zT.__SECRET_INT
vendor: 8,893 bytes, lines 18-34
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,HT={key:!0,ref:!0,__self:!0,__source:!0};function dv(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)qT.call(e,r)&&!HT.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:BT,type:t,key:s,ref:o,props:i,_owner:WT.current}}Yl.Fragment=$T;Yl.jsx=dv;Yl.jsxs=dv;nv.exports=Yl;var f=nv.exports,fv={exports:{}},xt={},pv={exports:{}},mv={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(t){function e(B,Q){var J=B.length;B.push(Q);e:for(;0<J;){var ve=J-1>>>1,ce=B[ve];if(0<i(ce,Q))B[ve]=Q,B[J]=ce,J=ve;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Q=B[0],J=B.pop();if(J!==Q){B[0]=J;e:for(var ve=0,ce=B.length,Ae=ce>>>1;ve<Ae;){var an=2*(ve+1)-1,ln=B[an],un=an+1,cn=B[un];if(0>i(ln,J))un<ce&&0>i(cn,ln)?(B[ve]=cn,B[un]=J,ve=un):(B[ve]=ln,B[an]=J,ve=an);else if(un<ce&&0>i(cn,J))B[ve]=cn,B[un]=J,ve=un;else break e}}return Q}function i(B,Q){var J=B.sortIndex-Q.sortIndex;return J!==0?J:B.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],h=[],p=1,m=null,g=3,A=!1,C=!1,N=!1,R=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(B){for(var Q=n(h);Q!==null;){if(Q.callback===null)r(h);else if(Q.startTime<=B)r(h),Q.sortIndex=Q.expirationTime,e(u,Q);else break;Q=n(h)}}function D(B){if(N=!1,E(B),!C)if(n(u)!==null)C=!0,os(j);else{var Q=n(h);Q!==null&&on(D,Q.startTime-B)}}function j(B,Q){C=!1,N&&(N=!1,w(v),v=-1),A=!0;var J=g;try{for(E(Q),m=n(u);m!==null&&(!(m.expirationTime>Q)||B&&!k());){var ve=m.callback;if(typeof ve=="function"){m.callback=null,g=m.priorityLevel;var ce=ve(m.expirationTime<=Q);Q=t.unstable_now(),typeof ce=="function"?m.callback=ce:m===n(u)&&r(u),E(Q)}else r(u);m=n(u)}if(m!==null)var Ae=!0;else{var an=n(h);an!==null&&on(D,an.startTime-Q),Ae=!1}return Ae}finally{m=null,g=J,A=!1}}var U=!1,T=null,v=-1,I=5,x=-1;function k(){return!(t.unstable_now()-x<I)}function b(){if(T!==null){var B=t.unstable_now();x=B;var Q=!0;try{Q=T(!0,B)}finally{Q?S():(U=!1,T=null)}}else U=!1}var S;if(typeof _=="function")S=function(){_(b)};else if(typeof MessageChannel<"u"){var At=new MessageChannel,Er=At.port2;At.port1.onmessage=b,S=function(){Er.postMessage(null)}}else S=function(){R(b,0)};function os(B){T=B,U||(U=!0,S())}function on(B,Q){v=R(function(){B(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_continueExecution=function(){C||A||(C=!0,os(j))},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(B){switch(g){case 1:case 2:case 3:var Q=3;break;default:Q=g}var J=g;g=Q;try{return B()}finally{g=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var J=g;g=B;try{return Q()}finally{g=J}},t.unstable_scheduleCallback=function(B,Q,J){var ve=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?ve+J:ve):J=ve,B){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=J+ce,B={id:p++,callback:Q,priorityLevel:B,startTime:J,expirationTime:ce,sortIndex:-1},J>ve?(B.sortIndex=J,e(h,B),n(u)===null&&B===n(h)&&(N?(w(v),v=-1):N=!0,on(D,J-ve))):(B.sortIndex=ce,e(u,B),C||A||(C=!0,os(j))),B},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(B){var Q=g;return function(){var J=g;g=Q;try{return B.apply(this,arguments)}finally{g=J}}}})(mv);pv.exports=mv;var GT=pv.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var KT=V,It=GT;function F(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var gv=new Set,eo={};function Xr(t,e){Oi(t,e),Oi(t+"Capture",e)}function Oi(t,e){for(eo[t]=e,t=0;t<e.length;t++)gv.add(e[t])}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$c=Object.prototype.hasOwnProperty,QT=/^[: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]*$/,vm={},_m={};function YT(t){return $c.call(_m,t)?!0:$c.call(vm,t)?!1:QT.test(t)?_m[t]=!0:(vm[t]=!0,!1)}function XT(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function JT(t,e,n,r){if(e===null||typeof e>"u"||XT(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ht(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){qe[t]=new ht(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];qe[e]=new ht(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){qe[t]=new ht(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){qe[t]=new ht(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){qe[t]=new ht(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){qe[t]=new ht(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){qe[t]=new ht(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){qe[t]=new ht(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){qe[t]=new ht(t,5,!1,t.toLowerCase(),null,!1,!1)});var gd=/[\-:]([a-z])/g;function yd(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
34-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(gd,yd);qe[e]=new ht(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(gd,yd);qe[e]=new ht(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(gd,yd);qe[e]=new ht(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){qe[t]=new ht(t,1,!1,t.toLowerCase(),null,!1,!1)});qe.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){qe[t]=new ht(t,1,!1,t.toLowerCase(),null,!0,!0)});function vd(t,e,n,r){var i=qe.hasOwnProperty(e)?qe[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(JT(e,n,i,r)&&(n=null),r||i===null?YT(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var bn=KT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_a=Symbol.for("react.element"),hi=Symbol.for("react.portal"),di=Symbol.for("react.fragment"),_d=Symbol.for("react.strict_mode"),qc=Symbol.for("react.profiler"),yv=Symbol.for("react.provider"),vv=Symbol.for("react.context"),wd=Symbol.for("react.forward_ref"),Wc=Symbol.for("react.suspense"),Hc=Symbol.for("react.suspense_list"),Ed=Symbol.for("react.memo"),Un=Symbol.for("react.lazy"),_v=Symbol.for("react.offscreen"),wm=Symbol.iterator;function ws(t){return t===null||typeof t!="object"?null:(t=wm&&t[wm]||t["@@iterator"],typeof t=="function"?t:null)}var Ee=Object.assign,ic;function Ps(t){if(ic===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ic=e&&e[1]||""}return` 35`+ic+t}var sc=!1;function oc(t,e){if(!t||sc)return"";sc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(h){var r=h}Reflect.construct(t,[],e)}else{try{e.call()}catch(h){r=h}t.call(e.prototype)}else{try{throw Error()}catch(h){r=h}t()}}catch(h){if(h&&r&&typeof h.stack=="string"){for(var i=h.stack.split(` 36`),s=r.stack.split(` 37`),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var u=` 38`+i[o].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}while(1<=o&&0<=l);break}}}finally{sc=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ps(t):""}function ZT(t){switch(t.tag){case 5:return Ps(t.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 2:case 15:return t=oc(t.type,!1),t;case 11:return t=oc(t.type.render,!1),t;case 1:return t=oc(t.type,!0),t;default:return""}}function Gc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case di:return"Fragment";case hi:return"Portal";case qc:return"Profiler";case _d:return"StrictMode";case Wc:return"Suspense";case Hc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case vv:return(t.displayName||"Context")+".Consumer";case yv:return(t._context.displayName||"Context")+".Provider";case wd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ed:return e=t.displayName||null,e!==null?e:Gc(t.type)||"Memo";case Un:e=t._payload,t=t._init;try{return Gc(t(e))}catch{}}return null}function eI(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gc(e);case 8:return e===_d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ur(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wv(t){var e=t.type;
vendor: 14,320 bytes, line 38
38return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function tI(t){var e=wv(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function wa(t){t._valueTracker||(t._valueTracker=tI(t))}function Ev(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=wv(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ll(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}}function Kc(t,e){var n=e.checked;return Ee({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Em(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=ur(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Tv(t,e){e=e.checked,e!=null&&vd(t,"checked",e,!1)}function Qc(t,e){Tv(t,e);var n=ur(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Yc(t,e.type,n):e.hasOwnProperty("defaultValue")&&Yc(t,e.type,ur(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Tm(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Yc(t,e,n){(e!=="number"||ll(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ns=Array.isArray;function Ii(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+ur(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Xc(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(F(91));return Ee({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Im(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(F(92));if(Ns(n)){if(1<n.length)throw Error(F(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:ur(n)}}function Iv(t,e){var n=ur(e.value),r=ur(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function xm(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function xv(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jc(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?xv(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ea,Sv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ea=Ea||document.createElement("div"),Ea.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ea.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function to(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Fs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nI=["Webkit","ms","Moz","O"];Object.keys(Fs).forEach(function(t){nI.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Fs[e]=Fs[t]})});function Av(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Fs.hasOwnProperty(t)&&Fs[t]?(""+e).trim():e+"px"}function kv(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Av(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var rI=Ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zc(t,e){if(e){if(rI[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(F(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(F(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(F(61))}if(e.style!=null&&typeof e.style!="object")throw Error(F(62))}}function eh(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";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 th=null;function Td(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var nh=null,xi=null,Si=null;function Sm(t){if(t=Vo(t)){if(typeof nh!="function")throw Error(F(280));var e=t.stateNode;e&&(e=tu(e),nh(t.stateNode,t.type,e))}}function Cv(t){xi?Si?Si.push(t):Si=[t]:xi=t}function Rv(){if(xi){var t=xi,e=Si;if(Si=xi=null,Sm(t),e)for(t=0;t<e.length;t++)Sm(e[t])}}function Pv(t,e){return t(e)}function Nv(){}var ac=!1;function bv(t,e,n){if(ac)return t(e,n);ac=!0;try{return Pv(t,e,n)}finally{ac=!1,(xi!==null||Si!==null)&&(Nv(),Rv())}}function no(t,e){var n=t.stateNode;if(n===null)return null;var r=tu(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(F(231,e,typeof n));return n}var rh=!1;if(xn)try{var Es={};Object.defineProperty(Es,"passive",{get:function(){rh=!0}}),window.addEventListener("test",Es,Es),window.removeEventListener("test",Es,Es)}catch{rh=!1}function iI(t,e,n,r,i,s,o,l,u){var h=Array.prototype.slice.call(arguments,3);try{e.apply(n,h)}catch(p){this.onError(p)}}var Us=!1,ul=null,cl=!1,ih=null,sI={onError:function(t){Us=!0,ul=t}};function oI(t,e,n,r,i,s,o,l,u){Us=!1,ul=null,iI.apply(sI,arguments)}function aI(t,e,n,r,i,s,o,l,u){if(oI.apply(this,arguments),Us){if(Us){var h=ul;Us=!1,ul=null}else throw Error(F(198));cl||(cl=!0,ih=h)}}function Jr(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Dv(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Am(t){if(Jr(t)!==t)throw Error(F(188))}function lI(t){var e=t.alternate;if(!e){if(e=Jr(t),e===null)throw Error(F(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Am(i),t;if(s===r)return Am(i),e;s=s.sibling}throw Error(F(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?t:e}function Ov(t){return t=lI(t),t!==null?Vv(t):null}function Vv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Vv(t);if(e!==null)return e;t=t.sibling}return null}var Lv=It.unstable_scheduleCallback,km=It.unstable_cancelCallback,uI=It.unstable_shouldYield,cI=It.unstable_requestPaint,Ce=It.unstable_now,hI=It.unstable_getCurrentPriorityLevel,Id=It.unstable_ImmediatePriority,jv=It.unstable_UserBlockingPriority,hl=It.unstable_NormalPriority,dI=It.unstable_LowPriority,Mv=It.unstable_IdlePriority,Xl=null,Qt=null;function fI(t){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Xl,t,void 0,(t.current.flags&128)===128)}catch{}}var Ut=Math.clz32?Math.clz32:gI,pI=Math.log,mI=Math.LN2;function gI(t){return t>>>=0,t===0?32:31-(pI(t)/mI|0)|0}var Ta=64,Ia=4194304;function bs(t){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: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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function dl(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=bs(l):(s&=o,s!==0&&(r=bs(s)))}else o=n&~i,o!==0?r=bs(o):s!==0&&(r=bs(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Ut(e),i=1<<n,r|=t[n],e&=~i;return r}function yI(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vI(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Ut(s),l=1<<o,u=i[o];u===-1?(!(l&n)||l&r)&&(i[o]=yI(l,e)):u<=e&&(t.expiredLanes|=l),s&=~l}}function sh(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Fv(){var t=Ta;return Ta<<=1,!(Ta&4194240)&&(Ta=64),t}function lc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Do(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ut(e),t[e]=n}function _I(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Ut(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function xd(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Ut(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ae=0;function Uv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var zv,Sd,Bv,$v,qv,oh=!1,xa=[],Xn=null,Jn=null,Zn=null,ro=new Map,io=new Map,Bn=[],wI="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 submit".split(" ");function Cm(t,e){switch(t){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":ro.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":io.delete(e.pointerId)}}function Ts(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Vo(e),e!==null&&Sd(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function EI(t,e,n,r,i){switch(e){case"focusin":return Xn=Ts(Xn,t,e,n,r,i),!0;case"dragenter":return Jn=Ts(Jn,t,e,n,r,i),!0;case"mouseover":return Zn=Ts(Zn,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return ro.set(s,Ts(ro.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,io.set(s,Ts(io.get(s)||null,t,e,n,r,i)),!0}return!1}function Wv(t){var e=Pr(t.target);if(e!==null){var n=Jr(e);if(n!==null){if(e=n.tag,e===13){if(e=Dv(n),e!==null){t.blockedOn=e,qv(t.priority,function(){Bv(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ba(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=ah(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);th=r,n.target.dispatchEvent(r),th=null}else return e=Vo(n),e!==null&&Sd(e),t.blockedOn=n,!1;e.shift()}return!0}function Rm(t,e,n){Ba(t)&&n.delete(e)}function TI(){oh=!1,Xn!==null&&Ba(Xn)&&(Xn=null),Jn!==null&&Ba(Jn)&&(Jn=null),Zn!==null&&Ba(Zn)&&(Zn=null),ro.forEach(Rm),io.forEac
vendor: 9,276 bytes, line 38
38h(Rm)}function Is(t,e){t.blockedOn===e&&(t.blockedOn=null,oh||(oh=!0,It.unstable_scheduleCallback(It.unstable_NormalPriority,TI)))}function so(t){function e(i){return Is(i,t)}if(0<xa.length){Is(xa[0],t);for(var n=1;n<xa.length;n++){var r=xa[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Xn!==null&&Is(Xn,t),Jn!==null&&Is(Jn,t),Zn!==null&&Is(Zn,t),ro.forEach(e),io.forEach(e),n=0;n<Bn.length;n++)r=Bn[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Bn.length&&(n=Bn[0],n.blockedOn===null);)Wv(n),n.blockedOn===null&&Bn.shift()}var Ai=bn.ReactCurrentBatchConfig,fl=!0;function II(t,e,n,r){var i=ae,s=Ai.transition;Ai.transition=null;try{ae=1,Ad(t,e,n,r)}finally{ae=i,Ai.transition=s}}function xI(t,e,n,r){var i=ae,s=Ai.transition;Ai.transition=null;try{ae=4,Ad(t,e,n,r)}finally{ae=i,Ai.transition=s}}function Ad(t,e,n,r){if(fl){var i=ah(t,e,n,r);if(i===null)vc(t,e,r,pl,n),Cm(t,r);else if(EI(i,t,e,n,r))r.stopPropagation();else if(Cm(t,r),e&4&&-1<wI.indexOf(t)){for(;i!==null;){var s=Vo(i);if(s!==null&&zv(s),s=ah(t,e,n,r),s===null&&vc(t,e,r,pl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else vc(t,e,r,null,n)}}var pl=null;function ah(t,e,n,r){if(pl=null,t=Td(r),t=Pr(t),t!==null)if(e=Jr(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Dv(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return pl=t,null}function Hv(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(hI()){case Id:return 1;case jv:return 4;case hl:case dI:return 16;case Mv:return 536870912;default:return 16}default:return 16}}var Gn=null,kd=null,$a=null;function Gv(){if($a)return $a;var t,e=kd,n=e.length,r,i="value"in Gn?Gn.value:Gn.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return $a=i.slice(t,1<r?1-r:void 0)}function qa(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Sa(){return!0}function Pm(){return!1}function St(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Sa:Pm,this.isPropagationStopped=Pm,this}return Ee(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Sa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sa)},persist:function(){},isPersistent:Sa}),e}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cd=St(Yi),Oo=Ee({},Yi,{view:0,detail:0}),SI=St(Oo),uc,cc,xs,Jl=Ee({},Oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rd,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!==xs&&(xs&&t.type==="mousemove"?(uc=t.screenX-xs.screenX,cc=t.screenY-xs.screenY):cc=uc=0,xs=t),uc)},movementY:function(t){return"movementY"in t?t.movementY:cc}}),Nm=St(Jl),AI=Ee({},Jl,{dataTransfer:0}),kI=St(AI),CI=Ee({},Oo,{relatedTarget:0}),hc=St(CI),RI=Ee({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),PI=St(RI),NI=Ee({},Yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),bI=St(NI),DI=Ee({},Yi,{data:0}),bm=St(DI),OI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VI={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"},LI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jI(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=LI[t])?!!e[t]:!1}function Rd(){return jI}var MI=Ee({},Oo,{key:function(t){if(t.key){var e=OI[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=qa(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?VI[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rd,charCode:function(t){return t.type==="keypress"?qa(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?qa(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),FI=St(MI),UI=Ee({},Jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dm=St(UI),zI=Ee({},Oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rd}),BI=St(zI),$I=Ee({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),qI=St($I),WI=Ee({},Jl,{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}),HI=St(WI),GI=[9,13,27,32],Pd=xn&&"CompositionEvent"in window,zs=null;xn&&"documentMode"in document&&(zs=document.documentMode);var KI=xn&&"TextEvent"in window&&!zs,Kv=xn&&(!Pd||zs&&8<zs&&11>=zs),Om=" ",Vm=!1;function Qv(t,e){switch(t){case"keyup":return GI.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yv(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fi=!1;function QI(t,e){switch(t){case"compositionend":return Yv(e);case"keypress":return e.which!==32?null:(Vm=!0,Om);case"textInput":return t=e.data,t===Om&&Vm?null:t;default:return null}}function YI(t,e){if(fi)return t==="compositionend"||!Pd&&Qv(t,e)?(t=Gv(),$a=kd=Gn=null,fi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Kv&&e.locale!=="ko"?null:e.data;default:return null}}var XI={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 Lm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!XI[t.type]:e==="textarea"}function Xv(t,e,n,r){Cv(r),e=ml(e,"onChange"),0<e.length&&(n=new Cd("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Bs=null,oo=null;function JI(t){l_(t,0)}function Zl(t){var e=gi(t);if(Ev(e))return t}function ZI(t,e){if(t==="change")return e}var Jv=!1;if(xn){var dc;if(xn){var fc="oninput"in document;if(!fc){var jm=document.createElement("div");jm.setAttribute("oninput","return;"),fc=typeof jm.oninput=="function"}dc=fc}else dc=!1;Jv=dc&&(!document.documentMode||9<document.documentMode)}function Mm(){Bs&&(Bs.detachEvent("onpropertychange",Zv),oo=Bs=null)}function Zv(t){if(t.propertyName==="value"&&Zl(oo)){var e=[];Xv(e,oo,t,Td(t)),bv(JI,e)}}function ex(t,e,n){t==="focusin"?(Mm(),Bs=e,oo=n,Bs.attachEvent("onpropertychange",Zv)):t==="focusout"&&Mm()}function tx(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Zl(oo)}function nx(t,e){if(t==="click")return Zl(e)}function rx(t,e){if(t==="input"||t==="change")return Zl(e)}function ix(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var $t=typeof Object.is=="function"?Object.is:ix;function ao(t,e){if($t(t,e))return!0;
vendor: 4,808 bytes, line 38
38if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!$c.call(e,i)||!$t(t[i],e[i]))return!1}return!0}function Fm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Um(t,e){var n=Fm(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fm(n)}}function e_(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?e_(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function t_(){for(var t=window,e=ll();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ll(t.document)}return e}function Nd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function sx(t){var e=t_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&e_(n.ownerDocument.documentElement,n)){if(r!==null&&Nd(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Um(n,s);var o=Um(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var ox=xn&&"documentMode"in document&&11>=document.documentMode,pi=null,lh=null,$s=null,uh=!1;function zm(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uh||pi==null||pi!==ll(r)||(r=pi,"selectionStart"in r&&Nd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$s&&ao($s,r)||($s=r,r=ml(lh,"onSelect"),0<r.length&&(e=new Cd("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=pi)))}function Aa(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var mi={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionend:Aa("Transition","TransitionEnd")},pc={},n_={};xn&&(n_=document.createElement("div").style,"AnimationEvent"in window||(delete mi.animationend.animation,delete mi.animationiteration.animation,delete mi.animationstart.animation),"TransitionEvent"in window||delete mi.transitionend.transition);function eu(t){if(pc[t])return pc[t];if(!mi[t])return t;var e=mi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in n_)return pc[t]=e[n];return t}var r_=eu("animationend"),i_=eu("animationiteration"),s_=eu("animationstart"),o_=eu("transitionend"),a_=new Map,Bm="abort auxClick 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(" ");function mr(t,e){a_.set(t,e),Xr(e,[t])}for(var mc=0;mc<Bm.length;mc++){var gc=Bm[mc],ax=gc.toLowerCase(),lx=gc[0].toUpperCase()+gc.slice(1);mr(ax,"on"+lx)}mr(r_,"onAnimationEnd");mr(i_,"onAnimationIteration");mr(s_,"onAnimationStart");mr("dblclick","onDoubleClick");mr("focusin","onFocus");mr("focusout","onBlur");mr(o_,"onTransitionEnd");Oi("onMouseEnter",["mouseout","mouseover"]);Oi("onMouseLeave",["mouseout","mouseover"]);Oi("onPointerEnter",["pointerout","pointerover"]);Oi("onPointerLeave",["pointerout","pointerover"]);Xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,181 bytes, line 38
38Xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="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(" "),ux=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ds));function $m(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,aI(r,e,void 0,t),t.currentTarget=null}function l_(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var l=r[o],u=l.instance,h=l.currentTarget;if(l=l.listener,u!==s&&i.isPropagationStopped())break e;$m(i,l,h),s=u}else for(o=0;o<r.length;o++){if(l=r[o],u=l.instance,h=l.currentTarget,l=l.listener,u!==s&&i.isPropagationStopped())break e;$m(i,l,h),s=u}}}if(cl)throw t=ih,cl=!1,ih=null,t}function pe(t,e){var n=e[ph];n===void 0&&(n=e[ph]=new Set);var r=t+"__bubble";n.has(r)||(u_(e,t,2,!1),n.add(r))}function yc(t,e,n){var r=0;e&&(r|=4),u_(n,t,r,e)}var ka="_reactListening"+Math.random().toString(36).slice(2);function lo(t){if(!t[ka]){t[ka]=!0,gv.forEach(function(n){n!=="selectionchange"&&(ux.has(n)||yc(n,!1,t),yc(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ka]||(e[ka]=!0,yc("selectionchange",!1,e))}}function u_(t,e,n,r){switch(Hv(e)){case 1:var i=II;break;case 4:i=xI;break;default:i=Ad}n=i.bind(null,e,n,t),i=void 0,!rh||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function vc(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Pr(l),o===null)return;if(u=o.tag,u===5||u===6){r=s=o;continue e}l=l.parentNode}}r=r.return}bv(function(){var h=s,p=Td(n),m=[];e:{var g=a_.get(t);if(g!==void 0){var A=Cd,C=t;switch(t){case"keypress":if(qa(n)===0)break e;case"keydown":case"keyup":A=FI;break;case"focusin":C="focus",A=hc;break;case"focusout":C="blur",A=hc;break;case"beforeblur":case"afterblur":A=hc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":A=Nm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":A=kI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":A=BI;break;case r_:case i_:case s_:A=PI;break;case o_:A=qI;break;case"scroll":A=SI;break;case"wheel":A=HI;break;case"copy":case"cut":case"paste":A=bI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":A=Dm}var N=(e&4)!==0,R=!N&&t==="scroll",w=N?g!==null?g+"Capture":null:g;N=[];for(var _=h,E;_!==null;){E=_;var D=E.stateNode;if(E.tag===5&&D!==null&&(E=D,w!==null&&(D=no(_,w),D!=null&&N.push(uo(_,D,E)))),R)break;_=_.return}0<N.length&&(g=new A(g,C,null,n,p),m.push({event:g,listeners:N}))}}if(!(e&7)){e:{if(g=t==="mouseover"||t==="pointerover",A=t==="mouseout"||t==="pointerout",g&&n!==th&&(C=n.relatedTarget||n.fromElement)&&(Pr(C)||C[Sn]))break e;if((A||g)&&(g=p.window===p?p:(g=p.ownerDocument)?g.defaultView||g.parentWindow:window,A?(C=n.relatedTarget||n.toElement,A=h,C=C?Pr(C):null,C!==null&&(R=Jr(C),C!==R||C.tag!==5&&C.tag!==6)&&(C=null)):(A=null,C=h),A!==C)){if
vendor: 6,394 bytes, lines 38-39
38(N=Nm,D="onMouseLeave",w="onMouseEnter",_="mouse",(t==="pointerout"||t==="pointerover")&&(N=Dm,D="onPointerLeave",w="onPointerEnter",_="pointer"),R=A==null?g:gi(A),E=C==null?g:gi(C),g=new N(D,_+"leave",A,n,p),g.target=R,g.relatedTarget=E,D=null,Pr(p)===h&&(N=new N(w,_+"enter",C,n,p),N.target=E,N.relatedTarget=R,D=N),R=D,A&&C)t:{for(N=A,w=C,_=0,E=N;E;E=oi(E))_++;for(E=0,D=w;D;D=oi(D))E++;for(;0<_-E;)N=oi(N),_--;for(;0<E-_;)w=oi(w),E--;for(;_--;){if(N===w||w!==null&&N===w.alternate)break t;N=oi(N),w=oi(w)}N=null}else N=null;A!==null&&qm(m,g,A,N,!1),C!==null&&R!==null&&qm(m,R,C,N,!0)}}e:{if(g=h?gi(h):window,A=g.nodeName&&g.nodeName.toLowerCase(),A==="select"||A==="input"&&g.type==="file")var j=ZI;else if(Lm(g))if(Jv)j=rx;else{j=tx;var U=ex}else(A=g.nodeName)&&A.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(j=nx);if(j&&(j=j(t,h))){Xv(m,j,n,p);break e}U&&U(t,g,h),t==="focusout"&&(U=g._wrapperState)&&U.controlled&&g.type==="number"&&Yc(g,"number",g.value)}switch(U=h?gi(h):window,t){case"focusin":(Lm(U)||U.contentEditable==="true")&&(pi=U,lh=h,$s=null);break;case"focusout":$s=lh=pi=null;break;case"mousedown":uh=!0;break;case"contextmenu":case"mouseup":case"dragend":uh=!1,zm(m,n,p);break;case"selectionchange":if(ox)break;case"keydown":case"keyup":zm(m,n,p)}var T;if(Pd)e:{switch(t){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else fi?Qv(t,n)&&(v="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(v="onCompositionStart");v&&(Kv&&n.locale!=="ko"&&(fi||v!=="onCompositionStart"?v==="onCompositionEnd"&&fi&&(T=Gv()):(Gn=p,kd="value"in Gn?Gn.value:Gn.textContent,fi=!0)),U=ml(h,v),0<U.length&&(v=new bm(v,t,null,n,p),m.push({event:v,listeners:U}),T?v.data=T:(T=Yv(n),T!==null&&(v.data=T)))),(T=KI?QI(t,n):YI(t,n))&&(h=ml(h,"onBeforeInput"),0<h.length&&(p=new bm("onBeforeInput","beforeinput",null,n,p),m.push({event:p,listeners:h}),p.data=T))}l_(m,e)})}function uo(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ml(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=no(t,n),s!=null&&r.unshift(uo(t,s,i)),s=no(t,e),s!=null&&r.push(uo(t,s,i))),t=t.return}return r}function oi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function qm(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var l=n,u=l.alternate,h=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&h!==null&&(l=h,i?(u=no(n,s),u!=null&&o.unshift(uo(n,u,l))):i||(u=no(n,s),u!=null&&o.push(uo(n,u,l)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var cx=/\r\n?/g,hx=/\u0000|\uFFFD/g;function Wm(t){return(typeof t=="string"?t:""+t).replace(cx,` 39`).replace(hx,"")}function Ca(t,e,n){if(e=Wm(e),Wm(t)!==e&&n)throw Error(F(425))}function gl(){}var ch=null,hh=null;function dh(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var fh=typeof setTimeout=="function"?setTimeout:void 0,dx=typeof clearTimeout=="function"?clearTimeout:void 0,Hm=typeof Promise=="function"?Promise:void 0,fx=typeof queueMicrotask=="function"?queueMicrotask:typeof Hm<"u"?function(t){return Hm.resolve(null).then(t).catch(px)}:fh;function px(t){setTimeout(function(){throw t})}function _c(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),so(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);so(e)}function er(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Gm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Xi=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Xi,co="__reactProps$"+Xi,Sn="__reactContainer$"+Xi,ph="__reactEvents$"+Xi,mx="__reactListeners$"+Xi,gx="__reactHandles$"+Xi;function Pr(t){var e=t[Gt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Sn]||n[Gt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Gm(t);t!==null;){if(n=t[Gt])return n;t=Gm(t)}return e}t=n,n=t.parentNode}return null}function Vo(t){return t=t[Gt]||t[Sn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function gi(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(F(33))}function tu(t){return t[co]||null}var mh=[],yi=-1;function gr(t){return{current:t}}function ge(t){0>yi||(t.current=mh[yi],mh[yi]=null,yi--)}function de(t,e){yi++,mh[yi]=t.current,t.current=e}var cr={},nt=gr(cr),mt=gr(!1),Ur=cr;function Vi(t,e){var n=t.type.contextTypes;if(!n)return cr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function gt(t){return t=t.childContextTypes,t!=null}function yl(){ge(mt),ge(nt)}function Km(t,e,n){if(nt.current!==cr)throw Error(F(168));de(nt,e),de(mt,n)}function c_(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(F(108,eI(t)||"Unknown",i));return Ee({},n,r)}function vl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cr,Ur=nt.current,de(nt,t),de(mt,mt.current),!0}function Qm(t,e,n){var r=t.stateNode;if(!r)throw Error(F(169));n?(t=c_(t,e,Ur),r.__reactInternalMemoizedMergedChildContext=t,ge(mt),ge(nt),de(nt,t)):ge(mt),de(mt,n)}var pn=null,nu=!1,wc=!1;function h_(t){pn===null?pn=[t]:pn.push(t)}function yx(t){nu=!0,h_(t)}function yr(){if(!wc&&pn!==null){wc=!0;var t=0,e=ae;try{var n=pn;for(ae=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}pn=null,nu=!1}catch(i){throw pn!==null&&(pn=pn.slice(t+1)),Lv(Id,yr),i}finally{ae=e,wc=!1}}return null}var vi=[],_i=0,_l=null,wl=0,kt=[],Ct=0,zr=null,gn=1,yn="";function kr(t,e){vi[_i++]=wl,vi[_i++]=_l,_l=t,wl=e}function d_(t,e,n){kt[Ct++]=gn,kt[Ct++]=yn,kt[Ct++]=zr,zr=t;var r=gn;t=yn;var i=32-Ut(r)-1;r&=~(1<<i),n+=1;var s=32-Ut(e)+i;
vendor: 26,012 bytes, lines 39-41
39if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gn=1<<32-Ut(e)+i|n<<i|r,yn=s+t}else gn=1<<s|n<<i|r,yn=t}function bd(t){t.return!==null&&(kr(t,1),d_(t,1,0))}function Dd(t){for(;t===_l;)_l=vi[--_i],vi[_i]=null,wl=vi[--_i],vi[_i]=null;for(;t===zr;)zr=kt[--Ct],kt[Ct]=null,yn=kt[--Ct],kt[Ct]=null,gn=kt[--Ct],kt[Ct]=null}var Tt=null,wt=null,ye=!1,Mt=null;function f_(t,e){var n=Rt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Ym(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Tt=t,wt=er(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Tt=t,wt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=zr!==null?{id:gn,overflow:yn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Rt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Tt=t,wt=null,!0):!1;default:return!1}}function gh(t){return(t.mode&1)!==0&&(t.flags&128)===0}function yh(t){if(ye){var e=wt;if(e){var n=e;if(!Ym(t,e)){if(gh(t))throw Error(F(418));e=er(n.nextSibling);var r=Tt;e&&Ym(t,e)?f_(r,n):(t.flags=t.flags&-4097|2,ye=!1,Tt=t)}}else{if(gh(t))throw Error(F(418));t.flags=t.flags&-4097|2,ye=!1,Tt=t}}}function Xm(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Tt=t}function Ra(t){if(t!==Tt)return!1;if(!ye)return Xm(t),ye=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!dh(t.type,t.memoizedProps)),e&&(e=wt)){if(gh(t))throw p_(),Error(F(418));for(;e;)f_(t,e),e=er(e.nextSibling)}if(Xm(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(F(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){wt=er(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}wt=null}}else wt=Tt?er(t.stateNode.nextSibling):null;return!0}function p_(){for(var t=wt;t;)t=er(t.nextSibling)}function Li(){wt=Tt=null,ye=!1}function Od(t){Mt===null?Mt=[t]:Mt.push(t)}var vx=bn.ReactCurrentBatchConfig;function Ss(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(F(309));var r=n.stateNode}if(!r)throw Error(F(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(F(284));if(!n._owner)throw Error(F(290,t))}return t}function Pa(t,e){throw t=Object.prototype.toString.call(e),Error(F(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Jm(t){var e=t._init;return e(t._payload)}function m_(t){function e(w,_){if(t){var E=w.deletions;E===null?(w.deletions=[_],w.flags|=16):E.push(_)}}function n(w,_){if(!t)return null;for(;_!==null;)e(w,_),_=_.sibling;return null}function r(w,_){for(w=new Map;_!==null;)_.key!==null?w.set(_.key,_):w.set(_.index,_),_=_.sibling;return w}function i(w,_){return w=ir(w,_),w.index=0,w.sibling=null,w}function s(w,_,E){return w.index=E,t?(E=w.alternate,E!==null?(E=E.index,E<_?(w.flags|=2,_):E):(w.flags|=2,_)):(w.flags|=1048576,_)}function o(w){return t&&w.alternate===null&&(w.flags|=2),w}function l(w,_,E,D){return _===null||_.tag!==6?(_=kc(E,w.mode,D),_.return=w,_):(_=i(_,E),_.return=w,_)}function u(w,_,E,D){var j=E.type;return j===di?p(w,_,E.props.children,D,E.key):_!==null&&(_.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Un&&Jm(j)===_.type)?(D=i(_,E.props),D.ref=Ss(w,_,E),D.return=w,D):(D=Xa(E.type,E.key,E.props,null,w.mode,D),D.ref=Ss(w,_,E),D.return=w,D)}function h(w,_,E,D){return _===null||_.tag!==4||_.stateNode.containerInfo!==E.containerInfo||_.stateNode.implementation!==E.implementation?(_=Cc(E,w.mode,D),_.return=w,_):(_=i(_,E.children||[]),_.return=w,_)}function p(w,_,E,D,j){return _===null||_.tag!==7?(_=Lr(E,w.mode,D,j),_.return=w,_):(_=i(_,E),_.return=w,_)}function m(w,_,E){if(typeof _=="string"&&_!==""||typeof _=="number")return _=kc(""+_,w.mode,E),_.return=w,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case _a:return E=Xa(_.type,_.key,_.props,null,w.mode,E),E.ref=Ss(w,null,_),E.return=w,E;case hi:return _=Cc(_,w.mode,E),_.return=w,_;case Un:var D=_._init;return m(w,D(_._payload),E)}if(Ns(_)||ws(_))return _=Lr(_,w.mode,E,null),_.return=w,_;Pa(w,_)}return null}function g(w,_,E,D){var j=_!==null?_.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return j!==null?null:l(w,_,""+E,D);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case _a:return E.key===j?u(w,_,E,D):null;case hi:return E.key===j?h(w,_,E,D):null;case Un:return j=E._init,g(w,_,j(E._payload),D)}if(Ns(E)||ws(E))return j!==null?null:p(w,_,E,D,null);Pa(w,E)}return null}function A(w,_,E,D,j){if(typeof D=="string"&&D!==""||typeof D=="number")return w=w.get(E)||null,l(_,w,""+D,j);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case _a:return w=w.get(D.key===null?E:D.key)||null,u(_,w,D,j);case hi:return w=w.get(D.key===null?E:D.key)||null,h(_,w,D,j);case Un:var U=D._init;return A(w,_,E,U(D._payload),j)}if(Ns(D)||ws(D))return w=w.get(E)||null,p(_,w,D,j,null);Pa(_,D)}return null}function C(w,_,E,D){for(var j=null,U=null,T=_,v=_=0,I=null;T!==null&&v<E.length;v++){T.index>v?(I=T,T=null):I=T.sibling;var x=g(w,T,E[v],D);if(x===null){T===null&&(T=I);break}t&&T&&x.alternate===null&&e(w,T),_=s(x,_,v),U===null?j=x:U.sibling=x,U=x,T=I}if(v===E.length)return n(w,T),ye&&kr(w,v),j;if(T===null){for(;v<E.length;v++)T=m(w,E[v],D),T!==null&&(_=s(T,_,v),U===null?j=T:U.sibling=T,U=T);return ye&&kr(w,v),j}for(T=r(w,T);v<E.length;v++)I=A(T,w,v,E[v],D),I!==null&&(t&&I.alternate!==null&&T.delete(I.key===null?v:I.key),_=s(I,_,v),U===null?j=I:U.sibling=I,U=I);return t&&T.forEach(function(k){return e(w,k)}),ye&&kr(w,v),j}function N(w,_,E,D){var j=ws(E);if(typeof j!="function")throw Error(F(150));if(E=j.call(E),E==null)throw Error(F(151));for(var U=j=null,T=_,v=_=0,I=null,x=E.next();T!==null&&!x.done;v++,x=E.next()){T.index>v?(I=T,T=null):I=T.sibling;var k=g(w,T,x.value,D);if(k===null){T===null&&(T=I);break}t&&T&&k.alternate===null&&e(w,T),_=s(k,_,v),U===null?j=k:U.sibling=k,U=k,T=I}if(x.done)return n(w,T),ye&&kr(w,v),j;if(T===null){for(;!x.done;v++,x=E.next())x=m(w,x.value,D),x!==null&&(_=s(x,_,v),U===null?j=x:U.sibling=x,U=x);return ye&&kr(w,v),j}for(T=r(w,T);!x.done;v++,x=E.next())x=A(T,w,v,x.value,D),x!==null&&(t&&x.alternate!==null&&T.delete(x.key===null?v:x.key),_=s(x,_,v),U===null?j=x:U.sibling=x,U=x);return t&&T.forEach(function(b){return e(w,b)}),ye&&kr(w,v),j}function R(w,_,E,D){if(typeof E=="object"&&E!==null&&E.type===di&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case _a:e:{for(var j=E.key,U=_;U!==null;){if(U.key===j){if(j=E.type,j===di){if(U.tag===7){n(w,U.sibling),_=i(U,E.props.children),_.return=w,w=_;break e}}else if(U.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Un&&Jm(j)===U.type){n(w,U.sibling),_=i(U,E.props),_.ref=Ss(w,U,E),_.return=w,w=_;break e}n(w,U);break}else e(w,U);U=U.sibling}E.type===di?(_=Lr(E.props.children,w.mode,D,E.key),_.return=w,w=_):(D=Xa(E.type,E.key,E.props,null,w.mode,D),D.ref=Ss(w,_,E),D.return=w,w=D)}return o(w);case hi:e:{for(U=E.key;_!==null;){if(_.key===U)if(_.tag===4&&_.stateNode.containerInfo===E.containerInfo&&_.stateNode.implementation===E.implementation){n(w,_.sibling),_=i(_,E.children||[]),_.return=w,w=_;break e}else{n(w,_);break}else e(w,_);_=_.sibling}_=Cc(E,w.mode,D),_.return=w,w=_}return o(w);case Un:return U=E._init,R(w,_,U(E._payload),D)}if(Ns(E))return C(w,_,E,D);if(ws(E))return N(w,_,E,D);Pa(w,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,_!==null&&_.tag===6?(n(w,_.sibling),_=i(_,E),_.return=w,w=_):(n(w,_),_=kc(E,w.mode,D),_.return=w,w=_),o(w)):n(w,_)}return R}var ji=m_(!0),g_=m_(!1),El=gr(null),Tl=null,wi=null,Vd=null;function Ld(){Vd=wi=Tl=null}function jd(t){var e=El.current;ge(El),t._currentValue=e}function vh(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ki(t,e){Tl=t,Vd=wi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(pt=!0),t.firstContext=null)}function Nt(t){var e=t._currentValue;if(Vd!==t)if(t={context:t,memoizedValue:e,next:null},wi===null){if(Tl===null)throw Error(F(308));wi=t,Tl.dependencies={lanes:0,firstContext:t}}else wi=wi.next=t;return e}var Nr=null;function Md(t){Nr===null?Nr=[t]:Nr.push(t)}function y_(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Md(e)):(n.next=i.next,i.next=n),e.interleaved=n,An(t,r)}function An(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var zn=!1;function Fd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v_(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Tn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function tr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,An(t,n)}return i=r.interleaved,i===null?(e.next=e,Md(r)):(e.next=i.next,i.next=e),r.interleaved=e,An(t,n)}function Wa(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,xd(t,n)}}function Zm(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Il(t,e,n,r){var i=t.updateQueue;zn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,h=u.next;u.next=null,o===null?s=h:o.next=h,o=u;var p=t.alternate;p!==null&&(p=p.updateQueue,l=p.lastBaseUpdate,l!==o&&(l===null?p.firstBaseUpdate=h:l.next=h,p.lastBaseUpdate=u))}if(s!==null){var m=i.baseState;o=0,p=h=u=null,l=s;do{var g=l.lane,A=l.eventTime;if((r&g)===g){p!==null&&(p=p.next={eventTime:A,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var C=t,N=l;switch(g=e,A=n,N.tag){case 1:if(C=N.payload,typeof C=="function"){m=C.call(A,m,g);break e}m=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=N.payload,g=typeof C=="function"?C.call(A,m,g):C,g==null)break e;m=Ee({},m,g);break e;case 2:zn=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,g=i.effects,g===null?i.effects=[l]:g.push(l))}else A={eventTime:A,lane:g,tag:l.tag,payload:l.payload,callback:l.callback,next:null},p===null?(h=p=A,u=m):p=p.next=A,o|=g;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;g=l,l=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(p===null&&(u=m),i.baseState=u,i.firstBaseUpdate=h,i.lastBaseUpdate=p,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);$r|=o,t.lanes=o,t.memoizedState=m}}function eg(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(F(191,i));i.call(r)}}}var Lo={},Yt=gr(Lo),ho=gr(Lo),fo=gr(Lo);function br(t){if(t===Lo)throw Error(F(174));return t}function Ud(t,e){switch(de(fo,e),de(ho,t),de(Yt,Lo),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Jc(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Jc(e,t)}ge(Yt),de(Yt,e)}function Mi(){ge(Yt),ge(ho),ge(fo)}function __(t){br(fo.current);var e=br(Yt.current),n=Jc(e,t.type);e!==n&&(de(ho,t),de(Yt,n))}function zd(t){ho.current===t&&(ge(Yt),ge(ho))}var _e=gr(0);function xl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ec=[];function Bd(){for(var t=0;t<Ec.length;t++)Ec[t]._workInProgressVersionPrimary=null;Ec.length=0}var Ha=bn.ReactCurrentDispatcher,Tc=bn.ReactCurrentBatchConfig,Br=0,we=null,De=null,Le=null,Sl=!1,qs=!1,po=0,_x=0;function Qe(){throw Error(F(321))}function $d(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!$t(t[n],e[n]))return!1;return!0}function qd(t,e,n,r,i,s){if(Br=s,we=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ha.current=t===null||t.memoizedState===null?Ix:xx,t=n(r,i),qs){s=0;do{if(qs=!1,po=0,25<=s)throw Error(F(301));s+=1,Le=De=null,e.updateQueue=null,Ha.current=Sx,t=n(r,i)}while(qs)}if(Ha.current=Al,e=De!==null&&De.next!==null,Br=0,Le=De=we=null,Sl=!1,e)throw Error(F(300));return t}function Wd(){var t=po!==0;return po=0,t}function Ht(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?we.memoizedState=Le=t:Le=Le.next=t,Le}function bt(){if(De===null){var t=we.alternate;t=t!==null?t.memoizedState:null}else t=De.next;var e=Le===null?we.memoizedState:Le.next;if(e!==null)Le=e,De=t;else{if(t===null)throw Error(F(310));De=t,t={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Le===null?we.memoizedState=Le=t:Le=Le.next=t}return Le}function mo(t,e){return typeof e=="function"?e(t):e}function Ic(t){var e=bt(),n=e.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=t;var r=De,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,u=null,h=s;do{var p=h.lane;if((Br&p)===p)u!==null&&(u=u.next={lane:0,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),r=h.hasEagerState?h.eagerState:t(r,h.action);else{var m={lane:p,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};u===null?(l=u=m,o=r):u=u.next=m,we.lanes|=p,$r|=p}h=h.next}while(h!==null&&h!==s);u===null?o=r:u.next=l,$t(r,e.memoizedState)||(pt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,we.lanes|=s,$r|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function xc(t){var e=bt(),n=e.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);$t(s,e.memoizedState)||(pt=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function w_(){}function E_(t,e){var n=we,r=bt(),i=e(),s=!$t(r.memoizedState,i);if(s&&(r.memoizedState=i,pt=!0),r=r.queue,Hd(x_.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Le!==null&&Le.memoizedState.tag&1){if(n.flags|=2048,go(9,I_.bind(null,n,r,i,e),void 0,null),je===null)throw Error(F(349));Br&30||T_(n,e,i)}return i}function T_(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=we.updateQueue,e===null?(e={lastEffect:null,stores:null},we.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function I_(t,e,n,r){e.value=n,e.getSnapshot=r,S_(e)&&A_(t)}function x_(t,e,n){return n(function(){S_(e)&&A_(t)})}function S_(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!$t(t,n)}catch{return!0}}function A_(t){var e=An(t,1);e!==null&&zt(e,t,1,-1)}function tg(t){var e=Ht();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:t},e.queue=t,t=t.dispatch=Tx.bind(null,we,t),[e.memoizedState,t]}function go(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=we.updateQueue,e===null?(e={lastEffect:null,stores:null},we.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function k_(){return bt().memoizedState}function Ga(t,e,n,r){var i=Ht();we.flags|=t,i.memoizedState=go(1|e,n,void 0,r===void 0?null:r)}function ru(t,e,n,r){var i=bt();r=r===void 0?null:r;var s=void 0;if(De!==null){var o=De.memoizedState;if(s=o.destroy,r!==null&&$d(r,o.deps)){i.memoizedState=go(e,n,s,r);return}}we.flags|=t,i.memoizedState=go(1|e,n,s,r)}function ng(t,e){return Ga(8390656,8,t,e)}function Hd(t,e){return ru(2048,8,t,e)}function C_(t,e){return ru(4,2,t,e)}function R_(t,e){return ru(4,4,t,e)}function P_(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function N_(t,e,n){return n=n!=null?n.concat([t]):null,ru(4,4,P_.bind(null,e,t),n)}function Gd(){}function b_(t,e){var n=bt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&$d(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function D_(t,e){var n=bt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&$d(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function O_(t,e,n){return Br&21?($t(n,e)||(n=Fv(),we.lanes|=n,$r|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,pt=!0),t.memoizedState=n)}function wx(t,e){var n=ae;ae=n!==0&&4>n?n:4,t(!0);var r=Tc.transition;Tc.transition={};try{t(!1),e()}finally{ae=n,Tc.transition=r}}function V_(){return bt().memoizedState}function Ex(t,e,n){var r=rr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},L_(t))j_(e,n);else if(n=y_(t,e,n,r),n!==null){var i=at();zt(n,t,r,i),M_(n,e,r)}}function Tx(t,e,n){var r=rr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(L_(t))j_(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,$t(l,o)){var u=e.interleaved;u===null?(i.next=i,Md(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}n=y_(t,e,i,r),n!==null&&(i=at(),zt(n,t,r,i),M_(n,e,r))}}function L_(t){var e=t.alternate;return t===we||e!==null&&e===we}function j_(t,e){qs=Sl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function M_(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,xd(t,n)}}var Al={readContext:Nt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Ix={readContext:Nt,useCallback:function(t,e){return Ht().memoizedState=[t,e===void 0?null:e],t},useContext:Nt,useEffect:ng,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Ga(4194308,4,P_.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ga(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ga(4,2,t,e)},useMemo:function(t,e){var n=Ht();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ht();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Ex.bind(null,we,t),[r.memoizedState,t]},useRef:function(t){var e=Ht();return t={current:t},e.memoizedState=t},useState:tg,useDebugValue:Gd,useDeferredValue:function(t){return Ht().memoizedState=t},useTransition:function(){var t=tg(!1),e=t[0];return t=wx.bind(null,t[1]),Ht().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=we,i=Ht();if(ye){if(n===void 0)throw Error(F(407));n=n()}else{if(n=e(),je===null)throw Error(F(349));Br&30||T_(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,ng(x_.bind(null,r,s,t),[t]),r.flags|=2048,go(9,I_.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Ht(),e=je.identifierPrefix;if(ye){var n=yn,r=gn;n=(r&~(1<<32-Ut(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=po++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=_x++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},xx={readContext:Nt,useCallback:b_,useContext:Nt,useEffect:Hd,useImperativeHandle:N_,useInsertionEffect:C_,useLayoutEffect:R_,useMemo:D_,useReducer:Ic,useRef:k_,useState:function(){return Ic(mo)},useDebugValue:Gd,useDeferredValue:function(t){var e=bt();return O_(e,De.memoizedState,t)},useTransition:function(){var t=Ic(mo)[0],e=bt().memoizedState;return[t,e]},useMutableSource:w_,useSyncExternalStore:E_,useId:V_,unstable_isNewReconciler:!1},Sx={readContext:Nt,useCallback:b_,useContext:Nt,useEffect:Hd,useImperativeHandle:N_,useInsertionEffect:C_,useLayoutEffect:R_,useMemo:D_,useReducer:xc,useRef:k_,useState:function(){return xc(mo)},useDebugValue:Gd,useDeferredValue:function(t){var e=bt();return De===null?e.memoizedState=t:O_(e,De.memoizedState,t)},useTransition:function(){var t=xc(mo)[0],e=bt().memoizedState;return[t,e]},useMutableSource:w_,useSyncExternalStore:E_,useId:V_,unstable_isNewReconciler:!1};function Lt(t,e){if(t&&t.defaultProps){e=Ee({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function _h(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Ee({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var iu={isMounted:function(t){return(t=t._reactInternals)?Jr(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=at(),i=rr(t),s=Tn(r,i);s.payload=e,n!=null&&(s.callback=n),e=tr(t,s,i),e!==null&&(zt(e,t,i,r),Wa(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=at(),i=rr(t),s=Tn(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=tr(t,s,i),e!==null&&(zt(e,t,i,r),Wa(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=at(),r=rr(t),i=Tn(n,r);i.tag=2,e!=null&&(i.callback=e),e=tr(t,i,r),e!==null&&(zt(e,t,r,n),Wa(e,t,r))}};function rg(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!ao(n,r)||!ao(i,s):!0}function F_(t,e,n){var r=!1,i=cr,s=e.contextType;return typeof s=="object"&&s!==null?s=Nt(s):(i=gt(e)?Ur:nt.current,r=e.contextTypes,s=(r=r!=null)?Vi(t,i):cr),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=iu,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function ig(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&iu.enqueueReplaceState(e,e.state,null)}function wh(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Fd(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Nt(s):(s=gt(e)?Ur:nt.current,i.context=Vi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(_h(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&iu.enqueueReplaceState(i,i.state,null),Il(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Fi(t,e){try{var n="",r=e;do n+=ZT(r),r=r.return;while(r);var i=n}catch(s){i=` 40Error generating stack: `+s.message+` 41`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Sc(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Eh(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var Ax=typeof WeakMap=="function"?WeakMap:Map;function U_(t,e,n){n=Tn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Cl||(Cl=!0,Nh=r),Eh(t,e)},n}function z_(t,e,n){n=Tn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Eh(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Eh(t,e),typeof r!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function sg(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new Ax;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Ux.bind(null,t,e,n),e.then(t,t))}function og(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function ag(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Tn(-1,1),e.tag=2,tr(n,e,1))),n.lanes|=1),t)}var kx=bn.ReactCurrentOwner,pt=!1;function ot(t,e,n,r){e.child=t===null?g_(e,null,n,r):ji(e,t.child,n,r)}function lg(t,e,n,r,i){n=n.render;var s=e.ref;return ki(e,i),r=qd(t,e,n,r,s,i),n=Wd(),t!==null&&!pt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,kn(t,e,
vendor: 9,413 bytes, line 41
41i)):(ye&&n&&bd(e),e.flags|=1,ot(t,e,r,i),e.child)}function ug(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!tf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,B_(t,e,s,r,i)):(t=Xa(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ao,n(o,r)&&t.ref===e.ref)return kn(t,e,i)}return e.flags|=1,t=ir(s,r),t.ref=e.ref,t.return=e,e.child=t}function B_(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(ao(s,r)&&t.ref===e.ref)if(pt=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(pt=!0);else return e.lanes=t.lanes,kn(t,e,i)}return Th(t,e,n,r,i)}function $_(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(Ti,_t),_t|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,de(Ti,_t),_t|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(Ti,_t),_t|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,de(Ti,_t),_t|=r;return ot(t,e,i,n),e.child}function q_(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Th(t,e,n,r,i){var s=gt(n)?Ur:nt.current;return s=Vi(e,s),ki(e,i),n=qd(t,e,n,r,s,i),r=Wd(),t!==null&&!pt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,kn(t,e,i)):(ye&&r&&bd(e),e.flags|=1,ot(t,e,n,i),e.child)}function cg(t,e,n,r,i){if(gt(n)){var s=!0;vl(e)}else s=!1;if(ki(e,i),e.stateNode===null)Ka(t,e),F_(e,n,r),wh(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var u=o.context,h=n.contextType;typeof h=="object"&&h!==null?h=Nt(h):(h=gt(n)?Ur:nt.current,h=Vi(e,h));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function";m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||u!==h)&&ig(e,o,r,h),zn=!1;var g=e.memoizedState;o.state=g,Il(e,r,o,i),u=e.memoizedState,l!==r||g!==u||mt.current||zn?(typeof p=="function"&&(_h(e,n,p,r),u=e.memoizedState),(l=zn||rg(e,n,l,r,g,u,h))?(m||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),o.props=r,o.state=u,o.context=h,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,v_(t,e),l=e.memoizedProps,h=e.type===e.elementType?l:Lt(e.type,l),o.props=h,m=e.pendingProps,g=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Nt(u):(u=gt(n)?Ur:nt.current,u=Vi(e,u));var A=n.getDerivedStateFromProps;(p=typeof A=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==m||g!==u)&&ig(e,o,r,u),zn=!1,g=e.memoizedState,o.state=g,Il(e,r,o,i);var C=e.memoizedState;l!==m||g!==C||mt.current||zn?(typeof A=="function"&&(_h(e,n,A,r),C=e.memoizedState),(h=zn||rg(e,n,h,r,g,C,u)||!1)?(p||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,C,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,C,u)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=C),o.props=r,o.state=C,o.context=u,r=h):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=1024),r=!1)}return Ih(t,e,n,r,s,i)}function Ih(t,e,n,r,i,s){q_(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&Qm(e,n,!1),kn(t,e,s);r=e.stateNode,kx.current=e;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=ji(e,t.child,null,s),e.child=ji(e,null,l,s)):ot(t,e,l,s),e.memoizedState=r.state,i&&Qm(e,n,!0),e.child}function W_(t){var e=t.stateNode;e.pendingContext?Km(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Km(t,e.context,!1),Ud(t,e.containerInfo)}function hg(t,e,n,r,i){return Li(),Od(i),e.flags|=256,ot(t,e,n,r),e.child}var xh={dehydrated:null,treeContext:null,retryLane:0};function Sh(t){return{baseLanes:t,cachePool:null,transitions:null}}function H_(t,e,n){var r=e.pendingProps,i=_e.current,s=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),de(_e,i&1),t===null)return yh(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=au(o,r,0,null),t=Lr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Sh(n),e.memoizedState=xh,t):Kd(e,o));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Cx(t,e,o,r,l,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=u,e.deletions=null):(r=ir(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=ir(l,s):(s=Lr(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Sh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=xh,r}return s=t.child,t=s.sibling,r=ir(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Kd(t,e){return e=au({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Na(t,e,n,r){return r!==null&&Od(r),ji(e,t.child,null,n),t=Kd(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Cx(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Sc(Error(F(422))),Na(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=au({mode:"visible",children:r.children},i,0,null),s=Lr(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&ji(e,t.child,null,o),e.child.memoizedState=Sh(o),e.memoizedState=xh,s);if(!(e.mode&1))return Na(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(F(419)),r=Sc(s,r,void 0),Na(t,e,o,r)}if(l=(o&t.childLanes)!==0,pt||l){if(r=je,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,An(t,i),zt(r,t,i,-1))}return ef(),r=Sc(Error(F(421))),Na(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=zx.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,wt=er(i.nextSibling),Tt=e,ye=!0,Mt=null,t!==null&&(kt[Ct++]=gn,kt[Ct++]=yn,kt[Ct++]=zr,gn=t.id,yn=t.overflow,zr=e),e=Kd(e,r.children),e.flags|=4096,e)}function dg(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),vh(t.return,e,n)}function Ac(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function G_(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(ot(t,e,r.children,n),r=_e.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&dg(t,n,e);else if(t.tag===19)dg(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(de(_e,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&xl(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Ac(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&xl(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Ac(e,!0,n,null,s);break;case"together":Ac(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ka(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,331 bytes, line 41
41function kn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),$r|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(F(153));if(e.child!==null){for(t=e.child,n=ir(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ir(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Rx(t,e,n){switch(e.tag){case 3:W_(e),Li();break;case 5:__(e);break;case 1:gt(e.type)&&vl(e);break;case 4:Ud(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;de(El,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(de(_e,_e.current&1),e.flags|=128,null):n&e.child.childLanes?H_(t,e,n):(de(_e,_e.current&1),t=kn(t,e,n),t!==null?t.sibling:null);de(_e,_e.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return G_(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(_e,_e.current),r)break;return null;case 22:case 23:return e.lanes=0,$_(t,e,n)}return kn(t,e,n)}var K_,Ah,Q_,Y_;K_=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ah=function(){};Q_=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,br(Yt.current);var s=null;switch(n){case"input":i=Kc(t,i),r=Kc(t,r),s=[];break;case"select":i=Ee({},i,{value:void 0}),r=Ee({},r,{value:void 0}),s=[];break;case"textarea":i=Xc(t,i),r=Xc(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=gl)}Zc(n,r);var o;n=null;for(h in i)if(!r.hasOwnProperty(h)&&i.hasOwnProperty(h)&&i[h]!=null)if(h==="style"){var l=i[h];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else h!=="dangerouslySetInnerHTML"&&h!=="children"&&h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(eo.hasOwnProperty(h)?s||(s=[]):(s=s||[]).push(h,null));for(h in r){var u=r[h];if(l=i!=null?i[h]:void 0,r.hasOwnProperty(h)&&u!==l&&(u!=null||l!=null))if(h==="style")if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(s||(s=[]),s.push(h,n)),n=u;else h==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(s=s||[]).push(h,u)):h==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(h,""+u):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&(eo.hasOwnProperty(h)?(u!=null&&h==="onScroll"&&pe("scroll",t),s||l===u||(s=[])):(s=s||[]).push(h,u))}n&&(s=s||[]).push("style",n);var h=s;(e.updateQueue=h)&&(e.flags|=4)}};Y_=function(t,e,n,r){n!==r&&(e.flags|=4)};function As(t,e){if(!ye)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ye(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Px(t,e,n){var r=e.pendingProps;switch(Dd(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(e),null;case 1:return gt(e.type)&&yl(),Ye(e),null;case 3:return r=e.stateNode,Mi(),ge(mt),ge(nt),Bd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Ra(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Mt!==null&&(Oh(Mt),Mt=null))),Ah(t,e),Ye(e),null;case 5:zd(e);var i=br(fo.current);if(n=e.type,t!==null&&e.stateNode!=null)Q_(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(F(166));return Ye(e),null}if(t=br(Yt.current),Ra(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;
vendor: 33,008 bytes, line 41
41switch(r[Gt]=e,r[co]=s,t=(e.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<Ds.length;i++)pe(Ds[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Em(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Im(r,s),pe("invalid",r)}Zc(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&Ca(r.textContent,l,t),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ca(r.textContent,l,t),i=["children",""+l]):eo.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":wa(r),Tm(r,s,!0);break;case"textarea":wa(r),xm(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=gl)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=xv(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Gt]=e,t[co]=r,K_(t,e,!1,!1),e.stateNode=t;e:{switch(o=eh(n,r),n){case"dialog":pe("cancel",t),pe("close",t),i=r;break;case"iframe":case"object":case"embed":pe("load",t),i=r;break;case"video":case"audio":for(i=0;i<Ds.length;i++)pe(Ds[i],t);i=r;break;case"source":pe("error",t),i=r;break;case"img":case"image":case"link":pe("error",t),pe("load",t),i=r;break;case"details":pe("toggle",t),i=r;break;case"input":Em(t,r),i=Kc(t,r),pe("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=Ee({},r,{value:void 0}),pe("invalid",t);break;case"textarea":Im(t,r),i=Xc(t,r),pe("invalid",t);break;default:i=r}Zc(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var u=l[s];s==="style"?kv(t,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Sv(t,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&to(t,u):typeof u=="number"&&to(t,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(eo.hasOwnProperty(s)?u!=null&&s==="onScroll"&&pe("scroll",t):u!=null&&vd(t,s,u,o))}switch(n){case"input":wa(t),Tm(t,r,!1);break;case"textarea":wa(t),xm(t);break;case"option":r.value!=null&&t.setAttribute("value",""+ur(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?Ii(t,!!r.multiple,s,!1):r.defaultValue!=null&&Ii(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=gl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ye(e),null;case 6:if(t&&e.stateNode!=null)Y_(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(F(166));if(n=br(fo.current),br(Yt.current),Ra(e)){if(r=e.stateNode,n=e.memoizedProps,r[Gt]=e,(s=r.nodeValue!==n)&&(t=Tt,t!==null))switch(t.tag){case 3:Ca(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Ca(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gt]=e,e.stateNode=r}return Ye(e),null;case 13:if(ge(_e),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ye&&wt!==null&&e.mode&1&&!(e.flags&128))p_(),Li(),e.flags|=98560,s=!1;else if(s=Ra(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(F(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(F(317));s[Gt]=e}else Li(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ye(e),s=!1}else Mt!==null&&(Oh(Mt),Mt=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||_e.current&1?Oe===0&&(Oe=3):ef())),e.updateQueue!==null&&(e.flags|=4),Ye(e),null);case 4:return Mi(),Ah(t,e),t===null&&lo(e.stateNode.containerInfo),Ye(e),null;case 10:return jd(e.type._context),Ye(e),null;case 17:return gt(e.type)&&yl(),Ye(e),null;case 19:if(ge(_e),s=e.memoizedState,s===null)return Ye(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)As(s,!1);else{if(Oe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=xl(t),o!==null){for(e.flags|=128,As(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return de(_e,_e.current&1|2),e.child}t=t.sibling}s.tail!==null&&Ce()>Ui&&(e.flags|=128,r=!0,As(s,!1),e.lanes=4194304)}else{if(!r)if(t=xl(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),As(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ye)return Ye(e),null}else 2*Ce()-s.renderingStartTime>Ui&&n!==1073741824&&(e.flags|=128,r=!0,As(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ce(),e.sibling=null,n=_e.current,de(_e,r?n&1|2:n&1),e):(Ye(e),null);case 22:case 23:return Zd(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?_t&1073741824&&(Ye(e),e.subtreeFlags&6&&(e.flags|=8192)):Ye(e),null;case 24:return null;case 25:return null}throw Error(F(156,e.tag))}function Nx(t,e){switch(Dd(e),e.tag){case 1:return gt(e.type)&&yl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Mi(),ge(mt),ge(nt),Bd(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return zd(e),null;case 13:if(ge(_e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(F(340));Li()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ge(_e),null;case 4:return Mi(),null;case 10:return jd(e.type._context),null;case 22:case 23:return Zd(),null;case 24:return null;default:return null}}var ba=!1,Ze=!1,bx=typeof WeakSet=="function"?WeakSet:Set,q=null;function Ei(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(t,e,r)}else n.current=null}function kh(t,e,n){try{n()}catch(r){Se(t,e,r)}}var fg=!1;function Dx(t,e){if(ch=fl,t=t_(),Nd(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,u=-1,h=0,p=0,m=t,g=null;t:for(;;){for(var A;m!==n||i!==0&&m.nodeType!==3||(l=o+i),m!==s||r!==0&&m.nodeType!==3||(u=o+r),m.nodeType===3&&(o+=m.nodeValue.length),(A=m.firstChild)!==null;)g=m,m=A;for(;;){if(m===t)break t;if(g===n&&++h===i&&(l=o),g===s&&++p===r&&(u=o),(A=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=A}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(hh={focusedElem:t,selectionRange:n},fl=!1,q=e;q!==null;)if(e=q,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,q=t;else for(;q!==null;){e=q;try{var C=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var N=C.memoizedProps,R=C.memoizedState,w=e.stateNode,_=w.getSnapshotBeforeUpdate(e.elementType===e.type?N:Lt(e.type,N),R);w.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(D){Se(e,e.return,D)}if(t=e.sibling,t!==null){t.return=e.return,q=t;break}q=e.return}return C=fg,fg=!1,C}function Ws(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&kh(e,n,s)}i=i.next}while(i!==r)}}function su(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Ch(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function X_(t){var e=t.alternate;e!==null&&(t.alternate=null,X_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Gt],delete e[co],delete e[ph],delete e[mx],delete e[gx])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function J_(t){return t.tag===5||t.tag===3||t.tag===4}function pg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||J_(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.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Rh(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=gl));else if(r!==4&&(t=t.child,t!==null))for(Rh(t,e,n),t=t.sibling;t!==null;)Rh(t,e,n),t=t.sibling}function Ph(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Ph(t,e,n),t=t.sibling;t!==null;)Ph(t,e,n),t=t.sibling}var Fe=null,jt=!1;function Mn(t,e,n){for(n=n.child;n!==null;)Z_(t,e,n),n=n.sibling}function Z_(t,e,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Xl,n)}catch{}switch(n.tag){case 5:Ze||Ei(n,e);case 6:var r=Fe,i=jt;Fe=null,Mn(t,e,n),Fe=r,jt=i,Fe!==null&&(jt?(t=Fe,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(jt?(t=Fe,n=n.stateNode,t.nodeType===8?_c(t.parentNode,n):t.nodeType===1&&_c(t,n),so(t)):_c(Fe,n.stateNode));break;case 4:r=Fe,i=jt,Fe=n.stateNode.containerInfo,jt=!0,Mn(t,e,n),Fe=r,jt=i;break;case 0:case 11:case 14:case 15:if(!Ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&kh(n,e,o),i=i.next}while(i!==r)}Mn(t,e,n);break;case 1:if(!Ze&&(Ei(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Se(n,e,l)}Mn(t,e,n);break;case 21:Mn(t,e,n);break;case 22:n.mode&1?(Ze=(r=Ze)||n.memoizedState!==null,Mn(t,e,n),Ze=r):Mn(t,e,n);break;default:Mn(t,e,n)}}function mg(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new bx),e.forEach(function(r){var i=Bx.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ot(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:Fe=l.stateNode,jt=!1;break e;case 3:Fe=l.stateNode.containerInfo,jt=!0;break e;case 4:Fe=l.stateNode.containerInfo,jt=!0;break e}l=l.return}if(Fe===null)throw Error(F(160));Z_(s,o,i),Fe=null,jt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(h){Se(i,e,h)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)e0(e,t),e=e.sibling}function e0(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ot(e,t),Wt(t),r&4){try{Ws(3,t,t.return),su(3,t)}catch(N){Se(t,t.return,N)}try{Ws(5,t,t.return)}catch(N){Se(t,t.return,N)}}break;case 1:Ot(e,t),Wt(t),r&512&&n!==null&&Ei(n,n.return);break;case 5:if(Ot(e,t),Wt(t),r&512&&n!==null&&Ei(n,n.return),t.flags&32){var i=t.stateNode;try{to(i,"")}catch(N){Se(t,t.return,N)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,l=t.type,u=t.updateQueue;if(t.updateQueue=null,u!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Tv(i,s),eh(l,o);var h=eh(l,s);for(o=0;o<u.length;o+=2){var p=u[o],m=u[o+1];p==="style"?kv(i,m):p==="dangerouslySetInnerHTML"?Sv(i,m):p==="children"?to(i,m):vd(i,p,m,h)}switch(l){case"input":Qc(i,s);break;case"textarea":Iv(i,s);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var A=s.value;A!=null?Ii(i,!!s.multiple,A,!1):g!==!!s.multiple&&(s.defaultValue!=null?Ii(i,!!s.multiple,s.defaultValue,!0):Ii(i,!!s.multiple,s.multiple?[]:"",!1))}i[co]=s}catch(N){Se(t,t.return,N)}}break;case 6:if(Ot(e,t),Wt(t),r&4){if(t.stateNode===null)throw Error(F(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(N){Se(t,t.return,N)}}break;case 3:if(Ot(e,t),Wt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{so(e.containerInfo)}catch(N){Se(t,t.return,N)}break;case 4:Ot(e,t),Wt(t);break;case 13:Ot(e,t),Wt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Xd=Ce())),r&4&&mg(t);break;case 22:if(p=n!==null&&n.memoizedState!==null,t.mode&1?(Ze=(h=Ze)||p,Ot(e,t),Ze=h):Ot(e,t),Wt(t),r&8192){if(h=t.memoizedState!==null,(t.stateNode.isHidden=h)&&!p&&t.mode&1)for(q=t,p=t.child;p!==null;){for(m=q=p;q!==null;){switch(g=q,A=g.child,g.tag){case 0:case 11:case 14:case 15:Ws(4,g,g.return);break;case 1:Ei(g,g.return);var C=g.stateNode;if(typeof C.componentWillUnmount=="function"){r=g,n=g.return;try{e=r,C.props=e.memoizedProps,C.state=e.memoizedState,C.componentWillUnmount()}catch(N){Se(r,n,N)}}break;case 5:Ei(g,g.return);break;case 22:if(g.memoizedState!==null){yg(m);continue}}A!==null?(A.return=g,q=A):yg(m)}p=p.sibling}e:for(p=null,m=t;;){if(m.tag===5){if(p===null){p=m;try{i=m.stateNode,h?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=m.stateNode,u=m.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=Av("display",o))}catch(N){Se(t,t.return,N)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=h?"":m.memoizedProps}catch(N){Se(t,t.return,N)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===t)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ot(e,t),Wt(t),r&4&&mg(t);break;case 21:break;default:Ot(e,t),Wt(t)}}function Wt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(J_(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(to(i,""),r.flags&=-33);var s=pg(t);Ph(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=pg(t);Rh(t,l,o);break;default:throw Error(F(161))}}catch(u){Se(t,t.return,u)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Ox(t,e,n){q=t,t0(t)}function t0(t,e,n){for(var r=(t.mode&1)!==0;q!==null;){var i=q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||ba;if(!o){var l=i.alternate,u=l!==null&&l.memoizedState!==null||Ze;l=ba;var h=Ze;if(ba=o,(Ze=u)&&!h)for(q=i;q!==null;)o=q,u=o.child,o.tag===22&&o.memoizedState!==null?vg(i):u!==null?(u.return=o,q=u):vg(i);for(;s!==null;)q=s,t0(s),s=s.sibling;q=i,ba=l,Ze=h}gg(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,q=s):gg(t)}}function gg(t){for(;q!==null;){var e=q;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ze||su(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ze)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Lt(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&eg(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}eg(e,o,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var u=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var h=e.alternate;if(h!==null){var p=h.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&so(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}Ze||e.flags&512&&Ch(e)}catch(g){Se(e,e.return,g)}}if(e===t){q=null;break}if(n=e.sibling,n!==null){n.return=e.return,q=n;break}q=e.return}}function yg(t){for(;q!==null;){var e=q;if(e===t){q=null;break}var n=e.sibling;if(n!==null){n.return=e.return,q=n;break}q=e.return}}function vg(t){for(;q!==null;){var e=q;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{su(4,e)}catch(u){Se(e,n,u)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(u){Se(e,i,u)}}var s=e.return;try{Ch(e)}catch(u){Se(e,s,u)}break;case 5:var o=e.return;try{Ch(e)}catch(u){Se(e,o,u)}}}catch(u){Se(e,e.return,u)}if(e===t){q=null;break}var l=e.sibling;if(l!==null){l.return=e.return,q=l;break}q=e.return}}var Vx=Math.ceil,kl=bn.ReactCurrentDispatcher,Qd=bn.ReactCurrentOwner,Pt=bn.ReactCurrentBatchConfig,re=0,je=null,Ne=null,Be=0,_t=0,Ti=gr(0),Oe=0,yo=null,$r=0,ou=0,Yd=0,Hs=null,dt=null,Xd=0,Ui=1/0,fn=null,Cl=!1,Nh=null,nr=null,Da=!1,Kn=null,Rl=0,Gs=0,bh=null,Qa=-1,Ya=0;function at(){return re&6?Ce():Qa!==-1?Qa:Qa=Ce()}function rr(t){return t.mode&1?re&2&&Be!==0?Be&-Be:vx.transition!==null?(Ya===0&&(Ya=Fv()),Ya):(t=ae,t!==0||(t=window.event,t=t===void 0?16:Hv(t.type)),t):1}function zt(t,e,n,r){if(50<Gs)throw Gs=0,bh=null,Error(F(185));Do(t,n,r),(!(re&2)||t!==je)&&(t===je&&(!(re&2)&&(ou|=n),Oe===4&&$n(t,Be)),yt(t,r),n===1&&re===0&&!(e.mode&1)&&(Ui=Ce()+500,nu&&yr()))}function yt(t,e){var n=t.callbackNode;vI(t,e);var r=dl(t,t===je?Be:0);if(r===0)n!==null&&km(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&km(n),e===1)t.tag===0?yx(_g.bind(null,t)):h_(_g.bind(null,t)),fx(function(){!(re&6)&&yr()}),n=null;else{switch(Uv(r)){case 1:n=Id;break;case 4:n=jv;break;case 16:n=hl;break;case 536870912:n=Mv;break;default:n=hl}n=u0(n,n0.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function n0(t,e){if(Qa=-1,Ya=0,re&6)throw Error(F(327));var n=t.callbackNode;if(Ci()&&t.callbackNode!==n)return null;var r=dl(t,t===je?Be:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Pl(t,r);else{e=r;var i=re;re|=2;var s=i0();(je!==t||Be!==e)&&(fn=null,Ui=Ce()+500,Vr(t,e));do try{Mx();break}catch(l){r0(t,l)}while(!0);Ld(),kl.current=s,re=i,Ne!==null?e=0:(je=null,Be=0,e=Oe)}if(e!==0){if(e===2&&(i=sh(t),i!==0&&(r=i,e=Dh(t,i))),e===1)throw n=yo,Vr(t,0),$n(t,r),yt(t,Ce()),n;if(e===6)$n(t,r);else{if(i=t.current.alternate,!(r&30)&&!Lx(i)&&(e=Pl(t,r),e===2&&(s=sh(t),s!==0&&(r=s,e=Dh(t,s))),e===1))throw n=yo,Vr(t,0),$n(t,r),yt(t,Ce()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(F(345));case 2:Cr(t,dt,fn);break;case 3:if($n(t,r),(r&130023424)===r&&(e=Xd+500-Ce(),10<e)){if(dl(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){at(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=fh(Cr.bind(null,t,dt,fn),e);break}Cr(t,dt,fn);break;case 4:if($n(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Ut(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vx(r/1960))-r,10<r){t.timeoutHandle=fh(Cr.bind(null,t,dt,fn),r);break}Cr(t,dt,fn);break;case 5:Cr(t,dt,fn);break;default:throw Error(F(329))}}}return yt(t,Ce()),t.callbackNode===n?n0.bind(null,t):null}function Dh(t,e){var n=Hs;return t.current.memoizedState.isDehydrated&&(Vr(t,e).flags|=256),t=Pl(t,e),t!==2&&(e=dt,dt=n,e!==null&&Oh(e)),t}function Oh(t){dt===null?dt=t:dt.push.apply(dt,t)}function Lx(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!$t(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function $n(t,e){for(e&=~Yd,e&=~ou,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Ut(e),r=1<<n;t[n]=-1,e&=~r}}function _g(t){if(re&6)throw Error(F(327));Ci();var e=dl(t,0);if(!(e&1))return yt(t,Ce()),null;var n=Pl(t,e);if(t.tag!==0&&n===2){var r=sh(t);r!==0&&(e=r,n=Dh(t,r))}if(n===1)throw n=yo,Vr(t,0),$n(t,e),yt(t,Ce()),n;if(n===6)throw Error(F(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Cr(t,dt,fn),yt(t,Ce()),null}function Jd(t,e){var n=re;re|=1;try{return t(e)}finally{re=n,re===0&&(Ui=Ce()+500,nu&&yr())}}function qr(t){Kn!==null&&Kn.tag===0&&!(re&6)&&Ci();var e=re;re|=1;var n=Pt.transition,r=ae;try{if(Pt.transition=null,ae=1,t)return t()}finally{ae=r,Pt.transition=n,re=e,!(re&6)&&yr()}}function Zd(){_t=Ti.current,ge(Ti)}function Vr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,dx(n)),Ne!==null)for(n=Ne.return;n!==null;){var r=n;switch(Dd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&yl();break;case 3:Mi(),ge(mt),ge(nt),Bd();break;case 5:zd(r);break;case 4:Mi();break;case 13:ge(_e);break;case 19:ge(_e);break;case 10:jd(r.type._context);break;case 22:case 23:Zd()}n=n.return}if(je=t,Ne=t=ir(t.current,null),Be=_t=e,Oe=0,yo=null,Yd=ou=$r=0,dt=Hs=null,Nr!==null){for(e=0;e<Nr.length;e++)if(n=Nr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Nr=null}return t}function r0(t,e){do{var n=Ne;try{if(Ld(),Ha.current=Al,Sl){for(var r=we.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Sl=!1}if(Br=0,Le=De=we=null,qs=!1,po=0,Qd.current=null,n===null||n.return===null){Oe=1,yo=e,Ne=null;break}e:{var s=t,o=n.return,l=n,u=e;if(e=Be,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var h=u,p=l,m=p.tag;if(!(p.mode&1)&&(m===0||m===11||m===15)){var g=p.alternate;g?(p.updateQueue=g.updateQueue,p.memoizedState=g.memoizedState,p.lanes=g.lanes):(p.updateQueue=null,p.memoizedState=null)}var A=og(o);if(A!==null){A.flags&=-257,ag(A,o,l,s,e),A.mode&1&&sg(s,h,e),e=A,u=h;var C=e.updateQueue;if(C===null){var N=new Set;N.add(u),e.updateQueue=N}else C.add(u);break e}else{if(!(e&1)){sg(s,h,e),ef();break e}u=Error(F(426))}}else if(ye&&l.mode&1){var R=og(o);if(R!==null){!(R.flags&65536)&&(R.flags|=256),ag(R,o,l,s,e),Od(Fi(u,l));break e}}s=u=Fi(u,l),Oe!==4&&(Oe=2),Hs===null?Hs=[s]:Hs.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var w=U_(s,u,e);Zm(s,w);break e;case 1:l=u;var _=s.type,E=s.stateNode;if(!(s.flags&128)&&(typeof _.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(nr===null||!nr.has(E)))){s.flags|=65536,e&=-e,s.lanes|=e;var D=z_(s,l,e);Zm(s,D);break e}}s=s.return}while(s!==null)}o0(n)}catch(j){e=j,Ne===n&&n!==null&&(Ne=n=n.return);continue}break}while(!0)}function i0(){var t=kl.current;return kl.current=Al,t===null?Al:t}function ef(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),je===null||!($r&268435455)&&!(ou&268435455)||$n(je,Be)}function Pl(t,e){var n=re;re|=2;var r=i0();(je!==t||Be!==e)&&(fn=null,Vr(t,e));do try{jx();break}catch(i){r0(t,i)}while(!0);if(Ld(),re=n,kl.current=r,Ne!==null)throw Error(F(261));return je=null,Be=0,Oe}function jx(){for(;Ne!==null;)s0(Ne)}function Mx(){for(;Ne!==null&&!uI();)s0(Ne)}function s0(t){var e=l0(t.alternate,t,_t);t.memoizedProps=t.pendingProps,e===null?o0(t):Ne=e,Qd.current=null}function o0(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=Nx(n,e),n!==null){n.flags&=32767,Ne=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Oe=6,Ne=null;return}}else if(n=Px(n,e,_t),n!==null){Ne=n;return}if(e=e.sibling,e!==null){Ne=e;return}Ne=e=t}while(e!==null);Oe===0&&(Oe=5)}function Cr(t,e,n){var r=ae,i=Pt.transition;try{Pt.transition=null,ae=1,Fx(t,e,n,r)}finally{Pt.transition=i,ae=r}return null}function Fx(t,e,n,r){do Ci();while(Kn!==null);if(re&6)throw Error(F(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(F(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(_I(t,s),t===je&&(Ne=je=null,Be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Da||(Da=!0,u0(hl,function(){return Ci(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Pt.transition,Pt.transition=null;var o=ae;ae=1;var l=re;re|=4,Qd.current=null,Dx(t,n),e0(n,t),sx(hh),fl=!!ch,hh=ch=null,t.current=n,Ox(n),cI(),re=l,ae=o,Pt.transition=s}else t.current=n;if(Da&&(Da=!1,Kn=t,Rl=i),s=t.pendingLanes,s===0&&(nr=null),fI(n.stateNode),yt(t,Ce()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Cl)throw Cl=!1,t=Nh,Nh=null,t;return Rl&1&&t.tag!==0&&Ci(),s=t.pendingLanes,s&1?t===bh?Gs++:(Gs=0,bh=t):Gs=0,yr(),null}function Ci(){if(Kn!==null){var t=Uv(Rl),e=Pt.transition,n=ae;try{if(Pt.transition=null,ae=16>t?16:t,Kn===null)var r=!1;else{if(t=Kn,Kn=null,Rl=0,re&6)throw Error(F(331));var i=re;for(re|=4,q=t.current;q!==null;){var s=q,o=s.child;if(q.flags&16){var l=s.deletions;if(l!==null){for(var u=0;u<l.length;u++){var h=l[u];for(q=h;q!==null;){var p=q;switch(p.tag){case 0:case 11:case 15:Ws(8,p,s)}var m=p.child;if(m!==null)m.return=p,q=m;else for(;q!==null;){p=q;var g=p.sibling,A=p.return;if(X_(p),p===h){q=null;break}if(g!==null){g.return=A,q=g;break}q=A}}}var C=s.alternate;if(C!==null){var N=C.child;if(N!==null){C.child=null;do{var R=N.sibling;N.sibling=null,N=R}while(N!==null)}}q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,q=o;else e:for(;q!==null;){if(s=q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ws(9,s,s.return)}var w=s.sibling;if(w!==null){w.return=s.return,q=w;break e}q=s.return}}var _=t.current;for(q=_;q!==null;){o=q;var E=o.child;if(o.subtreeFlags&2064&&E!==null)E.return=o,q=E;else e:for(o=_;q!==null;){if(l=q,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:su(9,l)}}catch(j){Se(l,l.return,j)}if(l===o){q=null;break e}var D=l.sibling;if(D!==null){D.return=l.return,q=D;break e}q=l.return}}if(re=i,yr(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Xl,t)}catch{}r=!0}return r}finally{ae=n,Pt.transition=e}}return!1}function wg(t,e,n){e=Fi(n,e),e=U_(t,e,1),t=tr(t,e,1),e=at(),t!==null&&(Do(t,1,e),yt(t,e))}function Se(t,e,n){if(t.tag===3)wg(t,t,n);else for(;e!==null;){if(e.tag===3){wg(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(nr===null||!nr.has(r))){t=Fi(n,t),t=z_(e,t,1),e=tr(e,t,1),t=at(),e!==null&&(Do(e,1,t),yt(e,t));break}}e=e.return}}function Ux(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=at(),t.pingedLanes|=t.suspendedLanes&n,je===t&&(Be&n)===n&&(Oe===4||Oe===3&&(Be&130023424)===Be&&500>Ce()-Xd?Vr(t,0):Yd|=n),yt(t,e)}function a0(t,e){e===0&&(t.mode&1?(e=Ia,Ia<<=1,!(Ia&130023424)&&(Ia=4194304)):e=1);var n=at();t=An(t,e),t!==null&&(Do(t,e,n),yt(t,n))}function zx(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),a0(t,n)}function Bx(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(e),a0(t,n)}var l0;l0=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||mt.current)pt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return pt=!1,Rx(t,e,n);pt=!!(t.flags&131072)}else pt=!1,ye&&e.flags&1048576&&d_(e,wl,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ka(t,e),t=e.pendingProps;var i=Vi(e,nt.current);ki(e,n),i=qd(null,e,r,t,i,n);var s=Wd();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,gt(r)?(s=!0,vl(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Fd(e),i.updater=iu,e.stateNode=i,i._reactInternals=e,wh(e,r,t,n),e=Ih(null,e,r,!0,s,n)):(e.tag=0,ye&&s&&bd(e),ot(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ka(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=qx(r),t=Lt(r,t),i){case 0:e=Th(null,e,r,t,n);break e;case 1:e=cg(null,e,r,t,n);break e;case 11:e=lg(null,e,r,t,n);break e;case 14:e=ug(null,e,r,Lt(r.type,t),n);break e}throw Error(F(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),Th(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),cg(t,e,r,i,n);case 3:e:{if(W_(e),t===null)throw Error(F(387));r=e.pendingProps,s=e.memoizedState,i=s.element,v_(t,e),Il(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Fi(Error(F(423)),e),e=hg(t,e,r,n,i);break e}else if(r!==i){i=Fi(Error(F(424)),e),e=hg(t,e,r,n,i);break e}else for(wt=er(e.stateNode.containerInfo.firstChild),Tt=e,ye=!0,Mt=null,n=g_(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Li(),r===i){e=kn(t,e,n);break e}ot(t,e,r,n)}e=e.child}return e;case 5:return __(e),t===null&&yh(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,dh(r,i)?o=null:s!==null&&dh(r,s)&&(e.flags|=32),q_(t,e),ot(t,e,o,n),e.child;case 6:return t===null&&yh(e),null;case 13:return H_(t,e,n);case 4:return Ud(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=ji(e,null,r,n):ot(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),lg(t,e,r,i,n);case 7:return ot(t,e,e.pendingProps,n),e.child;case 8:return ot(t,e,e.pendingProps.children,n),e.child;case 12:return ot(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,de(El,r._currentValue),r._currentValue=o,s!==null)if($t(s.value,o)){if(s.children===i.children&&!mt.current){e=kn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=Tn(-1,n&-n),u.tag=2;var h=s.updateQueue;if(h!==null){h=h.shared;var p=h.pending;p===null?u.next=u:(u.next=p.next,p.next=u),h.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),vh(s.return,n,e),l.lanes|=n;break}u=u.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(F(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),vh(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ot(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ki(e,n),i=Nt(i),r=r(i),e.flags|=1,ot(t,e,r,n),e.child;case 14:return r=e.type,i=Lt(r,e.pendingProps),i=Lt(r.type,i),ug(t,e,r,i,n);case 15:return B_(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),Ka(t,e),e.tag=1,gt(r)?(t=!0,vl(e)):t=!1,ki(e,n),F_(e,r,i),wh(e,r,i,n),Ih(null,e,r,!0,t,n);case 19:return G_(t,e,n);case 22:return $_(t,e,n)}throw Error(F(156,e.tag))};function u0(t,e){return Lv(t,e)}function $x(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rt(t,e,n,r){return new $x(t,e,n,r)}function tf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function qx(t){if(typeof t=="function")return tf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===wd)return 11;if(t===Ed)return 14}return 2}function ir(t,e){var n=t.alternate;return n===null?(n=Rt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 4,897 bytes, line 41
41ons=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Xa(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")tf(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case di:return Lr(n.children,i,s,e);case _d:o=8,i|=8;break;case qc:return t=Rt(12,n,e,i|2),t.elementType=qc,t.lanes=s,t;case Wc:return t=Rt(13,n,e,i),t.elementType=Wc,t.lanes=s,t;case Hc:return t=Rt(19,n,e,i),t.elementType=Hc,t.lanes=s,t;case _v:return au(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yv:o=10;break e;case vv:o=9;break e;case wd:o=11;break e;case Ed:o=14;break e;case Un:o=16,r=null;break e}throw Error(F(130,t==null?t:typeof t,""))}return e=Rt(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Lr(t,e,n,r){return t=Rt(7,t,r,e),t.lanes=n,t}function au(t,e,n,r){return t=Rt(22,t,r,e),t.elementType=_v,t.lanes=n,t.stateNode={isHidden:!1},t}function kc(t,e,n){return t=Rt(6,t,null,e),t.lanes=n,t}function Cc(t,e,n){return e=Rt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Wx(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lc(0),this.expirationTimes=lc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nf(t,e,n,r,i,s,o,l,u){return t=new Wx(t,e,n,l,u),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Rt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fd(s),t}function Hx(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hi,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function c0(t){if(!t)return cr;t=t._reactInternals;e:{if(Jr(t)!==t||t.tag!==1)throw Error(F(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(gt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(F(171))}if(t.tag===1){var n=t.type;if(gt(n))return c_(t,n,e)}return e}function h0(t,e,n,r,i,s,o,l,u){return t=nf(n,r,!0,t,i,s,o,l,u),t.context=c0(null),n=t.current,r=at(),i=rr(n),s=Tn(r,i),s.callback=e??null,tr(n,s,i),t.current.lanes=i,Do(t,i,r),yt(t,r),t}function lu(t,e,n,r){var i=e.current,s=at(),o=rr(i);return n=c0(n),e.context===null?e.context=n:e.pendingContext=n,e=Tn(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=tr(i,e,o),t!==null&&(zt(t,i,o,s),Wa(t,i,o)),o}function Nl(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Eg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function rf(t,e){Eg(t,e),(t=t.alternate)&&Eg(t,e)}function Gx(){return null}var d0=typeof reportError=="function"?reportError:function(t){console.error(t)};function sf(t){this._internalRoot=t}uu.prototype.render=sf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(F(409));lu(t,e,null,null)};uu.prototype.unmount=sf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;qr(function(){lu(null,t,null,null)}),e[Sn]=null}};function uu(t){this._internalRoot=t}uu.prototype.unstable_scheduleHydration=function(t){if(t){var e=$v();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Bn.length&&e!==0&&e<Bn[n].priority;n++);Bn.splice(n,0,t),n===0&&Wv(t)}};function of(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function cu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Tg(){}function Kx(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var h=Nl(o);s.call(h)}}var o=h0(e,r,t,0,null,!1,!1,"",Tg);return t._reactRootContainer=o,t[Sn]=o.current,lo(t.nodeType===8?t.parentNode:t),qr(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var h=Nl(u);l.call(h)}}var u=nf(t,0,!1,null,null,!1,!1,"",Tg);return t._reactRootContainer=u,t[Sn]=u.current,lo(t.nodeType===8?t.parentNode:t),qr(function(){lu(e,u,n,r)}),u}function hu(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;
41i=function(){var u=Nl(o);l.call(u)}}lu(e,o,t,i)}else o=Kx(n,e,t,i,r);return Nl(o)}zv=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=bs(e.pendingLanes);n!==0&&(xd(e,n|1),yt(e,Ce()),!(re&6)&&(Ui=Ce()+500,yr()))}break;case 13:qr(function(){var r=An(t,1);if(r!==null){var i=at();zt(r,t,1,i)}}),rf(t,1)}};Sd=function(t){if(t.tag===13){var e=An(t,134217728);if(e!==null){var n=at();zt(e,t,134217728,n)}rf(t,134217728)}};Bv=function(t){if(t.tag===13){var e=rr(t),n=An(t,e);if(n!==null){var r=at();zt(n,t,e,r)}rf(t,e)}};$v=function(){return ae};qv=function(t,e){var n=ae;try{return ae=t,e()}finally{ae=n}};nh=function(t,e,n){switch(e){case"input":if(Qc(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=tu(r);if(!i)throw Error(F(90));Ev(r),Qc(r,i)}}}break;case"textarea":Iv(t,n);break;case"select":e=n.value,e!=null&&Ii(t,!!n.multiple,e,!1)}};Pv=Jd;Nv=qr;var Qx={usingClientEntryPoint:!1,Events:[Vo,gi,tu,Cv,Rv,Jd]},ks={findFiberByHostInstance:Pr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Yx={bundleType:ks.bundleType,version:ks.version,rendererPackageName:ks.rendererPackageName,rendererConfig:ks.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:bn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Ov(t),t===null?null:t.stateNode},findFiberByHostInstance:ks.findFiberByHostInstance||Gx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oa.isDisabled&&Oa.supportsFiber)try{Xl=Oa.inject(Yx),Qt=Oa}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qx;xt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!of(e))throw Error(F(200));return Hx(t,e,null,n)};xt.createRoot=function(t,e){if(!of(t))throw Error(F(299));var n=!1,r="",i=d0;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=nf(t,1,!1,null,null,n,!1,r,i),t[Sn]=e.current,lo(t.nodeType===8?t.parentNode:t),new sf(e)};xt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(F(188)):(t=Object.keys(t).join(","),Error(F(268,t)));return t=Ov(e),t=t===null?null:t.stateNode,t};xt.flushSync=function(t){return qr(t)};xt.hydrate=function(t,e,n){if(!cu(e))throw Error(F(200));return hu(null,t,e,!0,n)};xt.hydrateRoot=function(t,e,n){if(!of(t))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=d0;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=h0(e,null,t,1,n??null,i,!1,s,o),t[Sn]=e.current,lo(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new uu(e)};xt.render=function(t,e,n){if(!cu(e))throw Error(F(200));return hu(null,t,e,!1,n)};xt.unmountComponentAtNode=function(t){if(!cu(t))throw Error(F(40));return t._reactRootContainer?(qr(function(){hu(null,null,t,!1,function(){t._reactRootContainer=null,t[Sn]=null})}),!0):!1};xt.unstable_batchedUpdates=Jd;xt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!cu(n))throw Error(F(200));if(t==null||t._reactInternals===void 0)throw Error(F(38));return hu(t,e,n,!1,r)};xt.version="18.3.1-next-f1338f8080-20240426";function f0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f0)}catch(t){console.error(t)}}f0(),fv.exports=xt;var Xx=fv.exports,p0,Ig=Xx;p0=Ig.createRoot,Ig.hydrateRoot;/** 42 * @remix-run/router v1.23.0 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function vo(){return vo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vo.apply(this,arguments)}var Qn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Qn||(Qn={}));const xg="popstate";function Jx(t){t===void 0&&(t={});function e(r,i){let{pathname:s,search:o,hash:l}=r.location;return Vh("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:bl(i)}return e1(e,n,null,t)}function Re(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function m0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Zx(){return Math.random().toString(36).substr(2,8)}function Sg(t,e){return{usr:t.state,key:t.key,idx:e}}function Vh(t,e,n,r){return n===void 0&&(n=null),vo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ji(e):e,{state:n,key:e&&e.key||r||Zx()})}function bl(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ji(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function e1(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Qn.Pop,u=null,h=p();h==null&&(h=0,o.replaceState(vo({},o.state,{idx:h}),""));function p(){return(o.state||{idx:null}).idx}function m(){l=Qn.Pop;let R=p(),w=R==null?null:R-h;h=R,u&&u({action:l,location:N.location,delta:w})}function g(R,w){l=Qn.Push;let _=Vh(N.location,R,w);h=p()+1;let E=Sg(_,h),D=N.createHref(_);try{o.pushState(E,"",D)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(D)}s&&u&&u({action:l,location:N.location,delta:1})}function A(R,w){l=Qn.Replace;let _=Vh(N.location,R,w);h=p();let E=Sg(_,h),D=N.createHref(_);o.replaceState(E,"",D),s&&u&&u({action:l,location:N.location,delta:0})}function C(R){let w=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof R=="str
50ing"?R:bl(R);return _=_.replace(/ $/,"%20"),Re(w,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,w)}let N={get action(){return l},get location(){return t(i,o)},listen(R){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(xg,m),u=R,()=>{i.removeEventListener(xg,m),u=null}},createHref(R){return e(i,R)},createURL:C,encodeLocation(R){let w=C(R);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:A,go(R){return o.go(R)}};return N}var Ag;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Ag||(Ag={}));function t1(t,e,n){return n===void 0&&(n="/"),n1(t,e,n)}function n1(t,e,n,r){let i=typeof e=="string"?Ji(e):e,s=af(i.pathname||"/",n);if(s==null)return null;let o=g0(t);r1(o);let l=null;for(let u=0;l==null&&u<o.length;++u){let h=m1(s);l=d1(o[u],h)}return l}function g0(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,l)=>{let u={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};u.relativePath.startsWith("/")&&(Re(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let h=sr([r,u.relativePath]),p=n.concat(u);s.children&&s.children.length>0&&(Re(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),g0(s.children,e,p,h)),!(s.path==null&&!s.index)&&e.push({path:h,score:c1(h,s.index),routesMeta:p})};return t.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let u of y0(s.path))i(s,o,u)}),e}function y0(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=y0(r.join("/")),l=[];return l.push(...o.map(u=>u===""?s:[s,u].join("/"))),i&&l.push(...o),l.map(u=>t.startsWith("/")&&u===""?"/":u)}function r1(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:h1(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const i1=/^:[\w-]+$/,s1=3,o1=2,a1=1,l1=10,u1=-2,kg=t=>t==="*";function c1(t,e){let n=t.split("/"),r=n.length;return n.some(kg)&&(r+=u1),e&&(r+=o1),n.filter(i=>!kg(i)).reduce((i,s)=>i+(i1.test(s)?s1:s===""?a1:l1),r)}function h1(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function d1(t,e,n){let{routesMeta:r}=t,i={},s="/",o=[];for(let l=0;l<r.length;++l){let u=r[l],h=l===r.length-1,p=s==="/"?e:e.slice(s.length)||"/",m=f1({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},p),g=u.route;if(!m)return null;
vendor: 9,433 bytes, lines 50-59
50Object.assign(i,m.params),o.push({params:i,pathname:sr([s,m.pathname]),pathnameBase:_1(sr([s,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(s=sr([s,m.pathnameBase]))}return o}function f1(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=p1(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((h,p,m)=>{let{paramName:g,isOptional:A}=p;if(g==="*"){let N=l[m]||"";o=s.slice(0,s.length-N.length).replace(/(.)\/+$/,"$1")}const C=l[m];return A&&!C?h[g]=void 0:h[g]=(C||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:o,pattern:t}}function p1(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),m0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function m1(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return m0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function af(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function g1(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Ji(t):t;return{pathname:n?n.startsWith("/")?n:y1(n,e):e,search:w1(r),hash:E1(i)}}function y1(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Rc(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function v1(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function lf(t,e){let n=v1(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function uf(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Ji(t):(i=vo({},t),Re(!i.pathname||!i.pathname.includes("?"),Rc("?","pathname","search",i)),Re(!i.pathname||!i.pathname.includes("#"),Rc("#","pathname","hash",i)),Re(!i.search||!i.search.includes("#"),Rc("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let m=e.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}l=m>=0?e[m]:"/"}let u=g1(i,l),h=o&&o!=="/"&&o.endsWith("/"),p=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(h||p)&&(u.pathname+="/"),u}const sr=t=>t.join("/").replace(/\/\/+/g,"/"),_1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),w1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,E1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function T1(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const v0=["post","put","patch","delete"];new Set(v0);const I1=["get",...v0];new Set(I1);/** 51 * React Router v6.30.1 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function _o(){return _o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_o.apply(this,arguments)}const cf=V.createContext(null),x1=V.createContext(null),vr=V.createContext(null),du=V.createContext(null),_r=V.createContext({outlet:null,matches:[],isDataRoute:!1}),_0=V.createContext(null);function S1(t,e){let{relative:n}=e===void 0?{}:e;Zi()||Re(!1);let{basename:r,navigator:i}=V.useContext(vr),{hash:s,pathname:o,search:l}=E0(t,{relative:n}),u=o;return r!=="/"&&(u=o==="/"?r:sr([r,o])),i.createHref({pathname:u,search:l,hash:s})}function Zi(){return V.useContext(du)!=null}function Zr(){return Zi()||Re(!1),V.useContext(du).location}function w0(t){V.useContext(vr).static||V.useLayoutEffect(t)}function hf(){let{isDataRoute:t}=V.useContext(_r);return t?M1():A1()}function A1(){Zi()||Re(!1);let t=V.useContext(cf),{basename:e,future:n,navigator:r}=V.useContext(vr),{matches:i}=V.useContext(_r),{pathname:s}=Zr(),o=JSON.stringify(lf(i,n.v7_relativeSplatPath)),l=V.useRef(!1);return w0(()=>{l.current=!0}),V.useCallback(function(h,p){if(p===void 0&&(p={}),!l.current)return;if(typeof h=="number"){r.go(h);return}let m=uf(h,JSON.parse(o),s,p.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:sr([e,m.pathname])),(p.replace?r.replace:r.push)(m,p.state,p)},[e,r,o,s,t])}function E0(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=V.useContext(vr),{matches:i}=V.useContext(_r),{pathname:s}=Zr(),o=JSON.stringify(lf(i,r.v7_relativeSplatPath));return V.useMemo(()=>uf(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function k1(t,e){return C1(t,e)}function C1(t,e,n,r){Zi()||Re(!1);let{navigator:i}=V.useContext(vr),{matches:s}=V.useContext(_r),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let h=Zr(),p;if(e){var m;let R=typeof e=="string"?Ji(e):e;u==="/"||(m=R.pathname)!=null&&m.startsWith(u)||Re(!1),p=R}else p=h;let g=p.pathname||"/",A=g;if(u!=="/"){let R=u.replace(/^\//,"").split("/");A="/"+g.replace(/^\//,"").split("/").slice(R.length).join("/")}let C=t1(t,{pathname:A}),N=D1(C&&C.map(R=>Object.assign({},R,{params:Object.assign({},l,R.params),pathname:sr([u,i.encodeLocation?i.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?u:sr([u,i.encodeLocation?i.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),s,n,r);return e&&N?V.createElement(du.Provider,{value:{location:_o({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Qn.Pop}},N):N}function R1(){let t=j1(),e=T1(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},e),n?V.createElement("pre",{style:i},n):null,null)}const P1=V.createElement(R1,null);class N1 extends V.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?V.createElement(_r.Provider,{value:this.props.routeContext},V.createElement(_0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function b1(t){let{routeContext:e,match:n,children:r}=t,i=V.useContext(cf);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),V.createElement(_r.Provider,{value:e},r)}function D1(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,l=(i=n)==null?void 0:i.errors;if(l!=null){let p=o.findIndex(m=>m.route.id&&(l==null?void 0:l[m.route.id])!==void 0);p>=0||Re(!1),o=o.slice(0,Math.min(o.length,p+1))}let u=!1,h=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p<o.length;p++){let m=o[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(h=p),m.route.id){let{loaderData:g,errors:A}=n,C=m.route.loader&&g[m.route.id]===void 0&&(!A||A[m.route.id]===void 0);if(m.route.lazy||C){u=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((p,m,g)=>{let A,C=!1,N=null,R=null;n&&(A=l&&m.route.id?l[m.route.id]:void 0,N=m.route.errorElement||P1,u&&(h<0&&g===0?(F1("route-fallback"),C=!0,R=null):h===g&&(C=!0,R=m.route.hydrateFallbackElement||null)));let w=e.concat(o.slice(0,g+1)),_=()=>{let E;return A?E=N:C?E=R:m.route.Component?E=V.createElement(m.route.Component,null):m.route.element?E=m.route.element:E=p,V.createElement(b1,{match:m,routeContext:{outlet:p,matches:w,isDataRoute:n!=null},children:E})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?V.createElement(N1,{location:n.location,revalidation:n.revalidation,component:N,error:A,children:_(),routeC
59ontext:{outlet:null,matches:w,isDataRoute:!0}}):_()},null)}var T0=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(T0||{}),I0=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(I0||{});function O1(t){let e=V.useContext(cf);return e||Re(!1),e}function V1(t){let e=V.useContext(x1);return e||Re(!1),e}function L1(t){let e=V.useContext(_r);return e||Re(!1),e}function x0(t){let e=L1(),n=e.matches[e.matches.length-1];return n.route.id||Re(!1),n.route.id}function j1(){var t;let e=V.useContext(_0),n=V1(),r=x0();return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function M1(){let{router:t}=O1(T0.UseNavigateStable),e=x0(I0.UseNavigateStable),n=V.useRef(!1);return w0(()=>{n.current=!0}),V.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,_o({fromRouteId:e},s)))},[t,e])}const Cg={};function F1(t,e,n){Cg[t]||(Cg[t]=!0)}function U1(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Ks(t){let{to:e,replace:n,state:r,relative:i}=t;Zi()||Re(!1);let{future:s,static:o}=V.useContext(vr),{matches:l}=V.useContext(_r),{pathname:u}=Zr(),h=hf(),p=uf(e,lf(l,s.v7_relativeSplatPath),u,i==="path"),m=JSON.stringify(p);return V.useEffect(()=>h(JSON.parse(m),{replace:n,state:r,relative:i}),[h,m,i,n,r]),null}function Vt(t){Re(!1)}function z1(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Qn.Pop,navigator:s,static:o=!1,future:l}=t;Zi()&&Re(!1);let u=e.replace(/^\/*/,"/"),h=V.useMemo(()=>({basename:u,navigator:s,static:o,future:_o({v7_relativeSplatPath:!1},l)}),[u,l,s,o]);typeof r=="string"&&(r=Ji(r));let{pathname:p="/",search:m="",hash:g="",state:A=null,key:C="default"}=r,N=V.useMemo(()=>{let R=af(p,u);return R==null?null:{location:{pathname:R,search:m,hash:g,state:A,key:C},navigationType:i}},[u,p,m,g,A,C,i]);return N==null?null:V.createElement(vr.Provider,{value:h},V.createElement(du.Provider,{children:n,value:N}))}function B1(t){let{children:e,location:n}=t;return k1(Lh(e),n)}new Promise(()=>{});function Lh(t,e){e===void 0&&(e=[]);let n=[];return V.Children.forEach(t,(r,i)=>{if(!V.isValidElement(r))return;let s=[...e,i];if(r.type===V.Fragment){n.push.apply(n,Lh(r.props.children,s));return}r.type!==Vt&&Re(!1),!r.props.index||!r.props.children||Re(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Lh(r.props.children,s)),n.push(o)}),n}/** 60 * React Router DOM v6.30.1 61 * 62 * Copyright (c) Remix Software Inc. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE.md file in the root directory of this source tree. 66 * 67 * @license MIT 68 */function jh(){return jh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jh.apply(this,arguments)}function $1(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function q1(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function W1(t,e){return t.button===0&&(!e||e==="_self")&&!q1(t)}const H1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],G1="6";try{window.__reactRouterVersion=G1}catch{}const K1="startTransition",Rg=UT[K1];function Q1(t){let{basename:e,children:n,future:r,window:i}=t,s=V.useRef();s.current==null&&(s.current=Jx({window:i,v5Compat:!0}));let o=s.current,[l,u]=V.useState({action:o.action,location:o.location}),{v7_startTransition:h}=r||{},p=V.useCallback(m=>{h&&Rg?Rg(()=>u(m)):u(m)},[u,h]);return V.useLayoutEffect(()=>o.listen(p),[o,p]),V.useEffect(()=>U1(r),[r]),V.createElement(z1,{basename:e,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Y1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",X1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ja=V.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:u,to:h,preventScrollReset:p,viewTransition:m}=e,g=$1(e,H1),{basename:A}=V.useContext(vr),C,N=!1;if(typeof h=="string"&&X1.test(h)&&(C=h,Y1))try{let E=new URL(window.location.href),D=h.startsWith("//")?new URL(E.protocol+h):new URL(h),j=af(D.pathname,A);D.origin===E.origin&&j!=null?h=j+D.search+D.hash:N=!0}catch{}let R=S1(h,{relative:i}),w=J1(h,{replace:o,state:l,target:u,preventScrollReset:p,relative:i,viewTransition:m});function _(E){r&&r(E),E.defaultPrevented||w(E)}return V.createElement("a",jh({},g,{href:C||R,onClick:N||s?r:_,ref:n,target:u}))});var Pg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Pg||(Pg={}));var Ng;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ng||(Ng={}));function J1(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:l}=e===void 0?{}:e,u=hf(),h=Zr(),p=E0(t,{relative:o});return V.useCallback(m=>{if(W1(m,n)){m.preventDefault();let g=r!==void 0?r:bl(h)===bl(p);u(t,{replace:g,state:i,preventScrollReset:s,relative:o,viewTransition:l})}},[h,u,p,r,i,n,t,s,o,l])}const Z1="modulepreload",eS=function(t){return"/"+t},bg={},Dn=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=eS(u),u in bg)return;bg[u]=!0;const h=u.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${p}`))return;
68const m=document.createElement("link");if(m.rel=h?"stylesheet":Z1,h||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),h)return new Promise((g,A)=>{m.addEventListener("load",g),m.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};var Dg={};/** 69 * @license 70 * Copyright 2017 Google LLC 71 * 72 * Licensed under the Apache License, Version 2.0 (the "License"); 73 * you may not use this file except in compliance with the License. 74 * You may obtain a copy of the License at 75 * 76 * http://www.apache.org/licenses/LICENSE-2.0 77 * 78 * Unless required by applicable law or agreed to in writing, software 79 * distributed under the License is distributed on an "AS IS" BASIS, 80 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 81 * See the License for the specific language governing permissions and 82 * limitations under the License. 83 */const S0=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},tS=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],u=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(u&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},A0={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,u=i+2<t.length,h=u?t[i+2]:0,p=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|h>>6,A=h&63;u||(A=64,o||(g=64)),r.push(n[p],n[m],n[g],n[A])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(S0(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):tS(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const h=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||h==null||m==null)throw new nS;const g=s<<2|l>>4;if(r.push(g),h!==64){const A=l<<4&240|h>>2;if(r.push(A),m!==64){const C=h<<6&192|m;r.push(C)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class nS extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const rS=function(t){const e=S0(t);return A0.encodeByteArray(e,!0)},Dl=function(t){return rS(t).replace(/\./g,"")},k0=function(t){try{return A0.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 84 * @license 85 * Copyright 2022 Google LLC 86 * 87 * Licensed under the Apache License, Version 2.0 (the "License");
88 * you may not use this file except in compliance with the License. 89 * You may obtain a copy of the License at 90 * 91 * http://www.apache.org/licenses/LICENSE-2.0 92 * 93 * Unless required by applicable law or agreed to in writing, software 94 * distributed under the License is distributed on an "AS IS" BASIS, 95 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 96 * See the License for the specific language governing permissions and 97 * limitations under the License. 98 */function iS(){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.")}/** 99 * @license 100 * Copyright 2022 Google LLC 101 * 102 * Licensed under the Apache License, Version 2.0 (the "License"); 103 * you may not use this file except in compliance with the License. 104 * You may obtain a copy of the License at 105 * 106 * http://www.apache.org/licenses/LICENSE-2.0 107 * 108 * Unless required by applicable law or agreed to in writing, software 109 * distributed under the License is distributed on an "AS IS" BASIS, 110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 111 * See the License for the specific language governing permissions and 112 * limitations under the License. 113 */const sS=()=>iS().__FIREBASE_DEFAULTS__,oS=()=>{if(typeof process>"u"||typeof Dg>"u")return;const t=Dg.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},aS=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&k0(t[1]);return e&&JSON.parse(e)},fu=()=>{try{return sS()||oS()||aS()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},C0=t=>{var e,n;return(n=(e=fu())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},R0=t=>{const e=C0(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},P0=()=>{var t;return(t=fu())===null||t===void 0?void 0:t.config},N0=t=>{var e;return(e=fu())===null||e===void 0?void 0:e[`_${t}`]};/** 114 * @license 115 * Copyright 2017 Google LLC 116 * 117 * Licensed under the Apache License, Version 2.0 (the "License"); 118 * you may not use this file except in compliance with the License. 119 * You may obtain a copy of the License at 120 * 121 * http://www.apache.org/licenses/LICENSE-2.0 122 * 123 * Unless required by applicable law or agreed to in writing, software 124 * distributed under the License is distributed on an "AS IS" BASIS, 125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 126 * See the License for the specific language governing permissions and 127 * limitations under the License. 128 */class lS{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** 129 * @license 130 * Copyright 2021 Google LLC 131 * 132 * Licensed under the Apache License, Version 2.0 (the "License"); 133 * you may not use this file except in compliance with the License. 134 * You may obtain a copy of the License at 135 * 136 * http://www.apache.org/licenses/LICENSE-2.0 137 * 138 * Unless required by applicable law or agreed to in writing, software 139 * distributed under the License is distributed on an "AS IS" BASIS, 140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 141 * See the License for the specific language governing permissions and 142 * limitations under the License. 143 */function uS(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[Dl(JSON.stringify(n)),Dl(JSON.stringify(o)),""].join(".")}/** 144 * @license 145 * Copyright 2017 Google LLC 146 * 147 * Licensed under the Apache License, Version 2.0 (the "License");
148 * you may not use this file except in compliance with the License. 149 * You may obtain a copy of the License at 150 * 151 * http://www.apache.org/licenses/LICENSE-2.0 152 * 153 * Unless required by applicable law or agreed to in writing, software 154 * distributed under the License is distributed on an "AS IS" BASIS, 155 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 156 * See the License for the specific language governing permissions and 157 * limitations under the License. 158 */function rt(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function cS(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(rt())}function hS(){var t;const e=(t=fu())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function dS(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function fS(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function pS(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function mS(){const t=rt();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function gS(){return!hS()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function yS(){try{return typeof indexedDB=="object"}catch{return!1}}function vS(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** 159 * @license 160 * Copyright 2017 Google LLC 161 * 162 * Licensed under the Apache License, Version 2.0 (the "License"); 163 * you may not use this file except in compliance with the License. 164 * You may obtain a copy of the License at 165 * 166 * http://www.apache.org/licenses/LICENSE-2.0 167 * 168 * Unless required by applicable law or agreed to in writing, software 169 * distributed under the License is distributed on an "AS IS" BASIS, 170 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 171 * See the License for the specific language governing permissions and 172 * limitations under the License. 173 */const _S="FirebaseError";
173class sn extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=_S,Object.setPrototypeOf(this,sn.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,jo.prototype.create)}}class jo{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?wS(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new sn(i,l,r)}}function wS(t,e){return t.replace(ES,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const ES=/\{\$([^}]+)}/g;function TS(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Ol(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(Og(s)&&Og(o)){if(!Ol(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function Og(t){return t!==null&&typeof t=="object"}/** 174 * @license 175 * Copyright 2017 Google LLC 176 * 177 * Licensed under the Apache License, Version 2.0 (the "License"); 178 * you may not use this file except in compliance with the License. 179 * You may obtain a copy of the License at 180 * 181 * http://www.apache.org/licenses/LICENSE-2.0 182 * 183 * Unless required by applicable law or agreed to in writing, software 184 * distributed under the License is distributed on an "AS IS" BASIS, 185 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 186 * See the License for the specific language governing permissions and 187 * limitations under the License. 188 */function Mo(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function IS(t,e){const n=new xS(t,e);return n.subscribe.bind(n)}class xS{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");SS(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Pc),i.error===void 0&&(i.error=Pc),i.complete===void 0&&(i.complete=Pc);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function SS(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function Pc(){}/** 189 * @license 190 * Copyright 2021 Google LLC 191 * 192 * Licensed under the Apache License, Version 2.0 (the "License"); 193 * you may not use this file except in compliance with the License. 194 * You may obtain a copy of the License at 195 * 196 * http://www.apache.org/licenses/LICENSE-2.0 197 * 198 * Unless required by applicable law or agreed to in writing, software 199 * distributed under the License is distributed on an "AS IS" BASIS, 200 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 * See the License for the specific language governing permissions and 202 * limitations under the License. 203 */function Te(t){return t&&t._delegate?t._delegate:t}class hr{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** 204 * @license 205 * Copyright 2019 Google LLC 206 * 207 * Licensed under the Apache License, Version 2.0 (the "License");
208 * you may not use this file except in compliance with the License. 209 * You may obtain a copy of the License at 210 * 211 * http://www.apache.org/licenses/LICENSE-2.0 212 * 213 * Unless required by applicable law or agreed to in writing, software 214 * distributed under the License is distributed on an "AS IS" BASIS, 215 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 216 * See the License for the specific language governing permissions and 217 * limitations under the License. 218 */const Rr="[DEFAULT]";/** 219 * @license 220 * Copyright 2019 Google LLC 221 * 222 * Licensed under the Apache License, Version 2.0 (the "License"); 223 * you may not use this file except in compliance with the License. 224 * You may obtain a copy of the License at 225 * 226 * http://www.apache.org/licenses/LICENSE-2.0 227 * 228 * Unless required by applicable law or agreed to in writing, software 229 * distributed under the License is distributed on an "AS IS" BASIS, 230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 231 * See the License for the specific language governing permissions and 232 * limitations under the License. 233 */class AS{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new lS;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(CS(e))try{this.getOrInitializeService({instanceIdentifier:Rr})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Rr){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Rr){return this.instances.has(e)}getOptions(e=Rr){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:kS(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Rr){return this.component?this.component.multipleInstances?e:Rr:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function kS(t){return t===Rr?void 0:t}function CS(t){return t.instantiationMode==="EAGER"}/** 234 * @license 235 * Copyright 2019 Google LLC 236 * 237 * Licensed under the Apache License, Version 2.0 (the "License");
238 * you may not use this file except in compliance with the License. 239 * You may obtain a copy of the License at 240 * 241 * http://www.apache.org/licenses/LICENSE-2.0 242 * 243 * Unless required by applicable law or agreed to in writing, software 244 * distributed under the License is distributed on an "AS IS" BASIS, 245 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 246 * See the License for the specific language governing permissions and 247 * limitations under the License. 248 */class RS{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new AS(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** 249 * @license 250 * Copyright 2017 Google LLC 251 * 252 * Licensed under the Apache License, Version 2.0 (the "License"); 253 * you may not use this file except in compliance with the License. 254 * You may obtain a copy of the License at 255 * 256 * http://www.apache.org/licenses/LICENSE-2.0 257 * 258 * Unless required by applicable law or agreed to in writing, software 259 * distributed under the License is distributed on an "AS IS" BASIS, 260 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 261 * See the License for the specific language governing permissions and 262 * limitations under the License. 263 */var te;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(te||(te={}));const PS={debug:te.DEBUG,verbose:te.VERBOSE,info:te.INFO,warn:te.WARN,error:te.ERROR,silent:te.SILENT},NS=te.INFO,bS={[te.DEBUG]:"log",[te.VERBOSE]:"log",[te.INFO]:"info",[te.WARN]:"warn",[te.ERROR]:"error"},DS=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=bS[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class df{constructor(e){this.name=e,this._logLevel=NS,this._logHandler=DS,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in te))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?PS[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,te.DEBUG,...e),this._logHandler(this,te.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,te.VERBOSE,...e),this._logHandler(this,te.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,te.INFO,...e),this._logHandler(this,te.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,te.WARN,...e),this._logHandler(this,te.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,te.ERROR,...e),this._logHandler(this,te.ERROR,...e)}}const OS=(t,e)=>e.some(n=>t instanceof n);let Vg,Lg;function VS(){return Vg||(Vg=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function LS(){return Lg||(Lg=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const b0=new WeakMap,Mh=new WeakMap,D0=new WeakMap,Nc=new WeakMap,ff=new WeakMap;function jS(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(or(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&b0.set(n,t)}).catch(()=>{}),ff.set(e,t),e}function MS(t){if(Mh.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Mh.set(t,e)}let Fh={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Mh.get(t);if(e==="objectStoreNames")return t.objectStoreNames||D0.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return or(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function FS(t){Fh=t(Fh)}function US(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(bc(this),e,...n);return D0.set(r,e.sort?e.sort():[e]),or(r)}:LS().includes(t)?function(...e){return t.apply(bc(this),e),or(b0.get(this))}:function(...e){return or(t.apply(bc(this),e))}}function zS(t){return typeof t=="function"?US(t):(t instanceof IDBTransaction&&MS(t),OS(t,VS())?new Proxy(t,Fh):t)}function or(t){if(t instanceof IDBRequest)return jS(t);if(Nc.has(t))return Nc.get(t);const e=zS(t);return e!==t&&(Nc.set(t,e),ff.set(e,t)),e}const bc=t=>ff.get(t);function BS(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),l=or(o);return r&&o.addEventListener("upgradeneeded",u=>{r(or(o.result),u.oldVersion,u.newVersion,or(o.transaction),u)}),n&&o.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),l.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",h=>i(h.oldVersion,h.newVersion,h))}).catch(()=>{}),l}const $S=["get","getKey","getAll","getAllKeys","count"],qS=["put","add","delete","clear"],Dc=new Map;function jg(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Dc.get(e))return Dc.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=qS.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||$S.includes(n)))return;const s=async function(o,...l){const u=this.transaction(o,i?"readwrite":"readonly");let h=u.store;
263return r&&(h=h.index(l.shift())),(await Promise.all([h[n](...l),i&&u.done]))[0]};return Dc.set(e,s),s}FS(t=>({...t,get:(e,n,r)=>jg(e,n)||t.get(e,n,r),has:(e,n)=>!!jg(e,n)||t.has(e,n)}));/** 264 * @license 265 * Copyright 2019 Google LLC 266 * 267 * Licensed under the Apache License, Version 2.0 (the "License"); 268 * you may not use this file except in compliance with the License. 269 * You may obtain a copy of the License at 270 * 271 * http://www.apache.org/licenses/LICENSE-2.0 272 * 273 * Unless required by applicable law or agreed to in writing, software 274 * distributed under the License is distributed on an "AS IS" BASIS, 275 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 276 * See the License for the specific language governing permissions and 277 * limitations under the License. 278 */class WS{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(HS(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function HS(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Uh="@firebase/app",Mg="0.10.13";/** 279 * @license 280 * Copyright 2019 Google LLC 281 * 282 * Licensed under the Apache License, Version 2.0 (the "License"); 283 * you may not use this file except in compliance with the License. 284 * You may obtain a copy of the License at 285 * 286 * http://www.apache.org/licenses/LICENSE-2.0 287 * 288 * Unless required by applicable law or agreed to in writing, software 289 * distributed under the License is distributed on an "AS IS" BASIS, 290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 291 * See the License for the specific language governing permissions and 292 * limitations under the License. 293 */const Cn=new df("@firebase/app"),GS="@firebase/app-compat",KS="@firebase/analytics-compat",QS="@firebase/analytics",YS="@firebase/app-check-compat",XS="@firebase/app-check",JS="@firebase/auth",ZS="@firebase/auth-compat",eA="@firebase/database",tA="@firebase/data-connect",nA="@firebase/database-compat",rA="@firebase/functions",iA="@firebase/functions-compat",sA="@firebase/installations",oA="@firebase/installations-compat",aA="@firebase/messaging",lA="@firebase/messaging-compat",uA="@firebase/performance",cA="@firebase/performance-compat",hA="@firebase/remote-config",dA="@firebase/remote-config-compat",fA="@firebase/storage",pA="@firebase/storage-compat",mA="@firebase/firestore",gA="@firebase/vertexai-preview",yA="@firebase/firestore-compat",vA="firebase",_A="10.14.1";/** 294 * @license 295 * Copyright 2019 Google LLC 296 * 297 * Licensed under the Apache License, Version 2.0 (the "License"); 298 * you may not use this file except in compliance with the License. 299 * You may obtain a copy of the License at 300 * 301 * http://www.apache.org/licenses/LICENSE-2.0 302 * 303 * Unless required by applicable law or agreed to in writing, software 304 * distributed under the License is distributed on an "AS IS" BASIS, 305 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 306 * See the License for the specific language governing permissions and 307 * limitations under the License. 308 */const zh="[DEFAULT]",wA={[Uh]:"fire-core",[GS]:"fire-core-compat",[QS]:"fire-analytics",[KS]:"fire-analytics-compat",[XS]:"fire-app-check",[YS]:"fire-app-check-compat",[JS]:"fire-auth",[ZS]:"fire-auth-compat",[eA]:"fire-rtdb",[tA]:"fire-data-connect",[nA]:"fire-rtdb-compat",[rA]:"fire-fn",[iA]:"fire-fn-compat",[sA]:"fire-iid",[oA]:"fire-iid-compat",[aA]:"fire-fcm",[lA]:"fire-fcm-compat",[uA]:"fire-perf",[cA]:"fire-perf-compat",[hA]:"fire-rc",[dA]:"fire-rc-compat",[fA]:"fire-g
308cs",[pA]:"fire-gcs-compat",[mA]:"fire-fst",[yA]:"fire-fst-compat",[gA]:"fire-vertex","fire-js":"fire-js",[vA]:"fire-js-all"};/** 309 * @license 310 * Copyright 2019 Google LLC 311 * 312 * Licensed under the Apache License, Version 2.0 (the "License"); 313 * you may not use this file except in compliance with the License. 314 * You may obtain a copy of the License at 315 * 316 * http://www.apache.org/licenses/LICENSE-2.0 317 * 318 * Unless required by applicable law or agreed to in writing, software 319 * distributed under the License is distributed on an "AS IS" BASIS, 320 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 321 * See the License for the specific language governing permissions and 322 * limitations under the License. 323 */const Vl=new Map,EA=new Map,Bh=new Map;function Fg(t,e){try{t.container.addComponent(e)}catch(n){Cn.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Wr(t){const e=t.name;if(Bh.has(e))return Cn.debug(`There were multiple attempts to register component ${e}.`),!1;Bh.set(e,t);for(const n of Vl.values())Fg(n,t);for(const n of EA.values())Fg(n,t);return!0}function pu(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function vn(t){return t.settings!==void 0}/** 324 * @license 325 * Copyright 2019 Google LLC 326 * 327 * Licensed under the Apache License, Version 2.0 (the "License"); 328 * you may not use this file except in compliance with the License. 329 * You may obtain a copy of the License at 330 * 331 * http://www.apache.org/licenses/LICENSE-2.0 332 * 333 * Unless required by applicable law or agreed to in writing, software 334 * distributed under the License is distributed on an "AS IS" BASIS, 335 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 336 * See the License for the specific language governing permissions and 337 * limitations under the License. 338 */const TA={"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
338d-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."},ar=new jo("app","Firebase",TA);/** 339 * @license 340 * Copyright 2019 Google LLC 341 * 342 * Licensed under the Apache License, Version 2.0 (the "License"); 343 * you may not use this file except in compliance with the License. 344 * You may obtain a copy of the License at 345 * 346 * http://www.apache.org/licenses/LICENSE-2.0 347 * 348 * Unless required by applicable law or agreed to in writing, software 349 * distributed under the License is distributed on an "AS IS" BASIS, 350 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 351 * See the License for the specific language governing permissions and 352 * limitations under the License. 353 */class IA{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new hr("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 ar.create("app-deleted",{appName:this._name})}}/** 354 * @license 355 * Copyright 2019 Google LLC 356 * 357 * Licensed under the Apache License, Version 2.0 (the "License"); 358 * you may not use this file except in compliance with the License. 359 * You may obtain a copy of the License at 360 * 361 * http://www.apache.org/licenses/LICENSE-2.0 362 * 363 * Unless required by applicable law or agreed to in writing, software 364 * distributed under the License is distributed on an "AS IS" BASIS, 365 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 366 * See the License for the specific language governing permissions and 367 * limitations under the License. 368 */const es=_A;function O0(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:zh,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw ar.create("bad-app-name",{appName:String(i)});if(n||(n=P0()),!n)throw ar.create("no-options");const s=Vl.get(i);if(s){if(Ol(n,s.options)&&Ol(r,s.config))return s;throw ar.create("duplicate-app",{appName:i})}const o=new RS(i);for(const u of Bh.values())o.addComponent(u);const l=new IA(n,r,o);return Vl.set(i,l),l}function pf(t=zh){const e=Vl.get(t);if(!e&&t===zh&&P0())return O0();if(!e)throw ar.create("no-app",{appName:t});return e}function Xt(t,e,n){var r;let i=(r=wA[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Cn.warn(l.join(" "));return}Wr(new hr(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** 369 * @license 370 * Copyright 2021 Google LLC 371 * 372 * Licensed under the Apache License, Version 2.0 (the "License"); 373 * you may not use this file except in compliance with the License. 374 * You may obtain a copy of the License at 375 * 376 * http://www.apache.org/licenses/LICENSE-2.0 377 * 378 * Unless required by applicable law or agreed to in writing, softw
378are 379 * distributed under the License is distributed on an "AS IS" BASIS, 380 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 381 * See the License for the specific language governing permissions and 382 * limitations under the License. 383 */const xA="firebase-heartbeat-database",SA=1,wo="firebase-heartbeat-store";let Oc=null;function V0(){return Oc||(Oc=BS(xA,SA,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(wo)}catch(n){console.warn(n)}}}}).catch(t=>{throw ar.create("idb-open",{originalErrorMessage:t.message})})),Oc}async function AA(t){try{const n=(await V0()).transaction(wo),r=await n.objectStore(wo).get(L0(t));return await n.done,r}catch(e){if(e instanceof sn)Cn.warn(e.message);else{const n=ar.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Cn.warn(n.message)}}}async function Ug(t,e){try{const r=(await V0()).transaction(wo,"readwrite");await r.objectStore(wo).put(e,L0(t)),await r.done}catch(n){if(n instanceof sn)Cn.warn(n.message);else{const r=ar.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Cn.warn(r.message)}}}function L0(t){return`${t.name}!${t.options.appId}`}/** 384 * @license 385 * Copyright 2021 Google LLC 386 * 387 * Licensed under the Apache License, Version 2.0 (the "License"); 388 * you may not use this file except in compliance with the License. 389 * You may obtain a copy of the License at 390 * 391 * http://www.apache.org/licenses/LICENSE-2.0 392 * 393 * Unless required by applicable law or agreed to in writing, software 394 * distributed under the License is distributed on an "AS IS" BASIS, 395 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 396 * See the License for the specific language governing permissions and 397 * limitations under the License. 398 */const kA=1024,CA=30*24*60*60*1e3;class RA{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new NA(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=zg();return((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)?void 0:(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const l=new Date(o.date).valueOf();return Date.now()-l<=CA}),this._storage.overwrite(this._heartbeatsCache))}catch(r){Cn.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=zg(),{heartbeatsToSend:r,unsentEntries:i}=PA(this._heartbeatsCache.heartbeats),s=Dl(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return Cn.warn(n),""}}}function zg(){return new Date().toISOString().substring(0,10)}function PA(t,e=kA){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),Bg(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Bg(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class NA{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return yS()?vS().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await AA(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();
398return Ug(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return Ug(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function Bg(t){return Dl(JSON.stringify({version:2,heartbeats:t})).length}/** 399 * @license 400 * Copyright 2019 Google LLC 401 * 402 * Licensed under the Apache License, Version 2.0 (the "License"); 403 * you may not use this file except in compliance with the License. 404 * You may obtain a copy of the License at 405 * 406 * http://www.apache.org/licenses/LICENSE-2.0 407 * 408 * Unless required by applicable law or agreed to in writing, software 409 * distributed under the License is distributed on an "AS IS" BASIS, 410 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 411 * See the License for the specific language governing permissions and 412 * limitations under the License. 413 */function bA(t){Wr(new hr("platform-logger",e=>new WS(e),"PRIVATE")),Wr(new hr("heartbeat",e=>new RA(e),"PRIVATE")),Xt(Uh,Mg,t),Xt(Uh,Mg,"esm2017"),Xt("fire-js","")}bA("");function mf(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function j0(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const DA=j0,M0=new jo("auth","Firebase",j0());/** 414 * @license 415 * Copyright 2020 Google LLC 416 * 417 * Licensed under the Apache License, Version 2.0 (the "License"); 418 * you may not use this file except in compliance with the License. 419 * You may obtain a copy of the License at 420 * 421 * http://www.apache.org/licenses/LICENSE-2.0 422 * 423 * Unless required by applicable law or agreed to in writing, software 424 * distributed under the License is distributed on an "AS IS" BASIS, 425 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 426 * See the License for the specific language governing permissions and 427 * limitations under the License. 428 */const Ll=new df("@firebase/auth");function OA(t,...e){Ll.logLevel<=te.WARN&&Ll.warn(`Auth (${es}): ${t}`,...e)}function Za(t,...e){Ll.logLevel<=te.ERROR&&Ll.error(`Auth (${es}): ${t}`,...e)}/** 429 * @license 430 * Copyright 2020 Google LLC 431 * 432 * Licensed under the Apache License, Version 2.0 (the "License"); 433 * you may not use this file except in compliance with the License. 434 * You may obtain a copy of the License at 435 * 436 * http://www.apache.org/licenses/LICENSE-2.0 437 * 438 * Unless required by applicable law or agreed to in writing, software 439 * distributed under the License is distributed on an "AS IS" BASIS, 440 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 441 * See the License for the specific language governing permissions and 442 * limitations under the License. 443 */function tn(t,...e){throw yf(t,...e)}function Bt(t,...e){return yf(t,...e)}function gf(t,e,n){const r=Object.assign(Object.assign({},DA()),{[e]:n});return new jo("auth","Firebase",r).create(e,{appName:t.name})}function jr(t){return gf(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function VA(t,e,n){const r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&tn(t,"argument-error"),gf(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function yf(t,...e){if(typeof t!="string"){const n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return M0.create(t,...e)}function G(t,e,...n){if(!t)throw yf(e,...n)}function _n(t){const e="INTERNAL ASSERTION FAILED: "+t;throw Za(e),new Error(e)}function Rn(t,e){t||_n(e)}/** 444 * @license 445 * Copyright 2020 Google LLC 446 * 447 * Licensed under the Apache License, Version 2.0 (the "License");
448 * you may not use this file except in compliance with the License. 449 * You may obtain a copy of the License at 450 * 451 * http://www.apache.org/licenses/LICENSE-2.0 452 * 453 * Unless required by applicable law or agreed to in writing, software 454 * distributed under the License is distributed on an "AS IS" BASIS, 455 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 456 * See the License for the specific language governing permissions and 457 * limitations under the License. 458 */function $h(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function LA(){return $g()==="http:"||$g()==="https:"}function $g(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/** 459 * @license 460 * Copyright 2020 Google LLC 461 * 462 * Licensed under the Apache License, Version 2.0 (the "License"); 463 * you may not use this file except in compliance with the License. 464 * You may obtain a copy of the License at 465 * 466 * http://www.apache.org/licenses/LICENSE-2.0 467 * 468 * Unless required by applicable law or agreed to in writing, software 469 * distributed under the License is distributed on an "AS IS" BASIS, 470 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 471 * See the License for the specific language governing permissions and 472 * limitations under the License. 473 */function jA(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(LA()||fS()||"connection"in navigator)?navigator.onLine:!0}function MA(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** 474 * @license 475 * Copyright 2020 Google LLC 476 * 477 * Licensed under the Apache License, Version 2.0 (the "License"); 478 * you may not use this file except in compliance with the License. 479 * You may obtain a copy of the License at 480 * 481 * http://www.apache.org/licenses/LICENSE-2.0 482 * 483 * Unless required by applicable law or agreed to in writing, software 484 * distributed under the License is distributed on an "AS IS" BASIS, 485 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 486 * See the License for the specific language governing permissions and 487 * limitations under the License. 488 */class Fo{constructor(e,n){this.shortDelay=e,this.longDelay=n,Rn(n>e,"Short delay should be less than long delay!"),this.isMobile=cS()||pS()}get(){return jA()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 489 * @license 490 * Copyright 2020 Google LLC 491 * 492 * Licensed under the Apache License, Version 2.0 (the "License"); 493 * you may not use this file except in compliance with the License. 494 * You may obtain a copy of the License at 495 * 496 * http://www.apache.org/licenses/LICENSE-2.0 497 * 498 * Unless required by applicable law or agreed to in writing, software 499 * distributed under the License is distributed on an "AS IS" BASIS, 500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 501 * See the License for the specific language governing permissions and 502 * limitations under the License. 503 */function vf(t,e){Rn(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/** 504 * @license 505 * Copyright 2020 Google LLC 506 * 507 * Licensed under the Apache License, Version 2.0 (the "License"); 508 * you may not use this file except in compliance with the License. 509 * You may obtain a copy of the License at 510 * 511 * http://www.apache.org/licenses/LICENSE-2.0 512 * 513 * Unless required by applicable law or agreed to in writing, software 514 * distributed under the License is distributed on an "AS IS" BASIS, 515 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 516 * See the License for the specific language governing permissions and 517 * limitations under the License. 518 */class F0{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;_n("Could not find fetch implementation, make sure you call FetchProvi
518der.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;_n("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;_n("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 519 * @license 520 * Copyright 2020 Google LLC 521 * 522 * Licensed under the Apache License, Version 2.0 (the "License"); 523 * you may not use this file except in compliance with the License. 524 * You may obtain a copy of the License at 525 * 526 * http://www.apache.org/licenses/LICENSE-2.0 527 * 528 * Unless required by applicable law or agreed to in writing, software 529 * distributed under the License is distributed on an "AS IS" BASIS, 530 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 531 * See the License for the specific language governing permissions and 532 * limitations under the License. 533 */const FA={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** 534 * @license 535 * Copyright 2020 Google LLC 536 * 537 * Licensed under the Apache License, Version 2.0 (the "License"); 538 * you may not use this file except in compliance with the License. 539 * You may obtain a copy of the License at 540 * 541 * http://www.apache.org/licenses/LICENSE-2.0 542 * 543 * Unless required by applicable law or agreed to in writing, software 544 * distributed under the License is distributed on an "AS IS" BASIS, 545 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 546 * See the License for the specific language governing permissions and 547 * limitations under the License. 548 */const UA=new Fo(3e4,6e4);function _f(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function ts(t,e,n,r,i={}){return U0(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});const l=Mo(Object.assign({key:t.config.apiKey},o)).slice(1),u=await t._getAdditionalHeaders();u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode);const h=Object.assign({method:e,headers:u},s);return dS()||(h.referrerPolicy="no-referrer"),F0.fetch()(z0(t,t.config.apiHost,n,l),h)})}async function U0(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},FA),e);try{const i=new BA(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=await s.json();if("needConfirmation"in o)throw Va(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const l=s.ok?o.errorMessage:o.error.message,[u,h]=l.split(" : ");if(u==="FEDERATED_USER_ID_ALREADY_LINKED")throw Va(t,"credential-already-in-use",o);if(u==="EMAIL_EXISTS")throw Va(t,"email-already-in-use",o);if(u==="USER_DISABLED")throw Va(t,"user-disabled",o);const p=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(h)throw gf(t,p,h);tn(t,p)}}catch(i){if(i instanceof sn)throw i;tn(t,"network-request-failed",{message:String(i)})}}async function zA(t,e,n,r,i={}){const s=await ts(t,e,n,r,i);return"mfaPendingCredential"in s&&tn(t,"multi-factor-auth-required",{_serverResponse:s}),s}function z0(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?vf(t.config,i):`${t.config.apiScheme}://${i}`}class BA{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Bt(this.auth,"network-request-failed")),UA.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Va(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Bt(t,e,r);return i.customData._tokenResponse=n,i}/** 549 * @license 550 * Copyright 2020 Google LLC 551 * 552 * Licensed under the Apache License, Version 2.0 (the "License");
553 * you may not use this file except in compliance with the License. 554 * You may obtain a copy of the License at 555 * 556 * http://www.apache.org/licenses/LICENSE-2.0 557 * 558 * Unless required by applicable law or agreed to in writing, software 559 * distributed under the License is distributed on an "AS IS" BASIS, 560 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 561 * See the License for the specific language governing permissions and 562 * limitations under the License. 563 */async function $A(t,e){return ts(t,"POST","/v1/accounts:delete",e)}async function B0(t,e){return ts(t,"POST","/v1/accounts:lookup",e)}/** 564 * @license 565 * Copyright 2020 Google LLC 566 * 567 * Licensed under the Apache License, Version 2.0 (the "License"); 568 * you may not use this file except in compliance with the License. 569 * You may obtain a copy of the License at 570 * 571 * http://www.apache.org/licenses/LICENSE-2.0 572 * 573 * Unless required by applicable law or agreed to in writing, software 574 * distributed under the License is distributed on an "AS IS" BASIS, 575 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 576 * See the License for the specific language governing permissions and 577 * limitations under the License. 578 */function Qs(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function qA(t,e=!1){const n=Te(t),r=await n.getIdToken(e),i=wf(r);G(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,o=s==null?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:Qs(Vc(i.auth_time)),issuedAtTime:Qs(Vc(i.iat)),expirationTime:Qs(Vc(i.exp)),signInProvider:o||null,signInSecondFactor:(s==null?void 0:s.sign_in_second_factor)||null}}function Vc(t){return Number(t)*1e3}function wf(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return Za("JWT malformed, contained fewer than 3 sections"),null;try{const i=k0(n);return i?JSON.parse(i):(Za("Failed to decode base64 JWT payload"),null)}catch(i){return Za("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function qg(t){const e=wf(t);return G(e,"internal-error"),G(typeof e.exp<"u","internal-error"),G(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** 579 * @license 580 * Copyright 2020 Google LLC 581 * 582 * Licensed under the Apache License, Version 2.0 (the "License"); 583 * you may not use this file except in compliance with the License. 584 * You may obtain a copy of the License at 585 * 586 * http://www.apache.org/licenses/LICENSE-2.0 587 * 588 * Unless required by applicable law or agreed to in writing, software 589 * distributed under the License is distributed on an "AS IS" BASIS, 590 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 591 * See the License for the specific language governing permissions and 592 * limitations under the License. 593 */async function Eo(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof sn&&WA(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function WA({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** 594 * @license 595 * Copyright 2020 Google LLC 596 * 597 * Licensed under the Apache License, Version 2.0 (the "License"); 598 * you may not use this file except in compliance with the License. 599 * You may obtain a copy of the License at 600 * 601 * http://www.apache.org/licenses/LICENSE-2.0 602 * 603 * Unless required by applicable law or agreed to in writing, software 604 * distributed under the License is distributed on an "AS IS" BASIS, 605 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 606 * See the License for the specific language governing permissions and 607 * limitations under the License. 608 */class HA{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 609 * @license 610 * Copyright 2020 Google LLC 611 * 612 * Licensed under the Apache License, Version 2.0 (the "License");
613 * you may not use this file except in compliance with the License. 614 * You may obtain a copy of the License at 615 * 616 * http://www.apache.org/licenses/LICENSE-2.0 617 * 618 * Unless required by applicable law or agreed to in writing, software 619 * distributed under the License is distributed on an "AS IS" BASIS, 620 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 621 * See the License for the specific language governing permissions and 622 * limitations under the License. 623 */class qh{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Qs(this.lastLoginAt),this.creationTime=Qs(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 624 * @license 625 * Copyright 2019 Google LLC 626 * 627 * Licensed under the Apache License, Version 2.0 (the "License"); 628 * you may not use this file except in compliance with the License. 629 * You may obtain a copy of the License at 630 * 631 * http://www.apache.org/licenses/LICENSE-2.0 632 * 633 * Unless required by applicable law or agreed to in writing, software 634 * distributed under the License is distributed on an "AS IS" BASIS, 635 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 636 * See the License for the specific language governing permissions and 637 * limitations under the License. 638 */async function jl(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Eo(t,B0(n,{idToken:r}));G(i==null?void 0:i.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?$0(s.providerUserInfo):[],l=KA(t.providerData,o),u=t.isAnonymous,h=!(t.email&&s.passwordHash)&&!(l!=null&&l.length),p=u?h:!1,m={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new qh(s.createdAt,s.lastLoginAt),isAnonymous:p};Object.assign(t,m)}async function GA(t){const e=Te(t);await jl(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function KA(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function $0(t){return t.map(e=>{var{providerId:n}=e,r=mf(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** 639 * @license 640 * Copyright 2020 Google LLC 641 * 642 * Licensed under the Apache License, Version 2.0 (the "License"); 643 * you may not use this file except in compliance with the License. 644 * You may obtain a copy of the License at 645 * 646 * http://www.apache.org/licenses/LICENSE-2.0 647 * 648 * Unless required by applicable law or agreed to in writing, software 649 * distributed under the License is distributed on an "AS IS" BASIS, 650 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 651 * See the License for the specific language governing permissions and 652 * limitations under the License. 653 */async function QA(t,e){const n=await U0(t,{},async()=>{const r=Mo({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=z0(t,i,"/v1/token",`key=${s}`),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",F0.fetch()(o,{method:"POST",headers:l,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function YA(t,e){return ts(t,"POST","/v2/accounts:revokeToken",_f(t,e))}/** 654 * @license 655 * Copyright 2020 Google LLC 656 * 657 * Licensed under the Apache License, Version 2.0 (the "License"); 658 * you may not use this file except in compliance with the License. 659 * You may obtain a copy of the License at 660 * 661 * http://www.apache.org/licenses/LICENSE-2.0 662 * 663 * Unless required by applicable law or agreed to in writing, software 664 * distributed under the License is distributed on an "AS IS" BASIS, 665 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 666 * See the License for the specific language governing permissions and 667 * limitations under the License. 668 */class Ri{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){G(e.idToken,"internal-error"),G(typeof e.idToken<"u","internal-error"),G(typeof e.refreshToken<"u","internal-error");
668const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):qg(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){G(e.length!==0,"internal-error");const n=qg(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(G(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:s}=await QA(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new Ri;return r&&(G(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(G(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(G(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Ri,this.toJSON())}_performRefresh(){return _n("not implemented")}}/** 669 * @license 670 * Copyright 2020 Google LLC 671 * 672 * Licensed under the Apache License, Version 2.0 (the "License"); 673 * you may not use this file except in compliance with the License. 674 * You may obtain a copy of the License at 675 * 676 * http://www.apache.org/licenses/LICENSE-2.0 677 * 678 * Unless required by applicable law or agreed to in writing, software 679 * distributed under the License is distributed on an "AS IS" BASIS, 680 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 681 * See the License for the specific language governing permissions and 682 * limitations under the License. 683 */function Fn(t,e){G(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class wn{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=mf(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new HA(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new qh(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await Eo(this,this.stsTokenManager.getToken(this.auth,e));return G(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return qA(this,e)}reload(){return GA(this)}_assign(e){this!==e&&(G(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new wn(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){G(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await jl(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(vn(this.auth.app))return Promise.reject(jr(this.auth));const e=await this.getIdToken();return await Eo(this,$A(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
683nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,l,u,h,p;const m=(r=n.displayName)!==null&&r!==void 0?r:void 0,g=(i=n.email)!==null&&i!==void 0?i:void 0,A=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,C=(o=n.photoURL)!==null&&o!==void 0?o:void 0,N=(l=n.tenantId)!==null&&l!==void 0?l:void 0,R=(u=n._redirectEventId)!==null&&u!==void 0?u:void 0,w=(h=n.createdAt)!==null&&h!==void 0?h:void 0,_=(p=n.lastLoginAt)!==null&&p!==void 0?p:void 0,{uid:E,emailVerified:D,isAnonymous:j,providerData:U,stsTokenManager:T}=n;G(E&&T,e,"internal-error");const v=Ri.fromJSON(this.name,T);G(typeof E=="string",e,"internal-error"),Fn(m,e.name),Fn(g,e.name),G(typeof D=="boolean",e,"internal-error"),G(typeof j=="boolean",e,"internal-error"),Fn(A,e.name),Fn(C,e.name),Fn(N,e.name),Fn(R,e.name),Fn(w,e.name),Fn(_,e.name);const I=new wn({uid:E,auth:e,email:g,emailVerified:D,displayName:m,isAnonymous:j,photoURL:C,phoneNumber:A,tenantId:N,stsTokenManager:v,createdAt:w,lastLoginAt:_});return U&&Array.isArray(U)&&(I.providerData=U.map(x=>Object.assign({},x))),R&&(I._redirectEventId=R),I}static async _fromIdTokenResponse(e,n,r=!1){const i=new Ri;i.updateFromServerResponse(n);const s=new wn({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await jl(s),s}static async _fromGetAccountInfoResponse(e,n,r){const i=n.users[0];G(i.localId!==void 0,"internal-error");const s=i.providerUserInfo!==void 0?$0(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!(s!=null&&s.length),l=new Ri;l.updateFromIdToken(r);const u=new wn({uid:i.localId,auth:e,stsTokenManager:l,isAnonymous:o}),h={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:s,metadata:new qh(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(s!=null&&s.length)};return Object.assign(u,h),u}}/** 684 * @license 685 * Copyright 2020 Google LLC 686 * 687 * Licensed under the Apache License, Version 2.0 (the "License"); 688 * you may not use this file except in compliance with the License. 689 * You may obtain a copy of the License at 690 * 691 * http://www.apache.org/licenses/LICENSE-2.0 692 * 693 * Unless required by applicable law or agreed to in writing, software 694 * distributed under the License is distributed on an "AS IS" BASIS, 695 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 696 * See the License for the specific language governing permissions and 697 * limitations under the License. 698 */const Wg=new Map;function En(t){Rn(t instanceof Function,"Expected a class definition");let e=Wg.get(t);return e?(Rn(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,Wg.set(t,e),e)}/** 699 * @license 700 * Copyright 2019 Google LLC 701 * 702 * Licensed under the Apache License, Version 2.0 (the "License"); 703 * you may not use this file except in compliance with the License. 704 * You may obtain a copy of the License at 705 * 706 * http://www.apache.org/licenses/LICENSE-2.0 707 * 708 * Unless required by applicable law or agreed to in writing, software 709 * distributed under the License is distributed on an "AS IS" BASIS, 710 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 711 * See the License for the specific language governing permissions and 712 * limitations under the License. 713 */class q0{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}q0.type="NONE";const Hg=q0;/** 714 * @license 715 * Copyright 2019 Google LLC 716 * 717 * Licensed under the Apache License, Version 2.0 (the "License");
718 * you may not use this file except in compliance with the License. 719 * You may obtain a copy of the License at 720 * 721 * http://www.apache.org/licenses/LICENSE-2.0 722 * 723 * Unless required by applicable law or agreed to in writing, software 724 * distributed under the License is distributed on an "AS IS" BASIS, 725 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 726 * See the License for the specific language governing permissions and 727 * limitations under the License. 728 */function el(t,e,n){return`firebase:${t}:${e}:${n}`}class Pi{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=el(this.userKey,i.apiKey,s),this.fullPersistenceKey=el("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?wn._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new Pi(En(Hg),e,r);const i=(await Promise.all(n.map(async h=>{if(await h._isAvailable())return h}))).filter(h=>h);let s=i[0]||En(Hg);const o=el(r,e.config.apiKey,e.name);let l=null;for(const h of n)try{const p=await h._get(o);if(p){const m=wn._fromJSON(e,p);h!==s&&(l=m),s=h;break}}catch{}const u=i.filter(h=>h._shouldAllowMigration);return!s._shouldAllowMigration||!u.length?new Pi(s,e,r):(s=u[0],l&&await s._set(o,l.toJSON()),await Promise.all(n.map(async h=>{if(h!==s)try{await h._remove(o)}catch{}})),new Pi(s,e,r))}}/** 729 * @license 730 * Copyright 2020 Google LLC 731 * 732 * Licensed under the Apache License, Version 2.0 (the "License"); 733 * you may not use this file except in compliance with the License. 734 * You may obtain a copy of the License at 735 * 736 * http://www.apache.org/licenses/LICENSE-2.0 737 * 738 * Unless required by applicable law or agreed to in writing, software 739 * distributed under the License is distributed on an "AS IS" BASIS, 740 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 741 * See the License for the specific language governing permissions and 742 * limitations under the License. 743 */function Gg(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(K0(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(W0(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Y0(e))return"Blackberry";if(X0(e))return"Webos";if(H0(e))return"Safari";if((e.includes("chrome/")||G0(e))&&!e.includes("edge/"))return"Chrome";if(Q0(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function W0(t=rt()){return/firefox\//i.test(t)}function H0(t=rt()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function G0(t=rt()){return/crios\//i.test(t)}function K0(t=rt()){return/iemobile/i.test(t)}function Q0(t=rt()){return/android/i.test(t)}function Y0(t=rt()){return/blackberry/i.test(t)}function X0(t=rt()){return/webos/i.test(t)}function Ef(t=rt()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function XA(t=rt()){var e;return Ef(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function JA(){return mS()&&document.documentMode===10}function J0(t=rt()){return Ef(t)||Q0(t)||X0(t)||Y0(t)||/windows phone/i.test(t)||K0(t)}/** 744 * @license 745 * Copyright 2020 Google LLC 746 * 747 * Licensed under the Apache License, Version 2.0 (the "License");
748 * you may not use this file except in compliance with the License. 749 * You may obtain a copy of the License at 750 * 751 * http://www.apache.org/licenses/LICENSE-2.0 752 * 753 * Unless required by applicable law or agreed to in writing, software 754 * distributed under the License is distributed on an "AS IS" BASIS, 755 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 756 * See the License for the specific language governing permissions and 757 * limitations under the License. 758 */function Z0(t,e=[]){let n;switch(t){case"Browser":n=Gg(rt());break;case"Worker":n=`${Gg(rt())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${es}/${r}`}/** 759 * @license 760 * Copyright 2022 Google LLC 761 * 762 * Licensed under the Apache License, Version 2.0 (the "License"); 763 * you may not use this file except in compliance with the License. 764 * You may obtain a copy of the License at 765 * 766 * http://www.apache.org/licenses/LICENSE-2.0 767 * 768 * Unless required by applicable law or agreed to in writing, software 769 * distributed under the License is distributed on an "AS IS" BASIS, 770 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 771 * See the License for the specific language governing permissions and 772 * limitations under the License. 773 */class ZA{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=s=>new Promise((o,l)=>{try{const u=e(s);o(u)}catch(u){l(u)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const n=[];try{for(const r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/** 774 * @license 775 * Copyright 2023 Google LLC 776 * 777 * Licensed under the Apache License, Version 2.0 (the "License"); 778 * you may not use this file except in compliance with the License. 779 * You may obtain a copy of the License at 780 * 781 * http://www.apache.org/licenses/LICENSE-2.0 782 * 783 * Unless required by applicable law or agreed to in writing, software 784 * distributed under the License is distributed on an "AS IS" BASIS, 785 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 786 * See the License for the specific language governing permissions and 787 * limitations under the License. 788 */async function ek(t,e={}){return ts(t,"GET","/v2/passwordPolicy",_f(t,e))}/** 789 * @license 790 * Copyright 2023 Google LLC 791 * 792 * Licensed under the Apache License, Version 2.0 (the "License"); 793 * you may not use this file except in compliance with the License. 794 * You may obtain a copy of the License at 795 * 796 * http://www.apache.org/licenses/LICENSE-2.0 797 * 798 * Unless required by applicable law or agreed to in writing, software 799 * distributed under the License is distributed on an "AS IS" BASIS, 800 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 801 * See the License for the specific language governing permissions and 802 * limitations under the License. 803 */const tk=6;class nk{constructor(e){var n,r,i,s;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=o.minPasswordLength)!==null&&n!==void 0?n:tk,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,s,o,l;const u={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,u),this.validatePasswordCharacterOptions(e,u),u.isValid&&
803(u.isValid=(n=u.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),u.isValid&&(u.isValid=(r=u.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),u.isValid&&(u.isValid=(i=u.containsLowercaseLetter)!==null&&i!==void 0?i:!0),u.isValid&&(u.isValid=(s=u.containsUppercaseLetter)!==null&&s!==void 0?s:!0),u.isValid&&(u.isValid=(o=u.containsNumericCharacter)!==null&&o!==void 0?o:!0),u.isValid&&(u.isValid=(l=u.containsNonAlphanumericCharacter)!==null&&l!==void 0?l:!0),u}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}}/** 804 * @license 805 * Copyright 2020 Google LLC 806 * 807 * Licensed under the Apache License, Version 2.0 (the "License"); 808 * you may not use this file except in compliance with the License. 809 * You may obtain a copy of the License at 810 * 811 * http://www.apache.org/licenses/LICENSE-2.0 812 * 813 * Unless required by applicable law or agreed to in writing, software 814 * distributed under the License is distributed on an "AS IS" BASIS, 815 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 816 * See the License for the specific language governing permissions and 817 * limitations under the License. 818 */class rk{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Kg(this),this.idTokenSubscription=new Kg(this),this.beforeStateQueue=new ZA(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=M0,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=En(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await Pi.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const n=await B0(this,{idToken:e}),r=await wn._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var n;if(vn(this.app)){const o=this.app.settings.authIdToken;return o?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(l,l))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let i=r,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,l=i==null?void 0:i._redirectEventId,u=await this.tryRedirectSignIn(e);(!o||o===l)&&(u!=null&&u.user)&&(i=u.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);
818if(!i._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return G(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await jl(e)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=MA()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(vn(this.app))return Promise.reject(jr(this));const n=e?Te(e):null;return n&&G(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&G(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return vn(this.app)?Promise.reject(jr(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return vn(this.app)?Promise.reject(jr(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(En(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await ek(this),n=new nk(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new jo("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await YA(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&En(e)||this._popupRedirectResolver;G(n,this,"argument-error"),this.redirectPersistenceManager=await Pi.create(this,[En(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const s=typeof n=="function"?n:n.next.bind(n);let o=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(G(l,this,"internal-error"),l.then(()=>{o||s(this.currentUser)}),typeof n=="function"){const u=e.addObserver(n,r,i);return()=>{o=!0,u()}}else{const u=e.addObserver(n);return()=>{o=!0,u()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return G(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Z0(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const i=await this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n}async _getAppCheckToken(){var e;const n=await((e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken());return n!=null&&n.error&&OA(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function mu(t){return Te(t)}class Kg{constructor(e){this.auth=e,this.observer=null,this.addObserver=IS(n=>this.observer=n)}get next(){return G(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 819 * @license 820 * Copyright 2020 Google LLC 821 * 822 * Licensed under the Apache License, Version 2.0 (the "License");
823 * you may not use this file except in compliance with the License. 824 * You may obtain a copy of the License at 825 * 826 * http://www.apache.org/licenses/LICENSE-2.0 827 * 828 * Unless required by applicable law or agreed to in writing, software 829 * distributed under the License is distributed on an "AS IS" BASIS, 830 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 831 * See the License for the specific language governing permissions and 832 * limitations under the License. 833 */let Tf={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ik(t){Tf=t}function sk(t){return Tf.loadJS(t)}function ok(){return Tf.gapiScript}function ak(t){return`__${t}${Math.floor(Math.random()*1e6)}`}/** 834 * @license 835 * Copyright 2020 Google LLC 836 * 837 * Licensed under the Apache License, Version 2.0 (the "License"); 838 * you may not use this file except in compliance with the License. 839 * You may obtain a copy of the License at 840 * 841 * http://www.apache.org/licenses/LICENSE-2.0 842 * 843 * Unless required by applicable law or agreed to in writing, software 844 * distributed under the License is distributed on an "AS IS" BASIS, 845 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 846 * See the License for the specific language governing permissions and 847 * limitations under the License. 848 */function lk(t,e){const n=pu(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),s=n.getOptions();if(Ol(s,e??{}))return i;tn(i,"already-initialized")}return n.initialize({options:e})}function uk(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map(En);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function ck(t,e,n){const r=mu(t);G(r._canInitEmulator,r,"emulator-config-failed"),G(/^https?:\/\//.test(e),r,"invali
848d-emulator-scheme");const i=!1,s=ew(e),{host:o,port:l}=hk(e),u=l===null?"":`:${l}`;r.config.emulator={url:`${s}//${o}${u}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:l,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),dk()}function ew(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function hk(t){const e=ew(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const s=i[1];return{host:s,port:Qg(r.substr(s.length+1))}}else{const[s,o]=r.split(":");return{host:s,port:Qg(o)}}}function Qg(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function dk(){function t(){const e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}/** 849 * @license 850 * Copyright 2020 Google LLC 851 * 852 * Licensed under the Apache License, Version 2.0 (the "License"); 853 * you may not use this file except in compliance with the License. 854 * You may obtain a copy of the License at 855 * 856 * http://www.apache.org/licenses/LICENSE-2.0 857 * 858 * Unless required by applicable law or agreed to in writing, software 859 * distributed under the License is distributed on an "AS IS" BASIS, 860 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 861 * See the License for the specific language governing permissions and 862 * limitations under the License. 863 */class tw{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return _n("not implemented")}_getIdTokenResponse(e){return _n("not implemented")}_linkToIdToken(e,n){return _n("not implemented")}_getReauthenticationResolver(e){return _n("not implemented")}}/** 864 * @license 865 * Copyright 2020 Google LLC 866 * 867 * Licensed under the Apache License, Version 2.0 (the "License"); 868 * you may not use this file except in compliance with the License. 869 * You may obtain a copy of the License at 870 * 871 * http://www.apache.org/licenses/LICENSE-2.0 872 * 873 * Unless required by applicable law or agreed to in writing, software 874 * distributed under the License is distributed on an "AS IS" BASIS, 875 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 876 * See the License for the specific language governing permissions and 877 * limitations under the License. 878 */async function Ni(t,e){return zA(t,"POST","/v1/accounts:signInWithIdp",_f(t,e))}/** 879 * @license 880 * Copyright 2020 Google LLC 881 * 882 * Licensed under the Apache License, Version 2.0 (the "License"); 883 * you may not use this file except in compliance with the License. 884 * You may obtain a copy of the License at 885 * 886 * http://www.apache.org/licenses/LICENSE-2.0 887 * 888 * Unless required by applicable law or agreed to in writing, software 889 * distributed under the License is distributed on an "AS IS" BASIS, 890 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 891 * See the License for the specific language governing permissions and 892 * limitations under the License. 893 */const fk="http://localhost";class Hr extends tw{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new Hr(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):tn("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
893once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=mf(n,["providerId","signInMethod"]);if(!r||!i)return null;const o=new Hr(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return Ni(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,Ni(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,Ni(e,n)}buildRequest(){const e={requestUri:fk,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=Mo(n)}return e}}/** 894 * @license 895 * Copyright 2020 Google LLC 896 * 897 * Licensed under the Apache License, Version 2.0 (the "License"); 898 * you may not use this file except in compliance with the License. 899 * You may obtain a copy of the License at 900 * 901 * http://www.apache.org/licenses/LICENSE-2.0 902 * 903 * Unless required by applicable law or agreed to in writing, software 904 * distributed under the License is distributed on an "AS IS" BASIS, 905 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 906 * See the License for the specific language governing permissions and 907 * limitations under the License. 908 */class If{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** 909 * @license 910 * Copyright 2019 Google LLC 911 * 912 * Licensed under the Apache License, Version 2.0 (the "License"); 913 * you may not use this file except in compliance with the License. 914 * You may obtain a copy of the License at 915 * 916 * http://www.apache.org/licenses/LICENSE-2.0 917 * 918 * Unless required by applicable law or agreed to in writing, software 919 * distributed under the License is distributed on an "AS IS" BASIS, 920 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 921 * See the License for the specific language governing permissions and 922 * limitations under the License. 923 */class Uo extends If{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** 924 * @license 925 * Copyright 2020 Google LLC 926 * 927 * Licensed under the Apache License, Version 2.0 (the "License"); 928 * you may not use this file except in compliance with the License. 929 * You may obtain a copy of the License at 930 * 931 * http://www.apache.org/licenses/LICENSE-2.0 932 * 933 * Unless required by applicable law or agreed to in writing, software 934 * distributed under the License is distributed on an "AS IS" BASIS, 935 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 936 * See the License for the specific language governing permissions and 937 * limitations under the License. 938 */class qn extends Uo{constructor(){super("facebook.com")}static credential(e){return Hr._fromParams({providerId:qn.PROVIDER_ID,signInMethod:qn.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return qn.credentialFromTaggedObject(e)}static credentialFromError(e){return qn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return qn.credential(e.oauthAccessToken)}catch{return null}}}qn.FACEBOOK_SIGN_IN_METHOD="facebook.com";qn.PROVIDER_ID="facebook.com";/** 939 * @license 940 * Copyright 2020 Google LLC 941 * 942 * Licensed under the Apache License, Version 2.0 (the "License"); 943 * you may not use this file except in compliance with the License. 944 * You may obtain a copy of the License at 945 * 946 * http://www.apache.org/licenses/LICENSE-2.0 947 * 948 * Unless required by applicable law or agreed to in writing, softw
948are 949 * distributed under the License is distributed on an "AS IS" BASIS, 950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 951 * See the License for the specific language governing permissions and 952 * limitations under the License. 953 */class Kt extends Uo{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return Hr._fromParams({providerId:Kt.PROVIDER_ID,signInMethod:Kt.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Kt.credentialFromTaggedObject(e)}static credentialFromError(e){return Kt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Kt.credential(n,r)}catch{return null}}}Kt.GOOGLE_SIGN_IN_METHOD="google.com";Kt.PROVIDER_ID="google.com";/** 954 * @license 955 * Copyright 2020 Google LLC 956 * 957 * Licensed under the Apache License, Version 2.0 (the "License"); 958 * you may not use this file except in compliance with the License. 959 * You may obtain a copy of the License at 960 * 961 * http://www.apache.org/licenses/LICENSE-2.0 962 * 963 * Unless required by applicable law or agreed to in writing, software 964 * distributed under the License is distributed on an "AS IS" BASIS, 965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 966 * See the License for the specific language governing permissions and 967 * limitations under the License. 968 */class Wn extends Uo{constructor(){super("github.com")}static credential(e){return Hr._fromParams({providerId:Wn.PROVIDER_ID,signInMethod:Wn.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Wn.credentialFromTaggedObject(e)}static credentialFromError(e){return Wn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Wn.credential(e.oauthAccessToken)}catch{return null}}}Wn.GITHUB_SIGN_IN_METHOD="github.com";Wn.PROVIDER_ID="github.com";/** 969 * @license 970 * Copyright 2020 Google LLC 971 * 972 * Licensed under the Apache License, Version 2.0 (the "License"); 973 * you may not use this file except in compliance with the License. 974 * You may obtain a copy of the License at 975 * 976 * http://www.apache.org/licenses/LICENSE-2.0 977 * 978 * Unless required by applicable law or agreed to in writing, software 979 * distributed under the License is distributed on an "AS IS" BASIS, 980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 981 * See the License for the specific language governing permissions and 982 * limitations under the License. 983 */class Hn extends Uo{constructor(){super("twitter.com")}static credential(e,n){return Hr._fromParams({providerId:Hn.PROVIDER_ID,signInMethod:Hn.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Hn.credentialFromTaggedObject(e)}static credentialFromError(e){return Hn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Hn.credential(n,r)}catch{return null}}}Hn.TWITTER_SIGN_IN_METHOD="twitter.com";Hn.PROVIDER_ID="twitter.com";/** 984 * @license 985 * Copyright 2020 Google LLC 986 * 987 * Licensed under the Apache License, Version 2.0 (the "License"); 988 * you may not use this file except in compliance with the License. 989 * You may obtain a copy of the License at 990 * 991 * http://www.apache.org/licenses/LICENSE-2.0 992 * 993 * Unless required by applicable law or agreed to in writing, software 994 * distributed under the License is distributed on an "AS IS" BASIS, 995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 996 * See the License for the specific language governing permissions and 997 * limitations under the License. 998 */class zi{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const s=await wn._fromIdTokenResponse(e,r,i),o=Yg(r);return new zi({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=Yg(r);return new zi({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function Yg(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** 999 * @license 1000 * Copyright 2020 Google LLC 1001 * 1002 * Licensed under the Apache License, Version 2.0 (the "License");
1003 * you may not use this file except in compliance with the License. 1004 * You may obtain a copy of the License at 1005 * 1006 * http://www.apache.org/licenses/LICENSE-2.0 1007 * 1008 * Unless required by applicable law or agreed to in writing, software 1009 * distributed under the License is distributed on an "AS IS" BASIS, 1010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1011 * See the License for the specific language governing permissions and 1012 * limitations under the License. 1013 */class Ml extends sn{constructor(e,n,r,i){var s;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,Ml.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new Ml(e,n,r,i)}}function nw(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?Ml._fromErrorAndOperation(t,s,e,r):s})}async function pk(t,e,n=!1){const r=await Eo(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return zi._forOperation(t,"link",r)}/** 1014 * @license 1015 * Copyright 2019 Google LLC 1016 * 1017 * Licensed under the Apache License, Version 2.0 (the "License"); 1018 * you may not use this file except in compliance with the License. 1019 * You may obtain a copy of the License at 1020 * 1021 * http://www.apache.org/licenses/LICENSE-2.0 1022 * 1023 * Unless required by applicable law or agreed to in writing, software 1024 * distributed under the License is distributed on an "AS IS" BASIS, 1025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1026 * See the License for the specific language governing permissions and 1027 * limitations under the License. 1028 */async function mk(t,e,n=!1){const{auth:r}=t;if(vn(r.app))return Promise.reject(jr(r));const i="reauthenticate";try{const s=await Eo(t,nw(r,i,e,t),n);G(s.idToken,r,"internal-error");const o=wf(s.idToken);G(o,r,"internal-error");const{sub:l}=o;return G(t.uid===l,r,"user-mismatch"),zi._forOperation(t,i,s)}catch(s){throw(s==null?void 0:s.code)==="auth/user-not-found"&&tn(r,"user-mismatch"),s}}/** 1029 * @license 1030 * Copyright 2020 Google LLC 1031 * 1032 * Licensed under the Apache License, Version 2.0 (the "License"); 1033 * you may not use this file except in compliance with the License. 1034 * You may obtain a copy of the License at 1035 * 1036 * http://www.apache.org/licenses/LICENSE-2.0 1037 * 1038 * Unless required by applicable law or agreed to in writing, software 1039 * distributed under the License is distributed on an "AS IS" BASIS, 1040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1041 * See the License for the specific language governing permissions and 1042 * limitations under the License. 1043 */async function gk(t,e,n=!1){if(vn(t.app))return Promise.reject(jr(t));const r="signIn",i=await nw(t,r,e),s=await zi._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}function yk(t,e,n,r){return Te(t).onIdTokenChanged(e,n,r)}function vk(t,e,n){return Te(t).beforeAuthStateChanged(e,n)}function rw(t,e,n,r){return Te(t).onAuthStateChanged(e,n,r)}function _k(t){return Te(t).signOut()}const Fl="__sak";/** 1044 * @license 1045 * Copyright 2019 Google LLC 1046 * 1047 * Licensed under the Apache License, Version 2.0 (the "License"); 1048 * you may not use this file except in compliance with the License. 1049 * You may obtain a copy of the License at 1050 * 1051 * http://www.apache.org/licenses/LICENSE-2.0 1052 * 1053 * Unless required by applicable law or agreed to in writing, software 1054 * distributed under the License is distributed on an "AS IS" BASIS, 1055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1056 * See the License for the specific language governing permissions and 1057 * limitations under the License. 1058 */class iw{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Fl,"1"),this.storage.removeItem(Fl),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 1059 * @license 1060 * Copyright 2020 Google LLC 1061 * 1062 * Licensed under the Apache License, Version 2.0 (the "License");
1063 * you may not use this file except in compliance with the License. 1064 * You may obtain a copy of the License at 1065 * 1066 * http://www.apache.org/licenses/LICENSE-2.0 1067 * 1068 * Unless required by applicable law or agreed to in writing, software 1069 * distributed under the License is distributed on an "AS IS" BASIS, 1070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1071 * See the License for the specific language governing permissions and 1072 * limitations under the License. 1073 */const wk=1e3,Ek=10;class sw extends iw{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=J0(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,l,u)=>{this.notifyListeners(o,u)});return}const r=e.key;n?this.detachListener():this.stopPolling();const i=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);JA()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,Ek):i()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},wk)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1073ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}sw.type="LOCAL";const Tk=sw;/** 1074 * @license 1075 * Copyright 2020 Google LLC 1076 * 1077 * Licensed under the Apache License, Version 2.0 (the "License"); 1078 * you may not use this file except in compliance with the License. 1079 * You may obtain a copy of the License at 1080 * 1081 * http://www.apache.org/licenses/LICENSE-2.0 1082 * 1083 * Unless required by applicable law or agreed to in writing, software 1084 * distributed under the License is distributed on an "AS IS" BASIS, 1085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1086 * See the License for the specific language governing permissions and 1087 * limitations under the License. 1088 */class ow extends iw{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}ow.type="SESSION";const aw=ow;/** 1089 * @license 1090 * Copyright 2019 Google LLC 1091 * 1092 * Licensed under the Apache License, Version 2.0 (the "License"); 1093 * you may not use this file except in compliance with the License. 1094 * You may obtain a copy of the License at 1095 * 1096 * http://www.apache.org/licenses/LICENSE-2.0 1097 * 1098 * Unless required by applicable law or agreed to in writing, software 1099 * distributed under the License is distributed on an "AS IS" BASIS, 1100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1101 * See the License for the specific language governing permissions and 1102 * limitations under the License. 1103 */function Ik(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/** 1104 * @license 1105 * Copyright 2019 Google LLC 1106 * 1107 * Licensed under the Apache License, Version 2.0 (the "License"); 1108 * you may not use this file except in compliance with the License. 1109 * You may obtain a copy of the License at 1110 * 1111 * http://www.apache.org/licenses/LICENSE-2.0 1112 * 1113 * Unless required by applicable law or agreed to in writing, software 1114 * distributed under the License is distributed on an "AS IS" BASIS, 1115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1116 * See the License for the specific language governing permissions and 1117 * limitations under the License. 1118 */class gu{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;const r=new gu(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const l=Array.from(o).map(async h=>h(n.origin,s)),u=await Ik(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:u})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}gu.receivers=[];/** 1119 * @license 1120 * Copyright 2020 Google LLC 1121 * 1122 * Licensed under the Apache License, Version 2.0 (the "License"); 1123 * you may not use this file except in compliance with the License. 1124 * You may obtain a copy of the License at 1125 * 1126 * http://www.apache.org/licenses/LICENSE-2.0 1127 * 1128 * Unless required by applicable law or agreed to in writing, software 1129 * distributed under the License is distributed on an "AS IS" BASIS, 1130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1131 * See the License for the specific language governing permissions and 1132 * limitations under the License. 1133 */function xf(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/** 1134 * @license 1135 * Copyright 2019 Google LLC 1136 * 1137 * Licensed under the Apache License, Version 2.0 (the "License");
1138 * you may not use this file except in compliance with the License. 1139 * You may obtain a copy of the License at 1140 * 1141 * http://www.apache.org/licenses/LICENSE-2.0 1142 * 1143 * Unless required by applicable law or agreed to in writing, software 1144 * distributed under the License is distributed on an "AS IS" BASIS, 1145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1146 * See the License for the specific language governing permissions and 1147 * limitations under the License. 1148 */class xk{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((l,u)=>{const h=xf("",20);i.port1.start();const p=setTimeout(()=>{u(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(m){const g=m;if(g.data.eventId===h)switch(g.data.status){case"ack":clearTimeout(p),s=setTimeout(()=>{u(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),l(g.data.response);break;default:clearTimeout(p),clearTimeout(s),u(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:h,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/** 1149 * @license 1150 * Copyright 2020 Google LLC 1151 * 1152 * Licensed under the Apache License, Version 2.0 (the "License"); 1153 * you may not use this file except in compliance with the License. 1154 * You may obtain a copy of the License at 1155 * 1156 * http://www.apache.org/licenses/LICENSE-2.0 1157 * 1158 * Unless required by applicable law or agreed to in writing, software 1159 * distributed under the License is distributed on an "AS IS" BASIS, 1160 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1161 * See the License for the specific language governing permissions and 1162 * limitations under the License. 1163 */function Jt(){return window}function Sk(t){Jt().location.href=t}/** 1164 * @license 1165 * Copyright 2020 Google LLC. 1166 * 1167 * Licensed under the Apache License, Version 2.0 (the "License"); 1168 * you may not use this file except in compliance with the License. 1169 * You may obtain a copy of the License at 1170 * 1171 * http://www.apache.org/licenses/LICENSE-2.0 1172 * 1173 * Unless required by applicable law or agreed to in writing, software 1174 * distributed under the License is distributed on an "AS IS" BASIS, 1175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1176 * See the License for the specific language governing permissions and 1177 * limitations under the License. 1178 */function lw(){return typeof Jt().WorkerGlobalScope<"u"&&typeof Jt().importScripts=="function"}async function Ak(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function kk(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function Ck(){return lw()?self:null}/** 1179 * @license 1180 * Copyright 2019 Google LLC 1181 * 1182 * Licensed under the Apache License, Version 2.0 (the "License"); 1183 * you may not use this file except in compliance with the License. 1184 * You may obtain a copy of the License at 1185 * 1186 * http://www.apache.org/licenses/LICENSE-2.0 1187 * 1188 * Unless required by applicable law or agreed to in writing, software 1189 * distributed under the License is distributed on an "AS IS" BASIS, 1190 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1191 * See the License for the specific language governing permissions and 1192 * limitations under the License. 1193 */const uw="firebaseLocalStorageDb",Rk=1,Ul="firebaseLocalStorage",cw="fbase_key";class zo{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function yu(t,e){return t.transaction([Ul],e?"readwrite":"readonly").objectStore(Ul)}function Pk(){const t=indexedDB.deleteDatabase(uw);
1193return new zo(t).toPromise()}function Wh(){const t=indexedDB.open(uw,Rk);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Ul,{keyPath:cw})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Ul)?e(r):(r.close(),await Pk(),e(await Wh()))})})}async function Xg(t,e,n){const r=yu(t,!0).put({[cw]:e,value:n});return new zo(r).toPromise()}async function Nk(t,e){const n=yu(t,!1).get(e),r=await new zo(n).toPromise();return r===void 0?null:r.value}function Jg(t,e){const n=yu(t,!0).delete(e);return new zo(n).toPromise()}const bk=800,Dk=3;class hw{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await Wh(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>Dk)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return lw()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=gu._getInstance(Ck()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1193)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await Ak(),!this.activeServiceWorker)return;this.sender=new xk(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||kk()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Wh();return await Xg(e,Fl,"1"),await Jg(e,Fl),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>Xg(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>Nk(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Jg(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=yu(i,!1).getAll();return new zo(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),bk)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Ob
vendor: 4,315 bytes, lines 1193-1242
1193ject.keys(this.listeners).length===0&&this.stopPolling()}}hw.type="LOCAL";const Ok=hw;new Fo(3e4,6e4);/** 1194 * @license 1195 * Copyright 2021 Google LLC 1196 * 1197 * Licensed under the Apache License, Version 2.0 (the "License"); 1198 * you may not use this file except in compliance with the License. 1199 * You may obtain a copy of the License at 1200 * 1201 * http://www.apache.org/licenses/LICENSE-2.0 1202 * 1203 * Unless required by applicable law or agreed to in writing, software 1204 * distributed under the License is distributed on an "AS IS" BASIS, 1205 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1206 * See the License for the specific language governing permissions and 1207 * limitations under the License. 1208 */function dw(t,e){return e?En(e):(G(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** 1209 * @license 1210 * Copyright 2019 Google LLC 1211 * 1212 * Licensed under the Apache License, Version 2.0 (the "License"); 1213 * you may not use this file except in compliance with the License. 1214 * You may obtain a copy of the License at 1215 * 1216 * http://www.apache.org/licenses/LICENSE-2.0 1217 * 1218 * Unless required by applicable law or agreed to in writing, software 1219 * distributed under the License is distributed on an "AS IS" BASIS, 1220 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1221 * See the License for the specific language governing permissions and 1222 * limitations under the License. 1223 */class Sf extends tw{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ni(e,this._buildIdpRequest())}_linkToIdToken(e,n){return Ni(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return Ni(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function Vk(t){return gk(t.auth,new Sf(t),t.bypassAuthState)}function Lk(t){const{auth:e,user:n}=t;return G(n,e,"internal-error"),mk(n,new Sf(t),t.bypassAuthState)}async function jk(t){const{auth:e,user:n}=t;return G(n,e,"internal-error"),pk(n,new Sf(t),t.bypassAuthState)}/** 1224 * @license 1225 * Copyright 2020 Google LLC 1226 * 1227 * Licensed under the Apache License, Version 2.0 (the "License"); 1228 * you may not use this file except in compliance with the License. 1229 * You may obtain a copy of the License at 1230 * 1231 * http://www.apache.org/licenses/LICENSE-2.0 1232 * 1233 * Unless required by applicable law or agreed to in writing, software 1234 * distributed under the License is distributed on an "AS IS" BASIS, 1235 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1236 * See the License for the specific language governing permissions and 1237 * limitations under the License. 1238 */class fw{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:l}=e;if(o){this.reject(o);return}const u={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(u))}catch(h){this.reject(h)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Vk;case"linkViaPopup":case"linkViaRedirect":return jk;case"reauthViaPopup":case"reauthViaRedirect":return Lk;default:tn(this.auth,"internal-error")}}resolve(e){Rn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Rn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** 1239 * @license 1240 * Copyright 2020 Google LLC 1241 * 1242 * Licensed under the Apache License, Version 2.0 (the "License");
1243 * you may not use this file except in compliance with the License. 1244 * You may obtain a copy of the License at 1245 * 1246 * http://www.apache.org/licenses/LICENSE-2.0 1247 * 1248 * Unless required by applicable law or agreed to in writing, software 1249 * distributed under the License is distributed on an "AS IS" BASIS, 1250 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1251 * See the License for the specific language governing permissions and 1252 * limitations under the License. 1253 */const Mk=new Fo(2e3,1e4);async function Zg(t,e,n){if(vn(t.app))return Promise.reject(Bt(t,"operation-not-supported-in-this-environment"));const r=mu(t);VA(t,e,If);const i=dw(r,n);return new Dr(r,"signInViaPopup",e,i).executeNotNull()}class Dr extends fw{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,Dr.currentPopupAction&&Dr.currentPopupAction.cancel(),Dr.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return G(e,this.auth,"internal-error"),e}async onExecution(){Rn(this.filter.length===1,"Popup operations only handle one event");const e=xf();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Bt(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Bt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Dr.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Bt(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,Mk.get())};e()}}Dr.currentPopupAction=null;/** 1254 * @license 1255 * Copyright 2020 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 */const Fk="pendingRedirect",tl=new Map;class Uk extends fw{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=tl.get(this.auth._key());if(!e){try{const r=await zk(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}tl.set(this.auth._key(),e)}return this.bypassAuthState||tl.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function zk(t,e){const n=qk(e),r=$k(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function Bk(t,e){tl.set(t._key(),e)}function $k(t){return En(t._redirectPersistence)}function qk(t){return el(Fk,t.config.apiKey,t.name)}async function Wk(t,e,n=!1){if(vn(t.app))return Promise.reject(jr(t));const r=mu(t),i=dw(r,e),o=await new Uk(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/** 1269 * @license 1270 * Copyright 2020 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 */const Hk=10*60*1e3;class Gk{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!Kk(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!pw(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Bt(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=Hk&&this.cachedEventUids.clear(),this.cachedEventUids.has(ey(e))}saveEventToCache(e){this.cachedEventUids.add(ey(e)),this.lastProcessedEventTime=Date.now()}}function ey(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function pw({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function Kk(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return pw(t);default:return!1}}/** 1284 * @license 1285 * Copyright 2020 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 */async function Qk(t,e={}){return ts(t,"GET","/v1/projects",e)}/** 1299 * @license 1300 * Copyright 2020 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 Yk=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Xk=/^https?/;async function Jk(t){if(t.config.emulator)return;const{authorizedDomains:e}=await Qk(t);for(const n of e)try{if(Zk(n))return}catch{}tn(t,"unauthorized-domain")}function Zk(t){const e=$h(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!Xk.test(n))return!1;if(Yk.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/** 1314 * @license 1315 * Copyright 2020 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 */const eC=new Fo(3e4,6e4);function ty(){const t=Jt().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function tC(t){return new Promise((e,n)=>{var r,i,s;function o(){ty(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{ty(),n(Bt(t,"network-request-failed"))},timeout:eC.get()})}if(!((i=(r=Jt().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=Jt().gapi)===null||s===void 0)&&s.load)o();else{const l=ak("iframefcb");return Jt()[l]=()=>{gapi.load?o():n(Bt(t,"network-request-failed"))},sk(`${ok()}?onload=${l}`).catch(u=>n(u))}}).catch(e=>{throw nl=null,e})}let nl=null;function nC(t){return nl=nl||tC(t),nl}/** 1329 * @license 1330 * Copyright 2020 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 */const rC=new Fo(5e3,15e3),iC="__/auth/iframe",sC="emulator/auth/iframe",oC={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},aC=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function lC(t){const e=t.config;G(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?vf(e,sC):`https://${t.config.authDomain}/${iC}`,r={apiKey:e.apiKey,appName:t.name,v:es},i=aC.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${Mo(r).slice(1)}`}async function uC(t){const e=await nC(t),n=Jt().gapi;return G(n,t,"internal-error"),e.open({where:document.body,url:lC(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:oC,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const o=Bt(t,"network-request-failed"),l=Jt().setTimeout(()=>{s(o)},rC.get());function u(){Jt().clearTimeout(l),i(r)}r.ping(u).then(u,()=>{s(o)})}))}/** 1344 * @license 1345 * Copyright 2020 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 */const cC={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},hC=500,dC=600,fC="_blank",pC="http://localhost";class ny{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function mC(t,e,n,r=hC,i=dC){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const u=Object.assign(Object.assign({},cC),{width:r.toString(),height:i.toString(),top:s,left:o}),h=rt().toLowerCase();n&&(l=G0(h)?fC:n),W0(h)&&(e=e||pC,u.scrollbars="yes");const p=Object.entries(u).reduce((g,[A,C])=>`${g}${A}=${C},`,"");if(XA(h)&&l!=="_self")return gC(e||"",l),new ny(null);const m=window.open(e||"",l,p);G(m,t,"popup-blocked");try{m.focus()}catch{}return new ny(m)}function gC(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");
1358r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** 1359 * @license 1360 * Copyright 2021 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 */const yC="__/auth/handler",vC="emulator/auth/handler",_C=encodeURIComponent("fac");async function ry(t,e,n,r,i,s){G(t.config.authDomain,t,"auth-domain-config-required"),G(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:es,eventId:i};if(e instanceof If){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",TS(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[p,m]of Object.entries({}))o[p]=m}if(e instanceof Uo){const p=e.getScopes().filter(m=>m!=="");p.length>0&&(o.scopes=p.join(","))}t.tenantId&&(o.tid=t.tenantId);const l=o;for(const p of Object.keys(l))l[p]===void 0&&delete l[p];const u=await t._getAppCheckToken(),h=u?`#${_C}=${encodeURIComponent(u)}`:"";return`${wC(t)}?${Mo(l).slice(1)}${h}`}function wC({config:t}){return t.emulator?vf(t,vC):`https://${t.authDomain}/${yC}`}/** 1374 * @license 1375 * Copyright 2020 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 */const Lc="webStorageSupport";class EC{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=aw,this._completeRedirectFn=Wk,this._overrideRedirectResult=Bk}async _openPopup(e,n,r,i){var s;Rn((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=await ry(e,n,r,$h(),i);return mC(e,o,xf())}async _openRedirect(e,n,r,i){await this._originValidation(e);const s=await ry(e,n,r,$h(),i);return Sk(s),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(Rn(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await uC(e),r=new Gk(e);return n.register("authEvent",i=>(G(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(Lc,{type:Lc},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[Lc];o!==void 0&&n(!!o),tn(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=Jk(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return J0()||H0()||Ef()}}const TC=EC;var iy="@firebase/auth",sy="1.7.9";/** 1389 * @license 1390 * Copyright 2020 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, softw
1398are 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 */class IC{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){G(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1404 * @license 1405 * Copyright 2020 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 */function xC(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function SC(t){Wr(new hr("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:l}=r.options;G(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const u={apiKey:o,authDomain:l,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Z0(t)},h=new rk(r,i,s,u);return uk(h,n),h},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),Wr(new hr("auth-internal",e=>{const n=mu(e.getProvider("auth").getImmediate());return(r=>new IC(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Xt(iy,sy,xC(t)),Xt(iy,sy,"esm2017")}/** 1419 * @license 1420 * Copyright 2021 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 */const AC=5*60,kC=N0("authIdTokenMaxAge")||AC;let oy=null;const CC=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>kC)return;const i=n==null?void 0:n.token;oy!==i&&(oy=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function RC(t=pf()){const e=pu(t,"auth");if(e.isInitialized())return e.getImmediate();const n=lk(t,{popupRedirectResolver:TC,persistence:[Ok,Tk,aw]}),r=N0("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const s=new URL(r,location.origin);if(location.origin===s.origin){const o=CC(s.toString());vk(n,o,()=>o(n.currentUser)),yk(n,l=>o(l))}}const i=C0("auth");return i&&ck(n,`http://${i}`),n}function PC(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}
vendor: 52,870 bytes, lines 1433-1455
1433ik({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=Bt("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",PC().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});SC("Browser");var ay=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 1434Copyright The Closure Library Authors. 1435SPDX-License-Identifier: Apache-2.0 1436*/var Mr,mw;(function(){var t;/** @license 1437 1438 Copyright The Closure Library Authors. 1439 SPDX-License-Identifier: Apache-2.0 1440*/function e(T,v){function I(){}I.prototype=v.prototype,T.D=v.prototype,T.prototype=new I,T.prototype.constructor=T,T.C=function(x,k,b){for(var S=Array(arguments.length-2),At=2;At<arguments.length;At++)S[At-2]=arguments[At];return v.prototype[k].apply(x,S)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}e(r,n),r.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(T,v,I){I||(I=0);var x=Array(16);if(typeof v=="string")for(var k=0;16>k;++k)x[k]=v.charCodeAt(I++)|v.charCodeAt(I++)<<8|v.charCodeAt(I++)<<16|v.charCodeAt(I++)<<24;else for(k=0;16>k;++k)x[k]=v[I++]|v[I++]<<8|v[I++]<<16|v[I++]<<24;v=T.g[0],I=T.g[1],k=T.g[2];var b=T.g[3],S=v+(b^I&(k^b))+x[0]+3614090360&4294967295;v=I+(S<<7&4294967295|S>>>25),S=b+(k^v&(I^k))+x[1]+3905402710&4294967295,b=v+(S<<12&4294967295|S>>>20),S=k+(I^b&(v^I))+x[2]+606105819&4294967295,k=b+(S<<17&4294967295|S>>>15),S=I+(v^k&(b^v))+x[3]+3250441966&4294967295,I=k+(S<<22&4294967295|S>>>10),S=v+(b^I&(k^b))+x[4]+4118548399&4294967295,v=I+(S<<7&4294967295|S>>>25),S=b+(k^v&(I^k))+x[5]+1200080426&4294967295,b=v+(S<<12&4294967295|S>>>20),S=k+(I^b&(v^I))+x[6]+2821735955&4294967295,k=b+(S<<17&4294967295|S>>>15),S=I+(v^k&(b^v))+x[7]+4249261313&4294967295,I=k+(S<<22&4294967295|S>>>10),S=v+(b^I&(k^b))+x[8]+1770035416&4294967295,v=I+(S<<7&4294967295|S>>>25),S=b+(k^v&(I^k))+x[9]+2336552879&4294967295,b=v+(S<<12&4294967295|S>>>20),S=k+(I^b&(v^I))+x[10]+4294925233&4294967295,k=b+(S<<17&4294967295|S>>>15),S=I+(v^k&(b^v))+x[11]+2304563134&4294967295,I=k+(S<<22&4294967295|S>>>10),S=v+(b^I&(k^b))+x[12]+1804603682&4294967295,v=I+(S<<7&4294967295|S>>>25),S=b+(k^v&(I^k))+x[13]+4254626195&4294967295,b=v+(S<<12&4294967295|S>>>20),S=k+(I^b&(v^I))+x[14]+2792965006&4294967295,k=b+(S<<17&4294967295|S>>>15),S=I+(v^k&(b^v))+x[15]+1236535329&4294967295,I=k+(S<<22&4294967295|S>>>10),S=v+(k^b&(I^k))+x[1]+4129170786&4294967295,v=I+(S<<5&4294967295|S>>>27),S=b+(I^k&(v^I))+x[6]+3225465664&4294967295,b=v+(S<<9&4294967295|S>>>23),S=k+(v^I&(b^v))+x[11]+643717713&4294967295,k=b+(S<<14&4294967295|S>>>18),S=I+(b^v&(k^b))+x[0]+3921069994&4294967295,I=k+(S<<20&4294967295|S>>>12),S=v+(k^b&(I^k))+x[5]+3593408605&4294967295,v=I+(S<<5&4294967295|S>>>27),S=b+(I^k&(v^I))+x[10]+38016083&4294967295,b=v+(S<<9&4294967295|S>>>23),S=k+(v^I&(b^v))+x[15]+3634488961&4294967295,k=b+(S<<14&4294967295|S>>>18),S=I+(b^v&(k^b))+x[4]+3889429448&4294967295,I=k+(S<<20&4294967295|S>>>12),S=v+(k^b&(I^k))+x[9]+568446438&4294967295,v=I+(S<<5&4294967295|S>>>27),S=b+(I^k&(v^I))+x[14]+3275163606&4294967295,b=v+(S<<9&4294967295|S>>>23),S=k+(v^I&(b^v))+x[3]+4107603335&4294967295,k=b+(S<<14&4294967295|S>>>18),S=I+(b^v&(k^b))+x[8]+1163531501&4294967295,I=k+(S<<20&4294967295|S>>>12),S=v+(k^b&(I^k))+x[13]+2850285829&4294967295,v=I+(S<<5&4294967295|S>>>27),S=b+(I^k&(v^I))+x[2]+4243563512&4294967295,b=v+(S<<9&4294967295|S>>>23),S=k+(v^I&(b^v))+x[7]+1735328473&4294967295,k=b+(S<<14&4294967295|S>>>18),S=I+(b^v&(k^b))+x[12]+2368359562&4294967295,I=k+(S<<20&4294967295|S>>>12),S=v+(I^k^b)+x[5]+4294588738&4294967295,v=I+(S<<4&4294967295|S>>>28),S=b+(v^I^k)+x[8]+2272392833&4294967295,b=v+(S<<11&4294967295|S>>>21),S=k+(b^v^I)+x[11]+1839030562&4294967295,k=b+(S<<16&4294967295|S>>>16),S=I+(k^b^v)+x[14]+4259657740&4294967295,I=k+(S<<23&4294967295|S>>>9),S=v+(I^k^b)+x[1]+2763975236&4294967295,v=I+(S<<4&4294967295|S>>>28),S=b+(v^I^k)+x[4]+1272893353&4294967295,b=v+(S<<11&4294967295|S>>>21),S=k+(b^v^I)+x[7]+4139469664&4294967295,k=b+(S<<16&4294967295|S>>>16),S=I+(k^b^v)+x[10]+3200236656&4294967295,I=k+(S<<23&4294967295|S>>>9),S=v+(I^k^b)+x[13]+681279174&4294967295,v=I+(S<<4&4294967295|S>>>28),S=b+(v^I^k)+x[0]+3936430074&4294967295,b=v+(S<<11&4294967295|S>>>21),S=k+(b^v^I)+x[3]+3572445317&4294967295,k=b+(S<<16&4294967295|S>>>16),S=I+(k^b^v)+x[6]+76029189&4294967295,I=k+(S<<23&4294967295|S>>>9),S=v+(I^k^b)+x[9]+3654602809&4294967295,v=I+(S<<4&4294967295|S>>>28),S=b+(v^I^k)+x[12]+3873151461&4294967295,b=v+(S<<11&4294967295|S>>>21),S=k+(b^v^I)+x[15]+530742520&4294967295,k=b+(S<<16&4294967295|S>>>16),S=I+(k^b^v)+x[2]+3299628645&4294967295,I=k+(S<<23&4294967295|S>>>9),S=v+(k^(I|~b))+x[0]+4096336452&4294967295,v=I+(S<<6&4294967295|S>>>26),S=b+(I^(v|~k))+x[7]+1126891415&4294967295,b=v+(S<<10&4294967295|S>>>22),S=k+(v^(b|~I))+x[14]+2878612391&4294967295,k=b+(S<<15&4294967295|S>>>17),S=I+(b^(k|~v))+x[5]+4237533241&4294967295,I=k+(S<<21&4294967295|S>>>11),S=v+(k^(I|~b))+x[12]+1700485571&4294967295,v=I+(S<<6&4294967295|S>>>26),S=b+(I^(v|~k))+x[3]+2399980690&4294967295,b=v+(S<<10&4294967295|S>>>22),S=k+(v^(b|~I))+x[10]+4293915773&4294967295,k=b+(S<<15&4294967295|S>>>17),S=I+(b^(k|~v))+x[1]+2240044497&4294967295,I=k+(S<<21&4294967295|S>>>11),S=v+(k^(I|~b))+x[8]+1873313359&4294967295,v=I+(S<<6&4294967295|S>>>26),S=b+(I^(v|~k))+x[15]+4264355552&4294967295,b=v+(S<<10&4294967295|S>>>22),S=k+(v^(b|~I))+x[6]+2734768916&4294967295,k=b+(S<<15&4294967295|S>>>17),S=I+(b^(k|~v))+x[13]+1309151649&4294967295,I=k+(S<<21&4294967295|S>>>11),S=v+(k^(I|~b))+x[4]+4149444226&4294967295,v=I+(S<<6&4294967295|S>>>26),S=b+(I^(v|~k))+x[11]+3174756917&4294967295,b=v+(S<<10&4294967295|S>>>22),S=k+(v^(b|~I))+x[2]+718787259&4294967295,k=b+(S<<15&4294967295|S>>>17),S=I+(b^(k|~v))+x[9]+3951481745&4294967295,T.g[0]=T.g[0]+v&4294967295,T.g[1]=T.g[1]+(k+(S<<21&4294967295|S>>>11))&4294967295,T.g[2]=T.g[2]+k&4294967295,T.g[3]=T.g[3]+b&4294967295}r.prototype.u=function(T,v){v===void 0&&(v=T.length);for(var I=v-this.blockSize,x=this.B,k=this.h,b=0;b<v;){if(k==0)for(;b<=I;)i(this,T,b),b+=this.blockSize;if(typeof T=="string"){for(;b<v;)if(x[k++]=T.charCodeAt(b++),k==this.blockSize){i(this,x),k=0;break}}else for(;b<v;)if(x[k++]=T[b++],k==this.blockSize){i(this,x),k=0;break}}this.h=k,this.o+=v},r.prototype.v=function(){var T=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);T[0]=128;for(var v=1;v<T.length-8;++v)T[v]=0;var I=8*this.o;for(v=T.length-8;v<T.length;++v)T[v]=I&255,I/=256;for(this.u(T),T=Array(16),v=I=0;4>v;++v)for(var x=0;32>x;x+=8)T[I++]=this.g[v]>>>x&255;return T};function s(T,v){var I=l;return Object.prototype.hasOwnProperty.call(I,T)?I[T]:I[T]=v(T)}function o(T,v){this.h=v;for(var I=[],x=!0,k=T.length-1;0<=k;k--){var b=T[k]|0;x&&b==v||(I[k]=b,x=!1)}this.g=I}var l={};function u(T){return-128<=T&&128>T?s(T,function(v){return new o([v|0],0>v?-1:0)}):new o([T|0],0>T?-1:0)}function h(T){if(isNaN(T)||!isFinite(T))return m;if(0>T)return R(h(-T));for(var v=[],I=1,x=0;T>=I;x++)v[x]=T/I|0,I*=4294967296;return new o(v,0)}function p(T,v){if(T.length==0)throw Error("number format error: empty string");if(v=v||10,2>v||36<v)throw Error("radix out of range: "+v);if(T.charAt(0)=="-")return R(p(T.substring(1),v));if(0<=T.indexOf("-"))throw Error('number format error: interior "-" character');for(var I=h(Math.pow(v,8)),x=m,k=0;k<T.length;k+=8){var b=Math.min(8,T.length-k),S=parseInt(T.substring(k,k+b),v);8>b?(b=h(Math.pow(v,b)),x=x.j(b).add(h(S))):(x=x.j(I),x=x.add(h(S)))}return x}var m=u(0),g=u(1),A=u(16777216);t=o.prototype,t.m=function(){if(N(this))return-R(this).m();for(var T=0,v=1,I=0;I<this.g.length;I++){var x=this.i(I);T+=(0<=x?x:4294967296+x)*v,v*=4294967296}return T},t.toString=function(T){if(T=T||10,2>T||36<T)throw Error("radix out of range: "+T);if(C(this))return"0";if(N(this))return"-"+R(this).toString(T);for(var v=h(Math.pow(T,6)),I=this,x="";;){var k=D(I,v).g;I=w(I,k.j(v));var b=((0<I.g.length?I.g[0]:I.h)>>>0).toString(T);if(I=k,C(I))return b+x;for(;6>b.length;)b="0"+b;x=b+x}},t.i=function(T){return 0>T?0:T<this.g.length?this.g[T]:this.h};function C(T){if(T.h!=0)return!1;for(var v=0;v<T.g.length;v++)if(T.g[v]!=0)return!1;return!0}function N(T){return T.h==-1}t.l=function(T){return T=w(this,T),N(T)?-1:C(T)?0:1};function R(T){for(var v=T.g.length,I=[],x=0;x<v;x++)I[x]=~T.g[x];return new o(I,~T.h).add(g)}t.abs=function(){return N(this)?R(this):this},t.add=function(T){for(var v=Math.max(this.g.length,T.g.length),I=[],x=0,k=0;k<=v;k++){var b=x+(this.i(k)&65535)+(T.i(k)&65535),S=(b>>>16)+(this.i(k)>>>16)+(T.i(k)>>>16);x=S>>>16,b&=65535,S&=65535,I[k]=S<<16|b}return new o(I,I[I.length-1]&-2147483648?-1:0)};function w(T,v){return T.add(R(v))}t.j=function(T){if(C(this)||C(T))return m;if(N(this))return N(T)?R(this).j(R(T)):R(R(this).j(T));if(N(T))return R(this.j(R(T)));if(0>this.l(A)&&0>T.l(A))return h(this.m()*T.m());for(var v=this.g.length+T.g.length,I=[],x=0;x<2*v;x++)I[x]=0;for(x=0;x<this.g.length;x++)for(var k=0;k<T.g.length;k++){var b=this.i(x)>>>16,S=this.i(x)&65535,At=T.i(k)>>>16,Er=T.i(k)&65535;I[2*x+2*k]+=S*Er,_(I,2*x+2*k),I[2*x+2*k+1]+=b*Er,_(I,2*x+2*k+1),I[2*x+2*k+1]+=S*At,_(I,2*x+2*k+1),I[2*x+2*k+2]+=b*At,_(I,2*x+2*k+2)}for(x=0;x<v;x++)I[x]=I[2*x+1]<<16|I[2*x];for(x=v;x<2*v;x++)I[x]=0;return new o(I,0)};function _(T,v){for(;(T[v]&65535)!=T[v];)T[v+1]+=T[v]>>>16,T[v]&=65535,v++}function E(T,v){this.g=T,this.h=v}function D(T,v){if(C(v))throw Error("division by zero");if(C(T))return new E(m,m);if(N(T))return v=D(R(T),v),new E(R(v.g),R(v.h));if(N(v))return v=D(T,R(v)),new E(R(v.g),v.h);if(30<T.g.length){if(N(T)||N(v))throw Error("slowDivide_ only works with positive integers.");for(var I=g,x=v;0>=x.l(T);)I=j(I),x=j(x);var k=U(I,1),b=U(x,1);for(x=U(x,2),I=U(I,2);!C(x);){var S=b.add(x);0>=S.l(T)&&(k=k.add(I),b=S),x=U(x,1),I=U(I,1)}return v=w(T,k.j(v)),new E(k,v)}for(k=m;0<=T.l(v);){for(I=Math.max(1,Math.floor(T.m()/v.m())),x=Math.ceil(Math.log(I)/Math.LN2),x=48>=x?1:Math.pow(2,x-48),b=h(I),S=b.j(v);N(S)||0<S.l(T);)I-=x,b=h(I),S=b.j(v);C(b)&&(b=g),k=k.add(b),T=w(T,S)}return new E(k,T)}t.A=function(T){return D(this,T).h},t.and=function(T){for(var v=Math.max(this.g.length,T.g.length),I=[],x=0;x<v;x++)I[x]=this.i(x)&T.i(x);return new o(I,this.h&T.h)},t.or=function(T){for(var v=Math.max(this.g.length,T.g.length),I=[],x=0;x<v;x++)I[x]=this.i(x)|T.i(x);return new o(I,this.h|T.h)},t.xor=function(T){for(var v=Math.max(this.g.length,T.g.length),I=[],x=0;x<v;x++)I[x]=this.i(x)^T.i(x);return new o(I,this.h^T.h)};function j(T){for(var v=T.g.length+1,I=[],x=0;x<v;x++)I[x]=T.i(x)<<1|T.i(x-1)>>>31;return new o(I,T.h)}function U(T,v){var I=v>>5;v%=32;for(var x=T.g.length-I,k=[],b=0;b<x;b++)k[b]=0<v?T.i(b+I)>>>v|T.i(b+I+1)<<32-v:T.i(b+I);return new o(k,T.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,mw=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=h,o.fromString=p,Mr=o}).apply(typeof ay<"u"?ay:typeof self<"u"?self:typeof window<"u"?window:{});var La=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 1441Copyright The Closure Library Authors. 1442SPDX-License-Identifier: Apache-2.0 1443*/var gw,Os,yw,rl,Hh,vw,_w,ww;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,c,d){return a==Array.prototype||a==Object.prototype||(a[c]=d.value),a};function n(a){a=[typeof globalThis=="object"&&globalThis,a,typeof window=="object"&&window,typeof self=="object"&&self,typeof La=="object"&&La];for(var c=0;c<a.length;++c){var d=a[c];if(d&&d.Math==Math)return d}throw Error("Cannot find global object")}var r=n(this);function i(a,c){if(c)e:{var d=r;a=a.split(".");for(var y=0;y<a.length-1;y++){var P=a[y];if(!(P in d))break e;d=d[P]}a=a[a.length-1],y=d[a],c=c(y),c!=y&&c!=null&&e(d,a,{configurable:!0,writable:!0,value:c})}}function s(a,c){a instanceof String&&(a+="");var d=0,y=!1,P={next:function(){if(!y&&d<a.length){var O=d++;return{value:c(O,a[O]),done:!1}}return y=!0,{done:!0,value:void 0}}};return P[Symbol.iterator]=function(){return P},P}i("Array.prototype.values",function(a){return a||function(){return s(this,function(c,d){return d})}});/** @license 1444 1445 Copyright The Closure Library Authors. 1446 SPDX-License-Identifier: Apache-2.0 1447*/var o=o||{},l=this||self;function u(a){var c=typeof a;return c=c!="object"?c:a?Array.isArray(a)?"array":c:"null",c=="array"||c=="object"&&typeof a.length=="number"}function h(a){var c=typeof a;return c=="object"&&a!=null||c=="function"}function p(a,c,d){return a.call.apply(a.bind,arguments)}function m(a,c,d){if(!a)throw Error();if(2<arguments.length){var y=Array.prototype.slice.call(arguments,2);return function(){var P=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(P,y),a.apply(c,P)}}return function(){return a.apply(c,arguments)}}function g(a,c,d){return g=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?p:m,g.apply(null,arguments)}function A(a,c){var d=Array.prototype.slice.call(arguments,1);return function(){var y=d.slice();return y.push.apply(y,arguments),a.apply(this,y)}}function C(a,c){function d(){}d.prototype=c.prototype,a.aa=c.prototype,a.prototype=new d,a.prototype.constructor=a,a.Qb=function(y,P,O){for(var z=Array(arguments.length-2),he=2;he<arguments.length;he++)z[he-2]=arguments[he];return c.prototype[P].apply(y,z)}}function N(a){const c=a.length;if(0<c){const d=Array(c);for(let y=0;y<c;y++)d[y]=a[y];return d}return[]}function R(a,c){for(let d=1;d<arguments.length;d++){const y=arguments[d];if(u(y)){const P=a.length||0,O=y.length||0;a.length=P+O;for(let z=0;z<O;z++)a[P+z]=y[z]}else a.push(y)}}class w{constructor(c,d){this.i=c,this.j=d,this.h=0,this.g=null}get(){let c;return 0<this.h?(this.h--,c=this.g,this.g=c.next,c.next=null):c=this.i(),c}}function _(a){return/^[\s\xa0]*$/.test(a)}function E(){var a=l.navigator;return a&&(a=a.userAgent)?a:""}function D(a){return D[" "](a),a}D[" "]=function(){};var j=E().indexOf("Gecko")!=-1&&!(E().toLowerCase().indexOf("webkit")!=-1&&E().indexOf("Edge")==-1)&&!(E().indexOf("Trident")!=-1||E().indexOf("MSIE")!=-1)&&E().indexOf("Edge")==-1;function U(a,c,d){for(const y in a)c.call(d,a[y],y,a)}function T(a,c){for(const d in a)c.call(void 0,a[d],d,a)}function v(a){const c={};for(const d in a)c[d]=a[d];return c}const I="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function x(a,c){let d,y;for(let P=1;P<arguments.length;P++){y=arguments[P];for(d in y)a[d]=y[d];for(let O=0;O<I.length;O++)d=I[O],Object.prototype.hasOwnProperty.call(y,d)&&(a[d]=y[d])}}function k(a){var c=1;a=a.split(":");const d=[];for(;0<c&&a.length;)d.push(a.shift()),c--;return a.length&&d.push(a.join(":")),d}function b(a){l.setTimeout(()=>{throw a},0)}function S(){var a=Q;let c=null;return a.g&&(c=a.g,a.g=a.g.next,a.g||(a.h=null),c.next=null),c}class At{constructor(){this.h=this.g=null}add(c,d){const y=Er.get();y.set(c,d),this.h?this.h.next=y:this.g=y,this.h=y}}var Er=new w(()=>new os,a=>a.reset());class os{constructor(){this.next=this.g=this.h=null}set(c,d){this.h=c,this.g=d,this.next=null}reset(){this.next=this.g=this.h=null}}let on,B=!1,Q=new At,J=()=>{const a=l.Promise.resolve(void 0);on=()=>{a.then(ve)}};var ve=()=>{for(var a;a=S();){try{a.h.call(a.g)}catch(d){b(d)}var c=Er;c.j(a),100>c.h&&(c.h++,a.next=c.g,c.g=a)}B=!1};function ce(){this.s=this.s,this.C=this.C}ce.prototype.s=!1,ce.prototype.ma=function(){this.s||(this.s=!0,this.N())},ce.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function Ae(a,c){this.type=a,this.g=this.target=c,this.defaultPrevented=!1}Ae.prototype.h=function(){this.defaultPrevented=!0};var an=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var a=!1,c=Object.defineProperty({},"passive",{get:function(){a=!0}});try{const d=()=>{};l.addEventListener("test",d,c),l.removeEventListener("test",d,c)}catch{}return a}();function ln(a,c){if(Ae.call(this,a?a.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,a){var d=this.type=a.type,y=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;if(this.target=a.target||a.srcElement,this.g=c,c=a.relatedTarget){if(j){e:{try{D(c.nodeName);var P=!0;break e}catch{}P=!1}P||(c=null)}}else d=="mouseover"?c=a.fromElement:d=="mouseout"&&(c=a.toElement);this.relatedTarget=c,y?(this.clientX=y.clientX!==void 0?y.clientX:y.pageX,this.clientY=y.clientY!==void 0?y.clientY:y.pageY,this.screenX=y.screenX||0,this.screenY=y.screenY||0):(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!==void 0?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0),this.button=a.button,this.key=a.key||"",this.ctrlKey=a.ctrlKey,this.altKey=a.altKey,this.shiftKey=a.shiftKey,this.metaKey=a.metaKey,this.pointerId=a.pointerId||0,this.pointerType=typeof a.pointerType=="string"?a.pointerType:un[a.pointerType]||"",this.state=a.state,this.i=a,a.defaultPrevented&&ln.aa.h.call(this)}}C(ln,Ae);var un={2:"touch",3:"pen",4:"mouse"};ln.prototype.h=function(){ln.aa.h.call(this);var a=this.i;a.preventDefault?a.preventDefault():a.returnValue=!1};var cn="closure_listenable_"+(1e6*Math.random()|0),WE=0;function HE(a,c,d,y,P){this.listener=a,this.proxy=null,this.src=c,this.type=d,this.capture=!!y,this.ha=P,this.key=++WE,this.da=this.fa=!1}function ea(a){a.da=!0,a.listener=null,a.proxy=null,a.src=null,a.ha=null}function ta(a){this.src=a,this.g={},this.h=0}ta.prototype.add=function(a,c,d,y,P){var O=a.toString();a=this.g[O],a||(a=this.g[O]=[],this.h++);var z=Vu(a,c,y,P);return-1<z?(c=a[z],d||(c.fa=!1)):(c=new HE(c,this.src,O,!!y,P),c.fa=d,a.push(c)),c};function Ou(a,c){var d=c.type;if(d in a.g){var y=a.g[d],P=Array.prototype.indexOf.call(y,c,void 0),O;(O=0<=P)&&Array.prototype.splice.call(y,P,1),O&&(ea(c),a.g[d].length==0&&(delete a.g[d],a.h--))}}function Vu(a,c,d,y){for(var P=0;P<a.length;++P){var O=a[P];if(!O.da&&O.listener==c&&O.capture==!!d&&O.ha==y)return P}return-1}var Lu="closure_lm_"+(1e6*Math.random()|0),ju={};function gp(a,c,d,y,P){if(Array.isArray(c)){for(var O=0;O<c.length;O++)gp(a,c[O],d,y,P);return null}return d=_p(d),a&&a[cn]?a.K(c,d,h(y)?!!y.capture:!1,P):GE(a,c,d,!1,y,P)}function GE(a,c,d,y,P,O){if(!c)throw Error("Invalid event type");var z=h(P)?!!P.capture:!!P,he=Fu(a);if(he||(a[Lu]=he=new ta(a)),d=he.add(c,d,y,z,O),d.proxy)return d;if(y=KE(),d.proxy=y,y.src=a,y.listener=d,a.addEventListener)an||(P=z),P===void 0&&(P=!1),a.addEventListener(c.toString(),y,P);else if(a.attachEvent)a.attachEvent(vp(c.toString()),y);else if(a.addListener&&a.removeListener)a.addListener(y);else throw Error("addEventListener and attachEvent are unavailable.");return d}function KE(){function a(d){return c.call(a.src,a.listener,d)}const c=QE;return a}function yp(a,c,d,y,P){if(Array.isArray(c))for(var O=0;O<c.length;O++)yp(a,c[O],d,y,P);else y=h(y)?!!y.capture:!!y,d=_p(d),a&&a[cn]?(a=a.i,c=String(c).toString(),c in a.g&&(O=a.g[c],d=Vu(O,d,y,P),-1<d&&(ea(O[d]),Array.prototype.splice.call(O,d,1),O.length==0&&(delete a.g[c],a.h--)))):a&&(a=Fu(a))&&(c=a.g[c.toString()],a=-1,c&&(a=Vu(c,d,y,P)),(d=-1<a?c[a]:null)&&Mu(d))}function Mu(a){if(typeof a!="number"&&a&&!a.da){var c=a.src;if(c&&c[cn])Ou(c.i,a);else{var d=a.type,y=a.proxy;c.removeEventListener?c.removeEventListener(d,y,a.capture):c.detachEvent?c.detachEvent(vp(d),y):c.addListener&&c.removeListener&&c.removeListener(y),(d=Fu(c))?(Ou(d,a),d.h==0&&(d.src=null,c[Lu]=null)):ea(a)}}}function vp(a){return a in ju?ju[a]:ju[a]="on"+a}function QE(a,c){if(a.da)a=!0;else{c=new ln(c,this);var d=a.listener,y=a.ha||a.src;a.fa&&Mu(a),a=d.call(y,c)}return a}function Fu(a){return a=a[Lu],a instanceof ta?a:null}var Uu="__closure_events_fn_"+(1e9*Math.random()>>>0);function _p(a){return typeof a=="function"?a:(a[Uu]||(a[Uu]=function(c){return a.handleEvent(c)}),a[Uu])}function He(){ce.call(this),this.i=new ta(this),this.M=this,this.F=null}C(He,ce),He.prototype[cn]=!0,He.prototype.removeEventListener=function(a,c,d,y){yp(this,a,c,d,y)};function it(a,c){var d,y=a.F;if(y)for(d=[];y;y=y.F)d.push(y);if(a=a.M,y=c.type||c,typeof c=="string")c=new Ae(c,a);else if(c instanceof Ae)c.target=c.target||a;else{var P=c;c=new Ae(y,a),x(c,P)}if(P=!0,d)for(var O=d.length-1;0<=O;O--){var z=c.g=d[O];P=na(z,y,!0,c)&&P}if(z=c.g=a,P=na(z,y,!0,c)&&P,P=na(z,y,!1,c)&&P,d)for(O=0;O<d.length;O++)z=c.g=d[O],P=na(z,y,!1,c)&&P}He.prototype.N=function(){if(He.aa.N.call(this),this.i){var a=this.i,c;for(c in a.g){for(var d=a.g[c],y=0;y<d.length;y++)ea(d[y]);delete a.g[c],a.h--}}this.F=null},He.prototype.K=function(a,c,d,y){return this.i.add(String(a),c,!1,d,y)},He.prototype.L=function(a,c,d,y){return this.i.add(String(a),c,!0,d,y)};function na(a,c,d,y){if(c=a.i.g[String(c)],!c)return!0;c=c.concat();for(var P=!0,O=0;O<c.length;++O){var z=c[O];if(z&&!z.da&&z.capture==d){var he=z.listener,Me=z.ha||z.src;z.fa&&Ou(a.i,z),P=he.call(Me,y)!==!1&&P}}return P&&!y.defaultPrevented}function wp(a,c,d){if(typeof a=="function")d&&(a=g(a,d));else if(a&&typeof a.handleEvent=="function")a=g(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(c)?-1:l.setTimeout(a,c||0)}function Ep(a){a.g=wp(()=>{a.g=null,a.i&&(a.i=!1,Ep(a))},a.l);const c=a.h;a.h=null,a.m.apply(null,c)}class YE extends ce{constructor(c,d){super(),this.m=c,this.l=d,this.h=null,this.i=!1,this.g=null}j(c){this.h=arguments,this.g?this.i=!0:Ep(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function as(a){ce.call(this),this.h=a,this.g={}}C(as,ce);var Tp=[];function Ip(a){U(a.g,function(c,d){this.g.hasOwnProperty(d)&&Mu(c)},a),a.g={}}as.prototype.N=function(){as.aa.N.call(this),Ip(this)},as.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var zu=l.JSON.stringify,XE=l.JSON.parse,JE=class{stringify(a){return l.JSON.stringify(a,void 0)}parse(a){return l.JSON.parse(a,void 0)}};function Bu(){}Bu.prototype.h=null;function xp(a){return a.h||(a.h=a.i())}function Sp(){}var ls={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function $u(){Ae.call(this,"d")}C($u,Ae);function qu(){Ae.call(this,"c")}C(qu,Ae);var Tr={},Ap=null;function ra(){return Ap=Ap||new He}Tr.La="serverreachability";function kp(a){Ae.call(this,Tr.La,a)}C(kp,Ae);function us(a){const c=ra();it(c,new kp(c))}Tr.STAT_EVENT="statevent";function Cp(a,c){Ae.call(this,Tr.STAT_EVENT,a),this.stat=c}C(Cp,Ae);function st(a){const c=ra();it(c,new Cp(c,a))}Tr.Ma="timingevent";function Rp(a,c){Ae.call(this,Tr.Ma,a),this.size=c}C(Rp,Ae);function cs(a,c){if(typeof a!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},c)}function hs(){this.g=!0}hs.prototype.xa=function(){this.g=!1};function ZE(a,c,d,y,P,O){a.info(function(){if(a.g)if(O)for(var z="",he=O.split("&"),Me=0;Me<he.length;Me++){var ie=he[Me].split("=");if(1<ie.length){var Ge=ie[0];ie=ie[1];var Ke=Ge.split("_");z=2<=Ke.length&&Ke[1]=="type"?z+(Ge+"="+ie+"&"):z+(Ge+"=redacted&")}}else z=null;else z=O;return"XMLHTTP REQ ("+y+") [attempt "+P+"]: "+c+` 1448`+d+` 1449`+z})}function eT(a,c,d,y,P,O,z){a.info(function(){return"XMLHTTP RESP ("+y+") [ attempt "+P+"]: "+c+` 1450`+d+` 1451`+O+" "+z})}function ni(a,c,d,y){a.info(function(){return"XMLHTTP TEXT ("+c+"): "+nT(a,d)+(y?" "+y:"")})}function tT(a,c){a.info(function(){return"TIMEOUT: "+c})}hs.prototype.info=function(){};function nT(a,c){if(!a.g)return c;if(!c)return null;try{var d=JSON.parse(c);if(d){for(a=0;a<d.length;a++)if(Array.isArray(d[a])){var y=d[a];if(!(2>y.length)){var P=y[1];if(Array.isArray(P)&&!(1>P.length)){var O=P[0];if(O!="noop"&&O!="stop"&&O!="close")for(var z=1;z<P.length;z++)P[z]=""}}}}return zu(d)}catch{return c}}var ia={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Pp={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Wu;function sa(){}C(sa,Bu),sa.prototype.g=function(){return new XMLHttpRequest},sa.prototype.i=function(){return{}},Wu=new sa;function Vn(a,c,d,y){this.j=a,this.i=c,this.l=d,this.R=y||1,this.U=new as(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new Np}function Np(){this.i=null,this.g="",this.h=!1}var bp={},Hu={};function Gu(a,c,d){a.L=1,a.v=ua(hn(c)),a.m=d,a.P=!0,Dp(a,null)}function Dp(a,c){a.F=Date.now(),oa(a),a.A=hn(a.v);var d=a.A,y=a.R;Array.isArray(y)||(y=[String(y)]),Gp(d.i,"t",y),a.C=0,d=a.j.J,a.h=new Np,a.g=hm(a.j,d?c:null,!a.m),0<a.O&&(a.M=new YE(g(a.Y,a,a.g),a.O)),c=a.U,d=a.g,y=a.ca;var P="readystatechange";Array.isArray(P)||(P&&(Tp[0]=P.toString()),P=Tp);for(var O=0;O<P.length;O++){var z=gp(d,P[O],y||c.handleEvent,!1,c.h||c);if(!z)break;c.g[z.key]=z}c=a.H?v(a.H):{},a.m?(a.u||(a.u="POST"),c["Content-Type"]="application/x-www-form-urlencoded",a.g.ea(a.A,a.u,a.m,c)):(a.u="GET",a.g.ea(a.A,a.u,null,c)),us(),ZE(a.i,a.u,a.A,a.l,a.R,a.m)}Vn.prototype.ca=function(a){a=a.target;const c=this.M;c&&dn(a)==3?c.j():this.Y(a)},Vn.prototype.Y=function(a){try{if(a==this.g)e:{const Ke=dn(this.g);var c=this.g.Ba();const si=this.g.Z();if(!(3>Ke)&&(Ke!=3||this.g&&(this.h.h||this.g.oa()||em(this.g)))){this.J||Ke!=4||c==7||(c==8||0>=si?us(3):us(2)),Ku(this);var d=this.g.Z();this.X=d;t:if(Op(this)){var y=em(this.g);a="";var P=y.length,O=dn(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){Ir(this),ds(this);var z="";break t}this.h.i=new l.TextDecoder}for(c=0;c<P;c++)this.h.h=!0,a+=this.h.i.decode(y[c],{stream:!(O&&c==P-1)});y.length=0,this.h.g+=a,this.C=0,z=this.h.g}else z=this.g.oa();if(this.o=d==200,eT(this.i,this.u,this.A,this.l,this.R,Ke,d),this.o){if(this.T&&!this.K){t:{if(this.g){var he,Me=this.g;if((he=Me.g?Me.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!_(he)){var ie=he;break t}}ie=null}if(d=ie)ni(this.i,this.l,d,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,Qu(this,d);else{this.o=!1,this.s=3,st(12),Ir(this),ds(this);break e}}if(this.P){d=!0;let Dt;for(;!this.J&&this.C<z.length;)if(Dt=rT(this,z),Dt==Hu){Ke==4&&(this.s=4,st(14),d=!1),ni(this.i,this.l,null,"[Incomplete Response]");break}else if(Dt==bp){this.s=4,st(15),ni(this.i,this.l,z,"[Invalid Chunk]"),d=!1;break}else ni(this.i,this.l,Dt,null),Qu(this,Dt);if(Op(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),Ke!=4||z.length!=0||this.h.h||(this.s=1,st(16),d=!1),this.o=this.o&&d,!d)ni(this.i,this.l,z,"[Invalid Chunked Response]"),Ir(this),ds(this);else if(0<z.length&&!this.W){this.W=!0;var Ge=this.j;Ge.g==this&&Ge.ba&&!Ge.M&&(Ge.j.info("Great, no buffering proxy detected. Bytes received: "+z.length),tc(Ge),Ge.M=!0,st(11))}}else ni(this.i,this.l,z,null),Qu(this,z);Ke==4&&Ir(this),this.o&&!this.J&&(Ke==4?am(this.j,this):(this.o=!1,oa(this)))}else wT(this.g),d==400&&0<z.indexOf("Unknown SID")?(this.s=3,st(12)):(this.s=0,st(13)),Ir(this),ds(this)}}}catch{}finally{}};function Op(a){return a.g?a.u=="GET"&&a.L!=2&&a.j.Ca:!1}function rT(a,c){var d=a.C,y=c.indexOf(` 1452`,d);return y==-1?Hu:(d=Number(c.substring(d,y)),isNaN(d)?bp:(y+=1,y+d>c.length?Hu:(c=c.slice(y,y+d),a.C=y+d,c)))}Vn.prototype.cancel=function(){this.J=!0,Ir(this)};function oa(a){a.S=Date.now()+a.I,Vp(a,a.I)}function Vp(a,c){if(a.B!=null)throw Error("WatchDog timer not null");a.B=cs(g(a.ba,a),c)}function Ku(a){a.B&&(l.clearTimeout(a.B),a.B=null)}Vn.prototype.ba=function(){this.B=null;const a=Date.now();0<=a-this.S?(tT(this.i,this.A),this.L!=2&&(us(),st(17)),Ir(this),this.s=2,ds(this)):Vp(this,this.S-a)};function ds(a){a.j.G==0||a.J||am(a.j,a)}function Ir(a){Ku(a);var c=a.M;c&&typeof c.ma=="function"&&c.ma(),a.M=null,Ip(a.U),a.g&&(c=a.g,a.g=null,c.abort(),c.ma())}function Qu(a,c){try{var d=a.j;if(d.G!=0&&(d.g==a||Yu(d.h,a))){if(!a.K&&Yu(d.h,a)&&d.G==3){try{var y=d.Da.g.parse(c)}catch{y=null}if(Array.isArray(y)&&y.length==3){var P=y;if(P[0]==0){e:if(!d.u){if(d.g)if(d.g.F+3e3<a.F)ma(d),fa(d);else break e;ec(d),st(18)}}else d.za=P[1],0<d.za-d.T&&37500>P[2]&&d.F&&d.v==0&&!d.C&&(d.C=cs(g(d.Za,d),6e3));if(1>=Mp(d.h)&&d.ca){try{d.ca()}catch{}d.ca=void 0}}else Sr(d,11)}else if((a.K||d.g==a)&&ma(d),!_(c))for(P=d.Da.g.parse(c),c=0;c<P.length;c++){let ie=P[c];if(d.T=ie[0],ie=ie[1],d.G==2)if(ie[0]=="c"){d.K=ie[1],d.ia=ie[2];const Ge=ie[3];Ge!=null&&(d.la=Ge,d.j.info("VER="+d.la));const Ke=ie[4];Ke!=null&&(d.Aa=Ke,d.j.info("SVER="+d.Aa));const si=ie[5];si!=null&&typeof si=="number"&&0<si&&(y=1.5*si,d.L=y,d.j.info("backChannelRequestTimeoutMs_="+y)),y=d;const Dt=a.g;if(Dt){const ya=Dt.g?Dt.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(ya){var O=y.h;O.g||ya.indexOf("spdy")==-1&&ya.indexOf("quic")==-1&&ya.indexOf("h2")==-1||(O.j=O.l,O.g=new Set,O.h&&(Xu(O,O.h),O.h=null))}if(y.D){const nc=Dt.g?Dt.g.getResponseHeader("X-HTTP-Session-Id"):null;nc&&(y.ya=nc,fe(y.I,y.D,nc))}}d.G=3,d.l&&d.l.ua(),d.ba&&(d.R=Date.now()-a.F,d.j.info("Handshake RTT: "+d.R+"ms")),y=d;var z=a;if(y.qa=cm(y,y.J?y.ia:null,y.W),z.K){Fp(y.h,z);var he=z,Me=y.L;Me&&(he.I=Me),he.B&&(Ku(he),oa(he)),y.g=z}else sm(y);0<d.i.length&&pa(d)}else ie[0]!="stop"&&ie[0]!="close"||Sr(d,7);else d.G==3&&(ie[0]=="stop"||ie[0]=="close"?ie[0]=="stop"?Sr(d,7):Zu(d):ie[0]!="noop"&&d.l&&d.l.ta(ie),d.v=0)}}us(4)}catch{}}var iT=class{constructor(a,c){this.g=a,this.map=c}};function Lp(a){this.l=a||10,l.PerformanceNavigationTiming?(a=l.performance.getEntriesByType("navigation"),a=0<a.length&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=a?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function jp(a){return a.h?!0:a.g?a.g.size>=a.j:!1}function Mp(a){return a.h?1:a.g?a.g.size:0}function Yu(a,c){return a.h?a.h==c:a.g?a.g.has(c):!1}function Xu(a,c){a.g?a.g.add(c):a.h=c}function Fp(a,c){a.h&&a.h==c?a.h=null:a.g&&a.g.has(c)&&a.g.delete(c)}Lp.prototype.cancel=function(){if(this.i=Up(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const a of this.g.values())a.cancel();this.g.clear()}};function Up(a){if(a.h!=null)return a.i.concat(a.h.D);if(a.g!=null&&a.g.size!==0){let c=a.i;for(const d of a.g.values())c=c.concat(d.D);return c}return N(a.i)}function sT(a){if(a.V&&typeof a.V=="function")return a.V();if(typeof Map<"u"&&a instanceof Map||typeof Set<"u"&&a instanceof Set)return Array.from(a.values());if(typeof a=="string")return a.split("");if(u(a)){for(var c=[],d=a.length,y=0;y<d;y++)c.push(a[y]);return c}c=[],d=0;for(y in a)c[d++]=a[y];return c}function oT(a){if(a.na&&typeof a.na=="function")return a.na();if(!a.V||typeof a.V!="function"){if(typeof Map<"u"&&a instanceof Map)return Array.from(a.keys());if(!(typeof Set<"u"&&a instanceof Set)){if(u(a)||typeof a=="string"){var c=[];a=a.length;for(var d=0;d<a;d++)c.push(d);return c}c=[],d=0;for(const y in a)c[d++]=y;return c}}}function zp(a,c){if(a.forEach&&typeof a.forEach=="function")a.forEach(c,void 0);else if(u(a)||typeof a=="string")Array.prototype.forEach.call(a,c,void 0);else for(var d=oT(a),y=sT(a),P=y.length,O=0;O<P;O++)c.call(void 0,y[O],d&&d[O],a)}var Bp=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function aT(a,c){if(a){a=a.split("&");for(var d=0;d<a.length;d++){var y=a[d].indexOf("="),P=null;if(0<=y){var O=a[d].substring(0,y);P=a[d].substring(y+1)}else O=a[d];c(O,P?decodeURIComponent(P.replace(/\+/g," ")):"")}}}function xr(a){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,a instanceof xr){this.h=a.h,aa(this,a.j),this.o=a.o,this.g=a.g,la(this,a.s),this.l=a.l;var c=a.i,d=new ms;d.i=c.i,c.g&&(d.g=new Map(c.g),d.h=c.h),$p(this,d),this.m=a.m}else a&&(c=String(a).match(Bp))?(this.h=!1,aa(this,c[1]||"",!0),this.o=fs(c[2]||""),this.g=fs(c[3]||"",!0),la(this,c[4]),this.l=fs(c[5]||"",!0),$p(this,c[6]||"",!0),this.m=fs(c[7]||"")):(this.h=!1,this.i=new ms(null,this.h))}xr.prototype.toString=function(){var a=[],c=this.j;c&&a.push(ps(c,qp,!0),":");var d=this.g;return(d||c=="file")&&(a.push("//"),(c=this.o)&&a.push(ps(c,qp,!0),"@"),a.push(encodeURIComponent(String(d)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),d=this.s,d!=null&&a.push(":",String(d))),(d=this.l)&&(this.g&&d.charAt(0)!="/"&&a.push("/"),a.push(ps(d,d.charAt(0)=="/"?cT:uT,!0))),(d=this.i.toString())&&a.push("?",d),(d=this.m)&&a.push("#",ps(d,dT)),a.join("")};function hn(a){return new xr(a)}function aa(a,c,d){a.j=d?fs(c,!0):c,a.j&&(a.j=a.j.replace(/:$/,""))}function la(a,c){if(c){if(c=Number(c),isNaN(c)||0>c)throw Error("Bad port number "+c);a.s=c}else a.s=null}function $p(a,c,d){c instanceof ms?(a.i=c,fT(a.i,a.h)):(d||(c=ps(c,hT)),a.i=new ms(c,a.h))}function fe(a,c,d){a.i.set(c,d)}function ua(a){return fe(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),a}function fs(a,c){return a?c?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function ps(a,c,d){return typeof a=="string"?(a=encodeURI(a).replace(c,lT),d&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function lT(a){return a=a.charCodeAt(0),"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var qp=/[#\/\?@]/g,uT=/[#\?:]/g,cT=/[#\?]/g,hT=/[#\?@]/g,dT=/#/g;function ms(a,c){this.h=this.g=null,this.i=a||null,this.j=!!c}function Ln(a){a.g||(a.g=new Map,a.h=0,a.i&&aT(a.i,function(c,d){a.add(decodeURIComponent(c.replace(/\+/g," ")),d)}))}t=ms.prototype,t.add=function(a,c){Ln(this),this.i=null,a=ri(this,a);var d=this.g.get(a);return d||this.g.set(a,d=[]),d.push(c),this.h+=1,this};function Wp(a,c){Ln(a),c=ri(a,c),a.g.has(c)&&(a.i=null,a.h-=a.g.get(c).length,a.g.delete(c))}function Hp(a,c){return Ln(a),c=ri(a,c),a.g.has(c)}t.forEach=function(a,c){Ln(this),this.g.forEach(function(d,y){d.forEach(function(P){a.call(c,P,y,this)},this)},this)},t.na=function(){Ln(this);const a=Array.from(this.g.values()),c=Array.from(this.g.keys()),d=[];for(let y=0;y<c.length;y++){const P=a[y];for(let O=0;O<P.length;O++)d.push(c[y])}return d},t.V=function(a){Ln(this);let c=[];if(typeof a=="string")Hp(this,a)&&(c=c.concat(this.g.get(ri(this,a))));else{a=Array.from(this.g.values());for(let d=0;d<a.length;d++)c=c.concat(a[d])}return c},t.set=function(a,c){return Ln(this),this.i=null,a=ri(this,a),Hp(this,a)&&(this.h-=this.g.get(a).length),this.g.set(a,[c]),this.h+=1,this},t.get=function(a,c){return a?(a=this.V(a),0<a.length?String(a[0]):c):c};function Gp(a,c,d){Wp(a,c),0<d.length&&(a.i=null,a.g.set(ri(a,c),N(d)),a.h+=d.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const a=[],c=Array.from(this.g.keys());for(var d=0;d<c.length;d++){var y=c[d];const O=encodeURIComponent(String(y)),z=this.V(y);for(y=0;y<z.length;y++){var P=O;z[y]!==""&&(P+="="+encodeURIComponent(String(z[y]))),a.push(P)}}return this.i=a.join("&")};function ri(a,c){return c=String(c),a.j&&(c=c.toLowerCase()),c}function fT(a,c){c&&!a.j&&(Ln(a),a.i=null,a.g.forEach(function(d,y){var P=y.toLowerCase();y!=P&&(Wp(this,y),Gp(this,P,d))},a)),a.j=c}function pT(a,c){const d=new hs;if(l.Image){const y=new Image;y.onload=A(jn,d,"TestLoadImage: loaded",!0,c,y),y.onerror=A(jn,d,"TestLoadImage: error",!1,c,y),y.onabort=A(jn,d,"TestLoadImage: abort",!1,c,y),y.ontimeout=A(jn,d,"TestLoadImage: timeout",!1,c,y),l.setTimeout(function(){y.ontimeout&&y.ontimeout()},1e4),y.src=a}else c(!1)}function mT(a,c){const d=new hs,y=new AbortController,P=setTimeout(()=>{y.abort(),jn(d,"TestPingServer: timeout",!1,c)},1e4);fetch(a,{signal:y.signal}).then(O=>{clearTimeout(P),O.ok?jn(d,"TestPingServer: ok",!0,c):jn(d,"TestPingServer: server error",!1,c)}).catch(()=>{clearTimeout(P),jn(d,"TestPingServer: error",!1,c)})}function jn(a,c,d,y,P){try{P&&(P.onload=null,P.onerror=null,P.onabort=null,P.ontimeout=null),y(d)}catch{}}function gT(){this.g=new JE}function yT(a,c,d){const y=d||"";try{zp(a,function(P,O){let z=P;h(P)&&(z=zu(P)),c.push(y+O+"="+encodeURIComponent(z))})}catch(P){throw c.push(y+"type="+encodeURIComponent("_badmap")),P}}function ca(a){this.l=a.Ub||null,this.j=a.eb||!1}C(ca,Bu),ca.prototype.g=function(){return new ha(this.l,this.j)},ca.prototype.i=function(a){return function(){return a}}({});function ha(a,c){He.call(this),this.D=a,this.o=c,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}C(ha,He),t=ha.prototype,t.open=function(a,c){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=a,this.A=c,this.readyState=1,ys(this)},t.send=function(a){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const c={headers:this.u,method:this.B,credentials:this.m,cache:void 0};a&&(c.body=a),(this.D||l).fetch(new Request(this.A,c)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,gs(this)),this.readyState=0},t.Sa=function(a){if(this.g&&(this.l=a,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=a.headers,this.readyState=2,ys(this)),this.g&&(this.readyState=3,ys(this),this.g)))if(this.responseType==="arraybuffer")a.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in a){if(this.j=a.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;Kp(this)}else a.text().then(this.Ra.bind(this),this.ga.bind(this))};function Kp(a){a.j.read().then(a.Pa.bind(a)).catch(a.ga.bind(a))}t.Pa=function(a){if(this.g){if(this.o&&a.value)this.response.push(a.value);else if(!this.o){var c=a.value?a.value:new Uint8Array(0);(c=this.v.decode(c,{stream:!a.done}))&&(this.response=this.responseText+=c)}a.done?gs(this):ys(this),this.readyState==3&&Kp(this)}},t.Ra=function(a){this.g&&(this.response=this.responseText=a,gs(this))},t.Qa=function(a){this.g&&(this.response=a,gs(this))},t.ga=function(){this.g&&gs(this)};function gs(a){a.readyState=4,a.l=null,a.j=null,a.v=null,ys(a)}t.setRequestHeader=function(a,c){this.u.append(a,c)},t.getResponseHeader=function(a){return this.h&&this.h.get(a.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const a=[],c=this.h.entries();for(var d=c.next();!d.done;)d=d.value,a.push(d[0]+": "+d[1]),d=c.next();return a.join(`\r 1453`)};function ys(a){a.onreadystatechange&&a.onreadystatechange.call(a)}Object.defineProperty(ha.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(a){this.m=a?"include":"same-origin"}});function Qp(a){let c="";return U(a,function(d,y){c+=y,c+=":",c+=d,c+=`\r 1454`}),c}function Ju(a,c,d){e:{for(y in d){var y=!1;break e}y=!0}y||(d=Qp(d),typeof a=="string"?d!=null&&encodeURIComponent(String(d)):fe(a,c,d))}function xe(a){He.call(this),this.headers=new Map,this.o=a||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}C(xe,He);var vT=/^https?$/i,_T=["POST","PUT"];t=xe.prototype,t.Ha=function(a){this.J=a},t.ea=function(a,c,d,y){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+a);c=c?c.toUpperCase():"GET",this.D=a,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Wu.g(),this.v=this.o?xp(this.o):xp(Wu),this.g.onreadystatechange=g(this.Ea,this);try{this.B=!0,this.g.open(c,String(a),!0),this.B=!1}catch(O){Yp(this,O);return}if(a=d||"",d=new Map(this.headers),y)if(Object.getPrototypeOf(y)===Object.prototype)for(var P in y)d.set(P,y[P]);else if(typeof y.keys=="function"&&typeof y.get=="function")for(const O of y.keys())d.set(O,y.get(O));else throw Error("Unknown input type for opt_headers: "+String(y));y=Array.from(d.keys()).find(O=>O.toLowerCase()=="content-type"),P=l.FormData&&a instanceof l.FormData,!(0<=Array.prototype.indexOf.call(_T,c,void 0))||y||P||d.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[O,z]of d)this.g.setRequestHeader(O,z);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{Zp(this),this.u=!0,this.g.send(a),this.u=!1}catch(O){Yp(this,O)}};function Yp(a,c){a.h=!1,a.g&&(a.j=!0,a.g.abort(),a.j=!1),a.l=c,a.m=5,Xp(a),da(a)}function Xp(a){a.A||(a.A=!0,it(a,"complete"),it(a,"error"))}t.abort=function(a){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=a||7,it(this,"complete"),it(this,"abort"),da(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),da(this,!0)),xe.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?Jp(this):this.bb())},t.bb=function(){Jp(this)};function Jp(a){if(a.h&&typeof o<"u"&&(!a.v[1]||dn(a)!=4||a.Z()!=2)){if(a.u&&dn(a)==4)wp(a.Ea,0,a);else if(it(a,"readystatechange"),dn(a)==4){a.h=!1;try{const z=a.Z();e:switch(z){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break e;default:c=!1}var d;if(!(d=c)){var y;if(y=z===0){var P=String(a.D).match(Bp)[1]||null;!P&&l.self&&l.self.location&&(P=l.self.location.protocol.slice(0,-1)),y=!vT.test(P?P.toLowerCase():"")}d=y}if(d)it(a,"complete"),it(a,"success");else{a.m=6;try{var O=2<dn(a)?a.g.statusText:""}catch{O=""}a.l=O+" ["+a.Z()+"]",Xp(a)}}finally{da(a)}}}}function da(a,c){if(a.g){Zp(a);const d=a.g,y=a.v[0]?()=>{}:null;a.g=null,a.v=null,c||it(a,"ready");try{d.onreadystatechange=y}catch{}}}function Zp(a){a.I&&(l.clearTimeout(a.I),a.I=null)}t.isActive=function(){return!!this.g};function dn(a){return a.g?a.g.readyState:0}t.Z=function(){try{return 2<dn(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(a){if(this.g){var c=this.g.responseText;return a&&c.indexOf(a)==0&&(c=c.substring(a.length)),XE(c)}};function em(a){try{if(!a.g)return null;if("response"in a.g)return a.g.response;switch(a.H){case"":case"text":return a.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in a.g)return a.g.mozResponseArrayBuffer}return null}catch{return null}}function wT(a){const c={};a=(a.g&&2<=dn(a)&&a.g.getAllResponseHeaders()||"").split(`\r 1455`);for(let y=0;y<a.length;y++){if(_(a[y]))continue;var d=k(a[y]);const P=d[0];if(d=d[1],typeof d!="string")continue;d=d.trim();const O=c[P]||[];c[P]=O,O.push(d)}T(c,function(y){return y.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function vs(a,c,d){return d&&d.internalChannelParams&&d.internalChannelParams[a]||c}function tm(a){this.Aa=0,this.i=[],this.j=new hs,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=vs("failFast",!1,a),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=vs("baseRetryDelayMs",5e3,a),this.cb=vs("retryDelaySeedMs",1e4,a),this.Wa=vs("forwardChannelMaxRetries",2,a),this.wa=vs("forwardChannelRequestTimeoutMs",2e4,a),this.pa=a&&a.xmlHttpFactory||void 0,this.Xa=a&&a.Tb||void 0,this.Ca=a&&a.useFetchStreams||!1,this.L=void 0,this.J=a&&a.supportsCrossDomainXhr||!1,this.K="",this.h=new Lp(a&&a.concurrentRequestLimit),this.Da=new gT,this.P=a&&a.fastHandshake||!1,this.O=a&&a.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=a&&a.Rb||!1,a&&a.xa&&this.j.xa(),a&&a.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&a&&a.detectBufferingProxy||!1,this.ja=void 0,a&&a.longPollingTimeout&&0<a.longPollingTimeout&&(this.ja=a.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=tm.prototype,t.la=8,t.G=1,t.connect=function(a,c,d,y){st(0),this.W=a,this.H=c||{},d&&y!==void 0&&(this.H.OSID=d,this.H.OAID=y),this.F=this.X,this.I=cm(this,null,this.W),pa(this)};function Zu(a){if(nm(a),a.G==3){var c=a.U++,d=hn(a.I);if(fe(d,"SID",a.K),fe(d,"RID",c),fe(d,"TYPE","terminate"),_s(a,d),c=new Vn(a,a.j,c),c.L=2,c.v=ua(hn(d)),d=!1,l.navigator&&l.navigator.sendBeacon)try{d=l.navigator.sendBeacon(c.v.toString(),"")}catch{}!d&&l.Image&&(new Image().src=c.v,d=!0),d||(c.g=hm(c.j,null),c.g.ea(c.v)),c.F=Date.now(),oa(c)}um(a)}function fa(a){a.g&&(tc(a),a.g.cancel(),a.g=null)}function nm(a){fa(a),a.u&&(l.clearTimeout(a.u),a.u=null),ma(a),a.h.cancel(),a.s&&(typeof a.s=="number"&&l.clearTimeout(a.s),a.s=null)}function pa(a){if(!jp(a.h)&&!a.s){a.s=!0;var c=a.Ga;on||J(),B||(on(),B=!0),Q.add(c,a),a.B=0}}function ET(a,c){return Mp(a.h)>=a.h.j-(a.s?1:0)?!1:a.s?(a.i=c.D.concat(a.i),!0):a.G==1||a.G==2||a.B>=(a.Va?0:a.Wa)?!1:(a.s=cs(g(a.Ga,a,c),lm(a,a.B)),a.B++,!0)}t.Ga=function(a){if(this.s)if(this.s=null,this.G==1){if(!a){this.U=Math.floor(1e5*Math.random()),a=this.U++;const P=new Vn(this,this.j,a);let O=this.o;if(this.S&&(O?(O=v(O),x(O,this.S)):O=this.S),this.m!==null||this.O||(P.H=O,O=null),this.P)e:{for(var c=0,d=0;d<this.i.length;d++){t:{var y=this.i[d];if("__data__"in y.map&&(y=y.map.__data__,typeof y=="string")){y=y.length;break t}y=void 0}if(y===void 0)break;if(c+=y,4096<c){c=d;break e}if(c===4096||d===this.i.length-1){c=d+1;break e}}c=1e3}else c=1e3;c=im(this,P,c),d=hn(this.I),fe(d,"RID",a),fe(d,"CVER",22),this.D&&fe(d,"X-HTTP-Session-Id",this.D),_s(this,d),O&&(this.O?c="headers="+encodeURIComponent(String(Qp(O)))+"&"+c:this.m&&Ju(d,this.m,O)),Xu(this.h,P),this.Ua&&fe(d,"TYPE","init"),this.P?(fe(d,"$req",c),fe(d,"SID","null"),P.T=!0,Gu(P,d,null)):Gu(P,d,c),this.G=2}}else this.G==3&&(a?rm(this,a):this.i.length==0||jp(this.h)||rm(this))};function rm(a,c){var d;c?d=c.l:d=a.U++;const y=hn(a.I);fe(y,"SID",a.K),fe(y,"RID",d),fe(y,"AID",a.T),_s(a,y),a.m&&a.o&&Ju(y,a.m,a.o),d=new Vn(a,a.j,d,a.B+1),a.m===null&&(d.H=a.o),c&&(a.i=c.D.concat(a.i)),c=im(a,d,1e3),d.I=Math.round(.5*a.wa)+Math.round(.5*a.wa*Math.random()),Xu(a.h,d),Gu(d,y,c)}function _s(a,c){a.H&&U(a.H,function(d,y){fe(c,y,d)}),a.l&&zp({},function(d,y){fe(c,y,d)})}function im(a,c,d){d=Math.min(a.i.length,d);var y=a.l?g(a.l.Na,a.l,a):null;e:{var P=a.i;let O=-1;for(;;){const z=["count="+d];O==-1?0<d?(O=P[0].g,z.push("ofs="+O)):O=0:z.push("ofs="+O);let he=!0;for(let Me=0;Me<d;Me++){let ie=P[Me].g;const Ge=P[Me].map;if(ie-=O,0>ie)O=Math.max(0,P[Me].g-100),he=!1;else try{yT(Ge,z,"req"+ie+"_")}catch{y&&y(Ge)}}if(he){y=z.join("&");break e}}}return a=a.i.splice(0,d),c.D=a,y}function sm(a){if(!a.g&&!a.u){a.Y=1;var c=a.Fa;on||J(),B||(on(),B=!0),Q.add(c,a),a.v=0}}function ec(a){return a.g||a.u||3<=a.v?!1:(a.Y++,a.u=cs(g(a.Fa,a),lm(a,a.v)),a.v++,!0)}t.Fa=function(){if(this.u=null,om(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var a=2*this.R;this.j.info("BP detection timer enabled: "+a),this.A=cs(g(this.ab,this),a)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,st(10),fa(this),om(this))};function tc(a){a.A!=null&&(l.clearTimeout(a.A),a.A=null)}function om(a){a.g=new Vn(a,a.j,"rpc",a.Y),a.m===null&&(a.g.H=a.o),a.g.O=0;var c=hn(a.qa);fe(c,"RID","rpc"),fe(c,"SID",a.K),fe(c,"AID",a.T),fe(c,"CI",a.F?"0":"1"),!a.F&&a.ja&&fe(c,"TO",a.ja),fe(c,"TYPE","xmlhttp"),_s(a,c),a.m&&a.o&&Ju(c,a.m,a.o),a.L&&(a.g.I=a.L);var d=a.g;a=a.ia,d.L=1,d.v=ua(hn(c)),d.m=null,d.P=!0,Dp(d,a)}t.Za=function(){this.C!=null&&(this.C=null,fa(this),ec(this),st(19))};function ma(a){a.C!=null&&(l.clearTimeout(a.C),a.C=null)}function am(a,c){var d=null;if(a.g==c){ma(a),tc(a),a.g=null;var y=2}else if(Yu(a.h,c))d=c.D,Fp(a.h,c),y=1;else return;if(a.G!=0){if(c.o)if(y==1){d=c.m?c.m.length:0,c=Date.now()-c.F;var P=a.B;y=ra(),it(y,new Rp(y,d)),pa(a)}else sm(a);else if(P=c.s,P==3||P==0&&0<c.X||!(y==1&&ET(a,c)||y==2&&ec(a)))switch(d&&0<d.length&&(c=a.h,c.i=c.i.concat(d)),P){case 1:Sr(a,5);break;case 4:Sr(a,10);break;case 3:Sr(a,6);break;default:Sr(a,2)}}}function lm(a,c){let d=a.Ta+Math.floor(Math.random()*a.cb);return a.isActive()||(d*=2),d*c}function Sr(a,c){if(a.j.info("Error code "+c),c==2){var d=g(a.fb,a),y=a.Xa;const P=!y;y=new xr(y||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||aa(y,"https"),ua(y),P?pT(y.toString(),d):mT(y.toString(),d)}else st(2);a.G=0,a.l&&a.l.sa(c),um(a),nm(a)}t.fb=function(a){a?(this.j.info("Successfully pinged google.com"),st(2)):(this.j.info("Failed to ping google.com"),st(1))};function um(a){if(a.G=0,a.ka=[],a.l){const c=Up(a.h);(c.length!=0||a.i.length!=0)&&(R(a.ka,c),R(a.ka,a.i),a.h.i.length=0,N(a.i),a.i.length=0),a.l.ra()}}function cm(a,c,d){var y=d instanceof xr?hn(d):new xr(d);if(y.g!="")c&&(y.g=c+"."+y.g),la(y,y.s);else{var P=l.location;y=P.protocol,c=c?c+"."+P.hostname:P.hostname,P=+P.port;var O=new xr(null);y&&aa(O,y),c&&(O.g=c),P&&la(O,P),d&&(O.l=d),y=O}return d=a.D,c=a.ya,d&&c&&fe(y,d,c),fe(y,"VER",a.la),_s(a,y),y}function hm(a,c,d){if(c&&!a.J)throw Error("Can't create secondary domain capable XhrIo object.");return c=a.Ca&&!a.pa?new xe(new ca({eb:d})):new xe(a.pa),c.Ha(a.J),c}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function dm(){}t=dm.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function ga(){}ga.prototype.g=function(a,c){return new vt(a,c)};function vt(a,c){He.call(this),this.g=new tm(c),this.l=a,this.h=c&&c.messageUrlParams||null,a=c&&c.messageHeaders||null,c&&c.clientProtocolHeaderRequired&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"}),this.g.o=a,a=c&&c.initMessageHeaders||null,c&&c.messageContentType&&(a?a["X-WebChannel-Content-Type"]=c.messageContentType:a={"X-WebChannel-Content-Type":c.messageContentType}),c&&c.va&&(a?a["X-WebChannel-Client-Profile"]=c.va:a={"X-WebChannel-Client-Profile":c.va}),this.g.S=a,(a=c&&c.Sb)&&!_(a)&&(this.g.m=a),this.v=c&&c.supportsCrossDomainXhr||!1,this.u=c&&c.sendRawJson||!1,(c=c&&c.httpSessionIdParam)&&!_(c)&&(this.g.D=c,a=this.h,a!==null&&c in a&&(a=this.h,c in a&&delete a[c])),this.j=new ii(this)}C(vt,He),vt.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},vt.prototype.close=function(){Zu(this.g)},vt.prototype.o=function(a){var c=this.g;if(typeof a=="string"){var d={};d.__data__=a,a=d}else this.u&&(d={},d.__data__=zu(a),a=d);c.i.push(new iT(c.Ya++,a)),c.G==3&&pa(c)},vt.prototype.N=function(){this.g.l=null,delete this.j,Zu(this.g),delete this.g,vt.aa.N.call(this)};function fm(a){$u.call(this),a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var c=a.__sm__;if(c){e:{for(const d in c){a=d;break e}a=void 0}(this.i=a)&&(a=this.i,c=c!==null&&a in c?c[a]:void 0),this.data=c}else this.data=a}C(fm,$u);function pm(){qu.call(this),this.status=1}C(pm,qu);function ii(a){this.g=a}C(ii,dm),ii.prototype.ua=function(){it(this.g,"a")},ii.prototype.ta=function(a){it(this.g,new fm(a))},ii.prototype.sa=function(a){it(this.g,new pm)},ii.prototype.ra=function(){it(this.g,"b")},ga.prototype.createWebChannel=ga.prototype.g,vt.prototype.send=vt.prototype.o,vt.prototype.open=vt.prototype.m,vt.prototype.close=vt.prototype.close,ww=function(){return new ga},_w=function(){return ra()},vw=Tr,Hh={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},ia.NO_ERROR=0,ia.TIMEOUT=8,ia.HTTP_ERROR=6,rl=ia,Pp.COMPLETE="complete",yw=Pp,Sp.EventType=ls,ls.OPEN="a",ls.CLOSE="b",ls.ERROR="c",ls.MESSAGE="d",He.prototype.listen=He.prototype.K,Os=Sp,xe.prototype.listenOnce=xe.prototype.L,xe.prototype.getLastError=xe.prototype.Ka,xe.prototype.getLastErrorCode=xe.prototype.Ba,xe.prototype.getStatus=xe.prototype.Z,xe.prototype.getResponseJson=xe.prototype.Oa,xe.prototype.getResponseText=xe.prototype.oa,xe.prototype.send=xe.prototype.ea,xe.prototype.setWithCredentials=xe.prototype.Ha,gw=xe}).apply(typeof La<"u"?La:typeof self<"u"?self:typeof window<"u"?window:{});
1455const ly="@firebase/firestore";/** 1456 * @license 1457 * Copyright 2017 Google LLC 1458 * 1459 * Licensed under the Apache License, Version 2.0 (the "License"); 1460 * you may not use this file except in compliance with the License. 1461 * You may obtain a copy of the License at 1462 * 1463 * http://www.apache.org/licenses/LICENSE-2.0 1464 * 1465 * Unless required by applicable law or agreed to in writing, software 1466 * distributed under the License is distributed on an "AS IS" BASIS, 1467 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1468 * See the License for the specific language governing permissions and 1469 * limitations under the License. 1470 */class Je{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}}Je.UNAUTHENTICATED=new Je(null),Je.GOOGLE_CREDENTIALS=new Je("google-credentials-uid"),Je.FIRST_PARTY=new Je("first-party-uid"),Je.MOCK_USER=new Je("mock-user");/** 1471 * @license 1472 * Copyright 2017 Google LLC 1473 * 1474 * Licensed under the Apache License, Version 2.0 (the "License"); 1475 * you may not use this file except in compliance with the License. 1476 * You may obtain a copy of the License at 1477 * 1478 * http://www.apache.org/licenses/LICENSE-2.0 1479 * 1480 * Unless required by applicable law or agreed to in writing, software 1481 * distributed under the License is distributed on an "AS IS" BASIS, 1482 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1483 * See the License for the specific language governing permissions and 1484 * limitations under the License. 1485 */let ns="10.14.0";/** 1486 * @license 1487 * Copyright 2017 Google LLC 1488 * 1489 * Licensed under the Apache License, Version 2.0 (the "License"); 1490 * you may not use this file except in compliance with the License. 1491 * You may obtain a copy of the License at 1492 * 1493 * http://www.apache.org/licenses/LICENSE-2.0 1494 * 1495 * Unless required by applicable law or agreed to in writing, software 1496 * distributed under the License is distributed on an "AS IS" BASIS, 1497 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1498 * See the License for the specific language governing permissions and 1499 * limitations under the License. 1500 */const Gr=new df("@firebase/firestore");function Cs(){return Gr.logLevel}function W(t,...e){if(Gr.logLevel<=te.DEBUG){const n=e.map(Af);Gr.debug(`Firestore (${ns}): ${t}`,...n)}}function Pn(t,...e){if(Gr.logLevel<=te.ERROR){const n=e.map(Af);Gr.error(`Firestore (${ns}): ${t}`,...n)}}function Bi(t,...e){if(Gr.logLevel<=te.WARN){const n=e.map(Af);Gr.warn(`Firestore (${ns}): ${t}`,...n)}}function Af(t){if(typeof t=="string")return t;try{/** 1501* @license 1502* Copyright 2020 Google LLC 1503* 1504* Licensed under the Apache License, Version 2.0 (the "License"); 1505* you may not use this file except in compliance with the License. 1506* You may obtain a copy of the License at 1507* 1508* http://www.apache.org/licenses/LICENSE-2.0 1509* 1510* Unless required by applicable law or agreed to in writing, software 1511* distributed under the License is distributed on an "AS IS" BASIS, 1512* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1513* See the License for the specific language governing permissions and 1514* limitations under the License. 1515*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/** 1516 * @license 1517 * Copyright 2017 Google LLC 1518 * 1519 * Licensed under the Apache License, Version 2.0 (the "License"); 1520 * you may not use this file except in compliance with the License. 1521 * You may obtain a copy of the License at 1522 * 1523 * http://www.apache.org/licenses/LICENSE-2.0 1524 * 1525 * Unless required by applicable law or agreed to in writing, software 1526 * distributed under the License is distributed on an "AS IS" BASIS, 1527 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1528 * See the License for the specific language governing permissions and 1529 * limitations under the License. 1530 */function K(t="Unexpected state"){const e=`FIRESTORE (${ns}) INTERNAL ASSERTION FAILED: `+t;throw Pn(e),new Error(e)}function le(t,e){t||K()}function X(t,e){return t}/** 1531 * @license 1532 * Copyright 2017 Google LLC 1533 * 1534 * Licensed under the Apache License, Version 2.0 (the "License");
1535 * you may not use this file except in compliance with the License. 1536 * You may obtain a copy of the License at 1537 * 1538 * http://www.apache.org/licenses/LICENSE-2.0 1539 * 1540 * Unless required by applicable law or agreed to in writing, software 1541 * distributed under the License is distributed on an "AS IS" BASIS, 1542 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1543 * See the License for the specific language governing permissions and 1544 * limitations under the License. 1545 */const L={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 $ extends sn{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 1546 * @license 1547 * Copyright 2017 Google LLC 1548 * 1549 * Licensed under the Apache License, Version 2.0 (the "License"); 1550 * you may not use this file except in compliance with the License. 1551 * You may obtain a copy of the License at 1552 * 1553 * http://www.apache.org/licenses/LICENSE-2.0 1554 * 1555 * Unless required by applicable law or agreed to in writing, software 1556 * distributed under the License is distributed on an "AS IS" BASIS, 1557 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1558 * See the License for the specific language governing permissions and 1559 * limitations under the License. 1560 */class In{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** 1561 * @license 1562 * Copyright 2017 Google LLC 1563 * 1564 * Licensed under the Apache License, Version 2.0 (the "License"); 1565 * you may not use this file except in compliance with the License. 1566 * You may obtain a copy of the License at 1567 * 1568 * http://www.apache.org/licenses/LICENSE-2.0 1569 * 1570 * Unless required by applicable law or agreed to in writing, software 1571 * distributed under the License is distributed on an "AS IS" BASIS, 1572 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1573 * See the License for the specific language governing permissions and 1574 * limitations under the License. 1575 */class Ew{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class NC{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Je.UNAUTHENTICATED))}shutdown(){}}class bC{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class DC{constructor(e){this.t=e,this.currentUser=Je.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){le(this.o===void 0);let r=this.i;const i=u=>this.i!==r?(r=this.i,n(u)):Promise.resolve();let s=new In;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new In,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const u=s;e.enqueueRetryable(async()=>{await u.promise,await i(this.currentUser)})},l=u=>{W("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=u,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(u=>l(u)),setTimeout(()=>{if(!this.auth){const u=this.t.getImmediate({optional:!0});u?l(u):(W("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new In)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(W("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(le(typeof r.accessToken=="string"),new Ew(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 le(e===null||typeof e=="string"),new Je(e)}}class OC{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Je.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class VC{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new OC(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Je.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class LC{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 jC{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){le(this.o===void 0);const r=s=>{s.error!=null&&W("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,W("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{W("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):W("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(le(typeof n.token=="string"),this.R=n.token,new LC(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** 1576 * @license 1577 * Copyright 2020 Google LLC 1578 * 1579 * Licensed under the Apache License, Version 2.0 (the "License");
1580 * you may not use this file except in compliance with the License. 1581 * You may obtain a copy of the License at 1582 * 1583 * http://www.apache.org/licenses/LICENSE-2.0 1584 * 1585 * Unless required by applicable law or agreed to in writing, software 1586 * distributed under the License is distributed on an "AS IS" BASIS, 1587 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1588 * See the License for the specific language governing permissions and 1589 * limitations under the License. 1590 */function MC(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}/** 1591 * @license 1592 * Copyright 2017 Google LLC 1593 * 1594 * Licensed under the Apache License, Version 2.0 (the "License"); 1595 * you may not use this file except in compliance with the License. 1596 * You may obtain a copy of the License at 1597 * 1598 * http://www.apache.org/licenses/LICENSE-2.0 1599 * 1600 * Unless required by applicable law or agreed to in writing, software 1601 * distributed under the License is distributed on an "AS IS" BASIS, 1602 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1603 * See the License for the specific language governing permissions and 1604 * limitations under the License. 1605 */class Tw{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const i=MC(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%e.length))}return r}}function se(t,e){return t<e?-1:t>e?1:0}function $i(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** 1606 * @license 1607 * Copyright 2017 Google LLC 1608 * 1609 * Licensed under the Apache License, Version 2.0 (the "License"); 1610 * you may not use this file except in compliance with the License. 1611 * You may obtain a copy of the License at 1612 * 1613 * http://www.apache.org/licenses/LICENSE-2.0 1614 * 1615 * Unless required by applicable law or agreed to in writing, software 1616 * distributed under the License is distributed on an "AS IS" BASIS, 1617 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1618 * See the License for the specific language governing permissions and 1619 * limitations under the License. 1620 */class oe{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new $(L.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new $(L.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new $(L.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new $(L.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return oe.fromMillis(Date.now())}static fromDate(e){return oe.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new oe(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?se(this.nanoseconds,e.nanoseconds):se(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** 1621 * @license 1622 * Copyright 2017 Google LLC 1623 * 1624 * Licensed under the Apache License, Version 2.0 (the "License"); 1625 * you may not use this file except in compliance with the License. 1626 * You may obtain a copy of the License at 1627 * 1628 * http://www.apache.org/licenses/LICENSE-2.0 1629 * 1630 * Unless required by applicable law or agreed to in writing, software 1631 * distributed under the License is distributed on an "AS IS" BASIS, 1632 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1633 * See the License for the specific language governing permissions and 1634 * limitations under the License. 1635 */class Y{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Y(e)}static min(){return new Y(new oe(0,0))}static max(){return new Y(new oe(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 1636 * @license 1637 * Copyright 2017 Google LLC 1638 * 1639 * Licensed under the Apache License, Version 2.0 (the "License");
1640 * you may not use this file except in compliance with the License. 1641 * You may obtain a copy of the License at 1642 * 1643 * http://www.apache.org/licenses/LICENSE-2.0 1644 * 1645 * Unless required by applicable law or agreed to in writing, software 1646 * distributed under the License is distributed on an "AS IS" BASIS, 1647 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1648 * See the License for the specific language governing permissions and 1649 * limitations under the License. 1650 */class To{constructor(e,n,r){n===void 0?n=0:n>e.length&&K(),r===void 0?r=e.length-n:r>e.length-n&&K(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return To.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof To?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=e.get(i),o=n.get(i);if(s<o)return-1;if(s>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class me extends To{construct(e,n,r){return new me(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new $(L.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new me(n)}static emptyPath(){return new me([])}}const FC=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class ze extends To{construct(e,n,r){return new ze(e,n,r)}static isValidIdentifier(e){return FC.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),ze.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new ze(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>
1650{if(r.length===0)throw new $(L.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i<e.length;){const l=e[i];if(l==="\\"){if(i+1===e.length)throw new $(L.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const u=e[i+1];if(u!=="\\"&&u!=="."&&u!=="`")throw new $(L.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=u,i+=2}else l==="`"?(o=!o,i++):l!=="."||o?(r+=l,i++):(s(),i++)}if(s(),o)throw new $(L.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new ze(n)}static emptyPath(){return new ze([])}}/** 1651 * @license 1652 * Copyright 2017 Google LLC 1653 * 1654 * Licensed under the Apache License, Version 2.0 (the "License"); 1655 * you may not use this file except in compliance with the License. 1656 * You may obtain a copy of the License at 1657 * 1658 * http://www.apache.org/licenses/LICENSE-2.0 1659 * 1660 * Unless required by applicable law or agreed to in writing, software 1661 * distributed under the License is distributed on an "AS IS" BASIS, 1662 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1663 * See the License for the specific language governing permissions and 1664 * limitations under the License. 1665 */class H{constructor(e){this.path=e}static fromPath(e){return new H(me.fromString(e))}static fromName(e){return new H(me.fromString(e).popFirst(5))}static empty(){return new H(me.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&&me.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return me.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new H(new me(e.slice()))}}function UC(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=Y.fromTimestamp(r===1e9?new oe(n+1,0):new oe(n,r));return new dr(i,H.empty(),e)}function zC(t){return new dr(t.readTime,t.key,-1)}class dr{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new dr(Y.min(),H.empty(),-1)}static max(){return new dr(Y.max(),H.empty(),-1)}}function BC(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=H.comparator(t.documentKey,e.documentKey),n!==0?n:se(t.largestBatchId,e.largestBatchId))}/** 1666 * @license 1667 * Copyright 2020 Google LLC 1668 * 1669 * Licensed under the Apache License, Version 2.0 (the "License"); 1670 * you may not use this file except in compliance with the License. 1671 * You may obtain a copy of the License at 1672 * 1673 * http://www.apache.org/licenses/LICENSE-2.0 1674 * 1675 * Unless required by applicable law or agreed to in writing, software 1676 * distributed under the License is distributed on an "AS IS" BASIS, 1677 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1678 * See the License for the specific language governing permissions and 1679 * limitations under the License. 1680 */const $C="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class qC{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** 1681 * @license 1682 * Copyright 2017 Google LLC 1683 * 1684 * Licensed under the Apache License, Version 2.0 (the "License"); 1685 * you may not use this file except in compliance with the License. 1686 * You may obtain a copy of the License at 1687 * 1688 * http://www.apache.org/licenses/LICENSE-2.0 1689 * 1690 * Unless required by applicable law or agreed to in writing, software 1691 * distributed under the License is distributed on an "AS IS" BASIS, 1692 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1693 * See the License for the specific language governing permissions and 1694 * limitations under the License. 1695 */async function Bo(t){if(t.code!==L.FAILED_PRECONDITION||t.message!==$C)throw t;W("LocalStore","Unexpectedly lost primary lease")}/** 1696 * @license 1697 * Copyright 2017 Google LLC 1698 * 1699 * Licensed under the Apache License, Version 2.0 (the "License");
1700 * you may not use this file except in compliance with the License. 1701 * You may obtain a copy of the License at 1702 * 1703 * http://www.apache.org/licenses/LICENSE-2.0 1704 * 1705 * Unless required by applicable law or agreed to in writing, software 1706 * distributed under the License is distributed on an "AS IS" BASIS, 1707 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1708 * See the License for the specific language governing permissions and 1709 * limitations under the License. 1710 */class M{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&K(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new M((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof M?n:M.resolve(n)}catch(n){return M.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):M.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):M.reject(n)}static resolve(e){return new M((n,r)=>{n(e)})}static reject(e){return new M((n,r)=>{r(e)})}static waitFor(e){return new M((n,r)=>{let i=0,s=0,o=!1;e.forEach(l=>{++i,l.next(()=>{++s,o&&s===i&&n()},u=>r(u))}),o=!0,s===i&&n()})}static or(e){let n=M.resolve(!1);for(const r of e)n=n.next(i=>i?M.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new M((r,i)=>{const s=e.length,o=new Array(s);let l=0;for(let u=0;u<s;u++){const h=u;n(e[h]).next(p=>{o[h]=p,++l,l===s&&r(o)},p=>i(p))}})}static doWhile(e,n){return new M((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function WC(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function $o(t){return t.name==="IndexedDbTransactionError"}/** 1711 * @license 1712 * Copyright 2018 Google LLC 1713 * 1714 * Licensed under the Apache License, Version 2.0 (the "License"); 1715 * you may not use this file except in compliance with the License. 1716 * You may obtain a copy of the License at 1717 * 1718 * http://www.apache.org/licenses/LICENSE-2.0 1719 * 1720 * Unless required by applicable law or agreed to in writing, software 1721 * distributed under the License is distributed on an "AS IS" BASIS, 1722 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1723 * See the License for the specific language governing permissions and 1724 * limitations under the License. 1725 */class kf{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.se&&this.se(e),e}}kf.oe=-1;function vu(t){return t==null}function zl(t){return t===0&&1/t==-1/0}function HC(t){return typeof t=="number"&&Number.isInteger(t)&&!zl(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** 1726 * @license 1727 * Copyright 2017 Google LLC 1728 * 1729 * Licensed under the Apache License, Version 2.0 (the "License"); 1730 * you may not use this file except in compliance with the License. 1731 * You may obtain a copy of the License at 1732 * 1733 * http://www.apache.org/licenses/LICENSE-2.0 1734 * 1735 * Unless required by applicable law or agreed to in writing, software 1736 * distributed under the License is distributed on an "AS IS" BASIS, 1737 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1738 * See the License for the specific language governing permissions and 1739 * limitations under the License. 1740 */function uy(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function ei(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function Iw(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** 1741 * @license 1742 * Copyright 2017 Google LLC 1743 * 1744 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 5,114 bytes, lines 1745-1755
1745 * you may not use this file except in compliance with the License. 1746 * You may obtain a copy of the License at 1747 * 1748 * http://www.apache.org/licenses/LICENSE-2.0 1749 * 1750 * Unless required by applicable law or agreed to in writing, software 1751 * distributed under the License is distributed on an "AS IS" BASIS, 1752 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1753 * See the License for the specific language governing permissions and 1754 * limitations under the License. 1755 */class Ie{constructor(e,n){this.comparator=e,this.root=n||Ue.EMPTY}insert(e,n){return new Ie(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Ue.BLACK,null,null))}remove(e){return new Ie(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Ue.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new ja(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new ja(this.root,e,this.comparator,!1)}getReverseIterator(){return new ja(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new ja(this.root,e,this.comparator,!0)}}class ja{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Ue{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??Ue.RED,this.left=i??Ue.EMPTY,this.right=s??Ue.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new Ue(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Ue.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return Ue.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Ue.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Ue.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw K();const e=this.left.check();if(e!==this.right.check())throw K();return e+(this.isRed()?0:1)}}Ue.EMPTY=null,Ue.RED=!0,Ue.BLACK=!1;
1755Ue.EMPTY=new class{constructor(){this.size=0}get key(){throw K()}get value(){throw K()}get color(){throw K()}get left(){throw K()}get right(){throw K()}copy(e,n,r,i,s){return this}insert(e,n,r){return new Ue(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 1756 * @license 1757 * Copyright 2017 Google LLC 1758 * 1759 * Licensed under the Apache License, Version 2.0 (the "License"); 1760 * you may not use this file except in compliance with the License. 1761 * You may obtain a copy of the License at 1762 * 1763 * http://www.apache.org/licenses/LICENSE-2.0 1764 * 1765 * Unless required by applicable law or agreed to in writing, software 1766 * distributed under the License is distributed on an "AS IS" BASIS, 1767 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1768 * See the License for the specific language governing permissions and 1769 * limitations under the License. 1770 */class $e{constructor(e){this.comparator=e,this.data=new Ie(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new cy(this.data.getIterator())}getIteratorFrom(e){return new cy(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach(r=>{n=n.add(r)}),n}isEqual(e){if(!(e instanceof $e)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new $e(this.comparator);return n.data=e,n}}class cy{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 1771 * @license 1772 * Copyright 2020 Google LLC 1773 * 1774 * Licensed under the Apache License, Version 2.0 (the "License"); 1775 * you may not use this file except in compliance with the License. 1776 * You may obtain a copy of the License at 1777 * 1778 * http://www.apache.org/licenses/LICENSE-2.0 1779 * 1780 * Unless required by applicable law or agreed to in writing, software 1781 * distributed under the License is distributed on an "AS IS" BASIS, 1782 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1783 * See the License for the specific language governing permissions and 1784 * limitations under the License. 1785 */class Et{constructor(e){this.fields=e,e.sort(ze.comparator)}static empty(){return new Et([])}unionWith(e){let n=new $e(ze.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new Et(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return $i(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** 1786 * @license 1787 * Copyright 2023 Google LLC 1788 * 1789 * Licensed under the Apache License, Version 2.0 (the "License"); 1790 * you may not use this file except in compliance with the License. 1791 * You may obtain a copy of the License at 1792 * 1793 * http://www.apache.org/licenses/LICENSE-2.0 1794 * 1795 * Unless required by applicable law or agreed to in writing, software 1796 * distributed under the License is distributed on an "AS IS" BASIS, 1797 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1798 * See the License for the specific language governing permissions and 1799 * limitations under the License.
1800 */class xw extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 1801 * @license 1802 * Copyright 2020 Google LLC 1803 * 1804 * Licensed under the Apache License, Version 2.0 (the "License"); 1805 * you may not use this file except in compliance with the License. 1806 * You may obtain a copy of the License at 1807 * 1808 * http://www.apache.org/licenses/LICENSE-2.0 1809 * 1810 * Unless required by applicable law or agreed to in writing, software 1811 * distributed under the License is distributed on an "AS IS" BASIS, 1812 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1813 * See the License for the specific language governing permissions and 1814 * limitations under the License. 1815 */class We{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new xw("Invalid base64 string: "+s):s}}(e);return new We(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new We(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return se(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}We.EMPTY_BYTE_STRING=new We("");const GC=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function fr(t){if(le(!!t),typeof t=="string"){let e=0;const n=GC.exec(t);if(le(!!n),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:ke(t.seconds),nanos:ke(t.nanos)}}function ke(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function Kr(t){return typeof t=="string"?We.fromBase64String(t):We.fromUint8Array(t)}/** 1816 * @license 1817 * Copyright 2020 Google LLC 1818 * 1819 * Licensed under the Apache License, Version 2.0 (the "License"); 1820 * you may not use this file except in compliance with the License. 1821 * You may obtain a copy of the License at 1822 * 1823 * http://www.apache.org/licenses/LICENSE-2.0 1824 * 1825 * Unless required by applicable law or agreed to in writing, software 1826 * distributed under the License is distributed on an "AS IS" BASIS, 1827 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1828 * See the License for the specific language governing permissions and 1829 * limitations under the License. 1830 */function Cf(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function Rf(t){const e=t.mapValue.fields.__previous_value__;return Cf(e)?Rf(e):e}function Io(t){const e=fr(t.mapValue.fields.__local_write_time__.timestampValue);return new oe(e.seconds,e.nanos)}/** 1831 * @license 1832 * Copyright 2017 Google LLC 1833 * 1834 * Licensed under the Apache License, Version 2.0 (the "License"); 1835 * you may not use this file except in compliance with the License. 1836 * You may obtain a copy of the License at 1837 * 1838 * http://www.apache.org/licenses/LICENSE-2.0 1839 * 1840 * Unless required by applicable law or agreed to in writing, software 1841 * distributed under the License is distributed on an "AS IS" BASIS, 1842 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1843 * See the License for the specific language governing permissions and 1844 * limitations under the License. 1845 */class KC{constructor(e,n,r,i,s,o,l,u,h){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=l,this.longPollingOptions=u,this.useFetchStreams=h}}class xo{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new xo("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof xo&&e.projectId===this.projectId&&e.database===this.database}}/** 1846 * @license 1847 * Copyright 2020 Google LLC 1848 * 1849 * Licensed under the Apache License, Version 2.0 (the "License");
1850 * you may not use this file except in compliance with the License. 1851 * You may obtain a copy of the License at 1852 * 1853 * http://www.apache.org/licenses/LICENSE-2.0 1854 * 1855 * Unless required by applicable law or agreed to in writing, software 1856 * distributed under the License is distributed on an "AS IS" BASIS, 1857 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1858 * See the License for the specific language governing permissions and 1859 * limitations under the License. 1860 */const Ma={mapValue:{}};function Qr(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Cf(t)?4:YC(t)?9007199254740991:QC(t)?10:11:K()}function nn(t,e){if(t===e)return!0;const n=Qr(t);if(n!==Qr(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Io(t).isEqual(Io(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=fr(i.timestampValue),l=fr(s.timestampValue);return o.seconds===l.seconds&&o.nanos===l.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(i,s){return Kr(i.bytesValue).isEqual(Kr(s.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(i,s){return ke(i.geoPointValue.latitude)===ke(s.geoPointValue.latitude)&&ke(i.geoPointValue.longitude)===ke(s.geoPointValue.longitude)}(t,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return ke(i.integerValue)===ke(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=ke(i.doubleValue),l=ke(s.doubleValue);return o===l?zl(o)===zl(l):isNaN(o)&&isNaN(l)}return!1}(t,e);case 9:return $i(t.arrayValue.values||[],e.arrayValue.values||[],nn);case 10:case 11:return function(i,s){const o=i.mapValue.fields||{},l=s.mapValue.fields||{};if(uy(o)!==uy(l))return!1;for(const u in o)if(o.hasOwnProperty(u)&&(l[u]===void 0||!nn(o[u],l[u])))return!1;return!0}(t,e);default:return K()}}function So(t,e){return(t.values||[]).find(n=>nn(n,e))!==void 0}function qi(t,e){if(t===e)return 0;const n=Qr(t),r=Qr(e);if(n!==r)return se(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return se(t.booleanValue,e.booleanValue);case 2:return function(s,o){const l=ke(s.integerValue||s.doubleValue),u=ke(o.integerValue||o.doubleValue);return l<u?-1:l>u?1:l===u?0:isNaN(l)?isNaN(u)?0:-1:1}(t,e);case 3:return hy(t.timestampValue,e.timestampValue);case 4:return hy(Io(t),Io(e));case 5:return se(t.stringValue,e.stringValue);case 6:return function(s,o){const l=Kr(s),u=Kr(o);return l.compareTo(u)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const l=s.split("/"),u=o.split("/");for(let h=0;h<l.length&&h<u.length;h++){const p=se(l[h],u[h]);if(p!==0)return p}return se(l.length,u.length)}(t.referenceValue,e.referenceValue);case 8:return function(s,o){const l=se(ke(s.latitude),ke(o.latitude));return l!==0?l:se(ke(s.longitude),ke(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return dy(t.arrayValue,e.arrayValue);case 10:return function(s,o){var l,u,h,p;const m=s.fields||{},g=o.fields||{},A=(l=m.value)===null||l===void 0?void 0:l.arrayValue,C=(u=g.value)===null||u===void 0?void 0:u.arrayValue,N=se(((h=A==null?void 0:A.values)===null||h===void 0?void 0:h.length)||0,((p=C==null?void 0:C.values)===null||p===void 0?void 0:p.length)||0);return N!==0?N:dy(A,C)}(t.mapValue,e.mapValue);case 11:return function(s,o){if(s===Ma.mapValue&&o===Ma.mapValue)return 0;if(s===Ma.mapValue)return 1;if(o===Ma.mapValue)return-1;const l=s.fields||{},u=Object.keys(l),h=o.fields||{},p=Object.keys(h);u.sort(),p.sort();for(let m=0;m<u.length&&m<p.length;++m){const g=se(u[m],p[m]);if(g!==0)return g;const A=qi(l[u[m]],h[p[m]]);if(A!==0)return A}return se(u.length,p.length)}(t.mapValue,e.mapValue);default:throw K()}}function hy(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return se(t,e);const n=fr(t),r=fr(e),i=se(n.seconds,r.seconds);return i!==0?i:se(n.nanos,r.nanos)}function dy(t,e){const n=t.values||[],r=e.values||[];for(let i=0;i<n.length&&i<r.length;++i){const s=qi(n[i],r[i]);if(s)return s}return se(n.length,r.length)}function Wi(t){return Gh(t)}function Gh(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(n){const r=fr(n);return`time(${r.seconds},${r.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return Kr(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return H.fromName(n).toString()}(t.referenceValue):"geoPointValue"in t?function(n){return`geo(${n.latitude},${n.longitude})`}(t.geoPointValue):"arrayValue"in t?function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=Gh(s);return r+"]"}(t.arrayValue):"mapValue"in t?function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${Gh(n.fields[o])}`;return i+"}"}(t.mapValue):K()}function fy(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function Kh(t){return!!t&&"integerValue"in t}function Pf(t){return!!t&&"arrayValue"in t}function py(t){return!!t&&"nullValue"in t}function my(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function il(t){return!!t&&"mapValue"in t}function QC(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="__vector__"}function Ys(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return ei(t.mapValue.fields,(n,r)=>e.mapValue.fields[n]=Ys(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Ys(t.arrayValue.values[n]);return e}return Object.assign({},t)}function YC(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** 1861 * @license 1862 * Copyright 2017 Google LLC 1863 * 1864 * Licensed under the Apache License, Version 2.0 (the "License");
1865 * you may not use this file except in compliance with the License. 1866 * You may obtain a copy of the License at 1867 * 1868 * http://www.apache.org/licenses/LICENSE-2.0 1869 * 1870 * Unless required by applicable law or agreed to in writing, software 1871 * distributed under the License is distributed on an "AS IS" BASIS, 1872 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1873 * See the License for the specific language governing permissions and 1874 * limitations under the License. 1875 */class ft{constructor(e){this.value=e}static empty(){return new ft({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r<e.length-1;++r)if(n=(n.mapValue.fields||{})[e.get(r)],!il(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=Ys(n)}setAll(e){let n=ze.emptyPath(),r={},i=[];e.forEach((o,l)=>{if(!n.isImmediateParentOf(l)){const u=this.getFieldsMap(n);this.applyChanges(u,r,i),r={},i=[],n=l.popLast()}o?r[l.lastSegment()]=Ys(o):i.push(l.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());il(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return nn(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=n.mapValue.fields[e.get(r)];il(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){ei(n,(i,s)=>e[i]=s);for(const i of r)delete e[i]}clone(){return new ft(Ys(this.value))}}function Sw(t){const e=[];return ei(t.fields,(n,r)=>{const i=new ze([n]);if(il(r)){const s=Sw(r.mapValue).fields;
vendor: 4,168 bytes, lines 1875-1915
1875if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new Et(e)}/** 1876 * @license 1877 * Copyright 2017 Google LLC 1878 * 1879 * Licensed under the Apache License, Version 2.0 (the "License"); 1880 * you may not use this file except in compliance with the License. 1881 * You may obtain a copy of the License at 1882 * 1883 * http://www.apache.org/licenses/LICENSE-2.0 1884 * 1885 * Unless required by applicable law or agreed to in writing, software 1886 * distributed under the License is distributed on an "AS IS" BASIS, 1887 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1888 * See the License for the specific language governing permissions and 1889 * limitations under the License. 1890 */class et{constructor(e,n,r,i,s,o,l){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=l}static newInvalidDocument(e){return new et(e,0,Y.min(),Y.min(),Y.min(),ft.empty(),0)}static newFoundDocument(e,n,r,i){return new et(e,1,n,Y.min(),r,i,0)}static newNoDocument(e,n){return new et(e,2,n,Y.min(),Y.min(),ft.empty(),0)}static newUnknownDocument(e,n){return new et(e,3,n,Y.min(),Y.min(),ft.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(Y.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=ft.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=ft.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Y.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 et&&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 et(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}})`}}/** 1891 * @license 1892 * Copyright 2022 Google LLC 1893 * 1894 * Licensed under the Apache License, Version 2.0 (the "License"); 1895 * you may not use this file except in compliance with the License. 1896 * You may obtain a copy of the License at 1897 * 1898 * http://www.apache.org/licenses/LICENSE-2.0 1899 * 1900 * Unless required by applicable law or agreed to in writing, software 1901 * distributed under the License is distributed on an "AS IS" BASIS, 1902 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1903 * See the License for the specific language governing permissions and 1904 * limitations under the License. 1905 */class Bl{constructor(e,n){this.position=e,this.inclusive=n}}function gy(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const s=e[i],o=t.position[i];if(s.field.isKeyField()?r=H.comparator(H.fromName(o.referenceValue),n.key):r=qi(o,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function yy(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!nn(t.position[n],e.position[n]))return!1;return!0}/** 1906 * @license 1907 * Copyright 2022 Google LLC 1908 * 1909 * Licensed under the Apache License, Version 2.0 (the "License"); 1910 * you may not use this file except in compliance with the License. 1911 * You may obtain a copy of the License at 1912 * 1913 * http://www.apache.org/licenses/LICENSE-2.0 1914 * 1915 * Unless required by applicable law or agreed to in writing, softw
1915are 1916 * distributed under the License is distributed on an "AS IS" BASIS, 1917 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1918 * See the License for the specific language governing permissions and 1919 * limitations under the License. 1920 */class Ao{constructor(e,n="asc"){this.field=e,this.dir=n}}function XC(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/** 1921 * @license 1922 * Copyright 2022 Google LLC 1923 * 1924 * Licensed under the Apache License, Version 2.0 (the "License"); 1925 * you may not use this file except in compliance with the License. 1926 * You may obtain a copy of the License at 1927 * 1928 * http://www.apache.org/licenses/LICENSE-2.0 1929 * 1930 * Unless required by applicable law or agreed to in writing, software 1931 * distributed under the License is distributed on an "AS IS" BASIS, 1932 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1933 * See the License for the specific language governing permissions and 1934 * limitations under the License. 1935 */class Aw{}class be extends Aw{constructor(e,n,r){super(),this.field=e,this.op=n,this.value=r}static create(e,n,r){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,r):new ZC(e,n,r):n==="array-contains"?new nR(e,r):n==="in"?new rR(e,r):n==="not-in"?new iR(e,r):n==="array-contains-any"?new sR(e,r):new be(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new eR(e,r):new tR(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(qi(n,this.value)):n!==null&&Qr(this.value)===Qr(n)&&this.matchesComparison(qi(n,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return K()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class qt extends Aw{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new qt(e,n)}matches(e){return kw(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function kw(t){return t.op==="and"}function Cw(t){return JC(t)&&kw(t)}function JC(t){for(const e of t.filters)if(e instanceof qt)return!1;return!0}function Qh(t){if(t instanceof be)return t.field.canonicalString()+t.op.toString()+Wi(t.value);if(Cw(t))return t.filters.map(e=>Qh(e)).join(",");{const e=t.filters.map(n=>Qh(n)).join(",");return`${t.op}(${e})`}}function Rw(t,e){return t instanceof be?function(r,i){return i instanceof be&&r.op===i.op&&r.field.isEqual(i.field)&&nn(r.value,i.value)}(t,e):t instanceof qt?function(r,i){return i instanceof qt&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,l)=>s&&Rw(o,i.filters[l]),!0):!1}(t,e):void K()}function Pw(t){return t instanceof be?function(n){return`${n.field.canonicalString()} ${n.op} ${Wi(n.value)}`}(t):t instanceof qt?function(n){return n.op.toString()+" {"+n.getFilters().map(Pw).join(" ,")+"}"}(t):"Filter"}class ZC extends be{constructor(e,n,r){super(e,n,r),this.key=H.fromName(r.referenceValue)}matches(e){const n=H.comparator(e.key,this.key);return this.matchesComparison(n)}}class eR extends be{constructor(e,n){super(e,"in",n),this.keys=Nw("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class tR extends be{constructor(e,n){super(e,"not-in",n),this.keys=Nw("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function Nw(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>H.fromName(r.referenceValue))}class nR extends be{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Pf(n)&&So(n.arrayValue,this.value)}}class rR extends be{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&So(this.value.arrayValue,n)}}class iR extends be{constructor(e,n){super(e,"not-in",n)}matches(e){if(So(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!So(this.value.arrayValue,n)}}class sR extends be{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!Pf(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>So(this.value.arrayValue,r))}}/** 1936 * @license 1937 * Copyright 2019 Google LLC 1938 * 1939 * Licensed under the Apache License, Version 2.0 (the "License");
1940 * you may not use this file except in compliance with the License. 1941 * You may obtain a copy of the License at 1942 * 1943 * http://www.apache.org/licenses/LICENSE-2.0 1944 * 1945 * Unless required by applicable law or agreed to in writing, software 1946 * distributed under the License is distributed on an "AS IS" BASIS, 1947 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1948 * See the License for the specific language governing permissions and 1949 * limitations under the License. 1950 */class oR{constructor(e,n=null,r=[],i=[],s=null,o=null,l=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=l,this.ue=null}}function vy(t,e=null,n=[],r=[],i=null,s=null,o=null){return new oR(t,e,n,r,i,s,o)}function Nf(t){const e=X(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>Qh(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),vu(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>Wi(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>Wi(r)).join(",")),e.ue=n}return e.ue}function bf(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!XC(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!Rw(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!yy(t.startAt,e.startAt)&&yy(t.endAt,e.endAt)}function Yh(t){return H.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/** 1951 * @license 1952 * Copyright 2017 Google LLC 1953 * 1954 * Licensed under the Apache License, Version 2.0 (the "License"); 1955 * you may not use this file except in compliance with the License. 1956 * You may obtain a copy of the License at 1957 * 1958 * http://www.apache.org/licenses/LICENSE-2.0 1959 * 1960 * Unless required by applicable law or agreed to in writing, software 1961 * distributed under the License is distributed on an "AS IS" BASIS, 1962 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1963 * See the License for the specific language governing permissions and 1964 * limitations under the License. 1965 */class rs{constructor(e,n=null,r=[],i=[],s=null,o="F",l=null,u=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=l,this.endAt=u,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function aR(t,e,n,r,i,s,o,l){return new rs(t,e,n,r,i,s,o,l)}function _u(t){return new rs(t)}function _y(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function bw(t){return t.collectionGroup!==null}function Xs(t){const e=X(t);if(e.ce===null){e.ce=[];const n=new Set;for(const s of e.explicitOrderBy)e.ce.push(s),n.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let l=new $e(ze.comparator);return o.filters.forEach(u=>{u.getFlattenedFilters().forEach(h=>{h.isInequality()&&(l=l.add(h.field))})}),l})(e).forEach(s=>{n.has(s.canonicalString())||s.isKeyField()||e.ce.push(new Ao(s,r))}),n.has(ze.keyField().canonicalString())||e.ce.push(new Ao(ze.keyField(),r))}return e.ce}function Zt(t){const e=X(t);return e.le||(e.le=lR(e,Xs(t))),e.le}function lR(t,e){if(t.limitType==="F")return vy(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new Ao(i.field,s)});const n=t.endAt?new Bl(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new Bl(t.startAt.position,t.startAt.inclusive):null;return vy(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function Xh(t,e){const n=t.filters.concat([e]);return new rs(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function $l(t,e,n){return new rs(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function wu(t,e){return bf(Zt(t),Zt(e))&&t.limitType===e.limitType}function Dw(t){return`${Nf(Zt(t))}|lt:${t.limitType}`}function li(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>Pw(i)).join(", ")}]`),vu(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>Wi(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>Wi(i)).join(",")),`Target(${r})`}(Zt(t))}; limitType=${t.limitType})`}function Eu(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):H.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of Xs(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,l,u){const h=gy(o,l,u);return o.inclusive?h<=0:h<0}(r.startAt,Xs(r),i)||r.endAt&&!function(o,l,u){const h=gy(o,l,u);return o.inclusive?h>=0:h>0}(r.endAt,Xs(r),i))}(t,e)}function uR(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function Ow(t){return(e,n)=>{let r=!1;for(const i of Xs(t)){const s=cR(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function cR(t,e,n){const r=t.field.isKeyField()?H.comparator(e.key,n.key):function(s,o,l){const u=o.data.field(s),h=l.data.field(s);return u!==null&&h!==null?qi(u,h):K()}
1965(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return K()}}/** 1966 * @license 1967 * Copyright 2017 Google LLC 1968 * 1969 * Licensed under the Apache License, Version 2.0 (the "License"); 1970 * you may not use this file except in compliance with the License. 1971 * You may obtain a copy of the License at 1972 * 1973 * http://www.apache.org/licenses/LICENSE-2.0 1974 * 1975 * Unless required by applicable law or agreed to in writing, software 1976 * distributed under the License is distributed on an "AS IS" BASIS, 1977 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1978 * See the License for the specific language governing permissions and 1979 * limitations under the License. 1980 */class is{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,n]);i.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){ei(this.inner,(n,r)=>{for(const[i,s]of r)e(i,s)})}isEmpty(){return Iw(this.inner)}size(){return this.innerSize}}/** 1981 * @license 1982 * Copyright 2017 Google LLC 1983 * 1984 * Licensed under the Apache License, Version 2.0 (the "License"); 1985 * you may not use this file except in compliance with the License. 1986 * You may obtain a copy of the License at 1987 * 1988 * http://www.apache.org/licenses/LICENSE-2.0 1989 * 1990 * Unless required by applicable law or agreed to in writing, software 1991 * distributed under the License is distributed on an "AS IS" BASIS, 1992 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1993 * See the License for the specific language governing permissions and 1994 * limitations under the License. 1995 */const hR=new Ie(H.comparator);function Nn(){return hR}const Vw=new Ie(H.comparator);function Vs(...t){let e=Vw;for(const n of t)e=e.insert(n.key,n);return e}function Lw(t){let e=Vw;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function Or(){return Js()}function jw(){return Js()}function Js(){return new is(t=>t.toString(),(t,e)=>t.isEqual(e))}const dR=new Ie(H.comparator),fR=new $e(H.comparator);function ee(...t){let e=fR;for(const n of t)e=e.add(n);return e}const pR=new $e(se);function mR(){return pR}/** 1996 * @license 1997 * Copyright 2020 Google LLC 1998 * 1999 * Licensed under the Apache License, Version 2.0 (the "License"); 2000 * you may not use this file except in compliance with the License. 2001 * You may obtain a copy of the License at 2002 * 2003 * http://www.apache.org/licenses/LICENSE-2.0 2004 * 2005 * Unless required by applicable law or agreed to in writing, software 2006 * distributed under the License is distributed on an "AS IS" BASIS, 2007 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2008 * See the License for the specific language governing permissions and 2009 * limitations under the License. 2010 */function Df(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:zl(e)?"-0":e}}function Mw(t){return{integerValue:""+t}}function Fw(t,e){return HC(e)?Mw(e):Df(t,e)}/** 2011 * @license 2012 * Copyright 2018 Google LLC 2013 * 2014 * Licensed under the Apache License, Version 2.0 (the "License"); 2015 * you may not use this file except in compliance with the License. 2016 * You may obtain a copy of the License at 2017 * 2018 * http://www.apache.org/licenses/LICENSE-2.0 2019 * 2020 * Unless required by applicable law or agreed to in writing, software 2021 * distributed under the License is distributed on an "AS IS" BASIS, 2022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2023 * See the License for the specific language governing permissions and 2024 * limitations under the License. 2025 */class Tu{constructor(){this._=void 0}}function gR(t,e,n){return t instanceof ko?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&Cf(s)&&(s=Rf(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof Co?zw(t,e):t instanceof Ro?Bw(t,e):function(i,s){const o=Uw(i,s),l=wy(o)+wy(i.Pe);
2025return Kh(o)&&Kh(i.Pe)?Mw(l):Df(i.serializer,l)}(t,e)}function yR(t,e,n){return t instanceof Co?zw(t,e):t instanceof Ro?Bw(t,e):n}function Uw(t,e){return t instanceof Po?function(r){return Kh(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class ko extends Tu{}class Co extends Tu{constructor(e){super(),this.elements=e}}function zw(t,e){const n=$w(e);for(const r of t.elements)n.some(i=>nn(i,r))||n.push(r);return{arrayValue:{values:n}}}class Ro extends Tu{constructor(e){super(),this.elements=e}}function Bw(t,e){let n=$w(e);for(const r of t.elements)n=n.filter(i=>!nn(i,r));return{arrayValue:{values:n}}}class Po extends Tu{constructor(e,n){super(),this.serializer=e,this.Pe=n}}function wy(t){return ke(t.integerValue||t.doubleValue)}function $w(t){return Pf(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/** 2026 * @license 2027 * Copyright 2017 Google LLC 2028 * 2029 * Licensed under the Apache License, Version 2.0 (the "License"); 2030 * you may not use this file except in compliance with the License. 2031 * You may obtain a copy of the License at 2032 * 2033 * http://www.apache.org/licenses/LICENSE-2.0 2034 * 2035 * Unless required by applicable law or agreed to in writing, software 2036 * distributed under the License is distributed on an "AS IS" BASIS, 2037 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2038 * See the License for the specific language governing permissions and 2039 * limitations under the License. 2040 */class qw{constructor(e,n){this.field=e,this.transform=n}}function vR(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Co&&i instanceof Co||r instanceof Ro&&i instanceof Ro?$i(r.elements,i.elements,nn):r instanceof Po&&i instanceof Po?nn(r.Pe,i.Pe):r instanceof ko&&i instanceof ko}(t.transform,e.transform)}class _R{constructor(e,n){this.version=e,this.transformResults=n}}class lt{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new lt}static exists(e){return new lt(void 0,e)}static updateTime(e){return new lt(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 sl(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class Iu{}function Ww(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new xu(t.key,lt.none()):new qo(t.key,t.data,lt.none());{const n=t.data,r=ft.empty();let i=new $e(ze.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new wr(t.key,r,new Et(i.toArray()),lt.none())}}function wR(t,e,n){t instanceof qo?function(i,s,o){const l=i.value.clone(),u=Ty(i.fieldTransforms,s,o.transformResults);l.setAll(u),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,n):t instanceof wr?function(i,s,o){if(!sl(i.precondition,s))return void s.convertToUnknownDocument(o.version);const l=Ty(i.fieldTransforms,s,o.transformResults),u=s.data;u.setAll(Hw(i)),u.setAll(l),s.convertToFoundDocument(o.version,u).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function Zs(t,e,n,r){return t instanceof qo?function(s,o,l,u){if(!sl(s.precondition,o))return l;const h=s.value.clone(),p=Iy(s.fieldTransforms,u,o);return h.setAll(p),o.convertToFoundDocument(o.version,h).setHasLocalMutations(),null}(t,e,n,r):t instanceof wr?function(s,o,l,u){if(!sl(s.precondition,o))return l;const h=Iy(s.fieldTransforms,u,o),p=o.data;return p.setAll(Hw(s)),p.setAll(h),o.convertToFoundDocument(o.version,p).setHasLocalMutations(),l===null?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(m=>m.field))}(t,e,n,r):function(s,o,l){return sl(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):l}(t,e,n)}function ER(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=Uw(r.transform,i||null);s!=null&&(n===null&&(n=ft.empty()),n.set(r.field,s))}return n||null}function Ey(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&$i(r,i,(s,o)=>vR(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class qo extends Iu{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.prec
2040ondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class wr extends Iu{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function Hw(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function Ty(t,e,n){const r=new Map;le(t.length===n.length);for(let i=0;i<n.length;i++){const s=t[i],o=s.transform,l=e.data.field(s.field);r.set(s.field,yR(o,l,n[i]))}return r}function Iy(t,e,n){const r=new Map;for(const i of t){const s=i.transform,o=n.data.field(i.field);r.set(i.field,gR(s,o,e))}return r}class xu extends Iu{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class TR extends Iu{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/** 2041 * @license 2042 * Copyright 2017 Google LLC 2043 * 2044 * Licensed under the Apache License, Version 2.0 (the "License"); 2045 * you may not use this file except in compliance with the License. 2046 * You may obtain a copy of the License at 2047 * 2048 * http://www.apache.org/licenses/LICENSE-2.0 2049 * 2050 * Unless required by applicable law or agreed to in writing, software 2051 * distributed under the License is distributed on an "AS IS" BASIS, 2052 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2053 * See the License for the specific language governing permissions and 2054 * limitations under the License. 2055 */class IR{constructor(e,n,r,i){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&wR(s,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=Zs(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=Zs(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=jw();return this.mutations.forEach(i=>{const s=e.get(i.key),o=s.overlayedDocument;let l=this.applyToLocalView(o,s.mutatedFields);l=n.has(i.key)?null:l;const u=Ww(o,l);u!==null&&r.set(i.key,u),o.isValidDocument()||o.convertToNoDocument(Y.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),ee())}isEqual(e){return this.batchId===e.batchId&&$i(this.mutations,e.mutations,(n,r)=>Ey(n,r))&&$i(this.baseMutations,e.baseMutations,(n,r)=>Ey(n,r))}}class Of{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){le(e.mutations.length===r.length);let i=function(){return dR}();const s=e.mutations;for(let o=0;o<s.length;o++)i=i.insert(s[o].key,r[o].version);return new Of(e,n,r,i)}}/** 2056 * @license 2057 * Copyright 2022 Google LLC 2058 * 2059 * Licensed under the Apache License, Version 2.0 (the "License"); 2060 * you may not use this file except in compliance with the License. 2061 * You may obtain a copy of the License at 2062 * 2063 * http://www.apache.org/licenses/LICENSE-2.0 2064 * 2065 * Unless required by applicable law or agreed to in writing, software 2066 * distributed under the License is distributed on an "AS IS" BASIS, 2067 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2068 * See the License for the specific language governing permissions and 2069 * limitations under the License. 2070 */class xR{constructor(e,n){this.largestBatchId=e,this.mutation=n}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ 2071 largestBatchId: ${this.largestBatchId}, 2072 mutation: ${this.mutation.toString()} 2073 }`}}/** 2074 * @license 2075 * Copyright 2017 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 SR{constructor(e,n){this.count=e,this.unchangedNames=n}}/** 2089 * @license 2090 * Copyright 2017 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 */var Pe,ne;function AR(t){switch(t){default:return K();case L.CANCELLED:case L.UNKNOWN:case L.DEADLINE_EXCEEDED:case L.RESOURCE_EXHAUSTED:case L.INTERNAL:case L.UNAVAILABLE:case L.UNAUTHENTICATED:return!1;case L.INVALID_ARGUMENT:case L.NOT_FOUND:case L.ALREADY_EXISTS:case L.PERMISSION_DENIED:case L.FAILED_PRECONDITION:case L.ABORTED:case L.OUT_OF_RANGE:case L.UNIMPLEMENTED:case L.DATA_LOSS:return!0}}function Gw(t){if(t===void 0)return Pn("GRPC error has no .code"),L.UNKNOWN;switch(t){case Pe.OK:return L.OK;case Pe.CANCELLED:return L.CANCELLED;case Pe.UNKNOWN:return L.UNKNOWN;case Pe.DEADLINE_EXCEEDED:return L.DEADLINE_EXCEEDED;case Pe.RESOURCE_EXHAUSTED:return L.RESOURCE_EXHAUSTED;case Pe.INTERNAL:return L.INTERNAL;case Pe.UNAVAILABLE:return L.UNAVAILABLE;case Pe.UNAUTHENTICATED:return L.UNAUTHENTICATED;case Pe.INVALID_ARGUMENT:return L.INVALID_ARGUMENT;case Pe.NOT_FOUND:return L.NOT_FOUND;case Pe.ALREADY_EXISTS:return L.ALREADY_EXISTS;case Pe.PERMISSION_DENIED:return L.PERMISSION_DENIED;case Pe.FAILED_PRECONDITION:return L.FAILED_PRECONDITION;case Pe.ABORTED:return L.ABORTED;case Pe.OUT_OF_RANGE:return L.OUT_OF_RANGE;case Pe.UNIMPLEMENTED:return L.UNIMPLEMENTED;case Pe.DATA_LOSS:return L.DATA_LOSS;default:return K()}}(ne=Pe||(Pe={}))[ne.OK=0]="OK",ne[ne.CANCELLED=1]="CANCELLED",ne[ne.UNKNOWN=2]="UNKNOWN",ne[ne.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",ne[ne.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",ne[ne.NOT_FOUND=5]="NOT_FOUND",ne[ne.ALREADY_EXISTS=6]="ALREADY_EXISTS",ne[ne.PERMISSION_DENIED=7]="PERMISSION_DENIED",ne[ne.UNAUTHENTICATED=16]="UNAUTHENTICATED",ne[ne.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",ne[ne.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",ne[ne.ABORTED=10]="ABORTED",ne[ne.OUT_OF_RANGE=11]="OUT_OF_RANGE",ne[ne.UNIMPLEMENTED=12]="UNIMPLEMENTED",ne[ne.INTERNAL=13]="INTERNAL",ne[ne.UNAVAILABLE=14]="UNAVAILABLE",ne[ne.DATA_LOSS=15]="DATA_LOSS";/** 2104 * @license 2105 * Copyright 2023 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 */function kR(){return new TextEncoder}/** 2119 * @license 2120 * Copyright 2022 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 */const CR=new Mr([4294967295,4294967295],0);function xy(t){const e=kR().encode(t),n=new mw;return n.update(e),new Uint8Array(n.digest())}function Sy(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new Mr([n,r],0),new Mr([i,s],0)]}class Vf{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Ls(`Invalid padding: ${n}`);if(r<0)throw new Ls(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Ls(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Ls(`Invalid padding when bitmap length is 0: ${n}`);this.Ie=8*e.length-n,this.Te=Mr.fromNumber(this.Ie)}Ee(e,n,r){let i=e.add(n.multiply(Mr.fromNumber(r)));return i.compare(CR)===1&&(i=new Mr([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Te).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Ie===0)return!1;const n=xy(e),[r,i]=Sy(n);for(let s=0;s<this.hashCount;s++){const o=this.Ee(r,i,s);if(!this.de(o))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new Vf(s,i,n);return r.forEach(l=>o.insert(l)),o}insert(e){if(this.Ie===0)return;const n=xy(e),[r,i]=Sy(n);for(let s=0;s<this.hashCount;s++){const o=this.Ee(r,i,s);this.Ae(o)}}Ae(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}
2133class Ls extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** 2134 * @license 2135 * Copyright 2017 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 Su{constructor(e,n,r,i,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,Wo.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new Su(Y.min(),i,new Ie(se),Nn(),ee())}}class Wo{constructor(e,n,r,i,s){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new Wo(r,n,ee(),ee(),ee())}}/** 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 */class ol{constructor(e,n,r,i){this.Re=e,this.removedTargetIds=n,this.key=r,this.Ve=i}}class Kw{constructor(e,n){this.targetId=e,this.me=n}}class Qw{constructor(e,n,r=We.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class Ay{constructor(){this.fe=0,this.ge=Cy(),this.pe=We.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return this.fe!==0}get be(){return this.we}De(e){e.approximateByteSize()>0&&(this.we=!0,this.pe=e)}ve(){let e=ee(),n=ee(),r=ee();return this.ge.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:K()}}),new Wo(this.pe,this.ye,e,n,r)}Ce(){this.we=!1,this.ge=Cy()}Fe(e,n){this.we=!0,this.ge=this.ge.insert(e,n)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,le(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class RR{constructor(e){this.Le=e,this.Be=new Map,this.ke=Nn(),this.qe=ky(),this.Qe=new Ie(se)}Ke(e){for(const n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(n,e.Ve):this.Ue(n,e.key,e.Ve);for(const n of e.removedTargetIds)this.Ue(n,e.key,e.Ve)}We(e){this.forEachTarget(e,n=>{const r=this.Ge(n);switch(e.state){case 0:this.ze(n)&&r.De(e.resumeToken);break;case 1:r.Oe(),r.Se||r.Ce(),r.De(e.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(n);break;case 3:this.ze(n)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.ze(n)&&(this.je(n),r.De(e.resumeToken));break;default:K()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((r,i)=>{this.ze(i)&&n(i)})}He(e){const n=e.targetId,r=e.me.count,i=this.Je(n);if(i){const s=i.target;if(Yh(s))if(r===0){const o=new H(s.path);this.Ue(n,o,et.newNoDocument(o,Y.min()))}else le(r===1);else{const o=this.Ye(n);if(o!==r){const l=this.Ze(e),u=l?this.Xe(l,e,o):1;if(u!==0){this.je(n);const h=u===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(n,h)}}}}}Ze(e){const n=e.me.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,l;try{o=Kr(r).toUint8Array()}catch(u){if(u instanceof xw)return Bi("Decoding the base64 bloom filter in existence filter failed ("+u.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw u}try{l=new Vf(o,i,s)}catch(u){return Bi(u instanceof Ls?"BloomFilter error: ":"Applying bloom filter failed: ",u),null}return l.Ie===0?null:l}Xe(e,n,r){return n.me.count===r-this.nt(e,n.targetId)?0:2}nt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let i=0;return r.forEach(s=>{const o=this.Le.tt(),l=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(l)||(this.Ue(n,s,null),i++)}),i}rt(e){const n=new Map;this.Be.forEach((s,o)=>{const l=this.Je(o);if(l){if(s.current&&Yh(l.target)){const u=new H(l.target.path);this.ke.get(u)!==null||this.it(o,u)||this.Ue(o,u,et.newNoDocument(u,e))}s.be&&(n.set(o,s.ve()),s.Ce())}});let r=ee();this.qe.forEach((s,o)=>{let l=!0;o.forEachWhile(u=>{const h=this.Je(u);return!h||h.purpose==="TargetPurposeLimboResolution"||(l=!1,!1)}),l&&(r=r.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(e));const i=new Su(e,n,this.Qe,this.ke,r);return this.ke=Nn(),this.qe=ky(),this.Qe=new Ie(se),i}$e(e,n){if(!this.ze(e))return;const r=this.it(e,n.key)?2:0;this.Ge(e).Fe(n.key,r),this.ke=this.ke.insert(n.key,n),this.qe=this.qe.insert(n.key,this.st(n.key).add(e))}Ue(e,n,r){if(!this.ze(e))return;const i=this.Ge(e);this.it(e,n)?i.Fe(n,1):i.Me(n),this.qe=this.qe.insert(n,this.st(n).delete(e)),r&&(this.ke=this.ke.insert(n,r))}removeTarget(e){this.Be.delete(e)}Ye(e){const n=this.Ge(e).ve();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let n=this.Be.get(e);return n||(n=new Ay,this.Be.set(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new $e(se),this.qe=this.qe.insert(e,n)),n}ze(e){const n=this.Je(e)!==null;return n||W("WatchChangeAggregator","Detected inactive target",e),n}Je(e){const n=this.Be.get(e);return n&&n.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new Ay),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.Ue(e,n,null)})}it(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function ky(){return new Ie(H.comparator)}function Cy(){return new Ie(H.comparator)}const PR={asc:"ASCENDING",desc:"DESCENDING"},NR={"<":"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"},bR={and:"AND",or:"OR"};class DR{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function Jh(t,e){return t.useProto3Json||vu(e)?e:{value:e}}function ql(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Yw(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function OR(t,e){return ql(t,e.toTimestamp())}function en(t){return le(!!t),Y.fromTimestamp(function(n){const r=fr(n);return new oe(r.seconds,r.nanos)}(t))}function Lf(t,e){return Zh(t,e).canonicalString()}function Zh(t,e){const n=function(i){return new me(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function Xw(t){const e=me.fromString(t);return le(nE(e)),e}function ed(t,e){return Lf(t.databaseId,e.path)}function jc(t,e){const n=Xw(e);if(n.get(1)!==t.databaseId.projectId)throw new $(L.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new $(L.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new H(Zw(n))}function Jw(t,e){return Lf(t.databaseId,e)}function VR(t){const e=Xw(t);return e.length===4?me.emptyPath():Zw(e)}function td(t){return new me(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function Zw(t){return le(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function Ry(t,e,n){return{name:ed(t,e),fields:n.value.mapValue.fields}}function LR(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(h){return h==="NO_CHANGE"?0:h==="ADD"?1:h==="REMOVE"?2:h==="CURRENT"?3:h==="RESET"?4:K()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(h,p){return h.useProto3Json?(le(p===void 0||typeof p=="string"),We.fromBase64String(p||"")):(le(p===void 0||p instanceof Buffer||p instanceof Uint8Array),We.fromUint8Array(p||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,l=o&&function(h){const p=h.code===void 0?L.UNKNOWN:Gw(h.code);return new $(p,h.message||"")}(o);n=new Qw(r,i,s,l||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=jc(t,r.document.name),s=en(r.document.updateTime),o=r.document.createTime?en(r.document.createTime):Y.min(),l=new ft({mapValue:{fields:r.document.fields}}),u=et.newFoundDocument(i,s,o,l),h=r.targetIds||[],p=r.removedTargetIds||[];n=new ol(h,p,u.key,u)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=jc(t,r.document),s=r.readTime?en(r.readTime):Y.min(),o=et.newNoDocument(i,s),l=r.removedTargetIds||[];n=new ol([],l,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=jc(t,r.document),s=r.removedTargetIds||[];n=new ol([],s,i,null)}else{if(!("filter"in e))return K();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new SR(i,s),l=r.targetId;n=new Kw(l,o)}}return n}function jR(t,e){let n;if(e instanceof qo)n={update:Ry(t,e.key,e.value)};else if(e instanceof xu)n={delete:ed(t,e.key)};else if(e instanceof wr)n={update:Ry(t,e.key,e.data),updateMask:HR(e.fieldMask)};else{if(!(e instanceof TR))return K();n={verify:ed(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const l=o.transform;if(l instanceof ko)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof Co)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof Ro)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof Po)return{fieldPath:o.field.canonicalString(),increment:l.Pe};throw K()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:OR(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:K()}(t,e.precondition)),n}function MR(t,e){return t&&t.length>0?(le(e!==void 0),t.map(n=>function(i,s){let o=i.updateTime?en(i.updateTime):en(s);return o.isEqual(Y.min())&&(o=en(s)),new _R(o,i.transformResults||[])}(n,e))):[]}function FR(t,e){return{documents:[Jw(t,e.path)]}}function UR(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=Jw(t,i);const s=function(h){if(h.length!==0)return tE(qt.create(h,"and"))}(e.filters);s&&(n.structuredQuery.where=s);const o=function(h){if(h.length!==0)return h.map(p=>function(g){return{field:ui(g.field),direction:$R(g.dir)}}(p))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const l=Jh(t,e.limit);return l!==null&&(n.structuredQuery.limit=l),e.startAt&&(n.structuredQuery.startAt=function(h){return{before:h.inclusive,values:h.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(h){return{before:!h.inclusive,values:h.position}}(e.endAt)),{_t:n,parent:i}}function zR(t){let e=VR(t.parent);
2163const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){le(r===1);const p=n.from[0];p.allDescendants?i=p.collectionId:e=e.child(p.collectionId)}let s=[];n.where&&(s=function(m){const g=eE(m);return g instanceof qt&&Cw(g)?g.getFilters():[g]}(n.where));let o=[];n.orderBy&&(o=function(m){return m.map(g=>function(C){return new Ao(ci(C.field),function(R){switch(R){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(C.direction))}(g))}(n.orderBy));let l=null;n.limit&&(l=function(m){let g;return g=typeof m=="object"?m.value:m,vu(g)?null:g}(n.limit));let u=null;n.startAt&&(u=function(m){const g=!!m.before,A=m.values||[];return new Bl(A,g)}(n.startAt));let h=null;return n.endAt&&(h=function(m){const g=!m.before,A=m.values||[];return new Bl(A,g)}(n.endAt)),aR(e,i,o,s,l,"F",u,h)}function BR(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return K()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function eE(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=ci(n.unaryFilter.field);return be.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=ci(n.unaryFilter.field);return be.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=ci(n.unaryFilter.field);return be.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=ci(n.unaryFilter.field);return be.create(o,"!=",{nullValue:"NULL_VALUE"});default:return K()}}(t):t.fieldFilter!==void 0?function(n){return be.create(ci(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return K()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return qt.create(n.compositeFilter.filters.map(r=>eE(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return K()}}(n.compositeFilter.op))}(t):K()}function $R(t){return PR[t]}function qR(t){return NR[t]}function WR(t){return bR[t]}function ui(t){return{fieldPath:t.canonicalString()}}function ci(t){return ze.fromServerFormat(t.fieldPath)}function tE(t){return t instanceof be?function(n){if(n.op==="=="){if(my(n.value))return{unaryFilter:{field:ui(n.field),op:"IS_NAN"}};if(py(n.value))return{unaryFilter:{field:ui(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(my(n.value))return{unaryFilter:{field:ui(n.field),op:"IS_NOT_NAN"}};if(py(n.value))return{unaryFilter:{field:ui(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ui(n.field),op:qR(n.op),value:n.value}}}(t):t instanceof qt?function(n){const r=n.getFilters().map(i=>tE(i));return r.length===1?r[0]:{compositeFilter:{op:WR(n.op),filters:r}}}(t):K()}function HR(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function nE(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** 2164 * @license 2165 * Copyright 2017 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 Yn{constructor(e,n,r,i,s=Y.min(),o=Y.min(),l=We.EMPTY_BYTE_STRING,u=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=l,this.expectedCount=u}withSequenceNumber(e){return new Yn(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new Yn(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Yn(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Yn(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** 2179 * @license 2180 * Copyright 2017 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 GR{constructor(e){this.ct=e}}function KR(t){const e=zR({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?$l(e,e.limit,"L"):e}/** 2194 * @license 2195 * Copyright 2019 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 QR{constructor(){this.un=new YR}addToCollectionParentIndex(e,n){return this.un.add(n),M.resolve()}getCollectionParents(e,n){return M.resolve(this.un.getEntries(n))}addFieldIndex(e,n){return M.resolve()}deleteFieldIndex(e,n){return M.resolve()}deleteAllFieldIndexes(e){return M.resolve()}createTargetIndexes(e,n){return M.resolve()}getDocumentsMatchingTarget(e,n){return M.resolve(null)}getIndexType(e,n){return M.resolve(0)}getFieldIndexes(e,n){return M.resolve([])}getNextCollectionGroupToUpdate(e){return M.resolve(null)}getMinOffset(e,n){return M.resolve(dr.min())}getMinOffsetFromCollectionGroup(e,n){return M.resolve(dr.min())}updateCollectionGroup(e,n,r){return M.resolve()}updateIndexEntries(e,n){return M.resolve()}}class YR{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new $e(me.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new $e(me.comparator)).toArray()}}/** 2209 * @license 2210 * Copyright 2017 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 */class Hi{constructor(e){this.Ln=e}next(){return this.Ln+=2,this.Ln}static Bn(){return new Hi(0)}static kn(){return new Hi(-1)}}/** 2224 * @license 2225 * Copyright 2017 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 */class XR{constructor(){this.changes=new is(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,et.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?M.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}
2238assertNotApplied(){}}/** 2239 * @license 2240 * Copyright 2017 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 *//** 2254 * @license 2255 * Copyright 2022 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, software 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 */class JR{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** 2269 * @license 2270 * Copyright 2017 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 */class ZR{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&Zs(r.mutation,i,Et.empty(),oe.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,ee()).next(()=>r))}getLocalViewOfDocuments(e,n,r=ee()){const i=Or();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=Vs();return s.forEach((l,u)=>{o=o.insert(l,u.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=Or();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,ee()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,l)=>{n.set(o,l)})})}computeViews(e,n,r,i){let s=Nn();const o=Js(),l=function(){return Js()}();return n.forEach((u,h)=>{const p=r.get(h.key);i.has(h.key)&&(p===void 0||p.mutation instanceof wr)?s=s.insert(h.key,h):p!==void 0?(o.set(h.key,p.mutation.getFieldMask()),Zs(p.mutation,h,p.mutation.getFieldMask(),oe.now())):o.set(h.key,Et.empty())}),this.recalculateAndSaveOverlays(e,s).next(u=>(u.forEach((h,p)=>o.set(h,p)),n.forEach((h,p)=>{var m;return l.set(h,new JR(p,(m=o.get(h))!==null&&m!==void 0?m:null))}),l))}recalculateAndSaveOverlays(e,n){const r=Js();let i=new Ie((o,l)=>o-l),s=ee();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const l of o)l.keys().forEach(u=>{const h=n.get(u);if(h===null)return;let p=r.get(u)||Et.empty();p=l.applyToLocalView(h,p),r.set(u,p);const m=(i.get(l.batchId)||ee()).add(u);i=i.insert(l.batchId,m)})}).next(()=>{const o=[],l=i.getReverseIterator();for(;l.hasNext();){const u=l.getNext(),h=u.key,p=u.value,m=jw();p.forEach(g=>{if(!s.has(g)){const A=Ww(n.get(g),r.get(g));A!==null&&m.set(g,A),s=s.add(g)}}),o.push(this.documentOverlayCache.saveOverlays(e,h,m))}return M.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(o){return H.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):bw(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):M.resolve(Or());let l=-1,u=s;return o.next(h=>
vendor: 4,566 bytes, lines 2283-2317
2283M.forEach(h,(p,m)=>(l<m.largestBatchId&&(l=m.largestBatchId),s.get(p)?M.resolve():this.remoteDocumentCache.getEntry(e,p).next(g=>{u=u.insert(p,g)}))).next(()=>this.populateOverlays(e,h,s)).next(()=>this.computeViews(e,u,h,ee())).next(p=>({batchId:l,changes:Lw(p)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new H(n)).next(r=>{let i=Vs();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let o=Vs();return this.indexManager.getCollectionParents(e,s).next(l=>M.forEach(l,u=>{const h=function(m,g){return new rs(g,null,m.explicitOrderBy.slice(),m.filters.slice(),m.limit,m.limitType,m.startAt,m.endAt)}(n,u.child(s));return this.getDocumentsMatchingCollectionQuery(e,h,r,i).next(p=>{p.forEach((m,g)=>{o=o.insert(m,g)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i))).next(o=>{s.forEach((u,h)=>{const p=h.getKey();o.get(p)===null&&(o=o.insert(p,et.newInvalidDocument(p)))});let l=Vs();return o.forEach((u,h)=>{const p=s.get(u);p!==void 0&&Zs(p.mutation,h,Et.empty(),oe.now()),Eu(n,h)&&(l=l.insert(u,h))}),l})}}/** 2284 * @license 2285 * Copyright 2020 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 */class eP{constructor(e){this.serializer=e,this.hr=new Map,this.Pr=new Map}getBundleMetadata(e,n){return M.resolve(this.hr.get(n))}saveBundleMetadata(e,n){return this.hr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:en(i.createTime)}}(n)),M.resolve()}getNamedQuery(e,n){return M.resolve(this.Pr.get(n))}saveNamedQuery(e,n){return this.Pr.set(n.name,function(i){return{name:i.name,query:KR(i.bundledQuery),readTime:en(i.readTime)}}(n)),M.resolve()}}/** 2299 * @license 2300 * Copyright 2022 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 */class tP{constructor(){this.overlays=new Ie(H.comparator),this.Ir=new Map}getOverlay(e,n){return M.resolve(this.overlays.get(n))}getOverlays(e,n){const r=Or();return M.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.ht(e,n,s)}),M.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.Ir.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.Ir.delete(r)),M.resolve()}getOverlaysForCollection(e,n,r){const i=Or(),s=n.length+1,o=new H(n.child("")),l=this.overlays.getIteratorFrom(o);for(;l.hasNext();){const u=l.getNext().value,h=u.getKey();if(!n.isPrefixOf(h.path))break;h.path.length===s&&u.largestBatchId>r&&i.set(u.getKey(),u)}return M.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Ie((h,p)=>h-p);const o=this.overlays.getIterator();for(;o.hasNext();){const h=o.getNext().value;if(h.getKey().getCollectionGroup()===n&&h.largestBatchId>r){let p=s.get(h.largestBatchId);p===null&&(p=Or(),s=s.insert(h.largestBatchId,p)),p.set(h.getKey(),h)}}const l=Or(),u=s.getIterator();for(;u.hasNext()&&(u.getNext().value.forEach((h,p)=>l.set(h,p)),!(l.size()>=i)););return M.resolve(l)}ht(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.Ir.get(i.largestBatchId).delete(r.key);this.Ir.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new xR(n,r));let s=this.Ir.get(n);s===void 0&&(s=ee(),this.Ir.set(n,s)),this.Ir.set(n,s.add(r.key))}}/** 2314 * @license 2315 * Copyright 2024 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, software 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 */class nP{constructor(){this.sessionToken=We.EMPTY_BYTE_STRING}getSessionToken(e){return M.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,M.resolve()}}/** 2329 * @license 2330 * Copyright 2017 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 */class jf{constructor(){this.Tr=new $e(Ve.Er),this.dr=new $e(Ve.Ar)}isEmpty(){return this.Tr.isEmpty()}addReference(e,n){const r=new Ve(e,n);this.Tr=this.Tr.add(r),this.dr=this.dr.add(r)}Rr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.Vr(new Ve(e,n))}mr(e,n){e.forEach(r=>this.removeReference(r,n))}gr(e){const n=new H(new me([])),r=new Ve(n,e),i=new Ve(n,e+1),s=[];return this.dr.forEachInRange([r,i],o=>{this.Vr(o),s.push(o.key)}),s}pr(){this.Tr.forEach(e=>this.Vr(e))}Vr(e){this.Tr=this.Tr.delete(e),this.dr=this.dr.delete(e)}yr(e){const n=new H(new me([])),r=new Ve(n,e),i=new Ve(n,e+1);let s=ee();return this.dr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new Ve(e,0),r=this.Tr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class Ve{constructor(e,n){this.key=e,this.wr=n}static Er(e,n){return H.comparator(e.key,n.key)||se(e.wr,n.wr)}static Ar(e,n){return se(e.wr,n.wr)||H.comparator(e.key,n.key)}}/** 2344 * @license 2345 * Copyright 2017 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 */class rP{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.Sr=1,this.br=new $e(Ve.Er)}checkEmpty(e){return M.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.Sr;this.Sr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new IR(s,n,r,i);this.mutationQueue.push(o);for(const l of i)this.br=this.br.add(new Ve(l.key,s)),this.indexManager.addToCollectionParentIndex(e,l.key.path.popLast());return M.resolve(o)}lookupMutationBatch(e,n){return M.resolve(this.Dr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.vr(r),s=i<0?0:i;return M.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return M.resolve(this.mutationQueue.length===0?-1:this.Sr-1)}getAllMutationBatches(e){return M.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new Ve(n,0),i=new Ve(n,Number.POSITIVE_INFINITY),s=[];return this.br.forEachInRange([r,i],o=>{const l=this.Dr(o.wr);s.push(l)}),M.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new $e(se);return n.forEach(i=>{const s=new Ve(i,0),o=new Ve(i,Number.POSITIVE_INFINITY);this.br.forEachInRange([s,o],l=>{r=r.add(l.wr)})}),M.resolve(this.Cr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;H.isDocumentKey(s)||(s=s.child(""));const o=new Ve(new H(s),0);let l=new $e(se);return this.br.forEachWhile(u=>{const h=u.key.path;return!!r.isPrefixOf(h)&&(h.length===i&&(l=l.add(u.wr)),!0)},o),M.resolve(this.Cr(l))}Cr(e){const n=[];return e.forEach(r=>{const i=this.Dr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){le(this.Fr(n.batchId,"removed")===0),this.mutation
2358Queue.shift();let r=this.br;return M.forEach(n.mutations,i=>{const s=new Ve(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.br=r})}On(e){}containsKey(e,n){const r=new Ve(n,0),i=this.br.firstAfterOrEqual(r);return M.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,M.resolve()}Fr(e,n){return this.vr(e)}vr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Dr(e){const n=this.vr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** 2359 * @license 2360 * Copyright 2017 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 */class iP{constructor(e){this.Mr=e,this.docs=function(){return new Ie(H.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.Mr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return M.resolve(r?r.document.mutableCopy():et.newInvalidDocument(n))}getEntries(e,n){let r=Nn();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():et.newInvalidDocument(i))}),M.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=Nn();const o=n.path,l=new H(o.child("")),u=this.docs.getIteratorFrom(l);for(;u.hasNext();){const{key:h,value:{document:p}}=u.getNext();if(!o.isPrefixOf(h.path))break;h.path.length>o.length+1||BC(zC(p),r)<=0||(i.has(p.key)||Eu(n,p))&&(s=s.insert(p.key,p.mutableCopy()))}return M.resolve(s)}getAllFromCollectionGroup(e,n,r,i){K()}Or(e,n){return M.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new sP(this)}getSize(e){return M.resolve(this.size)}}class sP extends XR{constructor(e){super(),this.cr=e}applyChanges(e){const n=[];
vendor: 9,789 bytes, lines 2373-2448
2373return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.cr.addEntry(e,i)):this.cr.removeEntry(r)}),M.waitFor(n)}getFromCache(e,n){return this.cr.getEntry(e,n)}getAllFromCache(e,n){return this.cr.getEntries(e,n)}}/** 2374 * @license 2375 * Copyright 2017 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 */class oP{constructor(e){this.persistence=e,this.Nr=new is(n=>Nf(n),bf),this.lastRemoteSnapshotVersion=Y.min(),this.highestTargetId=0,this.Lr=0,this.Br=new jf,this.targetCount=0,this.kr=Hi.Bn()}forEachTarget(e,n){return this.Nr.forEach((r,i)=>n(i)),M.resolve()}getLastRemoteSnapshotVersion(e){return M.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return M.resolve(this.Lr)}allocateTargetId(e){return this.highestTargetId=this.kr.next(),M.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Lr&&(this.Lr=n),M.resolve()}Kn(e){this.Nr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.kr=new Hi(n),this.highestTargetId=n),e.sequenceNumber>this.Lr&&(this.Lr=e.sequenceNumber)}addTargetData(e,n){return this.Kn(n),this.targetCount+=1,M.resolve()}updateTargetData(e,n){return this.Kn(n),M.resolve()}removeTargetData(e,n){return this.Nr.delete(n.target),this.Br.gr(n.targetId),this.targetCount-=1,M.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Nr.forEach((o,l)=>{l.sequenceNumber<=n&&r.get(l.targetId)===null&&(this.Nr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,l.targetId)),i++)}),M.waitFor(s).next(()=>i)}getTargetCount(e){return M.resolve(this.targetCount)}getTargetData(e,n){const r=this.Nr.get(n)||null;return M.resolve(r)}addMatchingKeys(e,n,r){return this.Br.Rr(n,r),M.resolve()}removeMatchingKeys(e,n,r){this.Br.mr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),M.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Br.gr(n),M.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Br.yr(n);return M.resolve(r)}containsKey(e,n){return M.resolve(this.Br.containsKey(n))}}/** 2389 * @license 2390 * Copyright 2017 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 */class aP{constructor(e,n){this.qr={},this.overlays={},this.Qr=new kf(0),this.Kr=!1,this.Kr=!0,this.$r=new nP,this.referenceDelegate=e(this),this.Ur=new oP(this),this.indexManager=new QR,this.remoteDocumentCache=function(i){return new iP(i)}(r=>this.referenceDelegate.Wr(r)),this.serializer=new GR(n),this.Gr=new eP(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Kr=!1,Promise.resolve()}get started(){return this.Kr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new tP,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.qr[e.toKey()];return r||(r=new rP(n,this.referenceDelegate),this.qr[e.toKey()]=r),r}getGlobalsCache(){return this.$r}getTargetCache(){return this.Ur}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Gr}runTransaction(e,n,r){W("MemoryPersistence","Starting transaction:",e);const i=new lP(this.Qr.next());return this.referenceDelegate.zr(),r(i).next(s=>this.referenceDelegate.jr(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Hr(e,n){return M.or(Object.values(this.qr).map(r=>()=>r.containsKey(e,n)))}}class lP extends qC{constructor(e){super(),this.currentSequenceNumber=e}}class Mf{constructor(e){this.persistence=e,this.Jr=new jf,this.Yr=null}static Zr(e){return new Mf(e)}get Xr(){if(this.Yr)return this.Yr;throw K()}addReference(e,n,r){return this.Jr.addReference(r,n),this.Xr.delete(r.toString()),M.resolve()}removeReference(e,n,r){return this.Jr.removeReference(r,n),this.Xr.add(r.toString()),M.resolve()}markPotentiallyOrphaned(e,n){return this.Xr.add(n.toString()),M.resolve()}removeTarget(e,n){this.Jr.gr(n.targetId).forEach(i=>this.Xr.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.Xr.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}zr(){this.Yr=new Set}jr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return M.forEach(this.Xr,r=>{const i=H.fromPath(r);return this.ei(e,i).next(s=>{s||n.removeEntry(i,Y.min())})}).next(()=>(this.Yr=null,n.apply(e)))}updateLimboDocument(e,n){return this.ei(e,n).next(r=>{r?this.Xr.delete(n.toString()):this.Xr.add(n.toString())})}Wr(e){return 0}ei(e,n){return M.or([()=>M.resolve(this.Jr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Hr(e,n)])}}/** 2404 * @license 2405 * Copyright 2017 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 */class Ff{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.$i=r,this.Ui=i}static Wi(e,n){let r=ee(),i=ee();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new Ff(e,n.fromCache,r,i)}}/** 2419 * @license 2420 * Copyright 2023 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 */class uP{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** 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 */class cP{constructor(){this.Gi=!1,this.zi=!1,this.ji=100,this.Hi=function(){return gS()?8:WC(rt())>0?6:4}()}initialize(e,n){this.Ji=e,this.indexManager=n,this.Gi=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.Yi(e,n).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Zi(e,n,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new uP;return this.Xi(e,n,o).next(l=>{if(s.result=l,this.zi)return this.es(e,n,o,l.size)})}).next(()=>s.result)}es(e,n,r,i){return r.documentReadCount<this.ji?(Cs()<=te.DEBUG&&W("QueryEngine","SDK will not create cache indexes for query:",li(n),"since it only creates cache indexes for collection contains","more than or equal to",this.ji,"documents"),M.resolve()):(Cs()<=te.DEBUG&&W("QueryEngine","Query:",li(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.Hi*i?(Cs()<=te.DEBUG&&W("QueryEngine","The SDK decides to create cache indexes for query:",li(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Zt(n))):M.resolve())}Yi(e,n){if(_y(n))return M.resolve(null);let r=Zt(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=$l(n,null,"F"),r=Zt(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=ee(...s);return this.Ji.getDocuments(e,o).next(l=>this.indexManager.getMinOffset(e,r).next(u=>{const h=this.ts(n,l);return this.ns(n,h,o,u.readTime)?this.Yi(e,$l(n,null,"F")):this.rs(e,h,n,u)}))})))}Zi(e,n,r,i){return _y(n)||i.isEqual(Y.min())?M.resolve(null):this.Ji.getDocuments(e,r).next(s=>{const o=this.ts(n,s);return this.ns(n,o,r,i)?M.resolve(null):(Cs()<=te.DEBUG&&W("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),li(n)),this.rs(e,o,n,UC(i,-1)).next(l=>l))})}ts(e,n){let r=new $e(Ow(e));
2448return n.forEach((i,s)=>{Eu(e,s)&&(r=r.add(s))}),r}ns(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Xi(e,n,r){return Cs()<=te.DEBUG&&W("QueryEngine","Using full collection scan to execute query:",li(n)),this.Ji.getDocumentsMatchingQuery(e,n,dr.min(),r)}rs(e,n,r,i){return this.Ji.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** 2449 * @license 2450 * Copyright 2020 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 */class hP{constructor(e,n,r,i){this.persistence=e,this.ss=n,this.serializer=i,this.os=new Ie(se),this._s=new is(s=>Nf(s),bf),this.us=new Map,this.cs=e.getRemoteDocumentCache(),this.Ur=e.getTargetCache(),this.Gr=e.getBundleCache(),this.ls(r)}ls(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new ZR(this.cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.cs.setIndexManager(this.indexManager),this.ss.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.os))}}function dP(t,e,n,r){return new hP(t,e,n,r)}async function rE(t,e){const n=X(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;
2463return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n.ls(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],l=[];let u=ee();for(const h of i){o.push(h.batchId);for(const p of h.mutations)u=u.add(p.key)}for(const h of s){l.push(h.batchId);for(const p of h.mutations)u=u.add(p.key)}return n.localDocuments.getDocuments(r,u).next(h=>({hs:h,removedBatchIds:o,addedBatchIds:l}))})})}function fP(t,e){const n=X(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=n.cs.newChangeBuffer({trackRemovals:!0});return function(l,u,h,p){const m=h.batch,g=m.keys();let A=M.resolve();return g.forEach(C=>{A=A.next(()=>p.getEntry(u,C)).next(N=>{const R=h.docVersions.get(C);le(R!==null),N.version.compareTo(R)<0&&(m.applyToRemoteDocument(N,h),N.isValidDocument()&&(N.setReadTime(h.commitVersion),p.addEntry(N)))})}),A.next(()=>l.mutationQueue.removeMutationBatch(u,m))}(n,r,e,s).next(()=>s.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(l){let u=ee();for(let h=0;h<l.mutationResults.length;++h)l.mutationResults[h].transformResults.length>0&&(u=u.add(l.batch.mutations[h].key));return u}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function iE(t){const e=X(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Ur.getLastRemoteSnapshotVersion(n))}function pP(t,e){const n=X(t),r=e.snapshotVersion;let i=n.os;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.cs.newChangeBuffer({trackRemovals:!0});i=n.os;const l=[];
vendor: 4,413 bytes, lines 2463-2467
2463e.targetChanges.forEach((p,m)=>{const g=i.get(m);if(!g)return;l.push(n.Ur.removeMatchingKeys(s,p.removedDocuments,m).next(()=>n.Ur.addMatchingKeys(s,p.addedDocuments,m)));let A=g.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(m)!==null?A=A.withResumeToken(We.EMPTY_BYTE_STRING,Y.min()).withLastLimboFreeSnapshotVersion(Y.min()):p.resumeToken.approximateByteSize()>0&&(A=A.withResumeToken(p.resumeToken,r)),i=i.insert(m,A),function(N,R,w){return N.resumeToken.approximateByteSize()===0||R.snapshotVersion.toMicroseconds()-N.snapshotVersion.toMicroseconds()>=3e8?!0:w.addedDocuments.size+w.modifiedDocuments.size+w.removedDocuments.size>0}(g,A,p)&&l.push(n.Ur.updateTargetData(s,A))});let u=Nn(),h=ee();if(e.documentUpdates.forEach(p=>{e.resolvedLimboDocuments.has(p)&&l.push(n.persistence.referenceDelegate.updateLimboDocument(s,p))}),l.push(mP(s,o,e.documentUpdates).next(p=>{u=p.Ps,h=p.Is})),!r.isEqual(Y.min())){const p=n.Ur.getLastRemoteSnapshotVersion(s).next(m=>n.Ur.setTargetsMetadata(s,s.currentSequenceNumber,r));l.push(p)}return M.waitFor(l).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,u,h)).next(()=>u)}).then(s=>(n.os=i,s))}function mP(t,e,n){let r=ee(),i=ee();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=Nn();return n.forEach((l,u)=>{const h=s.get(l);u.isFoundDocument()!==h.isFoundDocument()&&(i=i.add(l)),u.isNoDocument()&&u.version.isEqual(Y.min())?(e.removeEntry(l,u.readTime),o=o.insert(l,u)):!h.isValidDocument()||u.version.compareTo(h.version)>0||u.version.compareTo(h.version)===0&&h.hasPendingWrites?(e.addEntry(u),o=o.insert(l,u)):W("LocalStore","Ignoring outdated watch update for ",l,". Current version:",h.version," Watch version:",u.version)}),{Ps:o,Is:i}})}function gP(t,e){const n=X(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function yP(t,e){const n=X(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Ur.getTargetData(r,e).next(s=>s?(i=s,M.resolve(i)):n.Ur.allocateTargetId(r).next(o=>(i=new Yn(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Ur.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.os.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.os=n.os.insert(r.targetId,r),n._s.set(e,r.targetId)),r})}async function nd(t,e,n){const r=X(t),i=r.os.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!$o(o))throw o;W("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.os=r.os.remove(e),r._s.delete(i.target)}function Py(t,e,n){const r=X(t);let i=Y.min(),s=ee();return r.persistence.runTransaction("Execute query","readwrite",o=>function(u,h,p){const m=X(u),g=m._s.get(p);return g!==void 0?M.resolve(m.os.get(g)):m.Ur.getTargetData(h,p)}(r,o,Zt(e)).next(l=>{if(l)return i=l.lastLimboFreeSnapshotVersion,r.Ur.getMatchingKeysForTargetId(o,l.targetId).next(u=>{s=u})}).next(()=>r.ss.getDocumentsMatchingQuery(o,e,n?i:Y.min(),n?s:ee())).next(l=>(vP(r,uR(e),l),{documents:l,Ts:s})))}function vP(t,e,n){let r=t.us.get(e)||Y.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.us.set(e,r)}class Ny{constructor(){this.activeTargetIds=mR()}fs(e){this.activeTargetIds=this.activeTargetIds.add(e)}gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Vs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class _P{constructor(){this.so=new Ny,this.oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e,n=!0){return n&&this.so.fs(e),this.oo[e]||"not-current"}updateQueryState(e,n,r){this.oo[e]=n}removeLocalQueryTarget(e){this.so.gs(e)}isLocalQueryTarget(e){return this.so.activeTargetIds.has(e)}clearQueryState(e){delete this.oo[e]}getAllActiveQueryTargets(){return this.so.activeTargetIds}isActiveQueryTarget(e){return this.so.activeTargetIds.has(e)}start(){return this.so=new Ny,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(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 */class wP{_o(e){}shutdown(){}}/** 2479 * @license 2480 * Copyright 2019 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 */class by{constructor(){this.ao=()=>this.uo(),this.co=()=>this.lo(),this.ho=[],this.Po()}_o(e){this.ho.push(e)}shutdown(){window.removeEventListener("online",this.ao),window.removeEventListener("offline",this.co)}Po(){window.addEventListener("online",this.ao),window.addEventListener("offline",this.co)}uo(){W("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.ho)e(0)}lo(){W("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.ho)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 2494 * @license 2495 * Copyright 2023 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 */let Fa=null;function Mc(){return Fa===null?Fa=function(){return 268435456+Math.round(2147483648*Math.random())}():Fa++,"0x"+Fa.toString(16)}/** 2509 * @license 2510 * Copyright 2020 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 EP={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** 2524 * @license 2525 * Copyright 2017 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 */class TP{constructor(e){this.Io=e.Io,this.To=e.To}Eo(e){this.Ao=e}Ro(e){this.Vo=e}mo(e){this.fo=e}onMessage(e){this.po=e}close(){this.To()}send(e){this.Io(e)}yo(){this.Ao()}wo(){this.Vo()}So(e){this.fo(e)}bo(e){this.po(e)}}/** 2539 * @license 2540 * Copyright 2017 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 */const Xe="WebChannelConnection";class IP extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.Do=r+"://"+n.host,this.vo=`projects/${i}/databases/${s}`,this.Co=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}get Fo(){return!1}Mo(n,r,i,s,o){const l=Mc(),u=this.xo(n,r.toUriEncodedString());W("RestConnection",`Sending RPC '${n}' ${l}:`,u,i);const h={"google-cloud-resource-prefix":this.vo,"x-goog-request-params":this.Co};return this.Oo(h,s,o),this.No(n,u,h,i).then(p=>(W("RestConnection",`Received RPC '${n}' ${l}: `,p),p),p=>{throw Bi("RestConnection",`RPC '${n}' ${l} failed with error: `,p,"url: ",u,"request:",i),p})}Lo(n,r,i,s,o,l){return this.Mo(n,r,i,s,o)}Oo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+ns}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>n[o]=s),i&&i.headers.forEach((s,o)=>n[o]=s)}xo(n,r){const i=EP[n];return`${this.Do}/v1/${r}:${i}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}No(e,n,r,i){const s=Mc();return new Promise((o,l)=>{const u=new gw;u.setWithCredentials(!0),u.listenOnce(yw.COMPLETE,()=>{try{switch(u.getLastErrorCode()){case rl.NO_ERROR:const p=u.getResponseJson();W(Xe,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(p)),o(p);break;case rl.TIMEOUT:W(Xe,`RPC '${e}' ${s} timed out`),l(new $(L.DEADLINE_EXCEEDED,"Request time out"));break;case rl.HTTP_ERROR:const m=u.getStatus();if(W(Xe,`RPC '${e}' ${s} failed with status:`,m,"response text:",u.getResponseText()),m>0){let g=u.getResponseJson();Array.isArray(g)&&(g=g[0]);const A=g==null?void 0:g.error;if(A&&A.status&&A.message){const C=function(R){const w=R.toLowerCase().replace(/_/g,"-");return Object.values(L).indexOf(w)>=0?w:L.UNKNOWN}(A.status);l(new $(C,A.message))}else l(new $(L.UNKNOWN,"Server responded with status "+u.getStatus()))}else l(new $(L.UNAVAILABLE,"Connection failed."));break;default:K()}}finally{W(Xe,`RPC '${e}' ${s} completed.`)}});const h=JSON.stringify(i);W(Xe,`RPC '${e}' ${s} sending request:`,i),u.send(n,"POST",h,r,15)})}Bo(e,n,r){const i=Mc(),s=[this.Do,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=ww(),l=_w(),u={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},h=this.longPollingOptions.timeoutSeconds;h!==void 0&&(u.longPollingTimeout=Math.round(1e3*h)),this.useFetchStreams&&(u.useFetchStreams=!0),this.Oo(u.initMessageHeaders,n,r),u.encodeInitMessageHeaders=!0;const p=s.join("");W(Xe,`Creating RPC '${e}' stream ${i}: ${p}`,u);const m=o.createWebChannel(p,u);let g=!1,A=!1;const C=new TP({Io:R=>{A?W(Xe,`Not sending because RPC '${e}' stream ${i} is closed:`,R):(g||(W(Xe,`Opening RPC '${e}' stream ${i} transport.`),m.open(),g=!0),W(Xe,`RPC '${e}' stream ${i} sending:`,R),m.send(R))},To:()=>m.close()}),N=(R,w,_)=>{R.listen(w,E=>{try{_(E)}catch(D){setTimeout(()=>{throw D},0)}})};return N(m,Os.EventType.OPEN,()=>{A||(W(Xe,`RPC '${e}' stream ${i} transport opened.`),C.yo())}),N(m,Os.EventType.CLOSE,()=>{A||(A=!0,W(Xe,`RPC '${e}' stream ${i} transport closed`),C.So())}
2553),N(m,Os.EventType.ERROR,R=>{A||(A=!0,Bi(Xe,`RPC '${e}' stream ${i} transport errored:`,R),C.So(new $(L.UNAVAILABLE,"The operation could not be completed")))}),N(m,Os.EventType.MESSAGE,R=>{var w;if(!A){const _=R.data[0];le(!!_);const E=_,D=E.error||((w=E[0])===null||w===void 0?void 0:w.error);if(D){W(Xe,`RPC '${e}' stream ${i} received error:`,D);const j=D.status;let U=function(I){const x=Pe[I];if(x!==void 0)return Gw(x)}(j),T=D.message;U===void 0&&(U=L.INTERNAL,T="Unknown error status: "+j+" with message "+D.message),A=!0,C.So(new $(U,T)),m.close()}else W(Xe,`RPC '${e}' stream ${i} received:`,_),C.bo(_)}}),N(l,vw.STAT_EVENT,R=>{R.stat===Hh.PROXY?W(Xe,`RPC '${e}' stream ${i} detected buffering proxy`):R.stat===Hh.NOPROXY&&W(Xe,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{C.wo()},0),C}}function Fc(){return typeof document<"u"?document: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 */function Au(t){return new DR(t,!0)}/** 2569 * @license 2570 * Copyright 2017 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 */class sE{constructor(e,n,r=1e3,i=1.5,s=6e4){this.ui=e,this.timerId=n,this.ko=r,this.qo=i,this.Qo=s,this.Ko=0,this.$o=null,this.Uo=Date.now(),this.reset()}reset(){this.Ko=0}Wo(){this.Ko=this.Qo}Go(e){this.cancel();const n=Math.floor(this.Ko+this.zo()),r=Math.max(0,Date.now()-this.Uo),i=Math.max(0,n-r);i>0&&W("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.Ko} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.$o=this.ui.enqueueAfterDelay(this.timerId,i,()=>(this.Uo=Date.now(),e())),this.Ko*=this.qo,this.Ko<this.ko&&(this.Ko=this.ko),this.Ko>this.Qo&&(this.Ko=this.Qo)}jo(){this.$o!==null&&(this.$o.skipDelay(),this.$o=null)}cancel(){this.$o!==null&&(this.$o.cancel(),this.$o=null)}zo(){return(Math.random()-.5)*this.Ko}}/** 2584 * @license 2585 * Copyright 2017 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 oE{constructor(e,n,r,i,s,o,l,u){this.ui=e,this.Ho=r,this.Jo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=l,this.listener=u,this.state=0,this.Yo=0,this.Zo=null,this.Xo=null,this.stream=null,this.e_=0,this.t_=new sE(e,n)}n_(){return this.state===1||this.state===5||this.r_()}r_(){return this.state===2||this.state===3}start(){this.e_=0,this.state!==4?this.auth():this.i_()}async stop(){this.n_()&&await this.close(0)}s_(){this.state=0,this.t_.reset()}o_(){this.r_()&&this.Zo===null&&(this.Zo=this.ui.enqueueAfterDelay(this.Ho,6e4,()=>this.__()))}a_(e){this.u_(),this.stream.send(e)}async __(){if(this.r_())return this.close(0)}u_(){this.Zo&&(this.Zo.cancel(),this.Zo=null)}
2598c_(){this.Xo&&(this.Xo.cancel(),this.Xo=null)}async close(e,n){this.u_(),this.c_(),this.t_.cancel(),this.Yo++,e!==4?this.t_.reset():n&&n.code===L.RESOURCE_EXHAUSTED?(Pn(n.toString()),Pn("Using maximum backoff delay to prevent overloading the backend."),this.t_.Wo()):n&&n.code===L.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.l_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.mo(n)}l_(){}auth(){this.state=1;const e=this.h_(this.Yo),n=this.Yo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.Yo===n&&this.P_(r,i)},r=>{e(()=>{const i=new $(L.UNKNOWN,"Fetching auth token failed: "+r.message);return this.I_(i)})})}P_(e,n){const r=this.h_(this.Yo);this.stream=this.T_(e,n),this.stream.Eo(()=>{r(()=>this.listener.Eo())}),this.stream.Ro(()=>{r(()=>(this.state=2,this.Xo=this.ui.enqueueAfterDelay(this.Jo,1e4,()=>(this.r_()&&(this.state=3),Promise.resolve())),this.listener.Ro()))}),this.stream.mo(i=>{r(()=>this.I_(i))}),this.stream.onMessage(i=>{r(()=>++this.e_==1?this.E_(i):this.onNext(i))})}i_(){this.state=5,this.t_.Go(async()=>{this.state=0,this.start()})}I_(e){return W("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}h_(e){return n=>{this.ui.enqueueAndForget(()=>this.Yo===e?n():(W("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class xP extends oE{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}T_(e,n){return this.connection.Bo("Listen",e,n)}E_(e){return this.onNext(e)}onNext(e){this.t_.reset();const n=LR(this.serializer,e),r=function(s){if(!("targetChange"in s))return Y.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Y.min():o.readTime?en(o.readTime):Y.min()}(e);return this.listener.d_(n,r)}A_(e){const n={};n.database=td(this.serializer),n.addTarget=function(s,o){let l;const u=o.target;if(l=Yh(u)?{documents:FR(s,u)}:{query:UR(s,u)._t},l.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){l.resumeToken=Yw(s,o.resumeToken);const h=Jh(s,o.expectedCount);h!==null&&(l.expectedCount=h)}else if(o.snapshotVersion.compareTo(Y.min())>0){l.readTime=ql(s,o.snapshotVersion.toTimestamp());const h=Jh(s,o.expectedCount);h!==null&&(l.expectedCount=h)}return l}(this.serializer,e);const r=BR(this.serializer,e);r&&(n.labels=r),this.a_(n)}R_(e){const n={};n.database=td(this.serializer),n.removeTarget=e,this.a_(n)}}class SP extends oE{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}get V_(){return this.e_>0}start(){this.lastStreamToken=void 0,super.start()}l_(){this.V_&&this.m_([])}T_(e,n){return this.connection.Bo("Write",e,n)}E_(e){return le(!!e.streamToken),this.lastStreamToken=e.streamToken,le(!e.writeResults||e.writeResults.length===0),this.listener.f_()}onNext(e){le(!!e.streamToken),this.lastStreamToken=e.streamToken,this.t_.reset();const n=MR(e.writeResults,e.commitTime),r=en(e.commitTime);return this.listener.g_(r,n)}p_(){const e={};e.database=td(this.serializer),this.a_(e)}m_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>jR(this.serializer,r))};this.a_(n)}}/** 2599 * @license 2600 * Copyright 2017 Google LLC 2601 * 2602 * Licensed under the Apache License, Version 2.0 (the "License"); 2603 * you may not use this file except in compliance with the License. 2604 * You may obtain a copy of the License at 2605 * 2606 * http://www.apache.org/licenses/LICENSE-2.0 2607 * 2608 * Unless required by applicable law or agreed to in writing, software 2609 * distributed under the License is distributed on an "AS IS" BASIS, 2610 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2611 * See the License for the specific language governing permissions and 2612 * limitations under the License. 2613 */class AP extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer
2613=i,this.y_=!1}w_(){if(this.y_)throw new $(L.FAILED_PRECONDITION,"The client has already been terminated.")}Mo(e,n,r,i){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Mo(e,Zh(n,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===L.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new $(L.UNKNOWN,s.toString())})}Lo(e,n,r,i,s){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,l])=>this.connection.Lo(e,Zh(n,r),i,o,l,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===L.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new $(L.UNKNOWN,o.toString())})}terminate(){this.y_=!0,this.connection.terminate()}}class kP{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.S_=0,this.b_=null,this.D_=!0}v_(){this.S_===0&&(this.C_("Unknown"),this.b_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.b_=null,this.F_("Backend didn't respond within 10 seconds."),this.C_("Offline"),Promise.resolve())))}M_(e){this.state==="Online"?this.C_("Unknown"):(this.S_++,this.S_>=1&&(this.x_(),this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.C_("Offline")))}set(e){this.x_(),this.S_=0,e==="Online"&&(this.D_=!1),this.C_(e)}C_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}F_(e){const n=`Could not reach Cloud Firestore backend. ${e} 2614This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.D_?(Pn(n),this.D_=!1):W("OnlineStateTracker",n)}x_(){this.b_!==null&&(this.b_.cancel(),this.b_=null)}}/** 2615 * @license 2616 * Copyright 2017 Google LLC 2617 * 2618 * Licensed under the Apache License, Version 2.0 (the "License"); 2619 * you may not use this file except in compliance with the License. 2620 * You may obtain a copy of the License at 2621 * 2622 * http://www.apache.org/licenses/LICENSE-2.0 2623 * 2624 * Unless required by applicable law or agreed to in writing, software 2625 * distributed under the License is distributed on an "AS IS" BASIS, 2626 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2627 * See the License for the specific language governing permissions and 2628 * limitations under the License. 2629 */class CP{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.O_=[],this.N_=new Map,this.L_=new Set,this.B_=[],this.k_=s,this.k_._o(o=>{r.enqueueAndForget(async()=>{ti(this)&&(W("RemoteStore","Restarting streams for network reachability change."),await async function(u){const h=X(u);h.L_.add(4),await Ho(h),h.q_.set("Unknown"),h.L_.delete(4),await ku(h)}(this))})}),this.q_=new kP(r,i)}}async function ku(t){if(ti(t))for(const e of t.B_)await e(!0)}async function Ho(t){for(const e of t.B_)await e(!1)}function aE(t,e){const n=X(t);n.N_.has(e.targetId)||(n.N_.set(e.targetId,e),$f(n)?Bf(n):ss(n).r_()&&zf(n,e))}function Uf(t,e){const n=X(t),r=ss(n);n.N_.delete(e),r.r_()&&lE(n,e),n.N_.size===0&&(r.r_()?r.o_():ti(n)&&n.q_.set("Unknown"))}function zf(t,e){if(t.Q_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Y.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}ss(t).A_(e)}function lE(t,e){t.Q_.xe(e),ss(t).R_(e)}function Bf(t){t.Q_=new RR({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ot:e=>t.N_.get(e)||null,tt:()=>t.datastore.serializer.databaseId}),ss(t).start(),t.q_.v_()}function $f(t){return ti(t)&&!ss(t).n_()&&t.N_.size>0}function ti(t){return X(t).L_.size===0}function uE(t){t.Q_=void 0}async function RP(t){t.q_.set("Online")}async function PP(t){t.N_.forEach((e,n)=>{zf(t,e)})}async function NP(t,e){uE(t),$f(t)?(t.q_.M_(e),Bf(t)):t.q_.set("Unknown")}async function bP(t,e,n){if(t.q_.set("Online"),e instanceof Qw&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const l of s.targetIds)i.N_.has(l)&&(await i.remoteSyncer.rejectListen(l,o),i.N_.delete(l),i.Q_.removeTarget(l))}(t,e)}catch(r){W("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Wl(t,r)}else if(e instanceof ol?t.Q_.Ke(e):e instanceof Kw?t.Q_.He(e):t.Q_.We(e),!n.isEqual(Y.min()))try{const r=await iE(t.localStore);n.compareTo(r)>=0&&await function(s,o){const l=s.Q_.rt(o);
2629return l.targetChanges.forEach((u,h)=>{if(u.resumeToken.approximateByteSize()>0){const p=s.N_.get(h);p&&s.N_.set(h,p.withResumeToken(u.resumeToken,o))}}),l.targetMismatches.forEach((u,h)=>{const p=s.N_.get(u);if(!p)return;s.N_.set(u,p.withResumeToken(We.EMPTY_BYTE_STRING,p.snapshotVersion)),lE(s,u);const m=new Yn(p.target,u,h,p.sequenceNumber);zf(s,m)}),s.remoteSyncer.applyRemoteEvent(l)}(t,n)}catch(r){W("RemoteStore","Failed to raise snapshot:",r),await Wl(t,r)}}async function Wl(t,e,n){if(!$o(e))throw e;t.L_.add(1),await Ho(t),t.q_.set("Offline"),n||(n=()=>iE(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{W("RemoteStore","Retrying IndexedDB access"),await n(),t.L_.delete(1),await ku(t)})}function cE(t,e){return e().catch(n=>Wl(t,n,e))}async function Cu(t){const e=X(t),n=pr(e);let r=e.O_.length>0?e.O_[e.O_.length-1].batchId:-1;for(;DP(e);)try{const i=await gP(e.localStore,r);if(i===null){e.O_.length===0&&n.o_();break}r=i.batchId,OP(e,i)}catch(i){await Wl(e,i)}hE(e)&&dE(e)}function DP(t){return ti(t)&&t.O_.length<10}function OP(t,e){t.O_.push(e);const n=pr(t);n.r_()&&n.V_&&n.m_(e.mutations)}function hE(t){return ti(t)&&!pr(t).n_()&&t.O_.length>0}function dE(t){pr(t).start()}async function VP(t){pr(t).p_()}async function LP(t){const e=pr(t);for(const n of t.O_)e.m_(n.mutations)}async function jP(t,e,n){const r=t.O_.shift(),i=Of.from(r,e,n);await cE(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await Cu(t)}async function MP(t,e){e&&pr(t).V_&&await async function(r,i){if(function(o){return AR(o)&&o!==L.ABORTED}(i.code)){const s=r.O_.shift();pr(r).s_(),await cE(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await Cu(r)}}(t,e),hE(t)&&dE(t)}async function Dy(t,e){const n=X(t);n.asyncQueue.verifyOperationInProgress(),W("RemoteStore","RemoteStore received new credentials");const r=ti(n);n.L_.add(3),await Ho(n),r&&n.q_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.L_.delete(3),await ku(n)}async function FP(t,e){const n=X(t);e?(n.L_.delete(2),await ku(n)):e||(n.L_.add(2),await Ho(n),n.q_.set("Unknown"))}function ss(t){return t.K_||(t.K_=function(n,r,i){const s=X(n);return s.w_(),new xP(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Eo:RP.bind(null,t),Ro:PP.bind(null,t),mo:NP.bind(null,t),d_:bP.bind(null,t)}),t.B_.push(async e=>{e?(t.K_.s_(),$f(t)?Bf(t):t.q_.set("Unknown")):(await t.K_.stop(),uE(t))})),t.K_}function pr(t){return t.U_||(t.U_=function(n,r,i){const s=X(n);return s.w_(),new SP(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Eo:()=>Promise.resolve(),Ro:VP.bind(null,t),mo:MP.bind(null,t),f_:LP.bind(null,t),g_:jP.bind(null,t)}),t.B_.push(async e=>{e?(t.U_.s_(),await Cu(t)):(await t.U_.stop(),t.O_.length>0&&(W("RemoteStore",`Stopping write stream with ${t.O_.length} pending writes`),t.O_=[]))})),t.U_}/** 2630 * @license 2631 * Copyright 2017 Google LLC 2632 * 2633 * Licensed under the Apache License, Version 2.0 (the "License"); 2634 * you may not use this file except in compliance with the License. 2635 * You may obtain a copy of the License at 2636 * 2637 * http://www.apache.org/licenses/LICENSE-2.0 2638 * 2639 * Unless required by applicable law or agreed to in writing, software 2640 * distributed under the License is distributed on an "AS IS" BASIS, 2641 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2642 * See the License for the specific language governing permissions and 2643 * limitations under the License. 2644 */class qf{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new In,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,l=new qf(e,n,o,i,s);return l.start(r),l}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new $(L.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Wf(t,e){if(Pn("AsyncQueue",`${e}: ${t}`),$o(t))return new $(L.UNAVAILABLE,`${e}: ${t}`);throw t}/** 2645 * @license 2646 * Copyright 2017 Google LLC 2647 * 2648 * Licensed under the Apache License, Version 2.0 (the "License");
2649 * you may not use this file except in compliance with the License. 2650 * You may obtain a copy of the License at 2651 * 2652 * http://www.apache.org/licenses/LICENSE-2.0 2653 * 2654 * Unless required by applicable law or agreed to in writing, software 2655 * distributed under the License is distributed on an "AS IS" BASIS, 2656 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2657 * See the License for the specific language governing permissions and 2658 * limitations under the License. 2659 */class bi{constructor(e){this.comparator=e?(n,r)=>e(n,r)||H.comparator(n.key,r.key):(n,r)=>H.comparator(n.key,r.key),this.keyedMap=Vs(),this.sortedSet=new Ie(this.comparator)}static emptySet(e){return new bi(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof bi)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( 2660 `+e.join(` 2661`)+` 2662)`}copy(e,n){const r=new bi;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** 2663 * @license 2664 * Copyright 2017 Google LLC 2665 * 2666 * Licensed under the Apache License, Version 2.0 (the "License"); 2667 * you may not use this file except in compliance with the License. 2668 * You may obtain a copy of the License at 2669 * 2670 * http://www.apache.org/licenses/LICENSE-2.0 2671 * 2672 * Unless required by applicable law or agreed to in writing, software 2673 * distributed under the License is distributed on an "AS IS" BASIS, 2674 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2675 * See the License for the specific language governing permissions and 2676 * limitations under the License. 2677 */class Oy{constructor(){this.W_=new Ie(H.comparator)}track(e){const n=e.doc.key,r=this.W_.get(n);r?e.type!==0&&r.type===3?this.W_=this.W_.insert(n,e):e.type===3&&r.type!==1?this.W_=this.W_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.W_=this.W_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.W_=this.W_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.W_=this.W_.remove(n):e.type===1&&r.type===2?this.W_=this.W_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.W_=this.W_.insert(n,{type:2,doc:e.doc}):K():this.W_=this.W_.insert(n,e)}G_(){const e=[];return this.W_.inorderTraversal((n,r)=>{e.push(r)}),e}}class Gi{constructor(e,n,r,i,s,o,l,u,h){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=l,this.excludesMetadataChanges=u,this.hasCachedResults=h}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(l=>{o.push({type:0,doc:l})}),new Gi(e,n,bi.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&wu(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!0}}/** 2678 * @license 2679 * Copyright 2017 Google LLC 2680 * 2681 * Licensed under the Apache License, Version 2.0 (the "License"); 2682 * you may not use this file except in compliance with the License. 2683 * You may obtain a copy of the License at 2684 * 2685 * http://www.apache.org/licenses/LICENSE-2.0 2686 * 2687 * Unless required by applicable law or agreed to in writing, softw
2687are 2688 * distributed under the License is distributed on an "AS IS" BASIS, 2689 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2690 * See the License for the specific language governing permissions and 2691 * limitations under the License. 2692 */class UP{constructor(){this.z_=void 0,this.j_=[]}H_(){return this.j_.some(e=>e.J_())}}class zP{constructor(){this.queries=Vy(),this.onlineState="Unknown",this.Y_=new Set}terminate(){(function(n,r){const i=X(n),s=i.queries;i.queries=Vy(),s.forEach((o,l)=>{for(const u of l.j_)u.onError(r)})})(this,new $(L.ABORTED,"Firestore shutting down"))}}function Vy(){return new is(t=>Dw(t),wu)}async function Hf(t,e){const n=X(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.H_()&&e.J_()&&(r=2):(s=new UP,r=e.J_()?0:1);try{switch(r){case 0:s.z_=await n.onListen(i,!0);break;case 1:s.z_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(o){const l=Wf(o,`Initialization of query '${li(e.query)}' failed`);return void e.onError(l)}n.queries.set(i,s),s.j_.push(e),e.Z_(n.onlineState),s.z_&&e.X_(s.z_)&&Kf(n)}async function Gf(t,e){const n=X(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const o=s.j_.indexOf(e);o>=0&&(s.j_.splice(o,1),s.j_.length===0?i=e.J_()?0:1:!s.H_()&&e.J_()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function BP(t,e){const n=X(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const l of o.j_)l.X_(i)&&(r=!0);o.z_=i}}r&&Kf(n)}function $P(t,e,n){const r=X(t),i=r.queries.get(e);if(i)for(const s of i.j_)s.onError(n);r.queries.delete(e)}function Kf(t){t.Y_.forEach(e=>{e.next()})}var rd,Ly;(Ly=rd||(rd={})).ea="default",Ly.Cache="cache";class Qf{constructor(e,n,r){this.query=e,this.ta=n,this.na=!1,this.ra=null,this.onlineState="Unknown",this.options=r||{}}X_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new Gi(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.na?this.ia(e)&&(this.ta.next(e),n=!0):this.sa(e,this.onlineState)&&(this.oa(e),n=!0),this.ra=e,n}onError(e){this.ta.error(e)}Z_(e){this.onlineState=e;let n=!1;return this.ra&&!this.na&&this.sa(this.ra,e)&&(this.oa(this.ra),n=!0),n}sa(e,n){if(!e.fromCache||!this.J_())return!0;const r=n!=="Offline";return(!this.options._a||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}ia(e){if(e.docChanges.length>0)return!0;const n=this.ra&&this.ra.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}oa(e){e=Gi.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.na=!0,this.ta.next(e)}J_(){return this.options.source!==rd.Cache}}/** 2693 * @license 2694 * Copyright 2017 Google LLC 2695 * 2696 * Licensed under the Apache License, Version 2.0 (the "License"); 2697 * you may not use this file except in compliance with the License. 2698 * You may obtain a copy of the License at 2699 * 2700 * http://www.apache.org/licenses/LICENSE-2.0 2701 * 2702 * Unless required by applicable law or agreed to in writing, software 2703 * distributed under the License is distributed on an "AS IS" BASIS, 2704 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2705 * See the License for the specific language governing permissions and 2706 * limitations under the License. 2707 */class fE{constructor(e){this.key=e}}class pE{constructor(e){this.key=e}}class qP{constructor(e,n){this.query=e,this.Ta=n,this.Ea=null,this.hasCachedResults=!1,this.current=!1,this.da=ee(),this.mutatedKeys=ee(),this.Aa=Ow(e),this.Ra=new bi(this.Aa)}get Va(){return this.Ta}ma(e,n){const r=n?n.fa:new Oy,i=n?n.Ra:this.Ra;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,l=!1;const u=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,h=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((p,m)=>{const g=i.get(p),A=Eu(this.query,m)?m:null,C=!!g&&this.mutatedKeys.has(g.key),N=!!A&&(A.hasLocalMutations||this.mutatedKeys.has(A.key)&&A.hasCommittedMutations);let R=!1;g&&A?g.data.isEqual(A.data)?C!==N&&(r.track({type:3,doc:A}),R=!0):this.ga(g,A)||(r.track({type:2,doc:A}),R=!0,(u&&this.Aa(A,u)>0||h&&this.Aa(A,h)<0)&&(l=!0)):!g&&A?(r.track({type:0,doc:A}),R=!0):g&&!A&&(r.track({type:1,doc:g}),R=!0,(u||h)&&(l=!0)),R&&(A?(o=o.add(A),s=N?s.add(p):s.delete(p)):(o=o.delete(p),s=s.delete(p)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const p=this.query.limitType==="F"?o.last():o.first();o=o.delete(p.key),s=s.delete(p.key),r.track({type:1,doc:p})}return{Ra:o,fa:r,ns:l,mutatedKeys:s}}ga(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}
2707applyChanges(e,n,r,i){const s=this.Ra;this.Ra=e.Ra,this.mutatedKeys=e.mutatedKeys;const o=e.fa.G_();o.sort((p,m)=>function(A,C){const N=R=>{switch(R){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return K()}};return N(A)-N(C)}(p.type,m.type)||this.Aa(p.doc,m.doc)),this.pa(r),i=i!=null&&i;const l=n&&!i?this.ya():[],u=this.da.size===0&&this.current&&!i?1:0,h=u!==this.Ea;return this.Ea=u,o.length!==0||h?{snapshot:new Gi(this.query,e.Ra,s,o,e.mutatedKeys,u===0,h,!1,!!r&&r.resumeToken.approximateByteSize()>0),wa:l}:{wa:l}}Z_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Ra:this.Ra,fa:new Oy,mutatedKeys:this.mutatedKeys,ns:!1},!1)):{wa:[]}}Sa(e){return!this.Ta.has(e)&&!!this.Ra.has(e)&&!this.Ra.get(e).hasLocalMutations}pa(e){e&&(e.addedDocuments.forEach(n=>this.Ta=this.Ta.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.Ta=this.Ta.delete(n)),this.current=e.current)}ya(){if(!this.current)return[];const e=this.da;this.da=ee(),this.Ra.forEach(r=>{this.Sa(r.key)&&(this.da=this.da.add(r.key))});const n=[];return e.forEach(r=>{this.da.has(r)||n.push(new pE(r))}),this.da.forEach(r=>{e.has(r)||n.push(new fE(r))}),n}ba(e){this.Ta=e.Ts,this.da=ee();const n=this.ma(e.documents);return this.applyChanges(n,!0)}Da(){return Gi.fromInitialDocuments(this.query,this.Ra,this.mutatedKeys,this.Ea===0,this.hasCachedResults)}}class WP{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class HP{constructor(e){this.key=e,this.va=!1}}class GP{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Ca={},this.Fa=new is(l=>Dw(l),wu),this.Ma=new Map,this.xa=new Set,this.Oa=new Ie(H.comparator),this.Na=new Map,this.La=new jf,this.Ba={},this.ka=new Map,this.qa=Hi.kn(),this.onlineState="Unknown",this.Qa=void 0}get isPrimaryClient(){return this.Qa===!0}}async function KP(t,e,n=!0){const r=wE(t);let i;const s=r.Fa.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.Da()):i=await mE(r,e,n,!0),i}async function QP(t,e){const n=wE(t);await mE(n,e,!0,!1)}async function mE(t,e,n,r){const i=await yP(t.localStore,Zt(e)),s=i.targetId,o=t.sharedClientState.addLocalQueryTarget(s,n);let l;return r&&(l=await YP(t,e,s,o==="current",i.resumeToken)),t.isPrimaryClient&&n&&aE(t.remoteStore,i),l}async function YP(t,e,n,r,i){t.Ka=(m,g,A)=>async function(N,R,w,_){let E=R.view.ma(w);E.ns&&(E=await Py(N.localStore,R.query,!1).then(({documents:T})=>R.view.ma(T,E)));const D=_&&_.targetChanges.get(R.targetId),j=_&&_.targetMismatches.get(R.targetId)!=null,U=R.view.applyChanges(E,N.isPrimaryClient,D,j);return My(N,R.targetId,U.wa),U.snapshot}(t,m,g,A);const s=await Py(t.localStore,e,!0),o=new qP(e,s.Ts),l=o.ma(s.documents),u=Wo.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),h=o.applyChanges(l,t.isPrimaryClient,u);My(t,n,h.wa);const p=new WP(e,n,o);return t.Fa.set(e,p),t.Ma.has(n)?t.Ma.get(n).push(e):t.Ma.set(n,[e]),h.snapshot}async function XP(t,e,n){const r=X(t),i=r.Fa.get(e),s=r.Ma.get(i.targetId);if(s.length>1)return r.Ma.set(i.targetId,s.filter(o=>!wu(o,e))),void r.Fa.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2707ientState.isActiveQueryTarget(i.targetId)||await nd(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&Uf(r.remoteStore,i.targetId),id(r,i.targetId)}).catch(Bo)):(id(r,i.targetId),await nd(r.localStore,i.targetId,!0))}async function JP(t,e){const n=X(t),r=n.Fa.get(e),i=n.Ma.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),Uf(n.remoteStore,r.targetId))}async function ZP(t,e,n){const r=oN(t);try{const i=await function(o,l){const u=X(o),h=oe.now(),p=l.reduce((A,C)=>A.add(C.key),ee());let m,g;return u.persistence.runTransaction("Locally write mutations","readwrite",A=>{let C=Nn(),N=ee();return u.cs.getEntries(A,p).next(R=>{C=R,C.forEach((w,_)=>{_.isValidDocument()||(N=N.add(w))})}).next(()=>u.localDocuments.getOverlayedDocuments(A,C)).next(R=>{m=R;const w=[];for(const _ of l){const E=ER(_,m.get(_.key).overlayedDocument);E!=null&&w.push(new wr(_.key,E,Sw(E.value.mapValue),lt.exists(!0)))}return u.mutationQueue.addMutationBatch(A,h,w,l)}).next(R=>{g=R;const w=R.applyToLocalDocumentSet(m,N);return u.documentOverlayCache.saveOverlays(A,R.batchId,w)})}).then(()=>({batchId:g.batchId,changes:Lw(m)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,l,u){let h=o.Ba[o.currentUser.toKey()];h||(h=new Ie(se)),h=h.insert(l,u),o.Ba[o.currentUser.toKey()]=h}(r,i.batchId,n),await Go(r,i.changes),await Cu(r.remoteStore)}catch(i){const s=Wf(i,"Failed to persist write");n.reject(s)}}async function gE(t,e){const n=X(t);try{const r=await pP(n.localStore,e);
2707e.targetChanges.forEach((i,s)=>{const o=n.Na.get(s);o&&(le(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.va=!0:i.modifiedDocuments.size>0?le(o.va):i.removedDocuments.size>0&&(le(o.va),o.va=!1))}),await Go(n,r,e)}catch(r){await Bo(r)}}function jy(t,e,n){const r=X(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.Fa.forEach((s,o)=>{const l=o.view.Z_(e);l.snapshot&&i.push(l.snapshot)}),function(o,l){const u=X(o);u.onlineState=l;let h=!1;u.queries.forEach((p,m)=>{for(const g of m.j_)g.Z_(l)&&(h=!0)}),h&&Kf(u)}(r.eventManager,e),i.length&&r.Ca.d_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function eN(t,e,n){const r=X(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Na.get(e),s=i&&i.key;if(s){let o=new Ie(H.comparator);o=o.insert(s,et.newNoDocument(s,Y.min()));const l=ee().add(s),u=new Su(Y.min(),new Map,new Ie(se),o,l);await gE(r,u),r.Oa=r.Oa.remove(s),r.Na.delete(e),Yf(r)}else await nd(r.localStore,e,!1).then(()=>id(r,e,n)).catch(Bo)}async function tN(t,e){const n=X(t),r=e.batch.batchId;try{const i=await fP(n.localStore,e);vE(n,r,null),yE(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Go(n,i)}catch(i){await Bo(i)}}async function nN(t,e,n){const r=X(t);try{const i=await function(o,l){const u=X(o);return u.persistence.runTransaction("Reject batch","readwrite-primary",h=>{let p;return u.mutationQueue.lookupMutationBatch(h,l).next(m=>(le(m!==null),p=m.keys(),u.mutationQueue.removeMutationBatch(h,m))).next(()=>u.mutationQueue.performConsistencyCheck(h)).next(()=>u.documentOverlayCache.removeOverlaysForBatchId(h,p,l)).next(()=>u.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(h,p)).next(()=>u.localDocuments.getDocuments(h,p))})}(r.localStore,e);vE(r,e,n),yE(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await Go(r,i)}catch(i){await Bo(i)}}function yE(t,e){(t.ka.get(e)||[]).forEach(n=>{n.resolve()}),t.ka.delete(e)}function vE(t,e,n){const r=X(t);let i=r.Ba[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.Ba[r.currentUser.toKey()]=i}}
2707function id(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Ma.get(e))t.Fa.delete(r),n&&t.Ca.$a(r,n);t.Ma.delete(e),t.isPrimaryClient&&t.La.gr(e).forEach(r=>{t.La.containsKey(r)||_E(t,r)})}function _E(t,e){t.xa.delete(e.path.canonicalString());const n=t.Oa.get(e);n!==null&&(Uf(t.remoteStore,n),t.Oa=t.Oa.remove(e),t.Na.delete(n),Yf(t))}function My(t,e,n){for(const r of n)r instanceof fE?(t.La.addReference(r.key,e),rN(t,r)):r instanceof pE?(W("SyncEngine","Document no longer in limbo: "+r.key),t.La.removeReference(r.key,e),t.La.containsKey(r.key)||_E(t,r.key)):K()}function rN(t,e){const n=e.key,r=n.path.canonicalString();t.Oa.get(n)||t.xa.has(r)||(W("SyncEngine","New document in limbo: "+n),t.xa.add(r),Yf(t))}function Yf(t){for(;t.xa.size>0&&t.Oa.size<t.maxConcurrentLimboResolutions;){const e=t.xa.values().next().value;t.xa.delete(e);const n=new H(me.fromString(e)),r=t.qa.next();t.Na.set(r,new HP(n)),t.Oa=t.Oa.insert(n,r),aE(t.remoteStore,new Yn(Zt(_u(n.path)),r,"TargetPurposeLimboResolution",kf.oe))}}async function Go(t,e,n){const r=X(t),i=[],s=[],o=[];r.Fa.isEmpty()||(r.Fa.forEach((l,u)=>{o.push(r.Ka(u,e,n).then(h=>{var p;if((h||n)&&r.isPrimaryClient){const m=h?!h.fromCache:(p=n==null?void 0:n.targetChanges.get(u.targetId))===null||p===void 0?void 0:p.current;
2707r.sharedClientState.updateQueryState(u.targetId,m?"current":"not-current")}if(h){i.push(h);const m=Ff.Wi(u.targetId,h);s.push(m)}}))}),await Promise.all(o),r.Ca.d_(i),await async function(u,h){const p=X(u);try{await p.persistence.runTransaction("notifyLocalViewChanges","readwrite",m=>M.forEach(h,g=>M.forEach(g.$i,A=>p.persistence.referenceDelegate.addReference(m,g.targetId,A)).next(()=>M.forEach(g.Ui,A=>p.persistence.referenceDelegate.removeReference(m,g.targetId,A)))))}catch(m){if(!$o(m))throw m;W("LocalStore","Failed to update sequence numbers: "+m)}for(const m of h){const g=m.targetId;if(!m.fromCache){const A=p.os.get(g),C=A.snapshotVersion,N=A.withLastLimboFreeSnapshotVersion(C);p.os=p.os.insert(g,N)}}}(r.localStore,s))}async function iN(t,e){const n=X(t);if(!n.currentUser.isEqual(e)){W("SyncEngine","User change. New user:",e.toKey());const r=await rE(n.localStore,e);n.currentUser=e,function(s,o){s.ka.forEach(l=>{l.forEach(u=>{u.reject(new $(L.CANCELLED,o))})}),s.ka.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Go(n,r.hs)}}function sN(t,e){const n=X(t),r=n.Na.get(e);if(r&&r.va)return ee().add(r.key);{let i=ee();const s=n.Ma.get(e);if(!s)return i;for(const o of s){const l=n.Fa.get(o);i=i.unionWith(l.view.Va)}return i}}function wE(t){const e=X(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=gE.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=sN.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=eN.bind(null,e),e.Ca.d_=BP.bind(null,e.eventManager),e.Ca.$a=$P.bind(null,e.eventManager),e}function oN(t){const e=X(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=tN.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=nN.bind(null,e),e}class Hl{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Au(e.databaseInfo.databaseId),this.sharedClientState=this.Wa(e),this.persistence=this.Ga(e),await this.persistence.start(),this.localStore=this.za(e),this.gcScheduler=this.ja(e,this.localStore),this.indexBackfillerScheduler=this.Ha(e,this.localStore)}ja(e,n){return null}Ha(e,n){return null}za(e){return dP(this.persistence,new cP,e.initialUser,this.serializer)}Ga(e){return new aP(Mf.Zr,this.serializer)}Wa(e){return new _P}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}Hl.provider={build:()=>new Hl};class sd{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>jy(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=iN.bind(null,this.syncEngine),await FP(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new zP}()}createDatastore(e){const n=Au(e.databaseInfo.databaseId),r=function(s){return new IP(s)}(e.databaseInfo);return function(s,o,l,u){return new AP(s,o,l,u)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,l){return new CP(r,i,s,o,l)}(this.localStore,this.datastore,e.asyncQueue,n=>jy(this.syncEngine,n,0),function(){return by.D()?new by:new wP}())}createSyncEngine(e,n){return function(i,s,o,l,u,h,p){const m=new GP(i,s,o,l,u,h);return p&&(m.Qa=!0),m}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e,n;await async function(i){const s=X(i);W("RemoteStore","RemoteStore shutting down."),s.L_.add(5),await Ho(s),s.k_.shutdown(),s.q_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}sd.provider={build:()=>new sd};/** 2708 * @license 2709 * Copyright 2020 Google LLC 2710 * 2711 * Licensed under the Apache License, Version 2.0 (the "License");
2712 * you may not use this file except in compliance with the License. 2713 * You may obtain a copy of the License at 2714 * 2715 * http://www.apache.org/licenses/LICENSE-2.0 2716 * 2717 * Unless required by applicable law or agreed to in writing, software 2718 * distributed under the License is distributed on an "AS IS" BASIS, 2719 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2720 * See the License for the specific language governing permissions and 2721 * limitations under the License. 2722 *//** 2723 * @license 2724 * Copyright 2017 Google LLC 2725 * 2726 * Licensed under the Apache License, Version 2.0 (the "License"); 2727 * you may not use this file except in compliance with the License. 2728 * You may obtain a copy of the License at 2729 * 2730 * http://www.apache.org/licenses/LICENSE-2.0 2731 * 2732 * Unless required by applicable law or agreed to in writing, software 2733 * distributed under the License is distributed on an "AS IS" BASIS, 2734 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2735 * See the License for the specific language governing permissions and 2736 * limitations under the License. 2737 */class Xf{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ya(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ya(this.observer.error,e):Pn("Uncaught Error in snapshot listener:",e.toString()))}Za(){this.muted=!0}Ya(e,n){setTimeout(()=>{this.muted||e(n)},0)}}/** 2738 * @license 2739 * Copyright 2017 Google LLC 2740 * 2741 * Licensed under the Apache License, Version 2.0 (the "License"); 2742 * you may not use this file except in compliance with the License. 2743 * You may obtain a copy of the License at 2744 * 2745 * http://www.apache.org/licenses/LICENSE-2.0 2746 * 2747 * Unless required by applicable law or agreed to in writing, software 2748 * distributed under the License is distributed on an "AS IS" BASIS, 2749 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2750 * See the License for the specific language governing permissions and 2751 * limitations under the License. 2752 */class aN{constructor(e,n,r,i,s){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Je.UNAUTHENTICATED,this.clientId=Tw.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,async o=>{W("FirestoreClient","Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(W("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,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 In;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=Wf(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Uc(t,e){t.asyncQueue.verifyOperationInProgress(),W("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await rE(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function Fy(t,e){t.asyncQueue.verifyOperationInProgress();const n=await lN(t);W("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>Dy(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>Dy(e.remoteStore,i)),t._onlineComponents=e}async function lN(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){W("FirestoreClient","Using user provided OfflineComponentProvider");try{await Uc(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!function(i){return i.name==="FirebaseError"?i.code===L.FAILED_PRECONDITION||i.code===L.UNIMPLEMENT
2752ED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(n))throw n;Bi("Error using user provided cache. Falling back to memory cache: "+n),await Uc(t,new Hl)}}else W("FirestoreClient","Using default OfflineComponentProvider"),await Uc(t,new Hl);return t._offlineComponents}async function EE(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(W("FirestoreClient","Using user provided OnlineComponentProvider"),await Fy(t,t._uninitializedComponentsProvider._online)):(W("FirestoreClient","Using default OnlineComponentProvider"),await Fy(t,new sd))),t._onlineComponents}function uN(t){return EE(t).then(e=>e.syncEngine)}async function Gl(t){const e=await EE(t),n=e.eventManager;return n.onListen=KP.bind(null,e.syncEngine),n.onUnlisten=XP.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=QP.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=JP.bind(null,e.syncEngine),n}function cN(t,e,n={}){const r=new In;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,l,u,h){const p=new Xf({next:g=>{p.Za(),o.enqueueAndForget(()=>Gf(s,m));const A=g.docs.has(l);!A&&g.fromCache?h.reject(new $(L.UNAVAILABLE,"Failed to get document because the client is offline.")):A&&g.fromCache&&u&&u.source==="server"?h.reject(new $(L.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):h.resolve(g)},error:g=>h.reject(g)}),m=new Qf(_u(l.path),p,{includeMetadataChanges:!0,_a:!0});return Hf(s,m)}(await Gl(t),t.asyncQueue,e,n,r)),r.promise}function hN(t,e,n={}){const r=new In;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,l,u,h){const p=new Xf({next:g=>{p.Za(),o.enqueueAndForget(()=>Gf(s,m)),g.fromCache&&u.source==="server"?h.reject(new $(L.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.)')):h.resolve(g)},error:g=>h.reject(g)}),m=new Qf(l,p,{includeMetadataChanges:!0,_a:!0});return Hf(s,m)}(await Gl(t),t.asyncQueue,e,n,r)),r.promise}/** 2753 * @license 2754 * Copyright 2023 Google LLC 2755 * 2756 * Licensed under the Apache License, Version 2.0 (the "License"); 2757 * you may not use this file except in compliance with the License. 2758 * You may obtain a copy of the License at 2759 * 2760 * http://www.apache.org/licenses/LICENSE-2.0 2761 * 2762 * Unless required by applicable law or agreed to in writing, software 2763 * distributed under the License is distributed on an "AS IS" BASIS, 2764 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2765 * See the License for the specific language governing permissions and 2766 * limitations under the License. 2767 */function TE(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** 2768 * @license 2769 * Copyright 2020 Google LLC 2770 * 2771 * Licensed under the Apache License, Version 2.0 (the "License"); 2772 * you may not use this file except in compliance with the License. 2773 * You may obtain a copy of the License at 2774 * 2775 * http://www.apache.org/licenses/LICENSE-2.0 2776 * 2777 * Unless required by applicable law or agreed to in writing, software 2778 * distributed under the License is distributed on an "AS IS" BASIS, 2779 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2780 * See the License for the specific language governing permissions and 2781 * limitations under the License. 2782 */const Uy=new Map;/** 2783 * @license 2784 * Copyright 2017 Google LLC 2785 * 2786 * Licensed under the Apache License, Version 2.0 (the "License"); 2787 * you may not use this file except in compliance with the License. 2788 * You may obtain a copy of the License at 2789 * 2790 * http://www.apache.org/licenses/LICENSE-2.0 2791 * 2792 * Unless required by applicable law or agreed to in writing, software 2793 * distributed under the License is distributed on an "AS IS" BASIS, 2794 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2795 * See the License for the specific language governing permissions and 2796 * limitations under the License. 2797 */function IE(t,e,n){if(!n)throw new $(L.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function dN(t,e,n,r){if(e===!0&&r===!0)throw new $(L.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function zy(t){if(!H.isDocumentKey(t))throw new $(L.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function By(t){if(H.isDocumentKey(t))throw new $(L.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Ru(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":K()}function ut(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new $(L.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Ru(t);throw new $(L.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** 2798 * @license 2799 * Copyright 2020 Google LLC 2800 * 2801 * Licensed under the Apache License, Version 2.0 (the "License");
2802 * you may not use this file except in compliance with the License. 2803 * You may obtain a copy of the License at 2804 * 2805 * http://www.apache.org/licenses/LICENSE-2.0 2806 * 2807 * Unless required by applicable law or agreed to in writing, software 2808 * distributed under the License is distributed on an "AS IS" BASIS, 2809 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2810 * See the License for the specific language governing permissions and 2811 * limitations under the License. 2812 */class $y{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new $(L.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new $(L.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}dN("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=TE((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new $(L.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new $(L.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new $(L.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Pu{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new $y({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new $(L.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 $(L.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 $y(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new NC;switch(r.type){case"firstParty":return new VC(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new $(L.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=Uy.get(n);r&&(W("ComponentProvider","Removing Datastore"),Uy.delete(n),r.terminate())}(this),Promise.resolve()}}function fN(t,e,n,r={}){var i;const s=(t=ut(t,Pu))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&Bi("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let l,u;if(typeof r.mockUserToken=="string")l=r.mockUserToken,u=Je.MOCK_USER;else{l=uS(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const h=r.mockUserToken.sub||r.mockUserToken.user_id;if(!h)throw new $(L.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");u=new Je(h)}t._authCredentials=new bC(new Ew(l,u))}}/** 2813 * @license 2814 * Copyright 2020 Google LLC 2815 * 2816 * Licensed under the Apache License, Version 2.0 (the "License");
2817 * you may not use this file except in compliance with the License. 2818 * You may obtain a copy of the License at 2819 * 2820 * http://www.apache.org/licenses/LICENSE-2.0 2821 * 2822 * Unless required by applicable law or agreed to in writing, software 2823 * distributed under the License is distributed on an "AS IS" BASIS, 2824 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2825 * See the License for the specific language governing permissions and 2826 * limitations under the License. 2827 */class On{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new On(this.firestore,e,this._query)}}class tt{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new lr(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new tt(this.firestore,e,this._key)}}class lr extends On{constructor(e,n,r){super(e,n,_u(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 tt(this.firestore,null,new H(e))}withConverter(e){return new lr(this.firestore,e,this._path)}}function od(t,e,...n){if(t=Te(t),IE("collection","path",e),t instanceof Pu){const r=me.fromString(e,...n);return By(r),new lr(t,null,r)}{if(!(t instanceof tt||t instanceof lr))throw new $(L.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(me.fromString(e,...n));return By(r),new lr(t.firestore,null,r)}}function mn(t,e,...n){if(t=Te(t),arguments.length===1&&(e=Tw.newId()),IE("doc","path",e),t instanceof Pu){const r=me.fromString(e,...n);return zy(r),new tt(t,null,new H(r))}{if(!(t instanceof tt||t instanceof lr))throw new $(L.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(me.fromString(e,...n));return zy(r),new tt(t.firestore,t instanceof lr?t.converter:null,new H(r))}}/** 2828 * @license 2829 * Copyright 2020 Google LLC 2830 * 2831 * Licensed under the Apache License, Version 2.0 (the "License"); 2832 * you may not use this file except in compliance with the License. 2833 * You may obtain a copy of the License at 2834 * 2835 * http://www.apache.org/licenses/LICENSE-2.0 2836 * 2837 * Unless required by applicable law or agreed to in writing, software 2838 * distributed under the License is distributed on an "AS IS" BASIS, 2839 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2840 * See the License for the specific language governing permissions and 2841 * limitations under the License. 2842 */class qy{constructor(e=Promise.resolve()){this.Pu=[],this.Iu=!1,this.Tu=[],this.Eu=null,this.du=!1,this.Au=!1,this.Ru=[],this.t_=new sE(this,"async_queue_retry"),this.Vu=()=>{const r=Fc();r&&W("AsyncQueue","Visibility state changed to "+r.visibilityState),this.t_.jo()},this.mu=e;const n=Fc();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.Vu)}get isShuttingDown(){return this.Iu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.fu(),this.gu(e)}enterRestrictedMode(e){if(!this.Iu){this.Iu=!0,this.Au=e||!1;const n=Fc();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.Vu)}}enqueue(e){if(this.fu(),this.Iu)return new Promise(()=>{});const n=new In;return this.gu(()=>this.Iu&&this.Au?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Pu.push(e),this.pu()))}async pu(){if(this.Pu.length!==0){try{await this.Pu[0](),this.Pu.shift(),this.t_.reset()}catch(e){if(!$o(e))throw e;W("AsyncQueue","Operation failed with retryable error: "+e)}this.Pu.length>0&&this.t_.Go(()=>this.pu())}}gu(e){const n=this.mu.then(()=>(this.du=!0,e().catch(r=>{this.Eu=r,this.du=!1;const i=function(o){let l=o.message||"";return o.stack&&(l=o.stack.includes(o.message)?o.stack:o.message+` 2843`+o.stack),l}(r);throw Pn("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.du=!1,r))));return this.mu=n,n}enqueueAfterDelay(e,n,r){this.fu(),this.Ru.indexOf(e)>-1&&(n=0);const i=qf.createAndSchedule(this,e,n,r,s=>this.yu(s));return this.Tu.push(i),i}fu(){this.Eu&&K()}verifyOperationInProgress(){}async wu(){let e;do e=this.mu,await e;while(e!==this.mu)}Su(e){for(const n of this.Tu)if(n.timerId===e)return!0;return!1}bu(e){return this.wu().then(()=>{this.Tu.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.Tu)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.wu()})}Du(e){this.Ru.push(e)}yu(e){const n=this.Tu.indexOf(e);this.Tu.splice(n,1)}}function Wy(t){return function(n,r){if(typeof n!="object"||n===null)return!1;const i=n;for(const s of r)if(s in i&&typeof i[s]=="function")return!0;return!1}(t,["next","error","complete"])}class rn extends Pu{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new qy,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new qy(e),this._firestoreClient=void 0,await e}}}function pN(t,e){const n=typeof t=="object"?t:pf(),r=typeof t=="string"?t:"(default)",i=pu(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=R0("firestore");s&&fN(i,...s)}return i}function Ko(t){if(t._terminated)throw new $(L.FAILED_PRECONDITION,"The client has already been terminated.");return t._firestoreClient||mN(t),t._firestoreClient}function mN(t){var e,n,r;const i=t._freezeSettings(),s=function(l,u,h,p){return new KC(l,u,h,p.host,p.ssl,p.experimentalForceLongPolling,p.experimentalAutoDetectLongPolling,TE(p.experimentalLongPollingOptions),p.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._componentsProvider||!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),t._firestoreClient=new aN(t._authCredentials,t._appCheckCredentials,t._queue,s,t._componentsProvider&&function(l){const u=l==null?void 0:l._online.build();return{_offline:l==null?void 0:l._offline.build(u),_online:u}}(t._componentsProvider))}/** 2844 * @license 2845 * Copyright 2020 Google LLC 2846 * 2847 * Licensed under the Apache License, Version 2.0 (the "License");
2848 * you may not use this file except in compliance with the License. 2849 * You may obtain a copy of the License at 2850 * 2851 * http://www.apache.org/licenses/LICENSE-2.0 2852 * 2853 * Unless required by applicable law or agreed to in writing, software 2854 * distributed under the License is distributed on an "AS IS" BASIS, 2855 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2856 * See the License for the specific language governing permissions and 2857 * limitations under the License. 2858 */class Ki{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Ki(We.fromBase64String(e))}catch(n){throw new $(L.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new Ki(We.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)}}/** 2859 * @license 2860 * Copyright 2020 Google LLC 2861 * 2862 * Licensed under the Apache License, Version 2.0 (the "License"); 2863 * you may not use this file except in compliance with the License. 2864 * You may obtain a copy of the License at 2865 * 2866 * http://www.apache.org/licenses/LICENSE-2.0 2867 * 2868 * Unless required by applicable law or agreed to in writing, software 2869 * distributed under the License is distributed on an "AS IS" BASIS, 2870 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2871 * See the License for the specific language governing permissions and 2872 * limitations under the License. 2873 */class Qo{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new $(L.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ze(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 2874 * @license 2875 * Copyright 2020 Google LLC 2876 * 2877 * Licensed under the Apache License, Version 2.0 (the "License"); 2878 * you may not use this file except in compliance with the License. 2879 * You may obtain a copy of the License at 2880 * 2881 * http://www.apache.org/licenses/LICENSE-2.0 2882 * 2883 * Unless required by applicable law or agreed to in writing, software 2884 * distributed under the License is distributed on an "AS IS" BASIS, 2885 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2886 * See the License for the specific language governing permissions and 2887 * limitations under the License. 2888 */class Yo{constructor(e){this._methodName=e}}/** 2889 * @license 2890 * Copyright 2017 Google LLC 2891 * 2892 * Licensed under the Apache License, Version 2.0 (the "License"); 2893 * you may not use this file except in compliance with the License. 2894 * You may obtain a copy of the License at 2895 * 2896 * http://www.apache.org/licenses/LICENSE-2.0 2897 * 2898 * Unless required by applicable law or agreed to in writing, software 2899 * distributed under the License is distributed on an "AS IS" BASIS, 2900 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2901 * See the License for the specific language governing permissions and 2902 * limitations under the License. 2903 */class Jf{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new $(L.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new $(L.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return se(this._lat,e._lat)||se(this._long,e._long)}}/** 2904 * @license 2905 * Copyright 2024 Google LLC 2906 * 2907 * Licensed under the Apache License, Version 2.0 (the "License"); 2908 * you may not use this file except in compliance with the License. 2909 * You may obtain a copy of the License at 2910 * 2911 * http://www.apache.org/licenses/LICENSE-2.0 2912 * 2913 * Unless required by applicable law or agreed to in writing, software 2914 * distributed under the License is distributed on an "AS IS" BASIS, 2915 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2916 * See the License for the specific language governing permissions and 2917 * limitations under the License. 2918 */class Zf{constructor(e){this._values=(e||[]).map(n=>n)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}(this._values,e._values)}}/** 2919 * @license 2920 * Copyright 2017 Google LLC 2921 * 2922 * Licensed under the Apache License, Version 2.0 (the "License");
2923 * you may not use this file except in compliance with the License. 2924 * You may obtain a copy of the License at 2925 * 2926 * http://www.apache.org/licenses/LICENSE-2.0 2927 * 2928 * Unless required by applicable law or agreed to in writing, software 2929 * distributed under the License is distributed on an "AS IS" BASIS, 2930 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2931 * See the License for the specific language governing permissions and 2932 * limitations under the License. 2933 */const gN=/^__.*__$/;class yN{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new wr(e,this.data,this.fieldMask,n,this.fieldTransforms):new qo(e,this.data,n,this.fieldTransforms)}}class xE{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new wr(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function SE(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw K()}}class ep{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.vu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get Cu(){return this.settings.Cu}Fu(e){return new ep(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Mu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.Fu({path:r,xu:!1});return i.Ou(e),i}Nu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.Fu({path:r,xu:!1});return i.vu(),i}Lu(e){return this.Fu({path:void 0,xu:!0})}Bu(e){return Kl(e,this.settings.methodName,this.settings.ku||!1,this.path,this.settings.qu)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}vu(){if(this.path)for(let e=0;e<this.path.length;e++)this.Ou(this.path.get(e))}Ou(e){if(e.length===0)throw this.Bu("Document fields must not be empty");if(SE(this.Cu)&&gN.test(e))throw this.Bu('Document fields cannot begin and end with "__"')}}class vN{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||Au(e)}Qu(e,n,r,i=!1){return new ep({Cu:e,methodName:n,qu:r,path:ze.emptyPath(),xu:!1,ku:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Xo(t){const e=t._freezeSettings(),n=Au(t._databaseId);return new vN(t._databaseId,!!e.ignoreUndefinedProperties,n)}function tp(t,e,n,r,i,s={}){const o=t.Qu(s.merge||s.mergeFields?2:0,e,n,i);ip("Data must be an object, but it was:",o,r);const l=CE(r,o);let u,h;if(s.merge)u=new Et(o.fieldMask),h=o.fieldTransforms;else if(s.mergeFields){const p=[];for(const m of s.mergeFields){const g=ad(e,m,n);if(!o.contains(g))throw new $(L.INVALID_ARGUMENT,`Field '${g}' is specified in your field mask but missing from your input data.`);PE(p,g)||p.push(g)}u=new Et(p),h=o.fieldTransforms.filter(m=>u.covers(m.field))}else u=null,h=o.fieldTransforms;return new yN(new ft(l),u,h)}class Nu extends Yo{_toFieldTransform(e){if(e.Cu!==2)throw e.Cu===1?e.Bu(`${this._methodName}() can only appear at the top level of your update data`):e.Bu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Nu}}class np extends Yo{_toFieldTransform(e){return new qw(e.path,new ko)}isEqual(e){return e instanceof np}}class rp extends Yo{constructor(e,n){super(e),this.$u=n}_toFieldTransform(e){const n=new Po(e.serializer,Fw(e.serializer,this.$u));return new qw(e.path,n)}isEqual(e){return e instanceof rp&&this.$u===e.$u}}function AE(t,e,n,r){const i=t.Qu(1,e,n);ip("Data must be an object, but it was:",i,r);const s=[],o=ft.empty();ei(r,(u,h)=>{const p=sp(e,u,n);h=Te(h);const m=i.Nu(p);if(h instanceof Nu)s.push(p);else{const g=Jo(h,m);g!=null&&(s.push(p),o.set(p,g))}});const l=new Et(s);return new xE(o,l,i.fieldTransforms)}function kE(t,e,n,r,i,s){const o=t.Qu(1,e,n),l=[ad(e,r,n)],u=[i];if(s.length%2!=0)throw new $(L.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let g=0;g<s.length;g+=2)l.push(ad(e,s[g])),u.push(s[g+1]);const h=[],p=ft.empty();for(let g=l.length-1;g>=0;--g)if(!PE(h,l[g])){const A=l[g];let C=u[g];C=Te(C);const N=o.Nu(A);if(C instanceof Nu)h.push(A);else{const R=Jo(C,N);R!=null&&(h.push(A),p.set(A,R))}}const m=new Et(h);return new xE(p,m,o.fieldTransforms)}function _N(t,e,n,r=!1){return Jo(n,t.Qu(r?4:3,e))}function Jo(t,e){if(RE(t=Te(t)))return ip("Unsupported field value:",e,t),CE(t,e);if(t instanceof Yo)return function(r,i){if(!SE(i.Cu))throw i.Bu(`${r._methodName}
2933() can only be used with update() and set()`);if(!i.path)throw i.Bu(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.xu&&e.Cu!==4)throw e.Bu("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const l of r){let u=Jo(l,i.Lu(o));u==null&&(u={nullValue:"NULL_VALUE"}),s.push(u),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=Te(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return Fw(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=oe.fromDate(r);return{timestampValue:ql(i.serializer,s)}}if(r instanceof oe){const s=new oe(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:ql(i.serializer,s)}}if(r instanceof Jf)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Ki)return{bytesValue:Yw(i.serializer,r._byteString)};if(r instanceof tt){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.Bu(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:Lf(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof Zf)return function(o,l){return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:o.toArray().map(u=>{if(typeof u!="number")throw l.Bu("VectorValues must only contain numeric values.");return Df(l.serializer,u)})}}}}}}(r,i);throw i.Bu(`Unsupported field value: ${Ru(r)}`)}(t,e)}function CE(t,e){const n={};return Iw(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):ei(t,(r,i)=>{const s=Jo(i,e.Mu(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function RE(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof oe||t instanceof Jf||t instanceof Ki||t instanceof tt||t instanceof Yo||t instanceof Zf)}function ip(t,e,n){if(!RE(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=Ru(n);throw r==="an object"?e.Bu(t+" a custom object"):e.Bu(t+" "+r)}}function ad(t,e,n){if((e=Te(e))instanceof Qo)return e._internalPath;if(typeof e=="string")return sp(t,e);throw Kl("Field path arguments must be of type string or ",t,!1,void 0,n)}const wN=new RegExp("[~\\*/\\[\\]]");function sp(t,e,n){if(e.search(wN)>=0)throw Kl(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Qo(...e.split("."))._internalPath}catch{throw Kl(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function Kl(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let l=`Function ${e}() called with invalid data`;n&&(l+=" (via `toFirestore()`)"),l+=". ";let u="";return(s||o)&&(u+=" (found",s&&(u+=` in field ${r}`),o&&(u+=` in document ${i}`),u+=")"),new $(L.INVALID_ARGUMENT,l+t+u)}function PE(t,e){return t.some(n=>n.isEqual(e))}/** 2934 * @license 2935 * Copyright 2020 Google LLC 2936 * 2937 * Licensed under the Apache License, Version 2.0 (the "License"); 2938 * you may not use this file except in compliance with the License. 2939 * You may obtain a copy of the License at 2940 * 2941 * http://www.apache.org/licenses/LICENSE-2.0 2942 * 2943 * Unless required by applicable law or agreed to in writing, software 2944 * distributed under the License is distributed on an "AS IS" BASIS, 2945 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2946 * See the License for the specific language governing permissions and 2947 * limitations under the License. 2948 */class NE{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new tt(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new EN(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(bu("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class EN extends NE{data(){return super.data()}}function bu(t,e){return typeof e=="string"?sp(t,e):e instanceof Qo?e._internalPath:e._delegate._internalPath}/** 2949 * @license 2950 * Copyright 2020 Google LLC 2951 * 2952 * Licensed under the Apache License, Version 2.0 (the "License");
2953 * you may not use this file except in compliance with the License. 2954 * You may obtain a copy of the License at 2955 * 2956 * http://www.apache.org/licenses/LICENSE-2.0 2957 * 2958 * Unless required by applicable law or agreed to in writing, software 2959 * distributed under the License is distributed on an "AS IS" BASIS, 2960 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2961 * See the License for the specific language governing permissions and 2962 * limitations under the License. 2963 */function bE(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new $(L.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class op{}class ap extends op{}function Q2(t,e,...n){let r=[];e instanceof op&&r.push(e),r=r.concat(n),function(s){const o=s.filter(u=>u instanceof lp).length,l=s.filter(u=>u instanceof Du).length;if(o>1||o>0&&l>0)throw new $(L.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class Du extends ap{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new Du(e,n,r)}_apply(e){const n=this._parse(e);return DE(e._query,n),new On(e.firestore,e.converter,Xh(e._query,n))}_parse(e){const n=Xo(e.firestore);return function(s,o,l,u,h,p,m){let g;if(h.isKeyField()){if(p==="array-contains"||p==="array-contains-any")throw new $(L.INVALID_ARGUMENT,`Invalid Query. You can't perform '${p}' queries on documentId().`);if(p==="in"||p==="not-in"){Gy(m,p);const A=[];for(const C of m)A.push(Hy(u,s,C));g={arrayValue:{values:A}}}else g=Hy(u,s,m)}else p!=="in"&&p!=="not-in"&&p!=="array-contains-any"||Gy(m,p),g=_N(l,o,m,p==="in"||p==="not-in");return be.create(h,p,g)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}function Y2(t,e,n){const r=e,i=bu("where",t);return Du._create(i,r,n)}class lp extends op{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new lp(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:qt.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,s){let o=i;const l=s.getFlattenedFilters();for(const u of l)DE(o,u),o=Xh(o,u)}(e._query,n),new On(e.firestore,e.converter,Xh(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class up extends ap{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new up(e,n)}_apply(e){const n=function(i,s,o){if(i.startAt!==null)throw new $(L.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new $(L.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Ao(s,o)}(e._query,this._field,this._direction);return new On(e.firestore,e.converter,function(i,s){const o=i.explicitOrderBy.concat([s]);return new rs(i.path,i.collectionGroup,o,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(e._query,n))}}function X2(t,e="asc"){const n=e,r=bu("orderBy",t);return up._create(r,n)}class cp extends ap{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new cp(e,n,r)}_apply(e){return new On(e.firestore,e.converter,$l(e._query,this._limit,this._limitType))}}function J2(t){return cp._create("limit",t,"F")}function Hy(t,e,n){if(typeof(n=Te(n))=="string"){if(n==="")throw new $(L.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!bw(e)&&n.indexOf("/")!==-1)throw new $(L.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child(me.fromString(n));if(!H.isDocumentKey(r))throw new $(L.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 fy(t,new H(r))}if(n instanceof tt)return fy(t,n._key);throw new $(L.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Ru(n)}.`)}function Gy(t,e){if(!Array.isArray(t)||t.length===0)throw new $(L.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function DE(t,e){const n=function(i,s){for(const o of i)for(const l of o.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null}(t.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new $(L.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new $(L.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class TN{convertValue(e,n="none"){switch(Qr(e)){case 0:return null;case 1:return e.booleanValue;case 2:return ke(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Kr(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 11:return this.convertObject(e.mapValue,n);case 10:return this.convertVectorValue(e.mapValue);default:throw K()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return ei(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertVectorValue(e){var n,r,i;const s=(i=(r=(n=e.fields)===null||n===void 0?void 0:n.value.arrayValue)===null||r===void 0?void 0:r.values)===null||i===void 0?void 0:i.map(o=>ke(o.doubleValue));return new Zf(s)}convertGeoPoint(e){return new Jf(ke(e.latitude),ke(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Rf(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Io(e));default:return null}}convertTimestamp(e){const n=fr(e);return new oe(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=me.fromString(e);le(nE(r));const i=new xo(r.get(1),r.get(3)),s=new H(r.popFirst(5));return i.isEqual(n)||Pn(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** 2964 * @license 2965 * Copyright 2020 Google LLC 2966 * 2967 * Licensed under the Apache License, Version 2.0 (the "License");
2968 * you may not use this file except in compliance with the License. 2969 * You may obtain a copy of the License at 2970 * 2971 * http://www.apache.org/licenses/LICENSE-2.0 2972 * 2973 * Unless required by applicable law or agreed to in writing, software 2974 * distributed under the License is distributed on an "AS IS" BASIS, 2975 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2976 * See the License for the specific language governing permissions and 2977 * limitations under the License. 2978 */function hp(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}/** 2979 * @license 2980 * Copyright 2020 Google LLC 2981 * 2982 * Licensed under the Apache License, Version 2.0 (the "License"); 2983 * you may not use this file except in compliance with the License. 2984 * You may obtain a copy of the License at 2985 * 2986 * http://www.apache.org/licenses/LICENSE-2.0 2987 * 2988 * Unless required by applicable law or agreed to in writing, software 2989 * distributed under the License is distributed on an "AS IS" BASIS, 2990 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2991 * See the License for the specific language governing permissions and 2992 * limitations under the License. 2993 */class js{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class OE extends NE{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new al(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(bu("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class al extends OE{data(e={}){return super.data(e)}}class VE{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new js(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new al(this._firestore,this._userDataWriter,r.key,r,new js(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new $(L.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(l=>{const u=new al(i._firestore,i._userDataWriter,l.doc.key,l.doc,new js(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);return l.doc,{type:"added",doc:u,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(l=>s||l.type!==3).map(l=>{const u=new al(i._firestore,i._userDataWriter,l.doc.key,l.doc,new js(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);let h=-1,p=-1;return l.type!==0&&(h=o.indexOf(l.doc.key),o=o.delete(l.doc.key)),l.type!==1&&(o=o.add(l.doc),p=o.indexOf(l.doc.key)),{type:IN(l.type),doc:u,oldIndex:h,newIndex:p}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function IN(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return K()}}/** 2994 * @license 2995 * Copyright 2020 Google LLC 2996 * 2997 * Licensed under the Apache License, Version 2.0 (the "License"); 2998 * you may not use this file except in compliance with the License. 2999 * You may obtain a copy of the License at 3000 * 3001 * http://www.apache.org/licenses/LICENSE-2.0 3002 * 3003 * Unless required by applicable law or agreed to in writing, softw
3003are 3004 * distributed under the License is distributed on an "AS IS" BASIS, 3005 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3006 * See the License for the specific language governing permissions and 3007 * limitations under the License. 3008 */function Ky(t){t=ut(t,tt);const e=ut(t.firestore,rn);return cN(Ko(e),t._key).then(n=>LE(e,t,n))}class dp extends TN{constructor(e){super(),this.firestore=e}convertBytes(e){return new Ki(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new tt(this.firestore,null,n)}}function Z2(t){t=ut(t,On);const e=ut(t.firestore,rn),n=Ko(e),r=new dp(e);return bE(t._query),hN(n,t._query).then(i=>new VE(e,r,t,i))}function zc(t,e,n){t=ut(t,tt);const r=ut(t.firestore,rn),i=hp(t.converter,e,n);return Zo(r,[tp(Xo(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,lt.none())])}function ld(t,e,n,...r){t=ut(t,tt);const i=ut(t.firestore,rn),s=Xo(i);let o;return o=typeof(e=Te(e))=="string"||e instanceof Qo?kE(s,"updateDoc",t._key,e,n,r):AE(s,"updateDoc",t._key,e),Zo(i,[o.toMutation(t._key,lt.exists(!0))])}function eb(t){return Zo(ut(t.firestore,rn),[new xu(t._key,lt.none())])}function Qy(t,e){const n=ut(t.firestore,rn),r=mn(t),i=hp(t.converter,e);return Zo(n,[tp(Xo(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,lt.exists(!1))]).then(()=>r)}function xN(t,...e){var n,r,i;t=Te(t);let s={includeMetadataChanges:!1,source:"default"},o=0;typeof e[o]!="object"||Wy(e[o])||(s=e[o],o++);const l={includeMetadataChanges:s.includeMetadataChanges,source:s.source};if(Wy(e[o])){const m=e[o];e[o]=(n=m.next)===null||n===void 0?void 0:n.bind(m),e[o+1]=(r=m.error)===null||r===void 0?void 0:r.bind(m),e[o+2]=(i=m.complete)===null||i===void 0?void 0:i.bind(m)}let u,h,p;if(t instanceof tt)h=ut(t.firestore,rn),p=_u(t._key.path),u={next:m=>{e[o]&&e[o](LE(h,t,m))},error:e[o+1],complete:e[o+2]};else{const m=ut(t,On);h=ut(m.firestore,rn),p=m._query;const g=new dp(h);u={next:A=>{e[o]&&e[o](new VE(h,g,m,A))},error:e[o+1],complete:e[o+2]},bE(t._query)}return function(g,A,C,N){const R=new Xf(N),w=new Qf(A,R,C);return g.asyncQueue.enqueueAndForget(async()=>Hf(await Gl(g),w)),()=>{R.Za(),g.asyncQueue.enqueueAndForget(async()=>Gf(await Gl(g),w))}}(Ko(h),p,l,u)}function Zo(t,e){return function(r,i){const s=new In;return r.asyncQueue.enqueueAndForget(async()=>ZP(await uN(r),i,s)),s.promise}(Ko(t),e)}function LE(t,e,n){const r=n.docs.get(e._key),i=new dp(t);return new OE(t,i,e._key,r,new js(n.hasPendingWrites,n.fromCache),e.converter)}/** 3009 * @license 3010 * Copyright 2020 Google LLC 3011 * 3012 * Licensed under the Apache License, Version 2.0 (the "License"); 3013 * you may not use this file except in compliance with the License. 3014 * You may obtain a copy of the License at 3015 * 3016 * http://www.apache.org/licenses/LICENSE-2.0 3017 * 3018 * Unless required by applicable law or agreed to in writing, software 3019 * distributed under the License is distributed on an "AS IS" BASIS, 3020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3021 * See the License for the specific language governing permissions and 3022 * limitations under the License. 3023 */class SN{constructor(e,n){this._firestore=e,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=Xo(e)}set(e,n,r){this._verifyNotCommitted();const i=Bc(e,this._firestore),s=hp(i.converter,n,r),o=tp(this._dataReader,"WriteBatch.set",i._key,s,i.converter!==null,r);return this._mutations.push(o.toMutation(i._key,lt.none())),this}update(e,n,r,...i){this._verifyNotCommitted();const s=Bc(e,this._firestore);let o;return o=typeof(n=Te(n))=="string"||n instanceof Qo?kE(this._dataReader,"WriteBatch.update",s._key,n,r,i):AE(this._dataReader,"WriteBatch.update",s._key,n),this._mutations.push(o.toMutation(s._key,lt.exists(!0))),this}delete(e){this._verifyNotCommitted();const n=Bc(e,this._firestore);return this._mutations=this._mutations.concat(new xu(n._key,lt.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new $(L.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function Bc(t,e){if((t=Te(t)).firestore!==e)throw new $(L.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}function Ar(){return new np("serverTimestamp")}function Yy(t){return new rp("increment",t)}/** 3024 * @license 3025 * Copyright 2020 Google LLC 3026 * 3027 * Licensed under the Apache License, Version 2.0 (the "License");
3028 * you may not use this file except in compliance with the License. 3029 * You may obtain a copy of the License at 3030 * 3031 * http://www.apache.org/licenses/LICENSE-2.0 3032 * 3033 * Unless required by applicable law or agreed to in writing, software 3034 * distributed under the License is distributed on an "AS IS" BASIS, 3035 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3036 * See the License for the specific language governing permissions and 3037 * limitations under the License. 3038 */function AN(t){return Ko(t=ut(t,rn)),new SN(t,e=>Zo(t,e))}(function(e,n=!0){(function(i){ns=i})(es),Wr(new hr("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),l=new rn(new DC(r.getProvider("auth-internal")),new jC(r.getProvider("app-check-internal")),function(h,p){if(!Object.prototype.hasOwnProperty.apply(h.options,["projectId"]))throw new $(L.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new xo(h.options.projectId,p)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),l._setSettings(s),l},"PUBLIC").setMultipleInstances(!0)),Xt(ly,"4.7.3",e),Xt(ly,"4.7.3","esm2017")})();var kN="firebase",CN="10.14.1";/** 3039 * @license 3040 * Copyright 2020 Google LLC 3041 * 3042 * Licensed under the Apache License, Version 2.0 (the "License"); 3043 * you may not use this file except in compliance with the License. 3044 * You may obtain a copy of the License at 3045 * 3046 * http://www.apache.org/licenses/LICENSE-2.0 3047 * 3048 * Unless required by applicable law or agreed to in writing, software 3049 * distributed under the License is distributed on an "AS IS" BASIS, 3050 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3051 * See the License for the specific language governing permissions and 3052 * limitations under the License. 3053 */Xt(kN,CN,"app");/** 3054 * @license 3055 * Copyright 2017 Google LLC 3056 * 3057 * Licensed under the Apache License, Version 2.0 (the "License"); 3058 * you may not use this file except in compliance with the License. 3059 * You may obtain a copy of the License at 3060 * 3061 * http://www.apache.org/licenses/LICENSE-2.0 3062 * 3063 * Unless required by applicable law or agreed to in writing, software 3064 * distributed under the License is distributed on an "AS IS" BASIS, 3065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3066 * See the License for the specific language governing permissions and 3067 * limitations under the License. 3068 */const RN="type.googleapis.com/google.protobuf.Int64Value",PN="type.googleapis.com/google.protobuf.UInt64Value";function jE(t,e){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}function ud(t){if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===!0||t===!1||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(e=>ud(e));if(typeof t=="function"||typeof t=="object")return jE(t,e=>ud(e));throw new Error("Data cannot be encoded in JSON: "+t)}function Ql(t){if(t==null)return t;if(t["@type"])switch(t["@type"]){case RN:case PN:{const e=Number(t.value);if(isNaN(e))throw new Error("Data cannot be decoded from JSON: "+t);return e}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(e=>Ql(e)):typeof t=="function"||typeof t=="object"?jE(t,e=>Ql(e)):t}/** 3069 * @license 3070 * Copyright 2020 Google LLC 3071 * 3072 * Licensed under the Apache License, Version 2.0 (the "License"); 3073 * you may not use this file except in compliance with the License. 3074 * You may obtain a copy of the License at 3075 * 3076 * http://www.apache.org/licenses/LICENSE-2.0 3077 * 3078 * Unless required by applicable law or agreed to in writing, software 3079 * distributed under the License is distributed on an "AS IS" BASIS, 3080 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3081 * See the License for the specific language governing permissions and 3082 * limitations under the License. 3083 */const fp="functions";/** 3084 * @license 3085 * Copyright 2017 Google LLC 3086 * 3087 * Licensed under the Apache License, Version 2.0 (the "License");
3088 * you may not use this file except in compliance with the License. 3089 * You may obtain a copy of the License at 3090 * 3091 * http://www.apache.org/licenses/LICENSE-2.0 3092 * 3093 * Unless required by applicable law or agreed to in writing, software 3094 * distributed under the License is distributed on an "AS IS" BASIS, 3095 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3096 * See the License for the specific language governing permissions and 3097 * limitations under the License. 3098 */const Xy={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 Di extends sn{constructor(e,n,r){super(`${fp}/${e}`,n||""),this.details=r}}function NN(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function bN(t,e){let n=NN(t),r=n,i;try{const s=e&&e.error;if(s){const o=s.status;if(typeof o=="string"){if(!Xy[o])return new Di("internal","internal");n=Xy[o],r=o}const l=s.message;typeof l=="string"&&(r=l),i=s.details,i!==void 0&&(i=Ql(i))}}catch{}return n==="ok"?null:new Di(n,r,i)}/** 3099 * @license 3100 * Copyright 2017 Google LLC 3101 * 3102 * Licensed under the Apache License, Version 2.0 (the "License"); 3103 * you may not use this file except in compliance with the License. 3104 * You may obtain a copy of the License at 3105 * 3106 * http://www.apache.org/licenses/LICENSE-2.0 3107 * 3108 * Unless required by applicable law or agreed to in writing, software 3109 * distributed under the License is distributed on an "AS IS" BASIS, 3110 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3111 * See the License for the specific language governing permissions and 3112 * limitations under the License. 3113 */class DN{constructor(e,n,r){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||e.get().then(i=>this.auth=i,()=>{}),this.messaging||n.get().then(i=>this.messaging=i,()=>{}),this.appCheck||r.get().then(i=>this.appCheck=i,()=>{})}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return e==null?void 0:e.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(e){if(this.appCheck){const n=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return n.error?null:n.token}return null}async getContext(e){const n=await this.getAuthToken(),r=await this.getMessagingToken(),i=await this.getAppCheckToken(e);return{authToken:n,messagingToken:r,appCheckToken:i}}}/** 3114 * @license 3115 * Copyright 2017 Google LLC 3116 * 3117 * Licensed under the Apache License, Version 2.0 (the "License"); 3118 * you may not use this file except in compliance with the License. 3119 * You may obtain a copy of the License at 3120 * 3121 * http://www.apache.org/licenses/LICENSE-2.0 3122 * 3123 * Unless required by applicable law or agreed to in writing, software 3124 * distributed under the License is distributed on an "AS IS" BASIS, 3125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3126 * See the License for the specific language governing permissions and 3127 * limitations under the License. 3128 */const cd="us-central1";function ON(t){let e=null;return{promise:new Promise((n,r)=>{e=setTimeout(()=>{r(new Di("deadline-exceeded","deadline-exceeded"))},t)}),cancel:()=>{e&&clearTimeout(e)}}}class VN{constructor(e,n,r,i,s=cd,o){this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new DN(n,r,i),this.cancelAllRequests=new Promise(l=>{this.deleteService=()=>Promise.resolve(l())});try{const l=new URL(s);this.customDomain=l.origin+(l.pathname==="/"?"":l.pathname),this.region=cd}catch{this.customDomain=null,this.region=s}}_delete(){return this.deleteService()}_url(e){const n=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${n}/${this.region}/${e}`:this.customDomain!==null?`${this.customDomain}/${e}`:`https://${this.region}-${n}.cloudfunctions.net/${e}`}}function LN(t,e,n){t.emulatorOrigin=`http://${e}:${n}`}function jN(t,e,n){return r=>FN(t,e,r,{})}async function MN(t,e,n,r){n["Content-Type"]="application/json";let i;try{i=await r(t,{method:"POST",body:JSON.stringify(e),headers:n})}catch{return{status:0,json:null}}let s=null;try{s=await i.json()}catch{}return{status:i.status,json:s}}function FN(t,e,n,r){const i=t._url(e);return UN(t,i,n,r)}async function UN(t,e,n,r){n=ud(n);const i={data:n},s={},o=await t.contextProvider.getContext(r.limitedUseAppCheckTokens);o.authToken&&(s.Authorization="Bearer "+o.authToken),o.messagingToken&&
3128(s["Firebase-Instance-ID-Token"]=o.messagingToken),o.appCheckToken!==null&&(s["X-Firebase-AppCheck"]=o.appCheckToken);const l=r.timeout||7e4,u=ON(l),h=await Promise.race([MN(e,i,s,t.fetchImpl),u.promise,t.cancelAllRequests]);if(u.cancel(),!h)throw new Di("cancelled","Firebase Functions instance was deleted.");const p=bN(h.status,h.json);if(p)throw p;if(!h.json)throw new Di("internal","Response is not valid JSON object.");let m=h.json.data;if(typeof m>"u"&&(m=h.json.result),typeof m>"u")throw new Di("internal","Response is missing data field.");return{data:Ql(m)}}const Jy="@firebase/functions",Zy="0.11.8";/** 3129 * @license 3130 * Copyright 2019 Google LLC 3131 * 3132 * Licensed under the Apache License, Version 2.0 (the "License"); 3133 * you may not use this file except in compliance with the License. 3134 * You may obtain a copy of the License at 3135 * 3136 * http://www.apache.org/licenses/LICENSE-2.0 3137 * 3138 * Unless required by applicable law or agreed to in writing, software 3139 * distributed under the License is distributed on an "AS IS" BASIS, 3140 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3141 * See the License for the specific language governing permissions and 3142 * limitations under the License. 3143 */const zN="auth-internal",BN="app-check-internal",$N="messaging-internal";function qN(t,e){const n=(r,{instanceIdentifier:i})=>{const s=r.getProvider("app").getImmediate(),o=r.getProvider(zN),l=r.getProvider($N),u=r.getProvider(BN);return new VN(s,o,l,u,i,t)};Wr(new hr(fp,n,"PUBLIC").setMultipleInstances(!0)),Xt(Jy,Zy,e),Xt(Jy,Zy,"esm2017")}/** 3144 * @license 3145 * Copyright 2020 Google LLC 3146 * 3147 * Licensed under the Apache License, Version 2.0 (the "License"); 3148 * you may not use this file except in compliance with the License. 3149 * You may obtain a copy of the License at 3150 * 3151 * http://www.apache.org/licenses/LICENSE-2.0 3152 * 3153 * Unless required by applicable law or agreed to in writing, software 3154 * distributed under the License is distributed on an "AS IS" BASIS, 3155 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3156 * See the License for the specific language governing permissions and 3157 * limitations under the License. 3158 */function WN(t=pf(),e=cd){const r=pu(Te(t),fp).getImmediate({identifier:e}),i=R0("functions");return i&&HN(r,...i),r}function HN(t,e,n){LN(Te(t),e,n)}function tb(t,e,n){return jN(Te(t),e)}qN(fetch.bind(self));const GN={apiKey:"AIzaSyBCYO44Y4awxP-UbII2xlF9WPafsKKCXSM",authDomain:"indexchecker-534db.firebaseapp.com",projectId:"indexchecker-534db",storageBucket:"indexchecker-534db.firebasestorage.app",messagingSenderId:"146812028648",appId:"1:146812028648:web:547b3861747f3cfe98ab5d",measurementId:"G-4EMVNWEC8S"},pp=O0(GN),Ms=RC(pp),Ft=pN(pp),nb=WN(pp),No=new Kt;No.setCustomParameters({prompt:"select_account"});No.addScope("https://www.googleapis.com/auth/webmasters");No.addScope("https://www.googleapis.com/auth/indexing");function ME(){const[t,e]=V.useState(null),[n,r]=V.useState(!0),[i,s]=V.useState(null);return V.useEffect(()=>{const o=rw(Ms,l=>{if(l){r(!0);const u=mn(Ft,"users",l.uid),h=xN(u,p=>{p.exists()?e(p.data()):(console.warn(`User document not found for UID: ${l.uid}`),e(null)),r(!1)},p=>{console.error("Error listening to user document:",p),s(p),e(null),r(!1)});return()=>{h()}}else e(null),r(!1)},l=>{console.error("Error in auth state listener:",l),s(l),e(null),r(!1)});return()=>{o()}},[]),{user:t,loading:n,error:i}}/** 3159 * @license lucide-react v0.344.0 - ISC 3160 * 3161 * This source code is licensed under the ISC license. 3162 * See the LICENSE file in the root directory of this source tree. 3163 */var KN={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"};/** 3164 * @license lucide-react v0.344.0 - ISC 3165 * 3166 * This source code is licensed under the ISC license. 3167 * See the LICENSE file in the root directory of this source tree. 3168 */const QN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ue=(t,e)=>{const n=V.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:l="",children:u,...h},p)=>V.createElement("svg",{ref:p,...KN,width:i,height:i,stroke:r,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${QN(t)}`,l].join(" "),...h},[...e.map(([m,g])=>V.createElement(m,g)),...Array.isArray(u)?u:[u]]));return n.displayName=`${t}`,n};/** 3169 * @license lucide-react v0.344.0 - ISC 3170 * 3171 * This source code is licensed under the ISC license. 3172 * See the LICENSE file in the root directory of this source tree. 3173 */const YN=ue("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 3174 * @license lucide-react v0.344.0 - ISC 3175 * 3176 * This source code is licensed under the ISC license. 3177 * See the LICENSE file in the root directory of this source tree. 3178 */const XN=ue("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]]);/** 3179 * @license lucide-react v0.344.0 - ISC 3180 * 3181 * This source code is licensed under the ISC license. 3182 * See the LICENSE file in the root directory of this source tree. 3183 */const JN=ue("BarChart",[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
3183],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]]);/** 3184 * @license lucide-react v0.344.0 - ISC 3185 * 3186 * This source code is licensed under the ISC license. 3187 * See the LICENSE file in the root directory of this source tree. 3188 */const ZN=ue("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 3189 * @license lucide-react v0.344.0 - ISC 3190 * 3191 * This source code is licensed under the ISC license. 3192 * See the LICENSE file in the root directory of this source tree. 3193 */const e2=ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 3194 * @license lucide-react v0.344.0 - ISC 3195 * 3196 * This source code is licensed under the ISC license. 3197 * See the LICENSE file in the root directory of this source tree. 3198 */const FE=ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 3199 * @license lucide-react v0.344.0 - ISC 3200 * 3201 * This source code is licensed under the ISC license. 3202 * See the LICENSE file in the root directory of this source tree. 3203 */const t2=ue("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 3204 * @license lucide-react v0.344.0 - ISC 3205 * 3206 * This source code is licensed under the ISC license. 3207 * See the LICENSE file in the root directory of this source tree. 3208 */const n2=ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 3209 * @license lucide-react v0.344.0 - ISC 3210 * 3211 * This source code is licensed under the ISC license. 3212 * See the LICENSE file in the root directory of this source tree. 3213 */const r2=ue("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 3214 * @license lucide-react v0.344.0 - ISC 3215 * 3216 * This source code is licensed under the ISC license. 3217 * See the LICENSE file in the root directory of this source tree. 3218 */const i2=ue("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 3219 * @license lucide-react v0.344.0 - ISC 3220 * 3221 * This source code is licensed under the ISC license. 3222 * See the LICENSE file in the root directory of this source tree. 3223 */const s2=ue("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 3224 * @license lucide-react v0.344.0 - ISC 3225 * 3226 * This source code is licensed under the ISC license. 3227 * See the LICENSE file in the root directory of this source tree. 3228 */const o2=ue("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 3229 * @license lucide-react v0.344.0 - ISC 3230 * 3231 * This source code is licensed under the ISC license. 3232 * See the LICENSE file in the root directory of this source tree. 3233 */const a2=ue("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 3234 * @license lucide-react v0.344.0 - ISC 3235 * 3236 * This source code is licensed under the ISC license. 3237 * See the LICENSE file in the root directory of this source tree. 3238 */const l2=ue("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 3239 * @license lucide-react v0.344.0 - ISC 3240 * 3241 * This source code is licensed under the ISC license. 3242 * See the LICENSE file in the root directory of this source tree. 3243 */const u2=ue("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 3244 * @license lucide-react v0.344.0 - ISC 3245 * 3246 * This source code is licensed under the ISC license. 3247 * See the LICENSE file in the root directory of this source tree. 3248 */const c2=ue("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 3249 * @license lucide-react v0.344.0 - ISC 3250 * 3251 * This source code is licensed under the ISC license. 3252 * See the LICENSE file in the root directory of this source tree. 3253 */const h2=ue("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 3254 * @license lucide-react v0.344.0 - ISC 3255 * 3256 * This source code is licensed under the ISC license. 3257 * See the LICENSE file in the root directory of this source tree. 3258 */const d2=ue("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 3259 * @license lucide-react v0.344.0 - ISC 3260 * 3261 * This source code is licensed under the ISC license. 3262 * See the LICENSE file in the root directory of this source tree. 3263 */const f2=ue("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 3264 * @license lucide-react v0.344.0 - ISC 3265 * 3266 * This source code is licensed under the ISC license. 3267 * See the LICENSE file in the root directory of this source tree. 3268 */const UE=ue("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 3269 * @license lucide-react v0.344.0 - ISC 3270 * 3271 * This source code is licensed under the ISC license. 3272 * See the LICENSE file in the root directory of this source tree. 3273 */const p2=ue("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 3274 * @license lucide-react v0.344.0 - ISC 3275 * 3276 * This source code is licensed under the ISC license. 3277 * See the LICENSE file in the root directory of this source tree. 3278 */const Yr=ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 3279 * @license lucide-react v0.344.0 - ISC 3280 * 3281 * This source code is licensed under the ISC license. 3282 * See the LICENSE file in the root directory of this source tree. 3283 */const m2=ue("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 3284 * @license lucide-react v0.344.0 - ISC 3285 * 3286 * This source code is licensed under the ISC license. 3287 * See the LICENSE file in the root directory of this source tree. 3288 */const ev=ue("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** 3289 * @license lucide-react v0.344.0 - ISC 3290 * 3291 * This source code is licensed under the ISC license. 3292 * See the LICENSE file in the root directory of this source tree. 3293 */const g2=ue("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/** 3294 * @license lucide-react v0.344.0 - ISC 3295 * 3296 * This source code is licensed under the ISC license. 3297 * See the LICENSE file in the root directory of this source tree. 3298 */const y2=ue("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 3299 * @license lucide-react v0.344.0 - ISC 3300 * 3301 * This source code is licensed under the ISC license. 3302 * See the LICENSE file in the root directory of this source tree.
3303 */const hd=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 3304 * @license lucide-react v0.344.0 - ISC 3305 * 3306 * This source code is licensed under the ISC license. 3307 * See the LICENSE file in the root directory of this source tree. 3308 */const v2=ue("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),mp=()=>f.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center bg-slate-50",children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"inline-flex bg-blue-800 text-white p-3 rounded-md mb-4 animate-pulse",children:f.jsx(Yr,{className:"w-6 h-6"})}),f.jsx("h1",{className:"text-xl font-semibold text-slate-800 mb-2",children:"Loading Index Checker"}),f.jsx("p",{className:"text-slate-500",children:"Just a moment..."})]})}),zE=V.createContext(void 0);function BE(){const t=V.useContext(zE);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}function _2({children:t}){const[e,n]=V.useState(null),[r,i]=V.useState(null),[s,o]=V.useState(!0),[l,u]=V.useState(null);V.useEffect(()=>{const R=rw(Ms,async w=>{if(n(w),w)try{const _=mn(Ft,"users",w.uid),E=await Ky(_);if(E.exists()){const D=E.data();i(D)}else{const D={uid:w.uid,email:w.email||"",displayName:w.displayName||"",photoURL:w.photoURL||"",createdAt:Ar(),updatedAt:Ar(),onboardingCompleted:!1,credits:100,seoFocus:"",searchConsoleConnected:!1,searchConsoleAccessToken:void 0};await zc(_,D),i(D)}}catch(_){console.error("Error fetching user profile:",_),u("Failed to load user profile")}else i(null);o(!1)});return()=>R()},[]);const h=async(R,w)=>{if(!R||!w){console.log("User ID or token missing, skipping GSC sync.");return}try{const _=await m(w);if(!_||_.length===0){console.log("No GSC sites found to sync for user:",R);return}const E=od(Ft,"users",R,"gscSites"),D=AN(Ft);for(const j of _){const U=encodeURIComponent(j.siteUrl),T=mn(E,U);let v=[];try{const I=await fetch(`https://www.googleapis.com/webmasters/v3/sites/${encodeURIComponent(j.siteUrl)}/sitemaps`,{headers:{Authorization:`Bearer ${w}`}});if(I.ok){const x=await I.json();x.sitemap&&(v=x.sitemap.map(k=>({path:k.path||null,lastSubmitted:k.lastSubmitted?oe.fromDate(new Date(k.lastSubmitted)):null,isPending:typeof k.isPending=="boolean"?k.isPending:null,isSitemapIndex:typeof k.isSitemapIndex=="boolean"?k.isSitemapIndex:null,type:k.type||null,lastDownloaded:k.lastDownloaded?oe.fromDate(new Date(k.lastDownloaded)):null,warnings:typeof k.warnings=="number"?k.warnings:0,errors:typeof k.errors=="number"?k.errors:0})))}else{console.warn(`Failed to fetch sitemaps for ${j.siteUrl}: ${I.status} ${I.statusText}`);const x=await I.text();console.warn(`Error body: ${x}`)}}catch(I){console.error(`Error fetching or processing sitemaps for ${j.siteUrl}:`,I)}D.set(T,{...j,userId:R,sitemaps:v,syncedAt:Ar()})}await D.commit(),console.log("Successfully synced GSC sites and their sitemaps to Firestore for user:",R)}catch(_){console.error("Error syncing GSC sites/sitemaps to Firestore:",_)}},p=async()=>{var R;if(!e)throw u("User not authenticated"),new Error("User not authenticated");try{const w=await Zg(Ms,No),_=Kt.credentialFromResult(w),E=_==null?void 0:_.accessToken,D=(R=w.user)==null?void 0:R.refreshToken;let j=null;if(_){const U=_.idToken;if(U)try{const T=JSON.parse(atob(U.split(".")[1]));j=T.exp?T.exp*1e3:null,console.log("Token expires at:",j?new Date(j):"No expiry found")}catch(T){console.error("Failed to decode JWT:",T),j=null}}if(E){const U=mn(Ft,"users",e.uid);return await ld(U,{searchConsoleAccessToken:E,searchConsoleRefreshToken:D,searchConsoleAccessTokenExpiryTime:j?oe.fromMillis(j):null,searchConsoleConnected:!0,updatedAt:Ar()}),i(T=>T?{...T,searchConsoleAccessToken:E,searchConsoleRefreshToken:D,searchConsoleConnected:!0,updatedAt:oe.now()}:(console.warn("User profile was null when updating after GSC connect. This might indicate an issue."),{uid:e.uid,email:e.email||"",displayName:e.displayName||"",photoURL:e.photoURL||"",createdAt:oe.now(),credits:0,onboardingCompleted:!1,seoFocus:"",searchConsoleConnected:!0,searchConsoleAccessToken:E,searchConsoleRefreshToken:D,updatedAt:oe.now()})),E&&(console.log("GSC connected, initiating site and sitemap sync..."),await h(e.uid,E)),E}else throw u("Failed to retrieve access token for Search Console."),new Error("Failed to retrieve access token for Search Console.")}catch(w){throw console.error("Error connecting Search Console:",w),u("Failed to connect Search Console. Please try again."),w}},m=async R=>{var _;const w=R||(r==null?void 0:r.searchConsoleAccessToken);if(!w){const E="Search Console not connected or access token unavailable.";throw u(E),new Error(E)}try{const E=await fetch("https://www.googleapis.com/webmasters/v3/sites",{headers:{Authorization:`Bearer ${w}`}});if(!E.ok){let j=E.statusText,U={};try{const v=await E.json();j=((_=v.error)==null?void 0:_.message)||j,U=v.error}catch(v){console.warn("Could not parse error response as JSON:",v)}console.error("Error fetching GSC sites. Status:",E.status,"Message:",j,"Details:",U);const T=`Failed to fetch sites from Google Search Console: ${j} (Status: ${E.status})`;throw u(T),new Error(T)}return(await E.json()).siteEntry||[]}
3308catch(E){if(console.error("Catch block in fetchGoogleSearchConsoleSites:",E),E instanceof Error)throw(!l||l!==E.message)&&u("An error occurred while fetching your sites from Google Search Console."),E;{const D="An unexpected error occurred while fetching your sites.";throw u(D),new Error(D)}}},N={currentUser:e,userProfile:r,loading:s,error:l,signInWithGoogle:async()=>{try{u(null);const R=await Zg(Ms,No);if(R.user){const w=mn(Ft,"users",R.user.uid);if(!(await Ky(w)).exists()){const E={uid:R.user.uid,email:R.user.email||"",displayName:R.user.displayName||"",photoURL:R.user.photoURL||"",createdAt:Ar(),updatedAt:Ar(),onboardingCompleted:!1,credits:100,seoFocus:"",searchConsoleConnected:!1,searchConsoleRefreshToken:R.user.refreshToken};await zc(w,E)}}}catch(R){throw console.error("Error signing in with Google:",R),u("Failed to sign in with Google"),R}},signOut:async()=>{try{u(null),await _k(Ms)}catch(R){throw console.error("Error signing out:",R),u("Failed to sign out"),R}},updateUserProfile:async R=>{if(!e)throw console.error("Cannot update profile: no current user."),u("User not authenticated for profile update."),new Error("User not authenticated");try{const w=mn(Ft,"users",e.uid);await zc(w,{...R,updatedAt:Ar()},{merge:!0});const _={...r||{uid:e.uid,email:e.email||"",searchConsoleConnected:!1,searchConsoleAccessToken:void 0},...R};i(E=>{const D={...R,updatedAt:oe.now()};return E?{...E,...D}:{uid:e.uid,email:e.email||"",displayName:e.displayName||"",photoURL:e.photoURL||"",createdAt:oe.now(),credits:0,onboardingCompleted:!1,seoFocus:"",searchConsoleConnected:!1,searchConsoleAccessToken:void 0,...D}}),R.onboardingCompleted===!0&&_.searchConsoleConnected===!0&&_.searchConsoleAccessToken&&(console.log("Onboarding completed and GSC connected, initiating site and sitemap sync..."),await h(e.uid,_.searchConsoleAccessToken))}catch(w){throw console.error("Error updating user profile:",w),u("Failed to update profile"),w}},connectSearchConsole:p,fetchGoogleSearchConsoleSites:m};return f.jsx(zE.Provider,{value:N,children:t})}const $E=V.createContext(void 0);function w2(){const t=V.useContext($E);if(!t)throw new Error("useCredits must be used within a CreditProvider");return t}function E2({children:t}){const{currentUser:e,userProfile:n}=BE(),[r,i]=V.useState(0),[s,o]=V.useState(!0),[l,u]=V.useState(null);V.useEffect(()=>{n?(i(n.credits),o(!1)):i(0)},[n]);const h=async()=>[{id:"basic",name:"Basic",credits:1e3,price:10,description:"Best for small sites and blogs"},{id:"pro",name:"Professional",credits:5e3,price:37.5,description:"Perfect for growing businesses"},{id:"enterprise",name:"Enterprise",credits:2e4,price:100,description:"For large sites with extensive SEO needs"}],g={credits:r,loading:s,error:l,purchaseCredits:async(A,C)=>{if(!e)return!1;o(!0),u(null);try{const R=(await h()).find(E=>E.id===A);if(!R)return u("Invalid package selected"),!1;const w=R.credits*C,_=mn(Ft,"users",e.uid);return await ld(_,{credits:Yy(w)}),await Qy(od(Ft,"creditTransactions"),{userId:e.uid,packageId:A,credits:w,amount:R.price*C,timestamp:oe.now(),type:"purchase"}),i(E=>E+w),!0}catch(N){return console.error("Error purchasing credits:",N),u("Failed to purchase credits"),!1}finally{o(!1)}},useCredits:async(A,C)=>{if(!e)return!1;if(r<A)return u("Insufficient credits"),!1;o(!0),u(null);try{const N=mn(Ft,"users",e.uid);return await ld(N,{credits:Yy(-A)}),await Qy(od(Ft,"creditTransactions"),{userId:e.uid,credits:-A,reason:C,timestamp:oe.now(),type:"usage"}),i(R=>R-A),!0}catch(N){return console.error("Error using credits:",N),u("Failed to use credits"),!1}finally{o(!1)}},getCreditPackages:h};return f.jsx($E.Provider,{value:g,children:t})}const Rs=({children:t})=>{var A;const[e,n]=V.useState(!1),[r,i]=V.useState(!1),{pathname:s}=Zr(),o=hf(),{currentUser:l,userProfile:u,signOut:h}=BE(),{credits:p}=w2(),m=async()=>{await h(),o("/login")},g=[{path:"/dashboard",label:"Dashboard",icon:f.jsx(c2,{className:"w-5 h-5"})},{path:"/sites",label:"Sites",icon:f.jsx(a2,{className:"w-5 h-5"})},{path:"/history",label:"History",icon:f.jsx(l2,{className:"w-5 h-5"})},{path:"/settings",label:"Settings",icon:f.jsx(m2,{className:"w-5 h-5"})},{path:"/billing",label:"Billing",icon:f.jsx(i2,{className:"w-5 h-5"})}];return f.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col",children:[f.jsx("header",{className:"bg-white border-b border-slate-200 sticky top-0 z-10",children:f.jsx("div",{className:"container mx-auto px-4",children:f.jsxs("div",{className:"flex h-16 items-center justify-between",children:[f.jsxs("div",{className:"flex items-center",children:[f.jsx("button",{className:"md:hidden mr-2 p-2 rounded-md hover:bg-slate-100",onClick:()=>n(!e),children:e?f.jsx(hd,{className:"w-5 h-5"}):f.jsx(UE,{className:"w-5 h-5"})}),f.jsxs(Ja,{to:"/",className:"flex items-center space-x-2",children:[f.jsx("div",{className:"bg-blue-800 text-white p-2 rounded-md",children:f.jsx(Yr,{className:"w-5 h-5"})}),f.jsx("span",{className:"font-bold text-xl text-blue-900 hidden md:inline",children:"Index Checker"})]})]}),f.jsxs("div",{className:"flex items-center space-x-4",children:[f.jsxs("div",{className:"bg-slate-100 rounded-full px-3 py-1 text-sm font-medium text-slate-700 flex items-center",children:[f.jsx("span",{children:p}),f.jsx("span",{className:"ml-1",children:"credits"})]}),f.jsxs("div",{className:"relative",children:[f.jsxs("button",{className:"flex items-center space-x-2",onClick:()=>i(!r),children:[f.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-200 flex items-center justify-center overflow-hidden",children:u!=null&&u.photoURL?f.jsx("img",{src:u.photoURL,alt:u.displayName||"User",className:"w-full h-full object-cover"}):f.jsx("span",{className:"text-sm font-medium text-slate-600",children:((A=u==null?void 0:u.displayName)==null?void 0:A[0])||"U"})}),f.jsx(FE,{className:"w-4 h-4 text-slate-500"})]}),r&&f.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 ring-1 ring-black ring-opacity-5 focus:outline-none",children:[f.jsxs("div",{className:"px-4 py-2 border-b border-slate-100",children:[f.jsx("p",{className:"text-sm font-medium",children:u==null?void 0:u.displayName}),f.jsx("p",{className:"text-xs text-slate-500 truncate",children:u==null?void 0:u.email})]}),f.jsxs("button",{onClick:m,className:"w-full text-left px-4 py-2 text-sm text-slate-700 hover:bg-slate-100 flex items-center space-x-2",children:[f.jsx(d2,{className:"w-4 h-4"}),f.jsx("span",{children:"Sign out"})]})]})]})]})]})})}),f.jsxs("div",{className:"flex flex-1 container mx-auto px-4 py-6",children:[f.jsx("aside",{className:"hidden md:block w-56 mr-8 shrink-0",children:f.jsx("nav",{className:"space-y-1 sticky top-20",children:g.map(C=>f.jsxs(Ja,{to:C.path,className:`flex items-center space-x-3 px-3 py-2 rounded-md text-sm font-medium ${s===C.path?"bg-blue-50 text-blue-800":"text-slate-700 hover:bg-slate-100"}`,children:[C.icon,f.jsx("span",{children:C.label})]},C.path))})}),e&&f.jsx("div",{className:"md:hidden fixed inset-0 bg-slate-800 bg-opacity-75 z-40",children:f.jsxs("div",{className:"fixed inset-y-0 left-0 w-64 bg-white shadow-xl z-50 p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-6",children:[f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx("div",{className:"bg-blue-800 text-white p-2 rounded-md",children:f.jsx(Yr,{className:"w-5 h-5"})}),f.jsx("span",{className:"font-bold text-xl text-blue-900",children:"Index Checker"})]}),f.jsx("button",{className:"p-2 rounded-md hover:bg-slate-100",onClick:()=>n(!1),children:f.jsx(hd,{className:"w-5 h-5"})})]}),f.jsx("nav",{className:"space-y-1",children:g.map(C=>f.jsxs(Ja,{to:C.path,className:`flex items-center space-x-3 px-3 py-2 rounded-md text-sm font-medium ${s===C.path?"bg-blue-50 text-blue-800":"text-slate-700 hover:bg-slate-100"}`,onClick:()=>n(!1),children:[C.icon,f.jsx("span",{children:C.label})]},C.path))})]})}),f.jsx("main",{className:"flex-1",children:t})]})]})},tv=({children:t})=>f.jsx("div",{className:"min-h-screen bg-gradient-to-b from-slate-50 to-slate-100",children:f.jsxs("div",{className:"container mx-auto px-4 py-6",children:[f.jsx("header",{className:"flex justify-between items-center mb-8",children:f.jsxs(Ja,{to:"/",className:"flex items-center space-x-2",children:[f.jsx("div",{className:"bg-blue-800 text-white p-2 rounded-md",children:f.jsx(Yr,{className:"w-5 h-5"})}),f.jsx("span",{className:"font-bold text-xl text-blue-900",children:"Index Checker"})]})}),f.jsx("main",{className:"max-w-md mx-auto",children:t}),f.jsx("footer",{className:"mt-16 text-center text-sm text-slate-500",children:f.jsxs("p",{children:["© ",new Date().getFullYear()," Index Checker. All rights reserved."]})})]})}),Fr=({variant:t="primary",size:e="md",children:n,className:r="",...i})=>{const s="inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",o={primary:"bg-primary-600 hover:bg-primary-700 text-white focus:ring-primary-500",secondary:"bg-secondary-600 hover:bg-secondary-700 text-white focus:ring-secondary-500",outline:"border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-primary-500",ghost:"text-gray-700 hover:bg-gray-100 focus:ring-primary-500"},l={sm:"text-sm px-3 py-2",md:"text-base px-4 py-2",lg:"text-base px-6 py-3"},u=`${s} ${o[t]} ${l[e]} ${r}`;return f.jsx("button",{className:u,...i,children:n})},qE=({variant:t="dark"})=>{const e=t==="light"?"text-white":"text-gray-900";return f.jsxs("div",{className:"flex items-center",children:[f.jsx("div",{className:"w-10 h-10 bg-primary-600 rounded-lg flex items-center justify-center mr-2 relative overflow-hidden",children:f.jsx(Yr,{className:"text-white absolute",size:16})}),f.jsxs("span",{className:`text-xl font-bold ${e}`,children:["Index",f.jsx("span",{className:"text-primary-600",children:"Checker"}),"AI"]})]})},T2=()=>{const[t,e]=V.useState(!1),[n,r]=V.useState(!1);return V.useEffect(()=>{const i=()=>{e(window.scrollY>10)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)},[]),f.jsxs("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${t?"bg-white shadow-md py-2":"bg-transparent py-4"}`,children:[f.jsx("div",{className:"container mx-auto px-4 md:px-6",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("a",{href:"/",className:"flex items-center space-x-2",children:f.jsx(qE,{})}),f.jsx("div",{className:"hidden md:flex items-center space-x-4",children:f.jsx("a",{href:"/login",children:f.jsx(Fr,{variant:"primary",size:"sm",children:"Get Started"})})}),f.jsx("button",{className:"md:hidden text-gray-700",onClick:()=>r(!n),"aria-label":"Toggle menu",children:n?f.jsx(hd,{size:24}):f.jsx(UE,{size:24})})]})}),n&&f.jsx("div",{className:"md:hidden bg-white",children:f.jsxs("div",{className:"px-4 py-5 space-y-4",children:[f.jsx("a",{href:"#features",className:"block text-gray-700 hover:text-primary-600 font-medium transition-colors",onClick:()=>r(!1),children:"Features"}),f.jsx("a",{href:"#how-it-works",className:"block text-gray-700 hover:text-primary-600 font-medium transition-colors",onClick:()=>r(!1),children:"How It Works"}),f.jsx("a",{href:"#pricing",className:"block text-gray-700 hover:text-primary-600 font-medium transition-colors",onClick:()=>r(!1),children:"Pricing"}),f.jsx("a",{href:"#faq",className:"block text-gray-700 hover:text-primary-600 font-medium transition-colors",onClick:()=>r(!1),children:"FAQ"}),f.jsxs("div",{className:"pt-4 space-y-3",children:[f.jsx(Fr,{variant:"outline",size:"sm",className:"w-full",children:"Log in"}),f.jsx(Fr,{variant:"primary",size:"sm",className:"w-full",children:"Get Started"})]})]})})]})},I2=()=>{const t=V.useRef(null);return V.useEffect(()=>{const e=new IntersectionObserver(([n])=>{n.isIntersecting&&(n.target.classList.add("animate-fade-in"),e.unobserve(n.target))},{threshold:.1});return t.current&&e.observe(t.current),()=>{t.current&&e.unobserve(t.current)}},[]),f.jsx("section",{ref:t,className:"pt-28 pb-20 md:pt-32 md:pb-24",children:f.jsx("div",{className:"container mx-auto px-4 md:px-6",children:f.jsxs("div",{className:"flex flex-col md:flex-row items-center",children:[f.jsxs("div",{className:"md:w-1/2 mb-10 md:mb-0",children:[f.jsxs("h1",{className:`text-3xl md:text-5xl lg:text-6xl font-bold text-gray-900 3309 !leading-[5rem] mb-6`,children:["Never Lose Organic Traffic Due To ",f.jsxs("span",{className:"text-primary-600 relative",children:["Unindexed Pages",f.jsx("span",{className:"absolute bottom-1 left-0 w-full h-2 bg-accent-200 -z-10"})]})]}),f.jsx("p",{className:"text-xl text-gray-600 mb-8 leading-relaxed",children:"Index Checker AI finds and fixes pages that Google missed, recovering lost traffic and maximizing your SEO investment."}),f.jsxs("div",{className:"flex flex-col sm:flex-row space-y-4 sm:sp
3309ace-y-0 sm:space-x-4",children:[f.jsx(Fr,{variant:"primary",size:"lg",children:"Start Free Trial"}),f.jsx(Fr,{variant:"outline",size:"lg",children:"See Demo"})]}),f.jsxs("div",{className:"mt-8 flex items-center text-sm text-gray-500",children:[f.jsx("span",{className:"bg-green-100 text-green-800 font-medium px-2.5 py-0.5 rounded text-xs",children:"NEW"}),f.jsx("span",{className:"ml-2",children:"Now with real-time alerts and automated re-submission"})]})]}),f.jsx("div",{className:"md:w-1/2 md:pl-12",children:f.jsxs("div",{className:"relative bg-white rounded-xl shadow-2xl overflow-hidden",children:[f.jsx("div",{className:"absolute top-0 left-0 right-0 h-1.5 bg-gradient-to-r from-primary-500 via-accent-400 to-secondary-500"}),f.jsx("img",{src:"https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",alt:"Index Checker AI dashboard showing unindexed pages",className:"w-full h-auto rounded-b-xl"}),f.jsx("div",{className:"absolute -bottom-6 left-1/2 transform -translate-x-1/2 bg-white shadow-lg rounded-full px-4 py-2 w-3/4 flex justify-center",children:f.jsx("span",{className:"text-primary-600 font-semibold text-sm",children:"Average recovery: 27% increase in indexed pages"})})]})})]})})})},x2=()=>{const[t,e]=V.useState(""),[n,r]=V.useState(!1),i=async s=>{s.preventDefault(),r(!0),setTimeout(()=>{r(!1),alert("This is a demo. In the real application, you would receive a report of unindexed pages.")},2e3)};return f.jsx("section",{className:"py-16 md:py-24 bg-gradient-to-b from-white to-gray-50",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-12",children:[f.jsx("div",{className:"inline-block bg-primary-100 text-primary-800 text-sm font-medium px-3 py-1 rounded-full mb-4",children:"Free Indexing Report"}),f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"Discover Your Unindexed Pages Now"}),f.jsx("p",{className:"text-xl text-gray-600 leading-relaxed",children:"Get a free report of your website's unindexed pages. See exactly what content Google is missing and understand the potential traffic you're losing."})]}),f.jsxs("div",{className:"max-w-2xl mx-auto",children:[f.jsxs("div",{className:"bg-white rounded-xl shadow-xl p-8",children:[f.jsxs("form",{onSubmit:i,className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"website-url",className:"block text-sm font-medium text-gray-700 mb-2",children:"Enter your website URL"}),f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"url",id:"website-url",required:!0,placeholder:"https://example.com",value:t,onChange:s=>e(s.target.value),className:"block w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary-500 focus:border-primary-500"}),f.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:f.jsx(Yr,{className:"h-5 w-5 text-gray-400"})})]})]}),f.jsx(Fr,{type:"submit",variant:"primary",size:"lg",className:"w-full",disabled:n,children:n?"Analyzing Your Website...":"Get Free Report"})]}),f.jsx("div",{className:"mt-8 pt-8 border-t border-gray-100",children:f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 text-center",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"100%"}),f.jsx("p",{className:"text-gray-600",children:"Free Analysis"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"30 sec"}),f.jsx("p",{className:"text-gray-600",children:"Quick Scan"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"No Card"}),f.jsx("p",{className:"text-gray-600",children:"Required"})]})]})})]}),f.jsxs("p",{className:"text-sm text-gray-500 text-center mt-6",children:["Want automated monitoring and instant reindexing?",f.jsx("a",{href:"#pricing",className:"text-primary-600 hover:text-primary-700 font-medium ml-1",children:"Check out our plans"})]})]})]})})},S2=()=>{const t=V.useRef(null);return V.useEffect(()=>{const e=new IntersectionObserver(([n])=>{n.isIntersecting&&(n.target.classList.add("animate-fade-in"),e.unobserve(n.target))},{threshold:.1});return t.current&&e.observe(t.current),()=>{t.current&&e.unobserve(t.current)}},[]),f.jsx("section",{ref:t,className:"py-16 md:py-24 bg-gray-50 duration-1000",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"The Hidden Problem Costing You Traffic"}),f.jsx("p",{className:"text-xl text-gray-600 leading-relaxed",children:"Even with the best SEO strategy, up to 30% of your pages go unindexed by Google, creating invisible holes in your website that leak traffic and revenue."})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[f.jsxs("div",{className:"bg-white rounded-xl p-8 shadow-lg hover:shadow-xl transition-shadow transform hover:-translate-y-1 duration-300",children:[f.jsx("div",{className:"w-12 h-12 bg-error-100 rounded-full flex items-center justify-center mb-6",children:f.jsx(YN,{size:24,className:"text-error-600"})}),f.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Unindexed Pages"}),f.jsx("p",{className:"text-gray-600",children:"Whenever your site gets updated or new pages are added, Google can miss them, leaving valuable content invisible to search engines."}),f.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm text-gray-500",children:"Average impact"}),f.jsx("span",{className:"text-sm font-semibold text-error-600",children:"15-30% of pages"})]})})]}),f.jsxs("div",{className:"bg-white rounded-xl p-8 shadow-lg hover:shadow-xl transition-shadow transform hover:-translate-y-1 duration-300",children:[f.jsx("div",{className:"w-12 h-12 bg-warning-100 rounded-full flex items-center justify-center mb-6",children:f.jsx(g2,{size:24,className:"text-warning-600"})}),f.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Lost Traffic"}),f.jsx("p",{className:"text-gray-600",children:"When high-ranking pages fall out of the index, you instantly lose the organic traffic they were generating for your business."}),f.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm text-gray-500",children:"Average impact"}),f.jsx("span",{className:"text-sm font-semibold text-warning-600",children:"12-25% traffic drop"})]})})]}),f.jsxs("div",{className:"bg-white rounded-xl p-8 shadow-lg hover:shadow-xl transition-shadow transform hover:-translate-y-1 duration-300",children:[f.jsx("div",{className:"w-12 h-12 bg-error-100 rounded-full flex items-center justify-center mb-6",children:f.jsx(s2,{size:24,className:"text-error-600"})}),f.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Wasted SEO Budget"}),f.jsx("p",{className:"text-gray-600",children:"Investing in content and SEO only to have pages disappear from search results means you're not getting the full ROI from your marketing spend."}),f.jsx("div",{className:"mt-6 pt-6 border-t border-gray-100",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm text-gray-500",children:"Average impact"}),f.jsx("span",{className:"text-sm font-semibold text-error-600",children:"$10K+ per month"})]})})]})]})]})})},A2=()=>{const t=V.useRef(null);V.useEffect(()=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(r.target.classList.add("animate-fade-in"),n.unobserve(r.target))},{threshold:.1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[]);const e=[{icon:f.jsx(Yr,{className:"text-primary-600",size:24}),title:"Deep Indexing Scan",description:"Crawls your entire website and cross-references with Google's index to identify every unindexed page."},{icon:f.jsx(ZN,{className:"text-primary-600",size:24}),title:"Real-time Alerts",description:"Get instant notifications when pages drop out of Google's index so you can take immediate action."},{icon:f.jsx(JN,{className:"text-primary-600",size:24}),title:"Performance Analytics",description:"Track your indexing rate over time and measure the impact on your organic traffic and conversions."},{icon:f.jsx(v2,{className:"text-primary-600",size:24}),title:"Automatic Re-submission",description:"One-click submission of unindexed URLs directly to Google for faster re-indexing."},{icon:f.jsx(p2,{className:"text-primary-600",size:24}),title:"Weekly Monitoring",description:"Continuous monitoring ensures no page stays unindexed for long, maintaining consistent visibility."},{icon:f.jsx(XN,{className:"text-primary-600",size:24}),title:"SEO Recommendations",description:"Get actionable advice on how to improve indexability for problematic pages."}];return f.jsx("section",{id:"features",ref:t,className:"py-16 md:py-24 duration-1000",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"How Index Checker AI Recovers Your Lost Traffic"}),f.jsx("p",{className:"text-xl text-gray-600 leading-relaxed",children:"Our AI-powered tools find and fix indexing issues before they impact your traffic, ensuring your SEO investment delivers maximum returns."})]}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map((n,r)=>f.jsxs("div",{className:"bg-white rounded-xl p-8 shadow-md hover:shadow-lg transition-shadow border border-gray-100",children:[f.jsx("div",{className:"w-12 h-12 bg-primary-50 rounded-lg flex items-center justify-center mb-6",children:n.icon}),f.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-3",children:n.title}),f.jsx("p",{className:"text-gray-600",children:n.description})]},r))})]})})},k2=()=>{const t=V.useRef(null);V.useEffect(()=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(r.target.classList.add("animate-fade-in"),n.unobserve(r.target))},{threshold:.1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[]);const e=[{number:"01",title:"Connect Your Website",description:"Simply add your website URL and connect your Google Search Console to get started. No code or complex setup required."},{number:"02",title:"Initial Scan",description:"Our AI crawls your entire website and cross-references with Google's index to identify unindexed pages and content gaps."},{number:"03",title:"Monitor & Alert",description:"Index Checker AI continuously monitors your website for changes and alerts you when pages drop out of the index."},{number:"04",title:"Fix & Resubmit",description:"With one click, submit unindexed URLs directly to Google for faster re-indexing, plus get recommendations to improve indexability."}];return f.jsx("section",{id:"how-it-works",ref:t,className:"py-16 md:py-24 bg-gray-50 duration-1000",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"Simple 4-Step Process"}),f.jsx("p",{className:"text-xl text-gray-600 leading-relaxed",children:"Fixing your indexing issues has never been easier. Our streamlined process gets you from setup to results in minutes."})]}),f.jsx("div",{className:"relative",children:f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 relative z-10",children:e.map((n,r)=>f.jsxs("div",{className:"flex flex-col items-center",children:[f.jsx("div",{className:"w-16 h-16 rounded-full bg-primary-600 text-white flex items-center justify-center text-xl font-bold mb-6 shadow-lg",children:n.number}),f.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-3 text-center",children:n.title}),f.jsx("p",{className:"text-gray-600 text-center",children:n.description})]},r))})}),f.jsxs("div",{className:"mt-16 md:mt-24 bg-white rounded-xl shadow-xl overflow-hidden",children:[f.jsx("div",{className:"p-1 bg-gradient-to-r from-primary-500 via-accent-400 to-secondary-500"}),f.jsx("div",{className:"p-8",children:f.jsxs("div",{className:"flex flex-col md:flex-row items-center",children:[f.jsxs("div",{className:"md:w-1/2 mb-8 md:mb-0 md:pr-8",children:[f.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:"See It In Action"}),f.jsx("p",{className:"text-gray-600 mb-6",children:"Watch how Index Checker AI finds and fixes unindexed pages in real-time, helping you recover lost traffic and maximize your SEO investment."}),f.jsxs("button",{className:"flex items-center justify-center bg-primary-600 hover:bg-primary-700 text-white font-medium px-6 py-3 rounded-lg transition-colors",children:[f.jsx("svg",{className:"w-5 h-5 mr-2",fill:"
3309currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z",clipRule:"evenodd"})}),"Watch Demo Video"]})]}),f.jsx("div",{className:"md:w-1/2",children:f.jsxs("div",{className:"relative bg-gray-900 rounded-lg overflow-hidden aspect-video",children:[f.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:f.jsx("button",{className:"w-16 h-16 rounded-full bg-white bg-opacity-20 flex items-center justify-center",children:f.jsx("svg",{className:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{d:"M8 5v14l11-7z"})})})}),f.jsx("img",{src:"https://images.pexels.com/photos/265087/pexels-photo-265087.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",alt:"Demo video thumbnail",className:"w-full h-full object-cover opacity-50"})]})})]})})]})]})})},C2=()=>{const t=V.useRef(null),[e,n]=V.useState(0);V.useEffect(()=>{const o=new IntersectionObserver(([l])=>{l.isIntersecting&&(l.target.classList.add("animate-fade-in"),o.unobserve(l.target))},{threshold:.1});return t.current&&o.observe(t.current),()=>{t.current&&o.unobserve(t.current)}},[]);const r=[{quote:"Index Checker AI found 47 unindexed pages on our e-commerce site, including product pages that were driving sales. After resubmitting them, we saw a 23% increase in organic traffic within 3 weeks!",author:"Sarah Johnson",position:"SEO Manager",company:"TechGear Inc.",avatar:"https://images.pexels.com/photos/762020/pexels-photo-762020.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",stars:5},{quote:"As a content marketer, it was frustrating to see our blog posts disappear from Google's index. Index Checker AI alerts us immediately when this happens, saving us thousands in potential lost conversions.",author:"Michael Chen",position:"Content Director",company:"Growth Metrics",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",stars:5},{quote:"Our agency manages SEO for over 30 client websites. Index Checker AI has become an essential tool in our workflow, helping us maintain high indexing rates and impress clients with proactive solutions.",author:"Emily Rodriguez",position:"Agency Owner",company:"Digital Boost Agency",avatar:"https://images.pexels.com/photos/3757942/pexels-photo-3757942.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",stars:4}],i=()=>{n(o=>o===r.length-1?0:o+1)},s=()=>{n(o=>o===0?r.length-1:o-1)};return f.jsx("section",{ref:t,className:"py-16 md:py-24 duration-1000",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"Trusted by SEO Professionals"}),f.jsx("p",{className:"text-xl text-gray-600 leading-relaxed",children:"See how Index Checker AI is helping businesses recover lost traffic and maximize their SEO investment."})]}),f.jsxs("div",{className:"max-w-4xl mx-auto relative",children:[f.jsxs("div",{className:"bg-white rounded-xl shadow-xl p-8 md:p-12",children:[f.jsxs("div",{className:"flex flex-col md:flex-row",children:[f.jsx("div",{className:"md:w-1/3 flex justify-center mb-6 md:mb-0",children:f.jsxs("div",{className:"relative",children:[f.jsx("div",{className:"w-24 h-24 md:w-32 md:h-32 rounded-full overflow-hidden border-4 border-primary-100",children:f.jsx("img",{src:r[e].avatar,alt:r[e].author,className:"w-full h-full object-cover"})}),f.jsx("div",{className:"absolute -bottom-3 -right-3 bg-primary-600 text-white p-2 rounded-full",children:f.jsx(ev,{size:16,fill:"white"})})]})}),f.jsxs("div",{className:"md:w-2/3 md:pl-8",children:[f.jsx("div",{className:"mb-6",children:[...Array(5)].map((o,l)=>f.jsx(ev,{size:20,className:l<r[e].stars?"text-yellow-500 inline-block":"text-gray-300 inline-block",fill:l<r[e].stars?"#F59E0B":"#D1D5DB"},l))}),f.jsxs("blockquote",{className:"text-lg md:text-xl text-gray-700 italic mb-6",children:['"',r[e].quote,'"']}),f.jsxs("div",{children:[f.jsx("p",{className:"font-bold text-gray-900",children:r[e].author}),f.jsxs("p",{className:"text-gray-600",children:[r[e].position,", ",r[e].company]})]})]})]}),f.jsx("div",{className:"flex justify-center mt-8 space-x-2",children:r.map((o,l)=>f.jsx("button",{onClick:()=>n(l),className:`w-3 h-3 rounded-full transition-colors ${l===e?"bg-primary-600":"bg-gray-300"}`,"aria-label":`Go to testimonial ${l+1}`},l))})]}),f.jsx("div",{className:"absolute top-1/2 left-0 transform -translate-y-1/2 -translate-x-1/2",children:f.jsx("button",{onClick:s,className:"w-10 h-10 rounded-full bg-white shadow-lg flex items-center justify-center text-gray-700 hover:text-primary-600 transition-colors","aria-label":"Previous testimonial",children:f.jsx(t2,{size:20})})}),f.jsx("div",{className:"absolute top-1/2 right-0 transform -translate-y-1/2 translate-x-1/2",children:f.jsx("button",{onClick:i,className:"w-10 h-10 rounded-full bg-white shadow-lg flex items-center justify-center text-gray-700 hover:text-primary-600 transition-colors","aria-label":"Next testimonial",children:f.jsx(n2,{size:20})})})]}),f.jsxs("div",{className:"mt-16 grid grid-cols-2 md:grid-cols-4 gap-8 max-w-3xl mx-auto",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-3xl md:text-4xl font-bold text-primary-600",children:"98%"}),f.jsx("p",{className:"text-gray-600",children:"Accuracy Rate"})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-3xl md:text-4xl font-bold text-primary-600",children:"3.2M+"}),f.jsx("p",{className:"text-gray-600",children:"Pages Monitored"})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-3xl md:text-4xl font-bold text-primary-600",children:"23%"}),f.jsx("p",{className:"text-gray-600",children:"Avg. Traffic Increase"})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-3xl md:text-4xl font-bold text-primary-600",children:"500+"}),f.jsx("p",{className:"text-gray-600",children:"Active Customers"})]})]})]})})},R2=()=>{const t=V.useRef(null),[e,n]=V.useState(!1);return V.useEffect(()=>{const r=new IntersectionObserver(([i])=>{i.isIntersecting&&(i.target.classList.add("animate-fade-in"),r.unobserve(i.target))},{threshold:.1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[]),f.jsx("section",{className:"py-20 lg:py-32",children:f.jsxs("div",{className:"container mx-auto px-4",children:[f.jsxs("div",{className:"text-center mb-16",children:[f.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Simple, Transparent Pricing"}),f.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Only pay for what you use with our credit-based system. No monthly fees or hidden costs."})]}),f.jsxs("div",{className:"max-w-4xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden",children:[f.jsxs("div",{className:"p-8 border-b border-slate-100",children:[f.jsx("h3",{className:"text-2xl font-bold text-slate-900 mb-2",children:"Credit-Based System"}),f.jsx("p",{className:"text-slate-600 mb-6",children:"Purchase credits and use them only when you need to check or index pages."}),f.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[f.jsxs("div",{className:"bg-slate-50 p-5 rounded-lg",children:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsx("h4",{className:"font-medium text-slate-800",children:"Index checking"}),f.jsx("span",{className:"bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium",children:"1 credit"})]}),f.jsx("p",{className:"text-slate-600 text-sm",children:"Per page checked for indexing status"})]}),f.jsxs("div",{className:"bg-slate-50 p-5 rounded-lg",children:[f.jsxs("div",{className:"flex justify-between items-center mb-4",children:[f.jsx("h4",{className:"font-medium text-slate-800",children:"Reindexing request"}),f.jsx("span",{className:"bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium",children:"5 credits"})]}),f.jsx("p",{className:"text-slate-600 text-sm",children:"Per page submitted for indexing"})]})]})]}),f.jsxs("div",{className:"p-8",children:[f.jsx("h4",{className:"font-semibold text-slate-900 mb-4",children:"Credit Packages"}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex justify-between items-center p-4 border border-slate-200 rounded-lg",children:[f.jsxs("div",{children:[f.jsx("h5",{className:"font-medium text-slate-800",children:"Starter"}),f.jsx("p",{className:"text-slate-500 text-sm",children:"1,000 credits"})]}),f.jsxs("div",{className:"text-right",children:[f.jsx("p",{className:"font-medium text-slate-900",children:"$10.00"}),f.jsx("p",{className:"text-xs text-slate-500",children:"$0.01 per credit"})]})]}),f.jsxs("div",{className:"flex justify-between items-center p-4 border border-slate-200 rounded-lg",children:[f.jsxs("div",{children:[f.jsx("h5",{className:"font-medium text-slate-800",children:"Pro"}),f.jsx("p",{className:"text-slate-500 text-sm",children:"5,000 credits"})]}),f.jsxs("div",{className:"text-right",children:[f.jsx("p",{className:"font-medium text-slate-900",children:"$37.50"}),f.jsx("p",{className:"text-xs text-slate-500",children:"$0.0075 per credit"})]})]}),f.jsxs("div",{className:"flex justify-between items-center p-4 border border-slate-200 rounded-lg",children:[f.jsxs("div",{children:[f.jsx("h5",{className:"font-medium text-slate-800",children:"Enterprise"}),f.jsx("p",{className:"text-slate-500 text-sm",children:"20,000 credits"})]}),f.jsxs("div",{className:"text-right",children:[f.jsx("p",{className:"font-medium text-slate-900",children:"$100.00"}),f.jsx("p",{className:"text-xs text-slate-500",children:"$0.005 per credit"})]})]})]}),f.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg flex items-start",children:[f.jsx("div",{className:"shrink-0 mt-1",children:f.jsx(e2,{className:"w-5 h-5 text-blue-800"})}),f.jsxs("p",{className:"ml-3 text-sm text-blue-800",children:[f.jsx("strong",{children:"Free 100 credits"}
3309)," for all new accounts so you can try the service risk-free."]})]})]})]})]})})},P2=()=>{const t=V.useRef(null),[e,n]=V.useState(0);V.useEffect(()=>{const s=new IntersectionObserver(([o])=>{o.isIntersecting&&(o.target.classList.add("animate-fade-in"),s.unobserve(o.target))},{threshold:.1});return t.current&&s.observe(t.current),()=>{t.current&&s.unobserve(t.current)}},[]);const r=[{question:"How does Index Checker AI work?",answer:"Index Checker AI connects to your website and Google Search Console to scan your entire site and identify pages that are not appearing in Google's index. It continuously monitors your site for changes and alerts you when pages drop out of the index, allowing you to take immediate action to resubmit them."},{question:"Will this work for any type of website?",answer:"Yes, Index Checker AI works for any website type, including e-commerce, blogs, SaaS, and enterprise sites. It's especially valuable for websites with frequently changing content or large numbers of pages that need to stay indexed."},{question:"Do I need technical knowledge to use Index Checker AI?",answer:"No technical knowledge is required. Our tool is designed with a user-friendly interface that makes it easy for anyone to set up and use. Simply connect your website and Google Search Console, and the system will handle the technical aspects for you."},{question:"How often does Index Checker AI scan my website?",answer:"The Monthly plan includes weekly scans of your entire website, while the Annual plan upgrades you to daily scans for more frequent monitoring. For very large websites, custom scanning schedules can be arranged through our Enterprise plan."},{question:"Can I track multiple websites with one account?",answer:"Yes, our Monthly and Annual plans allow you to add multiple websites to your account. Each additional website will be charged at a discounted rate. For organizations managing many websites, our Enterprise plan offers the most cost-effective solution."},{question:"Is there a free trial available?",answer:"Yes, we offer a 14-day free trial with no credit card required. This gives you full access to all features so you can see exactly how Index Checker AI helps improve your website's visibility before committing to a subscription."}],i=s=>{n(e===s?null:s)};return f.jsx("section",{id:"faq",ref:t,className:"py-16 md:py-24 duration-1000",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"Frequently Asked Questions"}),f.jsx("p",{className:"text-xl text-gray-600 leading-relaxed",children:"Got questions about Index Checker AI? We've got answers."})]}),f.jsx("div",{className:"max-w-3xl mx-auto divide-y divide-gray-200",children:r.map((s,o)=>f.jsxs("div",{className:"py-6",children:[f.jsxs("button",{className:"flex justify-between items-center w-full text-left",onClick:()=>i(o),"aria-expanded":e===o,"aria-controls":`faq-answer-${o}`,children:[f.jsx("h3",{className:"text-lg font-medium text-gray-900",children:s.question}),f.jsx("span",{className:"ml-6 flex-shrink-0",children:e===o?f.jsx(r2,{className:"h-6 w-6 text-primary-500"}):f.jsx(FE,{className:"h-6 w-6 text-gray-500"})})]}),f.jsx("div",{id:`faq-answer-${o}`,className:`mt-3 transition-all duration-300 ease-in-out overflow-hidden ${e===o?"max-h-96 opacity-100":"max-h-0 opacity-0"}`,"aria-hidden":e!==o,children:f.jsx("p",{className:"text-gray-600",children:s.answer})})]},o))}),f.jsxs("div",{className:"mt-12 text-center",children:[f.jsx("p",{className:"text-gray-600",children:"Still have questions? Contact our support team."}),f.jsx("a",{href:"mailto:[email protected]",className:"inline-block mt-4 text-primary-600 hover:text-primary-700 font-medium",children:"[email protected]"})]})]})})},N2=()=>{const t=V.useRef(null);return V.useEffect(()=>{const e=new IntersectionObserver(([n])=>{n.isIntersecting&&(n.target.classList.add("animate-fade-in"),e.unobserve(n.target))},{threshold:.1});return t.current&&e.observe(t.current),()=>{t.current&&e.unobserve(t.current)}},[]),f.jsx("section",{ref:t,className:"py-16 md:py-24 bg-primary-600 duration-1000",children:f.jsx("div",{className:"container mx-auto px-4 md:px-6",children:f.jsxs("div",{className:"max-w-4xl mx-auto bg-white rounded-xl shadow-xl overflow-hidden",children:[f.jsx("div",{className:"p-1 bg-gradient-to-r from-primary-500 via-accent-400 to-secondary-500"}),f.jsxs("div",{className:"p-8 md:p-12",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-6",children:"Start Recovering Your Lost Traffic Today"}),f.jsx("p",{className:"text-xl text-gray-600 mb-8 max-w-2xl mx-auto",children:"Don't let unindexed pages cost you traffic and revenue. Join 500+ businesses using Index Checker AI to maximize their SEO investment."}),f.jsx("div",{className:"flex flex-col sm:flex-row justify-center space-y-4 sm:sp
3309ace-y-0 sm:space-x-4",children:f.jsx(Fr,{variant:"primary",size:"lg",children:"Start Your Free Trial"})}),f.jsx("p",{className:"mt-6 text-sm text-gray-500",children:"No credit card required. 14-day free trial. Cancel anytime."})]}),f.jsx("div",{className:"mt-12 pt-12 border-t border-gray-100",children:f.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 text-center",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"14-Day"}),f.jsx("p",{className:"text-gray-600",children:"Free Trial"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"5-Minute"}),f.jsx("p",{className:"text-gray-600",children:"Setup"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"24/7"}),f.jsx("p",{className:"text-gray-600",children:"Support"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xl font-bold text-primary-600",children:"100%"}),f.jsx("p",{className:"text-gray-600",children:"Satisfaction"})]})]})})]})]})})})},b2=()=>{const t=new Date().getFullYear();return f.jsx("footer",{className:"bg-gray-900 text-white pt-16 pb-8",children:f.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-3 gap-8 mb-12",children:[f.jsxs("div",{children:[f.jsx(qE,{variant:"light"}),f.jsx("p",{className:"mt-4 text-gray-400 leading-relaxed",children:"Index Checker AI helps you discover and fix unindexed pages that are missed by search engines, ensuring maximum visibility for your website."}),f.jsxs("div",{className:"flex mt-6 space-x-4",children:[f.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors","aria-label":"Facebook",children:f.jsx(o2,{size:20})}),f.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors","aria-label":"Twitter",children:f.jsx(y2,{size:20})}),f.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors","aria-label":"Instagram",children:f.jsx(u2,{size:20})}),f.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors","aria-label":"LinkedIn",children:f.jsx(h2,{size:20})})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Legal"}),f.jsx("ul",{className:"space-y-3",children:f.jsx("li",{children:f.jsx("a",{href:"/privacy-policy",className:"text-gray-400 hover:text-white transition-colors",children:"Privacy Policy"})})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Contact Us"}),f.jsx("ul",{className:"space-y-3",children:f.jsxs("li",{className:"flex items-start",children:[f.jsx(f2,{size:20,className:"mr-3 text-gray-400 flex-shrink-0 mt-1"}),f.jsx("a",{href:"mailto:[email protected]",className:"text-gray-400 hover:text-white transition-colors",children:"[email protected]"})]})})]})]}),f.jsx("hr",{className:"border-gray-800 mb-8"}),f.jsx("div",{className:"flex flex-col md:flex-row justify-between items-center",children:f.jsxs("p",{className:"text-gray-500 text-sm mb-4 md:mb-0",children:["© ",t," Index Checker AI. All rights reserved."]})})]})})};function D2(){return f.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-gray-50 to-white",children:[f.jsx(T2,{}),f.jsxs("main",{children:[f.jsx(I2,{}),f.jsx(x2,{}),f.jsx(S2,{}),f.jsx(A2,{}),f.jsx(k2,{}),f.jsx(C2,{}),f.jsx(R2,{}),f.jsx(P2,{}),f.jsx(N2,{})]}),f.jsx(b2,{})]})}const O2=V.lazy(()=>Dn(()=>import("./NotFoundPage-yWt-Ld01.js"),[])),V2=V.lazy(()=>Dn(()=>import("./LoginPage-k67j1F8b.js"),[])),L2=V.lazy(()=>Dn(()=>import("./OnboardingPage-n4j0gky0.js"),__vite__mapDeps([0,1,2]))),j2=V.lazy(()=>Dn(()=>import("./DashboardPage-CoczwngL.js"),__vite__mapDeps([3,4,1,5,6]))),M2=V.lazy(()=>Dn(()=>import("./SitesPage-DZKc1Y2P.js"),__vite__mapDeps([7,6,4]))),F2=V.lazy(()=>Dn(()=>import("./HistoryPage-Dpmm0TXE.js"),__vite__mapDeps([8,1,4,9]))),U2=V.lazy(()=>Dn(()=>import("./SettingsPage-CZm3vrI6.js"),__vite__mapDeps([10,2]))),z2=V.lazy(()=>Dn(()=>import("./BillingPage-DCrzzZjb.js"),__vite__mapDeps([11,5,4,1,9]))),B2=V.lazy(()=>Dn(()=>import("./PrivacyPolicy-COvc-pJ4.js"),[])),ai=({children:t})=>{const{user:e,loading:n}=ME(),r=Zr();return n?f.jsx(mp,{}):e?!e.onboardingCompleted&&r.pathname!=="/onboarding"?f.jsx(Ks,{to:"/onboarding",replace:!0}):e.onboardingCompleted&&r.pathname==="/onboarding"?f.jsx(Ks,{to:"/dashboard",replace:!0}):f.jsx(f.Fragment,{children:t}):f.jsx(Ks,{to:"/login",replace:!0})},$2=({children:t})=>{const{user:e,loading:n}=ME();return n?f.jsx(mp,{}):e?e.onboardingCompleted?f.jsx(Ks,{to:"/dashboard",replace:!0}):f.jsx(Ks,{to:"/onboarding",replace:!0}):f.jsx(f.Fragment,{children:t})};function q2(){return f.jsx(V.Suspense,{fallback:f.jsx(mp,{}),children:f.jsxs(B1,{children:[f.jsx(Vt,{path:"/",element:f.jsx(D2,{})}),f.jsx(Vt,{path:"/login",element:f.jsx($2,{children:f.jsx(tv,{children:f.jsx(V2,{})})})}),f.jsx(Vt,{path:"/onboarding",element:f.jsx(ai,{children:f.jsx(tv,{children:f.jsx(L2,{})})})}),f.jsx(Vt,{path:"/dashboard",element:f.jsx(ai,{children:f.jsx(Rs,{children:f.jsx(j2,{})})})}),f.jsx(Vt,{path:"/sites",element:f.jsx(ai,{children:f.jsx(Rs,{children:f.jsx(M2,{})})})}),f.jsx(Vt,{path:"/history",element:f.jsx(ai,{children:f.jsx(Rs,{children:f.jsx(F2,{})})})}),f.jsx(Vt,{path:"/settings",element:f.jsx(ai,{children:f.jsx(Rs,{children:f.jsx(U2,{})})})}),f.jsx(Vt,{path:"/billing",element:f.jsx(ai,{children:f.jsx(Rs,{children:f.jsx(z2,{})})})}),f.jsx(Vt,{path:"/privacy-policy",element:f.jsx(B2,{})}),f.jsx(Vt,{path:"*",element:f.jsx(O2,{})})]})})}p0(document.getElementById("root")).render(f.jsx(V.StrictMode,{children:f.jsx(Q1,{children:f.jsx(_2,{children:f.jsx(E2,{children:f.jsx(q2,{})})})})}));export{YN as A,e2 as B,n2 as C,nb as D,b2 as F,a2 as G,T2 as H,Ja as L,p2 as R,Yr as S,oe as T,hf as a,mn as b,ue as c,Ft as d,od as e,w2 as f,i2 as g,W2 as h,IT as i,f as j,FT as k,Y2 as l,Z2 as m,J2 as n,X2 as o,WN as p,Q2 as q,V as r,Ar as s,tb as t,BE as u,ld as v,AN as w,eb as x,xN as y,mp as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.