PageSourceSearch

https://goalgenius.onrender.com/assets/index-B0hE-8kd.js

js goalgenius.onrender.com collected 2026-10-03 11:40:34 UTC 933,516 bytes, 3,259 lines download raw bytes

vendor: 4,212 bytes, lines 1-9
1var jC=Object.defineProperty;var FC=(t,e,n)=>e in t?jC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var js=(t,e,n)=>FC(t,typeof e!="symbol"?e+"":e,n);(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 a of i)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Ju(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xm={exports:{}},du={},Pm={exports:{}},Je={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var K_;function UC(){if(K_)return Je;K_=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.iterator;function T(j){return j===null||typeof j!="object"?null:(j=E&&j[E]||j["@@iterator"],typeof j=="function"?j:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I=Object.assign,L={};function V(j,N,X){this.props=j,this.context=N,this.refs=L,this.updater=X||b}V.prototype.isReactComponent={},V.prototype.setState=function(j,N){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,N,"setState")},V.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function U(){}U.prototype=V.prototype;function M(j,N,X){this.props=j,this.context=N,this.refs=L,this.updater=X||b}var Q=M.prototype=new U;Q.constructor=M,I(Q,V.prototype),Q.isPureReactComponent=!0;var te=Array.isArray,he=Object.prototype.hasOwnProperty,ae={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function R(j,N,X){var ne,ye={},pe=null,Ie=null;if(N!=null)for(ne in N.ref!==void 0&&(Ie=N.ref),N.key!==void 0&&(pe=""+N.key),N)he.call(N,ne)&&!D.hasOwnProperty(ne)&&(ye[ne]=N[ne]);var be=arguments.length-2;if(be===1)ye.children=X;else if(1<be){for(var Ee=Array(be),Ge=0;Ge<be;Ge++)Ee[Ge]=arguments[Ge+2];ye.children=Ee}if(j&&j.defaultProps)for(ne in be=j.defaultProps,be)ye[ne]===void 0&&(ye[ne]=be[ne]);return{$$typeof:t,type:j,key:pe,ref:Ie,props:ye,_owner:ae.current}}function x(j,N){return{$$typeof:t,type:j.type,key:N,ref:j.ref,props:j.props,_owner:j._owner}}function k(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function F(j){var N={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(X){return N[X]})}var B=/\/+/g;function P(j,N){return typeof j=="object"&&j!==null&&j.key!=null?F(""+j.key):N.toString(36)}function le(j,N,X,ne,ye){var pe=typeof j;(pe==="undefined"||pe==="boolean")&&(j=null);var Ie=!1;if(j===null)Ie=!0;else switch(pe){case"string":case"number":Ie=!0;break;case"object":switch(j.$$typeof){case t:case e:Ie=!0}}if(Ie)return Ie=j,ye=ye(Ie),j=ne===""?"."+P(Ie,0):ne,te(ye)?(X="",j!=null&&(X=j.replace(B,"$&/")+"/"),le(ye,N,X,"",function(Ge){return Ge})):ye!=null&&(k(ye)&&(ye=x(ye,X+(!ye.key||Ie&&Ie.key===ye.key?"":(""+ye.key).replace(B,"$&/")+"/")+j)),N.push(ye)),1;if(Ie=0,ne=ne===""?".":ne+":",te(j))for(var be=0;be<j.length;be++){pe=j[be];var Ee=ne+P(pe,be);Ie+=le(pe,N,X,Ee,ye)}else if(Ee=T(j),typeof Ee=="function")for(j=Ee.call(j),be=0;!(pe=j.next()).done;
vendor: 4,228 bytes, lines 9-17
9)pe=pe.value,Ee=ne+P(pe,be++),Ie+=le(pe,N,X,Ee,ye);else if(pe==="object")throw N=String(j),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.");return Ie}function qe(j,N,X){if(j==null)return j;var ne=[],ye=0;return le(j,ne,"","",function(pe){return N.call(X,pe,ye++)}),ne}function Xe(j){if(j._status===-1){var N=j._result;N=N(),N.then(function(X){(j._status===0||j._status===-1)&&(j._status=1,j._result=X)},function(X){(j._status===0||j._status===-1)&&(j._status=2,j._result=X)}),j._status===-1&&(j._status=0,j._result=N)}if(j._status===1)return j._result.default;throw j._result}var de={current:null},re={transition:null},ge={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:re,ReactCurrentOwner:ae};function ee(){throw Error("act(...) is not supported in production builds of React.")}return Je.Children={map:qe,forEach:function(j,N,X){qe(j,function(){N.apply(this,arguments)},X)},count:function(j){var N=0;return qe(j,function(){N++}),N},toArray:function(j){return qe(j,function(N){return N})||[]},only:function(j){if(!k(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Je.Component=V,Je.Fragment=n,Je.Profiler=i,Je.PureComponent=M,Je.StrictMode=r,Je.Suspense=f,Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ge,Je.act=ee,Je.cloneElement=function(j,N,X){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var ne=I({},j.props),ye=j.key,pe=j.ref,Ie=j._owner;if(N!=null){if(N.ref!==void 0&&(pe=N.ref,Ie=ae.current),N.key!==void 0&&(ye=""+N.key),j.type&&j.type.defaultProps)var be=j.type.defaultProps;for(Ee in N)he.call(N,Ee)&&!D.hasOwnProperty(Ee)&&(ne[Ee]=N[Ee]===void 0&&be!==void 0?be[Ee]:N[Ee])}var Ee=arguments.length-2;if(Ee===1)ne.children=X;else if(1<Ee){be=Array(Ee);for(var Ge=0;Ge<Ee;Ge++)be[Ge]=arguments[Ge+2];ne.children=be}return{$$typeof:t,type:j.type,key:ye,ref:pe,props:ne,_owner:Ie}},Je.createContext=function(j){return j={$$typeof:u,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:a,_context:j},j.Consumer=j},Je.createElement=R,Je.createFactory=function(j){var N=R.bind(null,j);return N.type=j,N},Je.createRef=function(){return{current:null}},Je.forwardRef=function(j){return{$$typeof:d,render:j}},Je.isValidElement=k,Je.lazy=function(j){return{$$typeof:w,_payload:{_status:-1,_result:j},_init:Xe}},Je.memo=function(j,N){return{$$typeof:p,type:j,compare:N===void 0?null:N}},Je.startTransition=function(j){var N=re.transition;re.transition={};try{j()}finally{re.transition=N}},Je.unstable_act=ee,Je.useCallback=function(j,N){return de.current.useCallback(j,N)},Je.useContext=function(j){return de.current.useContext(j)},Je.useDebugValue=function(){},Je.useDeferredValue=function(j){return de.current.useDeferredValue(j)},Je.useEffect=function(j,N){return de.current.useEffect(j,N)},Je.useId=function(){return de.current.useId()},Je.useImperativeHandle=function(j,N,X){return de.current.useImperativeHandle(j,N,X)},Je.useInsertionEffect=function(j,N){return de.current.useInsertionEffect(j,N)},Je.useLayoutEffect=function(j,N){return de.current.useLayoutEffect(j,N)},Je.useMemo=function(j,N){return de.current.useMemo(j,N)},Je.useReducer=function(j,N,X){return de.current.useReducer(j,N,X)},Je.useRef=function(j){return de.current.useRef(j)},Je.useState=function(j){return de.current.useState(j)},Je.useSyncExternalStore=function(j,N,X){return de.current.useSyncExternalStore(j,N,X)},Je.useTransition=function(){return de.current.useTransition()},Je.version="18.3.1",Je}var Q_;function ny(){return Q_||(Q_=1,Pm.exports=UC()),Pm.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Y_;function $C(){if(Y_)return du;Y_=1;var t=ny(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INT
vendor: 6,559 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(d,f,p){var w,E={},T=null,b=null;p!==void 0&&(T=""+p),f.key!==void 0&&(T=""+f.key),f.ref!==void 0&&(b=f.ref);for(w in f)r.call(f,w)&&!a.hasOwnProperty(w)&&(E[w]=f[w]);if(d&&d.defaultProps)for(w in f=d.defaultProps,f)E[w]===void 0&&(E[w]=f[w]);return{$$typeof:e,type:d,key:T,ref:b,props:E,_owner:i.current}}return du.Fragment=n,du.jsx=u,du.jsxs=u,du}var X_;function BC(){return X_||(X_=1,xm.exports=$C()),xm.exports}var m=BC(),A=ny();const Ke=Ju(A);var Hd={},Nm={exports:{}},Wn={},Lm={exports:{}},Dm={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var J_;function zC(){return J_||(J_=1,function(t){function e(re,ge){var ee=re.length;re.push(ge);e:for(;0<ee;){var j=ee-1>>>1,N=re[j];if(0<i(N,ge))re[j]=ge,re[ee]=N,ee=j;else break e}}function n(re){return re.length===0?null:re[0]}function r(re){if(re.length===0)return null;var ge=re[0],ee=re.pop();if(ee!==ge){re[0]=ee;e:for(var j=0,N=re.length,X=N>>>1;j<X;){var ne=2*(j+1)-1,ye=re[ne],pe=ne+1,Ie=re[pe];if(0>i(ye,ee))pe<N&&0>i(Ie,ye)?(re[j]=Ie,re[pe]=ee,j=pe):(re[j]=ye,re[ne]=ee,j=ne);else if(pe<N&&0>i(Ie,ee))re[j]=Ie,re[pe]=ee,j=pe;else break e}}return ge}function i(re,ge){var ee=re.sortIndex-ge.sortIndex;return ee!==0?ee:re.id-ge.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var f=[],p=[],w=1,E=null,T=3,b=!1,I=!1,L=!1,V=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Q(re){for(var ge=n(p);ge!==null;){if(ge.callback===null)r(p);else if(ge.startTime<=re)r(p),ge.sortIndex=ge.expirationTime,e(f,ge);else break;ge=n(p)}}function te(re){if(L=!1,Q(re),!I)if(n(f)!==null)I=!0,Xe(he);else{var ge=n(p);ge!==null&&de(te,ge.startTime-re)}}function he(re,ge){I=!1,L&&(L=!1,U(R),R=-1),b=!0;var ee=T;try{for(Q(ge),E=n(f);E!==null&&(!(E.expirationTime>ge)||re&&!F());){var j=E.callback;if(typeof j=="function"){E.callback=null,T=E.priorityLevel;var N=j(E.expirationTime<=ge);ge=t.unstable_now(),typeof N=="function"?E.callback=N:E===n(f)&&r(f),Q(ge)}else r(f);E=n(f)}if(E!==null)var X=!0;else{var ne=n(p);ne!==null&&de(te,ne.startTime-ge),X=!1}return X}finally{E=null,T=ee,b=!1}}var ae=!1,D=null,R=-1,x=5,k=-1;function F(){return!(t.unstable_now()-k<x)}function B(){if(D!==null){var re=t.unstable_now();k=re;var ge=!0;try{ge=D(!0,re)}finally{ge?P():(ae=!1,D=null)}}else ae=!1}var P;if(typeof M=="function")P=function(){M(B)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,qe=le.port2;le.port1.onmessage=B,P=function(){qe.postMessage(null)}}else P=function(){V(B,0)};function Xe(re){D=re,ae||(ae=!0,P())}function de(re,ge){R=V(function(){re(t.unstable_now())},ge)}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(re){re.callback=null},t.unstable_continueExecution=function(){I||b||(I=!0,Xe(he))},t.unstable_forceFrameRate=function(re){0>re||125<re?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<re?Math.floor(1e3/re):5},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return n(f)},t.unstable_next=function(re){switch(T){case 1:case 2:case 3:var ge=3;break;default:ge=T}var ee=T;T=ge;try{return re()}finally{T=ee}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(re,ge){switch(re){case 1:case 2:case 3:case 4:case 5:break;default:re=3}var ee=T;T=re;try{return ge()}finally{T=ee}},t.unstable_scheduleCallback=function(re,ge,ee){var j=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?j+ee:j):ee=j,re){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=ee+N,re={id:w++,callback:ge,priorityLevel:re,startTime:ee,expirationTime:N,sortIndex:-1},ee>j?(re.sortIndex=ee,e(p,re),n(f)===null&&re===n(p)&&(L?(U(R),R=-1):L=!0,de(te,ee-j))):(re.sortIndex=N,e(f,re),I||b||(I=!0,Xe(he))),re},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(re){var ge=T;return function(){var ee=T;T=ge;try{return re.apply(this,arguments)}finally{T=ee}}}}(Dm)),Dm}var Z_;function HC(){return Z_||(Z_=1,Lm.exports=zC()),Lm.exports}/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var e1;function WC(){if(e1)return Wn;e1=1;var t=ny(),e=HC();function n(s){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+s,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+s+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(s,o){u(s,o),u(s+"Capture",o)}function u(s,o){for(i[s]=o,s=0;s<o.length;s++)r.add(o[s])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,w={},E={};function T(s){return f.call(E,s)?!0:f.call(w,s)?!1:p.test(s)?E[s]=!0:(w[s]=!0,!1)}function b(s,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function I(s,o,l,h){if(o===null||typeof o>"u"||b(s,o,l,h))return!0;
vendor: 10,788 bytes, lines 33-37
33if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function L(s,o,l,h,g,v,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=s,this.type=o,this.sanitizeURL=v,this.removeEmptyString=S}var V={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){V[s]=new L(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var o=s[0];V[o]=new L(o,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){V[s]=new L(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){V[s]=new L(s,2,!1,s,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(s){V[s]=new L(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){V[s]=new L(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){V[s]=new L(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){V[s]=new L(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){V[s]=new L(s,5,!1,s.toLowerCase(),null,!1,!1)});var U=/[\-:]([a-z])/g;function M(s){return s[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-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(s){var o=s.replace(U,M);V[o]=new L(o,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var o=s.replace(U,M);V[o]=new L(o,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var o=s.replace(U,M);V[o]=new L(o,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){V[s]=new L(s,1,!1,s.toLowerCase(),null,!1,!1)}),V.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){V[s]=new L(s,1,!1,s.toLowerCase(),null,!0,!0)});function Q(s,o,l,h){var g=V.hasOwnProperty(o)?V[o]:null;(g!==null?g.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(I(o,l,g,h)&&(l=null),h||g===null?T(o)&&(l===null?s.removeAttribute(o):s.setAttribute(o,""+l)):g.mustUseProperty?s[g.propertyName]=l===null?g.type===3?!1:"":l:(o=g.attributeName,h=g.attributeNamespace,l===null?s.removeAttribute(o):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,h?s.setAttributeNS(h,o,l):s.setAttribute(o,l))))}var te=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,he=Symbol.for("react.element"),ae=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),F=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),qe=Symbol.for("react.memo"),Xe=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),re=Symbol.iterator;function ge(s){return s===null||typeof s!="object"?null:(s=re&&s[re]||s["@@iterator"],typeof s=="function"?s:null)}var ee=Object.assign,j;function N(s){if(j===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);j=o&&o[1]||""}return`
34`+j+s}var X=!1;function ne(s,o){if(!s||X)return"";X=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Y){var h=Y}Reflect.construct(s,[],o)}else{try{o.call()}catch(Y){h=Y}s.call(o.prototype)}else{try{throw Error()}catch(Y){h=Y}s()}}catch(Y){if(Y&&h&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
35`),v=h.stack.split(`
36`),S=g.length-1,O=v.length-1;1<=S&&0<=O&&g[S]!==v[O];)O--;for(;1<=S&&0<=O;S--,O--)if(g[S]!==v[O]){if(S!==1||O!==1)do if(S--,O--,0>O||g[S]!==v[O]){var $=`
37`+g[S].replace(" at new "," at ");return s.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",s.displayName)),$}while(1<=S&&0<=O);break}}}finally{X=!1,Error.prepareStackTrace=l}return(s=s?s.displayName||s.name:"")?N(s):""}function ye(s){switch(s.tag){case 5:return N(s.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return s=ne(s.type,!1),s;case 11:return s=ne(s.type.render,!1),s;case 1:return s=ne(s.type,!0),s;default:return""}}function pe(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case D:return"Fragment";case ae:return"Portal";case x:return"Profiler";case R:return"StrictMode";case P:return"Suspense";case le:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case F:return(s.displayName||"Context")+".Consumer";case k:return(s._context.displayName||"Context")+".Provider";case B:var o=s.render;return s=s.displayName,s||(s=o.displayName||o.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case qe:return o=s.displayName||null,o!==null?o:pe(s.type)||"Memo";case Xe:o=s._payload,s=s._init;try{return pe(s(o))}catch{}}return null}function Ie(s){var o=s.type;switch(s.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=o.render,s=s.displayName||s.name||"",o.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(o);case 8:return o===R?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function be(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ee(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Ge(s){var o=Ee(s)?"checked":"value",l=Object.getOwnPropertyDescriptor(s.constructor.prototype,o),h=""+s[o];if(!s.hasOwnProperty(o)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,v=l.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return g.call(this)},set:function(S){h=""+S,v.call(this,S)}}),Object.defineProperty(s,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function ft(s){s._valueTracker||(s._valueTracker=Ge(s))}function tt(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return s&&(h=Ee(s)?s.checked?"true":"false":s.value),s=h,s!==l?(o.setValue(s),!0):!1}function at(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Yt(s,o){var l=o.checked;return ee({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??s._wrapperState.initialChecked})}function Mn(s,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=be(o.value!=null?o.value:l),s._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function rn(s,o){o=o.checked,o!=null&&Q(s,"checked",o,!1)}function Xt(s,o){rn(s,o);var l=be(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+l):s.value!==""+l&&(s.value=""+l);else if(h==="submit"||h==="reset"){s.removeAttribute("value");return}o.hasOwnProperty("value")?ni(s,o.type,l):o.hasOwnProperty("defaultValue")&&ni(s,o.type,be(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(s.defaultChecked=!!o.defaultChecked)}function ro(s,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+s._wrapperState.initialValue,l||o===s.value||(s.value=o),s.defaultValue=o}l=s.name,l!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,l!==""&&(s.name=l)}function ni(s,o,l){(o!=="number"||at(s.ownerDocument)!==s)&&(l==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+l&&(s.defaultValue=""+l))}var Jn=Array.isArray;function hr(s,o,l,h){if(s=s.options,o){o={};for(var g=0;g<l.length;g++)o["$"+l[g]]=!0;for(l=0;l<s.length;l++)g=o.hasOwnProperty("$"+s[l].value),s[l].selected!==g&&(s[l].selected=g),g&&h&&(s[l].defaultSelected=!0)}else{for(l=""+be(l),o=null,g=0;g<s.length;g++){if(s[g].value===l){s[g].selected=!0,h&&(s[g].defaultSelected=!0);return}o!==null||s[g].disabled||(o=s[g])}o!==null&&(o.selected=!0)}}function ri(s,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return ee({},o,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function si(s,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Jn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}s._wrapperState={initialValue:be(l)}}function Qr(s,o){var l=be(o.value),h=be(o.defaultValue);
vendor: 9,072 bytes, line 37
37l!=null&&(l=""+l,l!==s.value&&(s.value=l),o.defaultValue==null&&s.defaultValue!==l&&(s.defaultValue=l)),h!=null&&(s.defaultValue=""+h)}function Ts(s){var o=s.textContent;o===s._wrapperState.initialValue&&o!==""&&o!==null&&(s.value=o)}function Mt(s){switch(s){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 jt(s,o){return s==null||s==="http://www.w3.org/1999/xhtml"?Mt(o):s==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Ir,so=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,l,h,g){MSApp.execUnsafeLocalFunction(function(){return s(o,l,h,g)})}:s}(function(s,o){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=o;else{for(Ir=Ir||document.createElement("div"),Ir.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ir.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;o.firstChild;)s.appendChild(o.firstChild)}});function Yr(s,o){if(o){var l=s.firstChild;if(l&&l===s.lastChild&&l.nodeType===3){l.nodeValue=o;return}}s.textContent=o}var bs={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},Xr=["Webkit","ms","Moz","O"];Object.keys(bs).forEach(function(s){Xr.forEach(function(o){o=o+s.charAt(0).toUpperCase()+s.substring(1),bs[o]=bs[s]})});function io(s,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||bs.hasOwnProperty(s)&&bs[s]?(""+o).trim():o+"px"}function oo(s,o){s=s.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,g=io(l,o[l],h);l==="float"&&(l="cssFloat"),h?s.setProperty(l,g):s[l]=g}}var G=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 H(s,o){if(o){if(G[s]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function ce(s,o){if(s.indexOf("-")===-1)return typeof o.is=="string";switch(s){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 we=null;function _e(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Se=null,Pe=null,Le=null;function Oe(s){if(s=Yl(s)){if(typeof Se!="function")throw Error(n(280));var o=s.stateNode;o&&(o=id(o),Se(s.stateNode,s.type,o))}}function Ue(s){Pe?Le?Le.push(s):Le=[s]:Pe=s}function dt(){if(Pe){var s=Pe,o=Le;if(Le=Pe=null,Oe(s),o)for(s=0;s<o.length;s++)Oe(o[s])}}function Dt(s,o){return s(o)}function Ct(){}var Ot=!1;function hn(s,o,l){if(Ot)return s(o,l);Ot=!0;try{return Dt(s,o,l)}finally{Ot=!1,(Pe!==null||Le!==null)&&(Ct(),dt())}}function gt(s,o){var l=s.stateNode;if(l===null)return null;var h=id(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(s=s.type,h=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!h;break e;default:s=!1}if(s)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var Cr=!1;if(d)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){Cr=!0}}),window.addEventListener("test",fn,fn),window.removeEventListener("test",fn,fn)}catch{Cr=!1}function Zn(s,o,l,h,g,v,S,O,$){var Y=Array.prototype.slice.call(arguments,3);try{o.apply(l,Y)}catch(ue){this.onError(ue)}}var ao=!1,Xo=null,Rr=!1,xl=null,sp={onError:function(s){ao=!0,Xo=s}};function Jo(s,o,l,h,g,v,S,O,$){ao=!1,Xo=null,Zn.apply(sp,arguments)}function xc(s,o,l,h,g,v,S,O,$){if(Jo.apply(this,arguments),ao){if(ao){var Y=Xo;ao=!1,Xo=null}else throw Error(n(198));Rr||(Rr=!0,xl=Y)}}function Ar(s){var o=s,l=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do o=s,o.flags&4098&&(l=o.return),s=o.return;while(s)}return o.tag===3?l:null}function lo(s){if(s.tag===13){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function kr(s){if(Ar(s)!==s)throw Error(n(188))}function Pc(s){var o=s.alternate;if(!o){if(o=Ar(s),o===null)throw Error(n(188));return o!==s?null:s}for(var l=s,h=o;;){var g=l.return;if(g===null)break;var v=g.alternate;if(v===null){if(h=g.return,h!==null){l=h;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===l)return kr(g),s;if(v===h)return kr(g),o;v=v.sibling}throw Error(n(188))}if(l.return!==h.return)l=g,h=v;else{for(var S=!1,O=g.child;O;){if(O===l){S=!0,l=g,h=v;break}if(O===h){S=!0,h=g,l=v;break}O=O.sibling}if(!S){for(O=v.child;O;){if(O===l){S=!0,l=v,h=g;break}if(O===h){S=!0,h=v,l=g;break}O=O.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?s:o}function Pl(s){return s=Pc(s),s!==null?Zo(s):null}function Zo(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var o=Zo(s);if(o!==null)return o;s=s.sibling}return null}var ea=e.unstable_scheduleCallback,Nl=e.unstable_cancelCallback,Nc=e.unstable_shouldYield,ip=e.unstable_requestPaint,_t=e.unstable_now,Lc=e.unstable_getCurrentPriorityLevel,uo=e.unstable_ImmediatePriority,ii=e.unstable_UserBlockingPriority,fr=e.unstable_NormalPriority,Ll=e.unstable_LowPriority,Dc=e.unstable_IdlePriority,co=null,er=null;function Oc(s){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(co,s,void 0,(s.current.flags&128)===128)}catch{}}var xn=Math.clz32?Math.clz32:Mc,Dl=Math.log,Vc=Math.LN2;function Mc(s){return s>>>=0,s===0?32:31-(Dl(s)/Vc|0)|0}var ta=64,na=4194304;function oi(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function ho(s,o){var l=s.pendingLanes;if(l===0)return 0;var h=0,g=s.suspendedLanes,v=s.pingedLanes,S=l&268435455;if(S!==0){var O=S&~g;O!==0?h=oi(O):(v&=S,v!==0&&(h=oi(v)))}else S=l&~g,S!==0?h=oi(S):v!==0&&(h=oi(v));if(h===0)return 0;if(o!==0&&o!==h&&!(o&g)&&(g=h&-h,v=o&-o,g>=v||g===16&&(v&4194240)!==0))return o;if(h&4&&(h|=l&16),o=s.entangledLanes,o!==0)for(s=s.entanglements,o&=h;0<o;)l=31-xn(o),g=1<<l,h|=s[l],o&=~g;return h}function op(s,o){switch(s){case 1:case 2:case 4:return o+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 o+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 Is(s,o){for(var l=s.suspendedLanes,h=s.pingedLanes,g=s.expirationTimes,v=s.pendingLanes;0<v;){var S=31-xn(v),O=1<<S,$=g[S];$===-1?(!(O&l)||O&h)&&(g[S]=op(O,o)):$<=o&&(s.expiredLanes|=O),v&=~O}}function tr(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function fo(){var s=ta;return ta<<=1,!(ta&4194240)&&(ta=64),s}function ai(s){for(var o=[],l=0;31>l;l++)o.push(s);return o}function li(s,o,l){s.pendingLanes|=o,o!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,o=31-xn(o),s[o]=l}function yt(s,o){var l=s.pendingLanes&~o;s.pendingLanes=o,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=o,s.mutableReadLanes&=o,s.entangledLanes&=o,o=s.entanglements;var h=s.eventTimes;for(s=s.expirationTimes;0<l;){var g=31-xn(l),v=1<<g;o[g]=0,h[g]=-1,s[g]=-1,l&=~v}}function ui(s,o){var l=s.entangledLanes|=o;for(s=s.entanglements;l;){var h=31-xn(l),g=1<<h;g&o|s[h]&o&&(s[h]|=o),l&=~g}}var nt=0;function ci(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var jc,ra,Fc,Uc,$c,Ol=!1,Jr=[],pn=null,xr=null,Pr=null,di=new Map,pr=ne
vendor: 7,883 bytes, line 37
37w Map,Zr=[],ap="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 Bc(s,o){switch(s){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":xr=null;break;case"mouseover":case"mouseout":Pr=null;break;case"pointerover":case"pointerout":di.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":pr.delete(o.pointerId)}}function jn(s,o,l,h,g,v){return s===null||s.nativeEvent!==v?(s={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:v,targetContainers:[g]},o!==null&&(o=Yl(o),o!==null&&ra(o)),s):(s.eventSystemFlags|=h,o=s.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),s)}function lp(s,o,l,h,g){switch(o){case"focusin":return pn=jn(pn,s,o,l,h,g),!0;case"dragenter":return xr=jn(xr,s,o,l,h,g),!0;case"mouseover":return Pr=jn(Pr,s,o,l,h,g),!0;case"pointerover":var v=g.pointerId;return di.set(v,jn(di.get(v)||null,s,o,l,h,g)),!0;case"gotpointercapture":return v=g.pointerId,pr.set(v,jn(pr.get(v)||null,s,o,l,h,g)),!0}return!1}function zc(s){var o=vo(s.target);if(o!==null){var l=Ar(o);if(l!==null){if(o=l.tag,o===13){if(o=lo(l),o!==null){s.blockedOn=o,$c(s.priority,function(){Fc(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Cs(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var l=sa(s.domEventName,s.eventSystemFlags,o[0],s.nativeEvent);if(l===null){l=s.nativeEvent;var h=new l.constructor(l.type,l);we=h,l.target.dispatchEvent(h),we=null}else return o=Yl(l),o!==null&&ra(o),s.blockedOn=l,!1;o.shift()}return!0}function po(s,o,l){Cs(s)&&l.delete(o)}function Hc(){Ol=!1,pn!==null&&Cs(pn)&&(pn=null),xr!==null&&Cs(xr)&&(xr=null),Pr!==null&&Cs(Pr)&&(Pr=null),di.forEach(po),pr.forEach(po)}function Nr(s,o){s.blockedOn===o&&(s.blockedOn=null,Ol||(Ol=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Hc)))}function Lr(s){function o(g){return Nr(g,s)}if(0<Jr.length){Nr(Jr[0],s);for(var l=1;l<Jr.length;l++){var h=Jr[l];h.blockedOn===s&&(h.blockedOn=null)}}for(pn!==null&&Nr(pn,s),xr!==null&&Nr(xr,s),Pr!==null&&Nr(Pr,s),di.forEach(o),pr.forEach(o),l=0;l<Zr.length;l++)h=Zr[l],h.blockedOn===s&&(h.blockedOn=null);for(;0<Zr.length&&(l=Zr[0],l.blockedOn===null);)zc(l),l.blockedOn===null&&Zr.shift()}var Rs=te.ReactCurrentBatchConfig,hi=!0;function Rt(s,o,l,h){var g=nt,v=Rs.transition;Rs.transition=null;try{nt=1,Vl(s,o,l,h)}finally{nt=g,Rs.transition=v}}function up(s,o,l,h){var g=nt,v=Rs.transition;Rs.transition=null;try{nt=4,Vl(s,o,l,h)}finally{nt=g,Rs.transition=v}}function Vl(s,o,l,h){if(hi){var g=sa(s,o,l,h);if(g===null)_p(s,o,h,mo,l),Bc(s,h);else if(lp(g,s,o,l,h))h.stopPropagation();else if(Bc(s,h),o&4&&-1<ap.indexOf(s)){for(;g!==null;){var v=Yl(g);if(v!==null&&jc(v),v=sa(s,o,l,h),v===null&&_p(s,o,h,mo,l),v===g)break;g=v}g!==null&&h.stopPropagation()}else _p(s,o,h,null,l)}}var mo=null;function sa(s,o,l,h){if(mo=null,s=_e(h),s=vo(s),s!==null)if(o=Ar(s),o===null)s=null;else if(l=o.tag,l===13){if(s=lo(o),s!==null)return s;s=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null);return mo=s,null}function Ml(s){switch(s){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(Lc()){case uo:return 1;case ii:return 4;case fr:case Ll:return 16;case Dc:return 536870912;default:return 16}default:return 16}}var nr=null,ia=null,Fn=null;function jl(){if(Fn)return Fn;var s,o=ia,l=o.length,h,g="value"in nr?nr.value:nr.textContent,v=g.length;for(s=0;s<l&&o[s]===g[s];s++);var S=l-s;for(h=1;h<=S&&o[l-h]===g[v-h];h++);return Fn=g.slice(s,1<h?1-h:void 0)}function oa(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function es(){return!0}function Fl(){return!1}function mn(s){function o(l,h,g,v,S){this._reactName=l,this._targetInst=g,this.type=h,this.nativeEvent=v,this.target=S,this.currentTarget=null;for(var O in s)s.hasOwnProperty(O)&&(l=s[O],this[O]=l?l(v):v[O]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?es:Fl,this.isPropagationStopped=Fl,this}return ee(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=es)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=es)},persist:function(){},isPersistent:es}),o}var Dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},aa=mn(Dr),ts=ee({},Dr,{view:0,detail:0}),cp=mn(ts),la,As,fi,go=ee({},ts,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ns,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==fi&&(fi&&s.type==="mousemove"?(la=s.screenX-fi.screenX,As=s.screenY-fi.screenY):As=la=0,fi=s),la)},movementY:function(s){return"movementY"in s?s.movementY:As}}),ua=mn(go),Ul=ee({},go,{dataTransfer:0}),Wc=mn(Ul),ca=ee({},ts,{relatedTarget:0}),da=mn(ca),qc=ee({},Dr,{animationName:0,elapsedTime:0,pseudoElement:0}),ks=mn(qc),Gc=ee({},Dr,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Kc=mn(Gc),Qc=ee({},Dr,{data:0}),$l=mn(Qc),ha={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pn={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"},Yc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xc(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=Yc[s])?!!o[s]:!1}function ns(){return Xc}var c=ee({},ts,{key:function(s){if(s.key){var o=ha[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=oa(s),s===13?"Enter":String.fromCharCode(s)):s.type==="
37keydown"||s.type==="keyup"?Pn[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ns,charCode:function(s){return s.type==="keypress"?oa(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?oa(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),y=mn(c),_=ee({},go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),C=mn(_),W=ee({},ts,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ns}),J=mn(W),ve=ee({},Dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pt=mn(ve),Jt=ee({},go,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),st=mn(Jt),sn=[9,13,27,32],Wt=d&&"CompositionEvent"in window,mr=null;d&&"documentMode"in document&&(mr=document.documentMode);var rr=d&&"TextEvent"in window&&!mr,yo=d&&(!Wt||mr&&8<mr&&11>=mr),fa=" ",Bv=!1;function zv(s,o){switch(s){case"keyup":return sn.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hv(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var pa=!1;function VI(s,o){switch(s){case"compositionend":return Hv(o);case"keypress":return o.which!==32?null:(Bv=!0,fa);case"textInput":return s=o.data,s===fa&&Bv?null:s;default:return null}}function MI(s,o){if(pa)return s==="compositionend"||!Wt&&zv(s,o)?(s=jl(),Fn=ia=nr=null,pa=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return yo&&o.locale!=="ko"?null:o.data;default:return null}}var jI={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 Wv(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!jI[s.type]:o==="textarea"}function qv(s,o,l,h){Ue(h),o=nd(o,"onChange"),0<o.length&&(l=new aa("onChange","change",null,l,h),s.push({event:l,listeners:o}))}var Bl=null,zl=null;function FI(s){cw(s,0)}function Jc(s){var o=wa(s);if(tt(o))return s}function UI(s,o){if(s==="change")return o}var Gv=!1;if(d){var dp;if(d){var hp="oninput"in document;if(!hp){var Kv=document.createElement("div");Kv.setAttribute("oninput","return;"),hp=typeof Kv.oninput=="function"}dp=hp}else dp=!1;Gv=dp&&(!document.documentMode||9<document.documentMode)}function Qv(){Bl&&(Bl.detachEvent("onpropertychange",Yv),zl=Bl=null)}function Yv(s){if(s.propertyName==="value"&&Jc(zl)){var o=[];qv(o,zl,s,_e(s)),hn(FI,o)}}function $I(s,o,l){s==="focusin"?(Qv(),Bl=o,zl=l,Bl.attachEvent("onpropertychange",Yv)):s==="focusout"&&Qv()}function BI(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Jc(zl)}function zI(s,o){if(s==="click")return Jc(o)}function HI(s,o){if(s==="input"||s==="change")return Jc(o)}function WI(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var Or=typeof Object.is=="function"?Object.is:WI;function Hl(s,o){if(Or(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var l=Object.keys(s),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var g=l[h];if(!f.call(o,g)||!Or(s[g],o[g]))return!1}return!0}function Xv(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Jv(s,o){var l=Xv(s);s=0;for(var h;l;){if(l.nodeType===3){if(h=s+l.textContent.length,s<=o&&h>=o)return{node:l,offset:o-s};s=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Xv(l)}}function Zv(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?Zv(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function ew(){for(var s=window,o=at();o instanceof s.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)s=o.contentWindow;else break;o=at(s.document)}return o}function fp(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}function qI(s){var o=ew(),l=s.focusedElem,h=s.selectionRange;if(o!==l&&l&&l.ownerDocument&&Zv(l.ownerDocument.documentElement,l)){if(h!==null&&fp(l)){if(o=h.start,s=h.end,s===void 0&&(s=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(s,l.value.length);else if(s=(o=l.ownerDocument||document)&&o.defaultView||window,s.getSelection){s=s.getSelection();var g=l.textContent.length,v=Math.min(h.start,g);h=h.end===void 0?v:Math.min(h.end,g),!s.extend&&v>h&&(g=h,h=v,v=g),g=Jv(l,v);var S=Jv(l,h);g&&S&&(s.rangeCount!==1||s.anchorNode!==g.node||s.anchorOffset!==g.offset||s.focusNode!==S.node||s.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),s.removeAllRanges(),v>h?(s.addRange(o),s.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),s.addRange(o)))}}for(o=[],s=l;s=s.parentNode;)s.nodeType===1&&o.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)s=o[l],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var GI=d&&"documentMode"in document&&11>=document.documentMode,ma=null,pp=null,Wl=null,mp=!1;function tw(s,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;mp||ma==null||ma!==at(h)||(h=ma,"selectionStart"in h&&fp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focu
vendor: 4,088 bytes, line 37
37sNode:h.focusNode,focusOffset:h.focusOffset}),Wl&&Hl(Wl,h)||(Wl=h,h=nd(pp,"onSelect"),0<h.length&&(o=new aa("onSelect","select",null,o,l),s.push({event:o,listeners:h}),o.target=ma)))}function Zc(s,o){var l={};return l[s.toLowerCase()]=o.toLowerCase(),l["Webkit"+s]="webkit"+o,l["Moz"+s]="moz"+o,l}var ga={animationend:Zc("Animation","AnimationEnd"),animationiteration:Zc("Animation","AnimationIteration"),animationstart:Zc("Animation","AnimationStart"),transitionend:Zc("Transition","TransitionEnd")},gp={},nw={};d&&(nw=document.createElement("div").style,"AnimationEvent"in window||(delete ga.animationend.animation,delete ga.animationiteration.animation,delete ga.animationstart.animation),"TransitionEvent"in window||delete ga.transitionend.transition);function ed(s){if(gp[s])return gp[s];if(!ga[s])return s;var o=ga[s],l;for(l in o)if(o.hasOwnProperty(l)&&l in nw)return gp[s]=o[l];return s}var rw=ed("animationend"),sw=ed("animationiteration"),iw=ed("animationstart"),ow=ed("transitionend"),aw=new Map,lw="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 pi(s,o){aw.set(s,o),a(o,[s])}for(var yp=0;yp<lw.length;yp++){var vp=lw[yp],KI=vp.toLowerCase(),QI=vp[0].toUpperCase()+vp.slice(1);pi(KI,"on"+QI)}pi(rw,"onAnimationEnd"),pi(sw,"onAnimationIteration"),pi(iw,"onAnimationStart"),pi("dblclick","onDoubleClick"),pi("focusin","onFocus"),pi("focusout","onBlur"),pi(ow,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ql="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(" "),YI=new Set("cancel close invalid load scroll toggle".split(" ").concat(ql));function uw(s,o,l){var h=s.type||"unknown-event";s.currentTarget=l,xc(h,o,void 0,s),s.currentTarget=null}function cw(s,o){o=(o&4)!==0;for(var l=0;l<s.length;l++){var h=s[l],g=h.event;h=h.listeners;e:{var v=void 0;if(o)for(var S=h.length-1;0<=S;S--){var O=h[S],$=O.instance,Y=O.currentTarget;if(O=O.listener,$!==v&&g.isPropagationStopped())break e;uw(g,O,Y),v=$}else for(S=0;S<h.length;S++){if(O=h[S],$=O.instance,Y=O.currentTarget,O=O.listener,$!==v&&g.isPropagationStopped())break e;uw(g,O,Y),v=$}}}if(Rr)throw s=xl,Rr=!1,xl=null,s}function St(s,o){var l=o[Cp];l===void 0&&(l=o[Cp]=new Set);var h=s+"__bubble";l.has(h)||(dw(o,s,2,!1),l.add(h))}function wp(s,o,l){var h=0;o&&(h|=4),dw(l,s,h,o)}var td="_reactListening"+Math.random().toString(36).slice(2);function Gl(s){if(!s[td]){s[td]=!0,r.forEach(function(l){l!=="selectionchange"&&(YI.has(l)||wp(l,!1,s),wp(l,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[td]||(o[td]=!0,wp("selectionchange",!1,o))}}function dw(s,o,l,h){switch(Ml(o)){case 1:var g=Rt;break;case 4:g=up;break;default:g=Vl}
vendor: 3,064 bytes, line 37
37l=g.bind(null,o,l,s),g=void 0,!Cr||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),h?g!==void 0?s.addEventListener(o,l,{capture:!0,passive:g}):s.addEventListener(o,l,!0):g!==void 0?s.addEventListener(o,l,{passive:g}):s.addEventListener(o,l,!1)}function _p(s,o,l,h,g){var v=h;if(!(o&1)&&!(o&2)&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var O=h.stateNode.containerInfo;if(O===g||O.nodeType===8&&O.parentNode===g)break;if(S===4)for(S=h.return;S!==null;){var $=S.tag;if(($===3||$===4)&&($=S.stateNode.containerInfo,$===g||$.nodeType===8&&$.parentNode===g))return;S=S.return}for(;O!==null;){if(S=vo(O),S===null)return;if($=S.tag,$===5||$===6){h=v=S;continue e}O=O.parentNode}}h=h.return}hn(function(){var Y=v,ue=_e(l),fe=[];e:{var oe=aw.get(s);if(oe!==void 0){var Te=aa,ke=s;switch(s){case"keypress":if(oa(l)===0)break e;case"keydown":case"keyup":Te=y;break;case"focusin":ke="focus",Te=da;break;case"focusout":ke="blur",Te=da;break;case"beforeblur":case"afterblur":Te=da;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=ua;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=Wc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=J;break;case rw:case sw:case iw:Te=ks;break;case ow:Te=pt;break;case"scroll":Te=cp;break;case"wheel":Te=st;break;case"copy":case"cut":case"paste":Te=Kc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=C}var xe=(o&4)!==0,Ft=!xe&&s==="scroll",q=xe?oe!==null?oe+"Capture":null:oe;xe=[];for(var z=Y,K;z!==null;){K=z;var me=K.stateNode;if(K.tag===5&&me!==null&&(K=me,q!==null&&(me=gt(z,q),me!=null&&xe.push(Kl(z,me,K)))),Ft)break;z=z.return}0<xe.length&&(oe=new Te(oe,ke,null,l,ue),fe.push({event:oe,listeners:xe}))}}if(!(o&7)){e:{if(oe=s==="mouseover"||s==="pointerover",Te=s==="mouseout"||s==="pointerout",oe&&l!==we&&(ke=l.relatedTarget||l.fromElement)&&(vo(ke)||ke[xs]))break e;if((Te||oe)&&(oe=ue.window===ue?ue:(oe=ue.ownerDocument)?oe.defaultView||oe.parentWindow:window,Te?(ke=l.relatedTarget||l.toElement,Te=Y,ke=ke?vo(ke):null,ke!==null&&(Ft=Ar(ke),ke!==Ft||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(Te=null,ke=Y),Te!==ke)){if(xe=ua,me="onMouseLeave",q="onMouseEnter",z="mouse",(s==="pointerout"||s==="pointerover")&&(xe=C,me="onPointerLeave",q="onPointerEnter",z="pointer"),Ft=Te==null?oe:wa(Te),K=ke==null?oe:wa(ke),oe=new xe(me,z+"leave",Te,l,ue),oe.target=Ft,oe.relatedTarget=K,me=null,vo(ue)===Y&&(xe=new xe(q,z+"enter",ke,l,ue),xe.target=K,xe.relatedTarget=Ft,me=xe),Ft=me,Te&&ke)t:{for(xe=Te,q=ke,z=0,K=xe;K;K=ya(K))z++;for(K=0,me=q;me;me=ya(me))K++;for(;0<z-K;)xe=ya(xe),z--;for(;0<K-z;)q=ya(q),K--;for(;z--;){if(xe===q||q!==null&&xe===q.alternate)break t;xe=ya(xe),q=ya(q)}xe=null}else xe=null;Te!==null&&hw(fe,oe,Te,xe,!1),ke!==null&&Ft!==null&&hw(fe,Ft,ke,xe,!0)}}
vendor: 6,763 bytes, lines 37-38
37e:{if(oe=Y?wa(Y):window,Te=oe.nodeName&&oe.nodeName.toLowerCase(),Te==="select"||Te==="input"&&oe.type==="file")var Ne=UI;else if(Wv(oe))if(Gv)Ne=HI;else{Ne=BI;var Me=$I}else(Te=oe.nodeName)&&Te.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Ne=zI);if(Ne&&(Ne=Ne(s,Y))){qv(fe,Ne,l,ue);break e}Me&&Me(s,oe,Y),s==="focusout"&&(Me=oe._wrapperState)&&Me.controlled&&oe.type==="number"&&ni(oe,"number",oe.value)}switch(Me=Y?wa(Y):window,s){case"focusin":(Wv(Me)||Me.contentEditable==="true")&&(ma=Me,pp=Y,Wl=null);break;case"focusout":Wl=pp=ma=null;break;case"mousedown":mp=!0;break;case"contextmenu":case"mouseup":case"dragend":mp=!1,tw(fe,l,ue);break;case"selectionchange":if(GI)break;case"keydown":case"keyup":tw(fe,l,ue)}var je;if(Wt)e:{switch(s){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else pa?zv(s,l)&&(Be="onCompositionEnd"):s==="keydown"&&l.keyCode===229&&(Be="onCompositionStart");Be&&(yo&&l.locale!=="ko"&&(pa||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&pa&&(je=jl()):(nr=ue,ia="value"in nr?nr.value:nr.textContent,pa=!0)),Me=nd(Y,Be),0<Me.length&&(Be=new $l(Be,s,null,l,ue),fe.push({event:Be,listeners:Me}),je?Be.data=je:(je=Hv(l),je!==null&&(Be.data=je)))),(je=rr?VI(s,l):MI(s,l))&&(Y=nd(Y,"onBeforeInput"),0<Y.length&&(ue=new $l("onBeforeInput","beforeinput",null,l,ue),fe.push({event:ue,listeners:Y}),ue.data=je))}cw(fe,o)})}function Kl(s,o,l){return{instance:s,listener:o,currentTarget:l}}function nd(s,o){for(var l=o+"Capture",h=[];s!==null;){var g=s,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=gt(s,l),v!=null&&h.unshift(Kl(s,v,g)),v=gt(s,o),v!=null&&h.push(Kl(s,v,g))),s=s.return}return h}function ya(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function hw(s,o,l,h,g){for(var v=o._reactName,S=[];l!==null&&l!==h;){var O=l,$=O.alternate,Y=O.stateNode;if($!==null&&$===h)break;O.tag===5&&Y!==null&&(O=Y,g?($=gt(l,v),$!=null&&S.unshift(Kl(l,$,O))):g||($=gt(l,v),$!=null&&S.push(Kl(l,$,O)))),l=l.return}S.length!==0&&s.push({event:o,listeners:S})}var XI=/\r\n?/g,JI=/\u0000|\uFFFD/g;function fw(s){return(typeof s=="string"?s:""+s).replace(XI,`
38`).replace(JI,"")}function rd(s,o,l){if(o=fw(o),fw(s)!==o&&l)throw Error(n(425))}function sd(){}var Ep=null,Sp=null;function Tp(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var bp=typeof setTimeout=="function"?setTimeout:void 0,ZI=typeof clearTimeout=="function"?clearTimeout:void 0,pw=typeof Promise=="function"?Promise:void 0,eC=typeof queueMicrotask=="function"?queueMicrotask:typeof pw<"u"?function(s){return pw.resolve(null).then(s).catch(tC)}:bp;function tC(s){setTimeout(function(){throw s})}function Ip(s,o){var l=o,h=0;do{var g=l.nextSibling;if(s.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(h===0){s.removeChild(g),Lr(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=g}while(l);Lr(o)}function mi(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return s}function mw(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return s;o--}else l==="/$"&&o++}s=s.previousSibling}return null}var va=Math.random().toString(36).slice(2),rs="__reactFiber$"+va,Ql="__reactProps$"+va,xs="__reactContainer$"+va,Cp="__reactEvents$"+va,nC="__reactListeners$"+va,rC="__reactHandles$"+va;function vo(s){var o=s[rs];if(o)return o;for(var l=s.parentNode;l;){if(o=l[xs]||l[rs]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(s=mw(s);s!==null;){if(l=s[rs])return l;s=mw(s)}return o}s=l,l=s.parentNode}return null}function Yl(s){return s=s[rs]||s[xs],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function wa(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function id(s){return s[Ql]||null}var Rp=[],_a=-1;function gi(s){return{current:s}}function Tt(s){0>_a||(s.current=Rp[_a],Rp[_a]=null,_a--)}function Et(s,o){_a++,Rp[_a]=s.current,s.current=o}var yi={},En=gi(yi),Un=gi(!1),wo=yi;function Ea(s,o){var l=s.type.contextTypes;if(!l)return yi;var h=s.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in l)g[v]=o[v];return h&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=g),g}function $n(s){return s=s.childContextTypes,s!=null}function od(){Tt(Un),Tt(En)}function gw(s,o,l){if(En.current!==yi)throw Error(n(168));Et(En,o),Et(Un,l)}function yw(s,o,l){var h=s.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var g in h)if(!(g in o))throw Error(n(108,Ie(s)||"Unknown",g));return ee({},l,h)}function ad(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||yi,wo=En.current,Et(En,s),Et(Un,Un.current),!0}function vw(s,o,l){var h=s.stateNode;if(!h)throw Error(n(169));l?(s=yw(s,o,wo),h.__reactInternalMemoizedMergedChildContext=s,Tt(Un),Tt(En),Et(En,s)):Tt(Un),Et(Un,l)}var Ps=null,ld=!1,Ap=!1;function ww(s){Ps===null?Ps=[s]:Ps.push(s)}function sC(s){ld=!0,ww(s)}function vi(){if(!Ap&&Ps!==null){Ap=!0;var s=0,o=nt;try{var l=Ps;for(nt=1;s<l.length;s++){var h=l[s];do h=h(!0);while(h!==null)}Ps=null,ld=!1}catch(g){throw Ps!==null&&(Ps=Ps.slice(s+1)),ea(uo,vi),g}finally{nt=o,Ap=!1}}return null}var Sa=[],Ta=0,ud=null,cd=0,gr=[],yr=0,_o=null,Ns=1,Ls="";function Eo(s,o){Sa[Ta++]=cd,Sa[Ta++]=ud,ud=s,cd=o}function _w(s,o,l){gr[yr++]=Ns,gr[yr++]=Ls,gr[yr++]=_o,_o=s;var h=Ns;s=Ls;var g=32-xn(h)-1;h&=~(1<<g),l+=1;var v=32-xn(o)+g;if(30<v){var S=g-g%5;v=(h&(1<<S)-1).toString(32),h>>=S,g-=S,Ns=1<<32-xn(o)+g|l<<g|h,Ls=v+s}else Ns=1<<v|l<<g|h,Ls=s}function kp(s){s.return!==null&&(Eo(s,1),_w(s,1,0))}function xp(s){for(;s===ud;)ud=Sa[--Ta],Sa[Ta]=null,cd=Sa[--Ta],Sa[Ta]=null;for(;s===_o;)_o=gr[--yr],gr[yr]=null,Ls=gr[--yr],gr[yr]=null,Ns=gr[--yr],gr[yr]=null}var sr=null,ir=null,At=!1,Vr=null;function Ew(s,o){var l=Er(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=s,o=s.deletions,o===null?(s.deletions=[l],s.flags|=16):o.push(l)}function Sw(s,o){switch(s.tag){case 5:var l=s.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(s.stateNode=o,sr=s,ir=mi(o.firstChild),!0):!1;case 6:return o=s.pendingProps===""||o.nodeType!==3?null:o,o!==null?(s.stateNode=o,sr=s,ir=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=_o!==null?{id:Ns,overflow:Ls}
vendor: 14,504 bytes, line 38
38:null,s.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=Er(18,null,null,0),l.stateNode=o,l.return=s,s.child=l,sr=s,ir=null,!0):!1;default:return!1}}function Pp(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Np(s){if(At){var o=ir;if(o){var l=o;if(!Sw(s,o)){if(Pp(s))throw Error(n(418));o=mi(l.nextSibling);var h=sr;o&&Sw(s,o)?Ew(h,l):(s.flags=s.flags&-4097|2,At=!1,sr=s)}}else{if(Pp(s))throw Error(n(418));s.flags=s.flags&-4097|2,At=!1,sr=s}}}function Tw(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;sr=s}function dd(s){if(s!==sr)return!1;if(!At)return Tw(s),At=!0,!1;var o;if((o=s.tag!==3)&&!(o=s.tag!==5)&&(o=s.type,o=o!=="head"&&o!=="body"&&!Tp(s.type,s.memoizedProps)),o&&(o=ir)){if(Pp(s))throw bw(),Error(n(418));for(;o;)Ew(s,o),o=mi(o.nextSibling)}if(Tw(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,o=0;s;){if(s.nodeType===8){var l=s.data;if(l==="/$"){if(o===0){ir=mi(s.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}s=s.nextSibling}ir=null}}else ir=sr?mi(s.stateNode.nextSibling):null;return!0}function bw(){for(var s=ir;s;)s=mi(s.nextSibling)}function ba(){ir=sr=null,At=!1}function Lp(s){Vr===null?Vr=[s]:Vr.push(s)}var iC=te.ReactCurrentBatchConfig;function Xl(s,o,l){if(s=l.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,s));var g=h,v=""+s;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===v?o.ref:(o=function(S){var O=g.refs;S===null?delete O[v]:O[v]=S},o._stringRef=v,o)}if(typeof s!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,s))}return s}function hd(s,o){throw s=Object.prototype.toString.call(o),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s))}function Iw(s){var o=s._init;return o(s._payload)}function Cw(s){function o(q,z){if(s){var K=q.deletions;K===null?(q.deletions=[z],q.flags|=16):K.push(z)}}function l(q,z){if(!s)return null;for(;z!==null;)o(q,z),z=z.sibling;return null}function h(q,z){for(q=new Map;z!==null;)z.key!==null?q.set(z.key,z):q.set(z.index,z),z=z.sibling;return q}function g(q,z){return q=Ci(q,z),q.index=0,q.sibling=null,q}function v(q,z,K){return q.index=K,s?(K=q.alternate,K!==null?(K=K.index,K<z?(q.flags|=2,z):K):(q.flags|=2,z)):(q.flags|=1048576,z)}function S(q){return s&&q.alternate===null&&(q.flags|=2),q}function O(q,z,K,me){return z===null||z.tag!==6?(z=bm(K,q.mode,me),z.return=q,z):(z=g(z,K),z.return=q,z)}function $(q,z,K,me){var Ne=K.type;return Ne===D?ue(q,z,K.props.children,me,K.key):z!==null&&(z.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Xe&&Iw(Ne)===z.type)?(me=g(z,K.props),me.ref=Xl(q,z,K),me.return=q,me):(me=Vd(K.type,K.key,K.props,null,q.mode,me),me.ref=Xl(q,z,K),me.return=q,me)}function Y(q,z,K,me){return z===null||z.tag!==4||z.stateNode.containerInfo!==K.containerInfo||z.stateNode.implementation!==K.implementation?(z=Im(K,q.mode,me),z.return=q,z):(z=g(z,K.children||[]),z.return=q,z)}function ue(q,z,K,me,Ne){return z===null||z.tag!==7?(z=ko(K,q.mode,me,Ne),z.return=q,z):(z=g(z,K),z.return=q,z)}function fe(q,z,K){if(typeof z=="string"&&z!==""||typeof z=="number")return z=bm(""+z,q.mode,K),z.return=q,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case he:return K=Vd(z.type,z.key,z.props,null,q.mode,K),K.ref=Xl(q,null,z),K.return=q,K;case ae:return z=Im(z,q.mode,K),z.return=q,z;case Xe:var me=z._init;return fe(q,me(z._payload),K)}if(Jn(z)||ge(z))return z=ko(z,q.mode,K,null),z.return=q,z;hd(q,z)}return null}function oe(q,z,K,me){var Ne=z!==null?z.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Ne!==null?null:O(q,z,""+K,me);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case he:return K.key===Ne?$(q,z,K,me):null;case ae:return K.key===Ne?Y(q,z,K,me):null;case Xe:return Ne=K._init,oe(q,z,Ne(K._payload),me)}if(Jn(K)||ge(K))return Ne!==null?null:ue(q,z,K,me,null);hd(q,K)}return null}function Te(q,z,K,me,Ne){if(typeof me=="string"&&me!==""||typeof me=="number")return q=q.get(K)||null,O(z,q,""+me,Ne);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case he:return q=q.get(me.key===null?K:me.key)||null,$(z,q,me,Ne);case ae:return q=q.get(me.key===null?K:me.key)||null,Y(z,q,me,Ne);case Xe:var Me=me._init;return Te(q,z,K,Me(me._payload),Ne)}if(Jn(me)||ge(me))return q=q.get(K)||null,ue(z,q,me,Ne,null);hd(z,me)}return null}function ke(q,z,K,me){for(var Ne=null,Me=null,je=z,Be=z=0,ln=null;je!==null&&Be<K.length;Be++){je.index>Be?(ln=je,je=null):ln=je.sibling;var lt=oe(q,je,K[Be],me);if(lt===null){je===null&&(je=ln);break}s&&je&&lt.alternate===null&&o(q,je),z=v(lt,z,Be),Me===null?Ne=lt:Me.sibling=lt,Me=lt,je=ln}if(Be===K.length)return l(q,je),At&&Eo(q,Be),Ne;if(je===null){for(;Be<K.length;Be++)je=fe(q,K[Be],me),je!==null&&(z=v(je,z,Be),Me===null?Ne=je:Me.sibling=je,Me=je);return At&&Eo(q,Be),Ne}for(je=h(q,je);Be<K.length;Be++)ln=Te(je,q,Be,K[Be],me),ln!==null&&(s&&ln.alternate!==null&&je.delete(ln.key===null?Be:ln.key),z=v(ln,z,Be),Me===null?Ne=ln:Me.sibling=ln,Me=ln);return s&&je.forEach(function(Ri){return o(q,Ri)}),At&&Eo(q,Be),Ne}function xe(q,z,K,me){var Ne=ge(K);if(typeof Ne!="function")throw Error(n(150));if(K=Ne.call(K),K==null)throw Error(n(151));for(var Me=Ne=null,je=z,Be=z=0,ln=null,lt=K.next();je!==null&&!lt.done;Be++,lt=K.next()){je.index>Be?(ln=je,je=null):ln=je.sibling;var Ri=oe(q,je,lt.value,me);if(Ri===null){je===null&&(je=ln);break}s&&je&&Ri.alternate===null&&o(q,je),z=v(Ri,z,Be),Me===null?Ne=Ri:Me.sibling=Ri,Me=Ri,je=ln}if(lt.done)return l(q,je),At&&Eo(q,Be),Ne;if(je===null){for(;!lt.done;Be++,lt=K.next())lt=fe(q,lt.value,me),lt!==null&&(z=v(lt,z,Be),Me===null?Ne=lt:Me.sibling=lt,Me=lt);return At&&Eo(q,Be),Ne}for(je=h(q,je);!lt.done;Be++,lt=K.next())lt=Te(je,q,Be,lt.value,me),lt!==null&&(s&&lt.alternate!==null&&je.delete(lt.key===null?Be:lt.key),z=v(lt,z,Be),Me===null?Ne=lt:Me.sibling=lt,Me=lt);return s&&je.forEach(function(MC){return o(q,MC)}),At&&Eo(q,Be),Ne}function Ft(q,z,K,me){if(typeof K=="object"&&K!==null&&K.type===D&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case he:e:{for(var Ne=K.key,Me=z;Me!==null;){if(Me.key===Ne){if(Ne=K.type,Ne===D){if(Me.tag===7){l(q,Me.sibling),z=g(Me,K.props.children),z.return=q,q=z;break e}}else if(Me.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Xe&&Iw(Ne)===Me.type){l(q,Me.sibling),z=g(Me,K.props),z.ref=Xl(q,Me,K),z.return=q,q=z;break e}l(q,Me);break}else o(q,Me);Me=Me.sibling}K.type===D?(z=ko(K.props.children,q.mode,me,K.key),z.return=q,q=z):(me=Vd(K.type,K.key,K.props,null,q.mode,me),me.ref=Xl(q,z,K),me.return=q,q=me)}return S(q);case ae:e:{for(Me=K.key;z!==null;){if(z.key===Me)if(z.tag===4&&z.stateNode.containerInfo===K.containerInfo&&z.stateNode.implementation===K.implementation){l(q,z.sibling),z=g(z,K.children||[]),z.return=q,q=z;break e}else{l(q,z);break}else o(q,z);z=z.sibling}z=Im(K,q.mode,me),z.return=q,q=z}return S(q);case Xe:return Me=K._init,Ft(q,z,Me(K._payload),me)}if(Jn(K))return ke(q,z,K,me);if(ge(K))return xe(q,z,K,me);hd(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,z!==null&&z.tag===6?(l(q,z.sibling),z=g(z,K),z.return=q,q=z):(l(q,z),z=bm(K,q.mode,me),z.return=q,q=z),S(q)):l(q,z)}return Ft}var Ia=Cw(!0),Rw=Cw(!1),fd=gi(null),pd=null,Ca=null,Dp=null;function Op(){Dp=Ca=pd=null}function Vp(s){var o=fd.current;Tt(fd),s._currentValue=o}function Mp(s,o,l){for(;s!==null;){var h=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),s===l)break;s=s.return}}function Ra(s,o){pd=s,Dp=Ca=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&o&&(Bn=!0),s.firstContext=null)}function vr(s){var o=s._currentValue;if(Dp!==s)if(s={context:s,memoizedValue:o,next:null},Ca===null){if(pd===null)throw Error(n(308));Ca=s,pd.dependencies={lanes:0,firstContext:s}}else Ca=Ca.next=s;return o}var So=null;function jp(s){So===null?So=[s]:So.push(s)}function Aw(s,o,l,h){var g=o.interleaved;return g===null?(l.next=l,jp(o)):(l.next=g.next,g.next=l),o.interleaved=l,Ds(s,h)}function Ds(s,o){s.lanes|=o;var l=s.alternate;for(l!==null&&(l.lanes|=o),l=s,s=s.return;s!==null;)s.childLanes|=o,l=s.alternate,l!==null&&(l.childLanes|=o),l=s,s=s.return;return l.tag===3?l.stateNode:null}var wi=!1;function Fp(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kw(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Os(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:null,next:null}}function _i(s,o,l){var h=s.updateQueue;if(h===null)return null;if(h=h.shared,ot&2){var g=h.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),h.pending=o,Ds(s,l)}return g=h.interleaved,g===null?(o.next=o,jp(h)):(o.next=g.next,g.next=o),h.interleaved=o,Ds(s,l)}function md(s,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=s.pendingLanes,l|=h,o.lanes=l,ui(s,l)}}function xw(s,o){var l=s.updateQueue,h=s.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var g=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};v===null?g=v=S:v=v.next=S,l=l.next}while(l!==null);v===null?g=v=o:v=v.next=o}else g=v=o;l={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:h.shared,effects:h.effects},s.updateQueue=l;return}s=l.lastBaseUpdate,s===null?l.firstBaseUpdate=o:s.next=o,l.lastBaseUpdate=o}function gd(s,o,l,h){var g=s.updateQueue;wi=!1;var v=g.firstBaseUpdate,S=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var $=O,Y=$.next;$.next=null,S===null?v=Y:S.next=Y,S=$;var ue=s.alternate;ue!==null&&(ue=ue.updateQueue,O=ue.lastBaseUpdate,O!==S&&(O===null?ue.firstBaseUpdate=Y:O.next=Y,ue.lastBaseUpdate=$))}if(v!==null){var fe=g.baseState;S=0,ue=Y=$=null,O=v;do{var oe=O.lane,Te=O.eventTime;if((h&oe)===oe){ue!==null&&(ue=ue.next={eventTime:Te,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var ke=s,xe=O;switch(oe=o,Te=l,xe.tag){case 1:if(ke=xe.payload,typeof ke=="function"){fe=ke.call(Te,fe,oe);break e}fe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=xe.payload,oe=typeof ke=="function"?ke.call(Te,fe,oe):ke,oe==null)break e;fe=ee({},fe,oe);break e;case 2:wi=!0}}O.callback!==null&&O.lane!==0&&(s.flags|=64,oe=g.effects,oe===null?g.effects=[O]:oe.push(O))}else Te={eventTime:Te,lane:oe,tag:O.tag,payload:O.payload,callback:O.callback,next:null},ue===null?(Y=ue=Te,$=fe):ue=ue.next=Te,S|=oe;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;oe=O,O=oe.next,oe.next=null,g.lastBaseUpdate=oe,g.shared.pending=null}}while(!0);if(ue===null&&($=fe),g.baseState=$,g.firstBaseUpdate=Y,g.lastBaseUpdate=ue,o=g.shared.interleaved,o!==null){g=o;do S|=g.lane,g=g.next;while(g!==o)}else v===null&&(g.shared.lanes=0);Io|=S,s.lanes=S,s.memoizedState=fe}}function Pw(s,o,l){if(s=o.effects,o.effects=null,s!==null)for(o=0;o<s.length;o++){var h=s[o],g=h.callback;if(g!==null){if(h.callback=null,h=l,typeof g!="function")throw Error(n(191,g));g.call(h)}}}var Jl={},ss=gi(Jl),Zl=gi(Jl),eu=gi(Jl);function To(s){if(s===Jl)throw Error(n(174));return s}function Up(s,o){switch(Et(eu,o),Et(Zl,s),Et(ss,Jl),s=o.nodeType,s){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:jt(null,"");break;default:s=s===8?o.parentNode:o,o=s.namespaceURI||null,s=s.tagName,o=jt(o,s)}Tt(ss),Et(ss,o)}function Aa(){Tt(ss),Tt(Zl),Tt(eu)}function Nw(s){To(eu.current);var o=To(ss.current),l=jt(o,s.type);o!==l&&(Et(Zl,s),Et(ss,l))}function $p(s){Zl.current===s&&(Tt(ss),Tt(Zl))}var Pt=gi(0);function yd(s){for(var o=s;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Bp=[];function zp(){for(var s=0;s<Bp.length;s++)Bp[s]._workInProgressVersionPrimary=null;Bp.length=0}var vd=te.ReactCurrentDispatcher,Hp=te.ReactCurrentBatchConfig,bo=0,Nt=null,Zt=null,on=null,wd=!1,tu=!1,nu=0,oC=0;function Sn(){throw Error(n(321))}function Wp(s,o){if(o===null)return!1;for(var l=0;l<o.length&&l<s.length;l++)if(!Or(s[l],o[l]))return!1;return!0}function qp(s,o,l,h,g,v){if(bo=v,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,vd.current=s===null||s.memoizedState===null?cC:dC,s=l(h,g),tu){v=0;do{if(tu=!1,nu=0,25<=v)throw Error(n(301));v+=1,on=Zt=null,o.updateQueue=null,vd.current=hC,s=l(h,g)}while(tu)}if(vd.current=Sd,o=Zt!==null&&Zt.next!==null,bo=0,on=Zt=Nt=null,wd=!1,o)throw Error(n(300));return s}function Gp(){var s=nu!==0;return nu=0,s}function is(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?Nt.memoizedState=on=s:on=on.next=s,on}function wr(){if(Zt===null){var s=Nt.alternate;s=s!==null?s.memoizedState:null}else s=Zt.next;var o=on===null?Nt.memoizedState:on.next;if(o!==null)on=o,Zt=s;else{if(s===null)throw Error(n(310));Zt=s,s={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},on===null?Nt.memoizedState=on=s:on=on.next=s}return on}function ru(s,o){return typeof o=="function"?o(s):o}function Kp(s){var o=wr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=s;var h=Zt,g=h.baseQueue,v=l.pending;if(v!==null){if(g!==null){var S=g.next;g.next=v.next,v.next=S}h.baseQueue=g=v,l.pending=null}if(g!==null){v=g.next,h=h.baseState;var O=S=null,$=null,Y=v;do{var ue=Y.lane;if((bo&ue)===ue)$!==null&&($=$.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),h=Y.hasEagerState?Y.eagerState:s(h,Y.action);else{var fe={lane:ue,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};$===null?(O=$=fe,S=h):$=$.next=fe,Nt.lanes|=ue,Io|=ue}Y=Y.next}while(Y!==null&&Y!==v);$===null?S=h:$.next=O,Or(h,o.memoizedState)||(Bn=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=$,l.lastRenderedState=h}if(s=l.interleaved,s!==null){g=s;
vendor: 6,441 bytes, line 38
38do v=g.lane,Nt.lanes|=v,Io|=v,g=g.next;while(g!==s)}else g===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Qp(s){var o=wr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=s;var h=l.dispatch,g=l.pending,v=o.memoizedState;if(g!==null){l.pending=null;var S=g=g.next;do v=s(v,S.action),S=S.next;while(S!==g);Or(v,o.memoizedState)||(Bn=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),l.lastRenderedState=v}return[v,h]}function Lw(){}function Dw(s,o){var l=Nt,h=wr(),g=o(),v=!Or(h.memoizedState,g);if(v&&(h.memoizedState=g,Bn=!0),h=h.queue,Yp(Mw.bind(null,l,h,s),[s]),h.getSnapshot!==o||v||on!==null&&on.memoizedState.tag&1){if(l.flags|=2048,su(9,Vw.bind(null,l,h,g,o),void 0,null),an===null)throw Error(n(349));bo&30||Ow(l,o,g)}return g}function Ow(s,o,l){s.flags|=16384,s={getSnapshot:o,value:l},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[s]):(l=o.stores,l===null?o.stores=[s]:l.push(s))}function Vw(s,o,l,h){o.value=l,o.getSnapshot=h,jw(o)&&Fw(s)}function Mw(s,o,l){return l(function(){jw(o)&&Fw(s)})}function jw(s){var o=s.getSnapshot;s=s.value;try{var l=o();return!Or(s,l)}catch{return!0}}function Fw(s){var o=Ds(s,1);o!==null&&Ur(o,s,1,-1)}function Uw(s){var o=is();return typeof s=="function"&&(s=s()),o.memoizedState=o.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ru,lastRenderedState:s},o.queue=s,s=s.dispatch=uC.bind(null,Nt,s),[o.memoizedState,s]}function su(s,o,l,h){return s={tag:s,create:o,destroy:l,deps:h,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.lastEffect=s.next=s):(l=o.lastEffect,l===null?o.lastEffect=s.next=s:(h=l.next,l.next=s,s.next=h,o.lastEffect=s)),s}function $w(){return wr().memoizedState}function _d(s,o,l,h){var g=is();Nt.flags|=s,g.memoizedState=su(1|o,l,void 0,h===void 0?null:h)}function Ed(s,o,l,h){var g=wr();h=h===void 0?null:h;var v=void 0;if(Zt!==null){var S=Zt.memoizedState;if(v=S.destroy,h!==null&&Wp(h,S.deps)){g.memoizedState=su(o,l,v,h);return}}Nt.flags|=s,g.memoizedState=su(1|o,l,v,h)}function Bw(s,o){return _d(8390656,8,s,o)}function Yp(s,o){return Ed(2048,8,s,o)}function zw(s,o){return Ed(4,2,s,o)}function Hw(s,o){return Ed(4,4,s,o)}function Ww(s,o){if(typeof o=="function")return s=s(),o(s),function(){o(null)};if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function qw(s,o,l){return l=l!=null?l.concat([s]):null,Ed(4,4,Ww.bind(null,o,s),l)}function Xp(){}function Gw(s,o){var l=wr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&Wp(o,h[1])?h[0]:(l.memoizedState=[s,o],s)}function Kw(s,o){var l=wr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&Wp(o,h[1])?h[0]:(s=s(),l.memoizedState=[s,o],s)}function Qw(s,o,l){return bo&21?(Or(l,o)||(l=fo(),Nt.lanes|=l,Io|=l,s.baseState=!0),o):(s.baseState&&(s.baseState=!1,Bn=!0),s.memoizedState=l)}function aC(s,o){var l=nt;nt=l!==0&&4>l?l:4,s(!0);var h=Hp.transition;Hp.transition={};try{s(!1),o()}finally{nt=l,Hp.transition=h}}function Yw(){return wr().memoizedState}function lC(s,o,l){var h=bi(s);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Xw(s))Jw(o,l);else if(l=Aw(s,o,l,h),l!==null){var g=Ln();Ur(l,s,h,g),Zw(l,o,h)}}function uC(s,o,l){var h=bi(s),g={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Xw(s))Jw(o,g);else{var v=s.alternate;if(s.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var S=o.lastRenderedState,O=v(S,l);if(g.hasEagerState=!0,g.eagerState=O,Or(O,S)){var $=o.interleaved;$===null?(g.next=g,jp(o)):(g.next=$.next,$.next=g),o.interleaved=g;return}}catch{}finally{}l=Aw(s,o,g,h),l!==null&&(g=Ln(),Ur(l,s,h,g),Zw(l,o,h))}}function Xw(s){var o=s.alternate;return s===Nt||o!==null&&o===Nt}function Jw(s,o){tu=wd=!0;var l=s.pending;l===null?o.next=o:(o.next=l.next,l.next=o),s.pending=o}function Zw(s,o,l){if(l&4194240){var h=o.lanes;h&=s.pendingLanes,l|=h,o.lanes=l,ui(s,l)}}var Sd={readContext:vr,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},cC={readContext:vr,useCallback:function(s,o){return is().memoizedState=[s,o===void 0?null:o],s},useContext:vr,useEffect:Bw,useImperativeHandle:function(s,o,l){return l=l!=null?l.concat([s]):null,_d(4194308,4,Ww.bind(null,o,s),l)},useLayoutEffect:function(s,o){return _d(4194308,4,s,o)},useInsertionEffect:function(s,o){return _d(4,2,s,o)},useMemo:function(s,o){var l=is();return o=o===void 0?null:o,s=s(),l.memoizedState=[s,o],s},useReducer:function(s,o,l){var h=is();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},h.queue=s,s=s.dispatch=lC.bind(null,Nt,s),[h.memoizedState,s]},useRef:function(s){var o=is();return s={current:s},o.memoizedState=s},useState:Uw,useDebugValue:Xp,useDeferredValue:function(s){return is().memoizedState=s},useTransition:function(){var s=Uw(!1),o=s[0];return s=aC.bind(null,s[1]),is().memoizedState=s,[o,s]},useMutableSource:function(){},useSyncExternalStore:function(s,o,l){var h=Nt,g=is();if(At){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),an===null)throw Error(n(349));bo&30||Ow(h,o,l)}g.memoizedState=l;var v={value:l,getSnapshot:o};return g.queue=v,Bw(Mw.bind(null,h,v,s),[s]),h.flags|=2048,su(9,Vw.bind(null,h,v,l,o),void 0,null),l},useId:function(){var s=is(),o=an.identifierPrefix;if(At){var l=Ls,h=Ns;l=(h&~(1<<32-xn(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=nu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=oC++,o=":"+o+"r"+l.toString(32)+":";return s.memoizedState=o},unstable_isNewReconciler:!1},dC={readContext:vr,useCallback:Gw,useContext:vr,useEffect:Yp,useImperativeHandle:qw,useInsertionEffect:zw,useLayoutEffect:Hw,useMemo:Kw,useReducer:Kp,useRef:$w,useState:function(){return Kp(ru)},useDebugValue:Xp,useDeferredValue:function(s){var o=wr();return Qw(o,Zt.memoizedState,s)},useTransition:function(){var s=Kp(ru)[0],o=wr().memoizedState;return[s,o]},useMutableSource:Lw,useSyncExternalStore:Dw,useId:Yw,unstable_isNewReconciler:!1},hC={readContext:vr,useCallback:Gw,useContext:vr,useEffect:Yp,useImperativeHandle:qw,useInsertionEffect:zw,useLayoutEffect:Hw,useMemo:Kw,useReducer:Qp,useRef
vendor: 4,151 bytes, lines 38-40
38:$w,useState:function(){return Qp(ru)},useDebugValue:Xp,useDeferredValue:function(s){var o=wr();return Zt===null?o.memoizedState=s:Qw(o,Zt.memoizedState,s)},useTransition:function(){var s=Qp(ru)[0],o=wr().memoizedState;return[s,o]},useMutableSource:Lw,useSyncExternalStore:Dw,useId:Yw,unstable_isNewReconciler:!1};function Mr(s,o){if(s&&s.defaultProps){o=ee({},o),s=s.defaultProps;for(var l in s)o[l]===void 0&&(o[l]=s[l]);return o}return o}function Jp(s,o,l,h){o=s.memoizedState,l=l(h,o),l=l==null?o:ee({},o,l),s.memoizedState=l,s.lanes===0&&(s.updateQueue.baseState=l)}var Td={isMounted:function(s){return(s=s._reactInternals)?Ar(s)===s:!1},enqueueSetState:function(s,o,l){s=s._reactInternals;var h=Ln(),g=bi(s),v=Os(h,g);v.payload=o,l!=null&&(v.callback=l),o=_i(s,v,g),o!==null&&(Ur(o,s,g,h),md(o,s,g))},enqueueReplaceState:function(s,o,l){s=s._reactInternals;var h=Ln(),g=bi(s),v=Os(h,g);v.tag=1,v.payload=o,l!=null&&(v.callback=l),o=_i(s,v,g),o!==null&&(Ur(o,s,g,h),md(o,s,g))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var l=Ln(),h=bi(s),g=Os(l,h);g.tag=2,o!=null&&(g.callback=o),o=_i(s,g,h),o!==null&&(Ur(o,s,h,l),md(o,s,h))}};function e_(s,o,l,h,g,v,S){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(h,v,S):o.prototype&&o.prototype.isPureReactComponent?!Hl(l,h)||!Hl(g,v):!0}function t_(s,o,l){var h=!1,g=yi,v=o.contextType;return typeof v=="object"&&v!==null?v=vr(v):(g=$n(o)?wo:En.current,h=o.contextTypes,v=(h=h!=null)?Ea(s,g):yi),o=new o(l,v),s.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Td,s.stateNode=o,o._reactInternals=s,h&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=g,s.__reactInternalMemoizedMaskedChildContext=v),o}function n_(s,o,l,h){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==s&&Td.enqueueReplaceState(o,o.state,null)}function Zp(s,o,l,h){var g=s.stateNode;g.props=l,g.state=s.memoizedState,g.refs={},Fp(s);var v=o.contextType;typeof v=="object"&&v!==null?g.context=vr(v):(v=$n(o)?wo:En.current,g.context=Ea(s,v)),g.state=s.memoizedState,v=o.getDerivedStateFromProps,typeof v=="function"&&(Jp(s,o,v,l),g.state=s.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&Td.enqueueReplaceState(g,g.state,null),gd(s,l,g,h),g.state=s.memoizedState),typeof g.componentDidMount=="function"&&(s.flags|=4194308)}function ka(s,o){try{var l="",h=o;do l+=ye(h),h=h.return;while(h);var g=l}catch(v){g=`
39Error generating stack: `+v.message+`
40`+v.stack}return{value:s,source:o,stack:g,digest:null}}function em(s,o,l){return{value:s,source:null,stack:l??null,digest:o??null}}function tm(s,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var fC=typeof WeakMap=="function"?WeakMap:Map;function r_(s,o,l){l=Os(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){xd||(xd=!0,gm=h),tm(s,o)},l}function s_(s,o,l){l=Os(-1,l),l.tag=3;var h=s.type.getDerivedStateFromError;if(typeof h=="function"){var g=o.value;l.payload=function(){return h(g)},l.callback=function(){tm(s,o)}}var v=s.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(l.callback=function(){tm(s,o),typeof h!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),l}function i_(s,o,l){var h=s.pingCache;if(h===null){h=s.pingCache=new fC;var g=new Set;h.set(o,g)}else g=h.get(o),g===void 0&&(g=new Set,h.set(o,g));g.has(l)||(g.add(l),s=RC.bind(null,s,o,l),o.then(s,s))}function o_(s){do{var o;if((o=s.tag===13)&&(o=s.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return s;s=s.return}while(s!==null);return null}function a_(s,o,l,h,g){return s.mode&1?(s.flags|=65536,s.lanes=g,
vendor: 49,640 bytes, line 40
40s):(s===o?s.flags|=65536:(s.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=Os(-1,1),o.tag=2,_i(l,o,1))),l.lanes|=1),s)}var pC=te.ReactCurrentOwner,Bn=!1;function Nn(s,o,l,h){o.child=s===null?Rw(o,null,l,h):Ia(o,s.child,l,h)}function l_(s,o,l,h,g){l=l.render;var v=o.ref;return Ra(o,g),h=qp(s,o,l,h,v,g),l=Gp(),s!==null&&!Bn?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~g,Vs(s,o,g)):(At&&l&&kp(o),o.flags|=1,Nn(s,o,h,g),o.child)}function u_(s,o,l,h,g){if(s===null){var v=l.type;return typeof v=="function"&&!Tm(v)&&v.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=v,c_(s,o,v,h,g)):(s=Vd(l.type,null,h,o,o.mode,g),s.ref=o.ref,s.return=o,o.child=s)}if(v=s.child,!(s.lanes&g)){var S=v.memoizedProps;if(l=l.compare,l=l!==null?l:Hl,l(S,h)&&s.ref===o.ref)return Vs(s,o,g)}return o.flags|=1,s=Ci(v,h),s.ref=o.ref,s.return=o,o.child=s}function c_(s,o,l,h,g){if(s!==null){var v=s.memoizedProps;if(Hl(v,h)&&s.ref===o.ref)if(Bn=!1,o.pendingProps=h=v,(s.lanes&g)!==0)s.flags&131072&&(Bn=!0);else return o.lanes=s.lanes,Vs(s,o,g)}return nm(s,o,l,h,g)}function d_(s,o,l){var h=o.pendingProps,g=h.children,v=s!==null?s.memoizedState:null;if(h.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(Pa,or),or|=l;else{if(!(l&1073741824))return s=v!==null?v.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,Et(Pa,or),or|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=v!==null?v.baseLanes:l,Et(Pa,or),or|=h}else v!==null?(h=v.baseLanes|l,o.memoizedState=null):h=l,Et(Pa,or),or|=h;return Nn(s,o,g,l),o.child}function h_(s,o){var l=o.ref;(s===null&&l!==null||s!==null&&s.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function nm(s,o,l,h,g){var v=$n(l)?wo:En.current;return v=Ea(o,v),Ra(o,g),l=qp(s,o,l,h,v,g),h=Gp(),s!==null&&!Bn?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~g,Vs(s,o,g)):(At&&h&&kp(o),o.flags|=1,Nn(s,o,l,g),o.child)}function f_(s,o,l,h,g){if($n(l)){var v=!0;ad(o)}else v=!1;if(Ra(o,g),o.stateNode===null)Id(s,o),t_(o,l,h),Zp(o,l,h,g),h=!0;else if(s===null){var S=o.stateNode,O=o.memoizedProps;S.props=O;var $=S.context,Y=l.contextType;typeof Y=="object"&&Y!==null?Y=vr(Y):(Y=$n(l)?wo:En.current,Y=Ea(o,Y));var ue=l.getDerivedStateFromProps,fe=typeof ue=="function"||typeof S.getSnapshotBeforeUpdate=="function";fe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(O!==h||$!==Y)&&n_(o,S,h,Y),wi=!1;var oe=o.memoizedState;S.state=oe,gd(o,h,S,g),$=o.memoizedState,O!==h||oe!==$||Un.current||wi?(typeof ue=="function"&&(Jp(o,l,ue,h),$=o.memoizedState),(O=wi||e_(o,l,O,h,oe,$,Y))?(fe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),S.props=h,S.state=$,S.context=Y,h=O):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,kw(s,o),O=o.memoizedProps,Y=o.type===o.elementType?O:Mr(o.type,O),S.props=Y,fe=o.pendingProps,oe=S.context,$=l.contextType,typeof $=="object"&&$!==null?$=vr($):($=$n(l)?wo:En.current,$=Ea(o,$));var Te=l.getDerivedStateFromProps;(ue=typeof Te=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(O!==fe||oe!==$)&&n_(o,S,h,$),wi=!1,oe=o.memoizedState,S.state=oe,gd(o,h,S,g);var ke=o.memoizedState;O!==fe||oe!==ke||Un.current||wi?(typeof Te=="function"&&(Jp(o,l,Te,h),ke=o.memoizedState),(Y=wi||e_(o,l,Y,h,oe,ke,$)||!1)?(ue||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,ke,$),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,ke,$)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||O===s.memoizedProps&&oe===s.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||O===s.memoizedProps&&oe===s.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),S.props=h,S.state=ke,S.context=$,h=Y):(typeof S.componentDidUpdate!="function"||O===s.memoizedProps&&oe===s.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||O===s.memoizedProps&&oe===s.memoizedState||(o.flags|=1024),h=!1)}return rm(s,o,l,h,v,g)}function rm(s,o,l,h,g,v){h_(s,o);var S=(o.flags&128)!==0;if(!h&&!S)return g&&vw(o,l,!1),Vs(s,o,v);h=o.stateNode,pC.current=o;var O=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,s!==null&&S?(o.child=Ia(o,s.child,null,v),o.child=Ia(o,null,O,v)):Nn(s,o,O,v),o.memoizedState=h.state,g&&vw(o,l,!0),o.child}function p_(s){var o=s.stateNode;o.pendingContext?gw(s,o.pendingContext,o.pendingContext!==o.context):o.context&&gw(s,o.context,!1),Up(s,o.containerInfo)}function m_(s,o,l,h,g){return ba(),Lp(g),o.flags|=256,Nn(s,o,l,h),o.child}var sm={dehydrated:null,treeContext:null,retryLane:0};function im(s){return{baseLanes:s,cachePool:null,transitions:null}}function g_(s,o,l){var h=o.pendingProps,g=Pt.current,v=!1,S=(o.flags&128)!==0,O;if((O=S)||(O=s!==null&&s.memoizedState===null?!1:(g&2)!==0),O?(v=!0,o.flags&=-129):(s===null||s.memoizedState!==null)&&(g|=1),Et(Pt,g&1),s===null)return Np(o),s=o.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(o.mode&1?s.data==="$!"?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(S=h.children,s=h.fallback,v?(h=o.mode,v=o.child,S={mode:"hidden",children:S},!(h&1)&&v!==null?(v.childLanes=0,v.pendingProps=S):v=Md(S,h,0,null),s=ko(s,h,l,null),v.return=o,s.return=o,v.sibling=s,o.child=v,o.child.memoizedState=im(l),o.memoizedState=sm,s):om(o,S));if(g=s.memoizedState,g!==null&&(O=g.dehydrated,O!==null))return mC(s,o,S,h,O,g,l);if(v){v=h.fallback,S=o.mode,g=s.child,O=g.sibling;var $={mode:"hidden",children:h.children};return!(S&1)&&o.child!==g?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Ci(g,$),h.subtreeFlags=g.subtreeFlags&14680064),O!==null?v=Ci(O,v):(v=ko(v,S,l,null),v.flags|=2),v.return=o,h.return=o,h.sibling=v,o.child=h,h=v,v=o.child,S=s.child.memoizedState,S=S===null?im(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},v.memoizedState=S,v.childLanes=s.childLanes&~l,o.memoizedState=sm,h}return v=s.child,s=v.sibling,h=Ci(v,{mode:"visible",children:h.children}),!(o.mode&1)&&(h.lanes=l),h.return=o,h.sibling=null,s!==null&&(l=o.deletions,l===null?(o.deletions=[s],o.flags|=16):l.push(s)),o.child=h,o.memoizedState=null,h}function om(s,o){return o=Md({mode:"visible",children:o},s.mode,0,null),o.return=s,s.child=o}function bd(s,o,l,h){return h!==null&&Lp(h),Ia(o,s.child,null,l),s=om(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function mC(s,o,l,h,g,v,S){if(l)return o.flags&256?(o.flags&=-257,h=em(Error(n(422))),bd(s,o,S,h)):o.memoizedState!==null?(o.child=s.child,o.flags|=128,null):(v=h.fallback,g=o.mode,h=Md({mode:"visible",children:h.children},g,0,null),v=ko(v,g,S,null),v.flags|=2,h.return=o,v.return=o,h.sibling=v,o.child=h,o.mode&1&&Ia(o,s.child,null,S),o.child.memoizedState=im(S),o.memoizedState=sm,v);if(!(o.mode&1))return bd(s,o,S,null);if(g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var O=h.dgst;return h=O,v=Error(n(419)),h=em(v,h,void 0),bd(s,o,S,h)}if(O=(S&s.childLanes)!==0,Bn||O){if(h=an,h!==null){switch(S&-S){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=g&(h.suspendedLanes|S)?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Ds(s,g),Ur(h,s,g,-1))}return Sm(),h=em(Error(n(421))),bd(s,o,S,h)}return g.data==="$?"?(o.flags|=128,o.child=s.child,o=AC.bind(null,s),g._reactRetry=o,null):(s=v.treeContext,ir=mi(g.nextSibling),sr=o,At=!0,Vr=null,s!==null&&(gr[yr++]=Ns,gr[yr++]=Ls,gr[yr++]=_o,Ns=s.id,Ls=s.overflow,_o=o),o=om(o,h.children),o.flags|=4096,o)}function y_(s,o,l){s.lanes|=o;var h=s.alternate;h!==null&&(h.lanes|=o),Mp(s.return,o,l)}function am(s,o,l,h,g){var v=s.memoizedState;v===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:g}:(v.isBackwards=o,v.rendering=null,v.renderingStartTime=0,v.last=h,v.tail=l,v.tailMode=g)}function v_(s,o,l){var h=o.pendingProps,g=h.revealOrder,v=h.tail;if(Nn(s,o,h.children,l),h=Pt.current,h&2)h=h&1|2,o.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&y_(s,l,o);else if(s.tag===19)y_(s,l,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}h&=1}if(Et(Pt,h),!(o.mode&1))o.memoizedState=null;else switch(g){case"forwards":for(l=o.child,g=null;l!==null;)s=l.alternate,s!==null&&yd(s)===null&&(g=l),l=l.sibling;l=g,l===null?(g=o.child,o.child=null):(g=l.sibling,l.sibling=null),am(o,!1,g,l,v);break;case"backwards":for(l=null,g=o.child,o.child=null;g!==null;){if(s=g.alternate,s!==null&&yd(s)===null){o.child=g;break}s=g.sibling,g.sibling=l,l=g,g=s}am(o,!0,l,null,v);break;case"together":am(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Id(s,o){!(o.mode&1)&&s!==null&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Vs(s,o,l){if(s!==null&&(o.dependencies=s.dependencies),Io|=o.lanes,!(l&o.childLanes))return null;if(s!==null&&o.child!==s.child)throw Error(n(153));if(o.child!==null){for(s=o.child,l=Ci(s,s.pendingProps),o.child=l,l.return=o;s.sibling!==null;)s=s.sibling,l=l.sibling=Ci(s,s.pendingProps),l.return=o;l.sibling=null}return o.child}function gC(s,o,l){switch(o.tag){case 3:p_(o),ba();break;case 5:Nw(o);break;case 1:$n(o.type)&&ad(o);break;case 4:Up(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,g=o.memoizedProps.value;Et(fd,h._currentValue),h._currentValue=g;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(Et(Pt,Pt.current&1),o.flags|=128,null):l&o.child.childLanes?g_(s,o,l):(Et(Pt,Pt.current&1),s=Vs(s,o,l),s!==null?s.sibling:null);Et(Pt,Pt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,s.flags&128){if(h)return v_(s,o,l);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Et(Pt,Pt.current),h)break;return null;case 22:case 23:return o.lanes=0,d_(s,o,l)}return Vs(s,o,l)}var w_,lm,__,E_;w_=function(s,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)s.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},lm=function(){},__=function(s,o,l,h){var g=s.memoizedProps;if(g!==h){s=o.stateNode,To(ss.current);var v=null;switch(l){case"input":g=Yt(s,g),h=Yt(s,h),v=[];break;case"select":g=ee({},g,{value:void 0}),h=ee({},h,{value:void 0}),v=[];break;case"textarea":g=ri(s,g),h=ri(s,h),v=[];break;default:typeof g.onClick!="function"&&typeof h.onClick=="function"&&(s.onclick=sd)}H(l,h);var S;l=null;for(Y in g)if(!h.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var O=g[Y];for(S in O)O.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(i.hasOwnProperty(Y)?v||(v=[]):(v=v||[]).push(Y,null));for(Y in h){var $=h[Y];if(O=g!=null?g[Y]:void 0,h.hasOwnProperty(Y)&&$!==O&&($!=null||O!=null))if(Y==="style")if(O){for(S in O)!O.hasOwnProperty(S)||$&&$.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in $)$.hasOwnProperty(S)&&O[S]!==$[S]&&(l||(l={}),l[S]=$[S])}else l||(v||(v=[]),v.push(Y,l)),l=$;else Y==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,O=O?O.__html:void 0,$!=null&&O!==$&&(v=v||[]).push(Y,$)):Y==="children"?typeof $!="string"&&typeof $!="number"||(v=v||[]).push(Y,""+$):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(i.hasOwnProperty(Y)?($!=null&&Y==="onScroll"&&St("scroll",s),v||O===$||(v=[])):(v=v||[]).push(Y,$))}l&&(v=v||[]).push("style",l);var Y=v;(o.updateQueue=Y)&&(o.flags|=4)}},E_=function(s,o,l,h){l!==h&&(o.flags|=4)};function iu(s,o){if(!At)switch(s.tailMode){case"hidden":o=s.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?s.tail=null:l.sibling=null;break;case"collapsed":l=s.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:h.sibling=null}}function Tn(s){var o=s.alternate!==null&&s.alternate.child===s.child,l=0,h=0;if(o)for(var g=s.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags&14680064,h|=g.flags&14680064,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=h,s.childLanes=l,o}function yC(s,o,l){var h=o.pendingProps;switch(xp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tn(o),null;case 1:return $n(o.type)&&od(),Tn(o),null;case 3:return h=o.stateNode,Aa(),Tt(Un),Tt(En),zp(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(dd(o)?o.flags|=4:s===null||s.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,Vr!==null&&(wm(Vr),Vr=null))),lm(s,o),Tn(o),null;case 5:$p(o);var g=To(eu.current);if(l=o.type,s!==null&&o.stateNode!=null)__(s,o,l,h,g),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return Tn(o),null}if(s=To(ss.current),dd(o)){h=o.stateNode,l=o.type;var v=o.memoizedProps;switch(h[rs]=o,h[Ql]=v,s=(o.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(g=0;g<ql.length;g++)St(ql[g],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Mn(h,v),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!v.multiple},St("invalid",h);break;case"textarea":si(h,v),St("invalid",h)}H(l,v),g=null;for(var S in v)if(v.hasOwnProperty(S)){var O=v[S];S==="children"?typeof O=="string"?h.textContent!==O&&(v.suppressHydrationWarning!==!0&&rd(h.textContent,O,s),g=["children",O]):typeof O=="number"&&h.textContent!==""+O&&(v.suppressHydrationWarning!==!0&&rd(h.textContent,O,s),g=["children",""+O]):i.hasOwnProperty(S)&&O!=null&&S==="onScroll"&&St("scroll",h)}switch(l){case"input":ft(h),ro(h,v,!0);break;case"textarea":ft(h),Ts(h);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(h.onclick=sd)}h=g,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=g.nodeType===9?g:g.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Mt(l)),s==="http://www.w3.org/1999/xhtml"?l==="script"?(s=S.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof h.is=="string"?s=S.createElement(l,{is:h.is}):(s=S.createElement(l),l==="select"&&(S=s,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):s=S.createElementNS(s,l),s[rs]=o,s[Ql]=h,w_(s,o,!1,!1),o.stateNode=s;e:{switch(S=ce(l,h),l){case"dialog":St("cancel",s),St("close",s),g=h;break;case"iframe":case"object":case"embed":St("load",s),g=h;break;case"video":case"audio":for(g=0;g<ql.length;g++)St(ql[g],s);g=h;break;case"source":St("error",s),g=h;break;case"img":case"image":case"link":St("error",s),St("load",s),g=h;break;case"details":St("toggle",s),g=h;break;case"input":Mn(s,h),g=Yt(s,h),St("invalid",s);break;case"option":g=h;break;case"select":s._wrapperState={wasMultiple:!!h.multiple},g=ee({},h,{value:void 0}),St("invalid",s);break;case"textarea":si(s,h),g=ri(s,h),St("invalid",s);break;default:g=h}H(l,g),O=g;for(v in O)if(O.hasOwnProperty(v)){var $=O[v];v==="style"?oo(s,$):v==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&so(s,$)):v==="children"?typeof $=="string"?(l!=="textarea"||$!=="")&&Yr(s,$):typeof $=="number"&&Yr(s,""+$):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?$!=null&&v==="onScroll"&&St("scroll",s):$!=null&&Q(s,v,$,S))}switch(l){case"input":ft(s),ro(s,h,!1);break;case"textarea":ft(s),Ts(s);break;case"option":h.value!=null&&s.setAttribute("value",""+be(h.value));break;case"select":s.multiple=!!h.multiple,v=h.value,v!=null?hr(s,!!h.multiple,v,!1):h.defaultValue!=null&&hr(s,!!h.multiple,h.defaultValue,!0);break;default:typeof g.onClick=="function"&&(s.onclick=sd)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Tn(o),null;case 6:if(s&&o.stateNode!=null)E_(s,o,s.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=To(eu.current),To(ss.current),dd(o)){if(h=o.stateNode,l=o.memoizedProps,h[rs]=o,(v=h.nodeValue!==l)&&(s=sr,s!==null))switch(s.tag){case 3:rd(h.nodeValue,l,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&rd(h.nodeValue,l,(s.mode&1)!==0)}v&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[rs]=o,o.stateNode=h}return Tn(o),null;case 13:if(Tt(Pt),h=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(At&&ir!==null&&o.mode&1&&!(o.flags&128))bw(),ba(),o.flags|=98560,v=!1;else if(v=dd(o),h!==null&&h.dehydrated!==null){if(s===null){if(!v)throw Error(n(318));if(v=o.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[rs]=o}else ba(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;Tn(o),v=!1}else Vr!==null&&(wm(Vr),Vr=null),v=!0;if(!v)return o.flags&65536?o:null}return o.flags&128?(o.lanes=l,o):(h=h!==null,h!==(s!==null&&s.memoizedState!==null)&&h&&(o.child.flags|=8192,o.mode&1&&(s===null||Pt.current&1?en===0&&(en=3):Sm())),o.updateQueue!==null&&(o.flags|=4),Tn(o),null);case 4:return Aa(),lm(s,o),s===null&&Gl(o.stateNode.containerInfo),Tn(o),null;case 10:return Vp(o.type._context),Tn(o),null;case 17:return $n(o.type)&&od(),Tn(o),null;case 19:if(Tt(Pt),v=o.memoizedState,v===null)return Tn(o),null;if(h=(o.flags&128)!==0,S=v.rendering,S===null)if(h)iu(v,!1);else{if(en!==0||s!==null&&s.flags&128)for(s=o.child;s!==null;){if(S=yd(s),S!==null){for(o.flags|=128,iu(v,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)v=l,s=h,v.flags&=14680066,S=v.alternate,S===null?(v.childLanes=0,v.lanes=s,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=S.childLanes,v.lanes=S.lanes,v.child=S.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=S.memoizedProps,v.memoizedState=S.memoizedState,v.updateQueue=S.updateQueue,v.type=S.type,s=S.dependencies,v.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),l=l.sibling;return Et(Pt,Pt.current&1|2),o.child}s=s.sibling}v.tail!==null&&_t()>Na&&(o.flags|=128,h=!0,iu(v,!1),o.lanes=4194304)}else{if(!h)if(s=yd(S),s!==null){if(o.flags|=128,h=!0,l=s.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),iu(v,!0),v.tail===null&&v.tailMode==="hidden"&&!S.alternate&&!At)return Tn(o),null}else 2*_t()-v.renderingStartTime>Na&&l!==1073741824&&(o.flags|=128,h=!0,iu(v,!1),o.lanes=4194304);v.isBackwards?(S.sibling=o.child,o.child=S):(l=v.last,l!==null?l.sibling=S:o.child=S,v.last=S)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=_t(),o.sibling=null,l=Pt.current,Et(Pt,h?l&1|2:l&1),o):(Tn(o),null);case 22:case 23:return Em(),h=o.memoizedState!==null,s!==null&&s.memoizedState!==null!==h&&(o.flags|=8192),h&&o.mode&1?or&1073741824&&(Tn(o),o.subtreeFlags&6&&(o.flags|=8192)):Tn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function vC(s,o){switch(xp(o),o.tag){case 1:return $n(o.type)&&od(),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Aa(),Tt(Un),Tt(En),zp(),s=o.flags,s&65536&&!(s&128)?(o.flags=s&-65537|128,o):null;case 5:return $p(o),null;case 13:if(Tt(Pt),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(n(340));ba()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return Tt(Pt),null;case 4:return Aa(),null;case 10:return Vp(o.type._context),null;case 22:case 23:return Em(),null;case 24:return null;default:return null}}var Cd=!1,bn=!1,wC=typeof WeakSet=="function"?WeakSet:Set,Re=null;function xa(s,o){var l=s.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Vt(s,o,h)}else l.current=null}function um(s,o,l){try{l()}catch(h){Vt(s,o,h)}}var S_=!1;function _C(s,o){if(Ep=hi,s=ew(),fp(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{l=(l=s.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var g=h.anchorOffset,v=h.focusNode;h=h.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var S=0,O=-1,$=-1,Y=0,ue=0,fe=s,oe=null;t:for(;;){for(var Te;fe!==l||g!==0&&fe.nodeType!==3||(O=S+g),fe!==v||h!==0&&fe.nodeType!==3||($=S+h),fe.nodeType===3&&(S+=fe.nodeValue.length),(Te=fe.firstChild)!==null;)oe=fe,fe=Te;for(;;){if(fe===s)break t;if(oe===l&&++Y===g&&(O=S),oe===v&&++ue===h&&($=S),(Te=fe.nextSibling)!==null)break;fe=oe,oe=fe.parentNode}fe=Te}l=O===-1||$===-1?null:{start:O,end:$}}else l=null}l=l||{start:0,end:0}}else l=null;for(Sp={focusedElem:s,selectionRange:l},hi=!1,Re=o;Re!==null;)if(o=Re,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Re=s;else for(;Re!==null;){o=Re;try{var ke=o.alternate;if(o.flags&1024)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var xe=ke.memoizedProps,Ft=ke.memoizedState,q=o.stateNode,z=q.getSnapshotBeforeUpdate(o.elementType===o.type?xe:Mr(o.type,xe),Ft);q.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(me){Vt(o,o.return,me)}if(s=o.sibling,s!==null){s.return=o.return,Re=s;break}Re=o.return}return ke=S_,S_=!1,ke}function ou(s,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&s)===s){var v=g.destroy;g.destroy=void 0,v!==void 0&&um(o,l,v)}g=g.next}while(g!==h)}}function Rd(s,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&s)===s){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function cm(s){var o=s.ref;if(o!==null){var l=s.stateNode;switch(s.tag){case 5:s=l;break;default:s=l}typeof o=="function"?o(s):o.current=s}}function T_(s){var o=s.alternate;o!==null&&(s.alternate=null,T_(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&(delete o[rs],delete o[Ql],delete o[Cp],delete o[nC],delete o[rC])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function b_(s){return s.tag===5||s.tag===3||s.tag===4}function I_(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||b_(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function dm(s,o,l){var h=s.tag;if(h===5||h===6)s=s.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(s,o):l.insertBefore(s,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(s,l)):(o=l,o.appendChild(s)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=sd));else if(h!==4&&(s=s.child,s!==null))for(dm(s,o,l),s=s.sibling;s!==null;)dm(s,o,l),s=s.sibling}function hm(s,o,l){var h=s.tag;if(h===5||h===6)s=s.stateNode,o?l.insertBefore(s,o):l.appendChild(s);else if(h!==4&&(s=s.child,s!==null))for(hm(s,o,l),s=s.sibling;s!==null;)hm(s,o,l),s=s.sibling}var gn=null,jr=!1;function Ei(s,o,l){for(l=l.child;l!==null;)C_(s,o,l),l=l.sibling}function C_(s,o,l){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(co,l)}catch{}switch(l.tag){case 5:bn||xa(l,o);case 6:var h=gn,g=jr;gn=null,Ei(s,o,l),gn=h,jr=g,gn!==null&&(jr?(s=gn,l=l.stateNode,s.nodeType===8?s.parentNode.removeChild(l):s.removeChild(l)):gn.removeChild(l.stateNode));break;case 18:gn!==null&&(jr?(s=gn,l=l.stateNode,s.nodeType===8?Ip(s.parentNode,l):s.nodeType===1&&Ip(s,l),Lr(s)):Ip(gn,l.stateNode));break;case 4:h=gn,g=jr,gn=l.stateNode.containerInfo,jr=!0,Ei(s,o,l),gn=h,jr=g;break;case 0:case 11:case 14:case 15:if(!bn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){g=h=h.next;do{var v=g,S=v.destroy;v=v.tag,S!==void 0&&(v&2||v&4)&&um(l,o,S),g=g.next}while(g!==h)}Ei(s,o,l);break;case 1:if(!bn&&(xa(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(O){Vt(l,o,O)}Ei(s,o,l);break;case 21:Ei(s,o,l);break;case 22:l.mode&1?(bn=(h=bn)||l.memoizedState!==null,Ei(s,o,l),bn=h):Ei(s,o,l);break;default:Ei(s,o,l)}}function R_(s){var o=s.updateQueue;if(o!==null){s.updateQueue=null;var l=s.stateNode;l===null&&(l=s.stateNode=new wC),o.forEach(function(h){var g=kC.bind(null,s,h);l.has(h)||(l.add(h),h.then(g,g))})}}function Fr(s,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];try{var v=s,S=o,O=S;e:for(;O!==null;){switch(O.tag){case 5:gn=O.stateNode,jr=!1;break e;case 3:gn=O.stateNode.containerInfo,jr=!0;break e;case 4:gn=O.stateNode.containerInfo,jr=!0;break e}O=O.return}if(gn===null)throw Error(n(160));C_(v,S,g),gn=null,jr=!1;var $=g.alternate;$!==null&&($.return=null),g.return=null}catch(Y){Vt(g,o,Y)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)A_(o,s),o=o.sibling}function A_(s,o){var l=s.alternate,h=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Fr(o,s),os(s),h&4){try{ou(3,s,s.return),Rd(3,s)}catch(xe){Vt(s,s.return,xe)}try{ou(5,s,s.return)}catch(xe){Vt(s,s.return,xe)}}break;case 1:Fr(o,s),os(s),h&512&&l!==null&&xa(l,l.return);break;case 5:if(Fr(o,s),os(s),h&512&&l!==null&&xa(l,l.return),s.flags&32){var g=s.stateNode;try{Yr(g,"")}catch(xe){Vt(s,s.return,xe)}}if(h&4&&(g=s.stateNode,g!=null)){var v=s.memoizedProps,S=l!==null?l.memoizedProps:v,O=s.type,$=s.updateQueue;if(s.updateQueue=null,$!==null)try{O==="input"&&v.type==="radio"&&v.name!=null&&rn(g,v),ce(O,S);var Y=ce(O,v);for(S=0;S<$.length;S+=2){var ue=$[S],fe=$[S+1];ue==="style"?oo(g,fe):ue==="dangerouslySetInnerHTML"?so(g,fe):ue==="children"?Yr(g,fe):Q(g,ue,fe,Y)}switch(O){case"input":Xt(g,v);break;case"textarea":Qr(g,v);break;case"select":var oe=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var Te=v.value;Te!=null?hr(g,!!v.multiple,Te,!1):oe!==!!v.multiple&&(v.defaultValue!=null?hr(g,!!v.multiple,v.defaultValue,!0):hr(g,!!v.multiple,v.multiple?[]:"",!1))}g[Ql]=v}catch(xe){Vt(s,s.return,xe)}}break;case 6:if(Fr(o,s),os(s),h&4){if(s.stateNode===null)throw Error(n(162));g=s.stateNode,v=s.memoizedProps;try{g.nodeValue=v}catch(xe){Vt(s,s.return,xe)}}break;case 3:if(Fr(o,s),os(s),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Lr(o.containerInfo)}catch(xe){Vt(s,s.return,xe)}break;case 4:Fr(o,s),os(s);break;case 13:Fr(o,s),os(s),g=s.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(mm=_t())),h&4&&R_(s);break;case 22:if(ue=l!==null&&l.memoizedState!==null,s.mode&1?(bn=(Y=bn)||ue,Fr(o,s),bn=Y):Fr(o,s),os(s),h&8192){if(Y=s.memoizedState!==null,(s.stateNode.isHidden=Y)&&!ue&&s.mode&1)for(Re=s,ue=s.child;ue!==null;){for(fe=Re=ue;Re!==null;){switch(oe=Re,Te=oe.child,oe.tag){case 0:case 11:case 14:case 15:ou(4,oe,oe.return);break;case 1:xa(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){h=oe,l=oe.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(xe){Vt(h,l,xe)}}break;case 5:xa(oe,oe.return);break;case 22:if(oe.memoizedState!==null){P_(fe);continue}}Te!==null?(Te.return=oe,Re=Te):P_(fe)}ue=ue.sibling}e:for(ue=null,fe=s;;){if(fe.tag===5){if(ue===null){ue=fe;try{g=fe.stateNode,Y?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(O=fe.stateNode,$=fe.memoizedProps.style,S=$!=null&&$.hasOwnProperty("display")?$.display:null,O.style.display=io("display",S))}catch(xe){Vt(s,s.return,xe)}}}else if(fe.tag===6){if(ue===null)try{fe.stateNode.nodeValue=Y?"":fe.memoizedProps}catch(xe){Vt(s,s.return,xe)}}else if((fe.tag!==22&&fe.tag!==23||fe.memoizedState===null||fe===s)&&fe.child!==null){fe.child.return=fe,fe=fe.child;continue}if(fe===s)break e;for(;fe.sibling===null;){if(fe.return===null||fe.return===s)break e;ue===fe&&(ue=null),fe=fe.return}ue===fe&&(ue=null),fe.sibling.return=fe.return,fe=fe.sibling}}break;case 19:Fr(o,s),os(s),h&4&&R_(s);break;case 21:break;default:Fr(o,s),os(s)}}function os(s){var o=s.flags;if(o&2){try{e:{for(var l=s.return;l!==null;){if(b_(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var g=h.stateNode;h.flags&32&&(Yr(g,""),h.flags&=-33);var v=I_(s);hm(s,v,g);break;case 3:case 4:var S=h.stateNode.containerInfo,O=I_(s);dm(s,O,S);break;default:throw Error(n(161))}}catch($){Vt(s,s.return,$)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function EC(s,o,l){Re=s,k_(s)}function k_(s,o,l){for(var h=(s.mode&1)!==0;Re!==null;){var g=Re,v=g.child;if(g.tag===22&&h){var S=g.memoizedState!==null||Cd;if(!S){var O=g.alternate,$=O!==null&&O.memoizedState!==null||bn;O=Cd;var Y=bn;if(Cd=S,(bn=$)&&!Y)for(Re=g;Re!==null;)S=Re,$=S.child,S.tag===22&&S.memoizedState!==null?N_(g):$!==null?($.return=S,Re=$):N_(g);for(;v!==null;)Re=v,k_(v),v=v.sibling;Re=g,Cd=O,bn=Y}x_(s)}else g.subtreeFlags&8772&&v!==null?(v.return=g,Re=v):x_(s)}}function x_(s){for(;Re!==null;){var o=Re;if(o.flags&8772){var l=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:bn||Rd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!bn)if(l===null)h.componentDidMount();else{var g=o.elementType===o.type?l.memoizedProps:Mr(o.type,l.memoizedProps);h.componentDidUpdate(g,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var v=o.updateQueue;v!==null&&Pw(o,v,h);break;case 3:var S=o.updateQueue;if(S!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}Pw(o,S,l)}break;case 5:var O=o.stateNode;if(l===null&&o.flags&4){l=O;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&l.focus();break;case"img":$.src&&(l.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Y=o.alternate;if(Y!==null){var ue=Y.memoizedState;if(ue!==null){var fe=ue.dehydrated;fe!==null&&Lr(fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}bn||o.flags&512&&cm(o)}catch(oe){Vt(o,o.return,oe)}}if(o===s){Re=null;break}if(l=o.sibling,l!==null){l.return=o.return,Re=l;break}Re=o.return}}function P_(s){for(;Re!==null;){var o=Re;if(o===s){Re=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Re=l;break}Re=o.return}}function N_(s){for(;Re!==null;){var o=Re;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{Rd(4,o)}catch($){Vt(o,l,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var g=o.return;try{h.componentDidMount()}catch($){Vt(o,g,$)}}var v=o.return;try{cm(o)}catch($){Vt(o,v,$)}break;case 5:var S=o.return;try{cm(o)}catch($){Vt(o,S,$)}}}catch($){Vt(o,o.return,$)}if(o===s){Re=null;break}var O=o.sibling;if(O!==null){O.return=o.return,Re=O;break}Re=o.return}}var SC=Math.ceil,Ad=te.ReactCurrentDispatcher,fm=te.ReactCurrentOwner,_r=te.ReactCurrentBatchConfig,ot=0,an=null,qt=null,yn=0,or=0,Pa=gi(0),en=0,au=null,Io=0,kd=0,pm=0,lu=null,zn=null,mm=0,Na=1/0,Ms=null,xd=!1,gm=null,Si=null,Pd=!1,Ti=null,Nd=0,uu=0,ym=null,Ld=-1,Dd=0;function Ln(){return ot&6?_t():Ld!==-1?Ld:Ld=_t()}function bi(s){return s.mode&1?ot&2&&yn!==0?yn&-yn:iC.transition!==null?(Dd===0&&(Dd=fo()),Dd):(s=nt,s!==0||(s=window.event,s=s===void 0?16:Ml(s.type)),s):1}function Ur(s,o,l,h){if(50<uu)throw uu=0,ym=null,Error(n(185));li(s,l,h),(!(ot&2)||s!==an)&&(s===an&&(!(ot&2)&&(kd|=l),en===4&&Ii(s,yn)),Hn(s,h),l===1&&ot===0&&!(o.mode&1)&&(Na=_t()+500,ld&&vi()))}function Hn(s,o){var l=s.callbackNode;Is(s,o);var h=ho(s,s===an?yn:0);if(h===0)l!==null&&Nl(l),s.callbackNode=null,s.callbackPriority=0;else if(o=h&-h,s.callbackPriority!==o){if(l!=null&&Nl(l),o===1)s.tag===0?sC(D_.bind(null,s)):ww(D_.bind(null,s)),eC(function(){!(ot&6)&&vi()}),l=null;else{switch(ci(h)){case 1:l=uo;break;case 4:l=ii;break;case 16:l=fr;break;case 536870912:l=Dc;break;default:l=fr}l=B_(l,L_.bind(null,s))}s.callbackPriority=o,s.callbackNode=l}}function L_(s,o){if(Ld=-1,Dd=0,ot&6)throw Error(n(327));var l=s.callbackNode;if(La()&&s.callbackNode!==l)return null;var h=ho(s,s===an?yn:0);if(h===0)return null;if(h&30||h&s.expiredLanes||o)o=Od(s,h);else{o=h;var g=ot;ot|=2;var v=V_();(an!==s||yn!==o)&&(Ms=null,Na=_t()+500,Ro(s,o));do try{IC();break}catch(O){O_(s,O)}while(!0);Op(),Ad.current=v,ot=g,qt!==null?o=0:(an=null,yn=0,o=en)}if(o!==0){if(o===2&&(g=tr(s),g!==0&&(h=g,o=vm(s,g))),o===1)throw l=au,Ro(s,0),Ii(s,h),Hn(s,_t()),l;if(o===6)Ii(s,h);else{if(g=s.current.alternate,!(h&30)&&!TC(g)&&(o=Od(s,h),o===2&&(v=tr(s),v!==0&&(h=v,o=vm(s,v))),o===1))throw l=au,Ro(s,0),Ii(s,h),Hn(s,_t()),l;switch(s.finishedWork=g,s.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ao(s,zn,Ms);break;case 3:if(Ii(s,h),(h&130023424)===h&&(o=mm+500-_t(),10<o)){if(ho(s,0)!==0)break;if(g=s.suspendedLanes,(g&h)!==h){Ln(),s.pingedLanes|=s.suspendedLanes&g;break}s.timeoutHandle=bp(Ao.bind(null,s,zn,Ms),o);break}Ao(s,zn,Ms);break;case 4:if(Ii(s,h),(h&4194240)===h)break;for(o=s.eventTimes,g=-1;0<h;){var S=31-xn(h);v=1<<S,S=o[S],S>g&&(g=S),h&=~v}if(h=g,h=_t()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*SC(h/1960))-h,10<h){s.timeoutHandle=bp(Ao.bind(null,s,zn,Ms),h);break}Ao(s,zn,Ms);break;case 5:Ao(s,zn,Ms);break;default:throw Error(n(329))}}}return Hn(s,_t()),s.callbackNode===l?L_.bind(null,s):null}function vm(s,o){var l=lu;return s.current.memoizedState.isDehydrated&&(Ro(s,o).flags|=256),s=Od(s,o),s!==2&&(o=zn,zn=l,o!==null&&wm(o)),s}function wm(s){zn===null?zn=s:zn.push.apply(zn,s)}function TC(s){for(var o=s;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var g=l[h],v=g.getSnapshot;g=g.value;try{if(!Or(v(),g))return!1}catch{return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ii(s,o){for(o&=~pm,o&=~kd,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var l=31-xn(o),h=1<<l;s[l]=-1,o&=~h}}function D_(s){if(ot&6)throw Error(n(327));La();var o=ho(s,0);if(!(o&1))return Hn(s,_t()),null;var l=Od(s,o);if(s.tag!==0&&l===2){var h=tr(s);h!==0&&(o=h,l=vm(s,h))}if(l===1)throw l=au,Ro(s,0),Ii(s,o),Hn(s,_t()),l;if(l===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Ao(s,zn,Ms),Hn(s,_t()),null}function _m(s,o){var l=ot;ot|=1;try{return s(o)}finally{ot=l,ot===0&&(Na=_t()+500,ld&&vi())}}function Co(s){Ti!==null&&Ti.tag===0&&!(ot&6)&&La();var o=ot;ot|=1;var l=_r.transition,h=nt;try{if(_r.transition=null,nt=1,s)return s()}finally{nt=h,_r.transition=l,ot=o,!(ot&6)&&vi()}}function Em(){or=Pa.current,Tt(Pa)}function Ro(s,o){s.finishedWork=null,s.finishedLanes=0;var l=s.timeoutHandle;if(l!==-1&&(s.timeoutHandle=-1,ZI(l)),qt!==null)for(l=qt.return;l!==null;){var h=l;switch(xp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&od();break;case 3:Aa(),Tt(Un),Tt(En),zp();break;case 5:$p(h);break;case 4:Aa();break;case 13:Tt(Pt);break;case 19:Tt(Pt);break;case 10:Vp(h.type._context);break;case 22:case 23:Em()}l=l.return}if(an=s,qt=s=Ci(s.current,null),yn=or=o,en=0,au=null,pm=kd=Io=0,zn=lu=null,So!==null){for(o=0;o<So.length;o++)if(l=So[o],h=l.interleaved,h!==null){l.interleaved=null;var g=h.next,v=l.pending;if(v!==null){var S=v.next;v.next=g,h.next=S}l.pending=h}So=null}return s}function O_(s,o){do{var l=qt;try{if(Op(),vd.current=Sd,wd){for(var h=Nt.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}wd=!1}if(bo=0,on=Zt=Nt=null,tu=!1,nu=0,fm.current=null,l===null||l.return===null){en=1,au=o,qt=null;break}e:{var v=s,S=l.return,O=l,$=o;if(o=yn,O.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var Y=$,ue=O,fe=ue.tag;if(!(ue.mode&1)&&(fe===0||fe===11||fe===15)){var oe=ue.alternate;oe?(ue.updateQueue=oe.updateQueue,ue.memoizedState=oe.memoizedState,ue.lanes=oe.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var Te=o_(S);if(Te!==null){Te.flags&=-257,a_(Te,S,O,v,o),Te.mode&1&&i_(v,Y,o),o=Te,$=Y;var ke=o.updateQueue;if(ke===null){var xe=new Set;xe.add($),o.updateQueue=xe}else ke.add($);break e}else{if(!(o&1)){i_(v,Y,o),Sm();break e}$=Error(n(426))}}else if(At&&O.mode&1){var Ft=o_(S);if(Ft!==null){!(Ft.flags&65536)&&(Ft.flags|=256),a_(Ft,S,O,v,o),Lp(ka($,O));break e}}v=$=ka($,O),en!==4&&(en=2),lu===null?lu=[v]:lu.push(v),v=S;do{switch(v.tag){case 3:v.flags|=65536,o&=-o,v.lanes|=o;var q=r_(v,$,o);xw(v,q);break e;case 1:O=$;var z=v.type,K=v.stateNode;if(!(v.flags&128)&&(typeof z.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Si===null||!Si.has(K)))){v.flags|=65536,o&=-o,v.lanes|=o;var me=s_(v,O,o);xw(v,me);break e}}v=v.return}while(v!==null)}j_(l)}catch(Ne){o=Ne,qt===l&&l!==null&&(qt=l=l.return);continue}break}while(!0)}function V_(){var s=Ad.current;return Ad.current=Sd,s===null?Sd:s}function Sm(){(en===0||en===3||en===2)&&(en=4),an===null||!(Io&268435455)&&!(kd&268435455)||Ii(an,yn)}function Od(s,o){var l=ot;ot|=2;var h=V_();(an!==s||yn!==o)&&(Ms=null,Ro(s,o));do try{bC();break}catch(g){O_(s,g)}while(!0);if(Op(),ot=l,Ad.current=h,qt!==null)throw Error(n(261));return an=null,yn=0,en}function bC(){for(;qt!==null;)M_(qt)}function IC(){for(;qt!==null&&!Nc();)M_(qt)}function M_(s){var o=$_(s.alternate,s,or);s.memoizedProps=s.pendingProps,o===null?j_(s):qt=o,fm.current=null}function j_(s){var o=s;do{var l=o.alternate;if(s=o.return,o.flags&32768){if(l=vC(l,o),l!==null){l.flags&=32767,qt=l;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{en=6,qt=null;return}}else if(l=yC(l,o,or),l!==null){qt=l;return}if(o=o.sibling,o!==null){qt=o;return}qt=o=s}while(o!==null);en===0&&(en=5)}function Ao(s,o,l){var h=nt,g=_r.transition;try{_r.transition=null,nt=1,CC(s,o,l,h)}finally{_r.transition=g,nt=h}return null}function CC(s,o,l,h){do La();while(Ti!==null);if(ot&6)throw Error(n(327));l=s.finishedWork;var g=s.finishedLanes;if(l===null)return null;if(s.finishedWork=null,s.finishedLanes=0,l===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var v=l.lanes|l.childLanes;if(yt(s,v),s===an&&(qt=an=null,yn=0),!(l.subtreeFlags&2064)&&!(l.flags&2064)||Pd||(Pd=!0,B_(fr,function(){return La(),null})),v=(l.flags&15990)!==0,l.subtreeFlags&15990||v){v=_r.transition,_r.transition=null;var S=nt;nt=1;var O=ot;ot|=4,fm.current=null,_C(s,l),A_(l,s),qI(Sp),hi=!!Ep,Sp=Ep=null,s.current=l,EC(l),ip(),ot=O,nt=S,_r.transition=v}else s.current=l;if(Pd&&(Pd=!1,Ti=s,Nd=g),v=s.pendingLanes,v===0&&(Si=null),Oc(l.stateNode),Hn(s,_t()),o!==null)for(h=s.onRecoverableError,l=0;l<o.length;l++)g=o[l],h(g.value,{componentStack:g.stack,digest:g.digest});if(xd)throw xd=!1,s=gm,gm=null,s;return Nd&1&&s.tag!==0&&La(),v=s.pendingLanes,v&1?s===ym?uu++:(uu=0,ym=s):uu=0,vi(),null}function La(){if(Ti!==null){var s=ci(Nd),o=_r.transition,l=nt;try{if(_r.transition=null,nt=16>s?16:s,Ti===null)var h=!1;else{if(s=Ti,Ti=null,Nd=0,ot&6)throw Error(n(331));var g=ot;for(ot|=4,Re=s.current;Re!==null;){var v=Re,S=v.child;if(Re.flags&16){var O=v.deletions;if(O!==null){for(var $=0;$<O.length;$++){var Y=O[$];for(Re=Y;Re!==null;){var ue=Re;switch(ue.tag){case 0:case 11:case 15:ou(8,ue,v)}var fe=ue.child;if(fe!==null)fe.return=ue,Re=fe;else for(;Re!==null;){ue=Re;var oe=ue.sibling,Te=ue.return;if(T_(ue),ue===Y){Re=null;break}if(oe!==null){oe.return=Te,Re=oe;break}Re=Te}}}var ke=v.alternate;if(ke!==null){var xe=ke.child;if(xe!==null){ke.child=null;do{var Ft=xe.sibling;xe.sibling=null,xe=Ft}while(xe!==null)}}Re=v}}if(v.subtreeFlags&2064&&S!==null)S.return=v,Re=S;else e:for(;Re!==null;){if(v=Re,v.flags&2048)switch(v.tag){case 0:case 11:case 15:ou(9,v,v.return)}var q=v.sibling;if(q!==null){q.return=v.return,Re=q;break e}Re=v.return}}var z=s.current;for(Re=z;Re!==null;){S=Re;var K=S.child;if(S.subtreeFlags&2064&&K!==null)K.return=S,Re=K;else e:for(S=z;Re!==null;){if(O=Re,O.flags&2048)try{switch(O.tag){case 0:case 11:case 15:Rd(9,O)}}catch(Ne){Vt(O,O.return,Ne)}if(O===S){Re=null;break e}var me=O.sibling;if(me!==null){me.return=O.return,Re=me;break e}Re=O.return}}if(ot=g,vi(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(co,s)}catch{}h=!0}return h}finally{nt=l,_r.transition=o}}return!1}function F_(s,o,l){o=ka(l,o),o=r_(s,o,1),s=_i(s,o,1),o=Ln(),s!==null&&(li(s,1,o),Hn(s,o))}function Vt(s,o,l){if(s.tag===3)F_(s,s,l);else for(;o!==null;){if(o.tag===3){F_(o,s,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Si===null||!Si.has(h))){s=ka(l,s),s=s_(o,s,1),o=_i(o,s,1),s=Ln(),o!==null&&(li(o,1,s),Hn(o,s));break}}o=o.return}}function RC(s,o,l){var h=s.pingCache;h!==null&&h.delete(o),o=Ln(),s.pingedLanes|=s.suspendedLanes&l,an===s&&(yn&l)===l&&(en===4||en===3&&(yn&130023424)===yn&&500>_t()-mm?Ro(s,0):pm|=l),Hn(s,o)}function U_(s,o){o===0&&(s.mode&1?(o=na,na<<=1,!(na&130023424)&&(na=4194304)):o=1);var l=Ln();s=Ds(s,o),s!==null&&(li(s,o,l),Hn(s,l))}function AC(s){var o=s.memoizedState,l=0;o!==null&&(l=o.retryLane),U_(s,l)}function kC(s,o){var l=0;switch(s.tag){case 13:var h=s.stateNode,g=s.memoizedState;g!==null&&(l=g.retryLane);break;case 19:h=s.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),U_(s,l)}var $_;$_=function(s,o,l){if(s!==null)if(s.memoizedProps!==o.pendingProps||Un.current)Bn=!0;else{if(!(s.lanes&l)&&!(o.flags&128))return Bn=!1,gC(s,o,l);Bn=!!(s.flags&131072)}else Bn=!1,At&&o.flags&1048576&&_w(o,cd,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Id(s,o),s=o.pendingProps;var g=Ea(o,En.current);Ra(o,l),g=qp(null,o,h,s,g,l);var v=Gp();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,$n(h)?(v=!0,ad(o)):v=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Fp(o),g.updater=Td,o.stateNode=g,g._reactInternals=o,Zp(o,h,s,l),o=rm(null,o,h,!0,v,l)):(o.tag=0,At&&v&&kp(o),Nn(null,o,g,l),o=o.child),o;case 16:h=o.elementType;e:{switch(Id(s,o),s=o.pendingProps,g=h._init,h=g(h._payload),o.type=h,g=o.tag=PC(h),s=Mr(h,s),g){case 0:o=nm(null,o,h,s,l);break e;case 1:o=f_(null,o,h,s,l);break e;case 11:o=l_(null,o,h,s,l);break e;case 14:o=u_(null,o,h,Mr(h.type,s),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,g=o.pendingProps,g=o.elementType===h?g:Mr(h,g),nm(s,o,h,g,l);case 1:return h=o.type,g=o.pendingProps,g=o.elementType===h?g:Mr(h,g),f_(s,o,h,g,l);case 3:e:{if(p_(o),s===null)throw Error(n(387));h=o.pendingProps,v=o.memoizedState,g=v.element,kw(s,o),gd(o,h,null,l);var S=o.memoizedState;if(h=S.element,v.isDehydrated)if(v={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){g=ka(Error(n(423)),o),o=m_(s,o,h,l,g);break e}else if(h!==g){g=ka(Error(n(424)),o),o=m_(s,o,h,l,g);break e}else for(ir=mi(o.stateNode.containerInfo.firstChild),sr=o,At=!0,Vr=null,l=Rw(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ba(),h===g){o=Vs(s,o,l);break e}Nn(s,o,h,l)}o=o.child}return o;case 5:return Nw(o),s===null&&Np(o),h=o.type,g=o.pendingProps,v=s!==null?s.memoizedProps:null,S=g.children,Tp(h,g)?S=null:v!==null&&Tp(h,v)&&(o.flags|=32),h_(s,o),Nn(s,o,S,l),o.child;case 6:return s===null&&Np(o),null;case 13:return g_(s,o,l);case 4:return Up(o,o.stateNode.containerInfo),h=o.pendingProps,s===null?o.child=Ia(o,null,h,l):Nn(s,o,h,l),o.child;case 11:return h=o.type,g=o.pendingProps,g=o.elementType===h?g:Mr(h,g),l_(s,o,h,g,l);case 7:return Nn(s,o,o.pendingProps,l),o.child;case 8:return Nn(s,o,o.pendingProps.children,l),o.child;case 12:return Nn(s,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,g=o.pendingProps,v=o.memoizedProps,S=g.value,Et(fd,h._currentValue),h._currentValue=S,v!==null)if(Or(v.value,S)){if(v.children===g.children&&!Un.current){o=Vs(s,o,l);break e}}else for(v=o.child,v!==null&&(v.return=o);v!==null;){var O=v.dependencies;if(O!==null){S=v.child;for(var $=O.firstContext;$!==null;){if($.context===h){if(v.tag===1){$=Os(-1,l&-l),$.tag=2;var Y=v.updateQueue;if(Y!==null){Y=Y.shared;var ue=Y.pending;ue===null?$.next=$:($.next=ue.next,ue.next=$),Y.pending=$}}v.lanes|=l,$=v.alternate,$!==null&&($.lanes|=l),Mp(v.return,l,o),O.lanes|=l;break}$=$.next}}else if(v.tag===10)S=v.type===o.type?null:v.child;else if(v.tag===18){if(S=v.return,S===null)throw Error(n(341));S.lanes|=l,O=S.alternate,O!==null&&(O.lanes|=l),Mp(S,l,o),S=v.sibling}else S=v.child;if(S!==null)S.return=v;else for(S=v;S!==null;){if(S===o){S=null;break}if(v=S.sibling,v!==null){v.return=S.return,S=v;break}S=S.return}v=S}Nn(s,o,g.children,l),o=o.child}return o;case 9:return g=o.type,h=o.pendingProps.children,Ra(o,l),g=vr(g),h=h(g),o.flags|=1,Nn(s,o,h,l),o.child;case 14:return h=o.type,g=Mr(h,o.pendingProps),g=Mr(h.type,g),u_(s,o,h,g,l);case 15:return c_(s,o,o.type,o.pendingProps,l);case 17:return h=o.type,g=o.pendingProps,g=o.elementType===h?g:Mr(h,g),Id(s,o),o.tag=1,$n(h)?(s=!0,ad(o)):s=!1,Ra(o,l),t_(o,h,g),Zp(o,h,g,l),rm(null,o,h,!0,s,l);case 19:return v_(s,o,l);case 22:return d_(s,o,l)}throw Error(n(156,o.tag))};function B_(s,o){return ea(s,o)}function xC(s,o,l,h){this.tag=s,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Er(s,o,l,h){return new xC(s,o,l,h)}function Tm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function PC(s){if(typeof s=="function")return Tm(s)?1:0;if(s!=null){if(s=s.$$typeof,s===B)return 11;if(s===qe)return 14}return 2}function Ci(s,o){var l=s.alternate;return l===null?(l=Er(s.tag,o,s.key,s.mode),l.elementType=s.elementType,l.type=s.type,l.stateNode=s.stateNode,l.alternate=s,s.alternate=l):(l.pendingProps=o,l.type=s.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=s.flags&14680064,l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,o=s.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=s.sibling,l.index=s.index,l.ref=s.ref,l}function Vd(s,o,l,h,g,v){var S=2;if(h=s,typeof s=="function")Tm(s)&&(S=1);else if(typeof s=="string")S=5;else e:switch(s){case D:return ko(l.children,g,v,o);case R:S=8,g|=8;break;case x:return s=Er(12,l,o,g|2),s.elementType=x,s.lanes=v,s;case P:return s=Er(13,l,o,g),s.elementType=P,s.lanes=v,s;case le:return s=Er(19,l,o,g),s.elementType=le,s.lanes=v,s;case de:return Md(l,g,v,o);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case k:S=10;break e;case F:S=9;break e;case B:S=11;break e;case qe:S=14;break e;case Xe:S=16,h=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return o=Er(S,l,o,g),o.elementType=s,o.type=h,o.lanes=v,o}function ko(s,o,l,h){return s=Er(7,s,h,o),s.lanes=l,s}function Md(s,o,l,h){return s=Er(22,s,h,o),s.elementType=de,s.lanes=l,s.stateNode={isHidden:!1},s}function bm(s,o,l){return s=Er(6,s,null,o),s.lanes=l,s}function Im(s,o,l){return o=Er(4,s.children!==null?s.children:[],s.key,o),o.lanes=l,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function NC(s,o,l,h,g){this.tag=o,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ai(0),this.expirationTimes=ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.identifierPrefix=h,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Cm(s,o,l,h,g,v,S,O,$){return s=new NC(s,o,l,O,$),o===1?(o=1,v===!0&&(o|=8)):o=0,v=Er(3,null,null,o),s.current=v,v.stateNode=s,v.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null}
vendor: 1,489 bytes, line 40
40,Fp(v),s}function LC(s,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:h==null?null:""+h,children:s,containerInfo:o,implementation:l}}function z_(s){if(!s)return yi;s=s._reactInternals;e:{if(Ar(s)!==s||s.tag!==1)throw Error(n(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if($n(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(s.tag===1){var l=s.type;if($n(l))return yw(s,l,o)}return o}function H_(s,o,l,h,g,v,S,O,$){return s=Cm(l,h,!0,s,g,v,S,O,$),s.context=z_(null),l=s.current,h=Ln(),g=bi(l),v=Os(h,g),v.callback=o??null,_i(l,v,g),s.current.lanes=g,li(s,g,h),Hn(s,h),s}function jd(s,o,l,h){var g=o.current,v=Ln(),S=bi(g);return l=z_(l),o.context===null?o.context=l:o.pendingContext=l,o=Os(v,S),o.payload={element:s},h=h===void 0?null:h,h!==null&&(o.callback=h),s=_i(g,o,S),s!==null&&(Ur(s,g,S,v),md(s,g,S)),S}function Fd(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function W_(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<o?l:o}}function Rm(s,o){W_(s,o),(s=s.alternate)&&W_(s,o)}var q_=typeof reportError=="function"?reportError:function(s){console.error(s)};function Am(s){this._internalRoot=s}Ud.prototype.render=Am.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(n(409));
vendor: 4,302 bytes, line 40
40jd(s,o,null,null)},Ud.prototype.unmount=Am.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;Co(function(){jd(null,s,null,null)}),o[xs]=null}};function Ud(s){this._internalRoot=s}Ud.prototype.unstable_scheduleHydration=function(s){if(s){var o=Uc();s={blockedOn:null,target:s,priority:o};for(var l=0;l<Zr.length&&o!==0&&o<Zr[l].priority;l++);Zr.splice(l,0,s),l===0&&zc(s)}};function km(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function $d(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function G_(){}function DC(s,o,l,h,g){if(g){if(typeof h=="function"){var v=h;h=function(){var Y=Fd(S);v.call(Y)}}var S=H_(o,h,s,0,null,!1,!1,"",G_);return s._reactRootContainer=S,s[xs]=S.current,Gl(s.nodeType===8?s.parentNode:s),Co(),S}for(;g=s.lastChild;)s.removeChild(g);if(typeof h=="function"){var O=h;h=function(){var Y=Fd($);O.call(Y)}}var $=Cm(s,0,!1,null,null,!1,!1,"",G_);return s._reactRootContainer=$,s[xs]=$.current,Gl(s.nodeType===8?s.parentNode:s),Co(function(){jd(o,$,l,h)}),$}function Bd(s,o,l,h,g){var v=l._reactRootContainer;if(v){var S=v;if(typeof g=="function"){var O=g;g=function(){var $=Fd(S);O.call($)}}jd(o,S,s,g)}else S=DC(l,o,s,g,h);return Fd(S)}jc=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var l=oi(o.pendingLanes);l!==0&&(ui(o,l|1),Hn(o,_t()),!(ot&6)&&(Na=_t()+500,vi()))}break;case 13:Co(function(){var h=Ds(s,1);if(h!==null){var g=Ln();Ur(h,s,1,g)}}),Rm(s,1)}},ra=function(s){if(s.tag===13){var o=Ds(s,134217728);if(o!==null){var l=Ln();Ur(o,s,134217728,l)}Rm(s,134217728)}},Fc=function(s){if(s.tag===13){var o=bi(s),l=Ds(s,o);if(l!==null){var h=Ln();Ur(l,s,o,h)}Rm(s,o)}},Uc=function(){return nt},$c=function(s,o){var l=nt;try{return nt=s,o()}finally{nt=l}},Se=function(s,o,l){switch(o){case"input":if(Xt(s,l),o=l.name,l.type==="radio"&&o!=null){for(l=s;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==s&&h.form===s.form){var g=id(h);if(!g)throw Error(n(90));tt(h),Xt(h,g)}}}break;case"textarea":Qr(s,l);break;case"select":o=l.value,o!=null&&hr(s,!!l.multiple,o,!1)}},Dt=_m,Ct=Co;var OC={usingClientEntryPoint:!1,Events:[Yl,wa,id,Ue,dt,_m]},cu={findFiberByHostInstance:vo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},VC={bundleType:cu.bundleType,version:cu.version,rendererPackageName:cu.rendererPackageName,rendererConfig:cu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:te.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Pl(s),s===null?null:s.stateNode},findFiberByHostInstance:cu.findFiberByHostInstance,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 zd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zd.isDisabled&&zd.supportsFiber)try{co=zd.inject(VC),er=zd}catch{}}return Wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OC,Wn.createPortal=function(s,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!km(o))throw Error(n(200));return LC(s,o,null,l)},Wn.createRoot=function(s,o){if(!km(s))throw Error(n(299));var l=!1,h="",g=q_;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=Cm(s,1,!1,null,null,l,!1,h,g),s[xs]=o.current,Gl(s.nodeType===8?s.parentNode:s),new Am(o)},Wn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Pl(o),s=s===null?null:s.stateNode,s},Wn.flushSync=function(s){return Co(s)},Wn.hydrate=function(s,o,l){if(!$d(o))throw Error(n(200));return Bd(null,s,o,!0,l)},Wn.hydrateRoot=function(s,o,l){if(!km(s))throw Error(n(405));
40var h=l!=null&&l.hydratedSources||null,g=!1,v="",S=q_;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),o=H_(o,null,s,1,l??null,g,!1,v,S),s[xs]=o.current,Gl(s),h)for(s=0;s<h.length;s++)l=h[s],g=l._getVersion,g=g(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,g]:o.mutableSourceEagerHydrationData.push(l,g);return new Ud(o)},Wn.render=function(s,o,l){if(!$d(o))throw Error(n(200));return Bd(null,s,o,!1,l)},Wn.unmountComponentAtNode=function(s){if(!$d(s))throw Error(n(40));return s._reactRootContainer?(Co(function(){Bd(null,null,s,!1,function(){s._reactRootContainer=null,s[xs]=null})}),!0):!1},Wn.unstable_batchedUpdates=_m,Wn.unstable_renderSubtreeIntoContainer=function(s,o,l,h){if(!$d(l))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Bd(s,o,l,!1,h)},Wn.version="18.3.1-next-f1338f8080-20240426",Wn}var t1;function S2(){if(t1)return Nm.exports;t1=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Nm.exports=WC(),Nm.exports}var n1;function qC(){if(n1)return Hd;n1=1;var t=S2();return Hd.createRoot=t.createRoot,Hd.hydrateRoot=t.hydrateRoot,Hd}var GC=qC(),hu={},r1;function KC(){if(r1)return hu;r1=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.parse=u,hu.serialize=p;const t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,e=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,a=(()=>{const T=function(){};return T.prototype=Object.create(null),T})();function u(T,b){const I=new a,L=T.length;if(L<2)return I;const V=(b==null?void 0:b.decode)||w;let U=0;do{const M=T.indexOf("=",U);if(M===-1)break;const Q=T.indexOf(";",U),te=Q===-1?L:Q;if(M>te){U=T.lastIndexOf(";",M-1)+1;continue}const he=d(T,U,M),ae=f(T,M,he),D=T.slice(he,ae);if(I[D]===void 0){let R=d(T,M+1,te),x=f(T,te,R);const k=V(T.slice(R,x));I[D]=k}U=te+1}while(U<L);return I}function d(T,b,I){do{const L=T.charCodeAt(b);if(L!==32&&L!==9)return b}while(++b<I);return I}function f(T,b,I){for(;b>I;){const L=T.charCodeAt(--b);if(L!==32&&L!==9)return b+1}return I}function p(T,b,I){const L=(I==null?void 0:I.encode)||encodeURIComponent;if(!t.test(T))throw new TypeError(`argument name is invalid: ${T}`);const V=L(b);if(!e.test(V))throw new TypeError(`argument val is invalid: ${b}`);let U=T+"="+V;if(!I)return U;if(I.maxAge!==void 0){if(!Number.isInteger(I.maxAge))throw new TypeError(`option maxAge is invalid: ${I.maxAge}`);U+="; Max-Age="+I.maxAge}if(I.domain){if(!n.test(I.domain))throw new TypeError(`option domain is invalid: ${I.domain}`);U+="; Domain="+I.domain}if(I.path){if(!r.test(I.path))throw new TypeError(`option path is invalid: ${I.path}`);U+="; Path="+I.path}if(I.expires){if(!E(I.expires)||!Number.isFinite(I.expires.valueOf()))throw new TypeError(`option expires is invali
40d: ${I.expires}`);U+="; Expires="+I.expires.toUTCString()}if(I.httpOnly&&(U+="; HttpOnly"),I.secure&&(U+="; Secure"),I.partitioned&&(U+="; Partitioned"),I.priority)switch(typeof I.priority=="string"?I.priority.toLowerCase():void 0){case"low":U+="; Priority=Low";break;case"medium":U+="; Priority=Medium";break;case"high":U+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${I.priority}`)}if(I.sameSite)switch(typeof I.sameSite=="string"?I.sameSite.toLowerCase():I.sameSite){case!0:case"strict":U+="; SameSite=Strict";break;case"lax":U+="; SameSite=Lax";break;case"none":U+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${I.sameSite}`)}return U}function w(T){if(T.indexOf("%")===-1)return T;try{return decodeURIComponent(T)}catch{return T}}function E(T){return i.call(T)==="[object Date]"}return hu}KC();/**
41 * react-router v7.1.1
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */var s1="popstate";function QC(t={}){function e(r,i){let{pathname:a,search:u,hash:d}=r.location;return hg("",{pathname:a,search:u,hash:d},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Fu(i)}return XC(e,n,null,t)}function xt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Hr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function YC(){return Math.random().toString(36).substring(2,10)}function i1(t,e){return{usr:t.state,key:t.key,idx:e}}function hg(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?cl(e):e,state:n,key:e&&e.key||r||YC()}}function Fu({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function cl(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function XC(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,u=i.history,d="POP",f=null,p=w();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function w(){return(u.state||{idx:null}).idx}function E(){d="POP";let V=w(),U=V==null?null:V-p;p=V,f&&f({action:d,location:L.location,delta:U})}function T(V,U){d="PUSH";let M=hg(L.location,V,U);p=w()+1;let Q=i1(M,p),te=L.createHref(M);try{u.pushState(Q,"",te)}catch(he){if(he instanceof DOMException&&he.name==="DataCloneError")throw he;i.location.assign(te)}a&&f&&f({action:d,location:L.location,delta:1})}function b(V,U){d="REPLACE";let M=hg(L.location,V,U);p=w();let Q=i1(M,p),te=L.createHref(M);u.replaceState(Q,"",te),a&&f&&f({action:d,location:L.location,delta:0})}function I(V){let U=i.location.origin!=="null"?i.location.origin:i.location.href,M=typeof V=="string"?V:Fu(V);return M=M.replace(/ $/,"%20"),xt(U,`No window.location.(origin|href) available to create URL for href: ${M}`),new URL(M,U)}let L={get action(){return d},get location(){return t(i,u)},listen(V){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(s1,E),f=V,()=>{i.removeEventListener(s1,E),f=null}},createHref(V){return e(i,V)},createURL:I,encodeLocation(V){let U=I(V);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:T,replace:b,go(V){return u.go(V)}};return L}function T2(t,e,n="/"){return JC(t,e,n,!1)}function JC(t,e,n,r){let i=typeof e=="string"?cl(e):e,a=Hi(i.pathname||"/",n);if(a==null)return null;let u=b2(t);ZC(u);let d=null;for(let f=0;d==null&&f<u.length;++f){let p=cR(a);d=lR(u[f],p,r)}return d}function b2(t,e=[],n=[],r=""){let i=(a,u,d)=>{let f={relativePath:d===void 0?a.path||"":d,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};f.relativePath.startsWith("/")&&(xt(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length));let p=Bs([r,f.relativePath]),w=n.concat(f);a.children&&a.children.length>0&&(xt(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),b2(a.children,e,w,p)),!(a.path==null&&!a.index)&&e.push({path:p,score:oR(p,a.index),routesMeta:w})};return t.forEach((a,u)=>{var d;if(a.path===""||!((d=a.path)!=null&&d.includes("?")))i(a,u);else for(let f of I2(a.path))i(a,u,f)}),e}function I2(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let u=I2(r.join("/")),d=[];return d.push(...u.map(f=>f===""?a:[a,f].join("/"))),i&&d.push(...u),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function ZC(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:aR(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var eR=/^:[\w-]+$/,tR=3,nR=2,rR=1,sR=10,iR=-2,o1=t=>t==="*";function oR(t,e){let n=t.split("/"),r=n.length;return n.some(o1)&&(r+=iR),e&&(r+=nR),n.filter(i=>!o1(i)).reduce((i,a)=>i+(eR.test(a)?tR:a===""?rR:sR),r)}function aR(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 lR(t,e,n=!1){let{routesMeta:r}=t,i={},a="/",u=[];for(let d=0;d<r.length;++d){let f=r[d],p=d===r.length-1,w=a==="/"?e:e.slice(a.length)||"/",E=Rh({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},w),T=f.route;
49if(!E&&p&&n&&!r[r.length-1].route.index&&(E=Rh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},w)),!E)return null;Object.assign(i,E.params),u.push({params:i,pathname:Bs([a,E.pathname]),pathnameBase:pR(Bs([a,E.pathnameBase])),route:T}),E.pathnameBase!=="/"&&(a=Bs([a,E.pathnameBase]))}return u}function Rh(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=uR(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let a=i[0],u=a.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:r.reduce((p,{paramName:w,isOptional:E},T)=>{if(w==="*"){let I=d[T]||"";u=a.slice(0,a.length-I.length).replace(/(.)\/+$/,"$1")}const b=d[T];return E&&!b?p[w]=void 0:p[w]=(b||"").replace(/%2F/g,"/"),p},{}),pathname:a,pathnameBase:u,pattern:t}}function uR(t,e=!1,n=!0){Hr(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,(u,d,f)=>(r.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function cR(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Hr(!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 Hi(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 dR(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?cl(t):t;return{pathname:n?n.startsWith("/")?n:hR(n,e):e,search:mR(r),hash:gR(i)}}function hR(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 Om(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 fR(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ry(t){let e=fR(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function sy(t,e,n,r=!1){let i;typeof t=="string"?i=cl(t):(i={...t},xt(!i.pathname||!i.pathname.includes("?"),Om("?","pathname","search",i)),xt(!i.pathname||!i.pathname.includes("#"),Om("#","pathname","hash",i)),xt(!i.search||!i.search.includes("#"),Om("#","search","hash",i)));let a=t===""||i.pathname==="",u=a?"/":i.pathname,d;if(u==null)d=n;else{let E=e.length-1;if(!r&&u.startsWith("..")){let T=u.split("/");for(;T[0]==="..";)T.shift(),E-=1;i.pathname=T.join("/")}d=E>=0?e[E]:"/"}let f=dR(i,d),p=u&&u!=="/"&&u.endsWith("/"),w=(a||u===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||w)&&(f.pathname+="/"),f}var Bs=t=>t.join("/").replace(/\/\/+/g,"/"),pR=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mR=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,gR=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function yR(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var C2=["POST","PUT","PATCH","DELETE"];new Set(C2);var vR=["GET",...C2];new Set(vR);var dl=A.createContext(null);dl.displayName="DataRouter";var af=A.createContext(null);af.displayName="DataRouterState";var R2=A.createContext({isTransitioning:!1});R2.displayName="ViewTransition";var wR=A.createContext(new Map);wR.displayName="Fetchers";var _R=A.createContext(null);_R.displayName="Await";var Gr=A.createContext(null);Gr.displayName="Navigation";var Zu=A.createContext(null);Zu.displayName="Location";var ys=A.createContext({outlet:null,matches:[],isDataRoute:!1});ys.displayName="Route";var iy=A.createContext(null);iy.displayName="RouteError";function ER(t,{relative:e}={}){xt(hl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=A.useContext(Gr),{hash:i,pathname:a,search:u}=ec(t,{relative:e}),d=a;return n!=="/"&&(d=a==="/"?n:Bs([n,a])),r.createHref({pathname:d,search:u,hash:i})}function hl(){return A.useContext(Zu)!=null}function zt(){return xt(hl(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Zu).location}var A2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function k2(t){A.useContext(Gr).static||A.useLayoutEffect(t)}function vs(){let{isDataRoute:t}=A.useContext(ys);return t?DR():SR()}function SR(){xt(hl(),"useNavigate() may be used only in the context of a <Router> component.");let t=A.useContext(dl),{basename:e,navigator:n}=A.useContext(Gr),{matches:r}=A.useContext(ys),{pathname:i}=zt(),a=JSON.stringify(ry(r)),u=A.useRef(!1);return k2(()=>{u.current=!0}),A.useCallback((f,p={})=>
49{if(Hr(u.current,A2),!u.current)return;if(typeof f=="number"){n.go(f);return}let w=sy(f,JSON.parse(a),i,p.relative==="path");t==null&&e!=="/"&&(w.pathname=w.pathname==="/"?e:Bs([e,w.pathname])),(p.replace?n.replace:n.push)(w,p.state,p)},[e,n,a,i,t])}A.createContext(null);function ec(t,{relative:e}={}){let{matches:n}=A.useContext(ys),{pathname:r}=zt(),i=JSON.stringify(ry(n));return A.useMemo(()=>sy(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function TR(t,e){return x2(t,e)}function x2(t,e,n,r){var U;xt(hl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=A.useContext(Gr),{matches:a}=A.useContext(ys),u=a[a.length-1],d=u?u.params:{},f=u?u.pathname:"/",p=u?u.pathnameBase:"/",w=u&&u.route;{let M=w&&w.path||"";P2(f,!w||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
51Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let E=zt(),T;if(e){let M=typeof e=="string"?cl(e):e;xt(p==="/"||((U=M.pathname)==null?void 0:U.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${M.pathname}" was given in the \`location\` prop.`),T=M}else T=E;let b=T.pathname||"/",I=b;if(p!=="/"){let M=p.replace(/^\//,"").split("/");I="/"+b.replace(/^\//,"").split("/").slice(M.length).join("/")}let L=T2(t,{pathname:I});Hr(w||L!=null,`No routes matched location "${T.pathname}${T.search}${T.hash}" `),Hr(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${T.pathname}${T.search}${T.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let V=AR(L&&L.map(M=>Object.assign({},M,{params:Object.assign({},d,M.params),pathname:Bs([p,i.encodeLocation?i.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?p:Bs([p,i.encodeLocation?i.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),a,n,r);return e&&V?A.createElement(Zu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...T},navigationType:"POP"}},V):V}function bR(){let t=LR(),e=yR(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},u=null;return console.error("Error handled by React Router default ErrorBoundary:",t),u=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:a},"ErrorBoundary")," or"," ",A.createElement("code",{style:a},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},e),n?A.createElement("pre",{style:i},n):null,u)}var IR=A.createElement(bR,null),CR=class extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?A.createElement(ys.Provider,{value:this.props.routeContext},A.createElement(iy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RR({routeContext:t,match:e,children:n}){let r=A.useContext(dl);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),A.createElement(ys.Provider,{value:t},n)}function AR(t,e=[],n=null,r=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,a=n==null?void 0:n.errors;if(a!=null){let f=i.findIndex(p=>p.route.id&&(a==null?void 0:a[p.route.id])!==void 0);xt(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let u=!1,d=-1;if(n)for(let f=0;f<i.length;f++){let p=i[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=f),p.route.id){let{loaderData:w,errors:E}
51=n,T=p.route.loader&&!w.hasOwnProperty(p.route.id)&&(!E||E[p.route.id]===void 0);if(p.route.lazy||T){u=!0,d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}return i.reduceRight((f,p,w)=>{let E,T=!1,b=null,I=null;n&&(E=a&&p.route.id?a[p.route.id]:void 0,b=p.route.errorElement||IR,u&&(d<0&&w===0?(P2("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,I=null):d===w&&(T=!0,I=p.route.hydrateFallbackElement||null)));let L=e.concat(i.slice(0,w+1)),V=()=>{let U;return E?U=b:T?U=I:p.route.Component?U=A.createElement(p.route.Component,null):p.route.element?U=p.route.element:U=f,A.createElement(RR,{match:p,routeContext:{outlet:f,matches:L,isDataRoute:n!=null},children:U})};return n&&(p.route.ErrorBoundary||p.route.errorElement||w===0)?A.createElement(CR,{location:n.location,revalidation:n.revalidation,component:b,error:E,children:V(),routeContext:{outlet:null,matches:L,isDataRoute:!0}}):V()},null)}function oy(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function kR(t){let e=A.useContext(dl);return xt(e,oy(t)),e}function xR(t){let e=A.useContext(af);return xt(e,oy(t)),e}function PR(t){let e=A.useContext(ys);return xt(e,oy(t)),e}function ay(t){let e=PR(t),n=e.matches[e.matches.length-1];return xt(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function NR(){return ay("useRouteId")}function LR(){var r;let t=A.useContext(iy),e=xR("useRouteError"),n=ay("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function DR(){let{router:t}=kR("useNavigate"),e=ay("useNavigate"),n=A.useRef(!1);return k2(()=>{n.current=!0}),A.useCallback(async(i,a={})=>{Hr(n.current,A2),n.current&&(typeof i=="number"?t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var a1={};function P2(t,e,n){!e&&!a1[t]&&(a1[t]=!0,Hr(!1,n))}A.memo(OR);function OR({routes:t,future:e,state:n}){return x2(t,void 0,n,e)}function VR({to:t,replace:e,state:n,relative:r}){xt(hl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=A.useContext(Gr);Hr(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=A.useContext(ys),{pathname:u}=zt(),d=vs(),f=sy(t,ry(a),u,r==="path"),p=JSON.stringify(f);return A.useEffect(()=>{d(JSON.parse(p),{replace:e,state:n,relative:r})},[d,p,r,e,n]),null}function $r(t){xt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function MR({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:a=!1}){xt(!hl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),d=A.useMemo(()=>({basename:u,navigator:i,static:a,future:{}}),[u,i,a]);typeof n=="string"&&(n=cl(n));let{pathname:f="/",search:p="",hash:w="",state:E=null,key:T="default"}=n,b=A.useMemo(()=>{let I=Hi(f,u);return I==null?null:{location:{pathname:I,search:p,hash:w,state:E,key:T},navigationType:r}},[u,f,p,w,E,T,r]);return Hr(b!=null,`<Router basename="${u}"> is not able to match the URL "${f}${p}${w}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:A.createElement(Gr.Provider,{value:d},A.createElement(Zu.Provider,{children:e,value:b}))}function jR({children:t,location:e}){return TR(fg(t),e)}function fg(t,e=[]){let n=[];return A.Children.forEach(t,(r,i)=>{if(!A.isValidElement(r))return;let a=[...e,i];if(r.type===A.Fragment){n.push.apply(n,fg(r.props.children,a));return}xt(r.type===$r,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),xt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let u={id:r.props.id||a.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,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,
51shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(u.children=fg(r.props.children,a)),n.push(u)}),n}var fh="get",ph="application/x-www-form-urlencoded";function lf(t){return t!=null&&typeof t.tagName=="string"}function FR(t){return lf(t)&&t.tagName.toLowerCase()==="button"}function UR(t){return lf(t)&&t.tagName.toLowerCase()==="form"}function $R(t){return lf(t)&&t.tagName.toLowerCase()==="input"}function BR(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function zR(t,e){return t.button===0&&(!e||e==="_self")&&!BR(t)}var Wd=null;function HR(){if(Wd===null)try{new FormData(document.createElement("form"),0),Wd=!1}catch{Wd=!0}return Wd}var WR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vm(t){return t!=null&&!WR.has(t)?(Hr(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ph}"`),null):t}function qR(t,e){let n,r,i,a,u;if(UR(t)){let d=t.getAttribute("action");r=d?Hi(d,e):null,n=t.getAttribute("method")||fh,i=Vm(t.getAttribute("enctype"))||ph,a=new FormData(t)}else if(FR(t)||$R(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=t.getAttribute("formaction")||d.getAttribute("action");if(r=f?Hi(f,e):null,n=t.getAttribute("formmethod")||d.getAttribute("method")||fh,i=Vm(t.getAttribute("formenctype"))||Vm(d.getAttribute("enctype"))||ph,a=new FormData(d,t),!HR()){let{name:p,type:w,value:E}=t;if(w==="image"){let T=p?`${p}.`:"";a.append(`${T}x`,"0"),a.append(`${T}y`,"0")}else p&&a.append(p,E)}}else{if(lf(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=fh,r=null,i=ph,u=t}return a&&i==="text/plain"&&(u=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:u}}function ly(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}async function GR(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function KR(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function QR(t,e,n){let r=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let u=await GR(a,n);return u.links?u.links():[]}return[]}));return ZR(r.flat(1).filter(KR).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function l1(t,e,n,r,i,a){let u=(f,p)=>n[p]?f.route.id!==n[p].route.id:!0,d=(f,p)=>{var w;return n[p].pathname!==f.pathname||((w=n[p].route.path)==null?void 0:w.endsWith("*"))&&n[p].params["*"]!==f.params["*"]};return a==="assets"?e.filter((f,p)=>u(f,p)||d(f,p)):a==="data"?e.filter((f,p)=>{var E;let w=r.routes[f.route.id];if(!w||!w.hasLoader)return!1;if(u(f,p)||d(f,p))return!0;if(f.route.shouldRevalidate){let T=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((E=n[0])==null?void 0:E.params)||{},nextUrl:new URL(t,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function YR(t,e){return XR(t.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function XR(t){return[...new Set(t)]}function JR(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function ZR(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let a=JSON.stringify(JR(i));return n.has(a)||(n.add(a),r.push({key:a,link:i})),r},[])}function eA(t){let e=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return e.pathname==="/"?e.pathname="_root.data":e.pathname=`${e.pathname.replace(/\/$/,"")}.data`,e}function tA(){let t=A.useContext(dl);return ly(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function nA(){let t=A.useContext(af);return ly(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var uy=A.createContext(void 0);uy.displayName="FrameworkContext";function N2(){let t=A.useContext(uy);return ly(t,"You must render this element inside a <HydratedRouter> element"),t}function rA(t,e){let n=A.useContext(uy),[r,i]=A.useState(!1),[a,u]=A.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:p,onMouseLeave:w,onTouchStart:E}=e,T=A.useRef(null);A.useEffect(()=>{if(t==="render"&&u(!0),t==="viewport"){let L=U=>
51{U.forEach(M=>{u(M.isIntersecting)})},V=new IntersectionObserver(L,{threshold:.5});return T.current&&V.observe(T.current),()=>{V.disconnect()}}},[t]),A.useEffect(()=>{if(r){let L=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(L)}}},[r]);let b=()=>{i(!0)},I=()=>{i(!1),u(!1)};return n?t!=="intent"?[a,T,{}]:[a,T,{onFocus:fu(d,b),onBlur:fu(f,I),onMouseEnter:fu(p,b),onMouseLeave:fu(w,I),onTouchStart:fu(E,b)}]:[!1,T,{}]}function fu(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function sA({page:t,...e}){let{router:n}=tA(),r=A.useMemo(()=>T2(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?A.createElement(oA,{page:t,matches:r,...e}):null}function iA(t){let{manifest:e,routeModules:n}=N2(),[r,i]=A.useState([]);return A.useEffect(()=>{let a=!1;return QR(t,e,n).then(u=>{a||i(u)}),()=>{a=!0}},[t,e,n]),r}function oA({page:t,matches:e,...n}){let r=zt(),{manifest:i,routeModules:a}=N2(),{loaderData:u,matches:d}=nA(),f=A.useMemo(()=>l1(t,e,d,i,r,"data"),[t,e,d,i,r]),p=A.useMemo(()=>l1(t,e,d,i,r,"assets"),[t,e,d,i,r]),w=A.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let b=new Set,I=!1;if(e.forEach(V=>{var M;let U=i.routes[V.route.id];!U||!U.hasLoader||(!f.some(Q=>Q.route.id===V.route.id)&&V.route.id in u&&((M=a[V.route.id])!=null&&M.shouldRevalidate)||U.hasClientLoader?I=!0:b.add(V.route.id))}),b.size===0)return[];let L=eA(t);return I&&b.size>0&&L.searchParams.set("_routes",e.filter(V=>b.has(V.route.id)).map(V=>V.route.id).join(",")),[L.pathname+L.search]},[u,r,i,f,e,t,a]),E=A.useMemo(()=>YR(p,i),[p,i]),T=iA(p);return A.createElement(A.Fragment,null,w.map(b=>A.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...n})),E.map(b=>A.createElement("link",{key:b,rel:"modulepreload",href:b,...n})),T.map(({key:b,link:I})=>A.createElement("link",{key:b,...I})))}function aA(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var L2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{L2&&(window.__reactRouterVersion="7.1.1")}catch{}function lA({basename:t,children:e,window:n}){let r=A.useRef();r.current==null&&(r.current=QC({window:n,v5Compat:!0}));let i=r.current,[a,u]=A.useState({action:i.action,location:i.location}),d=A.useCallback(f=>{A.startTransition(()=>u(f))},[u]);return A.useLayoutEffect(()=>i.listen(d),[i,d]),A.createElement(MR,{basename:t,children:e,location:a.location,navigationType:a.action,navigator:i})}var D2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cy=A.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:u,state:d,target:f,to:p,preventScrollReset:w,viewTransition:E,...T},b){let{basename:I}=A.useContext(Gr),L=typeof p=="string"&&D2.test(p),V,U=!1;if(typeof p=="string"&&L&&(V=p,L2))try{let x=new URL(window.location.href),k=p.startsWith("//")?new URL(x.protocol+p):new URL(p),F=Hi(k.pathname,I);k.origin===x.origin&&F!=null?p=F+k.search+k.hash:U=!0}catch{Hr(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let M=ER(p,{relative:i}),[Q,te,he]=rA(r,T),ae=dA(p,{replace:u,state:d,target:f,preventScrollReset:w,relative:i,viewTransition:E});function D(x){e&&e(x),x.defaultPrevented||ae(x)}let R=A.createElement("a",{...T,...he,href:V||M,onClick:U||a?e:D,ref:aA(b,te),target:f,"data-discover":!L&&n==="render"?"true":void 0});return Q&&!L?A.createElement(A.Fragment,null,R,A.createElement(sA,{page:M})):R});cy.displayName="Link";var vt=A.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:u,viewTransition:d,children:f,...p},w){let E=ec(u,{relative:p.relative}),T=zt(),b=A.useContext(af),{navigator:I,basename:L}=A.useContext(Gr),V=b!=null&&gA(E)&&d===!0,U=I.encodeLocation?I.encodeLocation(E).pathname:E.pathname,M=T.pathname,Q=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(M=M.toLowerCase(),Q=Q?Q.toLowerCase():null,U=U.toLowerCase()),Q&&L&&(Q=Hi(Q,L)||Q);const te=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let he=M===U||!i&&M.startsWith(U)&&M.charAt(te)==="/",ae=Q!=null&&(Q===U||!i&&Q.startsWith(U)&&Q.charAt(U.length)==="/"),D={isActive:he,isPending:ae,isTransitioning:V},R=he?e:void 0,x;
51typeof r=="function"?x=r(D):x=[r,he?"active":null,ae?"pending":null,V?"transitioning":null].filter(Boolean).join(" ");let k=typeof a=="function"?a(D):a;return A.createElement(cy,{...p,"aria-current":R,className:x,ref:w,style:k,to:u,viewTransition:d},typeof f=="function"?f(D):f)});vt.displayName="NavLink";var uA=A.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:a,method:u=fh,action:d,onSubmit:f,relative:p,preventScrollReset:w,viewTransition:E,...T},b)=>{let I=pA(),L=mA(d,{relative:p}),V=u.toLowerCase()==="get"?"get":"post",U=typeof d=="string"&&D2.test(d),M=Q=>{if(f&&f(Q),Q.defaultPrevented)return;Q.preventDefault();let te=Q.nativeEvent.submitter,he=(te==null?void 0:te.getAttribute("formmethod"))||u;I(te||Q.currentTarget,{fetcherKey:e,method:he,navigate:n,replace:i,state:a,relative:p,preventScrollReset:w,viewTransition:E})};return A.createElement("form",{ref:b,method:V,action:L,onSubmit:r?f:M,...T,"data-discover":!U&&t==="render"?"true":void 0})});uA.displayName="Form";function cA(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function O2(t){let e=A.useContext(dl);return xt(e,cA(t)),e}function dA(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:u}={}){let d=vs(),f=zt(),p=ec(t,{relative:a});return A.useCallback(w=>{if(zR(w,e)){w.preventDefault();let E=n!==void 0?n:Fu(f)===Fu(p);d(t,{replace:E,state:r,preventScrollReset:i,relative:a,viewTransition:u})}},[f,d,p,n,r,e,t,i,a,u])}var hA=0,fA=()=>`__${String(++hA)}__`;function pA(){let{router:t}=O2("useSubmit"),{basename:e}=A.useContext(Gr),n=NR();return A.useCallback(async(r,i={})=>{let{action:a,method:u,encType:d,formData:f,body:p}=qR(r,e);if(i.navigate===!1){let w=i.fetcherKey||fA();await t.fetch(w,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:f,body:p,formMethod:i.method||u,formEncType:i.encType||d,flushSync:i.flushSync})}else await t.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:f,body:p,formMethod:i.method||u,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[t,e,n])}function mA(t,{relative:e}={}){let{basename:n}=A.useContext(Gr),r=A.useContext(ys);xt(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...ec(t||".",{relative:e})},u=zt();if(t==null){a.search=u.search;let d=new URLSearchParams(a.search),f=d.getAll("index");if(f.some(w=>w==="")){d.delete("index"),f.filter(E=>E).forEach(E=>d.append("index",E));let w=d.toString();a.search=w?`?${w}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Bs([n,a.pathname])),Fu(a)}function gA(t,e={}){let n=A.useContext(R2);xt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=O2("useViewTransitionState"),i=ec(t,{relative:e.relative});if(!n.isTransitioning)return!1;let a=Hi(n.currentLocation.pathname,r)||n.currentLocation.pathname,u=Hi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Rh(i.pathname,u)!=null||Rh(i.pathname,a)!=null}new TextEncoder;var yA=S2();const vA=Ju(yA);var V2={};function wA(t){const e=new Error(t);if(e.stack===void 0)try{throw e}catch{}return e}var _A=wA,Ye=_A;function EA(t){return!!t&&typeof t.then=="function"}var It=EA;function SA(t,e){if(t!=null)return t;throw Ye(e??"Got unexpected null or undefined")}var kt=SA;function Qe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class uf{getValue(){throw Ye("BaseLoadable")}toPromise(){throw Ye("BaseLoadable")}valueMaybe(){throw Ye("BaseLoadable")}valueOrThrow(){throw Ye(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw Ye("BaseLoadable")}promiseOrThrow(){throw Ye(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw Ye("BaseLoadable")}errorOrThrow(){throw Ye(`Loadable expected error, but in "${this.state}" state`)}is(e){return e.state===this.state&&e.contents===this.contents}map(e){throw Ye("BaseLoadable")}}class TA extends uf{constructor(e){super(),Qe(this,"state","hasValue"),Qe(this,"contents",void 0),this.contents=e}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(e){try{const n=e(this.contents);return It(n)?jo(n):Qa(n)?n:tc(n)}catch(n){return It(n)?jo(n.next(()=>this.map(e))):cf(n)}}}class bA extends uf{constructor(e){super(),Qe(this,"state","hasError"),Qe(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(e){return this}}class M2 extends uf{constructor(e){super(),Qe(this,"state","loading"),Qe(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(e){return jo(this.contents.then(n=>{const r=e(n);if(Qa(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(It(n))return n.then(()=>this.map(e).contents);throw n}))}}function tc(t){return Object.freeze(new TA(t))}function cf(t){return Object.freeze(new bA(t))}function jo(t){return Object.freeze(new M2(t))}function j2(){return Object.freeze(new M2(new Promise(()=>{})))}function IA(t){return t.every(e=>e.state==="hasValue")?tc(t.map(e=>e.contents)):t.some(e=>e.state==="hasError")?cf(kt(t.find(e=>e.state==="hasError"),"Invalid loadable passed to loadableAll").contents):jo(Promise.all(t.map(e=>e.contents)))}function F2(t){const n=(Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(i=>t[i])).map(i=>Qa(i)?i:It(i)?jo(i):tc(i)),r=IA(n);return Array.isArray(t)?r:r.map(i=>Object.getOwnPropertyNames(t).reduce((a,u,d)=>({...a,[u]:i[d]}),{}))}function Qa(t){return t instanceof uf}const CA={of:t=>It(t)?jo(t):Qa(t)?t:tc(t),error:t=>cf(t),loading:()=>j2(),all:F2,isLoadable:Qa};var Wo={loadableWithValue:tc,loadableWithError:cf,loadableWithPromise:jo,loadableLoading:j2,loadableAll:F2,isLoadable:Qa,RecoilLoadable:CA},RA=Wo.loadableWithValue,AA=Wo.loadableWithError,kA=Wo.loadableWithPromise,xA=Wo.loadableLoading,PA=Wo.loadableAll,NA=Wo.isLoadable,LA=Wo.RecoilLoadable,nc=Object.freeze({__proto__:null,loadableWithValue:RA,loadableWithError:AA,loadableWithPromise:kA,loadableLoading:xA,loadableAll:PA,isLoadable:NA,RecoilLoadable:LA});const pg={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function DA(t,e){var n,r;const i=(n=V2[t])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw Ye(`process.env.${t} value must be 'true', 'false', or empty: ${i}`);e(i==="true")}function OA(t,e){var n;const r=(n=V2[t])===null||n===void 0?void 0:n.trim();r==null||r===""||e(r.split(/\s*,\s*|\s+/))}function VA(){var t;typeof process>"u"||((t=process)===null||t===void 0?void 0:t.env)!=null&&(DA("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",e=>{pg.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=e}),OA("RECOIL_GKS_ENABLED",e=>{e.forEach(n=>{pg.RECOIL_GKS_ENABLED.add(n)})}))}VA();var fl=pg;function df(t){return fl.RECOIL_GKS_ENABLED.has(t)}
vendor: 38,507 bytes, lines 51-53
51df.setPass=t=>{fl.RECOIL_GKS_ENABLED.add(t)};df.setFail=t=>{fl.RECOIL_GKS_ENABLED.delete(t)};df.clear=()=>{fl.RECOIL_GKS_ENABLED.clear()};var wt=df;function MA(t,e,{error:n}={}){return null}var jA=MA,dy=jA,Mm,jm,Fm;const FA=(Mm=Ke.createMutableSource)!==null&&Mm!==void 0?Mm:Ke.unstable_createMutableSource,U2=(jm=Ke.useMutableSource)!==null&&jm!==void 0?jm:Ke.unstable_useMutableSource,$2=(Fm=Ke.useSyncExternalStore)!==null&&Fm!==void 0?Fm:Ke.unstable_useSyncExternalStore;function UA(){var t;const{ReactCurrentDispatcher:e,ReactCurrentOwner:n}=Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((t=e==null?void 0:e.current)!==null&&t!==void 0?t:n.currentDispatcher).useSyncExternalStore!=null}function $A(){return wt("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:wt("recoil_sync_external_store")&&$2!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:wt("recoil_mutable_source")&&U2!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?wt("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:wt("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function BA(){return!1}var rc={createMutableSource:FA,useMutableSource:U2,useSyncExternalStore:$2,currentRendererSupportsUseSyncExternalStore:UA,reactMode:$A,isFastRefreshEnabled:BA};class hy{constructor(e){Qe(this,"key",void 0),this.key=e}toJSON(){return{key:this.key}}}class B2 extends hy{}class z2 extends hy{}function zA(t){return t instanceof B2||t instanceof z2}var hf={AbstractRecoilValue:hy,RecoilState:B2,RecoilValueReadOnly:z2,isRecoilValue:zA},HA=hf.AbstractRecoilValue,WA=hf.RecoilState,qA=hf.RecoilValueReadOnly,GA=hf.isRecoilValue,Ya=Object.freeze({__proto__:null,AbstractRecoilValue:HA,RecoilState:WA,RecoilValueReadOnly:qA,isRecoilValue:GA});function KA(t,e){return function*(){let n=0;for(const r of t)yield e(r,n++)}()}var ff=KA;class H2{}const QA=new H2,Fo=new Map,fy=new Map;function YA(t){return ff(t,e=>kt(fy.get(e)))}function XA(t){if(Fo.has(t)){const e=`Duplicate atom key "${t}". This is a FATAL ERROR in
52      production. But it is safe to ignore this warning if it occurred because of
53      hot module replacement.`;console.warn(e)}}function JA(t){fl.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&XA(t.key),Fo.set(t.key,t);const e=t.set==null?new Ya.RecoilValueReadOnly(t.key):new Ya.RecoilState(t.key);return fy.set(t.key,e),e}class W2 extends Error{}function ZA(t){const e=Fo.get(t);if(e==null)throw new W2(`Missing definition for RecoilValue: "${t}""`);return e}function ek(t){return Fo.get(t)}const Ah=new Map;function tk(t){var e;if(!wt("recoil_memory_managament_2020"))return;const n=Fo.get(t);if(n!=null&&(e=n.shouldDeleteConfigOnRelease)!==null&&e!==void 0&&e.call(n)){var r;Fo.delete(t),(r=q2(t))===null||r===void 0||r(),Ah.delete(t)}}function nk(t,e){wt("recoil_memory_managament_2020")&&(e===void 0?Ah.delete(t):Ah.set(t,e))}function q2(t){return Ah.get(t)}var Xn={nodes:Fo,recoilValues:fy,registerNode:JA,getNode:ZA,getNodeMaybe:ek,deleteNodeConfigIfPossible:tk,setConfigDeletionHandler:nk,getConfigDeletionHandler:q2,recoilValuesForKeys:YA,NodeMissingError:W2,DefaultValue:H2,DEFAULT_VALUE:QA};function rk(t,e){e()}var sk={enqueueExecution:rk};function ik(t,e){return e={exports:{}},t(e,e.exports),e.exports}var ok=ik(function(t){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},n={},r=5,i=Math.pow(2,r),a=i-1,u=i/2,d=i/4,f={},p=function(H){return function(){return H}},w=n.hash=function(G){var H=typeof G>"u"?"undefined":e(G);if(H==="number")return G;H!=="string"&&(G+="");for(var ce=0,we=0,_e=G.length;we<_e;++we){var Se=G.charCodeAt(we);ce=(ce<<5)-ce+Se|0}return ce},E=function(H){return H-=H>>1&1431655765,H=(H&858993459)+(H>>2&858993459),H=H+(H>>4)&252645135,H+=H>>8,H+=H>>16,H&127},T=function(H,ce){return ce>>>H&a},b=function(H){return 1<<H},I=function(H,ce){return E(H&ce-1)},L=function(H,ce,we,_e){var Se=_e;if(!H){var Pe=_e.length;Se=new Array(Pe);for(var Le=0;Le<Pe;++Le)Se[Le]=_e[Le]}return Se[ce]=we,Se},V=function(H,ce,we){var _e=we.length-1,Se=0,Pe=0,Le=we;if(H)Se=Pe=ce;else for(Le=new Array(_e);Se<ce;)Le[Pe++]=we[Se++];for(++Se;Se<=_e;)Le[Pe++]=we[Se++];return H&&(Le.length=_e),Le},U=function(H,ce,we,_e){var Se=_e.length;if(H){for(var Pe=Se;Pe>=ce;)_e[Pe--]=_e[Pe];return _e[ce]=we,_e}for(var Le=0,Oe=0,Ue=new Array(Se+1);Le<ce;)Ue[Oe++]=_e[Le++];for(Ue[ce]=we;Le<Se;)Ue[++Oe]=_e[Le++];return Ue},M=1,Q=2,te=3,he=4,ae={__hamt_isEmpty:!0},D=function(H){return H===ae||H&&H.__hamt_isEmpty},R=function(H,ce,we,_e){return{type:M,edit:H,hash:ce,key:we,value:_e,_modify:re}},x=function(H,ce,we){return{type:Q,edit:H,hash:ce,children:we,_modify:ge}},k=function(H,ce,we){return{type:te,edit:H,mask:ce,children:we,_modify:ee}},F=function(H,ce,we){return{type:he,edit:H,size:ce,children:we,_modify:j}},B=function(H){return H===ae||H.type===M||H.type===Q},P=function(H,ce,we,_e,Se){for(var Pe=[],Le=_e,Oe=0,Ue=0;Le;++Ue)Le&1&&(Pe[Ue]=Se[Oe++]),Le>>>=1;return Pe[ce]=we,F(H,Oe+1,Pe)},le=function(H,ce,we,_e){for(var Se=new Array(ce-1),Pe=0,Le=0,Oe=0,Ue=_e.length;Oe<Ue;++Oe)if(Oe!==we){var dt=_e[Oe];dt&&!D(dt)&&(Se[Pe++]=dt,Le|=1<<Oe)}return k(H,Le,Se)},qe=function G(H,ce,we,_e,Se,Pe){if(we===Se)return x(H,we,[Pe,_e]);var Le=T(ce,we),Oe=T(ce,Se);return k(H,b(Le)|b(Oe),Le===Oe?[G(H,ce+r,we,_e,Se,Pe)]:Le<Oe?[_e,Pe]:[Pe,_e])},Xe=function(H,ce,we,_e,Se,Pe,Le,Oe){for(var Ue=Se.length,dt=0;dt<Ue;++dt){var Dt=Se[dt];if(we(Le,Dt.key)){var Ct=Dt.value,Ot=Pe(Ct);return Ot===Ct?Se:Ot===f?(--Oe.value,V(H,dt,Se)):L(H,dt,R(ce,_e,Le,Ot),Se)}}var hn=Pe();return hn===f?Se:(++Oe.value,L(H,Ue,R(ce,_e,Le,hn),Se))},de=function(H,ce){return H===ce.edit},re=function(H,ce,we,_e,Se,Pe,Le){if(ce(Pe,this.key)){var Oe=_e(this.value);return Oe===this.value?this:Oe===f?(--Le.value,ae):de(H,this)?(this.value=Oe,this):R(H,Se,Pe,Oe)}var Ue=_e();return Ue===f?this:(++Le.value,qe(H,we,this.hash,this,Se,R(H,Se,Pe,Ue)))},ge=function(H,ce,we,_e,Se,Pe,Le){if(Se===this.hash){var Oe=de(H,this),Ue=Xe(Oe,H,ce,this.hash,this.children,_e,Pe,Le);return Ue===this.children?this:Ue.length>1?x(H,this.hash,Ue):Ue[0]}var dt=_e();return dt===f?this:(++Le.value,qe(H,we,this.hash,this,Se,R(H,Se,Pe,dt)))},ee=function(H,ce,we,_e,Se,Pe,Le){var Oe=this.mask,Ue=this.children,dt=T(we,Se),Dt=b(dt),Ct=I(Oe,Dt),Ot=Oe&Dt,hn=Ot?Ue[Ct]:ae,gt=hn._modify(H,ce,we+r,_e,Se,Pe,Le);if(hn===gt)return this;var Cr=de(H,this),fn=Oe,Zn=void 0;if(Ot&&D(gt)){if(fn&=~Dt,!fn)return ae;if(Ue.length<=2&&B(Ue[Ct^1]))return Ue[Ct^1];Zn=V(Cr,Ct,Ue)}else if(!Ot&&!D(gt)){if(Ue.length>=u)return P(H,dt,gt,Oe,Ue);fn|=Dt,Zn=U(Cr,Ct,gt,Ue)}else Zn=L(Cr,Ct,gt,Ue);return Cr?(this.mask=fn,this.children=Zn,this):k(H,fn,Zn)},j=function(H,ce,we,_e,Se,Pe,Le){var Oe=this.size,Ue=this.children,dt=T(we,Se),Dt=Ue[dt],Ct=(Dt||ae)._modify(H,ce,we+r,_e,Se,Pe,Le);if(Dt===Ct)return this;var Ot=de(H,this),hn=void 0;if(D(Dt)&&!D(Ct))++Oe,hn=L(Ot,dt,Ct,Ue);else if(!D(Dt)&&D(Ct)){if(--Oe,Oe<=d)return le(H,Oe,dt,Ue);hn=L(Ot,dt,ae,Ue)}else hn=L(Ot,dt,Ct,Ue);return Ot?(this.size=Oe,this.children=hn,this):F(H,Oe,hn)};ae._modify=function(G,H,ce,we,_e,Se,Pe){var Le=we();return Le===f?ae:(++Pe.value,R(G,_e,Se,Le))};function N(G,H,ce,we,_e){this._editable=G,this._edit=H,this._config=ce,this._root=we,this._size=_e}N.prototype.setTree=function(G,H){return this._editable?(this._root=G,this._size=H,this):G===this._root?this:new N(this._editable,this._edit,this._config,G,H)};var X=n.tryGetHash=function(G,H,ce,we){for(var _e=we._root,Se=0,Pe=we._config.keyEq;;)switch(_e.type){case M:return Pe(ce,_e.key)?_e.value:G;case Q:{if(H===_e.hash)for(var Le=_e.children,Oe=0,Ue=Le.length;Oe<Ue;++Oe){var dt=Le[Oe];if(Pe(ce,dt.key))return dt.value}return G}case te:{var Dt=T(Se,H),Ct=b(Dt);if(_e.mask&Ct){_e=_e.children[I(_e.mask,Ct)],Se+=r;break}return G}case he:{if(_e=_e.children[T(Se,H)],_e){Se+=r;break}return G}default:return G}};N.prototype.tryGetHash=function(G,H,ce){return X(G,H,ce,this)};var ne=n.tryGet=function(G,H,ce){return X(G,ce._config.hash(H),H,ce)};N.prototype.tryGet=function(G,H){return ne(G,H,this)};var ye=n.getHash=function(G,H,ce){return X(void 0,G,H,ce)};N.prototype.getHash=function(G,H){return ye(G,H,this)},n.get=function(G,H){return X(void 0,H._config.hash(G),G,H)},N.prototype.get=function(G,H){return ne(H,G,this)};var pe=n.has=function(G,H,ce){return X(f,G,H,ce)!==f};N.prototype.hasHash=function(G,H){return pe(G,H,this)};var Ie=n.has=function(G,H){return pe(H._config.hash(G),G,H)};N.prototype.has=function(G){return Ie(G,this)};var be=function(H,ce){return H===ce};n.make=function(G){return new N(0,0,{keyEq:G&&G.keyEq||be,hash:G&&G.hash||w},ae,0)},n.empty=n.make();var Ee=n.isEmpty=function(G){return G&&!!D(G._root)};N.prototype.isEmpty=function(){return Ee(this)};var Ge=n.modifyHash=function(G,H,ce,we){var _e={value:we._size},Se=we._root._modify(we._editable?we._edit:NaN,we._config.keyEq,0,G,H,ce,_e);return we.setTree(Se,_e.value)};N.prototype.modifyHash=function(G,H,ce){return Ge(ce,G,H,this)};var ft=n.modify=function(G,H,ce){return Ge(G,ce._config.hash(H),H,ce)};N.prototype.modify=function(G,H){return ft(H,G,this)};var tt=n.setHash=function(G,H,ce,we){return Ge(p(ce),G,H,we)};N.prototype.setHash=function(G,H,ce){return tt(G,H,ce,this)};var at=n.set=function(G,H,ce){return tt(ce._config.hash(G),G,H,ce)};N.prototype.set=function(G,H){return at(G,H,this)};var Yt=p(f),Mn=n.removeHash=function(G,H,ce){return Ge(Yt,G,H,ce)};N.prototype.removeHash=N.prototype.deleteHash=function(G,H){return Mn(G,H,this)};var rn=n.remove=function(G,H){return Mn(H._config.hash(G),G,H)};N.prototype.remove=N.prototype.delete=function(G){return rn(G,this)};var Xt=n.beginMutation=function(G){return new N(G._editable+1,G._edit+1,G._config,G._root,G._size)};N.prototype.beginMutation=function(){return Xt(this)};var ro=n.endMutation=function(G){return G._editable=G._editable&&G._editable-1,G};N.prototype.endMutation=function(){return ro(this)};var ni=n.mutate=function(G,H){var ce=Xt(H);return G(ce),ro(ce)};N.prototype.mutate=function(G){return ni(G,this)};var Jn=function(H){return H&&hr(H[0],H[1],H[2],H[3],H[4])},hr=function(H,ce,we,_e,Se){for(;we<H;){var Pe=ce[we++];if(Pe&&!D(Pe))return ri(Pe,_e,[H,ce,we,_e,Se])}return Jn(Se)},ri=function(H,ce,we){switch(H.type){case M:return{value:ce(H),rest:we};case Q:case he:case te:var _e=H.children;return hr(_e.length,_e,0,ce,we);default:return Jn(we)}},si={done:!0};function Qr(G){this.v=G}Qr.prototype.next=function(){if(!this.v)return si;var G=this.v;return this.v=Jn(G.rest),G},Qr.prototype[Symbol.iterator]=function(){return this};var Ts=function(H,ce){return new Qr(ri(H._root,ce))},Mt=function(H){return[H.key,H.value]},jt=n.entries=function(G){return Ts(G,Mt)};N.prototype.entries=N.prototype[Symbol.iterator]=function(){return jt(this)};var Ir=function(H){return H.key},so=n.keys=function(G){return Ts(G,Ir)};N.prototype.keys=function(){return so(this)};var Yr=function(H){return H.value},bs=n.values=N.prototype.values=function(G){return Ts(G,Yr)};N.prototype.values=function(){return bs(this)};var Xr=n.fold=function(G,H,ce){var we=ce._root;if(we.type===M)return G(H,we.value,we.key);for(var _e=[we.children],Se=void 0;Se=_e.pop();)for(var Pe=0,Le=Se.length;Pe<Le;){var Oe=Se[Pe++];Oe&&Oe.type&&(Oe.type===M?H=G(H,Oe.value,Oe.key):_e.push(Oe.children))}return H};N.prototype.fold=function(G,H){return Xr(G,H,this)};var io=n.forEach=function(G,H){return Xr(function(ce,we,_e){return G(we,_e,H)},null,H)};N.prototype.forEach=function(G){return io(G,this)};var oo=n.count=function(G){return G._size};N.prototype.count=function(){return oo(this)},Object.defineProperty(N.prototype,"size",{get:N.prototype.count}),t.exports?t.exports=n:(void 0).hamt=n});class ak{constructor(e){Qe(this,"_map",void 0),this._map=new Map(e==null?void 0:e.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(e){return this._map.get(e)}has(e){return this._map.has(e)}set(e,n){return this._map.set(e,n),this}delete(e){return this._map.delete(e),this}clone(){return my(this)}toMap(){return new Map(this._map)}}class py{constructor(e){if(Qe(this,"_hamt",ok.empty.beginMutation()),e instanceof py){const n=e._hamt.endMutation();e._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(e)for(const[n,r]of e.entries())this._hamt.set(n,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(e){return this._hamt.get(e)}has(e){return this._hamt.has(e)}set(e,n){return this._hamt.set(e,n),this}delete(e){return this._hamt.delete(e),this}clone(){return my(this)}toMap(){return new Map(this._hamt)}}function my(t){return wt("recoil_hamt_2020")?new py(t):new ak(t)}var lk={persistentMap:my},uk=lk.persistentMap,ck=Object.freeze({__proto__:null,persistentMap:uk});function dk(t,...e){const n=new Set;e:for(const r of t){for(const i of e)if(i.has(r))continue e;n.add(r)}return n}var xu=dk;function hk(t,e){const n=new Map;return t.forEach((r,i)=>{n.set(i,e(r,i))}),n}var kh=hk;function fk(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function pk(t){return{nodeDeps:kh(t.nodeDeps,e=>new Set(e)),nodeToNodeSubscriptions:kh(t.nodeToNodeSubscriptions,e=>new Set(e))}}function Um(t,e,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:a}=n,u=i.get(t);if(u&&r&&u!==r.nodeDeps.get(t))return;i.set(t,e);const d=u==null?e:xu(e,u);for(const f of d)a.has(f)||a.set(f,new Set),kt(a.get(f)).add(t);if(u){const f=xu(u,e);for(const p of f){if(!a.has(p))return;const w=kt(a.get(p));w.delete(t),w.size===0&&a.delete(p)}}}function mk(t,e,n,r){var i,a,u,d;const f=n.getState();r===f.currentTree.version||r===((i=f.nextTree)===null||i===void 0?void 0:i.version)||((a=f.previousTree)===null||a===void 0||a.version);const p=n.getGraph(r);if(Um(t,e,p),r===((u=f.previousTree)===null||u===void 0?void 0:u.version)){const E=n.getGraph(f.currentTree.version);Um(t,e,E,p)}if(r===((d=f.previousTree)===null||d===void 0?void 0:d.version)||r===f.currentTree.version){var w;const E=(w=f.nextTree)===null||w===void 0?void 0:w.version;if(E!==void 0){const T=n.getGraph(E);Um(t,e,T,p)}}}var sc={cloneGraph:pk,graph:fk,saveDepsToStore:mk};let gk=0;const yk=()=>gk++;let vk=0;const wk=()=>vk++;let _k=0;const Ek=()=>_k++;var pf={getNextTreeStateVersion:yk,getNextStoreID:wk,getNextComponentID:Ek};const{persistentMap:u1}=ck,{graph:Sk}=sc,{getNextTreeStateVersion:G2}=pf;function K2(){const t=G2();return{version:t,stateID:t,transactionMetadata:{},dirtyAtoms:new Set,atomValues:u1(),nonvalidatedAtoms:u1()}}function Tk(){const t=K2();return{currentTree:t,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(t.version,Sk()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var Q2={makeEmptyTreeState:K2,makeEmptyStoreState:Tk,getNextTreeStateVersion:G2};class Y2{}function bk(){return new Y2}var mf={RetentionZone:Y2,retentionZone:bk};function Ik(t,e){const n=new Set(t);return n.add(e),n}function Ck(t,e){const n=new Set(t);return n.delete(e),n}function Rk(t,e,n){const r=new Map(t);return r.set(e,n),r}function Ak(t,e,n){const r=new Map(t);return r.set(e,n(r.get(e))),r}function kk(t,e){const n=new Map(t);return n.delete(e),n}function xk(t,e){const n=new Map(t);return e.forEach(r=>n.delete(r)),n}var X2={setByAddingToSet:Ik,setByDeletingFromSet:Ck,mapBySettingInMap:Rk,mapByUpdatingInMap:Ak,mapByDeletingFromMap:kk,mapByDeletingMultipleFromMap:xk};function*Pk(t,e){let n=0;for(const r of t)e(r,n++)&&(yield r)}var gy=Pk;function Nk(t,e){return new Proxy(t,{get:(r,i)=>(!(i in r)&&i in e&&(r[i]=e[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var J2=Nk;const{getNode:ic,getNodeMaybe:Lk,recoilValuesForKeys:c1}=Xn,{RetentionZone:d1}=mf,{setByAddingToSet:Dk}=X2,Ok=Object.freeze(new Set);class Vk extends Error{}function Mk(t,e,n){if(!wt("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=t.getState().retention;function i(a){let u=r.get(a);u||r.set(a,u=new Set),u.add(e)}if(n instanceof d1)i(n);else if(Array.isArray(n))for(const a of n)i(a);return()=>{if(!wt("recoil_memory_managament_2020"))return;const{retention:a}=t.getState();function u(d){const f=a.nodesRetainedByZone.get(d);f==null||f.delete(e),f&&f.size===0&&a.nodesRetainedByZone.delete(d)}if(n instanceof d1)u(n);else if(Array.isArray(n))for(const d of n)u(d)}}function yy(t,e,n,r){const i=t.getState();if(i.nodeCleanupFunctions.has(n))return;const a=ic(n),u=Mk(t,n,a.retainedBy),d=a.init(t,e,r);i.nodeCleanupFunctions.set(n,()=>{d(),u()})}function jk(t,e,n){yy(t,t.getState().currentTree,e,n)}function Fk(t,e){var n;const r=t.getState();(n=r.nodeCleanupFunctions.get(e))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(e)}function Uk(t,e,n){return yy(t,e,n,"get"),ic(n).get(t,e)}function Z2(t,e,n){return ic(n).peek(t,e)}function $k(t,e,n){var r;const i=Lk(e);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,t),{...t,atomValues:t.atomValues.clone().delete(e),nonvalidatedAtoms:t.nonvalidatedAtoms.clone().set(e,n),dirtyAtoms:Dk(t.dirtyAtoms,e)}}function Bk(t,e,n,r){const i=ic(n);if(i.set==null)throw new Vk(`Attempt to set read-only RecoilValue: ${n}`);const a=i.set;return yy(t,e,n,"set"),a(t,e,r)}function zk(t,e,n){const r=t.getState(),i=t.getGraph(e.version),a=ic(n).nodeType;return J2({type:a},{loadable:()=>Z2(t,e,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>a==="selector"?!1:e.atomValues.has(n),isModified:()=>e.dirtyAtoms.has(n),deps:()=>{var u;return c1((u=i.nodeDeps.get(n))!==null&&u!==void 0?u:[])},subscribers:()=>{var u,d;return{nodes:c1(gy(e0(t,e,new Set([n])),f=>f!==n)),components:ff((u=(d=r.nodeToComponentSubscriptions.get(n))===null||d===void 0?void 0:d.values())!==null&&u!==void 0?u:[],([f])=>({name:f}))}}})}function e0(t,e,n){const r=new Set,i=Array.from(n),a=t.getGraph(e.version);for(let d=i.pop();d;d=i.pop()){var u;r.add(d);const f=(u=a.nodeToNodeSubscriptions.get(d))!==null&&u!==void 0?u:Ok;for(const p of f)r.has(p)||i.push(p)}return r}var Xi={getNodeLoadable:Uk,peekNodeLoadable:Z2,setNodeValue:Bk,initializeNode:jk,cleanUpNode:Fk,setUnvalidatedAtomValue_DEPRECATED:$k,peekNodeInfo:zk,getDownstreamNodes:e0};let t0=null;function Hk(t){t0=t}function Wk(){var t;(t=t0)===null||t===void 0||t()}var n0={setInvalidateMemoizedSnapshot:Hk,invalidateMemoizedSnapshot:Wk};const{getDownstreamNodes:qk,getNodeLoadable:r0,setNodeValue:Gk}=Xi,{getNextComponentID:Kk}=pf,{getNode:Qk,getNodeMaybe:s0}=Xn,{DefaultValue:vy}=Xn,{reactMode:Yk}=rc,{AbstractRecoilValue:Xk,RecoilState:Jk,RecoilValueReadOnly:Zk,isRecoilValue:ex}=Ya,{invalidateMemoizedSnapshot:tx}=n0;function nx(t,{key:e},n=t.getState().currentTree){var r,i;const a=t.getState();n.version===a.currentTree.version||n.version===((r=a.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(i=a.previousTree)===null||i===void 0||i.version);const u=r0(t,n,e);return u.state==="loading"&&u.contents.catch(()=>{}),u}function rx(t,e){const n=t.clone();return e.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof vy?n.delete(i):n.set(i,r)}),n}function sx(t,e,{key:n},r){if(typeof r=="function"){const i=r0(t,e,n);if(i.state==="loading"){const a=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw Ye(a)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function ix(t,e,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:a}=n,u=sx(t,e,i,a),d=Gk(t,e,i.key,u);for(const[f,p]of d.entries())mg(e,f,p)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:a}=n;mg(e,i,a)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;e.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:a}=n,u=s0(i);u==null||(r=u.invalidate)===null||r===void 0||r.call(u,e),e.atomValues.delete(i),e.nonvalidatedAtoms.set(i,a),e.dirtyAtoms.add(i)}else dy(`Unknown action ${n.type}`)}function mg(t,e,n){n.state==="hasValue"&&n.contents instanceof vy?t.atomValues.delete(e):t.atomValues.set(e,n),t.dirtyAtoms.add(e),t.nonvalidatedAtoms.delete(e)}function i0(t,e){t.replaceState(n=>{const r=o0(n);for(const i of e)ix(t,r,i);return a0(t,r),tx(),r})}function gf(t,e){if(Pu.length){const n=Pu[Pu.length-1];let r=n.get(t);r||n.set(t,r=[]),r.push(e)}else i0(t,[e])}const Pu=[];function ox(){const t=new Map;return Pu.push(t),()=>{for(const[e,n]of t)i0(e,n);Pu.pop()}}function o0(t){return{...t,atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(t.dirtyAtoms)}}function a0(t,e){const n=qk(t,e,e.dirtyAtoms);for(const a of n){var r,i;(r=s0(a))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,e)}}function l0(t,e,n){gf(t,{type:"set",recoilValue:e,valueOrUpdater:n})}function ax(t,e,n){if(n instanceof vy)return l0(t,e,n);gf(t,{type:"setLoadable",recoilValue:e,loadable:n})}function lx(t,e){gf(t,{type:"markModified",recoilValue:e})}function ux(t,e,n){gf(t,{type:"setUnvalidated",recoilValue:e,unvalidatedValue:n})}function cx(t,{key:e},n,r=null){const i=Kk(),a=t.getState();a.nodeToComponentSubscriptions.has(e)||a.nodeToComponentSubscriptions.set(e,new Map),kt(a.nodeToComponentSubscriptions.get(e)).set(i,[r??"<not captured>",n]);const u=Yk();if(u.early&&(u.mode==="LEGACY"||u.mode==="MUTABLE_SOURCE")){const d=t.getState().nextTree;d&&d.dirtyAtoms.has(e)&&n(d)}return{release:()=>{const d=t.getState(),f=d.nodeToComponentSubscriptions.get(e);f===void 0||!f.has(i)||(f.delete(i),f.size===0&&d.nodeToComponentSubscriptions.delete(e))}}}function dx(t,e){var n;const{currentTree:r}=t.getState(),i=Qk(e.key);(n=i.clearCache)===null||n===void 0||n.call(i,t,r)}var ws={RecoilValueReadOnly:Zk,AbstractRecoilValue:Xk,RecoilState:Jk,getRecoilValueAsLoadable:nx,setRecoilValue:l0,setRecoilValueLoadable:ax,markRecoilValueModified:lx,setUnvalidatedRecoilValue:ux,subscribeToRecoilValue:cx,isRecoilValue:ex,applyAtomValueWrites:rx,batchStart:ox,writeLoadableToTreeState:mg,invalidateDownstreams:a0,copyTreeState:o0,refreshRecoilValue:dx};function hx(t,e,n){const r=t.entries();let i=r.next();for(;!i.done;){const a=i.value;if(e.call(n,a[1],a[0],t))return!0;i=r.next()}return!1}var fx=hx;const{cleanUpNode:px}=Xi,{deleteNodeConfigIfPossible:mx,getNode:u0}=Xn,{RetentionZone:c0}=mf,gx=12e4,d0=new Set;function h0(t,e){const n=t.getState(),r=n.currentTree;if(n.nextTree)return;const i=new Set;for(const u of e)if(u instanceof c0)for(const d of _x(n,u))i.add(d);else i.add(u);const a=yx(t,i);for(const u of a)wx(t,r,u)}function yx(t,e){const n=t.getState(),r=n.currentTree,i=t.getGraph(r.version),a=new Set,u=new Set;return d(e),a;function d(f){const p=new Set,w=vx(t,r,f,a,u);for(const I of w){var E;if(u0(I).retainedBy==="recoilRoot"){u.add(I);continue}if(((E=n.retention.referenceCounts.get(I))!==null&&E!==void 0?E:0)>0){u.add(I);continue}if(f0(I).some(V=>n.retention.referenceCounts.get(V))){u.add(I);continue}const L=i.nodeToNodeSubscriptions.get(I);if(L&&fx(L,V=>u.has(V))){u.add(I);continue}a.add(I),p.add(I)}const T=new Set;for(const I of p)for(const L of(b=i.nodeDeps.get(I))!==null&&b!==void 0?b:d0){var b;a.has(L)||T.add(L)}T.size&&d(T)}}function vx(t,e,n,r,i){const a=t.getGraph(e.version),u=[],d=new Set;for(;n.size>0;)f(kt(n.values().next().value));return u;function f(p){if(r.has(p)||i.has(p)){n.delete(p);return}if(d.has(p))return;const w=a.nodeToNodeSubscriptions.get(p);if(w)for(const E of w)f(E);d.add(p),n.delete(p),u.push(p)}}function wx(t,e,n){if(!wt("recoil_memory_managament_2020"))return;px(t,n);const r=t.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=f0(n);for(const f of i){var a;(a=r.retention.nodesRetainedByZone.get(f))===null||a===void 0||a.delete(n)}e.atomValues.delete(n),e.dirtyAtoms.delete(n),e.nonvalidatedAtoms.delete(n);const u=r.graphsByVersion.get(e.version);if(u){const f=u.nodeDeps.get(n);if(f!==void 0){u.nodeDeps.delete(n);for(const p of f){var d;(d=u.nodeToNodeSubscriptions.get(p))===null||d===void 0||d.delete(n)}}u.nodeToNodeSubscriptions.delete(n)}mx(n)}function _x(t,e){var n;return(n=t.retention.nodesRetainedByZone.get(e))!==null&&n!==void 0?n:d0}function f0(t){const e=u0(t).retainedBy;return e===void 0||e==="components"||e==="recoilRoot"?[]:e instanceof c0?[e]:e}function Ex(t,e){const n=t.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(e):h0(t,new Set([e]))}function Sx(t,e,n){var r;if(!wt("recoil_memory_managament_2020"))return;const i=t.getState().retention.referenceCounts,a=((r=i.get(e))!==null&&r!==void 0?r:0)+n;a===0?p0(t,e):i.set(e,a)}function p0(t,e){if(!wt("recoil_memory_managament_2020"))return;t.getState().retention.referenceCounts.delete(e),Ex(t,e)}function Tx(t){if(!wt("recoil_memory_managament_2020"))return;const e=t.getState();h0(t,e.retention.retainablesToCheckForRelease),e.retention.retainablesToCheckForRelease.clear()}function bx(t){return t===void 0?"recoilRoot":t}var qo={SUSPENSE_TIMEOUT_MS:gx,updateRetainCount:Sx,updateRetainCountToZero:p0,releaseScheduledRetainablesNow:Tx,retainedByOptionWithDefault:bx};const{unstable_batchedUpdates:Ix}=vA;var Cx={unstable_batchedUpdates:Ix};const{unstable_batchedUpdates:Rx}=Cx;var Ax={unstable_batchedUpdates:Rx};const{batchStart:kx}=ws,{unstable_batchedUpdates:xx}=Ax;let wy=xx||(t=>t());const Px=t=>{wy=t},Nx=()=>wy,Lx=t=>{wy(()=>{let e=()=>{};try{e=kx(),t()}finally{e()}})};var yf={getBatcher:Nx,setBatcher:Px,batchUpdates:Lx};function*Dx(t){for(const e of t)for(const n of e)yield n}var m0=Dx;const g0=typeof Window>"u"||typeof window>"u",Ox=t=>!g0&&(t===window||t instanceof Window),Vx=typeof navigator<"u"&&navigator.product==="ReactNative";var vf={isSSR:g0,isReactNative:Vx,isWindow:Ox};function Mx(t,e){let n;return(...r)=>{n||(n={});const i=e(...r);return Object.hasOwnProperty.call(n,i)||(n[i]=t(...r)),n[i]}}function jx(t,e){let n,r;return(...i)=>{const a=e(...i);return n===a||(n=a,r=t(...i)),r}}function Fx(t,e){let n,r;return[(...u)=>{const d=e(...u);return n===d||(n=d,r=t(...u)),r},()=>{n=null}]}var Ux={memoizeWithArgsHash:Mx,memoizeOneWithArgsHash:jx,memoizeOneWithArgsHashAndInvalidation:Fx};const{batchUpdates:gg}=yf,{initializeNode:$x,peekNodeInfo:Bx}=Xi,{graph:zx}=sc,{getNextStoreID:Hx}=pf,{DEFAULT_VALUE:Wx,recoilValues:h1,recoilValuesForKeys:f1}=Xn,{AbstractRecoilValue:qx,getRecoilValueAsLoadable:Gx,setRecoilValue:p1,setUnvalidatedRecoilValue:Kx}=ws,{updateRetainCount:mh}=qo,{setInvalidateMemoizedSnapshot:Qx}=n0,{getNextTreeStateVersion:Yx,makeEmptyStoreState:Xx}=Q2,{isSSR:Jx}=vf,{memoizeOneWithArgsHashAndInvalidation:Zx}=Ux;class wf{constructor(e,n){Qe(this,"_store",void 0),Qe(this,"_refCount",1),Qe(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),Gx(this._store,r))),Qe(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),Qe(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const u=this._store.getState().currentTree;return f1(u.dirtyAtoms)}const i=this._store.getState().knownAtoms,a=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?h1.values():r.isInitialized===!0?f1(m0([i,a])):gy(h1.values(),({key:u})=>!i.has(u)&&!a.has(u))}),Qe(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),Bx(this._store,this._store.getState().currentTree,r))),Qe(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new yg(this,gg);return r(i),i}),Qe(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new yg(this,gg);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:Hx(),parentStoreID:n,getState:()=>e,replaceState:r=>{e.currentTree=r(e.currentTree)},getGraph:r=>{const i=e.graphsByVersion;if(i.has(r))return kt(i.get(r));const a=zx();return i.set(r,a),a},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ye("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)$x(this._store,r,"get"),mh(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){Jx||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(e=>e()),this._store.getState().nodeCleanupFunctions.clear(),!wt("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){wt("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function y0(t,e,n=!1){const r=t.getState(),i=n?Yx():e.version;return{currentTree:{version:n?i:e.version,stateID:n?i:e.stateID,transactionMetadata:{...e.transactionMetadata},dirtyAtoms:new Set(e.dirtyAtoms),atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,t.getGraph(e.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(ff(r.nodeCleanupFunctions.entries(),([a])=>[a,()=>{}]))}}function eP(t){const e=new wf(Xx());return t!=null?e.map(t):e}const[m1,v0]=Zx((t,e)=>{var n;const r=t.getState(),i=e==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:kt(r.previousTree);return new wf(y0(t,i),t.storeID)},(t,e)=>{var n,r;return String(e)+String(t.storeID)+String((n=t.getState().nextTree)===null||n===void 0?void 0:n.version)+String(t.getState().currentTree.version)+String((r=t.getState().previousTree)===null||r===void 0?void 0:r.version)});Qx(v0);function tP(t,e="latest"){const n=m1(t,e);return n.isRetained()?n:(v0(),m1(t,e))}class yg extends wf{constructor(e,n){super(y0(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID()),Qe(this,"_batch",void 0),Qe(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const a=this.getStore_INTERNAL();this._batch(()=>{mh(a,r.key,1),p1(this.getStore_INTERNAL(),r,i)})}),Qe(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{mh(i,r.key,1),p1(this.getStore_INTERNAL(),r,Wx)})}),Qe(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();gg(()=>{for(const[a,u]of r.entries())mh(i,a,1),Kx(i,new qx(a),u)})}),this._batch=n}}var _f={Snapshot:wf,MutableSnapshot:yg,freshSnapshot:eP,cloneSnapshot:tP},nP=_f.Snapshot,rP=_f.MutableSnapshot,sP=_f.freshSnapshot,iP=_f.cloneSnapshot,Ef=Object.freeze({__proto__:null,Snapshot:nP,MutableSnapshot:rP,freshSnapshot:sP,cloneSnapshot:iP});function oP(...t){const e=new Set;for(const n of t)for(const r of n)e.add(r);return e}var aP=oP;const{useRef:lP}=Ke;function uP(t){const e=lP(t);return e.current===t&&typeof t=="function"&&(e.current=t()),e}var g1=uP;const{getNextTreeStateVersion:cP,makeEmptyStoreState:w0}=Q2,{cleanUpNode:dP,getDownstreamNodes:hP,initializeNode:fP,setNodeValue:pP,setUnvalidatedAtomValue_DEPRECATED:mP}=Xi,{graph:gP}=sc,{cloneGraph:yP}=sc,{getNextStoreID:_0}=pf,{createMutableSource:$m,reactMode:E0}=rc,{applyAtomValueWrites:vP}=ws,{releaseScheduledRetainablesNow:S0}=qo,{freshSnapshot:wP}=Ef,{useCallback:_P,useContext:T0,useEffect:vg,useMemo:EP,useRef:SP,useState:TP}=Ke;function pu(){throw Ye("This component must be used inside a <RecoilRoot> component.")}const b0=Object.freeze({storeID:_0(),getState:pu,replaceState:pu,getGraph:pu,subscribeToTransactions:pu,addTransactionMetadata:pu});let wg=!1;function y1(t){if(wg)throw Ye("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const e=t.getState();if(e.nextTree===null){wt("recoil_memory_managament_2020")&&wt("recoil_release_on_cascading_update_killswitch_2021")&&e.commitDepth>0&&S0(t);const n=e.currentTree.version,r=cP();e.nextTree={...e.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},e.graphsByVersion.set(r,yP(kt(e.graphsByVersion.get(n))))}}const I0=Ke.createContext({current:b0}),Sf=()=>T0(I0),C0=Ke.createContext(null);function bP(){return T0(C0)}function _y(t,e,n){const r=hP(t,n,n.dirtyAtoms);for(const i of r){const a=e.nodeToComponentSubscriptions.get(i);if(a)for(const[u,[d,f]]of a)f(n)}}function R0(t){const e=t.getState(),n=e.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,a]of e.nodeTransactionSubscriptions)if(r.has(i))for(const[u,d]of a)d(t);for(const[i,a]of e.transactionSubscriptions)a(t);(!E0().early||e.suspendedComponentResolvers.size>0)&&(_y(t,e,n),e.suspendedComponentResolvers.forEach(i=>i()),e.suspendedComponentResolvers.clear())}e.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),e.queuedComponentCallbacks_DEPRECATED.splice(0,e.queuedComponentCallbacks_DEPRECATED.length)}function IP(t){const e=t.getState();e.commitDepth++;try{const{nextTree:n}=e;if(n==null)return;e.previousTree=e.currentTree,e.currentTree=n,e.nextTree=null,R0(t),e.previousTree!=null?e.graphsByVersion.delete(e.previousTree.version):dy("Ended batch with no previous state, which is unexpected","recoil"),e.previousTree=null,wt("recoil_memory_managament_2020")&&n==null&&S0(t)}finally{e.commitDepth--}}function CP({setNotifyBatcherOfChange:t}){const e=Sf(),[,n]=TP([]);return t(()=>n({})),vg(()=>(t(()=>n({})),()=>{t(()=>{})}),[t]),vg(()=>{sk.enqueueExecution("Batcher",()=>{IP(e.current)})}),null}function RP(t,e){const n=w0();return e({set:(r,i)=>{const a=n.currentTree,u=pP(t,a,r.key,i),d=new Set(u.keys()),f=a.nonvalidatedAtoms.clone();for(const p of d)f.delete(p);n.currentTree={...a,dirtyAtoms:aP(a.dirtyAtoms,d),atomValues:vP(a.atomValues,u),nonvalidatedAtoms:f}},setUnvalidatedAtomValues:r=>{r.forEach((i,a)=>{n.currentTree=mP(n.currentTree,a,i)})}}),n}function AP(t){const e=wP(t),n=e.getStore_INTERNAL().getState();return e.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let v1=0;function kP({initializeState_DEPRECATED:t,initializeState:e,store_INTERNAL:n,children:r}){let i;const a=b=>{const I=i.current.graphsByVersion;if(I.has(b))return kt(I.get(b));const L=gP();return I.set(b,L),L},u=(b,I)=>{if(I==null){const{transactionSubscriptions:L}=E.current.getState(),V=v1++;return L.set(V,b),{release:()=>{L.delete(V)}}}else{const{nodeTransactionSubscriptions:L}=E.current.getState();L.has(I)||L.set(I,new Map);const V=v1++;return kt(L.get(I)).set(V,b),{release:()=>{const U=L.get(I);U&&(U.delete(V),U.size===0&&L.delete(I))}}}},d=b=>{y1(E.current);for(const I of Object.keys(b))kt(E.current.getState().nextTree).transactionMetadata[I]=b[I]},f=b=>{y1(E.current);const I=kt(i.current.nextTree);let L;try{wg=!0,L=b(I)}finally{wg=!1}L!==I&&(i.current.nextTree=L,E0().early&&_y(E.current,i.current,L),kt(p.current)())},p=SP(null),w=_P(b=>{p.current=b},[p]),E=g1(()=>n??{storeID:_0(),getState:()=>i.current,replaceState:f,getGraph:a,subscribeToTransactions:u,addTransactionMetadata:d});n!=null&&(E.current=n),i=g1(()=>t!=null?RP(E.current,t):e!=null?AP(e):w0());const T=EP(()=>$m==null?void 0:$m(i,()=>i.current.currentTree.version),[i]);return vg(()=>{const b=E.current;for(const I of new Set(b.getState().knownAtoms))fP(b,I,"get");return()=>{for(const I of b.getState().knownAtoms)dP(b,I)}},[E]),Ke.createElement(I0.Provider,{value:E},Ke.createElement(C0.Provider,{value:T},Ke.createElement(CP,{setNotifyBatcherOfChange:w}),r))}function xP(t){const{override:e,...n}=t,r=Sf();return e===!1&&r.current!==b0?t.children:Ke.createElement(kP,n)}function PP(){return Sf().current.storeID}var Xs={RecoilRoot:xP,useStoreRef:Sf,useRecoilMutableSource:bP,useRecoilStoreID:PP,notifyComponents_FOR_TESTING:_y,sendEndOfBatchNotifications_FOR_TESTING:R0};function NP(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}var LP=NP;const{useEffect:DP,useRef:OP}=Ke;function VP(t){const e=OP();return DP(()=>{e.current=t}),e.current}var A0=VP;const{useStoreRef:MP}=Xs,{SUSPENSE_TIMEOUT_MS:jP}=qo,{updateRetainCount:mu}=qo,{RetentionZone:FP}=mf,{useEffect:UP,useRef:$P}=Ke,{isSSR:w1}=vf;function BP(t){if(wt("recoil_memory_managament_2020"))return zP(t)}function zP(t){const n=(Array.isArray(t)?t:[t]).map(u=>u instanceof FP?u:u.key),r=MP();UP(()=>{if(!wt("recoil_memory_managament_2020"))return;const u=r.current;if(i.current&&!w1)window.clearTimeout(i.current),i.current=null;else for(const d of n)mu(u,d,1);return()=>{for(const d of n)mu(u,d,-1)}},[r,...n]);const i=$P(),a=A0(n);if(!w1&&(a===void 0||!LP(a,n))){const u=r.current;for(const d of n)mu(u,d,1);if(a)for(const d of a)mu(u,d,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const d of n)mu(u,d,-1)},jP)}}var Ey=BP;function HP(){return"<component name not available>"}var oc=HP;const{batchUpdates:WP}=yf,{DEFAULT_VALUE:k0}=Xn,{currentRendererSupportsUseSyncExternalStore:qP,reactMode:pl,useMutableSource:GP,useSyncExternalStore:KP}=rc,{useRecoilMutableSource:QP,useStoreRef:_s}=Xs,{AbstractRecoilValue:_g,getRecoilValueAsLoadable:ac,setRecoilValue:xh,setUnvalidatedRecoilValue:YP,subscribeToRecoilValue:Xa}=ws,{useCallback:Qn,useEffect:Ja,useMemo:x0,useRef:Nu,useState:Sy}=Ke,{setByAddingToSet:XP}=X2,{isSSR:JP}=vf;function Ty(t,e,n){if(t.state==="hasValue")return t.contents;throw t.state==="loading"?new Promise(i=>{const a=n.current.getState().suspendedComponentResolvers;a.add(i),JP&&It(t.contents)&&t.contents.finally(()=>{a.delete(i)})}):t.state==="hasError"?t.contents:Ye(`Invalid value of loadable atom "${e.key}"`)}function ZP(){const t=oc(),e=_s(),[,n]=Sy([]),r=Nu(new Set);
53r.current=new Set;const i=Nu(new Set),a=Nu(new Map),u=Qn(f=>{const p=a.current.get(f);p&&(p.release(),a.current.delete(f))},[a]),d=Qn((f,p)=>{a.current.has(p)&&n([])},[]);return Ja(()=>{const f=e.current;xu(r.current,i.current).forEach(p=>{if(a.current.has(p))return;const w=Xa(f,new _g(p),T=>d(T,p),t);a.current.set(p,w),f.getState().nextTree?f.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{d(f.getState(),p)}):d(f.getState(),p)}),xu(i.current,r.current).forEach(p=>{u(p)}),i.current=r.current}),Ja(()=>{const f=a.current;return xu(r.current,new Set(f.keys())).forEach(p=>{const w=Xa(e.current,new _g(p),E=>d(E,p),t);f.set(p,w)}),()=>f.forEach((p,w)=>u(w))},[t,e,u,d]),x0(()=>{function f(I){return L=>{xh(e.current,I,L)}}function p(I){return()=>xh(e.current,I,k0)}function w(I){var L;r.current.has(I.key)||(r.current=XP(r.current,I.key));const V=e.current.getState();return ac(e.current,I,pl().early&&(L=V.nextTree)!==null&&L!==void 0?L:V.currentTree)}function E(I){const L=w(I);return Ty(L,I,e)}function T(I){return[E(I),f(I)]}function b(I){return[w(I),f(I)]}
vendor: 3,182 bytes, line 53
53return{getRecoilValue:E,getRecoilValueLoadable:w,getRecoilState:T,getRecoilStateLoadable:b,getSetRecoilState:f,getResetRecoilState:p}},[r,e])}const eN={current:0};function tN(t){const e=_s(),n=oc(),r=Qn(()=>{var d;const f=e.current,p=f.getState(),w=pl().early&&(d=p.nextTree)!==null&&d!==void 0?d:p.currentTree;return{loadable:ac(f,t,w),key:t.key}},[e,t]),i=Qn(d=>{let f;return()=>{var p,w;const E=d();return(p=f)!==null&&p!==void 0&&p.loadable.is(E.loadable)&&((w=f)===null||w===void 0?void 0:w.key)===E.key?f:(f=E,E)}},[]),a=x0(()=>i(r),[r,i]),u=Qn(d=>{const f=e.current;return Xa(f,t,d,n).release},[e,t,n]);return KP(u,a,a).loadable}function nN(t){const e=_s(),n=Qn(()=>{var p;const w=e.current,E=w.getState(),T=pl().early&&(p=E.nextTree)!==null&&p!==void 0?p:E.currentTree;return ac(w,t,T)},[e,t]),r=Qn(()=>n(),[n]),i=oc(),a=Qn((p,w)=>{const E=e.current;return Xa(E,t,()=>{if(!wt("recoil_suppress_rerender_in_callback"))return w();const b=n();f.current.is(b)||w(),f.current=b},i).release},[e,t,i,n]),u=QP();if(u==null)throw Ye("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const d=GP(u,r,a),f=Nu(d);return Ja(()=>{f.current=d}),d}function Eg(t){const e=_s(),n=oc(),r=Qn(()=>{var f;const p=e.current,w=p.getState(),E=pl().early&&(f=w.nextTree)!==null&&f!==void 0?f:w.currentTree;return ac(p,t,E)},[e,t]),i=Qn(()=>({loadable:r(),key:t.key}),[r,t.key]),a=Qn(f=>{const p=i();return f.loadable.is(p.loadable)&&f.key===p.key?f:p},[i]);Ja(()=>{const f=Xa(e.current,t,p=>{d(a)},n);return d(a),f.release},[n,t,e,a]);const[u,d]=Sy(i);return u.key!==t.key?i().loadable:u.loadable}function rN(t){const e=_s(),[,n]=Sy([]),r=oc(),i=Qn(()=>{var d;const f=e.current,p=f.getState(),w=pl().early&&(d=p.nextTree)!==null&&d!==void 0?d:p.currentTree;return ac(f,t,w)},[e,t]),a=i(),u=Nu(a);return Ja(()=>{u.current=a}),Ja(()=>{const d=e.current,f=d.getState(),p=Xa(d,t,E=>{var T;if(!wt("recoil_suppress_rerender_in_callback"))return n([]);const b=i();(T=u.current)!==null&&T!==void 0&&T.is(b)||n(b),u.current=b},r);if(f.nextTree)d.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{u.current=null,n([])});else{var w;if(!wt("recoil_suppress_rerender_in_callback"))return n([]);const E=i();(w=u.current)!==null&&w!==void 0&&w.is(E)||n(E),u.current=E}return p.release},[r,i,t,e]),a}function by(t){return wt("recoil_memory_managament_2020")&&Ey(t),{TRANSITION_SUPPORT:Eg,SYNC_EXTERNAL_STORE:qP()?tN:Eg,MUTABLE_SOURCE:nN,LEGACY:rN}[pl().mode](t)}function P0(t){const e=_s(),n=by(t);return Ty(n,t,e)}function Tf(t){const e=_s();return Qn(n=>{xh(e.current,t,n)},[e,t])}function sN(t){const e=_s();return Qn(()=>{xh(e.current,t,k0)},[e,t])}function iN(t){return[P0(t),Tf(t)]}function oN(t){return[by(t),Tf(t)]}function aN(){const t=_s();return(e,n={})=>{WP(()=>{t.current.addTransactionMetadata(n),e.forEach((r,i)=>YP(t.current,new _g(i),r))})}}function N0(t){return wt("recoil_memory_managament_2020")&&Ey(t),Eg(t)}function L0(t){const e=_s(),n=N0(t);return Ty(n,t,e)}function lN(t){return[L0(t),Tf(t)]}var uN={recoilComponentGetRecoilValueCount_FOR_TESTING:eN,useRecoilInterface:ZP,useRecoilState:iN,useRecoilStateLoadable:oN,useRecoilValue:P0,useRecoilValueLo
53adable:by,useResetRecoilState:sN,useSetRecoilState:Tf,useSetUnvalidatedAtomValues:aN,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:N0,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:L0,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:lN};function cN(t,e){const n=new Map;for(const[r,i]of t)e(i,r)&&n.set(r,i);return n}var dN=cN;function hN(t,e){const n=new Set;for(const r of t)e(r)&&n.add(r);return n}var fN=hN;function pN(...t){const e=new Map;for(let n=0;n<t.length;n++){const r=t[n].keys();let i;for(;!(i=r.next()).done;)e.set(i.value,t[n].get(i.value))}return e}var mN=pN;const{batchUpdates:gN}=yf,{DEFAULT_VALUE:yN,getNode:D0,nodes:vN}=Xn,{useStoreRef:Iy}=Xs,{AbstractRecoilValue:wN,setRecoilValueLoadable:_N}=ws,{SUSPENSE_TIMEOUT_MS:EN}=qo,{cloneSnapshot:Ph}=Ef,{useCallback:bf,useEffect:O0,useRef:_1,useState:SN}=Ke,{isSSR:E1}=vf;function If(t){const e=Iy();O0(()=>e.current.subscribeToTransactions(t).release,[t,e])}function S1(t){const e=t.atomValues.toMap(),n=kh(dN(e,(r,i)=>{const u=D0(i).persistence_UNSTABLE;return u!=null&&u.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return mN(t.nonvalidatedAtoms.toMap(),n)}function TN(t){If(bf(e=>{let n=e.getState().previousTree;const r=e.getState().currentTree;n||(n=e.getState().currentTree);const i=S1(r),a=S1(n),u=kh(vN,f=>{var p,w,E,T;return{persistence_UNSTABLE:{type:(p=(w=f.persistence_UNSTABLE)===null||w===void 0?void 0:w.type)!==null&&p!==void 0?p:"none",backButton:(E=(T=f.persistence_UNSTABLE)===null||T===void 0?void 0:T.backButton)!==null&&E!==void 0?E:!1}}}),d=fN(r.dirtyAtoms,f=>i.has(f)||a.has(f));t({atomValues:i,previousAtomValues:a,atomInfo:u,modifiedAtoms:d,transactionMetadata:{...r.transactionMetadata}})},[t]))}function bN(t){If(bf(e=>{const n=Ph(e,"latest"),r=Ph(e,"previous");t({snapshot:n,previousSnapshot:r})},[t]))}function IN(){const t=Iy(),[e,n]=SN(()=>Ph(t.current)),r=A0(e),i=_1(),a=_1();if(If(bf(d=>n(Ph(d)),[])),O0(()=>{const d=e.retain();if(i.current&&!E1){var f;window.clearTimeout(i.current),i.current=null,(f=a.current)===null||f===void 0||f.call(a),a.current=null}return()=>{window.setTimeout(d,10)}},[e]),r!==e&&!E1){if(i.current){var u;window.clearTimeout(i.current),i.current=null,(u=a.current)===null||u===void 0||u.call(a),a.current=null}a.current=e.retain(),i.current=window.setTimeout(()=>{var d;i.current=null,(d=a.current)===null||d===void 0||d.call(a),a.current=null},EN)}return e}function V0(t,e){var n;const r=t.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,a=e.getStore_INTERNAL().getState().currentTree;gN(()=>{const u=new Set;for(const p of[i.atomValues.keys(),a.atomValues.keys()])for(const w of p){var d,f;((d=i.atomValues.get(w))===null||d===void 0?void 0:d.contents)!==((f=a.atomValues.get(w))===null||f===void 0?void 0:f.contents)&&D0(w).shouldRestoreFromSnapshots&&u.add(w)}u.forEach(p=>{_N(t,new wN(p),a.atomValues.has(p)?kt(a.atomValues.get(p)):yN)}),t.replaceState(p=>({...p,stateID:e.getID()}))})}function CN(){const t=Iy();return bf(e=>V0(t.current,e),[t])}var M0={useRecoilSnapshot:IN,gotoSnapshot:V0,useGotoRecoilSnapshot:CN,useRecoilTransactionObserver:bN,useTransactionObservation_DEPRECATED:TN,useTransactionSubscription_DEPRECATED:If};const{peekNodeInfo:RN}=Xi,{useStoreRef:AN}=Xs;function kN(){const t=AN();return({key:e})=>RN(t.current,t.current.getState().currentTree,e)}var xN=kN;const{reactMode:PN}=rc,{RecoilRoot:NN,useStoreRef:LN}=Xs,{useMemo:DN}=Ke;function ON(){PN().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode.  Please consider upgrading to recoil_sync_external_store mode.");const t=LN().current;return DN(()=>{function e({children:n}){return Ke.createElement(NN,{store_INTERNAL:t},n)}return e},[t])}var VN=ON;const{loadableWithValue:MN}=nc,{initializeNode:jN}=Xi,{DEFAULT_VALUE:FN,getNode:UN}=Xn,{copyTreeState:$N,getRecoilValueAsLoadable:BN,invalidateDownstreams:zN,writeLoadableToTreeState:HN}=ws;function T1(t){return UN(t.key).nodeType==="atom"}class WN{constructor(e,n){Qe(this,"_store",void 0),Qe(this,"_treeState",void 0),Qe(this,"_changes",void 0),Qe(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!T1(r))throw Ye("Reading selectors within atomicUpdate is not supported");const i=BN(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:Ye(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),Qe(this,"set",(r,i)=>{if(!T1(r))throw Ye("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const a=this.get(r);this._changes.set(r.key,i(a))}else jN(this._store,r.key,"set"),this._changes.set(r.key,i)}),Qe(this,"reset",r=>{this.set(r,FN)}),this._store=e,this._treeState=n,this._changes=new Map}
vendor: 4,623 bytes, line 53
53newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const e=$N(this._treeState);for(const[n,r]of this._changes)HN(e,n,MN(r));return zN(this._store,e),e}}function qN(t){return e=>{t.replaceState(n=>{const r=new WN(t,n);return e(r),r.newTreeState_INTERNAL()})}}var GN={atomicUpdater:qN},KN=GN.atomicUpdater,j0=Object.freeze({__proto__:null,atomicUpdater:KN});function QN(t,e){if(!t)throw new Error(e)}var YN=QN,Su=YN;const{atomicUpdater:XN}=j0,{batchUpdates:JN}=yf,{DEFAULT_VALUE:ZN}=Xn,{useStoreRef:eL}=Xs,{refreshRecoilValue:tL,setRecoilValue:b1}=ws,{cloneSnapshot:nL}=Ef,{gotoSnapshot:rL}=M0,{useCallback:sL}=Ke;class F0{}const iL=new F0;function U0(t,e,n,r){let i=iL,a;if(JN(()=>{const d="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create.  Please see the docs at recoiljs.org for details.";if(typeof e!="function")throw Ye(d);const f=J2({...r??{},set:(w,E)=>b1(t,w,E),reset:w=>b1(t,w,ZN),refresh:w=>tL(t,w),gotoSnapshot:w=>rL(t,w),transact_UNSTABLE:w=>XN(t)(w)},{snapshot:()=>{const w=nL(t);return a=w.retain(),w}}),p=e(f);if(typeof p!="function")throw Ye(d);i=p(...n)}),i instanceof F0&&Su(!1),It(i))i=i.finally(()=>{var d;(d=a)===null||d===void 0||d()});else{var u;(u=a)===null||u===void 0||u()}return i}function oL(t,e){const n=eL();return sL((...r)=>U0(n.current,t,r),e!=null?[...e,n]:void 0)}var $0={recoilCallback:U0,useRecoilCallback:oL};const{useStoreRef:aL}=Xs,{refreshRecoilValue:lL}=ws,{useCallback:uL}=Ke;function cL(t){const e=aL();return uL(()=>{const n=e.current;lL(n,t)},[t,e])}var dL=cL;const{atomicUpdater:hL}=j0,{useStoreRef:fL}=Xs,{useMemo:pL}=Ke;function mL(t,e){const n=fL();return pL(()=>(...r)=>{hL(n.current)(a=>{t(a)(...r)})},e!=null?[...e,n]:void 0)}var gL=mL;class yL{constructor(e){Qe(this,"value",void 0),this.value=e}}var vL={WrappedValue:yL},wL=vL.WrappedValue,B0=Object.freeze({__proto__:null,WrappedValue:wL});const{isFastRefreshEnabled:_L}=rc;class I1 extends Error{}class EL{constructor(e){var n,r,i;Qe(this,"_name",void 0),Qe(this,"_numLeafs",void 0),Qe(this,"_root",void 0),Qe(this,"_onHit",void 0),Qe(this,"_onSet",void 0),Qe(this,"_mapNodeValue",void 0),this._name=e==null?void 0:e.name,this._numLeafs=0,this._root=null,this._onHit=(n=e==null?void 0:e.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=e==null?void 0:e.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(i=e==null?void 0:e.mapNodeValue)!==null&&i!==void 0?i:a=>a}size(){return this._numLeafs}root(){return this._root}get(e,n){var r;return(r=this.getLeafNode(e,n))===null||r===void 0?void 0:r.value}getLeafNode(e,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const i=this._mapNodeValue(e(r.nodeKey));r=r.branches.get(i)}}set(e,n,r){const i=()=>{var a,u,d,f;let p,w;for(const[V,U]of e){var E,T,b;const M=this._root;if((M==null?void 0:M.type)==="leaf")throw this.invalidCacheError();const Q=p;if(p=Q?Q.branches.get(w):M,p=(E=p)!==null&&E!==void 0?E:{type:"branch",nodeKey:V,parent:Q,branches:new Map,branchKey:w},p.type!=="branch"||p.nodeKey!==V)throw this.invalidCacheError();Q==null||Q.branches.set(w,p),r==null||(T=r.onNodeVisit)===null||T===void 0||T.call(r,p),w=this._mapNodeValue(U),this._root=(b=this._root)!==null&&b!==void 0?b:p}const I=p?(a=p)===null||a===void 0?void 0:a.branches.get(w):this._root;if(I!=null&&(I.type!=="leaf"||I.branchKey!==w))throw this.invalidCacheError();const L={type:"leaf",value:n,parent:p,branchKey:w};(u=p)===null||u===void 0||u.branches.set(w,L),this._root=(d=this._root)!==null&&d!==void 0?d:L,this._numLeafs++,this._onSet(L),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,L)};try{i()}catch(a){if(a instanceof I1)this.clear(),i();else throw a}}delete(e){const n=this.root();if(!n)return!1;if(e===n)return this._root=null,this._numLeafs=0,!0;let r=e.parent,i=e.branchKey;for(;r;){var a;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(a=r)===null||a===void 0?void 0:a.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const e=_L()?"Possible Fast Refresh module reload detected.  This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cac
53he values.  This happens when selectors do not return consistent values for the same input dependency values.  That may also be caused when using Fast Refresh to change a selector implementation.  Resetting cache.";throw dy(e+(this._name!=null?` - ${this._name}`:"")),new I1}}var SL={TreeCache:EL},TL=SL.TreeCache,z0=Object.freeze({__proto__:null,TreeCache:TL});class bL{constructor(e){var n;Qe(this,"_maxSize",void 0),Qe(this,"_size",void 0),Qe(this,"_head",void 0),Qe(this,"_tail",void 0),Qe(this,"_map",void 0),Qe(this,"_keyMapper",void 0),this._maxSize=e.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=e.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(e){return this._map.has(this._keyMapper(e))}get(e){const n=this._keyMapper(e),r=this._map.get(n);if(r)return this.set(e,r.value),r.value}set(e,n){const r=this._keyMapper(e);this._map.get(r)&&this.delete(e);const a=this.head(),u={key:e,right:a,left:null,value:n};a?a.left=u:this._tail=u,this._map.set(r,u),this._head=u,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const e=this.tail();e&&this.delete(e.key)}delete(e){const n=this._keyMapper(e);if(!this._size||!this._map.has(n))return;const r=kt(this._map.get(n)),i=r.right,a=r.left;i&&(i.left=r.left),a&&(a.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=a),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var IL={LRUCache:bL},CL=IL.LRUCache,H0=Object.freeze({__proto__:null,LRUCache:CL});const{LRUCache:RL}=H0,{TreeCache:AL}=z0;function kL({name:t,maxSize:e,mapNodeValue:n=r=>r}){const r=new RL({maxSize:e}),i=new AL({name:t,mapNodeValue:n,onHit:a=>{r.set(a,!0)},onSet:a=>{const u=r.tail();r.set(a,!0),u&&i.size()>e&&i.delete(u.key)}});return i}var C1=kL;function Br(t,e,n){if(typeof t=="string"&&!t.includes('"')&&!t.includes("\\"))return`"${t}"`;switch(typeof t){case"undefined":return"";case"boolean":return t?"true":"false";case"number":case"symbol":return String(t);case"string":return JSON.stringify(t);case"function":if((e==null?void 0:e.allowFunctions)!==!0)throw Ye("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${t.name})__`}if(t===null)return"null";if(typeof t!="object"){var r;return(r=JSON.stringify(t))!==null&&r!==void 0?r:""}if(It(t))return"__PROMISE__";if(Array.isArray(t))return`[${t.map((i,a)=>Br(i,e,a.toString()))}]`;if(typeof t.toJSON=="function")return Br(t.toJSON(n),e,n);if(t instanceof Map){const i={};for(const[a,u]of t)i[typeof a=="string"?a:Br(a,e)]=u;return Br(i,e,n)}return t instanceof Set?Br(Array.from(t).sort((i,a)=>Br(i,e).localeCompare(Br(a,e))),e,n):Symbol!==void 0&&t[Symbol.iterator]!=null&&typeof t[Symbol.iterator]=="function"?Br(Array.from(t),e,n):`{${Object.keys(t).filter(i=>t[i]!==void 0).sort().map(i=>`${Br(i,e)}:${Br(t[i],e,i)}`).join(",")}}`}function xL(t,e={allowFunctions:!1}){return Br(t,e)}var Cf=xL;const{TreeCache:PL}=z0,qd={equality:"reference",eviction:"keep-all",maxSize:1/0};function NL({equality:t=qd.equality,eviction:e=qd.eviction,maxSize:n=qd.maxSize}=qd,r){const i=LL(t);return DL(e,n,i,r)}function LL(t){switch(t){case"reference":return e=>e;case"value":return e=>Cf(e)}throw Ye(`Unrecognized equality policy ${t}`)}function DL(t,e,n,r){switch(t){case"keep-all":return new PL({name:r,mapNodeValue:n});case"lru":return C1({name:r,maxSize:kt(e),mapNodeValue:n});case"most-recent":return C1({name:r,maxSize:1,mapNodeValue:n})}throw Ye(`Unrecognized eviction policy ${t}`)}var OL=NL;function VL(t){return()=>null}var ML={startPerfBlock:VL};const{isLoadable:jL,loadableWithError:Gd,loadableWithPromise:FL,loadableWithValue:Bm}=nc,{WrappedValue:W0}=B0,{getNodeLoadable:Kd,peekNodeLoadable:UL,setNodeValue:$L}=Xi,{saveDepsToStore:BL}=sc,{DEFAULT_VALUE:zL,getConfigDeletionHandler:HL,getNode:WL,registerNode:R1}=Xn,{isRecoilValue:qL}=Ya,{markRecoilValueModified:A1}=ws,{retainedByOptionWithDefault:GL}=qo,{recoilCallback:KL}=$0,{startPerfBlock:QL}=ML;class q0{}const gu=new q0,yu=[],Qd=new Map,YL=(()=>{let t=0;return()=>t++})();function G0(t){let e=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=t,a=t.set!=null?t.set:void 0,u=new Set,d=OL(i??{equality:"reference",eviction:"keep-all"},n),f=GL(t.retainedBy_UNSTABLE),p=new Map;let w=0;function E(){return!wt("recoil_memory_managament_2020")||w>0}function T(N){return N.getState().knownSelectors.add(n),w++,()=>{w--}}function b(){return HL(n)!==void 0&&!E()}function I(N,X,ne,ye,pe){Xe(X,ye,pe),L(N,ne)}function L(N,X){le(N,X)&&P(N),U(X,!0)}function V(N,X){le(N,X)&&(kt(k(N)).stateVersions.clear(),U(X,!1))}function U(N,X){const ne=Qd.get(N);if(ne!=null){for(const ye of ne)A1(ye,kt(e));X&&Qd.delete(N)}}function M(N,X){let ne=Qd.get(X);ne==null&&Qd.set(X,ne=new Set),ne.add(N)}function Q(N,X,ne,ye,pe,Ie){return X.then(be=>{if(!E())throw P(N),gu;const Ee=Bm(be);return I(N,ne,pe,Ee,ye),be}).catch(be=>{if(!E())throw P(N),gu;if(It(be))return te(N,be,ne,ye,pe,Ie);const Ee=Gd(be);throw I(N,ne,pe,Ee,ye),be})}function te(N,X,ne,ye,pe,Ie){return X.then(be=>{if(!E())throw P(N),gu;Ie.loadingDepKey!=null&&Ie.loadingDepPromise===X?ne.atomValues.set(Ie.loadingDepKey,Bm(be)):N.get
vendor: 1,601 bytes, line 53
53State().knownSelectors.forEach(tt=>{ne.atomValues.delete(tt)});const Ee=D(N,ne);if(Ee&&Ee.state!=="loading"){if((le(N,pe)||k(N)==null)&&L(N,pe),Ee.state==="hasValue")return Ee.contents;throw Ee.contents}if(!le(N,pe)){const tt=x(N,ne);if(tt!=null)return tt.loadingLoadable.contents}const[Ge,ft]=ae(N,ne,pe);if(Ge.state!=="loading"&&I(N,ne,pe,Ge,ft),Ge.state==="hasError")throw Ge.contents;return Ge.contents}).catch(be=>{if(be instanceof q0)throw gu;if(!E())throw P(N),gu;const Ee=Gd(be);throw I(N,ne,pe,Ee,ye),be})}function he(N,X,ne,ye){var pe,Ie,be,Ee;if(le(N,ye)||X.version===((pe=N.getState())===null||pe===void 0||(Ie=pe.currentTree)===null||Ie===void 0?void 0:Ie.version)||X.version===((be=N.getState())===null||be===void 0||(Ee=be.nextTree)===null||Ee===void 0?void 0:Ee.version)){var Ge,ft,tt;BL(n,ne,N,(Ge=(ft=N.getState())===null||ft===void 0||(tt=ft.nextTree)===null||tt===void 0?void 0:tt.version)!==null&&Ge!==void 0?Ge:N.getState().currentTree.version)}for(const at of ne)u.add(at)}function ae(N,X,ne){const ye=QL(n);let pe=!0,Ie=!0;const be=()=>{ye(),Ie=!1};let Ee,Ge=!1,ft;const tt={loadingDepKey:null,loadingDepPromise:null},at=new Map;function Yt({key:rn}){const Xt=Kd(N,X,rn);switch(at.set(rn,Xt),pe||(he(N,X,new Set(at.keys()),ne),V(N,ne)),Xt.state){case"hasValue":return Xt.contents;case"hasError":throw Xt.contents;case"loading":throw tt.loadingDepKey=rn,tt.loadingDepPromise=Xt.contents,Xt.contents}throw Ye("Invalid Loadable state")}const Mn=rn=>(...Xt)=>{if(Ie)throw Ye("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated.  It c
53an be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return e==null&&Su(!1),KL(N,rn,Xt,{node:e})};try{Ee=r({get:Yt,getCallback:Mn}),Ee=qL(Ee)?Yt(Ee):Ee,jL(Ee)&&(Ee.state==="hasError"&&(Ge=!0),Ee=Ee.contents),It(Ee)?Ee=Q(N,Ee,X,at,ne,tt).finally(be):be(),Ee=Ee instanceof W0?Ee.value:Ee}catch(rn){Ee=rn,It(Ee)?Ee=te(N,Ee,X,at,ne,tt).finally(be):(Ge=!0,be())}return Ge?ft=Gd(Ee):It(Ee)?ft=FL(Ee):ft=Bm(Ee),pe=!1,B(N,ne,at),he(N,X,new Set(at.keys()),ne),[ft,at]}function D(N,X){let ne=X.atomValues.get(n);if(ne!=null)return ne;const ye=new Set;try{ne=d.get(Ie=>(typeof Ie!="string"&&Su(!1),Kd(N,X,Ie).contents),{onNodeVisit:Ie=>{Ie.type==="branch"&&Ie.nodeKey!==n&&ye.add(Ie.nodeKey)}})}catch(Ie){throw Ye(`Problem with cache lookup for selector "${n}": ${Ie.message}`)}if(ne){var pe;X.atomValues.set(n,ne),he(N,X,ye,(pe=k(N))===null||pe===void 0?void 0:pe.executionID)}return ne}function R(N,X){const ne=D(N,X);if(ne!=null)return P(N),ne;const ye=x(N,X);if(ye!=null){var pe;return((pe=ye.loadingLoadable)===null||pe===void 0?void 0:pe.state)==="loading"&&M(N,ye.executionID),ye.loadingLoadable}const Ie=YL(),[be,Ee]=ae(N,X,Ie);return be.state==="loading"?(F(N,Ie,be,Ee,X),M(N,Ie)):(P(N),Xe(X,be,Ee)),be}function x(N,X){const ne=m0([p.has(N)?[kt(p.get(N))]:[],ff(gy(p,([pe])=>pe!==N),([,pe])=>pe)]);function ye(pe){for(const[Ie,be]of pe)if(!Kd(N,X,Ie).is(be))return!0;return!1}for(const pe of ne){if(pe.stateVersions.get(X.version)||!ye(pe.depValuesDiscoveredSoFarDuringAsyncWork))return pe.stateVersions.set(X.version,!0),pe;pe.stateVersions.set(X.version,!1)}}function k(N){return p.get(N)}function F(N,X,ne,ye,pe){p.set(N,{depValuesDiscoveredSoFarDuringAsyncWork:ye,executionID:X,loadingLoadable:ne,stateVersions:new Map([[pe.version,!0]])})}function B(N,X,ne){if(le(N,X)){const ye=k(N);ye!=null&&(ye.depValuesDiscoveredSoFarDuringAsyncWork=ne)}}function P(N){p.delete(N)}function le(N,X){var ne;return X===((ne=k(N))===null||ne===void 0?void 0:ne.executionID)}function qe(N){return Array.from(N.entries()).map(([X,ne])=>[X,ne.contents])}function Xe(N,X,ne){N.atomValues.set(n,X);try{d.set(qe(ne),X)}catch(ye){throw Ye(`Problem with setting cache for selector "${n}": ${ye.message}`)}}function de(N){if(yu.includes(n)){const X=`Recoil selector has circular dependencies: ${yu.slice(yu.indexOf(n)).join(" → ")}`;return Gd(Ye(X))}yu.push(n);try{return N()}finally{yu.pop()}}function re(N,X){const ne=X.atomValues.get(n);return ne??d.get(ye=>{var pe;return typeof ye!="string"&&Su(!1),(pe=UL(N,X,ye))===null||pe===void 0?void 0:pe.contents})}function ge(N,X){return de(()=>R(N,X))}function ee(N){N.atomValues.delete(n)}function j(N,X){e==null&&Su(!1);for(const ye of u){var ne;const pe=WL(ye);(ne=pe.clearCache)===null||ne===void 0||ne.call(pe,N,X)}u.clear(),ee(X),d.clear(),A1(N,e)}return a!=null?e=R1({key:n,nodeType:"selector",peek:re,get:ge,set:(X,ne,ye)=>{let pe=!1;const Ie=new Map;function be({key:tt}){if(pe)throw Ye("Recoil: Async selector sets are not currently supported.");const at=Kd(X,ne,tt);if(at.state==="hasValue")return at.contents;if(at.state==="loading"){const Yt=`Getting value of asynchronous atom or selector "${tt}" in a pending state while setting selector "${n}" is not yet supported.`;throw Ye(Yt)}else throw at.contents}function Ee(tt,at){if(pe)throw Ye("Recoil: Async selector sets are not currently supported.");const Yt=typeof at=="function"?at(be(tt)):at;$L(X,ne,tt.key,Yt).forEach((rn,Xt)=>Ie.set(Xt,rn))}function Ge(tt){Ee(tt,zL)}const ft=a({set:Ee,get:be,reset:Ge},ye);if(ft!==void 0)throw It(ft)?Ye("Recoil: Async selector sets are not currently supported."):Ye("Recoil: selector set should be a void function.");return pe=!0,Ie},init:T,invalidate:ee,clearCache:j,shouldDeleteConfigOnRelease:b,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:f}):e=R1({key:n,nodeType:"selector",peek:re,get:ge,init:T,invalidate:ee,clearCache:j,shouldDeleteConfigOnRelease:b,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:f})}G0.value=t=>new W0(t);var Za=G0;
vendor: 10,378 bytes, line 53
53const{isLoadable:XL,loadableWithError:zm,loadableWithPromise:Hm,loadableWithValue:Da}=nc,{WrappedValue:K0}=B0,{peekNodeInfo:JL}=Xi,{DEFAULT_VALUE:No,DefaultValue:xi,getConfigDeletionHandler:Q0,registerNode:ZL,setConfigDeletionHandler:e4}=Xn,{isRecoilValue:t4}=Ya,{getRecoilValueAsLoadable:n4,markRecoilValueModified:r4,setRecoilValue:k1,setRecoilValueLoadable:s4}=ws,{retainedByOptionWithDefault:i4}=qo,vu=t=>t instanceof K0?t.value:t;function o4(t){const{key:e,persistence_UNSTABLE:n}=t,r=i4(t.retainedBy_UNSTABLE);let i=0;function a(M){return Hm(M.then(Q=>(u=Da(Q),Q)).catch(Q=>{throw u=zm(Q),Q}))}let u=It(t.default)?a(t.default):XL(t.default)?t.default.state==="loading"?a(t.default.contents):t.default:Da(vu(t.default));u.contents;let d;const f=new Map;function p(M){return M}function w(M,Q){const te=Q.then(he=>{var ae,D;return((D=((ae=M.getState().nextTree)!==null&&ae!==void 0?ae:M.getState().currentTree).atomValues.get(e))===null||D===void 0?void 0:D.contents)===te&&k1(M,U,he),he}).catch(he=>{var ae,D;throw((D=((ae=M.getState().nextTree)!==null&&ae!==void 0?ae:M.getState().currentTree).atomValues.get(e))===null||D===void 0?void 0:D.contents)===te&&s4(M,U,zm(he)),he});return te}function E(M,Q,te){var he;i++;const ae=()=>{var k;i--,(k=f.get(M))===null||k===void 0||k.forEach(F=>F()),f.delete(M)};if(M.getState().knownAtoms.add(e),u.state==="loading"){const k=()=>{var F;((F=M.getState().nextTree)!==null&&F!==void 0?F:M.getState().currentTree).atomValues.has(e)||r4(M,U)};u.contents.finally(k)}const D=(he=t.effects)!==null&&he!==void 0?he:t.effects_UNSTABLE;if(D!=null){let k=function(ee){if(le&&ee.key===e){const j=P;return j instanceof xi?T(M,Q):It(j)?Hm(j.then(N=>N instanceof xi?u.toPromise():N)):Da(j)}return n4(M,ee)},F=function(ee){return k(ee).toPromise()},B=function(ee){var j;const N=JL(M,(j=M.getState().nextTree)!==null&&j!==void 0?j:M.getState().currentTree,ee.key);return le&&ee.key===e&&!(P instanceof xi)?{...N,isSet:!0,loadable:k(ee)}:N},P=No,le=!0,qe=!1,Xe=null;const de=ee=>j=>{if(le){const N=k(U),X=N.state==="hasValue"?N.contents:No;P=typeof j=="function"?j(X):j,It(P)&&(P=P.then(ne=>(Xe={effect:ee,value:ne},ne)))}else{if(It(j))throw Ye("Setting atoms to async values is not implemented.");typeof j!="function"&&(Xe={effect:ee,value:vu(j)}),k1(M,U,typeof j=="function"?N=>{const X=vu(j(N));return Xe={effect:ee,value:X},X}:vu(j))}},re=ee=>()=>de(ee)(No),ge=ee=>j=>{var N;const{release:X}=M.subscribeToTransactions(ne=>{var ye;let{currentTree:pe,previousTree:Ie}=ne.getState();Ie||(Ie=pe);const be=(ye=pe.atomValues.get(e))!==null&&ye!==void 0?ye:u;if(be.state==="hasValue"){var Ee,Ge,ft,tt;const at=be.contents,Yt=(Ee=Ie.atomValues.get(e))!==null&&Ee!==void 0?Ee:u,Mn=Yt.state==="hasValue"?Yt.contents:No;((Ge=Xe)===null||Ge===void 0?void 0:Ge.effect)!==ee||((ft=Xe)===null||ft===void 0?void 0:ft.value)!==at?j(at,Mn,!pe.atomValues.has(e)):((tt=Xe)===null||tt===void 0?void 0:tt.effect)===ee&&(Xe=null)}},e);f.set(M,[...(N=f.get(M))!==null&&N!==void 0?N:[],X])};for(const ee of D)try{const j=ee({node:U,storeID:M.storeID,parentStoreID_UNSTABLE:M.parentStoreID,trigger:te,setSelf:de(ee),resetSelf:re(ee),onSet:ge(ee),getPromise:F,getLoadable:k,getInfo_UNSTABLE:B});if(j!=null){var R;f.set(M,[...(R=f.get(M))!==null&&R!==void 0?R:[],j])}}catch(j){P=j,qe=!0}if(le=!1,!(P instanceof xi)){var x;const ee=qe?zm(P):It(P)?Hm(w(M,P)):Da(vu(P));ee.contents,Q.atomValues.set(e,ee),(x=M.getState().nextTree)===null||x===void 0||x.atomValues.set(e,ee)}}return ae}function T(M,Q){var te,he;return(te=(he=Q.atomValues.get(e))!==null&&he!==void 0?he:d)!==null&&te!==void 0?te:u}function b(M,Q){if(Q.atomValues.has(e))return kt(Q.atomValues.get(e));if(Q.nonvalidatedAtoms.has(e)){if(d!=null)return d;if(n==null)return u;const te=Q.nonvalidatedAtoms.get(e),he=n.validator(te,No);return d=he instanceof xi?u:Da(he),d}else return u}function I(){d=void 0}function L(M,Q,te){if(Q.atomValues.has(e)){const he=kt(Q.atomValues.get(e));if(he.state==="hasValue"&&te===he.contents)return new Map}else if(!Q.nonvalidatedAtoms.has(e)&&te instanceof xi)return new Map;return d=void 0,new Map().set(e,Da(te))}function V(){return Q0(e)!==void 0&&i<=0}const U=ZL({key:e,nodeType:"atom",peek:T,get:b,set:L,init:E,invalidate:I,shouldDeleteConfigOnRelease:V,dangerouslyAllowMutability:t.dangerouslyAllowMutability,persistence_UNSTABLE:t.persistence_UNSTABLE?{type:t.persistence_UNSTABLE.type,backButton:t.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return U}function Cy(t){const{...e}=t,n="default"in t?t.default:new Promise(()=>{});return t4(n)?a4({...e,default:n}):o4({...e,default:n})}function a4(t){const e=Cy({...t,default:No,persistence_UNSTABLE:t.persistence_UNSTABLE===void 0?void 0:{...t.persistence_UNSTABLE,validator:r=>r instanceof xi?r:kt(t.persistence_UNSTABLE).validator(r,No)},effects:t.effects,effects_UNSTABLE:t.effects_UNSTABLE}),n=Za({key:`${t.key}__withFallback`,get:({get:r})=>{const i=r(e);return i instanceof xi?t.default:i},set:({set:r},i)=>r(e,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:t.dangerouslyAllowMutability});return e4(n.key,Q0(t.key)),n}Cy.value=t=>new K0(t);var Y0=Cy;class l4{constructor(e){var n;Qe(this,"_map",void 0),Qe(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=e==null?void 0:e.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(e){return this._map.has(this._keyMapper(e))}get(e){return this._map.get(this._keyMapper(e))}set(e,n){this._map.set(this._keyMapper(e),n)}delete(e){this._map.delete(this._keyMapper(e))}clear(){this._map.clear()}}var u4={MapCache:l4},c4=u4.MapCache,d4=Object.freeze({__proto__:null,MapCache:c4});const{LRUCache:x1}=H0,{MapCache:h4}=d4,Yd={equality:"reference",eviction:"none",maxSize:1/0};function f4({equality:t=Yd.equality,eviction:e=Yd.eviction,maxSize:n=Yd.maxSize}=Yd){const r=p4(t);return m4(e,n,r)}function p4(t){switch(t){case"reference":return e=>e;case"value":return e=>Cf(e)}throw Ye(`Unrecognized equality policy ${t}`)}function m4(t,e,n){switch(t){case"keep-all":return new h4({mapKey:n});case"lru":return new x1({mapKey:n,maxSize:kt(e)});case"most-recent":return new x1({mapKey:n,maxSize:1})}throw Ye(`Unrecognized eviction policy ${t}`)}var X0=f4;const{setConfigDeletionHandler:g4}=Xn;function y4(t){var e,n;const r=X0({equality:(e=(n=t.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&e!==void 0?e:"value",eviction:"keep-all"});return i=>{var a,u;const d=r.get(i);if(d!=null)return d;const{cachePolicyForParams_UNSTABLE:f,...p}=t,w="default"in t?t.default:new Promise(()=>{}),E=Y0({...p,key:`${t.key}__${(a=Cf(i))!==null&&a!==void 0?a:"void"}`,default:typeof w=="function"?w(i):w,retainedBy_UNSTABLE:typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(i):t.retainedBy_UNSTABLE,effects:typeof t.effects=="function"?t.effects(i):typeof t.effects_UNSTABLE=="function"?t.effects_UNSTABLE(i):(u=t.effects)!==null&&u!==void 0?u:t.effects_UNSTABLE});return r.set(i,E),g4(E.key,()=>{r.delete(i)}),E}}var v4=y4;const{setConfigDeletionHandler:w4}=Xn;let _4=0;function E4(t){var e,n;const r=X0({equality:(e=(n=t.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&e!==void 0?e:"value",eviction:"keep-all"});return i=>{var a;let u;try{u=r.get(i)}catch(T){throw Ye(`Problem with cache lookup for selector ${t.key}: ${T.message}`)}if(u!=null)return u;const d=`${t.key}__selectorFamily/${(a=Cf(i,{allowFunctions:!0}))!==null&&a!==void 0?a:"void"}/${_4++}`,f=T=>t.get(i)(T),p=t.cachePolicy_UNSTABLE,w=typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(i):t.retainedBy_UNSTABLE;let E;if(t.set!=null){const T=t.set;E=Za({key:d,get:f,set:(I,L)=>T(i)(I,L),cachePolicy_UNSTABLE:p,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:w})}else E=Za({key:d,get:f,cachePolicy_UNSTABLE:p,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:w});return r.set(i,E),w4(E.key,()=>{r.delete(i)}),E}}var Ji=E4;const S4=Ji({key:"__constant",get:t=>()=>t,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function T4(t){return S4(t)}var b4=T4;const I4=Ji({key:"__error",get:t=>()=>{throw Ye(t)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function C4(t){return I4(t)}var R4=C4;function A4(t){return t}var k4=A4;const{loadableWithError:J0,loadableWithPromise:Z0,loadableWithValue:eS}=nc;function Rf(t,e){const n=Array(e.length).fill(void 0),r=Array(e.length).fill(void 0);for(const[i,a]of e.entries())try{n[i]=t(a)}catch(u){r[i]=u}return[n,r]}function x4(t){return t!=null&&!It(t)}function Af(t){return Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(e=>t[e])}function Sg(t,e){return Array.isArray(t)?e:Object.getOwnPropertyNames(t).reduce((n,r,i)=>({...n,[r]:e[i]}),{})}function $a(t,e,n){const r=n.map((i,a)=>i==null?eS(e[a]):It(i)?Z0(i):J0(i));return Sg(t,r)}function P4(t,e){return e.map((n,r)=>n===void 0?t[r]:n)}const N4=Ji({key:"__waitForNone",get:t=>({get:e})=>{const n=Af(t),[r,i]=Rf(e,n);return $a(t,r,i)},dangerouslyAllowMutability:!0}),L4=Ji({key:"__waitForAny",get:t=>({get:e})=>{const n=Af(t),[r,i]=Rf(e,n);return i.some(a=>!It(a))?$a(t,r,i):new Promise(a=>{for(const[u,d]of i.entries())It(d)&&d.then(f=>{r[u]=f,i[u]=void 0,a($a(t,r,i))}).catch(f=>{i[u]=f,a($a(t,r,i))})})},dangerouslyAllowMutability:!0}),D4=Ji({key:"__waitForAll",get:t=>({get:e})=>{const n=Af(t),[r,i]=Rf(e,n);if(i.every(u=>u==null))return Sg(t,r);const a=i.find(x4);if(a!=null)throw a;return Promise.all(i).then(u=>Sg(t,P4(r,u)))},dangerouslyAllowMutability:!0}),O4=Ji({key:"__waitForAllSettled",get:t=>({get:e})=>{const n=Af(t),[r,i]=Rf(e,n);return i.every(a=>!It(a))?$a(t,r,i):Promise.all(i.map((a,u)=>It(a)?a.then(d=>{r[u]=d,i[u]=void 0}).catch(d=>{r[u]=void 0,i[u]=d}):null)).then(()=>$a(t,r,i))},dangerouslyAllowMutability:!0}),V4=Ji({key:"__noWait",get:t=>({get:e})=>{try{return Za.value(eS(e(t)))}catch(n){return Za.value(It(n)?Z0(n):J0(n))}},dangerouslyAllowMutability:!0});var M4={waitForNone:N4,waitForAny:L4,waitForAll:D4,waitForAllSettled:O4,noWait:V4};const{RecoilLoadable:j4}=nc,{DefaultValue:F4}=Xn,{RecoilRoot:U4,useRecoilStoreID:$4}=Xs,{isRecoilValue:B4}=Ya,{retentionZone:z4}=mf,{freshSnapshot:H4}=Ef,{useRecoilState:W4,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:q4,useRecoilStateLoadable:G4,useRecoilValue:K4,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Q4,useRecoilValueLo
53adable:Y4,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:X4,useResetRecoilState:J4,useSetRecoilState:Z4}=uN,{useGotoRecoilSnapshot:eD,useRecoilSnapshot:tD,useRecoilTransactionObserver:nD}=M0,{useRecoilCallback:rD}=$0,{noWait:sD,waitForAll:iD,waitForAllSettled:oD,waitForAny:aD,waitForNone:lD}=M4;var ml={DefaultValue:F4,isRecoilValue:B4,RecoilLoadable:j4,RecoilEnv:fl,RecoilRoot:U4,useRecoilStoreID:$4,useRecoilBridgeAcrossReactRoots_UNSTABLE:VN,atom:Y0,selector:Za,atomFamily:v4,selectorFamily:Ji,constSelector:b4,errorSelector:R4,readOnlySelector:k4,noWait:sD,waitForNone:lD,waitForAny:aD,waitForAll:iD,waitForAllSettled:oD,useRecoilValue:K4,useRecoilValueLoadable:Y4,useRecoilState:W4,useRecoilStateLoadable:G4,useSetRecoilState:Z4,useResetRecoilState:J4,useGetRecoilValueInfo_UNSTABLE:xN,useRecoilRefresher_UNSTABLE:dL,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:X4,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Q4,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:q4,useRecoilCallback:rD,useRecoilTransaction_UNSTABLE:gL,useGotoRecoilSnapshot:eD,useRecoilSnapshot:tD,useRecoilTransactionObserver_UNSTABLE:nD,snapshot_UNSTABLE:H4,useRetain:Ey,retentionZone:z4},uD=ml.RecoilRoot,lc=ml.atom,cD=ml.selector,gl=ml.useRecoilValue,Wi=ml.useRecoilState,Zi=ml.useSetRecoilState,wu={},P1;function dD(){if(P1)return wu;P1=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.recoilPersist=void 0;const t=(e={})=>{if(typeof window>"u")return{persistAtom:()=>{}};const{key:n="recoil-persist",storage:r=localStorage,converter:i=JSON}=e,a=({onSet:w,node:E,trigger:T,setSelf:b})=>{if(T==="get"){const I=d();typeof I.then=="function"&&I.then(L=>{L.hasOwnProperty(E.key)&&b(L[E.key])}),I.hasOwnProperty(E.key)&&b(I[E.key])}w(async(I,L,V)=>{const U=d();typeof U.then=="function"?U.then(M=>u(I,M,E.key,V)):u(I,U,E.key,V)})},u=(w,E,T,b)=>{b?delete E[T]:E[T]=w,p(E)},d=()=>{const w=r.getItem(n);return w==null?{}:typeof w=="string"?f(w):typeof w.then=="function"?w.then(f):{}},f=w=>{if(w===void 0)return{};try{return i.parse(w)}catch(E){return console.error(E),{}}},p=w=>{try{typeof r.mergeItem=="function"?r.mergeItem(n,i.stringify(w)):r.setItem(n,i.stringify(w))}catch(E){console.error(E)}};return{persistAtom:a}};return wu.recoilPersist=t,wu}var hD=dD(),tS={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},N1=Ke.createContext&&Ke.createContext(tS),fD=["attr","size","title"];function pD(t,e){if(t==null)return{};var n=mD(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function mD(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Nh(){return Nh=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},Nh.apply(this,arguments)}function L1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Lh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L1(Object(n),!0).forEach(function(r){gD(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L1(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function gD(t,e,n){return e=yD(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yD(t){var e=vD(t,"string");return typeof e=="symbol"?e:e+""}function vD(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nS(t){return t&&t.map((e,n)=>Ke.createElement(e.tag,Lh({key:n},e.attr),nS(e.child)))}function Fe(t){return e=>Ke.createElement(wD,Nh({attr:Lh({},t.attr)},e),nS(t.child))}function wD(t){var e=n=>{var{attr:r,size:i,title:a}=t,u=pD(t,fD),d=i||n.size||"1em",f;return n.className&&(f=n.className),t.className&&(f=(f?f+" ":"")+t.className),Ke.createElement("svg",Nh({stroke:"currentColor",fill:"
53currentColor",strokeWidth:"0"},n.attr,r,u,{className:f,style:Lh(Lh({color:t.color||n.color},n.style),t.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),a&&Ke.createElement("title",null,a),t.children)};return N1!==void 0?Ke.createElement(N1.Consumer,null,n=>e(n)):e(tS)}function _D(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 244 144-144 144 144M256 120v292"},child:[]}]})(t)}function ED(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(t)}function SD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M480 257.35c0-123.7-100.3-224-224-224s-224 100.3-224 224c0 111.8 81.9 204.47 189 221.29V322.12h-56.89v-64.77H221V208c0-56.13 33.45-87.16 84.61-87.16 24.51 0 50.15 4.38 50.15 4.38v55.13H327.5c-27.81 0-36.51 17.26-36.51 35v42h62.12l-9.92 64.77H291v156.54c107.1-16.81 189-109.48 189-221.31z"},child:[]}]})(t)}function TD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M349.33 69.33a93.62 93.62 0 0 1 93.34 93.34v186.66a93.62 93.62 0 0 1-93.34 93.34H162.67a93.62 93.62 0 0 1-93.34-93.34V162.67a93.62 93.62 0 0 1 93.34-93.34h186.66m0-37.33H162.67C90.8 32 32 90.8 32 162.67v186.66C32 421.2 90.8 480 162.67 480h186.66C421.2 480 480 421.2 480 349.33V162.67C480 90.8 421.2 32 349.33 32z"},child:[]},{tag:"path",attr:{d:"M377.33 162.67a28 28 0 1 1 28-28 27.94 27.94 0 0 1-28 28zM256 181.33A74.67 74.67 0 1 1 181.33 256 74.75 74.75 0 0 1 256 181.33m0-37.33a112 112 0 1 0 112 112 112 112 0 0 0-112-112z"},child:[]}]})(t)}function bD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M414.73 97.1A222.14 222.14 0 0 0 256.94 32C134 32 33.92 131.58 33.87 254a220.61 220.61 0 0 0 29.78 111L32 480l118.25-30.87a223.63 223.63 0 0 0 106.6 27h.09c122.93 0 223-99.59 223.06-222A220.18 220.18 0 0 0 414.73 97.1zM256.94 438.66h-.08a185.75 185.75 0 0 1-94.36-25.72l-6.77-4-70.17 18.32 18.73-68.09-4.41-7A183.46 183.46 0 0 1 71.53 254c0-101.73 83.21-184.5 185.48-184.5a185 185 0 0 1 185.33 184.64c-.04 101.74-83.21 184.52-185.4 184.52zm101.69-138.19c-5.57-2.78-33-16.2-38.08-18.05s-8.83-2.78-12.54 2.78-14.4 18-17.65 21.75-6.5 4.16-12.07 1.38-23.54-8.63-44.83-27.53c-16.57-14.71-27.75-32.87-31-38.42s-.35-8.56 2.44-11.32c2.51-2.49 5.57-6.48 8.36-9.72s3.72-5.56 5.57-9.26.93-6.94-.46-9.71-12.54-30.08-17.18-41.19c-4.53-10.82-9.12-9.35-12.54-9.52-3.25-.16-7-.2-10.69-.2a20.53 20.53 0 0 0-14.86 6.94c-5.11 5.56-19.51 19-19.51 46.28s20 53.68 22.76 57.38 39.3 59.73 95.21 83.76a323.11 323.11 0 0 0 31.78 11.68c13.35 4.22 25.5 3.63 35.1 2.2 10.71-1.59 33-13.42 37.63-26.38s4.64-24.06 3.25-26.37-5.11-3.71-10.69-6.48z"},child:[]}]})(t)}function ID(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(t)}function CD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"},child:[]}]})(t)}function RD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 48v48m0 320v48m147.08-355.08-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48m-320 0H48m355.08 147.08-33.94-33.94M142.86 142.86l-33.94-33.94"},child:[]},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32"},child:[]}]})(t)}function AD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"},child:[]}]})(t)}function kD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722
53-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z"},child:[]}]})(t)}function xD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.
531-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"},child:[]}]})(t)}function PD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm121.8 169.9l-40.7 191.8c-3 13.6-11.1 16.9-22.4 10.5l-62-45.7-29.9 28.8c-3.3 3.3-6.1 6.1-12.5 6.1l4.4-63.1 114.9-103.8c5-4.4-1.1-6.9-7.7-2.5l-142 89.4-61.2-19.1c-13.3-4.2-13.6-13.3 2.8-19.7l239.1-92.2c11.1-4 20.8 2.7 17.2 19.5z"},child:[]}]})(t)}function ND(t){return Fe({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"},child:[]}]})(t)}function LD(t){return Fe({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M214.75,211.71l-62.6-98.38,61.77-67.95a8,8,0,0,0-11.84-10.76L143.24,99.34,102.75,35.71A8,8,0,0,0,96,32H48a8,8,0,0,0-6.75,12.3l62.6,98.37-61.77,68a8,8,0,1,0,11.84,10.76l58.84-64.72,40.49,63.63A8,8,0,0,0,160,224h48a8,8,0,0,0,6.75-12.29ZM164.39,208,62.57,48h29L193.43,208Z"},child:[]}]})(t)}const kf=[{id:"1",plan:"Daily",billing:"Day",title:"Full access to daily predictions",price:200,features:["Daily match predictions","Expert Betting Tips","8+ odds"],color:"#059212"},{id:"2",plan:"Weekly",billing:"Week",title:"Exclusive weekly access to expert tips",price:700,features:["8+ odds daily","7 Days VIP Tips","VIP Correct Score"],color:"#00A36C"},{id:"3",plan:"Monthly",billing:"Month",title:"Comprehensive predictions for dedicated fans",price:2e3,features:["8+ odds per day","Priority Customer Support","VIP Tips Access For 30 Days Tips"],color:"#0A6847"}],DD=[{id:1,question:"What is the accuracy of your football predictions?",answer:"Our predictions are based on a combination of historical data, expert analysis, and advanced algorithms. While no prediction is 100% guaranteed, we strive to provide highly accurate and data-driven insights to help you make informed decisions."},{id:2,question:"How can I subscribe to your services?",answer:"You can easily subscribe through our website. We offer several tiered subscription plans that suit different needs, from basic 
53insights to premium, detailed predictions. Simply choose your plan and proceed with payment through secure method we have provided."},{id:3,question:"Can I cancel or change my subscription?",answer:"No, you cannot terminate your subscription. Make sure to be certain about making a subscription so that you will not be charged against your will."},{id:4,question:"What kind of football matches do you provide predictions for?",answer:"We provide predictions for major leagues, international tournaments, and high-profile football matches. This includes competitions like the Premier League, La Liga, Serie A, Champions League, World Cup, and more."},{id:6,question:"How do you calculate your predictions?",answer:"Our predictions are based on a combination of factors, including team performance, player statistics, historical match data, and even current form. We also incorporate machine learning models to continuously improve the accuracy of our predictions."},{id:7,question:"Can I trust your predictions for betting?",answer:"While our predictions are based on solid data and analysis, betting should always be done responsibly, and we cannot be held accountable for any losses."},{id:8,question:"Do you provide live updates during matches?",answer:"Yes, we offer live updates during key matches. These updates provide additional insights, such as in-game performance metrics, injury reports, and tactical changes that may affect match outcomes."},{id:9,question:"What is the best subscription plan for me?",answer:"It depends on your needs. Our basic plan offers essential predictions, while our premium plans provide more detailed analysis, advanced stats, and expert insights. Review the plans and choose the one that best fits your level of interest."},{id:10,question:"How secure is my payment information?",answer:"We take security seriously. All payment transactions are processed through secure, encrypted payment gateway. Your payment information is never stored on our servers."}],OD=[{emoji:"🤝",title:"100% Guaranteed"},{emoji:"✅",title:"Secure Payments"},{emoji:"🏆",title:"Expert Analysis"},{emoji:"🚀",title:"Live Updates"}],VD=[{id:1,icon:m.jsx(SD,{}),url:"https://www.facebook.com/profile.php?id=699140333272591",title:"Facebook"},{id:2,icon:m.jsx(PD,{}),url:"https://t.me/bet365gurus",title:"Telegram"},{id:3,icon:m.jsx(bD,{}),url:"https://whatsapp.com/channel/0029VayjRf71t90afonqcy0b",title:"WhatsApp"},{id:4,icon:m.jsx(LD,{}),url:"https://x.com/goalgeniusvip",title:"X(Twitter)"},{id:5,icon:m.jsx(TD,{}),url:"https://instagram.com/goalgenius.vip",title:"Instagram"}],MD=[{id:1,name:"James Kariuki",title:"Daily Plan",description:"The predictions helped me make smarter decisions. Great for casual bettors like me!"},{id:2,name:"Jonny_john",title:"Monthly Plan",description:"The expert analysis and detailed stats are game-changers. Highly recommend the Premium plan!"},{id:3,name:"Alicia Chepkoech",title:"Weekly Plan",description:"As a serious football fan, the Platinum plan provides unmatched predictions!"},{id:4,name:"Johnson Nekesa",title:"Daily Plan",description:"The real-time updates and in-depth stats are fantastic. Helped me stay ahead of the game!"},{id:5,name:"sarah-nduku",title:"Monthly Plan",description:"Worth every penny! The predictions are accurate, and the insights are top-notch."}],{persistAtom:Ry}=hD.recoilPersist(),br=lc({key:"userState",default:null,effects_UNSTABLE:[Ry]});lc({key:"postsState",default:null,effects_UNSTABLE:[Ry]});lc({key:"themeState",default:"light"});const Js=lc({key:"notificationState",default:{isVisible:!1,type:null,message:null}}),jD=lc({key:"subscriptionState",default:kf[1],effects_UNSTABLE:[Ry]});var D1={};/**
54 * @license
55 * Copyright 2017 Google LLC
56 *
57 * Licensed under the Apache License, Version 2.0 (the "License");
58 * you may not use this file except in compliance with the License.
59 * You may obtain a copy of the License at
60 *
61 *   http://www.apache.org/licenses/LICENSE-2.0
62 *
63 * Unless required by applicable law or agreed to in writing, software
64 * distributed under the License is distributed on an "AS IS" BASIS,
65 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
66 * See the License for the specific language governing permissions and
67 * limitations under the License.
68 */const rS=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},FD=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 a=t[n++];e[r++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){const a=t[n++],u=t[n++],d=t[n++],f=((i&7)<<18|(a&63)<<12|(u&63)<<6|d&63)-65536;e[r++]=String.fromCharCode(55296+(f>>10)),e[r++]=String.fromCharCode(56320+(f&1023))}else{const a=t[n++],u=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(a&63)<<6|u&63)}}return e.join("")},sS={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 a=t[i],u=i+1<t.length,d=u?t[i+1]:0,f=i+2<t.length,p=f?t[i+2]:0,w=a>>2,E=(a&3)<<4|d>>4;let T=(d&15)<<2|p>>6,b=p&63;f||(b=64,u||(T=64)),r.push(n[w],n[E],n[T],n[b])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(rS(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):FD(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 a=n[t.charAt(i++)],d=i<t.length?n[t.charAt(i)]:0;++i;const p=i<t.length?n[t.charAt(i)]:64;++i;const E=i<t.length?n[t.charAt(i)]:64;if(++i,a==null||d==null||p==null||E==null)throw new UD;const T=a<<2|d>>4;if(r.push(T),p!==64){const b=d<<4&240|p>>2;if(r.push(b),E!==64){const I=p<<6&192|E;
68r.push(I)}}}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 UD extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const $D=function(t){const e=rS(t);return sS.encodeByteArray(e,!0)},Dh=function(t){return $D(t).replace(/\./g,"")},iS=function(t){try{return sS.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
69 * @license
70 * Copyright 2022 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 */function BD(){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.")}/**
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 */const zD=()=>BD().__FIREBASE_DEFAULTS__,HD=()=>
vendor: 5,061 bytes, lines 98-147
98{if(typeof process>"u"||typeof D1>"u")return;const t=D1.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},WD=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&iS(t[1]);return e&&JSON.parse(e)},xf=()=>{try{return zD()||HD()||WD()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},oS=t=>{var e,n;return(n=(e=xf())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},qD=t=>{const e=oS(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]},aS=()=>{var t;return(t=xf())===null||t===void 0?void 0:t.config},lS=t=>{var e;return(e=xf())===null||e===void 0?void 0:e[`_${t}`]};/**
99 * @license
100 * Copyright 2017 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 */class GD{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))}}}/**
114 * @license
115 * Copyright 2021 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 */function KD(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,a=t.sub||t.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const u=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}}},t);return[Dh(JSON.stringify(n)),Dh(JSON.stringify(u)),""].join(".")}/**
129 * @license
130 * Copyright 2017 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 An(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function QD(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(An())}function YD(){var t;const e=(t=xf())===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 XD(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function JD(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function ZD(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function eO(){const t=An();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function tO(){return!YD()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function nO(){try{return typeof indexedDB=="object"}catch{return!1}}function rO(){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 a;e(((a=i.error)===null||a===void 0?void 0:a.message)||"")}}catch(n){e(n)}})}/**
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 */const sO="FirebaseError";class Zs extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=sO,Object.setPrototypeOf(this,Zs.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,uc.prototype.create)}}class uc{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,a=this.errors[e],u=a?iO(a,r):"Error",d=`${this.serviceName}: ${u} (${i}).`;return new Zs(i,d,r)}}function iO(t,e){return t.replace(oO,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const oO=/\{\$([^}]+)}/g;function aO(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Oh(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const a=t[i],u=e[i];if(O1(a)&&O1(u)){if(!Oh(a,u))return!1}else if(a!==u)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function O1(t){return t!==null&&typeof t=="object"}/**
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 */function cc(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 Tu(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,a]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(a)}}),e}function bu(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function lO(t,e){const n=new uO(t,e);return n.subscribe.bind(n)}class uO{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.");cO(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Wm),i.error===void 0&&(i.error=Wm),i.complete===void 0&&(i.complete=Wm);const a=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),a}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 cO(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 Wm(){}
173/**
174 * @license
175 * Copyright 2021 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 cn(t){return t&&t._delegate?t._delegate:t}class Uo{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}}/**
189 * @license
190 * Copyright 2019 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 */const Po="[DEFAULT]";/**
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 */class dO{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 GD;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(a){if(i)return null;throw a}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(fO(e))try{this.getOrInitializeService({instanceIdentifier:Po})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const a=this.getOrInitializeService({instanceIdentifier:i});r.resolve(a)}catch{}}}}clearInstance(e=Po){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=Po){return this.instances.has(e)}getOptions(e=Po){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[a,u]of this.instancesDeferred.entries()){const d=this.normalizeInstanceIdentifier(a);r===d&&u.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),a=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;a.add(e),this.onInitCallbacks.set(i,a);const u=this.instances.get(i);return u&&e(u,i),()=>{a.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:hO(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=Po){return this.component?this.component.multipleInstances?e:Po:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function hO(t){return t===Po?void 0:t}function fO(t){return t.instantiationMode==="EAGER"}/**
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 pO{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 dO(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
234 * @license
235 * Copyright 2017 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 */var Ze;(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"})(Ze||(Ze={}));const mO={debug:Ze.DEBUG,verbose:Ze.VERBOSE,info:Ze.INFO,warn:Ze.WARN,error:Ze.ERROR,silent:Ze.SILENT},gO=Ze.INFO,yO={[Ze.DEBUG]:"log",[Ze.VERBOSE]:"log",[Ze.INFO]:"info",[Ze.WARN]:"warn",[Ze.ERROR]:"error"},vO=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=yO[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 Ay{constructor(e){this.name=e,this._logLevel=gO,this._logHandler=vO,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Ze))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?mO[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,Ze.DEBUG,...e),this._logHandler(this,Ze.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Ze.VERBOSE,...e),this._logHandler(this,Ze.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Ze.INFO,...e),this._logHandler(this,Ze.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Ze.WARN,...e),this._logHandler(this,Ze.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Ze.ERROR,...e),this._logHandler(this,Ze.ERROR,...e)}}const wO=(t,e)=>e.some(n=>t instanceof n);let V1,M1;function _O(){return V1||(V1=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function EO(){return M1||(M1=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const uS=new WeakMap,Tg=new WeakMap,cS=new WeakMap,qm=new WeakMap,ky=new WeakMap;function SO(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",a),t.removeEventListener("error",u)},a=()=>{n(Fi(t.result)),i()},u=()=>{r(t.error),i()};t.addEventListener("success",a),t.addEventListener("error",u)});return e.then(n=>{n instanceof IDBCursor&&uS.set(n,t)}).catch(()=>{}),ky.set(e,t),e}function TO(t){if(Tg.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",u),t.removeEventListener("abort",u)},a=()=>{n(),i()},u=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",a),t.addEventListener("error",u),t.addEventListener("abort",u)});Tg.set(t,e)}let bg={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Tg.get(t);if(e==="objectStoreNames")return t.objectStoreNames||cS.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Fi(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 bO(t){bg=t(bg)}function IO(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Gm(this),e,...n);return cS.set(r,e.sort?e.sort():[e]),Fi(r)}:EO().includes(t)?function(...e){return t.apply(Gm(this),e),Fi(uS.get(this))}:function(...e){return Fi(t.apply(Gm(this),e))}}function CO(t){return typeof t=="function"?IO(t):(t instanceof IDBTransaction&&TO(t),wO(t,_O())?new Proxy(t,bg):t)}function Fi(t){if(t instanceof IDBRequest)return SO(t);if(qm.has(t))return qm.get(t);const e=CO(t);return e!==t&&(qm.set(t,e),ky.set(e,t)),e}const Gm=t=>ky.get(t);function RO(t,e,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const u=indexedDB.open(t,e),d=Fi(u);return r&&u.addEventListener("upgradeneeded",f=>{r(Fi(u.result),f.oldVersion,f.newVersion,Fi(u.transaction),f)}),n&&u.addEventListener("blocked",f=>n(f.oldVersion,f.newVersion,f)),d.then(f=>{a&&f.addEventListener("close",()=>a()),i&&f.addEventListener("versionchange",p=>i(p.oldVersion,p.newVersion,p))}).catch(()=>{}),d}const AO=["get","getKey","getAll","getAllKeys","count"],kO=["put","add","delete","clear"],Km=new Map;function j1(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Km.get(e))return Km.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=kO.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||AO.includes(n)))return;const a=async function(u,...d){const f=this.transaction(u,i?"readwrite":"readonly");let p=f.store;
248return r&&(p=p.index(d.shift())),(await Promise.all([p[n](...d),i&&f.done]))[0]};return Km.set(e,a),a}bO(t=>({...t,get:(e,n,r)=>j1(e,n)||t.get(e,n,r),has:(e,n)=>!!j1(e,n)||t.has(e,n)}));/**
249 * @license
250 * Copyright 2019 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 */class xO{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(PO(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function PO(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Ig="@firebase/app",F1="0.10.17";/**
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 */const qs=new Ay("@firebase/app"),NO="@firebase/app-compat",LO="@firebase/analytics-compat",DO="@firebase/analytics",OO="@firebase/app-check-compat",VO="@firebase/app-check",MO="@firebase/auth",jO="@firebase/auth-compat",FO="@firebase/database",UO="@firebase/data-connect",$O="@firebase/database-compat",BO="@firebase/functions",zO="@firebase/functions-compat",HO="@firebase/installations",WO="@firebase/installations-compat",qO="@firebase/messaging",GO="@firebase/messaging-compat",KO="@firebase/performance",QO="@firebase/performance-compat",YO="@firebase/remote-config",XO="@firebase/remote-config-compat",JO="@firebase/storage",ZO="@firebase/storage-compat",eV="@firebase/firestore",tV="@firebase/vertexai",nV="@firebase/firestore-compat",rV="firebase",sV="11.1.0";/**
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 Cg="[DEFAULT]",iV={[Ig]:"fire-core",[NO]:"fire-core-compat",[DO]:"fire-analytics",[LO]:"fire-analytics-compat",[VO]:"fire-app-check",[OO]:"fire-app-check-compat",[MO]:"fire-auth",[jO]:"fire-auth-compat",[FO]:"fire-rtdb",[UO]:"fire-data-connect",[$O]:"fire-rtdb-compat",[BO]:"fire-fn",[zO]:"fire-fn-compat",[HO]:"fire-iid",[WO]:"fire-iid-compat",[qO]:"fire-fcm",[GO]:"fire-fcm-compat",[KO]:"fire-perf",[QO]:"fire-perf-compat",[YO]:"fire-rc",[XO]:"fire-rc-compat",[JO]:"fire-gcs",[ZO]:"fire-g
293cs-compat",[eV]:"fire-fst",[nV]:"fire-fst-compat",[tV]:"fire-vertex","fire-js":"fire-js",[rV]:"fire-js-all"};/**
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 Vh=new Map,oV=new Map,Rg=new Map;function U1(t,e){try{t.container.addComponent(e)}catch(n){qs.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function el(t){const e=t.name;if(Rg.has(e))return qs.debug(`There were multiple attempts to register component ${e}.`),!1;Rg.set(e,t);for(const n of Vh.values())U1(n,t);for(const n of oV.values())U1(n,t);return!0}function xy(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function us(t){return t.settings!==void 0}/**
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 aV={"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
323d-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."},Ui=new uc("app","Firebase",aV);/**
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 */class lV{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 Uo("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 Ui.create("app-deleted",{appName:this._name})}}/**
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 */const yl=sV;function dS(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:Cg,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw Ui.create("bad-app-name",{appName:String(i)});if(n||(n=aS()),!n)throw Ui.create("no-options");const a=Vh.get(i);if(a){if(Oh(n,a.options)&&Oh(r,a.config))return a;throw Ui.create("duplicate-app",{appName:i})}const u=new pO(i);for(const f of Rg.values())u.addComponent(f);const d=new lV(n,r,u);return Vh.set(i,d),d}function hS(t=Cg){const e=Vh.get(t);if(!e&&t===Cg&&aS())return dS();if(!e)throw Ui.create("no-app",{appName:t});return e}function $i(t,e,n){var r;let i=(r=iV[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const a=i.match(/\s|\//),u=e.match(/\s|\//);if(a||u){const d=[`Unable to register library "${i}" with version "${e}":`];a&&d.push(`library name "${i}" contains illegal characters (whitespace or "/")`),a&&u&&d.push("and"),u&&d.push(`version name "${e}" contains illegal characters (whitespace or "/")`),qs.warn(d.join(" "));return}el(new Uo(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
354 * @license
355 * Copyright 2021 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, softw
363are
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 uV="firebase-heartbeat-database",cV=1,Uu="firebase-heartbeat-store";let Qm=null;function fS(){return Qm||(Qm=RO(uV,cV,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(Uu)}catch(n){console.warn(n)}}}}).catch(t=>{throw Ui.create("idb-open",{originalErrorMessage:t.message})})),Qm}async function dV(t){try{const n=(await fS()).transaction(Uu),r=await n.objectStore(Uu).get(pS(t));return await n.done,r}catch(e){if(e instanceof Zs)qs.warn(e.message);else{const n=Ui.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});qs.warn(n.message)}}}async function $1(t,e){try{const r=(await fS()).transaction(Uu,"readwrite");await r.objectStore(Uu).put(e,pS(t)),await r.done}catch(n){if(n instanceof Zs)qs.warn(n.message);else{const r=Ui.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});qs.warn(r.message)}}}function pS(t){return`${t.name}!${t.options.appId}`}/**
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, software
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 hV=1024,fV=30*24*60*60*1e3;class pV{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new gV(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(),a=B1();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===a||this._heartbeatsCache.heartbeats.some(u=>u.date===a)?void 0:(this._heartbeatsCache.heartbeats.push({date:a,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(u=>{const d=new Date(u.date).valueOf();return Date.now()-d<=fV}),this._storage.overwrite(this._heartbeatsCache))}catch(r){qs.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=B1(),{heartbeatsToSend:r,unsentEntries:i}=mV(this._heartbeatsCache.heartbeats),a=Dh(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)),a}catch(n){return qs.warn(n),""}}}function B1(){return new Date().toISOString().substring(0,10)}function mV(t,e=hV){const n=[];let r=t.slice();for(const i of t){const a=n.find(u=>u.agent===i.agent);if(a){if(a.dates.push(i.date),z1(n)>e){a.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),z1(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class gV{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return nO()?rO().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await dV(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();return $1(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 $1(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function z1(t){return Dh(JSON.stringify({version:2,heartbeats:t})).length}/**
384 * @license
385 * Copyright 2019 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 */function yV(t){el(new Uo("platform-logger",e=>new xO(e),"PRIVATE")),el(new Uo("heartbeat",e=>new pV(e),"PRIVATE")),$i(Ig,F1,t),$i(Ig,F1,"esm2017"),$i("fire-js","")}yV("");function Py(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 mS(){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 vV=mS,gS=new uc("auth","Firebase",mS());/**
399 * @license
400 * Copyright 2020 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 */const Mh=new Ay("@firebase/auth");function wV(t,...e){Mh.logLevel<=Ze.WARN&&Mh.warn(`Auth (${yl}): ${t}`,...e)}function gh(t,...e){Mh.logLevel<=Ze.ERROR&&Mh.error(`Auth (${yl}): ${t}`,...e)}/**
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 */function Wr(t,...e){throw Ny(t,...e)}function cs(t,...e){return Ny(t,...e)}function yS(t,e,n){const r=Object.assign(Object.assign({},vV()),{[e]:n});return new uc("auth","Firebase",r).create(e,{appName:t.name})}function zs(t){return yS(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Ny(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 gS.create(t,...e)}function $e(t,e,...n){if(!t)throw Ny(e,...n)}function Fs(t){const e="INTERNAL ASSERTION FAILED: "+t;throw gh(e),new Error(e)}function Gs(t,e){t||Fs(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 Ag(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function _V(){return H1()==="http:"||H1()==="https:"}function H1(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/**
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 EV(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(_V()||JD()||"connection"in navigator)?navigator.onLine:!0}function SV(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||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 */class dc{constructor(e,n){this.shortDelay=e,this.longDelay=n,Gs(n>e,"Short delay should be less than long delay!"),this.isMobile=QD()||ZD()}get(){return EV()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
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 */function Ly(t,e){Gs(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/**
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 */class vS{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;Fs("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Fs("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;Fs("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
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 */const TV={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"};/**
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 bV=new dc(3e4,6e4);function ei(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function ti(t,e,n,r,i={}){return wS(t,i,async()=>{let a={},u={};r&&(e==="GET"?u=r:a={body:JSON.stringify(r)});const d=cc(Object.assign({key:t.config.apiKey},u)).slice(1),f=await t._getAdditionalHeaders();f["Content-Type"]="application/json",t.languageCode&&(f["X-Firebase-Locale"]=t.languageCode);const p=Object.assign({method:e,headers:f},a);return XD()||(p.referrerPolicy="no-referrer"),vS.fetch()(_S(t,t.config.apiHost,n,d),p)})}async function wS(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},TV),e);try{const i=new CV(t),a=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const u=await a.json();if("needConfirmation"in u)throw Xd(t,"account-exists-with-different-credential",u);if(a.ok&&!("errorMessage"in u))return u;{const d=a.ok?u.errorMessage:u.error.message,[f,p]=d.split(" : ");if(f==="FEDERATED_USER_ID_ALREADY_LINKED")throw Xd(t,"credential-already-in-use",u);if(f==="EMAIL_EXISTS")throw Xd(t,"email-already-in-use",u);if(f==="USER_DISABLED")throw Xd(t,"user-disabled",u);const w=r[f]||f.toLowerCase().replace(/[_\s]+/g,"-");if(p)throw yS(t,w,p);Wr(t,w)}}catch(i){if(i instanceof Zs)throw i;Wr(t,"network-request-failed",{message:String(i)})}}async function hc(t,e,n,r,i={}){const a=await ti(t,e,n,r,i);return"mfaPendingCredential"in a&&Wr(t,"multi-factor-auth-required",{_serverResponse:a}),a}function _S(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?Ly(t.config,i):`${t.config.apiScheme}://${i}`}function IV(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class CV{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(cs(this.auth,"network-request-failed")),bV.get())})}}function Xd(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=cs(t,e,r);return i.customData._tokenResponse=n,i}function W1(t){return t!==void 0&&t.enterprise!==void 0}class RV{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return IV(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PRO
533VIDER")}}async function AV(t,e){return ti(t,"GET","/v2/recaptchaConfig",ei(t,e))}/**
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 */async function kV(t,e){return ti(t,"POST","/v1/accounts:delete",e)}async function ES(t,e){return ti(t,"POST","/v1/accounts:lookup",e)}/**
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 */function Lu(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function xV(t,e=!1){const n=cn(t),r=await n.getIdToken(e),i=Dy(r);$e(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const a=typeof i.firebase=="object"?i.firebase:void 0,u=a==null?void 0:a.sign_in_provider;return{claims:i,token:r,authTime:Lu(Ym(i.auth_time)),issuedAtTime:Lu(Ym(i.iat)),expirationTime:Lu(Ym(i.exp)),signInProvider:u||null,signInSecondFactor:(a==null?void 0:a.sign_in_second_factor)||null}}function Ym(t){return Number(t)*1e3}function Dy(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return gh("JWT malformed, contained fewer than 3 sections"),null;try{const i=iS(n);return i?JSON.parse(i):(gh("Failed to decode base64 JWT payload"),null)}catch(i){return gh("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function q1(t){const e=Dy(t);return $e(e,"internal-error"),$e(typeof e.exp<"u","internal-error"),$e(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/**
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 */async function $u(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Zs&&PV(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function PV({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/**
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 */class NV{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()}}/**
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 kg{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Lu(this.lastLoginAt),this.creationTime=Lu(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
609 * @license
610 * Copyright 2019 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 */async function jh(t){var e;const n=t.auth,r=await t.getIdToken(),i=await $u(t,ES(n,{idToken:r}));$e(i==null?void 0:i.users.length,n,"internal-error");const a=i.users[0];t._notifyReloadListener(a);const u=!((e=a.providerUserInfo)===null||e===void 0)&&e.length?SS(a.providerUserInfo):[],d=DV(t.providerData,u),f=t.isAnonymous,p=!(t.email&&a.passwordHash)&&!(d!=null&&d.length),w=f?p:!1,E={uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:d,metadata:new kg(a.createdAt,a.lastLoginAt),isAnonymous:w};Object.assign(t,E)}async function LV(t){const e=cn(t);await jh(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function DV(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function SS(t){return t.map(e=>{var{providerId:n}=e,r=Py(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
624 * @license
625 * Copyright 2020 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 OV(t,e){const n=await wS(t,{},async()=>{const r=cc({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:a}=t.config,u=_S(t,i,"/v1/token",`key=${a}`),d=await t._getAdditionalHeaders();return d["Content-Type"]="application/x-www-form-urlencoded",vS.fetch()(u,{method:"POST",headers:d,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function VV(t,e){return ti(t,"POST","/v2/accounts:revokeToken",ei(t,e))}/**
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 */class Ba{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){$e(e.idToken,"internal-error"),$e(typeof e.idToken<"u","internal-error"),$e(typeof e.refreshToken<"u","internal-error");
653const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):q1(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){$e(e.length!==0,"internal-error");const n=q1(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:($e(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:a}=await OV(e,n);this.updateTokensAndExpiration(r,i,Number(a))}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:a}=n,u=new Ba;return r&&($e(typeof r=="string","internal-error",{appName:e}),u.refreshToken=r),i&&($e(typeof i=="string","internal-error",{appName:e}),u.accessToken=i),a&&($e(typeof a=="number","internal-error",{appName:e}),u.expirationTime=a),u}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 Ba,this.toJSON())}_performRefresh(){return Fs("not implemented")}}/**
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 */function Ai(t,e){$e(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Us{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,a=Py(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new NV(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?[...a.providerData]:[],this.metadata=new kg(a.createdAt||void 0,a.lastLoginAt||void 0)}async getIdToken(e){const n=await $u(this,this.stsTokenManager.getToken(this.auth,e));return $e(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return xV(this,e)}reload(){return LV(this)}_assign(e){this!==e&&($e(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 Us(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){$e(!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 jh(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(us(this.auth.app))return Promise.reject(zs(this.auth));const e=await this.getIdToken();return await $u(this,kV(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
668nonymous: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,a,u,d,f,p,w;const E=(r=n.displayName)!==null&&r!==void 0?r:void 0,T=(i=n.email)!==null&&i!==void 0?i:void 0,b=(a=n.phoneNumber)!==null&&a!==void 0?a:void 0,I=(u=n.photoURL)!==null&&u!==void 0?u:void 0,L=(d=n.tenantId)!==null&&d!==void 0?d:void 0,V=(f=n._redirectEventId)!==null&&f!==void 0?f:void 0,U=(p=n.createdAt)!==null&&p!==void 0?p:void 0,M=(w=n.lastLoginAt)!==null&&w!==void 0?w:void 0,{uid:Q,emailVerified:te,isAnonymous:he,providerData:ae,stsTokenManager:D}=n;$e(Q&&D,e,"internal-error");const R=Ba.fromJSON(this.name,D);$e(typeof Q=="string",e,"internal-error"),Ai(E,e.name),Ai(T,e.name),$e(typeof te=="boolean",e,"internal-error"),$e(typeof he=="boolean",e,"internal-error"),Ai(b,e.name),Ai(I,e.name),Ai(L,e.name),Ai(V,e.name),Ai(U,e.name),Ai(M,e.name);const x=new Us({uid:Q,auth:e,email:T,emailVerified:te,displayName:E,isAnonymous:he,photoURL:I,phoneNumber:b,tenantId:L,stsTokenManager:R,createdAt:U,lastLoginAt:M});return ae&&Array.isArray(ae)&&(x.providerData=ae.map(k=>Object.assign({},k))),V&&(x._redirectEventId=V),x}static async _fromIdTokenResponse(e,n,r=!1){const i=new Ba;i.updateFromServerResponse(n);const a=new Us({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await jh(a),a}static async _fromGetAccountInfoResponse(e,n,r){const i=n.users[0];$e(i.localId!==void 0,"internal-error");const a=i.providerUserInfo!==void 0?SS(i.providerUserInfo):[],u=!(i.email&&i.passwordHash)&&!(a!=null&&a.length),d=new Ba;d.updateFromIdToken(r);const f=new Us({uid:i.localId,auth:e,stsTokenManager:d,isAnonymous:u}),p={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new kg(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(a!=null&&a.length)};return Object.assign(f,p),f}}/**
669 * @license
670 * Copyright 2020 Google LLC
671 *
672 * Licensed under the Apache License, Version 2.0 (the "License");
673 * you may not use this file except in compliance with the License.
674 * You may obtain a copy of the License at
675 *
676 *   http://www.apache.org/licenses/LICENSE-2.0
677 *
678 * Unless required by applicable law or agreed to in writing, software
679 * distributed under the License is distributed on an "AS IS" BASIS,
680 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
681 * See the License for the specific language governing permissions and
682 * limitations under the License.
683 */const G1=new Map;function $s(t){Gs(t instanceof Function,"Expected a class definition");let e=G1.get(t);return e?(Gs(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,G1.set(t,e),e)}/**
684 * @license
685 * Copyright 2019 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 */class TS{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){}}TS.type="NONE";const K1=TS;/**
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 */function yh(t,e,n){return`firebase:${t}:${e}:${n}`}class za{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:a}=this.auth;this.fullUserKey=yh(this.userKey,i.apiKey,a),this.fullPersistenceKey=yh("persistence",i.apiKey,a),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?Us._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 za($s(K1),e,r);const i=(await Promise.all(n.map(async p=>{if(await p._isAvailable())return p}))).filter(p=>p);let a=i[0]||$s(K1);const u=yh(r,e.config.apiKey,e.name);let d=null;for(const p of n)try{const w=await p._get(u);if(w){const E=Us._fromJSON(e,w);p!==a&&(d=E),a=p;break}}catch{}const f=i.filter(p=>p._shouldAllowMigration);return!a._shouldAllowMigration||!f.length?new za(a,e,r):(a=f[0],d&&await a._set(u,d.toJSON()),await Promise.all(n.map(async p=>{if(p!==a)try{await p._remove(u)}catch{}})),new za(a,e,r))}}/**
714 * @license
715 * Copyright 2020 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 Q1(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(RS(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(bS(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(kS(e))return"Blackberry";if(xS(e))return"Webos";if(IS(e))return"Safari";if((e.includes("chrome/")||CS(e))&&!e.includes("edge/"))return"Chrome";if(AS(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 bS(t=An()){return/firefox\//i.test(t)}function IS(t=An()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function CS(t=An()){return/crios\//i.test(t)}function RS(t=An()){return/iemobile/i.test(t)}function AS(t=An()){return/android/i.test(t)}function kS(t=An()){return/blackberry/i.test(t)}function xS(t=An()){return/webos/i.test(t)}function Oy(t=An()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function MV(t=An()){var e;return Oy(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function jV(){return eO()&&document.documentMode===10}function PS(t=An()){return Oy(t)||AS(t)||xS(t)||kS(t)||/windows phone/i.test(t)||RS(t)}/**
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 NS(t,e=[]){let n;switch(t){case"Browser":n=Q1(An());break;case"Worker":n=`${Q1(An())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${yl}/${r}`}/**
744 * @license
745 * Copyright 2022 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 */class FV{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=a=>new Promise((u,d)=>{try{const f=e(a);u(f)}catch(f){d(f)}});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})}}}/**
759 * @license
760 * Copyright 2023 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 */async function UV(t,e={}){return ti(t,"GET","/v2/passwordPolicy",ei(t,e))}/**
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 */const $V=6;class BV{constructor(e){var n,r,i,a;const u=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=u.minPasswordLength)!==null&&n!==void 0?n:$V,u.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=u.maxPasswordLength),u.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=u.containsLowercaseCharacter),u.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=u.containsUppercaseCharacter),u.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=u.containsNumericCharacter),u.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=u.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=(a=e.forceUpgradeOnSignin)!==null&&a!==void 0?a:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,a,u,d;const f={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,f),this.validatePasswordCharacterOptions(e,f),f.isValid&&
788(f.isValid=(n=f.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),f.isValid&&(f.isValid=(r=f.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),f.isValid&&(f.isValid=(i=f.containsLowercaseLetter)!==null&&i!==void 0?i:!0),f.isValid&&(f.isValid=(a=f.containsUppercaseLetter)!==null&&a!==void 0?a:!0),f.isValid&&(f.isValid=(u=f.containsNumericCharacter)!==null&&u!==void 0?u:!0),f.isValid&&(f.isValid=(d=f.containsNonAlphanumericCharacter)!==null&&d!==void 0?d:!0),f}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,a){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=a))}}/**
789 * @license
790 * Copyright 2020 Google LLC
791 *
792 * Licensed under the Apache License, Version 2.0 (the "License");
793 * you may not use this file except in compliance with the License.
794 * You may obtain a copy of the License at
795 *
796 *   http://www.apache.org/licenses/LICENSE-2.0
797 *
798 * Unless required by applicable law or agreed to in writing, software
799 * distributed under the License is distributed on an "AS IS" BASIS,
800 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
801 * See the License for the specific language governing permissions and
802 * limitations under the License.
803 */class zV{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 Y1(this),this.idTokenSubscription=new Y1(this),this.beforeStateQueue=new FV(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=gS,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=$s(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await za.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 ES(this,{idToken:e}),r=await Us._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(us(this.app)){const u=this.app.settings.authIdToken;return u?new Promise(d=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(u).then(d,d))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let i=r,a=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const u=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,d=i==null?void 0:i._redirectEventId,f=await this.tryRedirectSignIn(e);(!u||u===d)&&(f!=null&&f.user)&&(i=f.user,a=!0)}if(!i)return this.directlySetCurrentUser(null);
803if(!i._redirectEventId){if(a)try{await this.beforeStateQueue.runMiddleware(i)}catch(u){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(u))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return $e(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 jh(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=SV()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(us(this.app))return Promise.reject(zs(this));const n=e?cn(e):null;return n&&$e(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&&$e(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 us(this.app)?Promise.reject(zs(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return us(this.app)?Promise.reject(zs(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence($s(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 UV(this),n=new BV(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new uc("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 VV(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&&$s(e)||this._popupRedirectResolver;$e(n,this,"argument-error"),this.redirectPersistenceManager=await za.create(this,[$s(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 a=typeof n=="function"?n:n.next.bind(n);let u=!1;const d=this._isInitialized?Promise.resolve():this._initializationPromise;if($e(d,this,"internal-error"),d.then(()=>{u||a(this.currentUser)}),typeof n=="function"){const f=e.addObserver(n,r,i);return()=>{u=!0,f()}}else{const f=e.addObserver(n);return()=>{u=!0,f()}}}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 $e(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=NS(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&&wV(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function eo(t){return cn(t)}class Y1{constructor(e){this.auth=e,this.observer=null,this.addObserver=lO(n=>this.observer=n)}get next(){return $e(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
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 */let Pf={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function HV(t){Pf=t}function LS(t){return Pf.loadJS(t)}function WV(){return Pf.recaptchaEnterpriseScript}function qV(){return Pf.gapiScript}function GV(t){return`__${t}${Math.floor(Math.random()*1e6)}`}class KV{constructor(){this.enterprise=new QV}ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}}class QV{ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}}const YV="recaptcha-enterprise",DS="NO_RECAPTCHA";class XV{constructor(e){this.type=YV,this.auth=eo(e)}async verify(e="verify",n=!1){async function r(a){if(!n){if(a.tenantId==null&&a._agentRecaptchaConfig!=null)return a._agentRecaptchaConfig.siteKey;if(a.tenantId!=null&&a._tenantRecaptchaConfigs[a.tenantId]!==void 0)return a._tenantRecaptchaConfigs[a.tenantId].siteKey}return new Promise(async(u,d)=>{AV(a,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(f=>{if(f.recaptchaKey===void 0)d(new Error("recaptcha Enterprise site key undefined"));else{const p=new RV(f);return a.tenantId==null?a._agentRecaptchaConfig=p:a._tenantRecaptchaConfigs[a.tenantId]=p,u(p.siteKey)}}).catch(f=>{d(f)})})}function i(a,u,d){const f=window.grecaptcha;W1(f)?f.enterprise.ready(()=>{f.enterprise.execute(a,{action:e}).then(p=>{u(p)}).catch(()=>{u(DS)})}):d(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new KV().execute("siteKey",{action:"verify"}):new Promise((a,u)=>{r(this.auth).then(d=>{if(!n&&W1(window.grecaptcha))i(d,a,u);else{if(typeof window>"u"){u(new Error("RecaptchaVerifier is only supported in browser"));return}let f=WV();f.length!==0&&(f+=d),LS(f).then(()=>{i(d,a,u)}).catch(p=>{u(p)})}}).catch(d=>{u(d)})})}}async function X1(t,e,n,r=!1,i=!1){const a=new XV(t);let u;if(i)u=DS;else try{u=await a.verify(n)}catch{u=await a.verify(n,!0)}const d=Object.assign({},e);if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in d){const f=d.phoneEnrollmentInfo.phoneNumber,p=d.phoneEnrollmentInfo.recaptchaToken;Object.assign(d,{phoneEnrollmentInfo:{phoneNumber:f,recaptchaToken:p,captchaResponse:u,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in d){const f=d.phoneSignInInfo.recaptchaToken;Object.assign(d,{phoneSignInInfo:{recaptchaToken:f,captchaResponse:u,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return d}return r?Object.assign(d,{captchaResp:u}):Object.assign(d,{captchaResponse:u}),Object.assign(d,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(d,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),d}async function Fh(t,e,n,r,i){var a;if(!((a=t._getRecaptchaConfig())===null||a===void 0)&&a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const u=await X1(t,e,n,n==="getOobCode");return r(t,u)}else return r(t,e).catch(async u=>{if(u.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const d=await X1(t,e,n,n==="getOobCode");return r(t,d)}else return Promise.reject(u)})}/**
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 */function JV(t,e){const n=xy(t,"auth");if(n.isInitialized()){const i=n.getImmediate(),a=n.getOptions();if(Oh(a,e??{}))return i;Wr(i,"already-initialized")}return n.initialize({options:e})}function ZV(t,e){const n=(e==null?void 0:e.persistence)||[],r=(Array.isArray(n)?n:[n]).map($s);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function eM(t,e,n){const r=eo(t);$e(r._canInitEmulator,r,"emulator-config-failed"),$e(/^https?:\/\//.test(e),r,"invali
833d-emulator-scheme");const i=!1,a=OS(e),{host:u,port:d}=tM(e),f=d===null?"":`:${d}`;r.config.emulator={url:`${a}//${u}${f}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:u,port:d,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),nM()}function OS(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function tM(t){const e=OS(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 a=i[1];return{host:a,port:J1(r.substr(a.length+1))}}else{const[a,u]=r.split(":");return{host:a,port:J1(u)}}}function J1(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function nM(){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())}/**
834 * @license
835 * Copyright 2020 Google LLC
836 *
837 * Licensed under the Apache License, Version 2.0 (the "License");
838 * you may not use this file except in compliance with the License.
839 * You may obtain a copy of the License at
840 *
841 *   http://www.apache.org/licenses/LICENSE-2.0
842 *
843 * Unless required by applicable law or agreed to in writing, software
844 * distributed under the License is distributed on an "AS IS" BASIS,
845 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
846 * See the License for the specific language governing permissions and
847 * limitations under the License.
848 */class Vy{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Fs("not implemented")}_getIdTokenResponse(e){return Fs("not implemented")}_linkToIdToken(e,n){return Fs("not implemented")}_getReauthenticationResolver(e){return Fs("not implemented")}}async function rM(t,e){return ti(t,"POST","/v1/accounts:signUp",e)}/**
849 * @license
850 * Copyright 2020 Google LLC
851 *
852 * Licensed under the Apache License, Version 2.0 (the "License");
853 * you may not use this file except in compliance with the License.
854 * You may obtain a copy of the License at
855 *
856 *   http://www.apache.org/licenses/LICENSE-2.0
857 *
858 * Unless required by applicable law or agreed to in writing, software
859 * distributed under the License is distributed on an "AS IS" BASIS,
860 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
861 * See the License for the specific language governing permissions and
862 * limitations under the License.
863 */async function sM(t,e){return hc(t,"POST","/v1/accounts:signInWithPassword",ei(t,e))}async function iM(t,e){return ti(t,"POST","/v1/accounts:sendOobCode",ei(t,e))}async function oM(t,e){return iM(t,e)}/**
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 aM(t,e){return hc(t,"POST","/v1/accounts:signInWithEmailLink",ei(t,e))}async function lM(t,e){return hc(t,"POST","/v1/accounts:signInWithEmailLink",ei(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 */class Bu extends Vy{constructor(e,n,r,i=null){super("password",r),this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new Bu(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new Bu(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Fh(e,n,"signInWithPassword",sM);case"emailLink":return aM(e,{email:this._email,oobCode:this._password});default:Wr(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Fh(e,r,"signUpPassword",rM);case"emailLink":return lM(e,{idToken:n,email:this._email,oobCode:this._password});default:Wr(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(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 */async function Ha(t,e){return hc(t,"POST","/v1/accounts:signInWithIdp",ei(t,e))}/**
909 * @license
910 * Copyright 2020 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 */const uM="http://localhost";class $o extends Vy{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new $o(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):Wr("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
923once: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,a=Py(n,["providerId","signInMethod"]);if(!r||!i)return null;const u=new $o(r,i);return u.idToken=a.idToken||void 0,u.accessToken=a.accessToken||void 0,u.secret=a.secret,u.nonce=a.nonce,u.pendingToken=a.pendingToken||null,u}_getIdTokenResponse(e){const n=this.buildRequest();return Ha(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,Ha(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,Ha(e,n)}buildRequest(){const e={requestUri:uM,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=cc(n)}return e}}/**
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 */function cM(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function dM(t){const e=Tu(bu(t)).link,n=e?Tu(bu(e)).deep_link_id:null,r=Tu(bu(t)).deep_link_id;return(r?Tu(bu(r)).link:null)||r||n||e||t}class My{constructor(e){var n,r,i,a,u,d;const f=Tu(bu(e)),p=(n=f.apiKey)!==null&&n!==void 0?n:null,w=(r=f.oobCode)!==null&&r!==void 0?r:null,E=cM((i=f.mode)!==null&&i!==void 0?i:null);$e(p&&w&&E,"argument-error"),this.apiKey=p,this.operation=E,this.code=w,this.continueUrl=(a=f.continueUrl)!==null&&a!==void 0?a:null,this.languageCode=(u=f.languageCode)!==null&&u!==void 0?u:null,this.tenantId=(d=f.tenantId)!==null&&d!==void 0?d:null}static parseLink(e){const n=dM(e);try{return new My(n)}catch{return null}}}/**
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, software
949 * distributed under the License is distributed on an "AS IS" BASIS,
950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
951 * See the License for the specific language governing permissions and
952 * limitations under the License.
953 */class vl{constructor(){this.providerId=vl.PROVIDER_ID}static credential(e,n){return Bu._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=My.parseLink(n);return $e(r,"argument-error"),Bu._fromEmailAndCode(e,r.code,r.tenantId)}}vl.PROVIDER_ID="password";vl.EMAIL_PASSWORD_SIGN_IN_METHOD="password";vl.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
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 VS{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}}/**
969 * @license
970 * Copyright 2019 Google LLC
971 *
972 * Licensed under the Apache License, Version 2.0 (the "License");
973 * you may not use this file except in compliance with the License.
974 * You may obtain a copy of the License at
975 *
976 *   http://www.apache.org/licenses/LICENSE-2.0
977 *
978 * Unless required by applicable law or agreed to in writing, software
979 * distributed under the License is distributed on an "AS IS" BASIS,
980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
981 * See the License for the specific language governing permissions and
982 * limitations under the License.
983 */class fc extends VS{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
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 Pi extends fc{constructor(){super("facebook.com")}static credential(e){return $o._fromParams({providerId:Pi.PROVIDER_ID,signInMethod:Pi.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Pi.credentialFromTaggedObject(e)}static credentialFromError(e){return Pi.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Pi.credential(e.oauthAccessToken)}catch{return null}}}Pi.FACEBOOK_SIGN_IN_METHOD="facebook.com";Pi.PROVIDER_ID="facebook.com";/**
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 Ni extends fc{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return $o._fromParams({providerId:Ni.PROVIDER_ID,signInMethod:Ni.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Ni.credentialFromTaggedObject(e)}static credentialFromError(e){return Ni.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Ni.credential(n,r)}catch{return null}}}Ni.GOOGLE_SIGN_IN_METHOD="google.com";Ni.PROVIDER_ID="google.com";/**
1014 * @license
1015 * Copyright 2020 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 */class Li extends fc{constructor(){super("github.com")}static credential(e){return $o._fromParams({providerId:Li.PROVIDER_ID,signInMethod:Li.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Li.credentialFromTaggedObject(e)}static credentialFromError(e){return Li.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Li.credential(e.oauthAccessToken)}catch{return null}}}Li.GITHUB_SIGN_IN_METHOD="github.com";Li.PROVIDER_ID="github.com";/**
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 */class Di extends fc{constructor(){super("twitter.com")}static credential(e,n){return $o._fromParams({providerId:Di.PROVIDER_ID,signInMethod:Di.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Di.credentialFromTaggedObject(e)}static credentialFromError(e){return Di.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Di.credential(n,r)}catch{return null}}}Di.TWITTER_SIGN_IN_METHOD="twitter.com";Di.PROVIDER_ID="twitter.com";/**
1044 * @license
1045 * Copyright 2020 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 */async function hM(t,e){return hc(t,"POST","/v1/accounts:signUp",ei(t,e))}/**
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 */class Bo{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 a=await Us._fromIdTokenResponse(e,r,i),u=Z1(r);return new Bo({user:a,providerId:u,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=Z1(r);return new Bo({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function Z1(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/**
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 Uh extends Zs{constructor(e,n,r,i){var a;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,Uh.prototype),this.customData={appName:e.name,tenantId:(a=e.tenantId)!==null&&a!==void 0?a:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new Uh(e,n,r,i)}}function MS(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(a=>{throw a.code==="auth/multi-factor-auth-required"?Uh._fromErrorAndOperation(t,a,e,r):a})}async function fM(t,e,n=!1){const r=await $u(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Bo._forOperation(t,"link",r)}/**
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 */async function pM(t,e,n=!1){const{auth:r}=t;if(us(r.app))return Promise.reject(zs(r));const i="reauthenticate";try{const a=await $u(t,MS(r,i,e,t),n);$e(a.idToken,r,"internal-error");const u=Dy(a.idToken);$e(u,r,"internal-error");const{sub:d}=u;return $e(t.uid===d,r,"user-mismatch"),Bo._forOperation(t,i,a)}catch(a){throw(a==null?void 0:a.code)==="auth/user-not-found"&&Wr(r,"user-mismatch"),a}}/**
1104 * @license
1105 * Copyright 2020 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 */async function jS(t,e,n=!1){if(us(t.app))return Promise.reject(zs(t));const r="signIn",i=await MS(t,r,e),a=await Bo._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(a.user),a}async function mM(t,e){return jS(eo(t),e)}/**
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 */async function FS(t){const e=eo(t);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}async function gM(t,e,n){const r=eo(t);await Fh(r,{requestType:"PASSWORD_RESET",email:e,clientType:"CLIENT_TYPE_WEB"},"getOobCode",oM)}async function yM(t,e,n){if(us(t.app))return Promise.reject(zs(t));const r=eo(t),u=await Fh(r,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",hM).catch(f=>{throw f.code==="auth/password-does-not-meet-requirements"&&FS(t),f}),d=await Bo._fromIdTokenResponse(r,"signIn",u);return await r._updateCurrentUser(d.user),d}function vM(t,e,n){return us(t.app)?Promise.reject(zs(t)):mM(cn(t),vl.credential(e,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&FS(t),r})}function wM(t,e,n,r){return cn(t).onIdTokenChanged(e,n,r)}function _M(t,e,n){return cn(t).beforeAuthStateChanged(e,n)}function EM(t,e,n,r){return cn(t).onAuthStateChanged(e,n,r)}function SM(t){return cn(t).signOut()}const $h="__sak";/**
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 US{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem($h,"1"),this.storage.removeItem($h),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()}}/**
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 */const TM=1e3,bM=10;class $S extends US{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=PS(),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((u,d,f)=>{this.notifyListeners(u,f)});return}const r=e.key;n?this.detachListener():this.stopPolling();const i=()=>{const u=this.storage.getItem(r);!n&&this.localCache[r]===u||this.notifyListeners(r,u)},a=this.storage.getItem(r);jV()&&a!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,bM):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)})},TM)}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
1163ject.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]}}$S.type="LOCAL";const IM=$S;/**
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 */class BS extends US{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}BS.type="SESSION";const zS=BS;/**
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 */function CM(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/**
1194 * @license
1195 * Copyright 2019 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 */class Nf{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 Nf(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:a}=n.data,u=this.handlersMap[i];if(!(u!=null&&u.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const d=Array.from(u).map(async p=>p(n.origin,a)),f=await CM(d);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:f})}_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)}}Nf.receivers=[];/**
1209 * @license
1210 * Copyright 2020 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 */function jy(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/**
1224 * @license
1225 * Copyright 2019 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 RM{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 a,u;return new Promise((d,f)=>{const p=jy("",20);i.port1.start();const w=setTimeout(()=>{f(new Error("unsupported_event"))},r);u={messageChannel:i,onMessage(E){const T=E;if(T.data.eventId===p)switch(T.data.status){case"ack":clearTimeout(w),a=setTimeout(()=>{f(new Error("timeout"))},3e3);break;case"done":clearTimeout(a),d(T.data.response);break;default:clearTimeout(w),clearTimeout(a),f(new Error("invalid_response"));break}}},this.handlers.add(u),i.port1.addEventListener("message",u.onMessage),this.target.postMessage({eventType:e,eventId:p,data:n},[i.port2])}).finally(()=>{u&&this.removeMessageHandler(u)})}}/**
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 */function ds(){return window}function AM(t){ds().location.href=t}/**
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 */function HS(){return typeof ds().WorkerGlobalScope<"u"&&typeof ds().importScripts=="function"}async function kM(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function xM(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function PM(){return HS()?self:null}/**
1269 * @license
1270 * Copyright 2019 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 WS="firebaseLocalStorageDb",NM=1,Bh="firebaseLocalStorage",qS="fbase_key";class pc{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 Lf(t,e){return t.transaction([Bh],e?"readwrite":"readonly").objectStore(Bh)}function LM(){const t=indexedDB.deleteDatabase(WS);
1283return new pc(t).toPromise()}function xg(){const t=indexedDB.open(WS,NM);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Bh,{keyPath:qS})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Bh)?e(r):(r.close(),await LM(),e(await xg()))})})}async function eE(t,e,n){const r=Lf(t,!0).put({[qS]:e,value:n});return new pc(r).toPromise()}async function DM(t,e){const n=Lf(t,!1).get(e),r=await new pc(n).toPromise();return r===void 0?null:r.value}function tE(t,e){const n=Lf(t,!0).delete(e);return new pc(n).toPromise()}const OM=800,VM=3;class GS{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 xg(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>VM)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return HS()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Nf._getInstance(PM()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1283)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await kM(),!this.activeServiceWorker)return;this.sender=new RM(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||xM()!==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 xg();return await eE(e,$h,"1"),await tE(e,$h),!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=>eE(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>DM(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>tE(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const a=Lf(i,!1).getAll();return new pc(a).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:a}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(a)&&(this.notifyListeners(i,a),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(),OM)}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,318 bytes, lines 1283-1332
1283ject.keys(this.listeners).length===0&&this.stopPolling()}}GS.type="LOCAL";const MM=GS;new dc(3e4,6e4);/**
1284 * @license
1285 * Copyright 2021 Google LLC
1286 *
1287 * Licensed under the Apache License, Version 2.0 (the "License");
1288 * you may not use this file except in compliance with the License.
1289 * You may obtain a copy of the License at
1290 *
1291 *   http://www.apache.org/licenses/LICENSE-2.0
1292 *
1293 * Unless required by applicable law or agreed to in writing, software
1294 * distributed under the License is distributed on an "AS IS" BASIS,
1295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1296 * See the License for the specific language governing permissions and
1297 * limitations under the License.
1298 */function jM(t,e){return e?$s(e):($e(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/**
1299 * @license
1300 * Copyright 2019 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 */class Fy extends Vy{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ha(e,this._buildIdpRequest())}_linkToIdToken(e,n){return Ha(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return Ha(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 FM(t){return jS(t.auth,new Fy(t),t.bypassAuthState)}function UM(t){const{auth:e,user:n}=t;return $e(n,e,"internal-error"),pM(n,new Fy(t),t.bypassAuthState)}async function $M(t){const{auth:e,user:n}=t;return $e(n,e,"internal-error"),fM(n,new Fy(t),t.bypassAuthState)}/**
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 */class KS{constructor(e,n,r,i,a=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=a,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:a,error:u,type:d}=e;if(u){this.reject(u);return}const f={auth:this.auth,requestUri:n,sessionId:r,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(d)(f))}catch(p){this.reject(p)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return FM;case"linkViaPopup":case"linkViaRedirect":return $M;case"reauthViaPopup":case"reauthViaRedirect":return UM;default:Wr(this.auth,"internal-error")}}resolve(e){Gs(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Gs(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()}}/**
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 BM=new dc(2e3,1e4);class Ua extends KS{constructor(e,n,r,i,a){super(e,n,i,a),this.provider=r,this.authWindow=null,this.pollId=null,Ua.currentPopupAction&&Ua.currentPopupAction.cancel(),Ua.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return $e(e,this.auth,"internal-error"),e}async onExecution(){Gs(this.filter.length===1,"Popup operations only handle one event");const e=jy();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(cs(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(cs(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Ua.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(cs(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,BM.get())};e()}}Ua.currentPopupAction=null;/**
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 zM="pendingRedirect",vh=new Map;class HM extends KS{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=vh.get(this.auth._key());if(!e){try{const r=await WM(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}vh.set(this.auth._key(),e)}return this.bypassAuthState||vh.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 WM(t,e){const n=KM(e),r=GM(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function qM(t,e){vh.set(t._key(),e)}function GM(t){return $s(t._redirectPersistence)}function KM(t){return yh(zM,t.config.apiKey,t.name)}async function QM(t,e,n=!1){if(us(t.app))return Promise.reject(zs(t));const r=eo(t),i=jM(r,e),u=await new HM(r,i,n).execute();return u&&!n&&(delete u.user._redirectEventId,await r._persistUserIfCurrent(u.user),await r._setRedirectUser(null,e)),u}/**
1359 * @license
1360 * Copyright 2020 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, softw
1368are
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 YM=10*60*1e3;class XM{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||!JM(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!QS(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(cs(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>=YM&&this.cachedEventUids.clear(),this.cachedEventUids.has(nE(e))}saveEventToCache(e){this.cachedEventUids.add(nE(e)),this.lastProcessedEventTime=Date.now()}}function nE(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function QS({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function JM(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return QS(t);default:return!1}}/**
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 */async function ZM(t,e={}){return ti(t,"GET","/v1/projects",e)}/**
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, software
1399 * distributed under the License is distributed on an "AS IS" BASIS,
1400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1401 * See the License for the specific language governing permissions and
1402 * limitations under the License.
1403 */const e5=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,t5=/^https?/;async function n5(t){if(t.config.emulator)return;const{authorizedDomains:e}=await ZM(t);for(const n of e)try{if(r5(n))return}catch{}Wr(t,"unauthorized-domain")}function r5(t){const e=Ag(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const u=new URL(t);return u.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&u.hostname===r}if(!t5.test(n))return!1;if(e5.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/**
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, softw
1413are
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 */const s5=new dc(3e4,6e4);function rE(){const t=ds().___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 i5(t){return new Promise((e,n)=>{var r,i,a;function u(){rE(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{rE(),n(cs(t,"network-request-failed"))},timeout:s5.get()})}if(!((i=(r=ds().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((a=ds().gapi)===null||a===void 0)&&a.load)u();else{const d=GV("iframefcb");return ds()[d]=()=>{gapi.load?u():n(cs(t,"network-request-failed"))},LS(`${qV()}?onload=${d}`).catch(f=>n(f))}}).catch(e=>{throw wh=null,e})}let wh=null;function o5(t){return wh=wh||i5(t),wh}/**
1419 * @license
1420 * Copyright 2020 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 a5=new dc(5e3,15e3),l5="__/auth/iframe",u5="emulator/auth/iframe",c5={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},d5=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function h5(t){const e=t.config;$e(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?Ly(e,u5):`https://${t.config.authDomain}/${l5}`,r={apiKey:e.apiKey,appName:t.name,v:yl},i=d5.get(t.config.apiHost);i&&(r.eid=i);const a=t._getFrameworks();return a.length&&(r.fw=a.join(",")),`${n}?${cc(r).slice(1)}`}async function f5(t){const e=await o5(t),n=ds().gapi;return $e(n,t,"internal-error"),e.open({where:document.body,url:h5(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:c5,dontclear:!0},r=>new Promise(async(i,a)=>{await r.restyle({setHideOnLeave:!1});const u=cs(t,"network-request-failed"),d=ds().setTimeout(()=>{a(u)},a5.get());function f(){ds().clearTimeout(d),i(r)}r.ping(f).then(f,()=>{a(u)})}))}/**
1434 * @license
1435 * Copyright 2020 Google LLC.
1436 *
1437 * Licensed under the Apache License, Version 2.0 (the "License");
1438 * you may not use this file except in compliance with the License.
1439 * You may obtain a copy of the License at
1440 *
1441 *   http://www.apache.org/licenses/LICENSE-2.0
1442 *
1443 * Unless required by applicable law or agreed to in writing, software
1444 * distributed under the License is distributed on an "AS IS" BASIS,
1445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1446 * See the License for the specific language governing permissions and
1447 * limitations under the License.
1448 */const p5={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},m5=500,g5=600,y5="_blank",v5="http://localhost";class sE{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function w5(t,e,n,r=m5,i=g5){const a=Math.max((window.screen.availHeight-i)/2,0).toString(),u=Math.max((window.screen.availWidth-r)/2,0).toString();let d="";const f=Object.assign(Object.assign({},p5),{width:r.toString(),height:i.toString(),top:a,left:u}),p=An().toLowerCase();n&&(d=CS(p)?y5:n),bS(p)&&(e=e||v5,f.scrollbars="yes");const w=Object.entries(f).reduce((T,[b,I])=>`${T}${b}=${I},`,"");if(MV(p)&&d!=="_self")return _5(e||"",d),new sE(null);const E=window.open(e||"",d,w);$e(E,t,"popup-blocked");try{E.focus()}catch{}return new sE(E)}function _5(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");
1448r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
1449 * @license
1450 * Copyright 2021 Google LLC
1451 *
1452 * Licensed under the Apache License, Version 2.0 (the "License");
1453 * you may not use this file except in compliance with the License.
1454 * You may obtain a copy of the License at
1455 *
1456 *   http://www.apache.org/licenses/LICENSE-2.0
1457 *
1458 * Unless required by applicable law or agreed to in writing, software
1459 * distributed under the License is distributed on an "AS IS" BASIS,
1460 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1461 * See the License for the specific language governing permissions and
1462 * limitations under the License.
1463 */const E5="__/auth/handler",S5="emulator/auth/handler",T5=encodeURIComponent("fac");async function iE(t,e,n,r,i,a){$e(t.config.authDomain,t,"auth-domain-config-required"),$e(t.config.apiKey,t,"invalid-api-key");const u={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:yl,eventId:i};if(e instanceof VS){e.setDefaultLanguage(t.languageCode),u.providerId=e.providerId||"",aO(e.getCustomParameters())||(u.customParameters=JSON.stringify(e.getCustomParameters()));for(const[w,E]of Object.entries({}))u[w]=E}if(e instanceof fc){const w=e.getScopes().filter(E=>E!=="");w.length>0&&(u.scopes=w.join(","))}t.tenantId&&(u.tid=t.tenantId);const d=u;for(const w of Object.keys(d))d[w]===void 0&&delete d[w];const f=await t._getAppCheckToken(),p=f?`#${T5}=${encodeURIComponent(f)}`:"";return`${b5(t)}?${cc(d).slice(1)}${p}`}function b5({config:t}){return t.emulator?Ly(t,S5):`https://${t.authDomain}/${E5}`}/**
1464 * @license
1465 * Copyright 2020 Google LLC
1466 *
1467 * Licensed under the Apache License, Version 2.0 (the "License");
1468 * you may not use this file except in compliance with the License.
1469 * You may obtain a copy of the License at
1470 *
1471 *   http://www.apache.org/licenses/LICENSE-2.0
1472 *
1473 * Unless required by applicable law or agreed to in writing, software
1474 * distributed under the License is distributed on an "AS IS" BASIS,
1475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1476 * See the License for the specific language governing permissions and
1477 * limitations under the License.
1478 */const Xm="webStorageSupport";class I5{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=zS,this._completeRedirectFn=QM,this._overrideRedirectResult=qM}async _openPopup(e,n,r,i){var a;Gs((a=this.eventManagers[e._key()])===null||a===void 0?void 0:a.manager,"_initialize() not called before _openPopup()");const u=await iE(e,n,r,Ag(),i);return w5(e,u,jy())}async _openRedirect(e,n,r,i){await this._originValidation(e);const a=await iE(e,n,r,Ag(),i);return AM(a),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:a}=this.eventManagers[n];return i?Promise.resolve(i):(Gs(a,"If manager is not set, promise should be"),a)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await f5(e),r=new XM(e);return n.register("authEvent",i=>($e(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(Xm,{type:Xm},i=>{var a;const u=(a=i==null?void 0:i[0])===null||a===void 0?void 0:a[Xm];u!==void 0&&n(!!u),Wr(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=n5(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return PS()||IS()||Oy()}}const C5=I5;var oE="@firebase/auth",aE="1.8.1";/**
1479 * @license
1480 * Copyright 2020 Google LLC
1481 *
1482 * Licensed under the Apache License, Version 2.0 (the "License");
1483 * you may not use this file except in compliance with the License.
1484 * You may obtain a copy of the License at
1485 *
1486 *   http://www.apache.org/licenses/LICENSE-2.0
1487 *
1488 * Unless required by applicable law or agreed to in writing, softw
1488are
1489 * distributed under the License is distributed on an "AS IS" BASIS,
1490 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1491 * See the License for the specific language governing permissions and
1492 * limitations under the License.
1493 */class R5{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(){$e(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
1494 * @license
1495 * Copyright 2020 Google LLC
1496 *
1497 * Licensed under the Apache License, Version 2.0 (the "License");
1498 * you may not use this file except in compliance with the License.
1499 * You may obtain a copy of the License at
1500 *
1501 *   http://www.apache.org/licenses/LICENSE-2.0
1502 *
1503 * Unless required by applicable law or agreed to in writing, software
1504 * distributed under the License is distributed on an "AS IS" BASIS,
1505 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1506 * See the License for the specific language governing permissions and
1507 * limitations under the License.
1508 */function A5(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 k5(t){el(new Uo("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),{apiKey:u,authDomain:d}=r.options;$e(u&&!u.includes(":"),"invalid-api-key",{appName:r.name});const f={apiKey:u,authDomain:d,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:NS(t)},p=new zV(r,i,a,f);return ZV(p,n),p},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),el(new Uo("auth-internal",e=>{const n=eo(e.getProvider("auth").getImmediate());return(r=>new R5(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),$i(oE,aE,A5(t)),$i(oE,aE,"esm2017")}/**
1509 * @license
1510 * Copyright 2021 Google LLC
1511 *
1512 * Licensed under the Apache License, Version 2.0 (the "License");
1513 * you may not use this file except in compliance with the License.
1514 * You may obtain a copy of the License at
1515 *
1516 *   http://www.apache.org/licenses/LICENSE-2.0
1517 *
1518 * Unless required by applicable law or agreed to in writing, software
1519 * distributed under the License is distributed on an "AS IS" BASIS,
1520 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1521 * See the License for the specific language governing permissions and
1522 * limitations under the License.
1523 */const x5=5*60,P5=lS("authIdTokenMaxAge")||x5;let lE=null;const N5=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>P5)return;const i=n==null?void 0:n.token;lE!==i&&(lE=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function L5(t=hS()){const e=xy(t,"auth");if(e.isInitialized())return e.getImmediate();const n=JV(t,{popupRedirectResolver:C5,persistence:[MM,IM,zS]}),r=lS("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const a=new URL(r,location.origin);if(location.origin===a.origin){const u=N5(a.toString());_M(n,u,()=>u(n.currentUser)),wM(n,d=>u(d))}}const i=oS("auth");return i&&eM(n,`http://${i}`),n}function D5(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}
vendor: 53,752 bytes, lines 1523-1564
1523HV({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const a=cs("internal-error");a.customData=i,n(a)},r.type="text/javascript",r.charset="UTF-8",D5().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="});k5("Browser");var O5="firebase",V5="11.1.0";/**
1524 * @license
1525 * Copyright 2020 Google LLC
1526 *
1527 * Licensed under the Apache License, Version 2.0 (the "License");
1528 * you may not use this file except in compliance with the License.
1529 * You may obtain a copy of the License at
1530 *
1531 *   http://www.apache.org/licenses/LICENSE-2.0
1532 *
1533 * Unless required by applicable law or agreed to in writing, software
1534 * distributed under the License is distributed on an "AS IS" BASIS,
1535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1536 * See the License for the specific language governing permissions and
1537 * limitations under the License.
1538 */$i(O5,V5,"app");var uE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
1539Copyright The Closure Library Authors.
1540SPDX-License-Identifier: Apache-2.0
1541*/var Vo,YS;(function(){var t;/** @license
1542
1543 Copyright The Closure Library Authors.
1544 SPDX-License-Identifier: Apache-2.0
1545*/function e(D,R){function x(){}x.prototype=R.prototype,D.D=R.prototype,D.prototype=new x,D.prototype.constructor=D,D.C=function(k,F,B){for(var P=Array(arguments.length-2),le=2;le<arguments.length;le++)P[le-2]=arguments[le];return R.prototype[F].apply(k,P)}}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(D,R,x){x||(x=0);var k=Array(16);if(typeof R=="string")for(var F=0;16>F;++F)k[F]=R.charCodeAt(x++)|R.charCodeAt(x++)<<8|R.charCodeAt(x++)<<16|R.charCodeAt(x++)<<24;else for(F=0;16>F;++F)k[F]=R[x++]|R[x++]<<8|R[x++]<<16|R[x++]<<24;R=D.g[0],x=D.g[1],F=D.g[2];var B=D.g[3],P=R+(B^x&(F^B))+k[0]+3614090360&4294967295;R=x+(P<<7&4294967295|P>>>25),P=B+(F^R&(x^F))+k[1]+3905402710&4294967295,B=R+(P<<12&4294967295|P>>>20),P=F+(x^B&(R^x))+k[2]+606105819&4294967295,F=B+(P<<17&4294967295|P>>>15),P=x+(R^F&(B^R))+k[3]+3250441966&4294967295,x=F+(P<<22&4294967295|P>>>10),P=R+(B^x&(F^B))+k[4]+4118548399&4294967295,R=x+(P<<7&4294967295|P>>>25),P=B+(F^R&(x^F))+k[5]+1200080426&4294967295,B=R+(P<<12&4294967295|P>>>20),P=F+(x^B&(R^x))+k[6]+2821735955&4294967295,F=B+(P<<17&4294967295|P>>>15),P=x+(R^F&(B^R))+k[7]+4249261313&4294967295,x=F+(P<<22&4294967295|P>>>10),P=R+(B^x&(F^B))+k[8]+1770035416&4294967295,R=x+(P<<7&4294967295|P>>>25),P=B+(F^R&(x^F))+k[9]+2336552879&4294967295,B=R+(P<<12&4294967295|P>>>20),P=F+(x^B&(R^x))+k[10]+4294925233&4294967295,F=B+(P<<17&4294967295|P>>>15),P=x+(R^F&(B^R))+k[11]+2304563134&4294967295,x=F+(P<<22&4294967295|P>>>10),P=R+(B^x&(F^B))+k[12]+1804603682&4294967295,R=x+(P<<7&4294967295|P>>>25),P=B+(F^R&(x^F))+k[13]+4254626195&4294967295,B=R+(P<<12&4294967295|P>>>20),P=F+(x^B&(R^x))+k[14]+2792965006&4294967295,F=B+(P<<17&4294967295|P>>>15),P=x+(R^F&(B^R))+k[15]+1236535329&4294967295,x=F+(P<<22&4294967295|P>>>10),P=R+(F^B&(x^F))+k[1]+4129170786&4294967295,R=x+(P<<5&4294967295|P>>>27),P=B+(x^F&(R^x))+k[6]+3225465664&4294967295,B=R+(P<<9&4294967295|P>>>23),P=F+(R^x&(B^R))+k[11]+643717713&4294967295,F=B+(P<<14&4294967295|P>>>18),P=x+(B^R&(F^B))+k[0]+3921069994&4294967295,x=F+(P<<20&4294967295|P>>>12),P=R+(F^B&(x^F))+k[5]+3593408605&4294967295,R=x+(P<<5&4294967295|P>>>27),P=B+(x^F&(R^x))+k[10]+38016083&4294967295,B=R+(P<<9&4294967295|P>>>23),P=F+(R^x&(B^R))+k[15]+3634488961&4294967295,F=B+(P<<14&4294967295|P>>>18),P=x+(B^R&(F^B))+k[4]+3889429448&4294967295,x=F+(P<<20&4294967295|P>>>12),P=R+(F^B&(x^F))+k[9]+568446438&4294967295,R=x+(P<<5&4294967295|P>>>27),P=B+(x^F&(R^x))+k[14]+3275163606&4294967295,B=R+(P<<9&4294967295|P>>>23),P=F+(R^x&(B^R))+k[3]+4107603335&4294967295,F=B+(P<<14&4294967295|P>>>18),P=x+(B^R&(F^B))+k[8]+1163531501&4294967295,x=F+(P<<20&4294967295|P>>>12),P=R+(F^B&(x^F))+k[13]+2850285829&4294967295,R=x+(P<<5&4294967295|P>>>27),P=B+(x^F&(R^x))+k[2]+4243563512&4294967295,B=R+(P<<9&4294967295|P>>>23),P=F+(R^x&(B^R))+k[7]+1735328473&4294967295,F=B+(P<<14&4294967295|P>>>18),P=x+(B^R&(F^B))+k[12]+2368359562&4294967295,x=F+(P<<20&4294967295|P>>>12),P=R+(x^F^B)+k[5]+4294588738&4294967295,R=x+(P<<4&4294967295|P>>>28),P=B+(R^x^F)+k[8]+2272392833&4294967295,B=R+(P<<11&4294967295|P>>>21),P=F+(B^R^x)+k[11]+1839030562&4294967295,F=B+(P<<16&4294967295|P>>>16),P=x+(F^B^R)+k[14]+4259657740&4294967295,x=F+(P<<23&4294967295|P>>>9),P=R+(x^F^B)+k[1]+2763975236&4294967295,R=x+(P<<4&4294967295|P>>>28),P=B+(R^x^F)+k[4]+1272893353&4294967295,B=R+(P<<11&4294967295|P>>>21),P=F+(B^R^x)+k[7]+4139469664&4294967295,F=B+(P<<16&4294967295|P>>>16),P=x+(F^B^R)+k[10]+3200236656&4294967295,x=F+(P<<23&4294967295|P>>>9),P=R+(x^F^B)+k[13]+681279174&4294967295,R=x+(P<<4&4294967295|P>>>28),P=B+(R^x^F)+k[0]+3936430074&4294967295,B=R+(P<<11&4294967295|P>>>21),P=F+(B^R^x)+k[3]+3572445317&4294967295,F=B+(P<<16&4294967295|P>>>16),P=x+(F^B^R)+k[6]+76029189&4294967295,x=F+(P<<23&4294967295|P>>>9),P=R+(x^F^B)+k[9]+3654602809&4294967295,R=x+(P<<4&4294967295|P>>>28),P=B+(R^x^F)+k[12]+3873151461&4294967295,B=R+(P<<11&4294967295|P>>>21),P=F+(B^R^x)+k[15]+530742520&4294967295,F=B+(P<<16&4294967295|P>>>16),P=x+(F^B^R)+k[2]+3299628645&4294967295,x=F+(P<<23&4294967295|P>>>9),P=R+(F^(x|~B))+k[0]+4096336452&4294967295,R=x+(P<<6&4294967295|P>>>26),P=B+(x^(R|~F))+k[7]+1126891415&4294967295,B=R+(P<<10&4294967295|P>>>22),P=F+(R^(B|~x))+k[14]+2878612391&4294967295,F=B+(P<<15&4294967295|P>>>17),P=x+(B^(F|~R))+k[5]+4237533241&4294967295,x=F+(P<<21&4294967295|P>>>11),P=R+(F^(x|~B))+k[12]+1700485571&4294967295,R=x+(P<<6&4294967295|P>>>26),P=B+(x^(R|~F))+k[3]+2399980690&4294967295,B=R+(P<<10&4294967295|P>>>22),P=F+(R^(B|~x))+k[10]+4293915773&4294967295,F=B+(P<<15&4294967295|P>>>17),P=x+(B^(F|~R))+k[1]+2240044497&4294967295,x=F+(P<<21&4294967295|P>>>11),P=R+(F^(x|~B))+k[8]+1873313359&4294967295,R=x+(P<<6&4294967295|P>>>26),P=B+(x^(R|~F))+k[15]+4264355552&4294967295,B=R+(P<<10&4294967295|P>>>22),P=F+(R^(B|~x))+k[6]+2734768916&4294967295,F=B+(P<<15&4294967295|P>>>17),P=x+(B^(F|~R))+k[13]+1309151649&4294967295,x=F+(P<<21&4294967295|P>>>11),P=R+(F^(x|~B))+k[4]+4149444226&4294967295,R=x+(P<<6&4294967295|P>>>26),P=B+(x^(R|~F))+k[11]+3174756917&4294967295,B=R+(P<<10&4294967295|P>>>22),P=F+(R^(B|~x))+k[2]+718787259&4294967295,F=B+(P<<15&4294967295|P>>>17),P=x+(B^(F|~R))+k[9]+3951481745&4294967295,D.g[0]=D.g[0]+R&4294967295,D.g[1]=D.g[1]+(F+(P<<21&4294967295|P>>>11))&4294967295,D.g[2]=D.g[2]+F&4294967295,D.g[3]=D.g[3]+B&4294967295}r.prototype.u=function(D,R){R===void 0&&(R=D.length);for(var x=R-this.blockSize,k=this.B,F=this.h,B=0;B<R;){if(F==0)for(;B<=x;)i(this,D,B),B+=this.blockSize;if(typeof D=="string"){for(;B<R;)if(k[F++]=D.charCodeAt(B++),F==this.blockSize){i(this,k),F=0;break}}else for(;B<R;)if(k[F++]=D[B++],F==this.blockSize){i(this,k),F=0;break}}this.h=F,this.o+=R},r.prototype.v=function(){var D=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);D[0]=128;for(var R=1;R<D.length-8;++R)D[R]=0;var x=8*this.o;for(R=D.length-8;R<D.length;++R)D[R]=x&255,x/=256;for(this.u(D),D=Array(16),R=x=0;4>R;++R)for(var k=0;32>k;k+=8)D[x++]=this.g[R]>>>k&255;return D};function a(D,R){var x=d;return Object.prototype.hasOwnProperty.call(x,D)?x[D]:x[D]=R(D)}function u(D,R){this.h=R;for(var x=[],k=!0,F=D.length-1;0<=F;F--){var B=D[F]|0;k&&B==R||(x[F]=B,k=!1)}this.g=x}var d={};function f(D){return-128<=D&&128>D?a(D,function(R){return new u([R|0],0>R?-1:0)}):new u([D|0],0>D?-1:0)}function p(D){if(isNaN(D)||!isFinite(D))return E;if(0>D)return V(p(-D));for(var R=[],x=1,k=0;D>=x;k++)R[k]=D/x|0,x*=4294967296;return new u(R,0)}function w(D,R){if(D.length==0)throw Error("number format error: empty string");if(R=R||10,2>R||36<R)throw Error("radix out of range: "+R);if(D.charAt(0)=="-")return V(w(D.substring(1),R));if(0<=D.indexOf("-"))throw Error('number format error: interior "-" character');for(var x=p(Math.pow(R,8)),k=E,F=0;F<D.length;F+=8){var B=Math.min(8,D.length-F),P=parseInt(D.substring(F,F+B),R);8>B?(B=p(Math.pow(R,B)),k=k.j(B).add(p(P))):(k=k.j(x),k=k.add(p(P)))}return k}var E=f(0),T=f(1),b=f(16777216);t=u.prototype,t.m=function(){if(L(this))return-V(this).m();for(var D=0,R=1,x=0;x<this.g.length;x++){var k=this.i(x);D+=(0<=k?k:4294967296+k)*R,R*=4294967296}return D},t.toString=function(D){if(D=D||10,2>D||36<D)throw Error("radix out of range: "+D);if(I(this))return"0";if(L(this))return"-"+V(this).toString(D);for(var R=p(Math.pow(D,6)),x=this,k="";;){var F=te(x,R).g;x=U(x,F.j(R));var B=((0<x.g.length?x.g[0]:x.h)>>>0).toString(D);if(x=F,I(x))return B+k;for(;6>B.length;)B="0"+B;k=B+k}},t.i=function(D){return 0>D?0:D<this.g.length?this.g[D]:this.h};function I(D){if(D.h!=0)return!1;for(var R=0;R<D.g.length;R++)if(D.g[R]!=0)return!1;return!0}function L(D){return D.h==-1}t.l=function(D){return D=U(this,D),L(D)?-1:I(D)?0:1};function V(D){for(var R=D.g.length,x=[],k=0;k<R;k++)x[k]=~D.g[k];return new u(x,~D.h).add(T)}t.abs=function(){return L(this)?V(this):this},t.add=function(D){for(var R=Math.max(this.g.length,D.g.length),x=[],k=0,F=0;F<=R;F++){var B=k+(this.i(F)&65535)+(D.i(F)&65535),P=(B>>>16)+(this.i(F)>>>16)+(D.i(F)>>>16);k=P>>>16,B&=65535,P&=65535,x[F]=P<<16|B}return new u(x,x[x.length-1]&-2147483648?-1:0)};function U(D,R){return D.add(V(R))}t.j=function(D){if(I(this)||I(D))return E;if(L(this))return L(D)?V(this).j(V(D)):V(V(this).j(D));if(L(D))return V(this.j(V(D)));if(0>this.l(b)&&0>D.l(b))return p(this.m()*D.m());for(var R=this.g.length+D.g.length,x=[],k=0;k<2*R;k++)x[k]=0;for(k=0;k<this.g.length;k++)for(var F=0;F<D.g.length;F++){var B=this.i(k)>>>16,P=this.i(k)&65535,le=D.i(F)>>>16,qe=D.i(F)&65535;x[2*k+2*F]+=P*qe,M(x,2*k+2*F),x[2*k+2*F+1]+=B*qe,M(x,2*k+2*F+1),x[2*k+2*F+1]+=P*le,M(x,2*k+2*F+1),x[2*k+2*F+2]+=B*le,M(x,2*k+2*F+2)}for(k=0;k<R;k++)x[k]=x[2*k+1]<<16|x[2*k];for(k=R;k<2*R;k++)x[k]=0;return new u(x,0)};function M(D,R){for(;(D[R]&65535)!=D[R];)D[R+1]+=D[R]>>>16,D[R]&=65535,R++}function Q(D,R){this.g=D,this.h=R}function te(D,R){if(I(R))throw Error("division by zero");if(I(D))return new Q(E,E);if(L(D))return R=te(V(D),R),new Q(V(R.g),V(R.h));if(L(R))return R=te(D,V(R)),new Q(V(R.g),R.h);if(30<D.g.length){if(L(D)||L(R))throw Error("slowDivide_ only works with positive integers.");for(var x=T,k=R;0>=k.l(D);)x=he(x),k=he(k);var F=ae(x,1),B=ae(k,1);for(k=ae(k,2),x=ae(x,2);!I(k);){var P=B.add(k);0>=P.l(D)&&(F=F.add(x),B=P),k=ae(k,1),x=ae(x,1)}return R=U(D,F.j(R)),new Q(F,R)}for(F=E;0<=D.l(R);){for(x=Math.max(1,Math.floor(D.m()/R.m())),k=Math.ceil(Math.log(x)/Math.LN2),k=48>=k?1:Math.pow(2,k-48),B=p(x),P=B.j(R);L(P)||0<P.l(D);)x-=k,B=p(x),P=B.j(R);I(B)&&(B=T),F=F.add(B),D=U(D,P)}return new Q(F,D)}t.A=function(D){return te(this,D).h},t.and=function(D){for(var R=Math.max(this.g.length,D.g.length),x=[],k=0;k<R;k++)x[k]=this.i(k)&D.i(k);return new u(x,this.h&D.h)},t.or=function(D){for(var R=Math.max(this.g.length,D.g.length),x=[],k=0;k<R;k++)x[k]=this.i(k)|D.i(k);return new u(x,this.h|D.h)},t.xor=function(D){for(var R=Math.max(this.g.length,D.g.length),x=[],k=0;k<R;k++)x[k]=this.i(k)^D.i(k);return new u(x,this.h^D.h)};function he(D){for(var R=D.g.length+1,x=[],k=0;k<R;k++)x[k]=D.i(k)<<1|D.i(k-1)>>>31;return new u(x,D.h)}function ae(D,R){var x=R>>5;R%=32;for(var k=D.g.length-x,F=[],B=0;B<k;B++)F[B]=0<R?D.i(B+x)>>>R|D.i(B+x+1)<<32-R:D.i(B+x);return new u(F,D.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,YS=r,u.prototype.add=u.prototype.add,u.prototype.multiply=u.prototype.j,u.prototype.modulo=u.prototype.A,u.prototype.compare=u.prototype.l,u.prototype.toNumber=u.prototype.m,u.prototype.toString=u.prototype.toString,u.prototype.getBits=u.prototype.i,u.fromNumber=p,u.fromString=w,Vo=u}).apply(typeof uE<"u"?uE:typeof self<"u"?self:typeof window<"u"?window:{});var Jd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
1546Copyright The Closure Library Authors.
1547SPDX-License-Identifier: Apache-2.0
1548*/var XS,Iu,JS,_h,Pg,ZS,eT,tT;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(c,y,_){return c==Array.prototype||c==Object.prototype||(c[y]=_.value),c};function n(c){c=[typeof globalThis=="object"&&globalThis,c,typeof window=="object"&&window,typeof self=="object"&&self,typeof Jd=="object"&&Jd];for(var y=0;y<c.length;++y){var _=c[y];if(_&&_.Math==Math)return _}throw Error("Cannot find global object")}var r=n(this);function i(c,y){if(y)e:{var _=r;c=c.split(".");for(var C=0;C<c.length-1;C++){var W=c[C];if(!(W in _))break e;_=_[W]}c=c[c.length-1],C=_[c],y=y(C),y!=C&&y!=null&&e(_,c,{configurable:!0,writable:!0,value:y})}}function a(c,y){c instanceof String&&(c+="");var _=0,C=!1,W={next:function(){if(!C&&_<c.length){var J=_++;return{value:y(J,c[J]),done:!1}}return C=!0,{done:!0,value:void 0}}};return W[Symbol.iterator]=function(){return W},W}i("Array.prototype.values",function(c){return c||function(){return a(this,function(y,_){return _})}});/** @license
1549
1550 Copyright The Closure Library Authors.
1551 SPDX-License-Identifier: Apache-2.0
1552*/var u=u||{},d=this||self;function f(c){var y=typeof c;return y=y!="object"?y:c?Array.isArray(c)?"array":y:"null",y=="array"||y=="object"&&typeof c.length=="number"}function p(c){var y=typeof c;return y=="object"&&c!=null||y=="function"}function w(c,y,_){return c.call.apply(c.bind,arguments)}function E(c,y,_){if(!c)throw Error();if(2<arguments.length){var C=Array.prototype.slice.call(arguments,2);return function(){var W=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(W,C),c.apply(y,W)}}return function(){return c.apply(y,arguments)}}function T(c,y,_){return T=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?w:E,T.apply(null,arguments)}function b(c,y){var _=Array.prototype.slice.call(arguments,1);return function(){var C=_.slice();return C.push.apply(C,arguments),c.apply(this,C)}}function I(c,y){function _(){}_.prototype=y.prototype,c.aa=y.prototype,c.prototype=new _,c.prototype.constructor=c,c.Qb=function(C,W,J){for(var ve=Array(arguments.length-2),pt=2;pt<arguments.length;pt++)ve[pt-2]=arguments[pt];return y.prototype[W].apply(C,ve)}}function L(c){const y=c.length;if(0<y){const _=Array(y);for(let C=0;C<y;C++)_[C]=c[C];return _}return[]}function V(c,y){for(let _=1;_<arguments.length;_++){const C=arguments[_];if(f(C)){const W=c.length||0,J=C.length||0;c.length=W+J;for(let ve=0;ve<J;ve++)c[W+ve]=C[ve]}else c.push(C)}}class U{constructor(y,_){this.i=y,this.j=_,this.h=0,this.g=null}get(){let y;return 0<this.h?(this.h--,y=this.g,this.g=y.next,y.next=null):y=this.i(),y}}function M(c){return/^[\s\xa0]*$/.test(c)}function Q(){var c=d.navigator;return c&&(c=c.userAgent)?c:""}function te(c){return te[" "](c),c}te[" "]=function(){};var he=Q().indexOf("Gecko")!=-1&&!(Q().toLowerCase().indexOf("webkit")!=-1&&Q().indexOf("Edge")==-1)&&!(Q().indexOf("Trident")!=-1||Q().indexOf("MSIE")!=-1)&&Q().indexOf("Edge")==-1;function ae(c,y,_){for(const C in c)y.call(_,c[C],C,c)}function D(c,y){for(const _ in c)y.call(void 0,c[_],_,c)}function R(c){const y={};for(const _ in c)y[_]=c[_];return y}const x="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function k(c,y){let _,C;for(let W=1;W<arguments.length;W++){C=arguments[W];for(_ in C)c[_]=C[_];for(let J=0;J<x.length;J++)_=x[J],Object.prototype.hasOwnProperty.call(C,_)&&(c[_]=C[_])}}function F(c){var y=1;c=c.split(":");const _=[];for(;0<y&&c.length;)_.push(c.shift()),y--;return c.length&&_.push(c.join(":")),_}function B(c){d.setTimeout(()=>{throw c},0)}function P(){var c=ge;let y=null;return c.g&&(y=c.g,c.g=c.g.next,c.g||(c.h=null),y.next=null),y}class le{constructor(){this.h=this.g=null}add(y,_){const C=qe.get();C.set(y,_),this.h?this.h.next=C:this.g=C,this.h=C}}var qe=new U(()=>new Xe,c=>c.reset());class Xe{constructor(){this.next=this.g=this.h=null}set(y,_){this.h=y,this.g=_,this.next=null}reset(){this.next=this.g=this.h=null}}let de,re=!1,ge=new le,ee=()=>{const c=d.Promise.resolve(void 0);de=()=>{c.then(j)}};var j=()=>{for(var c;c=P();){try{c.h.call(c.g)}catch(_){B(_)}var y=qe;y.j(c),100>y.h&&(y.h++,c.next=y.g,y.g=c)}re=!1};function N(){this.s=this.s,this.C=this.C}N.prototype.s=!1,N.prototype.ma=function(){this.s||(this.s=!0,this.N())},N.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function X(c,y){this.type=c,this.g=this.target=y,this.defaultPrevented=!1}X.prototype.h=function(){this.defaultPrevented=!0};var ne=function(){if(!d.addEventListener||!Object.defineProperty)return!1;var c=!1,y=Object.defineProperty({},"passive",{get:function(){c=!0}});try{const _=()=>{};d.addEventListener("test",_,y),d.removeEventListener("test",_,y)}catch{}return c}();function ye(c,y){if(X.call(this,c?c.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,c){var _=this.type=c.type,C=c.changedTouches&&c.changedTouches.length?c.changedTouches[0]:null;if(this.target=c.target||c.srcElement,this.g=y,y=c.relatedTarget){if(he){e:{try{te(y.nodeName);var W=!0;break e}catch{}W=!1}W||(y=null)}}else _=="mouseover"?y=c.fromElement:_=="mouseout"&&(y=c.toElement);this.relatedTarget=y,C?(this.clientX=C.clientX!==void 0?C.clientX:C.pageX,this.clientY=C.clientY!==void 0?C.clientY:C.pageY,this.screenX=C.screenX||0,this.screenY=C.screenY||0):(this.clientX=c.clientX!==void 0?c.clientX:c.pageX,this.clientY=c.clientY!==void 0?c.clientY:c.pageY,this.screenX=c.screenX||0,this.screenY=c.screenY||0),this.button=c.button,this.key=c.key||"",this.ctrlKey=c.ctrlKey,this.altKey=c.altKey,this.shiftKey=c.shiftKey,this.metaKey=c.metaKey,this.pointerId=c.pointerId||0,this.pointerType=typeof c.pointerType=="string"?c.pointerType:pe[c.pointerType]||"",this.state=c.state,this.i=c,c.defaultPrevented&&ye.aa.h.call(this)}}I(ye,X);var pe={2:"touch",3:"pen",4:"mouse"};ye.prototype.h=function(){ye.aa.h.call(this);var c=this.i;c.preventDefault?c.preventDefault():c.returnValue=!1};var Ie="closure_listenable_"+(1e6*Math.random()|0),be=0;function Ee(c,y,_,C,W){this.listener=c,this.proxy=null,this.src=y,this.type=_,this.capture=!!C,this.ha=W,this.key=++be,this.da=this.fa=!1}function Ge(c){c.da=!0,c.listener=null,c.proxy=null,c.src=null,c.ha=null}function ft(c){this.src=c,this.g={},this.h=0}ft.prototype.add=function(c,y,_,C,W){var J=c.toString();c=this.g[J],c||(c=this.g[J]=[],this.h++);var ve=at(c,y,C,W);return-1<ve?(y=c[ve],_||(y.fa=!1)):(y=new Ee(y,this.src,J,!!C,W),y.fa=_,c.push(y)),y};function tt(c,y){var _=y.type;if(_ in c.g){var C=c.g[_],W=Array.prototype.indexOf.call(C,y,void 0),J;(J=0<=W)&&Array.prototype.splice.call(C,W,1),J&&(Ge(y),c.g[_].length==0&&(delete c.g[_],c.h--))}}function at(c,y,_,C){for(var W=0;W<c.length;++W){var J=c[W];if(!J.da&&J.listener==y&&J.capture==!!_&&J.ha==C)return W}return-1}var Yt="closure_lm_"+(1e6*Math.random()|0),Mn={};function rn(c,y,_,C,W){if(Array.isArray(y)){for(var J=0;J<y.length;J++)rn(c,y[J],_,C,W);return null}return _=Ts(_),c&&c[Ie]?c.K(y,_,p(C)?!!C.capture:!1,W):Xt(c,y,_,!1,C,W)}function Xt(c,y,_,C,W,J){if(!y)throw Error("Invalid event type");var ve=p(W)?!!W.capture:!!W,pt=si(c);if(pt||(c[Yt]=pt=new ft(c)),_=pt.add(y,_,C,ve,J),_.proxy)return _;if(C=ro(),_.proxy=C,C.src=c,C.listener=_,c.addEventListener)ne||(W=ve),W===void 0&&(W=!1),c.addEventListener(y.toString(),C,W);else if(c.attachEvent)c.attachEvent(hr(y.toString()),C);else if(c.addListener&&c.removeListener)c.addListener(C);else throw Error("addEventListener and attachEvent are unavailable.");return _}function ro(){function c(_){return y.call(c.src,c.listener,_)}const y=ri;return c}function ni(c,y,_,C,W){if(Array.isArray(y))for(var J=0;J<y.length;J++)ni(c,y[J],_,C,W);else C=p(C)?!!C.capture:!!C,_=Ts(_),c&&c[Ie]?(c=c.i,y=String(y).toString(),y in c.g&&(J=c.g[y],_=at(J,_,C,W),-1<_&&(Ge(J[_]),Array.prototype.splice.call(J,_,1),J.length==0&&(delete c.g[y],c.h--)))):c&&(c=si(c))&&(y=c.g[y.toString()],c=-1,y&&(c=at(y,_,C,W)),(_=-1<c?y[c]:null)&&Jn(_))}function Jn(c){if(typeof c!="number"&&c&&!c.da){var y=c.src;if(y&&y[Ie])tt(y.i,c);else{var _=c.type,C=c.proxy;y.removeEventListener?y.removeEventListener(_,C,c.capture):y.detachEvent?y.detachEvent(hr(_),C):y.addListener&&y.removeListener&&y.removeListener(C),(_=si(y))?(tt(_,c),_.h==0&&(_.src=null,y[Yt]=null)):Ge(c)}}}function hr(c){return c in Mn?Mn[c]:Mn[c]="on"+c}function ri(c,y){if(c.da)c=!0;else{y=new ye(y,this);var _=c.listener,C=c.ha||c.src;c.fa&&Jn(c),c=_.call(C,y)}return c}function si(c){return c=c[Yt],c instanceof ft?c:null}var Qr="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ts(c){return typeof c=="function"?c:(c[Qr]||(c[Qr]=function(y){return c.handleEvent(y)}),c[Qr])}function Mt(){N.call(this),this.i=new ft(this),this.M=this,this.F=null}I(Mt,N),Mt.prototype[Ie]=!0,Mt.prototype.removeEventListener=function(c,y,_,C){ni(this,c,y,_,C)};function jt(c,y){var _,C=c.F;if(C)for(_=[];C;C=C.F)_.push(C);if(c=c.M,C=y.type||y,typeof y=="string")y=new X(y,c);else if(y instanceof X)y.target=y.target||c;else{var W=y;y=new X(C,c),k(y,W)}if(W=!0,_)for(var J=_.length-1;0<=J;J--){var ve=y.g=_[J];W=Ir(ve,C,!0,y)&&W}if(ve=y.g=c,W=Ir(ve,C,!0,y)&&W,W=Ir(ve,C,!1,y)&&W,_)for(J=0;J<_.length;J++)ve=y.g=_[J],W=Ir(ve,C,!1,y)&&W}Mt.prototype.N=function(){if(Mt.aa.N.call(this),this.i){var c=this.i,y;for(y in c.g){for(var _=c.g[y],C=0;C<_.length;C++)Ge(_[C]);delete c.g[y],c.h--}}this.F=null},Mt.prototype.K=function(c,y,_,C){return this.i.add(String(c),y,!1,_,C)},Mt.prototype.L=function(c,y,_,C){return this.i.add(String(c),y,!0,_,C)};function Ir(c,y,_,C){if(y=c.i.g[String(y)],!y)return!0;y=y.concat();for(var W=!0,J=0;J<y.length;++J){var ve=y[J];if(ve&&!ve.da&&ve.capture==_){var pt=ve.listener,Jt=ve.ha||ve.src;ve.fa&&tt(c.i,ve),W=pt.call(Jt,C)!==!1&&W}}return W&&!C.defaultPrevented}function so(c,y,_){if(typeof c=="function")_&&(c=T(c,_));else if(c&&typeof c.handleEvent=="function")c=T(c.handleEvent,c);else throw Error("Invalid listener argument");return 2147483647<Number(y)?-1:d.setTimeout(c,y||0)}function Yr(c){c.g=so(()=>{c.g=null,c.i&&(c.i=!1,Yr(c))},c.l);const y=c.h;c.h=null,c.m.apply(null,y)}class bs extends N{constructor(y,_){super(),this.m=y,this.l=_,this.h=null,this.i=!1,this.g=null}j(y){this.h=arguments,this.g?this.i=!0:Yr(this)}N(){super.N(),this.g&&(d.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Xr(c){N.call(this),this.h=c,this.g={}}I(Xr,N);var io=[];function oo(c){ae(c.g,function(y,_){this.g.hasOwnProperty(_)&&Jn(y)},c),c.g={}}Xr.prototype.N=function(){Xr.aa.N.call(this),oo(this)},Xr.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var G=d.JSON.stringify,H=d.JSON.parse,ce=class{stringify(c){return d.JSON.stringify(c,void 0)}parse(c){return d.JSON.parse(c,void 0)}};function we(){}we.prototype.h=null;function _e(c){return c.h||(c.h=c.i())}function Se(){}var Pe={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Le(){X.call(this,"d")}I(Le,X);function Oe(){X.call(this,"c")}I(Oe,X);var Ue={},dt=null;function Dt(){return dt=dt||new Mt}Ue.La="serverreachability";function Ct(c){X.call(this,Ue.La,c)}I(Ct,X);function Ot(c){const y=Dt();jt(y,new Ct(y))}Ue.STAT_EVENT="statevent";function hn(c,y){X.call(this,Ue.STAT_EVENT,c),this.stat=y}I(hn,X);function gt(c){const y=Dt();jt(y,new hn(y,c))}Ue.Ma="timingevent";function Cr(c,y){X.call(this,Ue.Ma,c),this.size=y}I(Cr,X);function fn(c,y){if(typeof c!="function")throw Error("Fn must not be null and must be a function");return d.setTimeout(function(){c()},y)}function Zn(){this.g=!0}Zn.prototype.xa=function(){this.g=!1};function ao(c,y,_,C,W,J){c.info(function(){if(c.g)if(J)for(var ve="",pt=J.split("&"),Jt=0;Jt<pt.length;Jt++){var st=pt[Jt].split("=");if(1<st.length){var sn=st[0];st=st[1];var Wt=sn.split("_");ve=2<=Wt.length&&Wt[1]=="type"?ve+(sn+"="+st+"&"):ve+(sn+"=redacted&")}}else ve=null;else ve=J;return"XMLHTTP REQ ("+C+") [attempt "+W+"]: "+y+`
1553`+_+`
1554`+ve})}function Xo(c,y,_,C,W,J,ve){c.info(function(){return"XMLHTTP RESP ("+C+") [ attempt "+W+"]: "+y+`
1555`+_+`
1556`+J+" "+ve})}function Rr(c,y,_,C){c.info(function(){return"XMLHTTP TEXT ("+y+"): "+sp(c,_)+(C?" "+C:"")})}function xl(c,y){c.info(function(){return"TIMEOUT: "+y})}Zn.prototype.info=function(){};function sp(c,y){if(!c.g)return y;if(!y)return null;try{var _=JSON.parse(y);if(_){for(c=0;c<_.length;c++)if(Array.isArray(_[c])){var C=_[c];if(!(2>C.length)){var W=C[1];if(Array.isArray(W)&&!(1>W.length)){var J=W[0];if(J!="noop"&&J!="stop"&&J!="close")for(var ve=1;ve<W.length;ve++)W[ve]=""}}}}return G(_)}catch{return y}}var Jo={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},xc={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Ar;function lo(){}I(lo,we),lo.prototype.g=function(){return new XMLHttpRequest},lo.prototype.i=function(){return{}},Ar=new lo;function kr(c,y,_,C){this.j=c,this.i=y,this.l=_,this.R=C||1,this.U=new Xr(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 Pc}function Pc(){this.i=null,this.g="",this.h=!1}var Pl={},Zo={};function ea(c,y,_){c.L=1,c.v=ui(tr(y)),c.m=_,c.P=!0,Nl(c,null)}function Nl(c,y){c.F=Date.now(),_t(c),c.A=tr(c.v);var _=c.A,C=c.R;Array.isArray(C)||(C=[String(C)]),di(_.i,"t",C),c.C=0,_=c.j.J,c.h=new Pc,c.g=Qc(c.j,_?y:null,!c.m),0<c.O&&(c.M=new bs(T(c.Y,c,c.g),c.O)),y=c.U,_=c.g,C=c.ca;var W="readystatechange";Array.isArray(W)||(W&&(io[0]=W.toString()),W=io);for(var J=0;J<W.length;J++){var ve=rn(_,W[J],C||y.handleEvent,!1,y.h||y);if(!ve)break;y.g[ve.key]=ve}y=c.H?R(c.H):{},c.m?(c.u||(c.u="POST"),y["Content-Type"]="application/x-www-form-urlencoded",c.g.ea(c.A,c.u,c.m,y)):(c.u="GET",c.g.ea(c.A,c.u,null,y)),Ot(),ao(c.i,c.u,c.A,c.l,c.R,c.m)}kr.prototype.ca=function(c){c=c.target;const y=this.M;y&&Fn(c)==3?y.j():this.Y(c)},kr.prototype.Y=function(c){try{if(c==this.g)e:{const Wt=Fn(this.g);var y=this.g.Ba();const mr=this.g.Z();if(!(3>Wt)&&(Wt!=3||this.g&&(this.h.h||this.g.oa()||jl(this.g)))){this.J||Wt!=4||y==7||(y==8||0>=mr?Ot(3):Ot(2)),uo(this);var _=this.g.Z();this.X=_;t:if(Nc(this)){var C=jl(this.g);c="";var W=C.length,J=Fn(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){fr(this),ii(this);var ve="";break t}this.h.i=new d.TextDecoder}for(y=0;y<W;y++)this.h.h=!0,c+=this.h.i.decode(C[y],{stream:!(J&&y==W-1)});C.length=0,this.h.g+=c,this.C=0,ve=this.h.g}else ve=this.g.oa();if(this.o=_==200,Xo(this.i,this.u,this.A,this.l,this.R,Wt,_),this.o){if(this.T&&!this.K){t:{if(this.g){var pt,Jt=this.g;if((pt=Jt.g?Jt.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!M(pt)){var st=pt;break t}}st=null}if(_=st)Rr(this.i,this.l,_,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,Ll(this,_);else{this.o=!1,this.s=3,gt(12),fr(this),ii(this);break e}}if(this.P){_=!0;let rr;for(;!this.J&&this.C<ve.length;)if(rr=ip(this,ve),rr==Zo){Wt==4&&(this.s=4,gt(14),_=!1),Rr(this.i,this.l,null,"[Incomplete Response]");break}else if(rr==Pl){this.s=4,gt(15),Rr(this.i,this.l,ve,"[Invalid Chunk]"),_=!1;break}else Rr(this.i,this.l,rr,null),Ll(this,rr);if(Nc(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),Wt!=4||ve.length!=0||this.h.h||(this.s=1,gt(16),_=!1),this.o=this.o&&_,!_)Rr(this.i,this.l,ve,"[Invalid Chunked Response]"),fr(this),ii(this);else if(0<ve.length&&!this.W){this.W=!0;var sn=this.j;sn.g==this&&sn.ba&&!sn.M&&(sn.j.info("Great, no buffering proxy detected. Bytes received: "+ve.length),Ul(sn),sn.M=!0,gt(11))}}else Rr(this.i,this.l,ve,null),Ll(this,ve);Wt==4&&fr(this),this.o&&!this.J&&(Wt==4?da(this.j,this):(this.o=!1,_t(this)))}else oa(this.g),_==400&&0<ve.indexOf("Unknown SID")?(this.s=3,gt(12)):(this.s=0,gt(13)),fr(this),ii(this)}}}catch{}finally{}};function Nc(c){return c.g?c.u=="GET"&&c.L!=2&&c.j.Ca:!1}function ip(c,y){var _=c.C,C=y.indexOf(`
1557`,_);return C==-1?Zo:(_=Number(y.substring(_,C)),isNaN(_)?Pl:(C+=1,C+_>y.length?Zo:(y=y.slice(C,C+_),c.C=C+_,y)))}kr.prototype.cancel=function(){this.J=!0,fr(this)};function _t(c){c.S=Date.now()+c.I,Lc(c,c.I)}function Lc(c,y){if(c.B!=null)throw Error("WatchDog timer not null");c.B=fn(T(c.ba,c),y)}function uo(c){c.B&&(d.clearTimeout(c.B),c.B=null)}kr.prototype.ba=function(){this.B=null;const c=Date.now();0<=c-this.S?(xl(this.i,this.A),this.L!=2&&(Ot(),gt(17)),fr(this),this.s=2,ii(this)):Lc(this,this.S-c)};function ii(c){c.j.G==0||c.J||da(c.j,c)}function fr(c){uo(c);var y=c.M;y&&typeof y.ma=="function"&&y.ma(),c.M=null,oo(c.U),c.g&&(y=c.g,c.g=null,y.abort(),y.ma())}function Ll(c,y){try{var _=c.j;if(_.G!=0&&(_.g==c||xn(_.h,c))){if(!c.K&&xn(_.h,c)&&_.G==3){try{var C=_.Da.g.parse(y)}catch{C=null}if(Array.isArray(C)&&C.length==3){var W=C;if(W[0]==0){e:if(!_.u){if(_.g)if(_.g.F+3e3<c.F)ca(_),Dr(_);else break e;ua(_),gt(18)}}else _.za=W[1],0<_.za-_.T&&37500>W[2]&&_.F&&_.v==0&&!_.C&&(_.C=fn(T(_.Za,_),6e3));if(1>=Oc(_.h)&&_.ca){try{_.ca()}catch{}_.ca=void 0}}else ks(_,11)}else if((c.K||_.g==c)&&ca(_),!M(y))for(W=_.Da.g.parse(y),y=0;y<W.length;y++){let st=W[y];if(_.T=st[0],st=st[1],_.G==2)if(st[0]=="c"){_.K=st[1],_.ia=st[2];const sn=st[3];sn!=null&&(_.la=sn,_.j.info("VER="+_.la));const Wt=st[4];Wt!=null&&(_.Aa=Wt,_.j.info("SVER="+_.Aa));const mr=st[5];mr!=null&&typeof mr=="number"&&0<mr&&(C=1.5*mr,_.L=C,_.j.info("backChannelRequestTimeoutMs_="+C)),C=_;const rr=c.g;if(rr){const yo=rr.g?rr.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(yo){var J=C.h;J.g||yo.indexOf("spdy")==-1&&yo.indexOf("quic")==-1&&yo.indexOf("h2")==-1||(J.j=J.l,J.g=new Set,J.h&&(Dl(J,J.h),J.h=null))}if(C.D){const fa=rr.g?rr.g.getResponseHeader("X-HTTP-Session-Id"):null;fa&&(C.ya=fa,yt(C.I,C.D,fa))}}_.G=3,_.l&&_.l.ua(),_.ba&&(_.R=Date.now()-c.F,_.j.info("Handshake RTT: "+_.R+"ms")),C=_;var ve=c;if(C.qa=Kc(C,C.J?C.ia:null,C.W),ve.K){Vc(C.h,ve);var pt=ve,Jt=C.L;Jt&&(pt.I=Jt),pt.B&&(uo(pt),_t(pt)),C.g=ve}else go(C);0<_.i.length&&ts(_)}else st[0]!="stop"&&st[0]!="close"||ks(_,7);else _.G==3&&(st[0]=="stop"||st[0]=="close"?st[0]=="stop"?ks(_,7):mn(_):st[0]!="noop"&&_.l&&_.l.ta(st),_.v=0)}}Ot(4)}catch{}}var Dc=class{constructor(c,y){this.g=c,this.map=y}};function co(c){this.l=c||10,d.PerformanceNavigationTiming?(c=d.performance.getEntriesByType("navigation"),c=0<c.length&&(c[0].nextHopProtocol=="hq"||c[0].nextHopProtocol=="h2")):c=!!(d.chrome&&d.chrome.loadTimes&&d.chrome.loadTimes()&&d.chrome.loadTimes().wasFetchedViaSpdy),this.j=c?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function er(c){return c.h?!0:c.g?c.g.size>=c.j:!1}function Oc(c){return c.h?1:c.g?c.g.size:0}function xn(c,y){return c.h?c.h==y:c.g?c.g.has(y):!1}function Dl(c,y){c.g?c.g.add(y):c.h=y}function Vc(c,y){c.h&&c.h==y?c.h=null:c.g&&c.g.has(y)&&c.g.delete(y)}co.prototype.cancel=function(){if(this.i=Mc(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const c of this.g.values())c.cancel();this.g.clear()}};function Mc(c){if(c.h!=null)return c.i.concat(c.h.D);if(c.g!=null&&c.g.size!==0){let y=c.i;for(const _ of c.g.values())y=y.concat(_.D);return y}return L(c.i)}function ta(c){if(c.V&&typeof c.V=="function")return c.V();if(typeof Map<"u"&&c instanceof Map||typeof Set<"u"&&c instanceof Set)return Array.from(c.values());if(typeof c=="string")return c.split("");if(f(c)){for(var y=[],_=c.length,C=0;C<_;C++)y.push(c[C]);return y}y=[],_=0;for(C in c)y[_++]=c[C];return y}function na(c){if(c.na&&typeof c.na=="function")return c.na();if(!c.V||typeof c.V!="function"){if(typeof Map<"u"&&c instanceof Map)return Array.from(c.keys());if(!(typeof Set<"u"&&c instanceof Set)){if(f(c)||typeof c=="string"){var y=[];c=c.length;for(var _=0;_<c;_++)y.push(_);return y}y=[],_=0;for(const C in c)y[_++]=C;return y}}}function oi(c,y){if(c.forEach&&typeof c.forEach=="function")c.forEach(y,void 0);else if(f(c)||typeof c=="string")Array.prototype.forEach.call(c,y,void 0);else for(var _=na(c),C=ta(c),W=C.length,J=0;J<W;J++)y.call(void 0,C[J],_&&_[J],c)}var ho=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function op(c,y){if(c){c=c.split("&");for(var _=0;_<c.length;_++){var C=c[_].indexOf("="),W=null;if(0<=C){var J=c[_].substring(0,C);W=c[_].substring(C+1)}else J=c[_];y(J,W?decodeURIComponent(W.replace(/\+/g," ")):"")}}}function Is(c){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,c instanceof Is){this.h=c.h,fo(this,c.j),this.o=c.o,this.g=c.g,ai(this,c.s),this.l=c.l;var y=c.i,_=new Jr;_.i=y.i,y.g&&(_.g=new Map(y.g),_.h=y.h),li(this,_),this.m=c.m}else c&&(y=String(c).match(ho))?(this.h=!1,fo(this,y[1]||"",!0),this.o=nt(y[2]||""),this.g=nt(y[3]||"",!0),ai(this,y[4]),this.l=nt(y[5]||"",!0),li(this,y[6]||"",!0),this.m=nt(y[7]||"")):(this.h=!1,this.i=new Jr(null,this.h))}Is.prototype.toString=function(){var c=[],y=this.j;y&&c.push(ci(y,ra,!0),":");var _=this.g;return(_||y=="file")&&(c.push("//"),(y=this.o)&&c.push(ci(y,ra,!0),"@"),c.push(encodeURIComponent(String(_)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),_=this.s,_!=null&&c.push(":",String(_))),(_=this.l)&&(this.g&&_.charAt(0)!="/"&&c.push("/"),c.push(ci(_,_.charAt(0)=="/"?Uc:Fc,!0))),(_=this.i.toString())&&c.push("?",_),(_=this.m)&&c.push("#",ci(_,Ol)),c.join("")};function tr(c){return new Is(c)}function fo(c,y,_){c.j=_?nt(y,!0):y,c.j&&(c.j=c.j.replace(/:$/,""))}function ai(c,y){if(y){if(y=Number(y),isNaN(y)||0>y)throw Error("Bad port number "+y);c.s=y}else c.s=null}function li(c,y,_){y instanceof Jr?(c.i=y,Zr(c.i,c.h)):(_||(y=ci(y,$c)),c.i=new Jr(y,c.h))}function yt(c,y,_){c.i.set(y,_)}function ui(c){return yt(c,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),c}function nt(c,y){return c?y?decodeURI(c.replace(/%25/g,"%2525")):decodeURIComponent(c):""}function ci(c,y,_){return typeof c=="string"?(c=encodeURI(c).replace(y,jc),_&&(c=c.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c):null}function jc(c){return c=c.charCodeAt(0),"%"+(c>>4&15).toString(16)+(c&15).toString(16)}var ra=/[#\/\?@]/g,Fc=/[#\?:]/g,Uc=/[#\?]/g,$c=/[#\?@]/g,Ol=/#/g;function Jr(c,y){this.h=this.g=null,this.i=c||null,this.j=!!y}function pn(c){c.g||(c.g=new Map,c.h=0,c.i&&op(c.i,function(y,_){c.add(decodeURIComponent(y.replace(/\+/g," ")),_)}))}t=Jr.prototype,t.add=function(c,y){pn(this),this.i=null,c=pr(this,c);var _=this.g.get(c);return _||this.g.set(c,_=[]),_.push(y),this.h+=1,this};function xr(c,y){pn(c),y=pr(c,y),c.g.has(y)&&(c.i=null,c.h-=c.g.get(y).length,c.g.delete(y))}function Pr(c,y){return pn(c),y=pr(c,y),c.g.has(y)}t.forEach=function(c,y){pn(this),this.g.forEach(function(_,C){_.forEach(function(W){c.call(y,W,C,this)},this)},this)},t.na=function(){pn(this);const c=Array.from(this.g.values()),y=Array.from(this.g.keys()),_=[];for(let C=0;C<y.length;C++){const W=c[C];for(let J=0;J<W.length;J++)_.push(y[C])}return _},t.V=function(c){pn(this);let y=[];if(typeof c=="string")Pr(this,c)&&(y=y.concat(this.g.get(pr(this,c))));else{c=Array.from(this.g.values());for(let _=0;_<c.length;_++)y=y.concat(c[_])}return y},t.set=function(c,y){return pn(this),this.i=null,c=pr(this,c),Pr(this,c)&&(this.h-=this.g.get(c).length),this.g.set(c,[y]),this.h+=1,this},t.get=function(c,y){return c?(c=this.V(c),0<c.length?String(c[0]):y):y};function di(c,y,_){xr(c,y),0<_.length&&(c.i=null,c.g.set(pr(c,y),L(_)),c.h+=_.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const c=[],y=Array.from(this.g.keys());for(var _=0;_<y.length;_++){var C=y[_];const J=encodeURIComponent(String(C)),ve=this.V(C);for(C=0;C<ve.length;C++){var W=J;ve[C]!==""&&(W+="="+encodeURIComponent(String(ve[C]))),c.push(W)}}return this.i=c.join("&")};function pr(c,y){return y=String(y),c.j&&(y=y.toLowerCase()),y}function Zr(c,y){y&&!c.j&&(pn(c),c.i=null,c.g.forEach(function(_,C){var W=C.toLowerCase();C!=W&&(xr(this,C),di(this,W,_))},c)),c.j=y}function ap(c,y){const _=new Zn;if(d.Image){const C=new Image;C.onload=b(jn,_,"TestLoadImage: loaded",!0,y,C),C.onerror=b(jn,_,"TestLoadImage: error",!1,y,C),C.onabort=b(jn,_,"TestLoadImage: abort",!1,y,C),C.ontimeout=b(jn,_,"TestLoadImage: timeout",!1,y,C),d.setTimeout(function(){C.ontimeout&&C.ontimeout()},1e4),C.src=c}else y(!1)}function Bc(c,y){const _=new Zn,C=new AbortController,W=setTimeout(()=>{C.abort(),jn(_,"TestPingServer: timeout",!1,y)},1e4);fetch(c,{signal:C.signal}).then(J=>{clearTimeout(W),J.ok?jn(_,"TestPingServer: ok",!0,y):jn(_,"TestPingServer: server error",!1,y)}).catch(()=>{clearTimeout(W),jn(_,"TestPingServer: error",!1,y)})}function jn(c,y,_,C,W){try{W&&(W.onload=null,W.onerror=null,W.onabort=null,W.ontimeout=null),C(_)}catch{}}function lp(){this.g=new ce}function zc(c,y,_){const C=_||"";try{oi(c,function(W,J){let ve=W;p(W)&&(ve=G(W)),y.push(C+J+"="+encodeURIComponent(ve))})}catch(W){throw y.push(C+"type="+encodeURIComponent("_badmap")),W}}function Cs(c){this.l=c.Ub||null,this.j=c.eb||!1}I(Cs,we),Cs.prototype.g=function(){return new po(this.l,this.j)},Cs.prototype.i=function(c){return function(){return c}}({});function po(c,y){Mt.call(this),this.D=c,this.o=y,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}I(po,Mt),t=po.prototype,t.open=function(c,y){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=c,this.A=y,this.readyState=1,Lr(this)},t.send=function(c){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const y={headers:this.u,method:this.B,credentials:this.m,cache:void 0};c&&(y.body=c),(this.D||d).fetch(new Request(this.A,y)).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,Nr(this)),this.readyState=0},t.Sa=function(c){if(this.g&&(this.l=c,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=c.headers,this.readyState=2,Lr(this)),this.g&&(this.readyState=3,Lr(this),this.g)))if(this.responseType==="arraybuffer")c.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof d.ReadableStream<"u"&&"body"in c){if(this.j=c.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;Hc(this)}else c.text().then(this.Ra.bind(this),this.ga.bind(this))};function Hc(c){c.j.read().then(c.Pa.bind(c)).catch(c.ga.bind(c))}t.Pa=function(c){if(this.g){if(this.o&&c.value)this.response.push(c.value);else if(!this.o){var y=c.value?c.value:new Uint8Array(0);(y=this.v.decode(y,{stream:!c.done}))&&(this.response=this.responseText+=y)}c.done?Nr(this):Lr(this),this.readyState==3&&Hc(this)}},t.Ra=function(c){this.g&&(this.response=this.responseText=c,Nr(this))},t.Qa=function(c){this.g&&(this.response=c,Nr(this))},t.ga=function(){this.g&&Nr(this)};function Nr(c){c.readyState=4,c.l=null,c.j=null,c.v=null,Lr(c)}t.setRequestHeader=function(c,y){this.u.append(c,y)},t.getResponseHeader=function(c){return this.h&&this.h.get(c.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const c=[],y=this.h.entries();for(var _=y.next();!_.done;)_=_.value,c.push(_[0]+": "+_[1]),_=y.next();return c.join(`\r
1558`)};function Lr(c){c.onreadystatechange&&c.onreadystatechange.call(c)}Object.defineProperty(po.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(c){this.m=c?"include":"same-origin"}});function Rs(c){let y="";return ae(c,function(_,C){y+=C,y+=":",y+=_,y+=`\r
1559`}),y}function hi(c,y,_){e:{for(C in _){var C=!1;break e}C=!0}C||(_=Rs(_),typeof c=="string"?_!=null&&encodeURIComponent(String(_)):yt(c,y,_))}function Rt(c){Mt.call(this),this.headers=new Map,this.o=c||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}I(Rt,Mt);var up=/^https?$/i,Vl=["POST","PUT"];t=Rt.prototype,t.Ha=function(c){this.J=c},t.ea=function(c,y,_,C){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+c);y=y?y.toUpperCase():"GET",this.D=c,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Ar.g(),this.v=this.o?_e(this.o):_e(Ar),this.g.onreadystatechange=T(this.Ea,this);try{this.B=!0,this.g.open(y,String(c),!0),this.B=!1}catch(J){mo(this,J);return}if(c=_||"",_=new Map(this.headers),C)if(Object.getPrototypeOf(C)===Object.prototype)for(var W in C)_.set(W,C[W]);else if(typeof C.keys=="function"&&typeof C.get=="function")for(const J of C.keys())_.set(J,C.get(J));else throw Error("Unknown input type for opt_headers: "+String(C));C=Array.from(_.keys()).find(J=>J.toLowerCase()=="content-type"),W=d.FormData&&c instanceof d.FormData,!(0<=Array.prototype.indexOf.call(Vl,y,void 0))||C||W||_.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[J,ve]of _)this.g.setRequestHeader(J,ve);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{ia(this),this.u=!0,this.g.send(c),this.u=!1}catch(J){mo(this,J)}};function mo(c,y){c.h=!1,c.g&&(c.j=!0,c.g.abort(),c.j=!1),c.l=y,c.m=5,sa(c),nr(c)}function sa(c){c.A||(c.A=!0,jt(c,"complete"),jt(c,"error"))}t.abort=function(c){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=c||7,jt(this,"complete"),jt(this,"abort"),nr(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),nr(this,!0)),Rt.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?Ml(this):this.bb())},t.bb=function(){Ml(this)};function Ml(c){if(c.h&&typeof u<"u"&&(!c.v[1]||Fn(c)!=4||c.Z()!=2)){if(c.u&&Fn(c)==4)so(c.Ea,0,c);else if(jt(c,"readystatechange"),Fn(c)==4){c.h=!1;try{const ve=c.Z();e:switch(ve){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var y=!0;break e;default:y=!1}var _;if(!(_=y)){var C;if(C=ve===0){var W=String(c.D).match(ho)[1]||null;!W&&d.self&&d.self.location&&(W=d.self.location.protocol.slice(0,-1)),C=!up.test(W?W.toLowerCase():"")}_=C}if(_)jt(c,"complete"),jt(c,"success");else{c.m=6;try{var J=2<Fn(c)?c.g.statusText:""}catch{J=""}c.l=J+" ["+c.Z()+"]",sa(c)}}finally{nr(c)}}}}function nr(c,y){if(c.g){ia(c);const _=c.g,C=c.v[0]?()=>{}:null;c.g=null,c.v=null,y||jt(c,"ready");try{_.onreadystatechange=C}catch{}}}function ia(c){c.I&&(d.clearTimeout(c.I),c.I=null)}t.isActive=function(){return!!this.g};function Fn(c){return c.g?c.g.readyState:0}t.Z=function(){try{return 2<Fn(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(c){if(this.g){var y=this.g.responseText;return c&&y.indexOf(c)==0&&(y=y.substring(c.length)),H(y)}};function jl(c){try{if(!c.g)return null;if("response"in c.g)return c.g.response;switch(c.H){case"":case"text":return c.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in c.g)return c.g.mozResponseArrayBuffer}return null}catch{return null}}function oa(c){const y={};c=(c.g&&2<=Fn(c)&&c.g.getAllResponseHeaders()||"").split(`\r
1560`);for(let C=0;C<c.length;C++){if(M(c[C]))continue;var _=F(c[C]);const W=_[0];if(_=_[1],typeof _!="string")continue;_=_.trim();const J=y[W]||[];y[W]=J,J.push(_)}D(y,function(C){return C.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function es(c,y,_){return _&&_.internalChannelParams&&_.internalChannelParams[c]||y}function Fl(c){this.Aa=0,this.i=[],this.j=new Zn,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=es("failFast",!1,c),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=es("baseRetryDelayMs",5e3,c),this.cb=es("retryDelaySeedMs",1e4,c),this.Wa=es("forwardChannelMaxRetries",2,c),this.wa=es("forwardChannelRequestTimeoutMs",2e4,c),this.pa=c&&c.xmlHttpFactory||void 0,this.Xa=c&&c.Tb||void 0,this.Ca=c&&c.useFetchStreams||!1,this.L=void 0,this.J=c&&c.supportsCrossDomainXhr||!1,this.K="",this.h=new co(c&&c.concurrentRequestLimit),this.Da=new lp,this.P=c&&c.fastHandshake||!1,this.O=c&&c.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=c&&c.Rb||!1,c&&c.xa&&this.j.xa(),c&&c.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&c&&c.detectBufferingProxy||!1,this.ja=void 0,c&&c.longPollingTimeout&&0<c.longPollingTimeout&&(this.ja=c.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=Fl.prototype,t.la=8,t.G=1,t.connect=function(c,y,_,C){gt(0),this.W=c,this.H=y||{},_&&C!==void 0&&(this.H.OSID=_,this.H.OAID=C),this.F=this.X,this.I=Kc(this,null,this.W),ts(this)};function mn(c){if(aa(c),c.G==3){var y=c.U++,_=tr(c.I);if(yt(_,"SID",c.K),yt(_,"RID",y),yt(_,"TYPE","terminate"),As(c,_),y=new kr(c,c.j,y),y.L=2,y.v=ui(tr(_)),_=!1,d.navigator&&d.navigator.sendBeacon)try{_=d.navigator.sendBeacon(y.v.toString(),"")}catch{}!_&&d.Image&&(new Image().src=y.v,_=!0),_||(y.g=Qc(y.j,null),y.g.ea(y.v)),y.F=Date.now(),_t(y)}Gc(c)}function Dr(c){c.g&&(Ul(c),c.g.cancel(),c.g=null)}function aa(c){Dr(c),c.u&&(d.clearTimeout(c.u),c.u=null),ca(c),c.h.cancel(),c.s&&(typeof c.s=="number"&&d.clearTimeout(c.s),c.s=null)}function ts(c){if(!er(c.h)&&!c.s){c.s=!0;var y=c.Ga;de||ee(),re||(de(),re=!0),ge.add(y,c),c.B=0}}function cp(c,y){return Oc(c.h)>=c.h.j-(c.s?1:0)?!1:c.s?(c.i=y.D.concat(c.i),!0):c.G==1||c.G==2||c.B>=(c.Va?0:c.Wa)?!1:(c.s=fn(T(c.Ga,c,y),qc(c,c.B)),c.B++,!0)}t.Ga=function(c){if(this.s)if(this.s=null,this.G==1){if(!c){this.U=Math.floor(1e5*Math.random()),c=this.U++;const W=new kr(this,this.j,c);let J=this.o;if(this.S&&(J?(J=R(J),k(J,this.S)):J=this.S),this.m!==null||this.O||(W.H=J,J=null),this.P)e:{for(var y=0,_=0;_<this.i.length;_++){t:{var C=this.i[_];if("__data__"in C.map&&(C=C.map.__data__,typeof C=="string")){C=C.length;break t}C=void 0}if(C===void 0)break;if(y+=C,4096<y){y=_;break e}if(y===4096||_===this.i.length-1){y=_+1;break e}}y=1e3}else y=1e3;y=fi(this,W,y),_=tr(this.I),yt(_,"RID",c),yt(_,"CVER",22),this.D&&yt(_,"X-HTTP-Session-Id",this.D),As(this,_),J&&(this.O?y="headers="+encodeURIComponent(String(Rs(J)))+"&"+y:this.m&&hi(_,this.m,J)),Dl(this.h,W),this.Ua&&yt(_,"TYPE","init"),this.P?(yt(_,"$req",y),yt(_,"SID","null"),W.T=!0,ea(W,_,null)):ea(W,_,y),this.G=2}}else this.G==3&&(c?la(this,c):this.i.length==0||er(this.h)||la(this))};function la(c,y){var _;y?_=y.l:_=c.U++;const C=tr(c.I);yt(C,"SID",c.K),yt(C,"RID",_),yt(C,"AID",c.T),As(c,C),c.m&&c.o&&hi(C,c.m,c.o),_=new kr(c,c.j,_,c.B+1),c.m===null&&(_.H=c.o),y&&(c.i=y.D.concat(c.i)),y=fi(c,_,1e3),_.I=Math.round(.5*c.wa)+Math.round(.5*c.wa*Math.random()),Dl(c.h,_),ea(_,C,y)}function As(c,y){c.H&&ae(c.H,function(_,C){yt(y,C,_)}),c.l&&oi({},function(_,C){yt(y,C,_)})}function fi(c,y,_){_=Math.min(c.i.length,_);var C=c.l?T(c.l.Na,c.l,c):null;e:{var W=c.i;let J=-1;for(;;){const ve=["count="+_];J==-1?0<_?(J=W[0].g,ve.push("ofs="+J)):J=0:ve.push("ofs="+J);let pt=!0;for(let Jt=0;Jt<_;Jt++){let st=W[Jt].g;const sn=W[Jt].map;if(st-=J,0>st)J=Math.max(0,W[Jt].g-100),pt=!1;else try{zc(sn,ve,"req"+st+"_")}catch{C&&C(sn)}}if(pt){C=ve.join("&");break e}}}return c=c.i.splice(0,_),y.D=c,C}function go(c){if(!c.g&&!c.u){c.Y=1;var y=c.Fa;de||ee(),re||(de(),re=!0),ge.add(y,c),c.v=0}}function ua(c){return c.g||c.u||3<=c.v?!1:(c.Y++,c.u=fn(T(c.Fa,c),qc(c,c.v)),c.v++,!0)}t.Fa=function(){if(this.u=null,Wc(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var c=2*this.R;this.j.info("BP detection timer enabled: "+c),this.A=fn(T(this.ab,this),c)}},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,gt(10),Dr(this),Wc(this))};function Ul(c){c.A!=null&&(d.clearTimeout(c.A),c.A=null)}function Wc(c){c.g=new kr(c,c.j,"rpc",c.Y),c.m===null&&(c.g.H=c.o),c.g.O=0;var y=tr(c.qa);yt(y,"RID","rpc"),yt(y,"SID",c.K),yt(y,"AID",c.T),yt(y,"CI",c.F?"0":"1"),!c.F&&c.ja&&yt(y,"TO",c.ja),yt(y,"TYPE","xmlhttp"),As(c,y),c.m&&c.o&&hi(y,c.m,c.o),c.L&&(c.g.I=c.L);var _=c.g;c=c.ia,_.L=1,_.v=ui(tr(y)),_.m=null,_.P=!0,Nl(_,c)}t.Za=function(){this.C!=null&&(this.C=null,Dr(this),ua(this),gt(19))};function ca(c){c.C!=null&&(d.clearTimeout(c.C),c.C=null)}function da(c,y){var _=null;if(c.g==y){ca(c),Ul(c),c.g=null;var C=2}else if(xn(c.h,y))_=y.D,Vc(c.h,y),C=1;else return;if(c.G!=0){if(y.o)if(C==1){_=y.m?y.m.length:0,y=Date.now()-y.F;var W=c.B;C=Dt(),jt(C,new Cr(C,_)),ts(c)}else go(c);else if(W=y.s,W==3||W==0&&0<y.X||!(C==1&&cp(c,y)||C==2&&ua(c)))switch(_&&0<_.length&&(y=c.h,y.i=y.i.concat(_)),W){case 1:ks(c,5);break;case 4:ks(c,10);break;case 3:ks(c,6);break;default:ks(c,2)}}}function qc(c,y){let _=c.Ta+Math.floor(Math.random()*c.cb);return c.isActive()||(_*=2),_*y}function ks(c,y){if(c.j.info("Error code "+y),y==2){var _=T(c.fb,c),C=c.Xa;const W=!C;C=new Is(C||"//www.google.com/images/cleardot.gif"),d.location&&d.location.protocol=="http"||fo(C,"https"),ui(C),W?ap(C.toString(),_):Bc(C.toString(),_)}else gt(2);c.G=0,c.l&&c.l.sa(y),Gc(c),aa(c)}t.fb=function(c){c?(this.j.info("Successfully pinged google.com"),gt(2)):(this.j.info("Failed to ping google.com"),gt(1))};function Gc(c){if(c.G=0,c.ka=[],c.l){const y=Mc(c.h);(y.length!=0||c.i.length!=0)&&(V(c.ka,y),V(c.ka,c.i),c.h.i.length=0,L(c.i),c.i.length=0),c.l.ra()}}function Kc(c,y,_){var C=_ instanceof Is?tr(_):new Is(_);if(C.g!="")y&&(C.g=y+"."+C.g),ai(C,C.s);else{var W=d.location;C=W.protocol,y=y?y+"."+W.hostname:W.hostname,W=+W.port;var J=new Is(null);C&&fo(J,C),y&&(J.g=y),W&&ai(J,W),_&&(J.l=_),C=J}return _=c.D,y=c.ya,_&&y&&yt(C,_,y),yt(C,"VER",c.la),As(c,C),C}function Qc(c,y,_){if(y&&!c.J)throw Error("Can't create secondary domain capable XhrIo object.");return y=c.Ca&&!c.pa?new Rt(new Cs({eb:_})):new Rt(c.pa),y.Ha(c.J),y}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function $l(){}t=$l.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function ha(){}ha.prototype.g=function(c,y){return new Pn(c,y)};function Pn(c,y){Mt.call(this),this.g=new Fl(y),this.l=c,this.h=y&&y.messageUrlParams||null,c=y&&y.messageHeaders||null,y&&y.clientProtocolHeaderRequired&&(c?c["X-Client-Protocol"]="webchannel":c={"X-Client-Protocol":"webchannel"}),this.g.o=c,c=y&&y.initMessageHeaders||null,y&&y.messageContentType&&(c?c["X-WebChannel-Content-Type"]=y.messageContentType:c={"X-WebChannel-Content-Type":y.messageContentType}),y&&y.va&&(c?c["X-WebChannel-Client-Profile"]=y.va:c={"X-WebChannel-Client-Profile":y.va}),this.g.S=c,(c=y&&y.Sb)&&!M(c)&&(this.g.m=c),this.v=y&&y.supportsCrossDomainXhr||!1,this.u=y&&y.sendRawJson||!1,(y=y&&y.httpSessionIdParam)&&!M(y)&&(this.g.D=y,c=this.h,c!==null&&y in c&&(c=this.h,y in c&&delete c[y])),this.j=new ns(this)}I(Pn,Mt),Pn.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Pn.prototype.close=function(){mn(this.g)},Pn.prototype.o=function(c){var y=this.g;if(typeof c=="string"){var _={};_.__data__=c,c=_}else this.u&&(_={},_.__data__=G(c),c=_);y.i.push(new Dc(y.Ya++,c)),y.G==3&&ts(y)},Pn.prototype.N=function(){this.g.l=null,delete this.j,mn(this.g),delete this.g,Pn.aa.N.call(this)};function Yc(c){Le.call(this),c.__headers__&&(this.headers=c.__headers__,this.statusCode=c.__status__,delete c.__headers__,delete c.__status__);var y=c.__sm__;if(y){e:{for(const _ in y){c=_;break e}c=void 0}(this.i=c)&&(c=this.i,y=y!==null&&c in y?y[c]:void 0),this.data=y}else this.data=c}I(Yc,Le);function Xc(){Oe.call(this),this.status=1}I(Xc,Oe);function ns(c){this.g=c}I(ns,$l),ns.prototype.ua=function(){jt(this.g,"a")},ns.prototype.ta=function(c){jt(this.g,new Yc(c))},ns.prototype.sa=function(c){jt(this.g,new Xc)},ns.prototype.ra=function(){jt(this.g,"b")},ha.prototype.createWebChannel=ha.prototype.g,Pn.prototype.send=Pn.prototype.o,Pn.prototype.open=Pn.prototype.m,Pn.prototype.close=Pn.prototype.close,tT=function(){return new ha},eT=function(){return Dt()},ZS=Ue,Pg={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},Jo.NO_ERROR=0,Jo.TIMEOUT=8,Jo.HTTP_ERROR=6,_h=Jo,xc.COMPLETE="complete",JS=xc,Se.EventType=Pe,Pe.OPEN="a",Pe.CLOSE="b",Pe.ERROR="c",Pe.MESSAGE="d",Mt.prototype.listen=Mt.prototype.K,Iu=Se,Rt.prototype.listenOnce=Rt.prototype.L,Rt.prototype.getLastError=Rt.prototype.Ka,Rt.prototype.getLastErrorCode=Rt.prototype.Ba,Rt.prototype.getStatus=Rt.prototype.Z,Rt.prototype.getResponseJson=Rt.prototype.Oa,Rt.prototype.getResponseText=Rt.prototype.oa,Rt.prototype.send=Rt.prototype.ea,Rt.prototype.setWithCredentials=Rt.prototype.Ha,XS=Rt}).apply(typeof Jd<"u"?Jd:typeof self<"u"?self:typeof window<"u"?window:{});const cE="@firebase/firestore";/**
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 Cn{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}}Cn.UNAUTHENTICATED=new Cn(null),Cn.GOOGLE_CREDENTIALS=new Cn("google-credentials-uid"),Cn.FIRST_PARTY=new Cn("first-party-uid"),Cn.MOCK_USER=new Cn("mock-user");/**
1576 * @license
1577 * Copyright 2017 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 */let wl="11.0.2";/**
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 */const zo=new Ay("@firebase/firestore");function Va(){return zo.logLevel}function Ce(t,...e){if(zo.logLevel<=Ze.DEBUG){const n=e.map(Uy);zo.debug(`Firestore (${wl}): ${t}`,...n)}}function Ks(t,...e){if(zo.logLevel<=Ze.ERROR){const n=e.map(Uy);zo.error(`Firestore (${wl}): ${t}`,...n)}}function tl(t,...e){if(zo.logLevel<=Ze.WARN){const n=e.map(Uy);zo.warn(`Firestore (${wl}): ${t}`,...n)}}function Uy(t){if(typeof t=="string")return t;try{/**
1606* @license
1607* Copyright 2020 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*/return function(n){return JSON.stringify(n)}(t)}catch{return t}}/**
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 */function ze(t="Unexpected state"){const e=`FIRESTORE (${wl}) INTERNAL ASSERTION FAILED: `+t;throw Ks(e),new Error(e)}function ht(t,e){t||ze()}function We(t,e){return t}/**
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, softw
1645are
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 */const ie={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 Ae extends Zs{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
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 Hs{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/**
1666 * @license
1667 * Copyright 2017 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 */class nT{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class M5{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Cn.UNAUTHENTICATED))}shutdown(){}}class j5{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 F5{constructor(e){this.t=e,this.currentUser=Cn.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){ht(this.o===void 0);let r=this.i;const i=f=>this.i!==r?(r=this.i,n(f)):Promise.resolve();let a=new Hs;this.o=()=>{this.i++,this.currentUser=this.u(),a.resolve(),a=new Hs,e.enqueueRetryable(()=>i(this.currentUser))};const u=()=>{const f=a;e.enqueueRetryable(async()=>{await f.promise,await i(this.currentUser)})},d=f=>{Ce("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=f,this.o&&(this.auth.addAuthTokenListener(this.o),u())};this.t.onInit(f=>d(f)),setTimeout(()=>{if(!this.auth){const f=this.t.getImmediate({optional:!0});f?d(f):(Ce("FirebaseAuthCredentialsProvider","Auth not yet detected"),a.resolve(),a=new Hs)}},0),u()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(Ce("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(ht(typeof r.accessToken=="string"),new nT(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 ht(e===null||typeof e=="string"),new Cn(e)}}class U5{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Cn.FIRST_PARTY,this.T=new Map}I(){return this.P?this.P():null}get headers(){this.T.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.T.set("Authorization",e),this.h&&this.T.set("X-Goog-Iam-Authorization-Token",this.h),this.T}}class $5{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new U5(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Cn.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class B5{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 z5{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){ht(this.o===void 0);const r=a=>
1680{a.error!=null&&Ce("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${a.error.message}`);const u=a.token!==this.R;return this.R=a.token,Ce("FirebaseAppCheckTokenProvider",`Received ${u?"new":"existing"} token.`),u?n(a.token):Promise.resolve()};this.o=a=>{e.enqueueRetryable(()=>r(a))};const i=a=>{Ce("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=a,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(a=>i(a)),setTimeout(()=>{if(!this.appCheck){const a=this.A.getImmediate({optional:!0});a?i(a):Ce("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(ht(typeof n.token=="string"),this.R=n.token,new B5(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/**
1681 * @license
1682 * Copyright 2020 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 */function H5(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}/**
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 rT{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const i=H5(40);for(let a=0;a<i.length;++a)r.length<20&&i[a]<n&&(r+=e.charAt(i[a]%e.length))}return r}}function rt(t,e){return t<e?-1:t>e?1:0}function nl(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/**
1711 * @license
1712 * Copyright 2017 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 tn{static now(){return tn.fromMillis(Date.now())}static fromDate(e){return tn.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new tn(n,r)}constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new Ae(ie.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Ae(ie.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new Ae(ie.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Ae(ie.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?rt(this.nanoseconds,e.nanoseconds):rt(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")}
1725}/**
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 */class He{static fromTimestamp(e){return new He(e)}static min(){return new He(new tn(0,0))}static max(){return new He(new tn(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
1741 * @license
1742 * Copyright 2017 Google LLC
1743 *
1744 * Licensed under the Apache License, Version 2.0 (the "License");
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 zu{constructor(e,n,r){n===void 0?n=0:n>e.length&&ze(),r===void 0?r=e.length-n:r>e.length-n&&ze(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return zu.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof zu?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 a=e.get(i),u=n.get(i);if(a<u)return-1;if(a>u)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class bt extends zu{construct(e,n,r){return new bt(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 Ae(ie.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new bt(n)}static emptyPath(){return new bt([])}}const W5=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class wn extends zu{construct(e,n,r){return new wn(e,n,r)}static isValidIdentifier(e){return W5.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),wn.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new wn(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const a=()=>{if(r.length===0)throw new Ae(ie.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let u=!1;for(;i<e.length;){const d=e[i];if(d==="\\"){if(i+1===e.length)throw new Ae(ie.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const f=e[i+1];if(f!=="\\"&&f!=="."&&f!=="`")throw new Ae(ie.INVALID_ARGUMENT,"Path has invali
1755d escape sequence: "+e);r+=f,i+=2}else d==="`"?(u=!u,i++):d!=="."||u?(r+=d,i++):(a(),i++)}if(a(),u)throw new Ae(ie.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new wn(n)}static emptyPath(){return new wn([])}}/**
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 Ve{constructor(e){this.path=e}static fromPath(e){return new Ve(bt.fromString(e))}static fromName(e){return new Ve(bt.fromString(e).popFirst(5))}static empty(){return new Ve(bt.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&&bt.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return bt.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Ve(new bt(e.slice()))}}function q5(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=He.fromTimestamp(r===1e9?new tn(n+1,0):new tn(n,r));return new qi(i,Ve.empty(),e)}function G5(t){return new qi(t.readTime,t.key,-1)}class qi{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new qi(He.min(),Ve.empty(),-1)}static max(){return new qi(He.max(),Ve.empty(),-1)}}function K5(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=Ve.comparator(t.documentKey,e.documentKey),n!==0?n:rt(t.largestBatchId,e.largestBatchId))}/**
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 */const Q5="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Y5{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/**
1786 * @license
1787 * Copyright 2017 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 */async function _l(t){if(t.code!==ie.FAILED_PRECONDITION||t.message!==Q5)throw t;Ce("LocalStore","Unexpectedly lost primary lease")}/**
1801 * @license
1802 * Copyright 2017 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, softw
1810are
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 se{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&&ze(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new se((r,i)=>{this.nextCallback=a=>{this.wrapSuccess(e,a).next(r,i)},this.catchCallback=a=>{this.wrapFailure(n,a).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof se?n:se.resolve(n)}catch(n){return se.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):se.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):se.reject(n)}static resolve(e){return new se((n,r)=>{n(e)})}static reject(e){return new se((n,r)=>{r(e)})}static waitFor(e){return new se((n,r)=>{let i=0,a=0,u=!1;e.forEach(d=>{++i,d.next(()=>{++a,u&&a===i&&n()},f=>r(f))}),u=!0,a===i&&n()})}static or(e){let n=se.resolve(!1);for(const r of e)n=n.next(i=>i?se.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,a)=>{r.push(n.call(this,i,a))}),this.waitFor(r)}static mapArray(e,n){return new se((r,i)=>{const a=e.length,u=new Array(a);let d=0;for(let f=0;f<a;f++){const p=f;n(e[p]).next(w=>{u[p]=w,++d,d===a&&r(u)},w=>i(w))}})}static doWhile(e,n){return new se((r,i)=>{const a=()=>{e()===!0?n().next(()=>{a()},i):r()};a()})}}function X5(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function El(t){return t.name==="IndexedDbTransactionError"}/**
1816 * @license
1817 * Copyright 2018 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 */class Df{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}}Df.oe=-1;function Of(t){return t==null}function zh(t){return t===0&&1/t==-1/0}function J5(t){return typeof t=="number"&&Number.isInteger(t)&&!zh(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/**
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 */function Z5(t){let e="";for(let n=0;n<t.length;n++)e.length>0&&(e=dE(e)),e=e3(t.get(n),e);return dE(e)}function e3(t,e){let n=e;const r=t.length;for(let i=0;i<r;i++){const a=t.charAt(i);switch(a){case"\0":n+="��";break;case"�":n+="��";break;default:n+=a}}return n}function dE(t){return t+"��"}/**
1846 * @license
1847 * Copyright 2017 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 */function hE(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function to(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function sT(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/**
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 Lt{constructor(e,n){this.comparator=e,this.root=n||vn.EMPTY}insert(e,n){return new Lt(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,vn.BLACK,null,null))}remove(e){return new Lt(this.comparator,this.root.remove(e,this.comparator).copy(null,null,vn.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 Zd(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Zd(this.root,e,this.comparator,!1)}getReverseIterator(){return new Zd(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Zd(this.root,e,this.comparator,!0)}}class Zd{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let a=1;for(;!e.isEmpty();)if(a=n?r(e.key,n):1,n&&i&&(a*=-1),a<0)e=this.isReverse?e.left:e.right;else{if(a===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 vn{constructor(e,n,r,i,a){this.key=e,this.value=n,this.color=r??vn.RED,this.left=i??vn.EMPTY,this.right=a??vn.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,a){return new vn(e??this.key,n??this.value,r??this.color,i??this.left,a??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 a=r(e,i.key);return i=a<0?i.copy(null,null,null,i.left.insert(e,n,r),null):a===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 vn.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 vn.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,vn.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,vn.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 ze();const e=this.left.check();if(e!==this.right.check())throw ze();return e+(this.isRed()?0:1)}}vn.EMPTY=null,vn.RED=!0,vn.BLACK=!1;
1875vn.EMPTY=new class{constructor(){this.size=0}get key(){throw ze()}get value(){throw ze()}get color(){throw ze()}get left(){throw ze()}get right(){throw ze()}copy(e,n,r,i,a){return this}insert(e,n,r){return new vn(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}};/**
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 nn{constructor(e){this.comparator=e,this.data=new Lt(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 fE(this.data.getIterator())}getIteratorFrom(e){return new fE(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 nn)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,a=r.getNext().key;if(this.comparator(i,a)!==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 nn(this.comparator);return n.data=e,n}}class fE{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
1891 * @license
1892 * Copyright 2020 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 ar{constructor(e){this.fields=e,e.sort(wn.comparator)}static empty(){return new ar([])}unionWith(e){let n=new nn(wn.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new ar(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return nl(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/**
1906 * @license
1907 * Copyright 2023 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, software
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 iT extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
1921 * @license
1922 * Copyright 2020 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 _n{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(a){throw typeof DOMException<"u"&&a instanceof DOMException?new iT("Invalid base64 string: "+a):a}}(e);return new _n(n)}static fromUint8Array(e){const n=function(i){let a="";for(let u=0;u<i.length;++u)a+=String.fromCharCode(i[u]);return a}(e);return new _n(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 rt(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}_n.EMPTY_BYTE_STRING=new _n("");const t3=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Gi(t){if(ht(!!t),typeof t=="string"){let e=0;const n=t3.exec(t);if(ht(!!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:$t(t.seconds),nanos:$t(t.nanos)}}function $t(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function Ki(t){return typeof t=="string"?_n.fromBase64String(t):_n.fromUint8Array(t)}/**
1936 * @license
1937 * Copyright 2020 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 */function $y(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 Vf(t){const e=t.mapValue.fields.__previous_value__;return $y(e)?Vf(e):e}function Hu(t){const e=Gi(t.mapValue.fields.__local_write_time__.timestampValue);return new tn(e.seconds,e.nanos)}/**
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 n3{constructor(e,n,r,i,a,u,d,f,p){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=u,this.autoDetectLongPolling=d,this.longPollingOptions=f,this.useFetchStreams=p}}class Wu{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new Wu("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof Wu&&e.projectId===this.projectId&&e.database===this.database}}/**
1966 * @license
1967 * Copyright 2020 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 */const eh={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Qi(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?$y(t)?4:s3(t)?9007199254740991:r3(t)?10:11:ze()}function ms(t,e){if(t===e)return!0;const n=Qi(t);if(n!==Qi(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Hu(t).isEqual(Hu(e));case 3:return function(i,a){if(typeof i.timestampValue=="string"&&typeof a.timestampValue=="string"&&i.timestampValue.length===a.timestampValue.length)return i.timestampValue===a.timestampValue;const u=Gi(i.timestampValue),d=Gi(a.timestampValue);return u.seconds===d.seconds&&u.nanos===d.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(i,a){return Ki(i.bytesValue).isEqual(Ki(a.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(i,a){return $t(i.geoPointValue.latitude)===$t(a.geoPointValue.latitude)&&$t(i.geoPointValue.longitude)===$t(a.geoPointValue.longitude)}(t,e);case 2:return function(i,a){if("integerValue"in i&&"integerValue"in a)return $t(i.integerValue)===$t(a.integerValue);if("doubleValue"in i&&"doubleValue"in a){const u=$t(i.doubleValue),d=$t(a.doubleValue);return u===d?zh(u)===zh(d):isNaN(u)&&isNaN(d)}return!1}(t,e);case 9:return nl(t.arrayValue.values||[],e.arrayValue.values||[],ms);case 10:case 11:return function(i,a){const u=i.mapValue.fields||{},d=a.mapValue.fields||{};if(hE(u)!==hE(d))return!1;for(const f in u)if(u.hasOwnProperty(f)&&(d[f]===void 0||!ms(u[f],d[f])))return!1;return!0}(t,e);default:return ze()}}function qu(t,e){return(t.values||[]).find(n=>ms(n,e))!==void 0}function rl(t,e){if(t===e)return 0;const n=Qi(t),r=Qi(e);if(n!==r)return rt(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return rt(t.booleanValue,e.booleanValue);case 2:return function(a,u){const d=$t(a.integerValue||a.doubleValue),f=$t(u.integerValue||u.doubleValue);return d<f?-1:d>f?1:d===f?0:isNaN(d)?isNaN(f)?0:-1:1}(t,e);case 3:return pE(t.timestampValue,e.timestampValue);case 4:return pE(Hu(t),Hu(e));case 5:return rt(t.stringValue,e.stringValue);case 6:return function(a,u){const d=Ki(a),f=Ki(u);return d.compareTo(f)}(t.bytesValue,e.bytesValue);case 7:return function(a,u){const d=a.split("/"),f=u.split("/");for(let p=0;p<d.length&&p<f.length;p++){const w=rt(d[p],f[p]);if(w!==0)return w}return rt(d.length,f.length)}(t.referenceValue,e.referenceValue);case 8:return function(a,u){const d=rt($t(a.latitude),$t(u.latitude));return d!==0?d:rt($t(a.longitude),$t(u.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return mE(t.arrayValue,e.arrayValue);case 10:return function(a,u){var d,f,p,w;const E=a.fields||{},T=u.fields||{},b=(d=E.value)===null||d===void 0?void 0:d.arrayValue,I=(f=T.value)===null||f===void 0?void 0:f.arrayValue,L=rt(((p=b==null?void 0:b.values)===null||p===void 0?void 0:p.length)||0,((w=I==null?void 0:I.values)===null||w===void 0?void 0:w.length)||0);return L!==0?L:mE(b,I)}(t.mapValue,e.mapValue);case 11:return function(a,u){if(a===eh.mapValue&&u===eh.mapValue)return 0;if(a===eh.mapValue)return 1;if(u===eh.mapValue)return-1;const d=a.fields||{},f=Object.keys(d),p=u.fields||{},w=Object.keys(p);f.sort(),w.sort();for(let E=0;E<f.length&&E<w.length;++E){const T=rt(f[E],w[E]);if(T!==0)return T;const b=rl(d[f[E]],p[w[E]]);if(b!==0)return b}return rt(f.length,w.length)}(t.mapValue,e.mapValue);default:throw ze()}}function pE(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return rt(t,e);const n=Gi(t),r=Gi(e),i=rt(n.seconds,r.seconds);return i!==0?i:rt(n.nanos,r.nanos)}function mE(t,e){const n=t.values||[],r=e.values||[];for(let i=0;i<n.length&&i<r.length;++i){const a=rl(n[i],r[i]);if(a)return a}return rt(n.length,r.length)}function sl(t){return Ng(t)}function Ng(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=Gi(n);return`time(${r.seconds},${r.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return Ki(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return Ve.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 a of n.values||[])i?i=!1:r+=",",r+=Ng(a);return r+"]"}(t.arrayValue):"mapValue"in t?function(n){const r=Object.keys(n.fields||{}).sort();let i="{",a=!0;for(const u of r)a?a=!1:i+=",",i+=`${u}:${Ng(n.fields[u])}`;return i+"}"}(t.mapValue):ze()}function Eh(t){switch(Qi(t)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=Vf(t);return e?16+Eh(e):16;case 5:return 2*t.stringValue.length;case 6:return Ki(t.bytesValue).approximateByteSize();case 7:return t.referenceValue.length;case 9:return function(r){return(r.values||[]).reduce((i,a)=>i+Eh(a),0)}(t.arrayValue);case 10:case 11:return function(r){let i=0;return to(r.fields,(a,u)=>{i+=a.length+Eh(u)}),i}(t.mapValue);default:throw ze()}}function gE(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function Lg(t){return!!t&&"integerValue"in t}function By(t){return!!t&&"arrayValue"in t}function yE(t){return!!t&&"nullValue"in t}function vE(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function Sh(t){return!!t&&"mapValue"in t}function r3(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 Du(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 to(t.mapValue.fields,(n,r)=>e.mapValue.fields[n]=Du(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Du(t.arrayValue.values[n]);return e}return Object.assign({},t)}function s3(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/**
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 */class Kn{constructor(e){this.value=e}static empty(){return new Kn({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)],!Sh(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=Du(n)}setAll(e){let n=wn.emptyPath(),r={},i=[];e.forEach((u,d)=>{if(!n.isImmediateParentOf(d)){const f=this.getFieldsMap(n);this.applyChanges(f,r,i),r={},i=[],n=d.popLast()}u?r[d.lastSegment()]=Du(u):i.push(d.lastSegment())});const a=this.getFieldsMap(n);this.applyChanges(a,r,i)}delete(e){const n=this.field(e.popLast());Sh(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return ms(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)];Sh(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){to(n,(i,a)=>e[i]=a);for(const i of r)delete e[i]}clone(){return new Kn(Du(this.value))}}function oT(t){const e=[];return to(t.fields,(n,r)=>{const i=new wn([n]);if(Sh(r)){const a=oT(r.mapValue).fields;
vendor: 4,180 bytes, lines 1995-2035
1995if(a.length===0)e.push(i);else for(const u of a)e.push(i.child(u))}else e.push(i)}),new ar(e)}/**
1996 * @license
1997 * Copyright 2017 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 */class Rn{constructor(e,n,r,i,a,u,d){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=a,this.data=u,this.documentState=d}static newInvalidDocument(e){return new Rn(e,0,He.min(),He.min(),He.min(),Kn.empty(),0)}static newFoundDocument(e,n,r,i){return new Rn(e,1,n,He.min(),r,i,0)}static newNoDocument(e,n){return new Rn(e,2,n,He.min(),He.min(),Kn.empty(),0)}static newUnknownDocument(e,n){return new Rn(e,3,n,He.min(),He.min(),Kn.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(He.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=Kn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Kn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=He.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 Rn&&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 Rn(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}})`}}/**
2011 * @license
2012 * Copyright 2022 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 Hh{constructor(e,n){this.position=e,this.inclusive=n}}function wE(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const a=e[i],u=t.position[i];if(a.field.isKeyField()?r=Ve.comparator(Ve.fromName(u.referenceValue),n.key):r=rl(u,n.data.field(a.field)),a.dir==="desc"&&(r*=-1),r!==0)break}return r}function _E(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!ms(t.position[n],e.position[n]))return!1;return!0}/**
2026 * @license
2027 * Copyright 2022 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, softw
2035are
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 Wh{constructor(e,n="asc"){this.field=e,this.dir=n}}function i3(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/**
2041 * @license
2042 * Copyright 2022 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 aT{}class Qt extends aT{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 a3(e,n,r):n==="array-contains"?new c3(e,r):n==="in"?new d3(e,r):n==="not-in"?new h3(e,r):n==="array-contains-any"?new f3(e,r):new Qt(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new l3(e,r):new u3(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(rl(n,this.value)):n!==null&&Qi(this.value)===Qi(n)&&this.matchesComparison(rl(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 ze()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class qr extends aT{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new qr(e,n)}matches(e){return lT(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 lT(t){return t.op==="and"}function uT(t){return o3(t)&&lT(t)}function o3(t){for(const e of t.filters)if(e instanceof qr)return!1;return!0}function Dg(t){if(t instanceof Qt)return t.field.canonicalString()+t.op.toString()+sl(t.value);if(uT(t))return t.filters.map(e=>Dg(e)).join(",");{const e=t.filters.map(n=>Dg(n)).join(",");return`${t.op}(${e})`}}function cT(t,e){return t instanceof Qt?function(r,i){return i instanceof Qt&&r.op===i.op&&r.field.isEqual(i.field)&&ms(r.value,i.value)}(t,e):t instanceof qr?function(r,i){return i instanceof qr&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((a,u,d)=>a&&cT(u,i.filters[d]),!0):!1}(t,e):void ze()}function dT(t){return t instanceof Qt?function(n){return`${n.field.canonicalString()} ${n.op} ${sl(n.value)}`}(t):t instanceof qr?function(n){return n.op.toString()+" {"+n.getFilters().map(dT).join(" ,")+"}"}(t):"Filter"}class a3 extends Qt{constructor(e,n,r){super(e,n,r),this.key=Ve.fromName(r.referenceValue)}matches(e){const n=Ve.comparator(e.key,this.key);return this.matchesComparison(n)}}class l3 extends Qt{constructor(e,n){super(e,"in",n),this.keys=hT("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class u3 extends Qt{constructor(e,n){super(e,"not-in",n),this.keys=hT("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function hT(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>Ve.fromName(r.referenceValue))}class c3 extends Qt{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return By(n)&&qu(n.arrayValue,this.value)}}class d3 extends Qt{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&qu(this.value.arrayValue,n)}}class h3 extends Qt{constructor(e,n){super(e,"not-in",n)}matches(e){if(qu(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!qu(this.value.arrayValue,n)}}class f3 extends Qt{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!By(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>qu(this.value.arrayValue,r))}}/**
2056 * @license
2057 * Copyright 2019 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 p3{constructor(e,n=null,r=[],i=[],a=null,u=null,d=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=u,this.endAt=d,this.ue=null}}function EE(t,e=null,n=[],r=[],i=null,a=null,u=null){return new p3(t,e,n,r,i,a,u)}function zy(t){const e=We(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>Dg(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(a){return a.field.canonicalString()+a.dir}(r)).join(","),Of(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>sl(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>sl(r)).join(",")),e.ue=n}return e.ue}function Hy(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(!i3(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(!cT(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!_E(t.startAt,e.startAt)&&_E(t.endAt,e.endAt)}function Og(t){return Ve.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/**
2071 * @license
2072 * Copyright 2017 Google LLC
2073 *
2074 * Licensed under the Apache License, Version 2.0 (the "License");
2075 * you may not use this file except in compliance with the License.
2076 * You may obtain a copy of the License at
2077 *
2078 *   http://www.apache.org/licenses/LICENSE-2.0
2079 *
2080 * Unless required by applicable law or agreed to in writing, software
2081 * distributed under the License is distributed on an "AS IS" BASIS,
2082 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2083 * See the License for the specific language governing permissions and
2084 * limitations under the License.
2085 */class mc{constructor(e,n=null,r=[],i=[],a=null,u="F",d=null,f=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=u,this.startAt=d,this.endAt=f,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function m3(t,e,n,r,i,a,u,d){return new mc(t,e,n,r,i,a,u,d)}function Wy(t){return new mc(t)}function SE(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 fT(t){return t.collectionGroup!==null}function Ou(t){const e=We(t);if(e.ce===null){e.ce=[];const n=new Set;for(const a of e.explicitOrderBy)e.ce.push(a),n.add(a.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(u){let d=new nn(wn.comparator);return u.filters.forEach(f=>{f.getFlattenedFilters().forEach(p=>{p.isInequality()&&(d=d.add(p.field))})}),d})(e).forEach(a=>{n.has(a.canonicalString())||a.isKeyField()||e.ce.push(new Wh(a,r))}),n.has(wn.keyField().canonicalString())||e.ce.push(new Wh(wn.keyField(),r))}return e.ce}function hs(t){const e=We(t);return e.le||(e.le=g3(e,Ou(t))),e.le}function g3(t,e){if(t.limitType==="F")return EE(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const a=i.dir==="desc"?"asc":"desc";return new Wh(i.field,a)});const n=t.endAt?new Hh(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new Hh(t.startAt.position,t.startAt.inclusive):null;return EE(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function Vg(t,e){const n=t.filters.concat([e]);return new mc(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function Mg(t,e,n){return new mc(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Mf(t,e){return Hy(hs(t),hs(e))&&t.limitType===e.limitType}function pT(t){return`${zy(hs(t))}|lt:${t.limitType}`}function Ma(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=>dT(i)).join(", ")}]`),Of(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(u){return`${u.field.canonicalString()} (${u.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>sl(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>sl(i)).join(",")),`Target(${r})`}(hs(t))}; limitType=${t.limitType})`}function jf(t,e){return e.isFoundDocument()&&function(r,i){const a=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(a):Ve.isDocumentKey(r.path)?r.path.isEqual(a):r.path.isImmediateParentOf(a)}(t,e)&&function(r,i){for(const a of Ou(r))if(!a.field.isKeyField()&&i.data.field(a.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const a of r.filters)if(!a.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(u,d,f){const p=wE(u,d,f);return u.inclusive?p<=0:p<0}(r.startAt,Ou(r),i)||r.endAt&&!function(u,d,f){const p=wE(u,d,f);return u.inclusive?p>=0:p>0}(r.endAt,Ou(r),i))}(t,e)}function y3(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function mT(t){return(e,n)=>{let r=!1;for(const i of Ou(t)){const a=v3(i,e,n);if(a!==0)return a;r=r||i.field.isKeyField()}return 0}}function v3(t,e,n){const r=t.field.isKeyField()?Ve.comparator(e.key,n.key):function(a,u,d){const f=u.data.field(a),p=d.data.field(a);return f!==null&&p!==null?rl(f,p):ze()}
2085(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return ze()}}/**
2086 * @license
2087 * Copyright 2017 Google LLC
2088 *
2089 * Licensed under the Apache License, Version 2.0 (the "License");
2090 * you may not use this file except in compliance with the License.
2091 * You may obtain a copy of the License at
2092 *
2093 *   http://www.apache.org/licenses/LICENSE-2.0
2094 *
2095 * Unless required by applicable law or agreed to in writing, software
2096 * distributed under the License is distributed on an "AS IS" BASIS,
2097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2098 * See the License for the specific language governing permissions and
2099 * limitations under the License.
2100 */class Go{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,a]of r)if(this.equalsFn(i,e))return a}}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 a=0;a<i.length;a++)if(this.equalsFn(i[a][0],e))return void(i[a]=[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){to(this.inner,(n,r)=>{for(const[i,a]of r)e(i,a)})}isEmpty(){return sT(this.inner)}size(){return this.innerSize}}/**
2101 * @license
2102 * Copyright 2017 Google LLC
2103 *
2104 * Licensed under the Apache License, Version 2.0 (the "License");
2105 * you may not use this file except in compliance with the License.
2106 * You may obtain a copy of the License at
2107 *
2108 *   http://www.apache.org/licenses/LICENSE-2.0
2109 *
2110 * Unless required by applicable law or agreed to in writing, software
2111 * distributed under the License is distributed on an "AS IS" BASIS,
2112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2113 * See the License for the specific language governing permissions and
2114 * limitations under the License.
2115 */const w3=new Lt(Ve.comparator);function Qs(){return w3}const gT=new Lt(Ve.comparator);function Cu(...t){let e=gT;for(const n of t)e=e.insert(n.key,n);return e}function yT(t){let e=gT;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function Lo(){return Vu()}function vT(){return Vu()}function Vu(){return new Go(t=>t.toString(),(t,e)=>t.isEqual(e))}const _3=new Lt(Ve.comparator),E3=new nn(Ve.comparator);function et(...t){let e=E3;for(const n of t)e=e.add(n);return e}const S3=new nn(rt);function T3(){return S3}/**
2116 * @license
2117 * Copyright 2020 Google LLC
2118 *
2119 * Licensed under the Apache License, Version 2.0 (the "License");
2120 * you may not use this file except in compliance with the License.
2121 * You may obtain a copy of the License at
2122 *
2123 *   http://www.apache.org/licenses/LICENSE-2.0
2124 *
2125 * Unless required by applicable law or agreed to in writing, software
2126 * distributed under the License is distributed on an "AS IS" BASIS,
2127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2128 * See the License for the specific language governing permissions and
2129 * limitations under the License.
2130 */function qy(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:zh(e)?"-0":e}}function wT(t){return{integerValue:""+t}}function b3(t,e){return J5(e)?wT(e):qy(t,e)}/**
2131 * @license
2132 * Copyright 2018 Google LLC
2133 *
2134 * Licensed under the Apache License, Version 2.0 (the "License");
2135 * you may not use this file except in compliance with the License.
2136 * You may obtain a copy of the License at
2137 *
2138 *   http://www.apache.org/licenses/LICENSE-2.0
2139 *
2140 * Unless required by applicable law or agreed to in writing, software
2141 * distributed under the License is distributed on an "AS IS" BASIS,
2142 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2143 * See the License for the specific language governing permissions and
2144 * limitations under the License.
2145 */class Ff{constructor(){this._=void 0}}function I3(t,e,n){return t instanceof Gu?function(i,a){const u={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};
2145return a&&$y(a)&&(a=Vf(a)),a&&(u.fields.__previous_value__=a),{mapValue:u}}(n,e):t instanceof Ku?ET(t,e):t instanceof Qu?ST(t,e):function(i,a){const u=_T(i,a),d=TE(u)+TE(i.Pe);return Lg(u)&&Lg(i.Pe)?wT(d):qy(i.serializer,d)}(t,e)}function C3(t,e,n){return t instanceof Ku?ET(t,e):t instanceof Qu?ST(t,e):n}function _T(t,e){return t instanceof qh?function(r){return Lg(r)||function(a){return!!a&&"doubleValue"in a}(r)}(e)?e:{integerValue:0}:null}class Gu extends Ff{}class Ku extends Ff{constructor(e){super(),this.elements=e}}function ET(t,e){const n=TT(e);for(const r of t.elements)n.some(i=>ms(i,r))||n.push(r);return{arrayValue:{values:n}}}class Qu extends Ff{constructor(e){super(),this.elements=e}}function ST(t,e){let n=TT(e);for(const r of t.elements)n=n.filter(i=>!ms(i,r));return{arrayValue:{values:n}}}class qh extends Ff{constructor(e,n){super(),this.serializer=e,this.Pe=n}}function TE(t){return $t(t.integerValue||t.doubleValue)}function TT(t){return By(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/**
2146 * @license
2147 * Copyright 2017 Google LLC
2148 *
2149 * Licensed under the Apache License, Version 2.0 (the "License");
2150 * you may not use this file except in compliance with the License.
2151 * You may obtain a copy of the License at
2152 *
2153 *   http://www.apache.org/licenses/LICENSE-2.0
2154 *
2155 * Unless required by applicable law or agreed to in writing, software
2156 * distributed under the License is distributed on an "AS IS" BASIS,
2157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2158 * See the License for the specific language governing permissions and
2159 * limitations under the License.
2160 */class R3{constructor(e,n){this.field=e,this.transform=n}}function A3(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Ku&&i instanceof Ku||r instanceof Qu&&i instanceof Qu?nl(r.elements,i.elements,ms):r instanceof qh&&i instanceof qh?ms(r.Pe,i.Pe):r instanceof Gu&&i instanceof Gu}(t.transform,e.transform)}class k3{constructor(e,n){this.version=e,this.transformResults=n}}class fs{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new fs}static exists(e){return new fs(void 0,e)}static updateTime(e){return new fs(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 Th(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class Uf{}function bT(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new CT(t.key,fs.none()):new gc(t.key,t.data,fs.none());{const n=t.data,r=Kn.empty();let i=new nn(wn.comparator);for(let a of e.fields)if(!i.has(a)){let u=n.field(a);u===null&&a.length>1&&(a=a.popLast(),u=n.field(a)),u===null?r.delete(a):r.set(a,u),i=i.add(a)}return new no(t.key,r,new ar(i.toArray()),fs.none())}}function x3(t,e,n){t instanceof gc?function(i,a,u){const d=i.value.clone(),f=IE(i.fieldTransforms,a,u.transformResults);d.setAll(f),a.convertToFoundDocument(u.version,d).setHasCommittedMutations()}(t,e,n):t instanceof no?function(i,a,u){if(!Th(i.precondition,a))return void a.convertToUnknownDocument(u.version);const d=IE(i.fieldTransforms,a,u.transformResults),f=a.data;f.setAll(IT(i)),f.setAll(d),a.convertToFoundDocument(u.version,f).setHasCommittedMutations()}(t,e,n):function(i,a,u){a.convertToNoDocument(u.version).setHasCommittedMutations()}(0,e,n)}function Mu(t,e,n,r){return t instanceof gc?function(a,u,d,f){if(!Th(a.precondition,u))return d;const p=a.value.clone(),w=CE(a.fieldTransforms,f,u);return p.setAll(w),u.convertToFoundDocument(u.version,p).setHasLocalMutations(),null}(t,e,n,r):t instanceof no?function(a,u,d,f){if(!Th(a.precondition,u))return d;const p=CE(a.fieldTransforms,f,u),w=u.data;return w.setAll(IT(a)),w.setAll(p),u.convertToFoundDocument(u.version,w).setHasLocalMutations(),d===null?null:d.unionWith(a.fieldMask.fields).unionWith(a.fieldTransforms.map(E=>E.field))}(t,e,n,r):function(a,u,d){return Th(a.precondition,u)?(u.convertToNoDocument(u.version).setHasLocalMutations(),null):d}(t,e,n)}function P3(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),a=_T(r.transform,i||null);a!=null&&(n===null&&(n=Kn.empty()),n.set(r.field,a))}return n||null}function bE(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)&&nl(r,i,(
2160a,u)=>A3(a,u))}(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 gc extends Uf{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class no extends Uf{constructor(e,n,r,i,a=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=a,this.type=1}getFieldMask(){return this.fieldMask}}function IT(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function IE(t,e,n){const r=new Map;ht(t.length===n.length);for(let i=0;i<n.length;i++){const a=t[i],u=a.transform,d=e.data.field(a.field);r.set(a.field,C3(u,d,n[i]))}return r}function CE(t,e,n){const r=new Map;for(const i of t){const a=i.transform,u=n.data.field(i.field);r.set(i.field,I3(a,u,e))}return r}class CT extends Uf{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class N3 extends Uf{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
2161 * @license
2162 * Copyright 2017 Google LLC
2163 *
2164 * Licensed under the Apache License, Version 2.0 (the "License");
2165 * you may not use this file except in compliance with the License.
2166 * You may obtain a copy of the License at
2167 *
2168 *   http://www.apache.org/licenses/LICENSE-2.0
2169 *
2170 * Unless required by applicable law or agreed to in writing, software
2171 * distributed under the License is distributed on an "AS IS" BASIS,
2172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2173 * See the License for the specific language governing permissions and
2174 * limitations under the License.
2175 */class L3{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 a=this.mutations[i];a.key.isEqual(e.key)&&x3(a,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=Mu(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=Mu(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=vT();return this.mutations.forEach(i=>{const a=e.get(i.key),u=a.overlayedDocument;let d=this.applyToLocalView(u,a.mutatedFields);d=n.has(i.key)?null:d;const f=bT(u,d);f!==null&&r.set(i.key,f),u.isValidDocument()||u.convertToNoDocument(He.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),et())}isEqual(e){return this.batchId===e.batchId&&nl(this.mutations,e.mutations,(n,r)=>bE(n,r))&&nl(this.baseMutations,e.baseMutations,(n,r)=>bE(n,r))}}class Gy{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){ht(e.mutations.length===r.length);let i=function(){return _3}();const a=e.mutations;for(let u=0;u<a.length;u++)i=i.insert(a[u].key,r[u].version);return new Gy(e,n,r,i)}}/**
2176 * @license
2177 * Copyright 2022 Google LLC
2178 *
2179 * Licensed under the Apache License, Version 2.0 (the "License");
2180 * you may not use this file except in compliance with the License.
2181 * You may obtain a copy of the License at
2182 *
2183 *   http://www.apache.org/licenses/LICENSE-2.0
2184 *
2185 * Unless required by applicable law or agreed to in writing, software
2186 * distributed under the License is distributed on an "AS IS" BASIS,
2187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2188 * See the License for the specific language governing permissions and
2189 * limitations under the License.
2190 */class D3{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{
2191      largestBatchId: ${this.largestBatchId},
2192      mutation: ${this.mutation.toString()}
2193    }`}}/**
2194 * @license
2195 * Copyright 2017 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, softw
2203are
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 O3{constructor(e,n){this.count=e,this.unchangedNames=n}}/**
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 */var Gt,it;function V3(t){switch(t){default:return ze();case ie.CANCELLED:case ie.UNKNOWN:case ie.DEADLINE_EXCEEDED:case ie.RESOURCE_EXHAUSTED:case ie.INTERNAL:case ie.UNAVAILABLE:case ie.UNAUTHENTICATED:return!1;case ie.INVALID_ARGUMENT:case ie.NOT_FOUND:case ie.ALREADY_EXISTS:case ie.PERMISSION_DENIED:case ie.FAILED_PRECONDITION:case ie.ABORTED:case ie.OUT_OF_RANGE:case ie.UNIMPLEMENTED:case ie.DATA_LOSS:return!0}}function RT(t){if(t===void 0)return Ks("GRPC error has no .code"),ie.UNKNOWN;switch(t){case Gt.OK:return ie.OK;case Gt.CANCELLED:return ie.CANCELLED;case Gt.UNKNOWN:return ie.UNKNOWN;case Gt.DEADLINE_EXCEEDED:return ie.DEADLINE_EXCEEDED;case Gt.RESOURCE_EXHAUSTED:return ie.RESOURCE_EXHAUSTED;case Gt.INTERNAL:return ie.INTERNAL;case Gt.UNAVAILABLE:return ie.UNAVAILABLE;case Gt.UNAUTHENTICATED:return ie.UNAUTHENTICATED;
2223case Gt.INVALID_ARGUMENT:return ie.INVALID_ARGUMENT;case Gt.NOT_FOUND:return ie.NOT_FOUND;case Gt.ALREADY_EXISTS:return ie.ALREADY_EXISTS;case Gt.PERMISSION_DENIED:return ie.PERMISSION_DENIED;case Gt.FAILED_PRECONDITION:return ie.FAILED_PRECONDITION;case Gt.ABORTED:return ie.ABORTED;case Gt.OUT_OF_RANGE:return ie.OUT_OF_RANGE;case Gt.UNIMPLEMENTED:return ie.UNIMPLEMENTED;case Gt.DATA_LOSS:return ie.DATA_LOSS;default:return ze()}}(it=Gt||(Gt={}))[it.OK=0]="OK",it[it.CANCELLED=1]="CANCELLED",it[it.UNKNOWN=2]="UNKNOWN",it[it.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",it[it.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",it[it.NOT_FOUND=5]="NOT_FOUND",it[it.ALREADY_EXISTS=6]="ALREADY_EXISTS",it[it.PERMISSION_DENIED=7]="PERMISSION_DENIED",it[it.UNAUTHENTICATED=16]="UNAUTHENTICATED",it[it.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",it[it.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",it[it.ABORTED=10]="ABORTED",it[it.OUT_OF_RANGE=11]="OUT_OF_RANGE",it[it.UNIMPLEMENTED=12]="UNIMPLEMENTED",it[it.INTERNAL=13]="INTERNAL",it[it.UNAVAILABLE=14]="UNAVAILABLE",it[it.DATA_LOSS=15]="DATA_LOSS";/**
2224 * @license
2225 * Copyright 2023 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 */function M3(){return new TextEncoder}/**
2239 * @license
2240 * Copyright 2022 Google LLC
2241 *
2242 * Licensed under the Apache License, Version 2.0 (the "License");
2243 * you may not use this file except in compliance with the License.
2244 * You may obtain a copy of the License at
2245 *
2246 *   http://www.apache.org/licenses/LICENSE-2.0
2247 *
2248 * Unless required by applicable law or agreed to in writing, software
2249 * distributed under the License is distributed on an "AS IS" BASIS,
2250 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2251 * See the License for the specific language governing permissions and
2252 * limitations under the License.
2253 */const j3=new Vo([4294967295,4294967295],0);function RE(t){const e=M3().encode(t),n=new YS;return n.update(e),new Uint8Array(n.digest())}function AE(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),a=e.getUint32(12,!0);return[new Vo([n,r],0),new Vo([i,a],0)]}class Ky{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Ru(`Invalid padding: ${n}`);if(r<0)throw new Ru(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Ru(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Ru(`Invalid padding when bitmap length is 0: ${n}`);this.Te=8*e.length-n,this.Ie=Vo.fromNumber(this.Te)}Ee(e,n,r){let i=e.add(n.multiply(Vo.fromNumber(r)));return i.compare(j3)===1&&(i=new Vo([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Ie).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Te===0)return!1;const n=RE(e),[r,i]=AE(n);for(let a=0;a<this.hashCount;a++){const u=this.Ee(r,i,a);if(!this.de(u))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,a=new Uint8Array(Math.ceil(e/8)),u=new Ky(a,i,n);return r.forEach(d=>u.insert(d)),u}insert(e){if(this.Te===0)return;const n=RE(e),[r,i]=AE(n);for(let a=0;a<this.hashCount;a++){const u=this.Ee(r,i,a);this.Ae(u)}}Ae(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}class Ru extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
2254 * @license
2255 * Copyright 2017 Google LLC
2256 *
2257 * Licensed under the Apache License, Version 2.0 (the "License");
2258 * you may not use this file except in compliance with the License.
2259 * You may obtain a copy of the License at
2260 *
2261 *   http://www.apache.org/licenses/LICENSE-2.0
2262 *
2263 * Unless required by applicable law or agreed to in writing, softw
2263are
2264 * distributed under the License is distributed on an "AS IS" BASIS,
2265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2266 * See the License for the specific language governing permissions and
2267 * limitations under the License.
2268 */class $f{constructor(e,n,r,i,a){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,yc.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new $f(He.min(),i,new Lt(rt),Qs(),et())}}class yc{constructor(e,n,r,i,a){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new yc(r,n,et(),et(),et())}}/**
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 bh{constructor(e,n,r,i){this.Re=e,this.removedTargetIds=n,this.key=r,this.Ve=i}}class AT{constructor(e,n){this.targetId=e,this.me=n}}class kT{constructor(e,n,r=_n.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class kE{constructor(){this.fe=0,this.ge=xE(),this.pe=_n.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=et(),n=et(),r=et();return this.ge.forEach((i,a)=>{switch(a){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:ze()}}),new yc(this.pe,this.ye,e,n,r)}Ce(){this.we=!1,this.ge=xE()}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,ht(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class F3{constructor(e){this.Le=e,this.Be=new Map,this.ke=Qs(),this.qe=th(),this.Qe=th(),this.Ke=new Lt(rt)}$e(e){for(const n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.Ue(n,e.Ve):this.We(n,e.key,e.Ve);for(const n of e.removedTargetIds)this.We(n,e.key,e.Ve)}Ge(e){this.forEachTarget(e,n=>{const r=this.ze(n);switch(e.state){case 0:this.je(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.je(n)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.je(n)&&(this.He(n),r.De(e.resumeToken));break;default:ze()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((r,i)=>{this.je(i)&&n(i)})}Je(e){const n=e.targetId,r=e.me.count,i=this.Ye(n);if(i){const a=i.target;if(Og(a))if(r===0){const u=new Ve(a.path);this.We(n,u,Rn.newNoDocument(u,He.min()))}else ht(r===1);else{const u=this.Ze(n);if(u!==r){const d=this.Xe(e),f=d?this.et(d,e,u):1;if(f!==0){this.He(n);const p=f===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(n,p)}}}}}Xe(e){const n=e.me.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:a=0}=n;let u,d;try{u=Ki(r).toUint8Array()}catch(f){if(f instanceof iT)return tl("Decoding the base64 bloom filter in existence filter failed ("+f.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw f}try{d=new Ky(u,i,a)}catch(f){return tl(f instanceof Ru?"BloomFilter error: ":"Applying bloom filter failed: ",f),null}return d.Te===0?null:d}et(e,n,r){return n.me.count===r-this.rt(e,n.targetId)?0:2}rt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let i=0;return r.forEach(a=>{const u=this.Le.nt(),d=`projects/${u.projectId}/databases/${u.database}/documents/${a.path.canonicalString()}`;e.mightContain(d)||(this.We(n,a,null),i++)}),i}it(e){const n=new Map;this.Be.forEach((a,u)=>{const d=this.Ye(u);if(d){if(a.current&&Og(d.target)){const f=new Ve(d.target.path);this.st(f).has(u)||this.ot(u,f)||this.We(u,f,Rn.newNoDocument(f,e))}a.be&&(n.set(u,a.ve()),a.Ce())}});let r=et();this.Qe.forEach((a,u)=>{let d=!0;u.forEachWhile(f=>{const p=this.Ye(f);return!p||p.purpose==="TargetPurposeLimboResolution"||(d=!1,!1)}),d&&(r=r.add(a))}),this.ke.forEach((a,u)=>u.setReadTime(e));const i=new $f(e,n,this.Ke,this.ke,r);return this.ke=Qs(),this.qe=th(),this.Qe=th(),this.Ke=new Lt(rt),i}Ue(e,n){if(!this.je(e))return;const r=this.ot(e,n.key)?2:0;this.ze(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)),this.Qe=this.Qe.insert(n.key,this._t(n.key).add(e))}We(e,n,r){if(!this.je(e))return;const i=this.ze(e);this.ot(e,n)?i.Fe(n,1):i.Me(n),this.Qe=this.Qe.insert(n,this._t(n).delete(e)),this.Qe=this.Qe.insert(n,this._t(n).add(e)),r&&(this.ke=this.ke.insert(n,r))}removeTarget(e){this.Be.delete(e)}Ze(e){const n=this.ze(e).ve();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.ze(e).xe()}ze(e){let n=this.Be.get(e);return n||(n=new kE,this.Be.set(e,n)),n}_t(e){let n=this.Qe.get(e);return n||(n=new nn(rt),this.Qe=this.Qe.insert(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new nn(rt),this.qe=this.qe.insert(e,n)),n}je(e){const n=this.Ye(e)!==null;return n||Ce("WatchChangeAggregator","Detected inactive target",e),n}Ye(e){const n=this.Be.get(e);return n&&n.Se?null:this.Le.ut(e)}He(e){this.Be.set(e,new kE),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.We(e,n,null)})}ot(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function th(){return new Lt(Ve.comparator)}function xE(){return new Lt(Ve.comparator)}const U3={asc:"ASCENDING",desc:"DESCENDING"},$3={"<":"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"},B3={and:"AND",or:"OR"};class z3{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function jg(t,e){return t.useProto3Json||Of(e)?e:{value:e}}function Gh(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 xT(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function H3(t,e){return Gh(t,e.toTimestamp())}function ps(t){return ht(!!t),He.fromTimestamp(function(n){const r=Gi(n);return new tn(r.seconds,r.nanos)}(t))}function Qy(t,e){return Fg(t,e).canonicalString()}function Fg(t,e){const n=function(i){return new bt(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function PT(t){const e=bt.fromString(t);return ht(VT(e)),e}function Ug(t,e){return Qy(t.databaseId,e.path)}function Jm(t,e){const n=PT(e);if(n.get(1)!==t.databaseId.projectId)throw new Ae(ie.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 Ae(ie.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new Ve(LT(n))}function NT(t,e){return Qy(t.databaseId,e)}function W3(t){const e=PT(t);return e.length===4?bt.emptyPath():LT(e)}function $g(t){return new bt(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function LT(t){return ht(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function PE(t,e,n){return{name:Ug(t,e),fields:n.value.mapValue.fields}}function q3(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(p){return p==="NO_CHANGE"?0:p==="ADD"?1:p==="REMOVE"?2:p==="CURRENT"?3:p==="RESET"?4:ze()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],a=function(p,w){return p.useProto3Json?(ht(w===void 0||typeof w=="string"),_n.fromBase64String(w||"")):(ht(w===void 0||w instanceof Buffer||w instanceof Uint8Array),_n.fromUint8Array(w||new Uint8Array))}(t,e.targetChange.resumeToken),u=e.targetChange.cause,d=u&&function(p){const w=p.code===void 0?ie.UNKNOWN:RT(p.code);return new Ae(w,p.message||"")}(u);n=new kT(r,i,a,d||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=Jm(t,r.document.name),a=ps(r.document.updateTime),u=r.document.createTime?ps(r.document.createTime):He.min(),d=new Kn({mapValue:{fields:r.document.fields}}),f=Rn.newFoundDocument(i,a,u,d),p=r.targetIds||[],w=r.removedTargetIds||[];n=new bh(p,w,f.key,f)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=Jm(t,r.document),a=r.readTime?ps(r.readTime):He.min(),u=Rn.newNoDocument(i,a),d=r.removedTargetIds||[];n=new bh([],d,u.key,u)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=Jm(t,r.document),a=r.removedTargetIds||[];n=new bh([],a,i,null)}else{if(!("filter"in e))return ze();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:a}=r,u=new O3(i,a),d=r.targetId;n=new AT(d,u)}}return n}function G3(t,e){let n;if(e instanceof gc)n={update:PE(t,e.key,e.value)};else if(e instanceof CT)n={delete:Ug(t,e.key)};else if(e instanceof no)n={update:PE(t,e.key,e.data),updateMask:nj(e.fieldMask)};else{if(!(e instanceof N3))return ze();n={verify:Ug(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(a,u){const d=u.transform;
2283if(d instanceof Gu)return{fieldPath:u.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(d instanceof Ku)return{fieldPath:u.field.canonicalString(),appendMissingElements:{values:d.elements}};if(d instanceof Qu)return{fieldPath:u.field.canonicalString(),removeAllFromArray:{values:d.elements}};if(d instanceof qh)return{fieldPath:u.field.canonicalString(),increment:d.Pe};throw ze()}(0,r))),e.precondition.isNone||(n.currentDocument=function(i,a){return a.updateTime!==void 0?{updateTime:H3(i,a.updateTime)}:a.exists!==void 0?{exists:a.exists}:ze()}(t,e.precondition)),n}function K3(t,e){return t&&t.length>0?(ht(e!==void 0),t.map(n=>function(i,a){let u=i.updateTime?ps(i.updateTime):ps(a);return u.isEqual(He.min())&&(u=ps(a)),new k3(u,i.transformResults||[])}(n,e))):[]}function Q3(t,e){return{documents:[NT(t,e.path)]}}function Y3(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=NT(t,i);const a=function(p){if(p.length!==0)return OT(qr.create(p,"and"))}(e.filters);a&&(n.structuredQuery.where=a);const u=function(p){if(p.length!==0)return p.map(w=>function(T){return{field:ja(T.field),direction:Z3(T.dir)}}(w))}(e.orderBy);u&&(n.structuredQuery.orderBy=u);const d=jg(t,e.limit);return d!==null&&(n.structuredQuery.limit=d),e.startAt&&(n.structuredQuery.startAt=function(p){return{before:p.inclusive,values:p.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(p){return{before:!p.inclusive,values:p.position}}(e.endAt)),{ct:n,parent:i}}function X3(t){let e=W3(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){ht(r===1);const w=n.from[0];w.allDescendants?i=w.collectionId:e=e.child(w.collectionId)}let a=[];n.where&&(a=function(E){const T=DT(E);return T instanceof qr&&uT(T)?T.getFilters():[T]}(n.where));let u=[];n.orderBy&&(u=function(E){return E.map(T=>function(I){return new Wh(Fa(I.field),function(V){switch(V){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(I.direction))}(T))}(n.orderBy));let d=null;n.limit&&(d=function(E){let T;return T=typeof E=="object"?E.value:E,Of(T)?null:T}(n.limit));let f=null;n.startAt&&(f=function(E){const T=!!E.before,b=E.values||[];return new Hh(b,T)}(n.startAt));let p=null;return n.endAt&&(p=function(E){const T=!E.before,b=E.values||[];return new Hh(b,T)}(n.endAt)),m3(e,i,u,a,d,"F",f,p)}function J3(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 ze()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function DT(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Fa(n.unaryFilter.field);return Qt.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=Fa(n.unaryFilter.field);return Qt.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const a=Fa(n.unaryFilter.field);return Qt.create(a,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const u=Fa(n.unaryFilter.field);return Qt.create(u,"!=",{nullValue:"NULL_VALUE"});default:return ze()}}(t):t.fieldFilter!==void 0?function(n){return Qt.create(Fa(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 ze()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return qr.create(n.compositeFilter.filters.map(r=>DT(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return ze()}}(n.compositeFilter.op))}(t):ze()}function Z3(t){return U3[t]}function ej(t){return $3[t]}function tj(t){return B3[t]}function ja(t){return{fieldPath:t.canonicalString()}}function Fa(t){return wn.fromServerFormat(t.fieldPath)}function OT(t){return t instanceof Qt?function(n){if(n.op==="=="){if(vE(n.value))return{unaryFilter:{field:ja(n.field),op:"IS_NAN"}};if(yE(n.value))return{unaryFilter:{field:ja(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(vE(n.value))return{unaryFilter:{field:ja(n.field),op:"IS_NOT_NA
2283N"}};if(yE(n.value))return{unaryFilter:{field:ja(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ja(n.field),op:ej(n.op),value:n.value}}}(t):t instanceof qr?function(n){const r=n.getFilters().map(i=>OT(i));return r.length===1?r[0]:{compositeFilter:{op:tj(n.op),filters:r}}}(t):ze()}function nj(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function VT(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/**
2284 * @license
2285 * Copyright 2017 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 Oi{constructor(e,n,r,i,a=He.min(),u=He.min(),d=_n.EMPTY_BYTE_STRING,f=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=u,this.resumeToken=d,this.expectedCount=f}withSequenceNumber(e){return new Oi(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new Oi(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Oi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Oi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
2299 * @license
2300 * Copyright 2017 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 rj{constructor(e){this.ht=e}}function sj(t){const e=X3({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?Mg(e,e.limit,"L"):e}/**
2314 * @license
2315 * Copyright 2019 Google LLC
2316 *
2317 * Licensed under the Apache License, Version 2.0 (the "License");
2318 * you may not use this file except in compliance with the License.
2319 * You may obtain a copy of the License at
2320 *
2321 *   http://www.apache.org/licenses/LICENSE-2.0
2322 *
2323 * Unless required by applicable law or agreed to in writing, 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 ij{constructor(){this.ln=new oj}addToCollectionParentIndex(e,n){return this.ln.add(n),se.resolve()}getCollectionParents(e,n){return se.resolve(this.ln.getEntries(n))}addFieldIndex(e,n){return se.resolve()}deleteFieldIndex(e,n){return se.resolve()}deleteAllFieldIndexes(e){return se.resolve()}createTargetIndexes(e,n){return se.resolve()}getDocumentsMatchingTarget(e,n){return se.resolve(null)}getIndexType(e,n){return se.resolve(0)}getFieldIndexes(e,n){return se.resolve([])}getNextCollectionGroupToUpdate(e){return se.resolve(null)}getMinOffset(e,n){return se.resolve(qi.min())}getMinOffsetFromCollectionGroup(e,n){return se.resolve(qi.min())}updateCollectionGroup(e,n,r){return se.resolve()}updateIndexEntries(e,n){return se.resolve()}}class oj{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new nn(bt.comparator),a=!i.has(r);return this.index[n]=i.add(r),a}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 nn(bt.comparator)).toArray()}}/**
2329 * @license
2330 * Copyright 2018 Google LLC
2331 *
2332 * Licensed under the Apache License, Version 2.0 (the "License");
2333 * you may not use this file except in compliance with the License.
2334 * You may obtain a copy of the License at
2335 *
2336 *   http://www.apache.org/licenses/LICENSE-2.0
2337 *
2338 * Unless required by applicable law or agreed to in writing, software
2339 * distributed under the License is distributed on an "AS IS" BASIS,
2340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2341 * See the License for the specific language governing permissions and
2342 * limitations under the License.
2343 */const NE={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class qn{static withCacheSize(e){return new qn(e,qn.DEFAULT_COLLECTION_PERCENTILE,qn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,n,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}}/**
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 */qn.DEFAULT_COLLECTION_PERCENTILE=10,qn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,qn.DEFAULT=new qn(41943040,qn.DEFAULT_COLLECTION_PERCENTILE,qn.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),qn.DISABLED=new qn(-1,0,0);/**
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 il{constructor(e){this.kn=e}next(){return this.kn+=2,this.kn}static qn(){return new il(0)}static Qn(){return new il(-1)}}/**
2374 * @license
2375 * Copyright 2020 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 */function LE([t,e],[n,r]){const i=rt(t,n);return i===0?rt(e,r):i}class aj{constructor(e){this.Gn=e,this.buffer=new nn(LE),this.zn=0}jn(){return++this.zn}Hn(e){const n=[e,this.jn()];if(this.buffer.size<this.Gn)this.buffer=this.buffer.add(n);else{const r=this.buffer.last();LE(n,r)<0&&(this.buffer=this.buffer.delete(r).add(n))}}get maxValue(){return this.buffer.last()[0]}}class lj{constructor(e,n,r){this.garbageCollector=e,this.asyncQueue=n,this.localStore=r,this.Jn=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Yn(6e4)}stop(){this.Jn&&(this.Jn.cancel(),this.Jn=null)}get started(){return this.Jn!==null}Yn(e){Ce("LruGarbageCollector",`Garbage collection scheduled in ${e}ms`),this.Jn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Jn=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){El(n)?Ce("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",n):await _l(n)}await this.Yn(3e5)})}}class uj{constructor(e,n){this.Zn=e,this.params=n}calculateTargetCount(e,n){return this.Zn.Xn(e).next(r=>Math.floor(n/100*r))}nthSequenceNumber(e,n){if(n===0)return se.resolve(Df.oe);const r=new aj(n);return this.Zn.forEachTarget(e,i=>r.Hn(i.sequenceNumber)).next(()=>this.Zn.er(e,i=>r.Hn(i))).next(()=>r.maxValue)}removeTargets(e,n,r){return this.Zn.removeTargets(e,n,r)}removeOrphanedDocuments(e,n){return this.Zn.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(Ce("LruGarbageCollector","Garbage collection skipped; disabled"),se.resolve(NE)):this.getCacheSize(e).next(r=>r<this.params.cacheSizeCollectionThreshold?(Ce("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),NE):this.tr(e,n))}getCacheSize(e){return this.Zn.getCacheSize(e)}tr(e,n){let r,i,a,u,d,f,p;const w=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(E=>(E>this.params.maximumSequenceNumbersToCollect?(Ce("LruGarbageCollector",`C
2388apping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${E}`),i=this.params.maximumSequenceNumbersToCollect):i=E,u=Date.now(),this.nthSequenceNumber(e,i))).next(E=>(r=E,d=Date.now(),this.removeTargets(e,r,n))).next(E=>(a=E,f=Date.now(),this.removeOrphanedDocuments(e,r))).next(E=>(p=Date.now(),Va()<=Ze.DEBUG&&Ce("LruGarbageCollector",`LRU Garbage Collection
2389	Counted targets in ${u-w}ms
2390	Determined least recently used ${i} in `+(d-u)+`ms
2391	Removed ${a} targets in `+(f-d)+`ms
2392	Removed ${E} documents in `+(p-f)+`ms
2393Total Duration: ${p-w}ms`),se.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:a,documentsRemoved:E})))}}function cj(t,e){return new uj(t,e)}/**
2394 * @license
2395 * Copyright 2017 Google LLC
2396 *
2397 * Licensed under the Apache License, Version 2.0 (the "License");
2398 * you may not use this file except in compliance with the License.
2399 * You may obtain a copy of the License at
2400 *
2401 *   http://www.apache.org/licenses/LICENSE-2.0
2402 *
2403 * Unless required by applicable law or agreed to in writing, software
2404 * distributed under the License is distributed on an "AS IS" BASIS,
2405 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2406 * See the License for the specific language governing permissions and
2407 * limitations under the License.
2408 */class dj{constructor(){this.changes=new Go(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,Rn.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?se.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/**
2409 * @license
2410 * Copyright 2017 Google LLC
2411 *
2412 * Licensed under the Apache License, Version 2.0 (the "License");
2413 * you may not use this file except in compliance with the License.
2414 * You may obtain a copy of the License at
2415 *
2416 *   http://www.apache.org/licenses/LICENSE-2.0
2417 *
2418 * Unless required by applicable law or agreed to in writing, software
2419 * distributed under the License is distributed on an "AS IS" BASIS,
2420 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2421 * See the License for the specific language governing permissions and
2422 * limitations under the License.
2423 *//**
2424 * @license
2425 * Copyright 2022 Google LLC
2426 *
2427 * Licensed under the Apache License, Version 2.0 (the "License");
2428 * you may not use this file except in compliance with the License.
2429 * You may obtain a copy of the License at
2430 *
2431 *   http://www.apache.org/licenses/LICENSE-2.0
2432 *
2433 * Unless required by applicable law or agreed to in writing, software
2434 * distributed under the License is distributed on an "AS IS" BASIS,
2435 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2436 * See the License for the specific language governing permissions and
2437 * limitations under the License.
2438 */class hj{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/**
2439 * @license
2440 * Copyright 2017 Google LLC
2441 *
2442 * Licensed under the Apache License, Version 2.0 (the "License");
2443 * you may not use this file except in compliance with the License.
2444 * You may obtain a copy of the License at
2445 *
2446 *   http://www.apache.org/licenses/LICENSE-2.0
2447 *
2448 * Unless required by applicable law or agreed to in writing, software
2449 * distributed under the License is distributed on an "AS IS" BASIS,
2450 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2451 * See the License for the specific language governing permissions and
2452 * limitations under the License.
2453 */class fj{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&&Mu(r.mutation,i,ar.empty(),tn.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,et()).next(()=>r))}getLocalViewOfDocuments(e,n,r=et()){const i=Lo();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(a=>{let u=Cu();return a.forEach((d,f)=>{u=u.insert(d,f.overlayedDocument)}),u}))}getOverlayedDocuments(e,n){const r=Lo();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,et()))}populateOverlays(e,n,r){const i=[];return r.forEach(a=>{n.has(a)||i.push(a)}),this.documentOverlayCache.getOverlays(e,i).next(a=>{a.forEach((u,d)=>{n.set(u,d)})})}computeViews(e,n,r,i){let a=Qs();const u=Vu(),d=function(){return Vu()}();
vendor: 4,259 bytes, lines 2453-2472
2453return n.forEach((f,p)=>{const w=r.get(p.key);i.has(p.key)&&(w===void 0||w.mutation instanceof no)?a=a.insert(p.key,p):w!==void 0?(u.set(p.key,w.mutation.getFieldMask()),Mu(w.mutation,p,w.mutation.getFieldMask(),tn.now())):u.set(p.key,ar.empty())}),this.recalculateAndSaveOverlays(e,a).next(f=>(f.forEach((p,w)=>u.set(p,w)),n.forEach((p,w)=>{var E;return d.set(p,new hj(w,(E=u.get(p))!==null&&E!==void 0?E:null))}),d))}recalculateAndSaveOverlays(e,n){const r=Vu();let i=new Lt((u,d)=>u-d),a=et();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(u=>{for(const d of u)d.keys().forEach(f=>{const p=n.get(f);if(p===null)return;let w=r.get(f)||ar.empty();w=d.applyToLocalView(p,w),r.set(f,w);const E=(i.get(d.batchId)||et()).add(f);i=i.insert(d.batchId,E)})}).next(()=>{const u=[],d=i.getReverseIterator();for(;d.hasNext();){const f=d.getNext(),p=f.key,w=f.value,E=vT();w.forEach(T=>{if(!a.has(T)){const b=bT(n.get(T),r.get(T));b!==null&&E.set(T,b),a=a.add(T)}}),u.push(this.documentOverlayCache.saveOverlays(e,p,E))}return se.waitFor(u)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(u){return Ve.isDocumentKey(u.path)&&u.collectionGroup===null&&u.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):fT(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(a=>{const u=i-a.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-a.size):se.resolve(Lo());let d=-1,f=a;return u.next(p=>se.forEach(p,(w,E)=>(d<E.largestBatchId&&(d=E.largestBatchId),a.get(w)?se.resolve():this.remoteDocumentCache.getEntry(e,w).next(T=>{f=f.insert(w,T)}))).next(()=>this.populateOverlays(e,p,a)).next(()=>this.computeViews(e,f,p,et())).next(w=>({batchId:d,changes:yT(w)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new Ve(n)).next(r=>{let i=Cu();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const a=n.collectionGroup;let u=Cu();return this.indexManager.getCollectionParents(e,a).next(d=>se.forEach(d,f=>{const p=function(E,T){return new mc(T,null,E.explicitOrderBy.slice(),E.filters.slice(),E.limit,E.limitType,E.startAt,E.endAt)}(n,f.child(a));return this.getDocumentsMatchingCollectionQuery(e,p,r,i).next(w=>{w.forEach((E,T)=>{u=u.insert(E,T)})})}).next(()=>u))}getDocumentsMatchingCollectionQuery(e,n,r,i){let a;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(u=>(a=u,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,a,i))).next(u=>{a.forEach((f,p)=>{const w=p.getKey();u.get(w)===null&&(u=u.insert(w,Rn.newInvalidDocument(w)))});let d=Cu();return u.forEach((f,p)=>{const w=a.get(f);w!==void 0&&Mu(w.mutation,p,ar.empty(),tn.now()),jf(n,p)&&(d=d.insert(f,p))}),d})}}/**
2454 * @license
2455 * Copyright 2020 Google LLC
2456 *
2457 * Licensed under the Apache License, Version 2.0 (the "License");
2458 * you may not use this file except in compliance with the License.
2459 * You may obtain a copy of the License at
2460 *
2461 *   http://www.apache.org/licenses/LICENSE-2.0
2462 *
2463 * Unless required by applicable law or agreed to in writing, software
2464 * distributed under the License is distributed on an "AS IS" BASIS,
2465 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2466 * See the License for the specific language governing permissions and
2467 * limitations under the License.
2468 */class pj{constructor(e){this.serializer=e,this.Tr=new Map,this.Ir=new Map}getBundleMetadata(e,n){return se.resolve(this.Tr.get(n))}saveBundleMetadata(e,n){return this.Tr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:ps(i.createTime)}}(n)),se.resolve()}getNamedQuery(e,n){return se.resolve(this.Ir.get(n))}saveNamedQuery(e,n){return this.Ir.set(n.name,function(i){return{name:i.name,query:sj(i.bundledQuery),readTime:ps(i.readTime)}}(n)),se.resolve()}}/**
2469 * @license
2470 * Copyright 2022 Google LLC
2471 *
2472 * Licensed under the Apache License, Version 2.0 (the "License");
2473 * you may not use this file except in compliance with the License.
2474 * You may obtain a copy of the License at
2475 *
2476 *   http://www.apache.org/licenses/LICENSE-2.0
2477 *
2478 * Unless required by applicable law or agreed to in writing, software
2479 * distributed under the License is distributed on an "AS IS" BASIS,
2480 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2481 * See the License for the specific language governing permissions and
2482 * limitations under the License.
2483 */class mj{constructor(){this.overlays=new Lt(Ve.comparator),this.Er=new Map}getOverlay(e,n){return se.resolve(this.overlays.get(n))}getOverlays(e,n){const r=Lo();return se.forEach(n,i=>this.getOverlay(e,i).next(a=>{a!==null&&r.set(i,a)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,a)=>{this.Tt(e,n,a)}),se.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.Er.get(r);return i!==void 0&&(i.forEach(a=>this.overlays=this.overlays.remove(a)),this.Er.delete(r)),se.resolve()}getOverlaysForCollection(e,n,r){const i=Lo(),a=n.length+1,u=new Ve(n.child("")),d=this.overlays.getIteratorFrom(u);for(;d.hasNext();){const f=d.getNext().value,p=f.getKey();if(!n.isPrefixOf(p.path))break;p.path.length===a&&f.largestBatchId>r&&i.set(f.getKey(),f)}return se.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let a=new Lt((p,w)=>p-w);const u=this.overlays.getIterator();for(;u.hasNext();){const p=u.getNext().value;if(p.getKey().getCollectionGroup()===n&&p.largestBatchId>r){let w=a.get(p.largestBatchId);w===null&&(w=Lo(),a=a.insert(p.largestBatchId,w)),w.set(p.getKey(),p)}}const d=Lo(),f=a.getIterator();for(;f.hasNext()&&(f.getNext().value.forEach((p,w)=>d.set(p,w)),!(d.size()>=i)););return se.resolve(d)}Tt(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const u=this.Er.get(i.largestBatchId).delete(r.key);this.Er.set(i.largestBatchId,u)}this.overlays=this.overlays.insert(r.key,new D3(n,r));let a=this.Er.get(n);a===void 0&&(a=et(),this.Er.set(n,a)),this.Er.set(n,a.add(r.key))}}/**
2484 * @license
2485 * Copyright 2024 Google LLC
2486 *
2487 * Licensed under the Apache License, Version 2.0 (the "License");
2488 * you may not use this file except in compliance with the License.
2489 * You may obtain a copy of the License at
2490 *
2491 *   http://www.apache.org/licenses/LICENSE-2.0
2492 *
2493 * Unless required by applicable law or agreed to in writing, software
2494 * distributed under the License is distributed on an "AS IS" BASIS,
2495 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2496 * See the License for the specific language governing permissions and
2497 * limitations under the License.
2498 */class gj{constructor(){this.sessionToken=_n.EMPTY_BYTE_STRING}getSessionToken(e){return se.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,se.resolve()}}/**
2499 * @license
2500 * Copyright 2017 Google LLC
2501 *
2502 * Licensed under the Apache License, Version 2.0 (the "License");
2503 * you may not use this file except in compliance with the License.
2504 * You may obtain a copy of the License at
2505 *
2506 *   http://www.apache.org/licenses/LICENSE-2.0
2507 *
2508 * Unless required by applicable law or agreed to in writing, software
2509 * distributed under the License is distributed on an "AS IS" BASIS,
2510 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2511 * See the License for the specific language governing permissions and
2512 * limitations under the License.
2513 */class Yy{constructor(){this.dr=new nn(un.Ar),this.Rr=new nn(un.Vr)}isEmpty(){return this.dr.isEmpty()}addReference(e,n){const r=new un(e,n);this.dr=this.dr.add(r),this.Rr=this.Rr.add(r)}mr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.gr(new un(e,n))}pr(e,n){e.forEach(r=>this.removeReference(r,n))}yr(e){const n=new Ve(new bt([])),r=new un(n,e),i=new un(n,e+1),a=[];return this.Rr.forEachInRange([r,i],u=>{this.gr(u),a.push(u.key)}),a}wr(){this.dr.forEach(e=>this.gr(e))}gr(e){this.dr=this.dr.delete(e),this.Rr=this.Rr.delete(e)}Sr(e){const n=new Ve(new bt([])),r=new un(n,e),i=new un(n,e+1);let a=et();return this.Rr.forEachInRange([r,i],u=>{a=a.add(u.key)}),a}containsKey(e){const n=new un(e,0),r=this.dr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class un{constructor(e,n){this.key=e,this.br=n}static Ar(e,n){return Ve.comparator(e.key,n.key)||rt(e.br,n.br)}static Vr(e,n){return rt(e.br,n.br)||Ve.comparator(e.key,n.key)}}/**
2514 * @license
2515 * Copyright 2017 Google LLC
2516 *
2517 * Licensed under the Apache License, Version 2.0 (the "License");
2518 * you may not use this file except in compliance with the License.
2519 * You may obtain a copy of the License at
2520 *
2521 *   http://www.apache.org/licenses/LICENSE-2.0
2522 *
2523 * Unless required by applicable law or agreed to in writing, software
2524 * distributed under the License is distributed on an "AS IS" BASIS,
2525 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2526 * See the License for the specific language governing permissions and
2527 * limitations under the License.
2528 */class yj{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.Dr=1,this.vr=new nn(un.Ar)}checkEmpty(e){return se.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const a=this.Dr;this.Dr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const u=new L3(a,n,r,i);this.mutationQueue.push(u);for(const d of i)this.vr=this.vr.add(new un(d.key,a)),this.indexManager.addToCollectionParentIndex(e,d.key.path.popLast());return se.resolve(u)}lookupMutationBatch(e,n){return se.resolve(this.Cr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.Fr(r),a=i<0?0:i;return se.resolve(this.mutationQueue.length>a?this.mutationQueue[a]:null)}getHighestUnacknowledgedBatchId(){return se.resolve(this.mutationQueue.length===0?-1:this.Dr-1)}getAllMutationBatches(e){return se.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new un(n,0),i=new un(n,Number.POSITIVE_INFINITY),a=[];return this.vr.forEachInRange([r,i],u=>{const d=this.Cr(u.br);a.push(d)}),se.resolve(a)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new nn(rt);return n.forEach(i=>{const a=new un(i,0),u=new un(i,Number.POSITIVE_INFINITY);this.vr.forEachInRange([a,u],d=>{r=r.add(d.br)})}),se.resolve(this.Mr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let a=r;Ve.isDocumentKey(a)||(a=a.child(""));const u=new un(new Ve(a),0);let d=new nn(rt);return this.vr.forEachWhile(f=>{const p=f.key.path;return!!r.isPrefixOf(p)&&(p.length===i&&(d=d.add(f.br)),!0)},u),se.resolve(this.Mr(d))}Mr(e){const n=[];return e.forEach(r=>{const i=this.Cr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){ht(this.Or(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.vr;return se.forEach(n.mutations,i=>{const a=new un(i.key,n.batchId);return r=r.delete(a),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.vr=r})}Ln(e){}containsKey(e,n){const r=new un(n,0),i=this.vr.firstAfterOrEqual(r);return se.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,se.resolve()}Or(e,n){return this.Fr(e)}Fr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Cr(e){const n=this.Fr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/**
2529 * @license
2530 * Copyright 2017 Google LLC
2531 *
2532 * Licensed under the Apache License, Version 2.0 (the "License");
2533 * you may not use this file except in compliance with the License.
2534 * You may obtain a copy of the License at
2535 *
2536 *   http://www.apache.org/licenses/LICENSE-2.0
2537 *
2538 * Unless required by applicable law or agreed to in writing, software
2539 * distributed under the License is distributed on an "AS IS" BASIS,
2540 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2541 * See the License for the specific language governing permissions and
2542 * limitations under the License.
2543 */class vj{constructor(e){this.Nr=e,this.docs=function(){return new Lt(Ve.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),a=i?i.size:0,u=this.Nr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:u}),this.size+=u-a,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 se.resolve(r?r.document.mutableCopy():Rn.newInvalidDocument(n))}getEntries(e,n){let r=Qs();return n.forEach(i=>{const a=this.docs.get(i);r=r.insert(i,a?a.document.mutableCopy():Rn.newInvalidDocument(i))}),se.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let a=Qs();const u=n.path,d=new Ve(u.child("")),f=this.docs.getIteratorFrom(d);for(;f.hasNext();){const{key:p,value:{document:w}}=f.getNext();if(!u.isPrefixOf(p.path))break;p.path.length>u.length+1||K5(G5(w),r)<=0||(i.has(w.key)||jf(n,w))&&(a=a.insert(w.key,w.mutableCopy()))}return se.resolve(a)}getAllFromCollectionGroup(e,n,r,i){ze()}Lr(e,n){return se.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new wj(this)}getSize(e){return se.resolve(this.size)}}class wj extends dj{constructor(e){super(),this.hr=e}applyChanges(e){const n=[];
vendor: 9,088 bytes, lines 2543-2607
2543return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.hr.addEntry(e,i)):this.hr.removeEntry(r)}),se.waitFor(n)}getFromCache(e,n){return this.hr.getEntry(e,n)}getAllFromCache(e,n){return this.hr.getEntries(e,n)}}/**
2544 * @license
2545 * Copyright 2017 Google LLC
2546 *
2547 * Licensed under the Apache License, Version 2.0 (the "License");
2548 * you may not use this file except in compliance with the License.
2549 * You may obtain a copy of the License at
2550 *
2551 *   http://www.apache.org/licenses/LICENSE-2.0
2552 *
2553 * Unless required by applicable law or agreed to in writing, software
2554 * distributed under the License is distributed on an "AS IS" BASIS,
2555 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2556 * See the License for the specific language governing permissions and
2557 * limitations under the License.
2558 */class _j{constructor(e){this.persistence=e,this.Br=new Go(n=>zy(n),Hy),this.lastRemoteSnapshotVersion=He.min(),this.highestTargetId=0,this.kr=0,this.qr=new Yy,this.targetCount=0,this.Qr=il.qn()}forEachTarget(e,n){return this.Br.forEach((r,i)=>n(i)),se.resolve()}getLastRemoteSnapshotVersion(e){return se.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return se.resolve(this.kr)}allocateTargetId(e){return this.highestTargetId=this.Qr.next(),se.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.kr&&(this.kr=n),se.resolve()}Un(e){this.Br.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Qr=new il(n),this.highestTargetId=n),e.sequenceNumber>this.kr&&(this.kr=e.sequenceNumber)}addTargetData(e,n){return this.Un(n),this.targetCount+=1,se.resolve()}updateTargetData(e,n){return this.Un(n),se.resolve()}removeTargetData(e,n){return this.Br.delete(n.target),this.qr.yr(n.targetId),this.targetCount-=1,se.resolve()}removeTargets(e,n,r){let i=0;const a=[];return this.Br.forEach((u,d)=>{d.sequenceNumber<=n&&r.get(d.targetId)===null&&(this.Br.delete(u),a.push(this.removeMatchingKeysForTargetId(e,d.targetId)),i++)}),se.waitFor(a).next(()=>i)}getTargetCount(e){return se.resolve(this.targetCount)}getTargetData(e,n){const r=this.Br.get(n)||null;return se.resolve(r)}addMatchingKeys(e,n,r){return this.qr.mr(n,r),se.resolve()}removeMatchingKeys(e,n,r){this.qr.pr(n,r);const i=this.persistence.referenceDelegate,a=[];return i&&n.forEach(u=>{a.push(i.markPotentiallyOrphaned(e,u))}),se.waitFor(a)}removeMatchingKeysForTargetId(e,n){return this.qr.yr(n),se.resolve()}getMatchingKeysForTargetId(e,n){const r=this.qr.Sr(n);return se.resolve(r)}containsKey(e,n){return se.resolve(this.qr.containsKey(n))}}/**
2559 * @license
2560 * Copyright 2017 Google LLC
2561 *
2562 * Licensed under the Apache License, Version 2.0 (the "License");
2563 * you may not use this file except in compliance with the License.
2564 * You may obtain a copy of the License at
2565 *
2566 *   http://www.apache.org/licenses/LICENSE-2.0
2567 *
2568 * Unless required by applicable law or agreed to in writing, software
2569 * distributed under the License is distributed on an "AS IS" BASIS,
2570 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2571 * See the License for the specific language governing permissions and
2572 * limitations under the License.
2573 */class MT{constructor(e,n){this.Kr={},this.overlays={},this.$r=new Df(0),this.Ur=!1,this.Ur=!0,this.Wr=new gj,this.referenceDelegate=e(this),this.Gr=new _j(this),this.indexManager=new ij,this.remoteDocumentCache=function(i){return new vj(i)}(r=>this.referenceDelegate.zr(r)),this.serializer=new rj(n),this.jr=new pj(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Ur=!1,Promise.resolve()}get started(){return this.Ur}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new mj,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Kr[e.toKey()];return r||(r=new yj(n,this.referenceDelegate),this.Kr[e.toKey()]=r),r}getGlobalsCache(){return this.Wr}getTargetCache(){return this.Gr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.jr}runTransaction(e,n,r){Ce("MemoryPersistence","Starting transaction:",e);const i=new Ej(this.$r.next());return this.referenceDelegate.Hr(),r(i).next(a=>this.referenceDelegate.Jr(i).next(()=>a)).toPromise().then(a=>(i.raiseOnCommittedEvent(),a))}Yr(e,n){return se.or(Object.values(this.Kr).map(r=>()=>r.containsKey(e,n)))}}class Ej extends Y5{constructor(e){super(),this.currentSequenceNumber=e}}class Xy{constructor(e){this.persistence=e,this.Zr=new Yy,this.Xr=null}static ei(e){return new Xy(e)}get ti(){if(this.Xr)return this.Xr;throw ze()}addReference(e,n,r){return this.Zr.addReference(r,n),this.ti.delete(r.toString()),se.resolve()}removeReference(e,n,r){return this.Zr.removeReference(r,n),this.ti.add(r.toString()),se.resolve()}markPotentiallyOrphaned(e,n){return this.ti.add(n.toString()),se.resolve()}removeTarget(e,n){this.Zr.yr(n.targetId).forEach(i=>this.ti.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(a=>this.ti.add(a.toString()))}).next(()=>r.removeTargetData(e,n))}Hr(){this.Xr=new Set}Jr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return se.forEach(this.ti,r=>{const i=Ve.fromPath(r);return this.ni(e,i).next(a=>{a||n.removeEntry(i,He.min())})}).next(()=>(this.Xr=null,n.apply(e)))}updateLimboDocument(e,n){return this.ni(e,n).next(r=>{r?this.ti.delete(n.toString()):this.ti.add(n.toString())})}zr(e){return 0}ni(e,n){return se.or([()=>se.resolve(this.Zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Yr(e,n)])}}class Kh{constructor(e,n){this.persistence=e,this.ri=new Go(r=>Z5(r.path),(r,i)=>r.isEqual(i)),this.garbageCollector=cj(this,n)}static ei(e,n){return new Kh(e,n)}Hr(){}Jr(e){return se.resolve()}forEachTarget(e,n){return this.persistence.getTargetCache().forEachTarget(e,n)}Xn(e){const n=this.nr(e);return this.persistence.getTargetCache().getTargetCount(e).next(r=>n.next(i=>r+i))}nr(e){let n=0;return this.er(e,r=>{n++}).next(()=>n)}er(e,n){return se.forEach(this.ri,(r,i)=>this.ir(e,r,i).next(a=>a?se.resolve():n(i)))}removeTargets(e,n,r){return this.persistence.getTargetCache().removeTargets(e,n,r)}removeOrphanedDocuments(e,n){let r=0;const i=this.persistence.getRemoteDocumentCache(),a=i.newChangeBuffer();return i.Lr(e,u=>this.ir(e,u,n).next(d=>{d||(r++,a.removeEntry(u,He.min()))})).next(()=>a.apply(e)).next(()=>r)}markPotentiallyOrphaned(e,n){return this.ri.set(n,e.currentSequenceNumber),se.resolve()}removeTarget(e,n){const r=n.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,n,r){return this.ri.set(r,e.currentSequenceNumber),se.resolve()}removeReference(e,n,r){return this.ri.set(r,e.currentSequenceNumber),se.resolve()}updateLimboDocument(e,n){return this.ri.set(n,e.currentSequenceNumber),se.resolve()}zr(e){let n=e.key.toString().length;return e.isFoundDocument()&&(n+=Eh(e.data.value)),n}ir(e,n,r){return se.or([()=>this.persistence.Yr(e,n),()=>this.persistence.getTargetCache().containsKey(e,n),()=>{const i=this.ri.get(n);return se.resolve(i!==void 0&&i>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/**
2574 * @license
2575 * Copyright 2017 Google LLC
2576 *
2577 * Licensed under the Apache License, Version 2.0 (the "License");
2578 * you may not use this file except in compliance with the License.
2579 * You may obtain a copy of the License at
2580 *
2581 *   http://www.apache.org/licenses/LICENSE-2.0
2582 *
2583 * Unless required by applicable law or agreed to in writing, software
2584 * distributed under the License is distributed on an "AS IS" BASIS,
2585 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2586 * See the License for the specific language governing permissions and
2587 * limitations under the License.
2588 */class Jy{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.Wi=r,this.Gi=i}static zi(e,n){let r=et(),i=et();for(const a of n.docChanges)switch(a.type){case 0:r=r.add(a.doc.key);break;case 1:i=i.add(a.doc.key)}return new Jy(e,n.fromCache,r,i)}}/**
2589 * @license
2590 * Copyright 2023 Google LLC
2591 *
2592 * Licensed under the Apache License, Version 2.0 (the "License");
2593 * you may not use this file except in compliance with the License.
2594 * You may obtain a copy of the License at
2595 *
2596 *   http://www.apache.org/licenses/LICENSE-2.0
2597 *
2598 * Unless required by applicable law or agreed to in writing, software
2599 * distributed under the License is distributed on an "AS IS" BASIS,
2600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2601 * See the License for the specific language governing permissions and
2602 * limitations under the License.
2603 */class Sj{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/**
2604 * @license
2605 * Copyright 2019 Google LLC
2606 *
2607 * Licensed under the Apache License, Version 2.0 (the "License");
2608 * you may not use this file except in compliance with the License.
2609 * You may obtain a copy of the License at
2610 *
2611 *   http://www.apache.org/licenses/LICENSE-2.0
2612 *
2613 * Unless required by applicable law or agreed to in writing, software
2614 * distributed under the License is distributed on an "AS IS" BASIS,
2615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2616 * See the License for the specific language governing permissions and
2617 * limitations under the License.
2618 */class Tj{constructor(){this.ji=!1,this.Hi=!1,this.Ji=100,this.Yi=function(){return tO()?8:X5(An())>0?6:4}()}initialize(e,n){this.Zi=e,this.indexManager=n,this.ji=!0}getDocumentsMatchingQuery(e,n,r,i){const a={result:null};return this.Xi(e,n).next(u=>{a.result=u}).next(()=>{if(!a.result)return this.es(e,n,i,r).next(u=>{a.result=u})}).next(()=>{if(a.result)return;const u=new Sj;return this.ts(e,n,u).next(d=>{if(a.result=d,this.Hi)return this.ns(e,n,u,d.size)})}).next(()=>a.result)}ns(e,n,r,i){return r.documentReadCount<this.Ji?(Va()<=Ze.DEBUG&&Ce("QueryEngine","SDK will not create cache indexes for query:",Ma(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Ji,"documents"),se.resolve()):(Va()<=Ze.DEBUG&&Ce("QueryEngine","Query:",Ma(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.Yi*i?(Va()<=Ze.DEBUG&&Ce("QueryEngine","The SDK decides to create cache indexes for query:",Ma(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,hs(n))):se.resolve())}Xi(e,n){if(SE(n))return se.resolve(null);let r=hs(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=Mg(n,null,"F"),r=hs(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(a=>{const u=et(...a);return this.Zi.getDocuments(e,u).next(d=>this.indexManager.getMinOffset(e,r).next(f=>{const p=this.rs(n,d);return this.ss(n,p,u,f.readTime)?this.Xi(e,Mg(n,null,"F")):this.os(e,p,n,f)}))})))}es(e,n,r,i){return SE(n)||i.isEqual(He.min())?se.resolve(null):this.Zi.getDocuments(e,r).next(a=>{const u=this.rs(n,a);return this.ss(n,u,r,i)?se.resolve(null):(Va()<=Ze.DEBUG&&Ce("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Ma(n)),this.os(e,u,n,q5(i,-1)).next(d=>d))})}rs(e,n){let r=new nn(mT(e));return n.forEach((i,a)=>{jf(e,a)&&(r=r.add(a))}),r}ss(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const a=e.limitType==="F"?n.last():n.first();return!!a&&(a.hasPendingWrites||a.version.compareTo(i)>0)}ts(e,n,r){return Va()<=Ze.DEBUG&&Ce("QueryEngine","Using full collection scan to execute query:",Ma(n)),this.Zi.getDocumentsMatchingQuery(e,n,qi.min(),r)}os(e,n,r,i){return this.Zi.getDocumentsMatchingQuery(e,r,i).next(a=>(n.forEach(u=>{a=a.insert(u.key,u)}),a))}}/**
2619 * @license
2620 * Copyright 2020 Google LLC
2621 *
2622 * Licensed under the Apache License, Version 2.0 (the "License");
2623 * you may not use this file except in compliance with the License.
2624 * You may obtain a copy of the License at
2625 *
2626 *   http://www.apache.org/licenses/LICENSE-2.0
2627 *
2628 * Unless required by applicable law or agreed to in writing, software
2629 * distributed under the License is distributed on an "AS IS" BASIS,
2630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2631 * See the License for the specific language governing permissions and
2632 * limitations under the License.
2633 */class bj{constructor(e,n,r,i){this.persistence=e,this._s=n,this.serializer=i,this.us=new Lt(rt),this.cs=new Go(a=>zy(a),Hy),this.ls=new Map,this.hs=e.getRemoteDocumentCache(),this.Gr=e.getTargetCache(),this.jr=e.getBundleCache(),this.Ps(r)}Ps(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new fj(this.hs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.hs.setIndexManager(this.indexManager),this._s.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.us))}}function Ij(t,e,n,r){return new bj(t,e,n,r)}async function jT(t,e){const n=We(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;
2633return n.mutationQueue.getAllMutationBatches(r).next(a=>(i=a,n.Ps(e),n.mutationQueue.getAllMutationBatches(r))).next(a=>{const u=[],d=[];let f=et();for(const p of i){u.push(p.batchId);for(const w of p.mutations)f=f.add(w.key)}for(const p of a){d.push(p.batchId);for(const w of p.mutations)f=f.add(w.key)}return n.localDocuments.getDocuments(r,f).next(p=>({Ts:p,removedBatchIds:u,addedBatchIds:d}))})})}function Cj(t,e){const n=We(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),a=n.hs.newChangeBuffer({trackRemovals:!0});return function(d,f,p,w){const E=p.batch,T=E.keys();let b=se.resolve();return T.forEach(I=>{b=b.next(()=>w.getEntry(f,I)).next(L=>{const V=p.docVersions.get(I);ht(V!==null),L.version.compareTo(V)<0&&(E.applyToRemoteDocument(L,p),L.isValidDocument()&&(L.setReadTime(p.commitVersion),w.addEntry(L)))})}),b.next(()=>d.mutationQueue.removeMutationBatch(f,E))}(n,r,e,a).next(()=>a.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(d){let f=et();for(let p=0;p<d.mutationResults.length;++p)d.mutationResults[p].transformResults.length>0&&(f=f.add(d.batch.mutations[p].key));return f}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function FT(t){const e=We(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Gr.getLastRemoteSnapshotVersion(n))}function Rj(t,e){const n=We(t),r=e.snapshotVersion;let i=n.us;return n.persistence.runTransaction("Apply remote event","readwrite-primary",a=>{const u=n.hs.newChangeBuffer({trackRemovals:!0});i=n.us;const d=[];
vendor: 4,430 bytes, lines 2633-2637
2633e.targetChanges.forEach((w,E)=>{const T=i.get(E);if(!T)return;d.push(n.Gr.removeMatchingKeys(a,w.removedDocuments,E).next(()=>n.Gr.addMatchingKeys(a,w.addedDocuments,E)));let b=T.withSequenceNumber(a.currentSequenceNumber);e.targetMismatches.get(E)!==null?b=b.withResumeToken(_n.EMPTY_BYTE_STRING,He.min()).withLastLimboFreeSnapshotVersion(He.min()):w.resumeToken.approximateByteSize()>0&&(b=b.withResumeToken(w.resumeToken,r)),i=i.insert(E,b),function(L,V,U){return L.resumeToken.approximateByteSize()===0||V.snapshotVersion.toMicroseconds()-L.snapshotVersion.toMicroseconds()>=3e8?!0:U.addedDocuments.size+U.modifiedDocuments.size+U.removedDocuments.size>0}(T,b,w)&&d.push(n.Gr.updateTargetData(a,b))});let f=Qs(),p=et();if(e.documentUpdates.forEach(w=>{e.resolvedLimboDocuments.has(w)&&d.push(n.persistence.referenceDelegate.updateLimboDocument(a,w))}),d.push(Aj(a,u,e.documentUpdates).next(w=>{f=w.Is,p=w.Es})),!r.isEqual(He.min())){const w=n.Gr.getLastRemoteSnapshotVersion(a).next(E=>n.Gr.setTargetsMetadata(a,a.currentSequenceNumber,r));d.push(w)}return se.waitFor(d).next(()=>u.apply(a)).next(()=>n.localDocuments.getLocalViewOfDocuments(a,f,p)).next(()=>f)}).then(a=>(n.us=i,a))}function Aj(t,e,n){let r=et(),i=et();return n.forEach(a=>r=r.add(a)),e.getEntries(t,r).next(a=>{let u=Qs();return n.forEach((d,f)=>{const p=a.get(d);f.isFoundDocument()!==p.isFoundDocument()&&(i=i.add(d)),f.isNoDocument()&&f.version.isEqual(He.min())?(e.removeEntry(d,f.readTime),u=u.insert(d,f)):!p.isValidDocument()||f.version.compareTo(p.version)>0||f.version.compareTo(p.version)===0&&p.hasPendingWrites?(e.addEntry(f),u=u.insert(d,f)):Ce("LocalStore","Ignoring outdated watch update for ",d,". Current version:",p.version," Watch version:",f.version)}),{Is:u,Es:i}})}function kj(t,e){const n=We(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function xj(t,e){const n=We(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Gr.getTargetData(r,e).next(a=>a?(i=a,se.resolve(i)):n.Gr.allocateTargetId(r).next(u=>(i=new Oi(e,u,"TargetPurposeListen",r.currentSequenceNumber),n.Gr.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.us.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.us=n.us.insert(r.targetId,r),n.cs.set(e,r.targetId)),r})}async function Bg(t,e,n){const r=We(t),i=r.us.get(e),a=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",a,u=>r.persistence.referenceDelegate.removeTarget(u,i))}catch(u){if(!El(u))throw u;Ce("LocalStore",`Failed to update sequence numbers for target ${e}: ${u}`)}r.us=r.us.remove(e),r.cs.delete(i.target)}function DE(t,e,n){const r=We(t);let i=He.min(),a=et();return r.persistence.runTransaction("Execute query","readwrite",u=>function(f,p,w){const E=We(f),T=E.cs.get(w);return T!==void 0?se.resolve(E.us.get(T)):E.Gr.getTargetData(p,w)}(r,u,hs(e)).next(d=>{if(d)return i=d.lastLimboFreeSnapshotVersion,r.Gr.getMatchingKeysForTargetId(u,d.targetId).next(f=>{a=f})}).next(()=>r._s.getDocumentsMatchingQuery(u,e,n?i:He.min(),n?a:et())).next(d=>(Pj(r,y3(e),d),{documents:d,ds:a})))}function Pj(t,e,n){let r=t.ls.get(e)||He.min();n.forEach((i,a)=>{a.readTime.compareTo(r)>0&&(r=a.readTime)}),t.ls.set(e,r)}class OE{constructor(){this.activeTargetIds=T3()}ps(e){this.activeTargetIds=this.activeTargetIds.add(e)}ys(e){this.activeTargetIds=this.activeTargetIds.delete(e)}gs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Nj{constructor(){this._o=new OE,this.ao={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e,n=!0){return n&&this._o.ps(e),this.ao[e]||"not-current"}updateQueryState(e,n,r){this.ao[e]=n}removeLocalQueryTarget(e){this._o.ys(e)}isLocalQueryTarget(e){return this._o.activeTargetIds.has(e)}clearQueryState(e){delete this.ao[e]}getAllActiveQueryTargets(){return this._o.activeTargetIds}isActiveQueryTarget(e){return this._o.activeTargetIds.has(e)}start(){return this._o=new OE,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
2634 * @license
2635 * Copyright 2019 Google LLC
2636 *
2637 * Licensed under the Apache License, Version 2.0 (the "License");
2638 * you may not use this file except in compliance with the License.
2639 * You may obtain a copy of the License at
2640 *
2641 *   http://www.apache.org/licenses/LICENSE-2.0
2642 *
2643 * Unless required by applicable law or agreed to in writing, software
2644 * distributed under the License is distributed on an "AS IS" BASIS,
2645 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2646 * See the License for the specific language governing permissions and
2647 * limitations under the License.
2648 */class Lj{uo(e){}shutdown(){}}/**
2649 * @license
2650 * Copyright 2019 Google LLC
2651 *
2652 * Licensed under the Apache License, Version 2.0 (the "License");
2653 * you may not use this file except in compliance with the License.
2654 * You may obtain a copy of the License at
2655 *
2656 *   http://www.apache.org/licenses/LICENSE-2.0
2657 *
2658 * Unless required by applicable law or agreed to in writing, software
2659 * distributed under the License is distributed on an "AS IS" BASIS,
2660 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2661 * See the License for the specific language governing permissions and
2662 * limitations under the License.
2663 */class VE{constructor(){this.co=()=>this.lo(),this.ho=()=>this.Po(),this.To=[],this.Io()}uo(e){this.To.push(e)}shutdown(){window.removeEventListener("online",this.co),window.removeEventListener("offline",this.ho)}Io(){window.addEventListener("online",this.co),window.addEventListener("offline",this.ho)}lo(){Ce("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.To)e(0)}Po(){Ce("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.To)e(1)}static p(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
2664 * @license
2665 * Copyright 2023 Google LLC
2666 *
2667 * Licensed under the Apache License, Version 2.0 (the "License");
2668 * you may not use this file except in compliance with the License.
2669 * You may obtain a copy of the License at
2670 *
2671 *   http://www.apache.org/licenses/LICENSE-2.0
2672 *
2673 * Unless required by applicable law or agreed to in writing, software
2674 * distributed under the License is distributed on an "AS IS" BASIS,
2675 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2676 * See the License for the specific language governing permissions and
2677 * limitations under the License.
2678 */let nh=null;function Zm(){return nh===null?nh=function(){return 268435456+Math.round(2147483648*Math.random())}():nh++,"0x"+nh.toString(16)}/**
2679 * @license
2680 * Copyright 2020 Google LLC
2681 *
2682 * Licensed under the Apache License, Version 2.0 (the "License");
2683 * you may not use this file except in compliance with the License.
2684 * You may obtain a copy of the License at
2685 *
2686 *   http://www.apache.org/licenses/LICENSE-2.0
2687 *
2688 * Unless required by applicable law or agreed to in writing, software
2689 * distributed under the License is distributed on an "AS IS" BASIS,
2690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2691 * See the License for the specific language governing permissions and
2692 * limitations under the License.
2693 */const Dj={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
2694 * @license
2695 * Copyright 2017 Google LLC
2696 *
2697 * Licensed under the Apache License, Version 2.0 (the "License");
2698 * you may not use this file except in compliance with the License.
2699 * You may obtain a copy of the License at
2700 *
2701 *   http://www.apache.org/licenses/LICENSE-2.0
2702 *
2703 * Unless required by applicable law or agreed to in writing, software
2704 * distributed under the License is distributed on an "AS IS" BASIS,
2705 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2706 * See the License for the specific language governing permissions and
2707 * limitations under the License.
2708 */class Oj{constructor(e){this.Eo=e.Eo,this.Ao=e.Ao}Ro(e){this.Vo=e}mo(e){this.fo=e}po(e){this.yo=e}onMessage(e){this.wo=e}close(){this.Ao()}send(e){this.Eo(e)}So(){this.Vo()}bo(){this.fo()}Do(e){this.yo(e)}vo(e){this.wo(e)}}/**
2709 * @license
2710 * Copyright 2017 Google LLC
2711 *
2712 * Licensed under the Apache License, Version 2.0 (the "License");
2713 * you may not use this file except in compliance with the License.
2714 * You may obtain a copy of the License at
2715 *
2716 *   http://www.apache.org/licenses/LICENSE-2.0
2717 *
2718 * Unless required by applicable law or agreed to in writing, software
2719 * distributed under the License is distributed on an "AS IS" BASIS,
2720 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2721 * See the License for the specific language governing permissions and
2722 * limitations under the License.
2723 */const In="WebChannelConnection";class Vj extends class{get Co(){return!1}constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),a=encodeURIComponent(this.databaseId.database);this.Fo=r+"://"+n.host,this.Mo=`projects/${i}/databases/${a}`,this.xo=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${a}`}Oo(n,r,i,a,u){const d=Zm(),f=this.No(n,r.toUriEncodedString());Ce("RestConnection",`Sending RPC '${n}' ${d}:`,f,i);const p={"google-cloud-resource-prefix":this.Mo,"x-goog-request-params":this.xo};return this.Lo(p,a,u),this.Bo(n,f,p,i).then(w=>(Ce("RestConnection",`Received RPC '${n}' ${d}: `,w),w),w=>{throw tl("RestConnection",`RPC '${n}' ${d} failed with error: `,w,"url: ",f,"request:",i),w})}ko(n,r,i,a,u,d){return this.Oo(n,r,i,a,u)}Lo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+wl}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((a,u)=>n[u]=a),i&&i.headers.forEach((a,u)=>n[u]=a)}No(n,r){const i=Dj[n];return`${this.Fo}/v1/${r}:${i}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Bo(e,n,r,i){const a=Zm();return new Promise((u,d)=>{const f=new XS;f.setWithCredentials(!0),f.listenOnce(JS.COMPLETE,()=>{try{switch(f.getLastErrorCode()){case _h.NO_ERROR:const w=f.getResponseJson();Ce(In,`XHR for RPC '${e}' ${a} received:`,JSON.stringify(w)),u(w);break;case _h.TIMEOUT:Ce(In,`RPC '${e}' ${a} timed out`),d(new Ae(ie.DEADLINE_EXCEEDED,"Request time out"));break;case _h.HTTP_ERROR:const E=f.getStatus();if(Ce(In,`RPC '${e}' ${a} failed with status:`,E,"response text:",f.getResponseText()),E>0){let T=f.getResponseJson();Array.isArray(T)&&(T=T[0]);const b=T==null?void 0:T.error;if(b&&b.status&&b.message){const I=function(V){const U=V.toLowerCase().replace(/_/g,"-");return Object.values(ie).indexOf(U)>=0?U:ie.UNKNOWN}(b.status);d(new Ae(I,b.message))}else d(new Ae(ie.UNKNOWN,"Server responded with status "+f.getStatus()))}else d(new Ae(ie.UNAVAILABLE,"Connection failed."));break;default:ze()}}finally{Ce(In,`RPC '${e}' ${a} completed.`)}});const p=JSON.stringify(i);Ce(In,`RPC '${e}' ${a} sending request:`,i),f.send(n,"POST",p,r,15)})}qo(e,n,r){const i=Zm(),a=[this.Fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],u=tT(),d=eT(),f={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},p=this.longPollingOptions.timeoutSeconds;p!==void 0&&(f.longPollingTimeout=Math.round(1e3*p)),this.useFetchStreams&&(f.useFetchStreams=!0),this.Lo(f.initMessageHeaders,n,r),f.encodeInitMessageHeaders=!0;const w=a.join("");Ce(In,`Creating RPC '${e}' stream ${i}: ${w}`,f);const E=u.createWebChannel(w,f);let T=!1,b=!1;const I=new Oj({Eo:V=>{b?Ce(In,`Not sending because RPC '${e}' stream ${i} is closed:`,V):(T||(Ce(In,`Opening RPC '${e}' stream ${i} transport.`),E.open(),T=!0),Ce(In,`RPC '${e}' stream ${i} sending:`,V),E.send(V))},Ao:()=>E.close()}),L=(V,U,M)=>{V.listen(U,Q=>{try{M(Q)}catch(te){setTimeout(()=>{throw te},0)}})};return L(E,Iu.EventType.OPEN,()=>{b||(Ce(In,`RPC '${e}' stream ${i} transport opened.`),I.So())}),L(E,Iu.EventType.CLOSE,()=>{b||(b=!0,Ce(In,`RPC '${e}' stream ${i} transport closed`),I.Do())}
2723),L(E,Iu.EventType.ERROR,V=>{b||(b=!0,tl(In,`RPC '${e}' stream ${i} transport errored:`,V),I.Do(new Ae(ie.UNAVAILABLE,"The operation could not be completed")))}),L(E,Iu.EventType.MESSAGE,V=>{var U;if(!b){const M=V.data[0];ht(!!M);const Q=M,te=(Q==null?void 0:Q.error)||((U=Q[0])===null||U===void 0?void 0:U.error);if(te){Ce(In,`RPC '${e}' stream ${i} received error:`,te);const he=te.status;let ae=function(x){const k=Gt[x];if(k!==void 0)return RT(k)}(he),D=te.message;ae===void 0&&(ae=ie.INTERNAL,D="Unknown error status: "+he+" with message "+te.message),b=!0,I.Do(new Ae(ae,D)),E.close()}else Ce(In,`RPC '${e}' stream ${i} received:`,M),I.vo(M)}}),L(d,ZS.STAT_EVENT,V=>{V.stat===Pg.PROXY?Ce(In,`RPC '${e}' stream ${i} detected buffering proxy`):V.stat===Pg.NOPROXY&&Ce(In,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{I.bo()},0),I}}function eg(){return typeof document<"u"?document:null}/**
2724 * @license
2725 * Copyright 2020 Google LLC
2726 *
2727 * Licensed under the Apache License, Version 2.0 (the "License");
2728 * you may not use this file except in compliance with the License.
2729 * You may obtain a copy of the License at
2730 *
2731 *   http://www.apache.org/licenses/LICENSE-2.0
2732 *
2733 * Unless required by applicable law or agreed to in writing, software
2734 * distributed under the License is distributed on an "AS IS" BASIS,
2735 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2736 * See the License for the specific language governing permissions and
2737 * limitations under the License.
2738 */function Bf(t){return new z3(t,!0)}/**
2739 * @license
2740 * Copyright 2017 Google LLC
2741 *
2742 * Licensed under the Apache License, Version 2.0 (the "License");
2743 * you may not use this file except in compliance with the License.
2744 * You may obtain a copy of the License at
2745 *
2746 *   http://www.apache.org/licenses/LICENSE-2.0
2747 *
2748 * Unless required by applicable law or agreed to in writing, software
2749 * distributed under the License is distributed on an "AS IS" BASIS,
2750 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2751 * See the License for the specific language governing permissions and
2752 * limitations under the License.
2753 */class UT{constructor(e,n,r=1e3,i=1.5,a=6e4){this.li=e,this.timerId=n,this.Qo=r,this.Ko=i,this.$o=a,this.Uo=0,this.Wo=null,this.Go=Date.now(),this.reset()}reset(){this.Uo=0}zo(){this.Uo=this.$o}jo(e){this.cancel();const n=Math.floor(this.Uo+this.Ho()),r=Math.max(0,Date.now()-this.Go),i=Math.max(0,n-r);i>0&&Ce("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.Uo} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Wo=this.li.enqueueAfterDelay(this.timerId,i,()=>(this.Go=Date.now(),e())),this.Uo*=this.Ko,this.Uo<this.Qo&&(this.Uo=this.Qo),this.Uo>this.$o&&(this.Uo=this.$o)}Jo(){this.Wo!==null&&(this.Wo.skipDelay(),this.Wo=null)}cancel(){this.Wo!==null&&(this.Wo.cancel(),this.Wo=null)}Ho(){return(Math.random()-.5)*this.Uo}}/**
2754 * @license
2755 * Copyright 2017 Google LLC
2756 *
2757 * Licensed under the Apache License, Version 2.0 (the "License");
2758 * you may not use this file except in compliance with the License.
2759 * You may obtain a copy of the License at
2760 *
2761 *   http://www.apache.org/licenses/LICENSE-2.0
2762 *
2763 * Unless required by applicable law or agreed to in writing, software
2764 * distributed under the License is distributed on an "AS IS" BASIS,
2765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2766 * See the License for the specific language governing permissions and
2767 * limitations under the License.
2768 */class $T{constructor(e,n,r,i,a,u,d,f){this.li=e,this.Yo=r,this.Zo=i,this.connection=a,this.authCredentialsProvider=u,this.appCheckCredentialsProvider=d,this.listener=f,this.state=0,this.Xo=0,this.e_=null,this.t_=null,this.stream=null,this.n_=0,this.r_=new UT(e,n)}i_(){return this.state===1||this.state===5||this.s_()}s_(){return this.state===2||this.state===3}start(){this.n_=0,this.state!==4?this.auth():this.o_()}async stop(){this.i_()&&await this.close(0)}__(){this.state=0,this.r_.reset()}a_(){this.s_()&&this.e_===null&&(this.e_=this.li.enqueueAfterDelay(this.Yo,6e4,()=>this.u_()))}c_(e){this.l_(),this.stream.send(e)}async u_(){if(this.s_())return this.close(0)}l_(){this.e_&&(this.e_.cancel(),this.e_=null)}h_(){this.t_&&(this.t_.cancel(),this.t_=null)}async close(e,n){this.l_(),this.h_(),this.r_.cancel(),this.Xo++,e!==4?this.r_.reset():n&&n.code===ie.RESOURCE_EXHAUSTED?(Ks(n.toString()),Ks("Using maximum backoff delay to prevent overloading the backend."),this.r_.zo()):n&&n.code===ie.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.P_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.po(n)}P_(){}auth(){this.state=1;const e=this.T_(this.Xo),n=this.Xo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.Xo===n&&this.I_(r,i)},r=>{e(()=>{const i=new Ae(ie.UNKNOWN,"Fetching auth token failed: "+r.message);return this.E_(i)})})}I_(e,n){const r=this.T_(this.Xo);this.stream=this.d_(e,n),this.stream.Ro(()=>{r(()=>this.listener.Ro())}),this.stream.mo(()=>{r(()=>(this.state=2,this.t_=this.li.enqueueAfterDelay(this.Zo,1e4,()=>(this.s_()&&(this.state=3),Promise.resolve())),this.listener.mo()))}),this.stream.po(i=>{r(()=>this.E_(i))}),this.stream.onMessage(i=>{r(()=>++this.n_==1?this.A_(i):this.onNext(i))})}o_(){this.state=5,this.r_.jo(async()=>{this.state=0,this.start()})}E_(e){return Ce("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}T_(e){return n=>{this.li.enqueueAndForget(()=>this.Xo===e?n():(Ce("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class Mj extends $T{constructor(e,n,r,i,a,u){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,u),this.serializer
2768=a}d_(e,n){return this.connection.qo("Listen",e,n)}A_(e){return this.onNext(e)}onNext(e){this.r_.reset();const n=q3(this.serializer,e),r=function(a){if(!("targetChange"in a))return He.min();const u=a.targetChange;return u.targetIds&&u.targetIds.length?He.min():u.readTime?ps(u.readTime):He.min()}(e);return this.listener.R_(n,r)}V_(e){const n={};n.database=$g(this.serializer),n.addTarget=function(a,u){let d;const f=u.target;if(d=Og(f)?{documents:Q3(a,f)}:{query:Y3(a,f).ct},d.targetId=u.targetId,u.resumeToken.approximateByteSize()>0){d.resumeToken=xT(a,u.resumeToken);const p=jg(a,u.expectedCount);p!==null&&(d.expectedCount=p)}else if(u.snapshotVersion.compareTo(He.min())>0){d.readTime=Gh(a,u.snapshotVersion.toTimestamp());const p=jg(a,u.expectedCount);p!==null&&(d.expectedCount=p)}return d}(this.serializer,e);const r=J3(this.serializer,e);r&&(n.labels=r),this.c_(n)}m_(e){const n={};n.database=$g(this.serializer),n.removeTarget=e,this.c_(n)}}class jj extends $T{constructor(e,n,r,i,a,u){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,u),this.serializer=a}get f_(){return this.n_>0}start(){this.lastStreamToken=void 0,super.start()}P_(){this.f_&&this.g_([])}d_(e,n){return this.connection.qo("Write",e,n)}A_(e){return ht(!!e.streamToken),this.lastStreamToken=e.streamToken,ht(!e.writeResults||e.writeResults.length===0),this.listener.p_()}onNext(e){ht(!!e.streamToken),this.lastStreamToken=e.streamToken,this.r_.reset();const n=K3(e.writeResults,e.commitTime),r=ps(e.commitTime);return this.listener.y_(r,n)}w_(){const e={};e.database=$g(this.serializer),this.c_(e)}g_(e){const n={streamToken:this.lastStreamToken,writes:e.map(r=>G3(this.serializer,r))};this.c_(n)}}/**
2769 * @license
2770 * Copyright 2017 Google LLC
2771 *
2772 * Licensed under the Apache License, Version 2.0 (the "License");
2773 * you may not use this file except in compliance with the License.
2774 * You may obtain a copy of the License at
2775 *
2776 *   http://www.apache.org/licenses/LICENSE-2.0
2777 *
2778 * Unless required by applicable law or agreed to in writing, software
2779 * distributed under the License is distributed on an "AS IS" BASIS,
2780 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2781 * See the License for the specific language governing permissions and
2782 * limitations under the License.
2783 */class Fj extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.S_=!1}b_(){if(this.S_)throw new Ae(ie.FAILED_PRECONDITION,"The client has already been terminated.")}Oo(e,n,r,i){return this.b_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([a,u])=>this.connection.Oo(e,Fg(n,r),i,a,u)).catch(a=>{throw a.name==="FirebaseError"?(a.code===ie.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),a):new Ae(ie.UNKNOWN,a.toString())})}ko(e,n,r,i,a){return this.b_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([u,d])=>this.connection.ko(e,Fg(n,r),i,u,d,a)).catch(u=>{throw u.name==="FirebaseError"?(u.code===ie.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),u):new Ae(ie.UNKNOWN,u.toString())})}terminate(){this.S_=!0,this.connection.terminate()}}class Uj{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.D_=0,this.v_=null,this.C_=!0}F_(){this.D_===0&&(this.M_("Unknown"),this.v_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.v_=null,this.x_("Backend didn't respond within 10 seconds."),this.M_("Offline"),Promise.resolve())))}O_(e){this.state==="Online"?this.M_("Unknown"):(this.D_++,this.D_>=1&&(this.N_(),this.x_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.M_("Offline")))}set(e){this.N_(),this.D_=0,e==="Online"&&(this.C_=!1),this.M_(e)}M_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}x_(e){const n=`Could not reach Cloud Firestore backend. ${e}
2784This 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.C_?(Ks(n),this.C_=!1):Ce("OnlineStateTracker",n)}N_(){this.v_!==null&&(this.v_.cancel(),this.v_=null)}}/**
2785 * @license
2786 * Copyright 2017 Google LLC
2787 *
2788 * Licensed under the Apache License, Version 2.0 (the "License");
2789 * you may not use this file except in compliance with the License.
2790 * You may obtain a copy of the License at
2791 *
2792 *   http://www.apache.org/licenses/LICENSE-2.0
2793 *
2794 * Unless required by applicable law or agreed to in writing, software
2795 * distributed under the License is distributed on an "AS IS" BASIS,
2796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2797 * See the License for the specific language governing permissions and
2798 * limitations under the License.
2799 */class $j{constructor(e,n,r,i,a){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.L_=[],this.B_=new Map,this.k_=new Set,this.q_=[],this.Q_=a,this.Q_.uo(u=>{r.enqueueAndForget(async()=>{Ko(this)&&(Ce("RemoteStore","Restarting streams for network reachability change."),await async function(f){const p=We(f);p.k_.add(4),await vc(p),p.K_.set("Unknown"),p.k_.delete(4),await zf(p)}(this))})}),this.K_=new Uj(r,i)}}async function zf(t){if(Ko(t))for(const e of t.q_)await e(!0)}async function vc(t){for(const e of t.q_)await e(!1)}function BT(t,e){const n=We(t);n.B_.has(e.targetId)||(n.B_.set(e.targetId,e),nv(n)?tv(n):Sl(n).s_()&&ev(n,e))}function Zy(t,e){const n=We(t),r=Sl(n);n.B_.delete(e),r.s_()&&zT(n,e),n.B_.size===0&&(r.s_()?r.a_():Ko(n)&&n.K_.set("Unknown"))}function ev(t,e){if(t.U_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(He.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Sl(t).V_(e)}function zT(t,e){t.U_.xe(e),Sl(t).m_(e)}function tv(t){t.U_=new F3({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ut:e=>t.B_.get(e)||null,nt:()=>t.datastore.serializer.databaseId}),Sl(t).start(),t.K_.F_()}function nv(t){return Ko(t)&&!Sl(t).i_()&&t.B_.size>0}function Ko(t){return We(t).k_.size===0}function HT(t){t.U_=void 0}async function Bj(t){t.K_.set("Online")}async function zj(t){t.B_.forEach((e,n)=>{ev(t,e)})}async function Hj(t,e){HT(t),nv(t)?(t.K_.O_(e),tv(t)):t.K_.set("Unknown")}async function Wj(t,e,n){if(t.K_.set("Online"),e instanceof kT&&e.state===2&&e.cause)try{await async function(i,a){const u=a.cause;for(const d of a.targetIds)i.B_.has(d)&&(await i.remoteSyncer.rejectListen(d,u),i.B_.delete(d),i.U_.removeTarget(d))}(t,e)}catch(r){Ce("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Qh(t,r)}else if(e instanceof bh?t.U_.$e(e):e instanceof AT?t.U_.Je(e):t.U_.Ge(e),!n.isEqual(He.min()))try{const r=await FT(t.localStore);n.compareTo(r)>=0&&await function(a,u){const d=a.U_.it(u);
2799return d.targetChanges.forEach((f,p)=>{if(f.resumeToken.approximateByteSize()>0){const w=a.B_.get(p);w&&a.B_.set(p,w.withResumeToken(f.resumeToken,u))}}),d.targetMismatches.forEach((f,p)=>{const w=a.B_.get(f);if(!w)return;a.B_.set(f,w.withResumeToken(_n.EMPTY_BYTE_STRING,w.snapshotVersion)),zT(a,f);const E=new Oi(w.target,f,p,w.sequenceNumber);ev(a,E)}),a.remoteSyncer.applyRemoteEvent(d)}(t,n)}catch(r){Ce("RemoteStore","Failed to raise snapshot:",r),await Qh(t,r)}}async function Qh(t,e,n){if(!El(e))throw e;t.k_.add(1),await vc(t),t.K_.set("Offline"),n||(n=()=>FT(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{Ce("RemoteStore","Retrying IndexedDB access"),await n(),t.k_.delete(1),await zf(t)})}function WT(t,e){return e().catch(n=>Qh(t,n,e))}async function Hf(t){const e=We(t),n=Yi(e);let r=e.L_.length>0?e.L_[e.L_.length-1].batchId:-1;for(;qj(e);)try{const i=await kj(e.localStore,r);if(i===null){e.L_.length===0&&n.a_();break}r=i.batchId,Gj(e,i)}catch(i){await Qh(e,i)}qT(e)&&GT(e)}function qj(t){return Ko(t)&&t.L_.length<10}function Gj(t,e){t.L_.push(e);const n=Yi(t);n.s_()&&n.f_&&n.g_(e.mutations)}function qT(t){return Ko(t)&&!Yi(t).i_()&&t.L_.length>0}function GT(t){Yi(t).start()}async function Kj(t){Yi(t).w_()}async function Qj(t){const e=Yi(t);for(const n of t.L_)e.g_(n.mutations)}async function Yj(t,e,n){const r=t.L_.shift(),i=Gy.from(r,e,n);await WT(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await Hf(t)}async function Xj(t,e){e&&Yi(t).f_&&await async function(r,i){if(function(u){return V3(u)&&u!==ie.ABORTED}(i.code)){const a=r.L_.shift();Yi(r).__(),await WT(r,()=>r.remoteSyncer.rejectFailedWrite(a.batchId,i)),await Hf(r)}}(t,e),qT(t)&&GT(t)}async function ME(t,e){const n=We(t);n.asyncQueue.verifyOperationInProgress(),Ce("RemoteStore","RemoteStore received new credentials");const r=Ko(n);n.k_.add(3),await vc(n),r&&n.K_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.k_.delete(3),await zf(n)}async function Jj(t,e){const n=We(t);e?(n.k_.delete(2),await zf(n)):e||(n.k_.add(2),await vc(n),n.K_.set("Unknown"))}function Sl(t){return t.W_||(t.W_=function(n,r,i){const a=We(n);return a.b_(),new Mj(r,a.connection,a.authCredentials,a.appCheckCredentials,a.serializer,i)}(t.datastore,t.asyncQueue,{Ro:Bj.bind(null,t),mo:zj.bind(null,t),po:Hj.bind(null,t),R_:Wj.bind(null,t)}),t.q_.push(async e=>{e?(t.W_.__(),nv(t)?tv(t):t.K_.set("Unknown")):(await t.W_.stop(),HT(t))})),t.W_}function Yi(t){return t.G_||(t.G_=function(n,r,i){const a=We(n);return a.b_(),new jj(r,a.connection,a.authCredentials,a.appCheckCredentials,a.serializer,i)}(t.datastore,t.asyncQueue,{Ro:()=>Promise.resolve(),mo:Kj.bind(null,t),po:Xj.bind(null,t),p_:Qj.bind(null,t),y_:Yj.bind(null,t)}),t.q_.push(async e=>{e?(t.G_.__(),await Hf(t)):(await t.G_.stop(),t.L_.length>0&&(Ce("RemoteStore",`Stopping write stream with ${t.L_.length} pending writes`),t.L_=[]))})),t.G_}/**
2800 * @license
2801 * Copyright 2017 Google LLC
2802 *
2803 * Licensed under the Apache License, Version 2.0 (the "License");
2804 * you may not use this file except in compliance with the License.
2805 * You may obtain a copy of the License at
2806 *
2807 *   http://www.apache.org/licenses/LICENSE-2.0
2808 *
2809 * Unless required by applicable law or agreed to in writing, software
2810 * distributed under the License is distributed on an "AS IS" BASIS,
2811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2812 * See the License for the specific language governing permissions and
2813 * limitations under the License.
2814 */class rv{constructor(e,n,r,i,a){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new Hs,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(u=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,a){const u=Date.now()+r,d=new rv(e,n,u,i,a);return d.start(r),d}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Ae(ie.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 sv(t,e){if(Ks("AsyncQueue",`${e}: ${t}`),El(t))return new Ae(ie.UNAVAILABLE,`${e}: ${t}`);throw t}/**
2815 * @license
2816 * Copyright 2017 Google LLC
2817 *
2818 * Licensed under the Apache License, Version 2.0 (the "License");
2819 * you may not use this file except in compliance with the License.
2820 * You may obtain a copy of the License at
2821 *
2822 *   http://www.apache.org/licenses/LICENSE-2.0
2823 *
2824 * Unless required by applicable law or agreed to in writing, software
2825 * distributed under the License is distributed on an "AS IS" BASIS,
2826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2827 * See the License for the specific language governing permissions and
2828 * limitations under the License.
2829 */class Wa{static emptySet(e){return new Wa(e.comparator)}constructor(e){this.comparator=e?(n,r)=>e(n,r)||Ve.comparator(n.key,r.key):(n,r)=>Ve.comparator(n.key,r.key),this.keyedMap=Cu(),this.sortedSet=new Lt(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const 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 Wa)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet (
2830  `+e.join(`  
2831`)+`
2832)`}copy(e,n){const r=new Wa;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/**
2833 * @license
2834 * Copyright 2017 Google LLC
2835 *
2836 * Licensed under the Apache License, Version 2.0 (the "License");
2837 * you may not use this file except in compliance with the License.
2838 * You may obtain a copy of the License at
2839 *
2840 *   http://www.apache.org/licenses/LICENSE-2.0
2841 *
2842 * Unless required by applicable law or agreed to in writing, software
2843 * distributed under the License is distributed on an "AS IS" BASIS,
2844 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2845 * See the License for the specific language governing permissions and
2846 * limitations under the License.
2847 */class jE{constructor(){this.z_=new Lt(Ve.comparator)}track(e){const n=e.doc.key,r=this.z_.get(n);r?e.type!==0&&r.type===3?this.z_=this.z_.insert(n,e):e.type===3&&r.type!==1?this.z_=this.z_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.z_=this.z_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.z_=this.z_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.z_=this.z_.remove(n):e.type===1&&r.type===2?this.z_=this.z_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.z_=this.z_.insert(n,{type:2,doc:e.doc}):ze():this.z_=this.z_.insert(n,e)}j_(){const e=[];return this.z_.inorderTraversal((n,r)=>{e.push(r)}),e}}class ol{constructor(e,n,r,i,a,u,d,f,p){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=u,this.syncStateChanged=d,this.excludesMetadataChanges=f,this.hasCachedResults=p}static fromInitialDocuments(e,n,r,i,a){const u=[];return n.forEach(d=>{u.push({type:0,doc:d})}),new ol(e,n,Wa.emptySet(n),u,r,i,!0,!1,a)}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)&&Mf(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}}/**
2848 * @license
2849 * Copyright 2017 Google LLC
2850 *
2851 * Licensed under the Apache License, Version 2.0 (the "License");
2852 * you may not use this file except in compliance with the License.
2853 * You may obtain a copy of the License at
2854 *
2855 *   http://www.apache.org/licenses/LICENSE-2.0
2856 *
2857 * Unless required by applicable law or agreed to in writing, softw
2857are
2858 * distributed under the License is distributed on an "AS IS" BASIS,
2859 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2860 * See the License for the specific language governing permissions and
2861 * limitations under the License.
2862 */class Zj{constructor(){this.H_=void 0,this.J_=[]}Y_(){return this.J_.some(e=>e.Z_())}}class e6{constructor(){this.queries=FE(),this.onlineState="Unknown",this.X_=new Set}terminate(){(function(n,r){const i=We(n),a=i.queries;i.queries=FE(),a.forEach((u,d)=>{for(const f of d.J_)f.onError(r)})})(this,new Ae(ie.ABORTED,"Firestore shutting down"))}}function FE(){return new Go(t=>pT(t),Mf)}async function KT(t,e){const n=We(t);let r=3;const i=e.query;let a=n.queries.get(i);a?!a.Y_()&&e.Z_()&&(r=2):(a=new Zj,r=e.Z_()?0:1);try{switch(r){case 0:a.H_=await n.onListen(i,!0);break;case 1:a.H_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(u){const d=sv(u,`Initialization of query '${Ma(e.query)}' failed`);return void e.onError(d)}n.queries.set(i,a),a.J_.push(e),e.ea(n.onlineState),a.H_&&e.ta(a.H_)&&iv(n)}async function QT(t,e){const n=We(t),r=e.query;let i=3;const a=n.queries.get(r);if(a){const u=a.J_.indexOf(e);u>=0&&(a.J_.splice(u,1),a.J_.length===0?i=e.Z_()?0:1:!a.Y_()&&e.Z_()&&(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 t6(t,e){const n=We(t);let r=!1;for(const i of e){const a=i.query,u=n.queries.get(a);if(u){for(const d of u.J_)d.ta(i)&&(r=!0);u.H_=i}}r&&iv(n)}function n6(t,e,n){const r=We(t),i=r.queries.get(e);if(i)for(const a of i.J_)a.onError(n);r.queries.delete(e)}function iv(t){t.X_.forEach(e=>{e.next()})}var zg,UE;(UE=zg||(zg={})).na="default",UE.Cache="cache";class YT{constructor(e,n,r){this.query=e,this.ra=n,this.ia=!1,this.sa=null,this.onlineState="Unknown",this.options=r||{}}ta(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new ol(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.ia?this.oa(e)&&(this.ra.next(e),n=!0):this._a(e,this.onlineState)&&(this.aa(e),n=!0),this.sa=e,n}onError(e){this.ra.error(e)}ea(e){this.onlineState=e;let n=!1;return this.sa&&!this.ia&&this._a(this.sa,e)&&(this.aa(this.sa),n=!0),n}_a(e,n){if(!e.fromCache||!this.Z_())return!0;const r=n!=="Offline";return(!this.options.ua||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}oa(e){if(e.docChanges.length>0)return!0;const n=this.sa&&this.sa.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}aa(e){e=ol.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.ia=!0,this.ra.next(e)}Z_(){return this.options.source!==zg.Cache}}/**
2863 * @license
2864 * Copyright 2017 Google LLC
2865 *
2866 * Licensed under the Apache License, Version 2.0 (the "License");
2867 * you may not use this file except in compliance with the License.
2868 * You may obtain a copy of the License at
2869 *
2870 *   http://www.apache.org/licenses/LICENSE-2.0
2871 *
2872 * Unless required by applicable law or agreed to in writing, software
2873 * distributed under the License is distributed on an "AS IS" BASIS,
2874 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2875 * See the License for the specific language governing permissions and
2876 * limitations under the License.
2877 */class XT{constructor(e){this.key=e}}class JT{constructor(e){this.key=e}}class r6{constructor(e,n){this.query=e,this.da=n,this.Aa=null,this.hasCachedResults=!1,this.current=!1,this.Ra=et(),this.mutatedKeys=et(),this.Va=mT(e),this.ma=new Wa(this.Va)}get fa(){return this.da}ga(e,n){const r=n?n.pa:new jE,i=n?n.ma:this.ma;let a=n?n.mutatedKeys:this.mutatedKeys,u=i,d=!1;const f=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,p=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((w,E)=>{const T=i.get(w),b=jf(this.query,E)?E:null,I=!!T&&this.mutatedKeys.has(T.key),L=!!b&&(b.hasLocalMutations||this.mutatedKeys.has(b.key)&&b.hasCommittedMutations);let V=!1;T&&b?T.data.isEqual(b.data)?I!==L&&(r.track({type:3,doc:b}),V=!0):this.ya(T,b)||(r.track({type:2,doc:b}),V=!0,(f&&this.Va(b,f)>0||p&&this.Va(b,p)<0)&&(d=!0)):!T&&b?(r.track({type:0,doc:b}),V=!0):T&&!b&&(r.track({type:1,doc:T}),V=!0,(f||p)&&(d=!0)),V&&(b?(u=u.add(b),a=L?a.add(w):a.delete(w)):(u=u.delete(w),a=a.delete(w)))}),this.query.limit!==null)for(;
2877u.size>this.query.limit;){const w=this.query.limitType==="F"?u.last():u.first();u=u.delete(w.key),a=a.delete(w.key),r.track({type:1,doc:w})}return{ma:u,pa:r,ss:d,mutatedKeys:a}}ya(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r,i){const a=this.ma;this.ma=e.ma,this.mutatedKeys=e.mutatedKeys;const u=e.pa.j_();u.sort((w,E)=>function(b,I){const L=V=>{switch(V){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return ze()}};return L(b)-L(I)}(w.type,E.type)||this.Va(w.doc,E.doc)),this.wa(r),i=i!=null&&i;const d=n&&!i?this.Sa():[],f=this.Ra.size===0&&this.current&&!i?1:0,p=f!==this.Aa;return this.Aa=f,u.length!==0||p?{snapshot:new ol(this.query,e.ma,a,u,e.mutatedKeys,f===0,p,!1,!!r&&r.resumeToken.approximateByteSize()>0),ba:d}:{ba:d}}ea(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({ma:this.ma,pa:new jE,mutatedKeys:this.mutatedKeys,ss:!1},!1)):{ba:[]}}Da(e){return!this.da.has(e)&&!!this.ma.has(e)&&!this.ma.get(e).hasLocalMutations}wa(e){e&&(e.addedDocuments.forEach(n=>this.da=this.da.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.da=this.da.delete(n)),this.current=e.current)}Sa(){if(!this.current)return[];const e=this.Ra;this.Ra=et(),this.ma.forEach(r=>{this.Da(r.key)&&(this.Ra=this.Ra.add(r.key))});const n=[];return e.forEach(r=>{this.Ra.has(r)||n.push(new JT(r))}),this.Ra.forEach(r=>{e.has(r)||n.push(new XT(r))}),n}va(e){this.da=e.ds,this.Ra=et();const n=this.ga(e.documents);return this.applyChanges(n,!0)}Ca(){return ol.fromInitialDocuments(this.query,this.ma,this.mutatedKeys,this.Aa===0,this.hasCachedResults)}}class s6{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class i6{constructor(e){this.key=e,this.Fa=!1}}class o6{constructor(e,n,r,i,a,u){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=u,this.Ma={},this.xa=new Go(d=>pT(d),Mf),this.Oa=new Map,this.Na=new Set,this.La=new Lt(Ve.comparator),this.Ba=new Map,this.ka=new Yy,this.qa={},this.Qa=new Map,this.Ka=il.Qn(),this.onlineState="Unknown",this.$a=void 0}get isPrimaryClient(){return this.$a===!0}}async function a6(t,e,n=!0){const r=sb(t);let i;const a=r.xa.get(e);return a?(r.sharedClientState.addLocalQueryTarget(a.targetId),i=a.view.Ca()):i=await ZT(r,e,n,!0),i}async function l6(t,e){const n=sb(t);await ZT(n,e,!0,!1)}async function ZT(t,e,n,r){const i=await xj(t.localStore,hs(e)),a=i.targetId,u=t.sharedClientState.addLocalQueryTarget(a,n);let d;return r&&(d=await u6(t,e,a,u==="current",i.resumeToken)),t.isPrimaryClient&&n&&BT(t.remoteStore,i),d}async function u6(t,e,n,r,i){t.Ua=(E,T,b)=>async function(L,V,U,M){let Q=V.view.ga(U);Q.ss&&(Q=await DE(L.localStore,V.query,!1).then(({documents:D})=>V.view.ga(D,Q)));const te=M&&M.targetChanges.get(V.targetId),he=M&&M.targetMismatches.get(V.targetId)!=null,ae=V.view.applyChanges(Q,L.isPrimaryClient,te,he);return BE(L,V.targetId,ae.ba),ae.snapshot}(t,E,T,b);const a=await DE(t.localStore,e,!0),u=new r6(e,a.ds),d=u.ga(a.documents),f=yc.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),p=u.applyChanges(d,t.isPrimaryClient,f);BE(t,n,p.ba);const w=new s6(e,n,u);return t.xa.set(e,w),t.Oa.has(n)?t.Oa.get(n).push(e):t.Oa.set(n,[e]),p.snapshot}async function c6(t,e,n){const r=We(t),i=r.xa.get(e),a=r.Oa.get(i.targetId);if(a.length>1)return r.Oa.set(i.targetId,a.filter(u=>!Mf(u,e))),void r.xa.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2877ientState.isActiveQueryTarget(i.targetId)||await Bg(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&Zy(r.remoteStore,i.targetId),Hg(r,i.targetId)}).catch(_l)):(Hg(r,i.targetId),await Bg(r.localStore,i.targetId,!0))}async function d6(t,e){const n=We(t),r=n.xa.get(e),i=n.Oa.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),Zy(n.remoteStore,r.targetId))}async function h6(t,e,n){const r=w6(t);try{const i=await function(u,d){const f=We(u),p=tn.now(),w=d.reduce((b,I)=>b.add(I.key),et());let E,T;return f.persistence.runTransaction("Locally write mutations","readwrite",b=>{let I=Qs(),L=et();return f.hs.getEntries(b,w).next(V=>{I=V,I.forEach((U,M)=>{M.isValidDocument()||(L=L.add(U))})}).next(()=>f.localDocuments.getOverlayedDocuments(b,I)).next(V=>{E=V;const U=[];for(const M of d){const Q=P3(M,E.get(M.key).overlayedDocument);Q!=null&&U.push(new no(M.key,Q,oT(Q.value.mapValue),fs.exists(!0)))}return f.mutationQueue.addMutationBatch(b,p,U,d)}).next(V=>{T=V;const U=V.applyToLocalDocumentSet(E,L);return f.documentOverlayCache.saveOverlays(b,V.batchId,U)})}).then(()=>({batchId:T.batchId,changes:yT(E)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(u,d,f){let p=u.qa[u.currentUser.toKey()];p||(p=new Lt(rt)),p=p.insert(d,f),u.qa[u.currentUser.toKey()]=p}(r,i.batchId,n),await wc(r,i.changes),await Hf(r.remoteStore)}catch(i){const a=sv(i,"Failed to persist write");n.reject(a)}}async function eb(t,e){const n=We(t);try{const r=await Rj(n.localStore,e);
2877e.targetChanges.forEach((i,a)=>{const u=n.Ba.get(a);u&&(ht(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?u.Fa=!0:i.modifiedDocuments.size>0?ht(u.Fa):i.removedDocuments.size>0&&(ht(u.Fa),u.Fa=!1))}),await wc(n,r,e)}catch(r){await _l(r)}}function $E(t,e,n){const r=We(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.xa.forEach((a,u)=>{const d=u.view.ea(e);d.snapshot&&i.push(d.snapshot)}),function(u,d){const f=We(u);f.onlineState=d;let p=!1;f.queries.forEach((w,E)=>{for(const T of E.J_)T.ea(d)&&(p=!0)}),p&&iv(f)}(r.eventManager,e),i.length&&r.Ma.R_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function f6(t,e,n){const r=We(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Ba.get(e),a=i&&i.key;if(a){let u=new Lt(Ve.comparator);u=u.insert(a,Rn.newNoDocument(a,He.min()));const d=et().add(a),f=new $f(He.min(),new Map,new Lt(rt),u,d);await eb(r,f),r.La=r.La.remove(a),r.Ba.delete(e),ov(r)}else await Bg(r.localStore,e,!1).then(()=>Hg(r,e,n)).catch(_l)}async function p6(t,e){const n=We(t),r=e.batch.batchId;try{const i=await Cj(n.localStore,e);nb(n,r,null),tb(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await wc(n,i)}catch(i){await _l(i)}}async function m6(t,e,n){const r=We(t);try{const i=await function(u,d){const f=We(u);return f.persistence.runTransaction("Reject batch","readwrite-primary",p=>{let w;return f.mutationQueue.lookupMutationBatch(p,d).next(E=>(ht(E!==null),w=E.keys(),f.mutationQueue.removeMutationBatch(p,E))).next(()=>f.mutationQueue.performConsistencyCheck(p)).next(()=>f.documentOverlayCache.removeOverlaysForBatchId(p,w,d)).next(()=>f.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(p,w)).next(()=>f.localDocuments.getDocuments(p,w))})}(r.localStore,e);nb(r,e,n),tb(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await wc(r,i)}catch(i){await _l(i)}}function tb(t,e){(t.Qa.get(e)||[]).forEach(n=>{n.resolve()}),t.Qa.delete(e)}function nb(t,e,n){const r=We(t);let i=r.qa[r.currentUser.toKey()];if(i){const a=i.get(e);a&&(n?a.reject(n):a.resolve(),i=i.remove(e)),r.qa[r.currentUser.toKey()]=i}}
2877function Hg(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Oa.get(e))t.xa.delete(r),n&&t.Ma.Wa(r,n);t.Oa.delete(e),t.isPrimaryClient&&t.ka.yr(e).forEach(r=>{t.ka.containsKey(r)||rb(t,r)})}function rb(t,e){t.Na.delete(e.path.canonicalString());const n=t.La.get(e);n!==null&&(Zy(t.remoteStore,n),t.La=t.La.remove(e),t.Ba.delete(n),ov(t))}function BE(t,e,n){for(const r of n)r instanceof XT?(t.ka.addReference(r.key,e),g6(t,r)):r instanceof JT?(Ce("SyncEngine","Document no longer in limbo: "+r.key),t.ka.removeReference(r.key,e),t.ka.containsKey(r.key)||rb(t,r.key)):ze()}function g6(t,e){const n=e.key,r=n.path.canonicalString();t.La.get(n)||t.Na.has(r)||(Ce("SyncEngine","New document in limbo: "+n),t.Na.add(r),ov(t))}function ov(t){for(;t.Na.size>0&&t.La.size<t.maxConcurrentLimboResolutions;){const e=t.Na.values().next().value;t.Na.delete(e);const n=new Ve(bt.fromString(e)),r=t.Ka.next();t.Ba.set(r,new i6(n)),t.La=t.La.insert(n,r),BT(t.remoteStore,new Oi(hs(Wy(n.path)),r,"TargetPurposeLimboResolution",Df.oe))}}async function wc(t,e,n){const r=We(t),i=[],a=[],u=[];
2877r.xa.isEmpty()||(r.xa.forEach((d,f)=>{u.push(r.Ua(f,e,n).then(p=>{var w;if((p||n)&&r.isPrimaryClient){const E=p?!p.fromCache:(w=n==null?void 0:n.targetChanges.get(f.targetId))===null||w===void 0?void 0:w.current;r.sharedClientState.updateQueryState(f.targetId,E?"current":"not-current")}if(p){i.push(p);const E=Jy.zi(f.targetId,p);a.push(E)}}))}),await Promise.all(u),r.Ma.R_(i),await async function(f,p){const w=We(f);try{await w.persistence.runTransaction("notifyLocalViewChanges","readwrite",E=>se.forEach(p,T=>se.forEach(T.Wi,b=>w.persistence.referenceDelegate.addReference(E,T.targetId,b)).next(()=>se.forEach(T.Gi,b=>w.persistence.referenceDelegate.removeReference(E,T.targetId,b)))))}catch(E){if(!El(E))throw E;Ce("LocalStore","Failed to update sequence numbers: "+E)}for(const E of p){const T=E.targetId;if(!E.fromCache){const b=w.us.get(T),I=b.snapshotVersion,L=b.withLastLimboFreeSnapshotVersion(I);w.us=w.us.insert(T,L)}}}(r.localStore,a))}async function y6(t,e){const n=We(t);if(!n.currentUser.isEqual(e)){Ce("SyncEngine","User change. New user:",e.toKey());const r=await jT(n.localStore,e);n.currentUser=e,function(a,u){a.Qa.forEach(d=>{d.forEach(f=>{f.reject(new Ae(ie.CANCELLED,u))})}),a.Qa.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await wc(n,r.Ts)}}function v6(t,e){const n=We(t),r=n.Ba.get(e);if(r&&r.Fa)return et().add(r.key);{let i=et();const a=n.Oa.get(e);if(!a)return i;for(const u of a){const d=n.xa.get(u);i=i.unionWith(d.view.fa)}return i}}function sb(t){const e=We(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=eb.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=v6.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=f6.bind(null,e),e.Ma.R_=t6.bind(null,e.eventManager),e.Ma.Wa=n6.bind(null,e.eventManager),e}function w6(t){const e=We(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=p6.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=m6.bind(null,e),e}class Yh{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Bf(e.databaseInfo.databaseId),this.sharedClientState=this.za(e),this.persistence=this.ja(e),await this.persistence.start(),this.localStore=this.Ha(e),this.gcScheduler=this.Ja(e,this.localStore),this.indexBackfillerScheduler=this.Ya(e,this.localStore)}Ja(e,n){return null}Ya(e,n){return null}Ha(e){return Ij(this.persistence,new Tj,e.initialUser,this.serializer)}ja(e){return new MT(Xy.ei,this.serializer)}za(e){return new Nj}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()}}Yh.provider={build:()=>new Yh};class _6 extends Yh{constructor(e){super(),this.cacheSizeBytes=e}Ja(e,n){ht(this.persistence.referenceDelegate instanceof Kh);const r=this.persistence.referenceDelegate.garbageCollector;return new lj(r,e.asyncQueue,n)}ja(e){const n=this.cacheSizeBytes!==void 0?qn.withCacheSize(this.cacheSizeBytes):qn.DEFAULT;return new MT(r=>Kh.ei(r,n),this.serializer)}}class Wg{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=>$E(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=y6.bind(null,this.syncEngine),await Jj(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new e6}()}createDatastore(e){const n=Bf(e.databaseInfo.databaseId),r=function(a){return new Vj(a)}(e.databaseInfo);return function(a,u,d,f){return new Fj(a,u,d,f)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,a,u,d){return new $j(r,i,a,u,d)}(this.localStore,this.datastore,e.asyncQueue,n=>$E(this.syncEngine,n,0),function(){return VE.p()?new VE:new Lj}())}createSyncEngine(e,n){return function(i,a,u,d,f,p,w){const E=new o6(i,a,u,d,f,p);return w&&(E.$a=!0),E}(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
2877ientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e,n;await async function(i){const a=We(i);Ce("RemoteStore","RemoteStore shutting down."),a.k_.add(5),await vc(a),a.Q_.shutdown(),a.K_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}Wg.provider={build:()=>new Wg};/**
2878 * @license
2879 * Copyright 2020 Google LLC
2880 *
2881 * Licensed under the Apache License, Version 2.0 (the "License");
2882 * you may not use this file except in compliance with the License.
2883 * You may obtain a copy of the License at
2884 *
2885 *   http://www.apache.org/licenses/LICENSE-2.0
2886 *
2887 * Unless required by applicable law or agreed to in writing, software
2888 * distributed under the License is distributed on an "AS IS" BASIS,
2889 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2890 * See the License for the specific language governing permissions and
2891 * limitations under the License.
2892 *//**
2893 * @license
2894 * Copyright 2017 Google LLC
2895 *
2896 * Licensed under the Apache License, Version 2.0 (the "License");
2897 * you may not use this file except in compliance with the License.
2898 * You may obtain a copy of the License at
2899 *
2900 *   http://www.apache.org/licenses/LICENSE-2.0
2901 *
2902 * Unless required by applicable law or agreed to in writing, software
2903 * distributed under the License is distributed on an "AS IS" BASIS,
2904 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2905 * See the License for the specific language governing permissions and
2906 * limitations under the License.
2907 */class ib{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Xa(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Xa(this.observer.error,e):Ks("Uncaught Error in snapshot listener:",e.toString()))}eu(){this.muted=!0}Xa(e,n){setTimeout(()=>{this.muted||e(n)},0)}}/**
2908 * @license
2909 * Copyright 2017 Google LLC
2910 *
2911 * Licensed under the Apache License, Version 2.0 (the "License");
2912 * you may not use this file except in compliance with the License.
2913 * You may obtain a copy of the License at
2914 *
2915 *   http://www.apache.org/licenses/LICENSE-2.0
2916 *
2917 * Unless required by applicable law or agreed to in writing, software
2918 * distributed under the License is distributed on an "AS IS" BASIS,
2919 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2920 * See the License for the specific language governing permissions and
2921 * limitations under the License.
2922 */class E6{constructor(e,n,r,i,a){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Cn.UNAUTHENTICATED,this.clientId=rT.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=a,this.authCredentials.start(r,async u=>{Ce("FirestoreClient","Received user=",u.uid),await this.authCredentialListener(u),this.user=u}),this.appCheckCredentials.start(r,u=>(Ce("FirestoreClient","Received new app check token=",u),this.appCheckCredentialListener(u,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 Hs;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=sv(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function tg(t,e){t.asyncQueue.verifyOperationInProgress(),Ce("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await jT(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function zE(t,e){t.asyncQueue.verifyOperationInProgress();const n=await S6(t);Ce("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>ME(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>ME(e.remoteStore,i)),t._onlineComponents=e}async function S6(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){Ce("FirestoreClient","Using user provided OfflineComponentProvider");try{await tg(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!function(i){return i.name==="FirebaseError"?i.code===ie.FAILED_PRECONDITION||i.code===ie.UNIMPLEMENT
2922ED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(n))throw n;tl("Error using user provided cache. Falling back to memory cache: "+n),await tg(t,new Yh)}}else Ce("FirestoreClient","Using default OfflineComponentProvider"),await tg(t,new _6(void 0));return t._offlineComponents}async function ob(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(Ce("FirestoreClient","Using user provided OnlineComponentProvider"),await zE(t,t._uninitializedComponentsProvider._online)):(Ce("FirestoreClient","Using default OnlineComponentProvider"),await zE(t,new Wg))),t._onlineComponents}function T6(t){return ob(t).then(e=>e.syncEngine)}async function ab(t){const e=await ob(t),n=e.eventManager;return n.onListen=a6.bind(null,e.syncEngine),n.onUnlisten=c6.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=l6.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=d6.bind(null,e.syncEngine),n}function b6(t,e,n={}){const r=new Hs;return t.asyncQueue.enqueueAndForget(async()=>function(a,u,d,f,p){const w=new ib({next:T=>{w.eu(),u.enqueueAndForget(()=>QT(a,E));const b=T.docs.has(d);!b&&T.fromCache?p.reject(new Ae(ie.UNAVAILABLE,"Failed to get document because the client is offline.")):b&&T.fromCache&&f&&f.source==="server"?p.reject(new Ae(ie.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.)')):p.resolve(T)},error:T=>p.reject(T)}),E=new YT(Wy(d.path),w,{includeMetadataChanges:!0,ua:!0});return KT(a,E)}(await ab(t),t.asyncQueue,e,n,r)),r.promise}function I6(t,e,n={}){const r=new Hs;return t.asyncQueue.enqueueAndForget(async()=>function(a,u,d,f,p){const w=new ib({next:T=>{w.eu(),u.enqueueAndForget(()=>QT(a,E)),T.fromCache&&f.source==="server"?p.reject(new Ae(ie.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):p.resolve(T)},error:T=>p.reject(T)}),E=new YT(d,w,{includeMetadataChanges:!0,ua:!0});return KT(a,E)}(await ab(t),t.asyncQueue,e,n,r)),r.promise}/**
2923 * @license
2924 * Copyright 2023 Google LLC
2925 *
2926 * Licensed under the Apache License, Version 2.0 (the "License");
2927 * you may not use this file except in compliance with the License.
2928 * You may obtain a copy of the License at
2929 *
2930 *   http://www.apache.org/licenses/LICENSE-2.0
2931 *
2932 * Unless required by applicable law or agreed to in writing, software
2933 * distributed under the License is distributed on an "AS IS" BASIS,
2934 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2935 * See the License for the specific language governing permissions and
2936 * limitations under the License.
2937 */function lb(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/**
2938 * @license
2939 * Copyright 2020 Google LLC
2940 *
2941 * Licensed under the Apache License, Version 2.0 (the "License");
2942 * you may not use this file except in compliance with the License.
2943 * You may obtain a copy of the License at
2944 *
2945 *   http://www.apache.org/licenses/LICENSE-2.0
2946 *
2947 * Unless required by applicable law or agreed to in writing, software
2948 * distributed under the License is distributed on an "AS IS" BASIS,
2949 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2950 * See the License for the specific language governing permissions and
2951 * limitations under the License.
2952 */const HE=new Map;/**
2953 * @license
2954 * Copyright 2017 Google LLC
2955 *
2956 * Licensed under the Apache License, Version 2.0 (the "License");
2957 * you may not use this file except in compliance with the License.
2958 * You may obtain a copy of the License at
2959 *
2960 *   http://www.apache.org/licenses/LICENSE-2.0
2961 *
2962 * Unless required by applicable law or agreed to in writing, software
2963 * distributed under the License is distributed on an "AS IS" BASIS,
2964 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2965 * See the License for the specific language governing permissions and
2966 * limitations under the License.
2967 */function ub(t,e,n){if(!n)throw new Ae(ie.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function C6(t,e,n,r){if(e===!0&&r===!0)throw new Ae(ie.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function WE(t){if(!Ve.isDocumentKey(t))throw new Ae(ie.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function qE(t){if(Ve.isDocumentKey(t))throw new Ae(ie.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Wf(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":ze()}function Ys(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new Ae(ie.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Wf(t);throw new Ae(ie.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/**
2968 * @license
2969 * Copyright 2020 Google LLC
2970 *
2971 * Licensed under the Apache License, Version 2.0 (the "License");
2972 * you may not use this file except in compliance with the License.
2973 * You may obtain a copy of the License at
2974 *
2975 *   http://www.apache.org/licenses/LICENSE-2.0
2976 *
2977 * Unless required by applicable law or agreed to in writing, software
2978 * distributed under the License is distributed on an "AS IS" BASIS,
2979 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2980 * See the License for the specific language governing permissions and
2981 * limitations under the License.
2982 */class GE{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new Ae(ie.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 Ae(ie.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}C6("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=lb((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(a){if(a.timeoutSeconds!==void 0){if(isNaN(a.timeoutSeconds))throw new Ae(ie.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (must not be NaN)`);if(a.timeoutSeconds<5)throw new Ae(ie.INVALID_ARGUMENT,`invalid long polling timeout: ${a.timeoutSeconds} (minimum allowed value is 5)`);if(a.timeoutSeconds>30)throw new Ae(ie.INVALID_ARGUMENT,`invalid long polling timeout: ${a.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 qf{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 GE({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new Ae(ie.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 Ae(ie.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 GE(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new M5;switch(r.type){case"firstParty":return new $5(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new Ae(ie.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=HE.get(n);r&&(Ce("ComponentProvider","Removing Datastore"),HE.delete(n),r.terminate())}(this),Promise.resolve()}}function R6(t,e,n,r={}){var i;const a=(t=Ys(t,qf))._getSettings(),u=`${e}:${n}`;if(a.host!=="firestore.googleapis.com"&&a.host!==u&&tl("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},a),{host:u,ssl:!1})),r.mockUserToken){let d,f;if(typeof r.mockUserToken=="string")d=r.mockUserToken,f=Cn.MOCK_USER;else{d=KD(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const p=r.mockUserToken.sub||r.mockUserToken.user_id;if(!p)throw new Ae(ie.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");f=new Cn(p)}t._authCredentials=new j5(new nT(d,f))}}/**
2983 * @license
2984 * Copyright 2020 Google LLC
2985 *
2986 * Licensed under the Apache License, Version 2.0 (the "License");
2987 * you may not use this file except in compliance with the License.
2988 * You may obtain a copy of the License at
2989 *
2990 *   http://www.apache.org/licenses/LICENSE-2.0
2991 *
2992 * Unless required by applicable law or agreed to in writing, software
2993 * distributed under the License is distributed on an "AS IS" BASIS,
2994 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2995 * See the License for the specific language governing permissions and
2996 * limitations under the License.
2997 */class Tl{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new Tl(this.firestore,e,this._query)}}class Dn{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 Bi(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Dn(this.firestore,e,this._key)}}class Bi extends Tl{constructor(e,n,r){super(e,n,Wy(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 Dn(this.firestore,null,new Ve(e))}withConverter(e){return new Bi(this.firestore,e,this._path)}}function cb(t,e,...n){if(t=cn(t),ub("collection","path",e),t instanceof qf){const r=bt.fromString(e,...n);return qE(r),new Bi(t,null,r)}{if(!(t instanceof Dn||t instanceof Bi))throw new Ae(ie.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(bt.fromString(e,...n));return qE(r),new Bi(t.firestore,null,r)}}function Kr(t,e,...n){if(t=cn(t),arguments.length===1&&(e=rT.newId()),ub("doc","path",e),t instanceof qf){const r=bt.fromString(e,...n);return WE(r),new Dn(t,null,new Ve(r))}{if(!(t instanceof Dn||t instanceof Bi))throw new Ae(ie.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(bt.fromString(e,...n));return WE(r),new Dn(t.firestore,t instanceof Bi?t.converter:null,new Ve(r))}}/**
2998 * @license
2999 * Copyright 2020 Google LLC
3000 *
3001 * Licensed under the Apache License, Version 2.0 (the "License");
3002 * you may not use this file except in compliance with the License.
3003 * You may obtain a copy of the License at
3004 *
3005 *   http://www.apache.org/licenses/LICENSE-2.0
3006 *
3007 * Unless required by applicable law or agreed to in writing, software
3008 * distributed under the License is distributed on an "AS IS" BASIS,
3009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3010 * See the License for the specific language governing permissions and
3011 * limitations under the License.
3012 */class KE{constructor(e=Promise.resolve()){this.Iu=[],this.Eu=!1,this.du=[],this.Au=null,this.Ru=!1,this.Vu=!1,this.mu=[],this.r_=new UT(this,"async_queue_retry"),this.fu=()=>{const r=eg();r&&Ce("AsyncQueue","Visibility state changed to "+r.visibilityState),this.r_.Jo()},this.gu=e;const n=eg();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.fu)}get isShuttingDown(){return this.Eu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.pu(),this.yu(e)}enterRestrictedMode(e){if(!this.Eu){this.Eu=!0,this.Vu=e||!1;const n=eg();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.fu)}}enqueue(e){if(this.pu(),this.Eu)return new Promise(()=>{});const n=new Hs;return this.yu(()=>this.Eu&&this.Vu?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Iu.push(e),this.wu()))}async wu(){if(this.Iu.length!==0){try{await this.Iu[0](),this.Iu.shift(),this.r_.reset()}catch(e){if(!El(e))throw e;Ce("AsyncQueue","Operation failed with retryable error: "+e)}this.Iu.length>0&&this.r_.jo(()=>this.wu())}}yu(e){const n=this.gu.then(()=>(this.Ru=!0,e().catch(r=>{this.Au=r,this.Ru=!1;const i=function(u){let d=u.message||"";
3012return u.stack&&(d=u.stack.includes(u.message)?u.stack:u.message+`
3013`+u.stack),d}(r);throw Ks("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.Ru=!1,r))));return this.gu=n,n}enqueueAfterDelay(e,n,r){this.pu(),this.mu.indexOf(e)>-1&&(n=0);const i=rv.createAndSchedule(this,e,n,r,a=>this.Su(a));return this.du.push(i),i}pu(){this.Au&&ze()}verifyOperationInProgress(){}async bu(){let e;do e=this.gu,await e;while(e!==this.gu)}Du(e){for(const n of this.du)if(n.timerId===e)return!0;return!1}vu(e){return this.bu().then(()=>{this.du.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.du)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.bu()})}Cu(e){this.mu.push(e)}Su(e){const n=this.du.indexOf(e);this.du.splice(n,1)}}class _c extends qf{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new KE,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new KE(e),this._firestoreClient=void 0,await e}}}function A6(t,e){const n=typeof t=="object"?t:hS(),r=typeof t=="string"?t:"(default)",i=xy(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const a=qD("firestore");a&&R6(i,...a)}return i}function av(t){if(t._terminated)throw new Ae(ie.FAILED_PRECONDITION,"The client has already been terminated.");return t._firestoreClient||k6(t),t._firestoreClient}function k6(t){var e,n,r;const i=t._freezeSettings(),a=function(d,f,p,w){return new n3(d,f,p,w.host,w.ssl,w.experimentalForceLongPolling,w.experimentalAutoDetectLongPolling,lb(w.experimentalLongPollingOptions),w.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 E6(t._authCredentials,t._appCheckCredentials,t._queue,a,t._componentsProvider&&function(d){const f=d==null?void 0:d._online.build();return{_offline:d==null?void 0:d._offline.build(f),_online:f}}(t._componentsProvider))}/**
3014 * @license
3015 * Copyright 2020 Google LLC
3016 *
3017 * Licensed under the Apache License, Version 2.0 (the "License");
3018 * you may not use this file except in compliance with the License.
3019 * You may obtain a copy of the License at
3020 *
3021 *   http://www.apache.org/licenses/LICENSE-2.0
3022 *
3023 * Unless required by applicable law or agreed to in writing, software
3024 * distributed under the License is distributed on an "AS IS" BASIS,
3025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3026 * See the License for the specific language governing permissions and
3027 * limitations under the License.
3028 */class al{constructor(e){this._byteString=e}static fromBase64String(e){try{return new al(_n.fromBase64String(e))}catch(n){throw new Ae(ie.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new al(_n.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)}}/**
3029 * @license
3030 * Copyright 2020 Google LLC
3031 *
3032 * Licensed under the Apache License, Version 2.0 (the "License");
3033 * you may not use this file except in compliance with the License.
3034 * You may obtain a copy of the License at
3035 *
3036 *   http://www.apache.org/licenses/LICENSE-2.0
3037 *
3038 * Unless required by applicable law or agreed to in writing, software
3039 * distributed under the License is distributed on an "AS IS" BASIS,
3040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3041 * See the License for the specific language governing permissions and
3042 * limitations under the License.
3043 */class Gf{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new Ae(ie.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new wn(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/**
3044 * @license
3045 * Copyright 2020 Google LLC
3046 *
3047 * Licensed under the Apache License, Version 2.0 (the "License");
3048 * you may not use this file except in compliance with the License.
3049 * You may obtain a copy of the License at
3050 *
3051 *   http://www.apache.org/licenses/LICENSE-2.0
3052 *
3053 * Unless required by applicable law or agreed to in writing, software
3054 * distributed under the License is distributed on an "AS IS" BASIS,
3055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3056 * See the License for the specific language governing permissions and
3057 * limitations under the License.
3058 */class Kf{constructor(e){this._methodName=e}}/**
3059 * @license
3060 * Copyright 2017 Google LLC
3061 *
3062 * Licensed under the Apache License, Version 2.0 (the "License");
3063 * you may not use this file except in compliance with the License.
3064 * You may obtain a copy of the License at
3065 *
3066 *   http://www.apache.org/licenses/LICENSE-2.0
3067 *
3068 * Unless required by applicable law or agreed to in writing, software
3069 * distributed under the License is distributed on an "AS IS" BASIS,
3070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3071 * See the License for the specific language governing permissions and
3072 * limitations under the License.
3073 */class lv{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new Ae(ie.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new Ae(ie.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 rt(this._lat,e._lat)||rt(this._long,e._long)}}/**
3074 * @license
3075 * Copyright 2024 Google LLC
3076 *
3077 * Licensed under the Apache License, Version 2.0 (the "License");
3078 * you may not use this file except in compliance with the License.
3079 * You may obtain a copy of the License at
3080 *
3081 *   http://www.apache.org/licenses/LICENSE-2.0
3082 *
3083 * Unless required by applicable law or agreed to in writing, software
3084 * distributed under the License is distributed on an "AS IS" BASIS,
3085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3086 * See the License for the specific language governing permissions and
3087 * limitations under the License.
3088 */class uv{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 a=0;a<r.length;++a)if(r[a]!==i[a])return!1;return!0}(this._values,e._values)}}/**
3089 * @license
3090 * Copyright 2017 Google LLC
3091 *
3092 * Licensed under the Apache License, Version 2.0 (the "License");
3093 * you may not use this file except in compliance with the License.
3094 * You may obtain a copy of the License at
3095 *
3096 *   http://www.apache.org/licenses/LICENSE-2.0
3097 *
3098 * Unless required by applicable law or agreed to in writing, software
3099 * distributed under the License is distributed on an "AS IS" BASIS,
3100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3101 * See the License for the specific language governing permissions and
3102 * limitations under the License.
3103 */const x6=/^__.*__$/;class P6{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new no(e,this.data,this.fieldMask,n,this.fieldTransforms):new gc(e,this.data,n,this.fieldTransforms)}}class db{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new no(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function hb(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw ze()}}class cv{constructor(e,n,r,i,a,u){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,a===void 0&&this.Fu(),this.fieldTransforms=a||[],this.fieldMask=u||[]}get path(){return this.settings.path}get Mu(){return this.settings.Mu}xu(e){return new cv(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ou(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.xu({path:r,Nu:!1});return i.Lu(e),i}Bu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.xu({path:r,Nu:!1});return i.Fu(),i}ku(e){return this.xu({path:void 0,Nu:!0})}qu(e){return Xh(e,this.settings.methodName,this.settings.Qu||!1,this.path,this.settings.Ku)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}Fu(){if(this.path)for(let e=0;e<this.path.length;e++)this.Lu(this.path.get(e))}Lu(e){if(e.length===0)throw this.qu("Document fields must not be empty");if(hb(this.Mu)&&x6.test(e))throw this.qu('Document fields cannot begin and end with "__"')}}class N6{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer
3103=r||Bf(e)}$u(e,n,r,i=!1){return new cv({Mu:e,methodName:n,Ku:r,path:wn.emptyPath(),Nu:!1,Qu:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function dv(t){const e=t._freezeSettings(),n=Bf(t._databaseId);return new N6(t._databaseId,!!e.ignoreUndefinedProperties,n)}function L6(t,e,n,r,i,a={}){const u=t.$u(a.merge||a.mergeFields?2:0,e,n,i);fv("Data must be an object, but it was:",u,r);const d=fb(r,u);let f,p;if(a.merge)f=new ar(u.fieldMask),p=u.fieldTransforms;else if(a.mergeFields){const w=[];for(const E of a.mergeFields){const T=qg(e,E,n);if(!u.contains(T))throw new Ae(ie.INVALID_ARGUMENT,`Field '${T}' is specified in your field mask but missing from your input data.`);mb(w,T)||w.push(T)}f=new ar(w),p=u.fieldTransforms.filter(E=>f.covers(E.field))}else f=null,p=u.fieldTransforms;return new P6(new Kn(d),f,p)}class Qf extends Kf{_toFieldTransform(e){if(e.Mu!==2)throw e.Mu===1?e.qu(`${this._methodName}() can only appear at the top level of your update data`):e.qu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Qf}}class hv extends Kf{_toFieldTransform(e){return new R3(e.path,new Gu)}isEqual(e){return e instanceof hv}}function D6(t,e,n,r){const i=t.$u(1,e,n);fv("Data must be an object, but it was:",i,r);const a=[],u=Kn.empty();to(r,(f,p)=>{const w=pv(e,f,n);p=cn(p);const E=i.Bu(w);if(p instanceof Qf)a.push(w);else{const T=Ec(p,E);T!=null&&(a.push(w),u.set(w,T))}});const d=new ar(a);return new db(u,d,i.fieldTransforms)}function O6(t,e,n,r,i,a){const u=t.$u(1,e,n),d=[qg(e,r,n)],f=[i];if(a.length%2!=0)throw new Ae(ie.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let T=0;T<a.length;T+=2)d.push(qg(e,a[T])),f.push(a[T+1]);const p=[],w=Kn.empty();for(let T=d.length-1;T>=0;--T)if(!mb(p,d[T])){const b=d[T];let I=f[T];I=cn(I);const L=u.Bu(b);if(I instanceof Qf)p.push(b);else{const V=Ec(I,L);V!=null&&(p.push(b),w.set(b,V))}}const E=new ar(p);return new db(w,E,u.fieldTransforms)}function V6(t,e,n,r=!1){return Ec(n,t.$u(r?4:3,e))}function Ec(t,e){if(pb(t=cn(t)))return fv("Unsupported field value:",e,t),fb(t,e);if(t instanceof Kf)return function(r,i){if(!hb(i.Mu))throw i.qu(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.qu(`${r._methodName}() is not currently supported inside arrays`);const a=r._toFieldTransform(i);a&&i.fieldTransforms.push(a)}(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.Nu&&e.Mu!==4)throw e.qu("Nested arrays are not supported");return function(r,i){const a=[];let u=0;for(const d of r){let f=Ec(d,i.ku(u));f==null&&(f={nullValue:"NULL_VALUE"}),a.push(f),u++}return{arrayValue:{values:a}}}(t,e)}return function(r,i){if((r=cn(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return b3(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const a=tn.fromDate(r);return{timestampValue:Gh(i.serializer,a)}}if(r instanceof tn){const a=new tn(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:Gh(i.serializer,a)}}if(r instanceof lv)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof al)return{bytesValue:xT(i.serializer,r._byteString)};if(r instanceof Dn){const a=i.databaseId,u=r.firestore._databaseId;if(!u.isEqual(a))throw i.qu(`Document reference is for database ${u.projectId}/${u.database} but should be for database ${a.projectId}/${a.database}`);return{referenceValue:Qy(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof uv)return function(u,d){return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:u.toArray().map(f=>{if(typeof f!="number")throw d.qu("VectorValues must only contain numeric values.");return qy(d.serializer,f)})}}}}}}(r,i);
3103throw i.qu(`Unsupported field value: ${Wf(r)}`)}(t,e)}function fb(t,e){const n={};return sT(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):to(t,(r,i)=>{const a=Ec(i,e.Ou(r));a!=null&&(n[r]=a)}),{mapValue:{fields:n}}}function pb(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof tn||t instanceof lv||t instanceof al||t instanceof Dn||t instanceof Kf||t instanceof uv)}function fv(t,e,n){if(!pb(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=Wf(n);throw r==="an object"?e.qu(t+" a custom object"):e.qu(t+" "+r)}}function qg(t,e,n){if((e=cn(e))instanceof Gf)return e._internalPath;if(typeof e=="string")return pv(t,e);throw Xh("Field path arguments must be of type string or ",t,!1,void 0,n)}const M6=new RegExp("[~\\*/\\[\\]]");function pv(t,e,n){if(e.search(M6)>=0)throw Xh(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Gf(...e.split("."))._internalPath}catch{throw Xh(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function Xh(t,e,n,r,i){const a=r&&!r.isEmpty(),u=i!==void 0;let d=`Function ${e}() called with invalid data`;n&&(d+=" (via `toFirestore()`)"),d+=". ";let f="";return(a||u)&&(f+=" (found",a&&(f+=` in field ${r}`),u&&(f+=` in document ${i}`),f+=")"),new Ae(ie.INVALID_ARGUMENT,d+t+f)}function mb(t,e){return t.some(n=>n.isEqual(e))}/**
3104 * @license
3105 * Copyright 2020 Google LLC
3106 *
3107 * Licensed under the Apache License, Version 2.0 (the "License");
3108 * you may not use this file except in compliance with the License.
3109 * You may obtain a copy of the License at
3110 *
3111 *   http://www.apache.org/licenses/LICENSE-2.0
3112 *
3113 * Unless required by applicable law or agreed to in writing, software
3114 * distributed under the License is distributed on an "AS IS" BASIS,
3115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3116 * See the License for the specific language governing permissions and
3117 * limitations under the License.
3118 */class gb{constructor(e,n,r,i,a){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}get id(){return this._key.path.lastSegment()}get ref(){return new Dn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new j6(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(mv("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class j6 extends gb{data(){return super.data()}}function mv(t,e){return typeof e=="string"?pv(t,e):e instanceof Gf?e._internalPath:e._delegate._internalPath}/**
3119 * @license
3120 * Copyright 2020 Google LLC
3121 *
3122 * Licensed under the Apache License, Version 2.0 (the "License");
3123 * you may not use this file except in compliance with the License.
3124 * You may obtain a copy of the License at
3125 *
3126 *   http://www.apache.org/licenses/LICENSE-2.0
3127 *
3128 * Unless required by applicable law or agreed to in writing, software
3129 * distributed under the License is distributed on an "AS IS" BASIS,
3130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3131 * See the License for the specific language governing permissions and
3132 * limitations under the License.
3133 */function F6(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new Ae(ie.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class gv{}class U6 extends gv{}function $6(t,e,...n){let r=[];e instanceof gv&&r.push(e),r=r.concat(n),function(a){const u=a.filter(f=>f instanceof yv).length,d=a.filter(f=>f instanceof Yf).length;if(u>1||u>0&&d>0)throw new Ae(ie.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 Yf extends U6{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new Yf(e,n,r)}_apply(e){const n=this._parse(e);
3133return yb(e._query,n),new Tl(e.firestore,e.converter,Vg(e._query,n))}_parse(e){const n=dv(e.firestore);return function(a,u,d,f,p,w,E){let T;if(p.isKeyField()){if(w==="array-contains"||w==="array-contains-any")throw new Ae(ie.INVALID_ARGUMENT,`Invalid Query. You can't perform '${w}' queries on documentId().`);if(w==="in"||w==="not-in"){YE(E,w);const b=[];for(const I of E)b.push(QE(f,a,I));T={arrayValue:{values:b}}}else T=QE(f,a,E)}else w!=="in"&&w!=="not-in"&&w!=="array-contains-any"||YE(E,w),T=V6(d,u,E,w==="in"||w==="not-in");return Qt.create(p,w,T)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}function B6(t,e,n){const r=e,i=mv("where",t);return Yf._create(i,r,n)}class yv extends gv{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new yv(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]:qr.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,a){let u=i;const d=a.getFlattenedFilters();for(const f of d)yb(u,f),u=Vg(u,f)}(e._query,n),new Tl(e.firestore,e.converter,Vg(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}function QE(t,e,n){if(typeof(n=cn(n))=="string"){if(n==="")throw new Ae(ie.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!fT(e)&&n.indexOf("/")!==-1)throw new Ae(ie.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(bt.fromString(n));if(!Ve.isDocumentKey(r))throw new Ae(ie.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 gE(t,new Ve(r))}if(n instanceof Dn)return gE(t,n._key);throw new Ae(ie.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Wf(n)}.`)}function YE(t,e){if(!Array.isArray(t)||t.length===0)throw new Ae(ie.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function yb(t,e){const n=function(i,a){for(const u of i)for(const d of u.getFlattenedFilters())if(a.indexOf(d.op)>=0)return d.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 Ae(ie.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new Ae(ie.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class z6{convertValue(e,n="none"){switch(Qi(e)){case 0:return null;case 1:return e.booleanValue;case 2:return $t(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Ki(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 ze()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return to(e,(i,a)=>{r[i]=this.convertValue(a,n)}),r}convertVectorValue(e){var n,r,i;const a=(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(u=>$t(u.doubleValue));return new uv(a)}convertGeoPoint(e){return new lv($t(e.latitude),$t(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Vf(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Hu(e));default:return null}}convertTimestamp(e){const n=Gi(e);return new tn(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=bt.fromString(e);ht(VT(r));const i=new Wu(r.get(1),r.get(3)),a=new Ve(r.popFirst(5));return i.isEqual(n)||Ks(`Document ${a} 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.`),a}}/**
3134 * @license
3135 * Copyright 2020 Google LLC
3136 *
3137 * Licensed under the Apache License, Version 2.0 (the "License");
3138 * you may not use this file except in compliance with the License.
3139 * You may obtain a copy of the License at
3140 *
3141 *   http://www.apache.org/licenses/LICENSE-2.0
3142 *
3143 * Unless required by applicable law or agreed to in writing, software
3144 * distributed under the License is distributed on an "AS IS" BASIS,
3145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3146 * See the License for the specific language governing permissions and
3147 * limitations under the License.
3148 */function H6(t,e,n){let r;return r=t?t.toFirestore(e):e,r}/**
3149 * @license
3150 * Copyright 2020 Google LLC
3151 *
3152 * Licensed under the Apache License, Version 2.0 (the "License");
3153 * you may not use this file except in compliance with the License.
3154 * You may obtain a copy of the License at
3155 *
3156 *   http://www.apache.org/licenses/LICENSE-2.0
3157 *
3158 * Unless required by applicable law or agreed to in writing, software
3159 * distributed under the License is distributed on an "AS IS" BASIS,
3160 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3161 * See the License for the specific language governing permissions and
3162 * limitations under the License.
3163 */class Au{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class vb extends gb{constructor(e,n,r,i,a,u){super(e,n,r,i,u),this._firestore=e,this._firestoreImpl=e,this.metadata=a}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new Ih(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(mv("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class Ih extends vb{data(e={}){return super.data(e)}}class W6{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Au(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 Ih(this._firestore,this._userDataWriter,r.key,r,new Au(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 Ae(ie.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,a){if(i._snapshot.oldDocs.isEmpty()){let u=0;return i._snapshot.docChanges.map(d=>{const f=new Ih(i._firestore,i._userDataWriter,d.doc.key,d.doc,new Au(i._snapshot.mutatedKeys.has(d.doc.key),i._snapshot.fromCache),i.query.converter);return d.doc,{type:"added",doc:f,oldIndex:-1,newIndex:u++}})}{let u=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(d=>a||d.type!==3).map(d=>{const f=new Ih(i._firestore,i._userDataWriter,d.doc.key,d.doc,new Au(i._snapshot.mutatedKeys.has(d.doc.key),i._snapshot.fromCache),i.query.converter);let p=-1,w=-1;return d.type!==0&&(p=u.indexOf(d.doc.key),u=u.delete(d.doc.key)),d.type!==1&&(u=u.add(d.doc),w=u.indexOf(d.doc.key)),{type:q6(d.type),doc:f,oldIndex:p,newIndex:w}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function q6(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return ze()}}/**
3164 * @license
3165 * Copyright 2020 Google LLC
3166 *
3167 * Licensed under the Apache License, Version 2.0 (the "License");
3168 * you may not use this file except in compliance with the License.
3169 * You may obtain a copy of the License at
3170 *
3171 *   http://www.apache.org/licenses/LICENSE-2.0
3172 *
3173 * Unless required by applicable law or agreed to in writing, software
3174 * distributed under the License is distributed on an "AS IS" BASIS,
3175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3176 * See the License for the specific language governing permissions and
3177 * limitations under the License.
3178 */function Sc(t){t=Ys(t,Dn);const e=Ys(t.firestore,_c);return b6(av(e),t._key).then(n=>G6(e,t,n))}class wb extends z6{constructor(e){super(),this.firestore=e}convertBytes(e){return new al(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);
3178return new Dn(this.firestore,null,n)}}function _b(t){t=Ys(t,Tl);const e=Ys(t.firestore,_c),n=av(e),r=new wb(e);return F6(t._query),I6(n,t._query).then(i=>new W6(e,r,t,i))}function Xf(t,e,n){t=Ys(t,Dn);const r=Ys(t.firestore,_c),i=H6(t.converter,e);return Eb(r,[L6(dv(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,fs.none())])}function bl(t,e,n,...r){t=Ys(t,Dn);const i=Ys(t.firestore,_c),a=dv(i);let u;return u=typeof(e=cn(e))=="string"||e instanceof Gf?O6(a,"updateDoc",t._key,e,n,r):D6(a,"updateDoc",t._key,e),Eb(i,[u.toMutation(t._key,fs.exists(!0))])}function Eb(t,e){return function(r,i){const a=new Hs;return r.asyncQueue.enqueueAndForget(async()=>h6(await T6(r),i,a)),a.promise}(av(t),e)}function G6(t,e,n){const r=n.docs.get(e._key),i=new wb(t);return new vb(t,i,e._key,r,new Au(n.hasPendingWrites,n.fromCache),e.converter)}function K6(){return new hv("serverTimestamp")}(function(e,n=!0){(function(i){wl=i})(yl),el(new Uo("firestore",(r,{instanceIdentifier:i,options:a})=>{const u=r.getProvider("app").getImmediate(),d=new _c(new F5(r.getProvider("auth-internal")),new z5(r.getProvider("app-check-internal")),function(p,w){if(!Object.prototype.hasOwnProperty.apply(p.options,["projectId"]))throw new Ae(ie.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Wu(p.options.projectId,w)}(u,i),u);return a=Object.assign({useFetchStreams:n},a),d._setSettings(a),d},"PUBLIC").setMultipleInstances(!0)),$i(cE,"4.7.5",e),$i(cE,"4.7.5","esm2017")})();const Q6={apiKey:"AIzaSyDdzgeQpJyKlalVoQ-q4-msajNdgss6OGU",authDomain:"football2024-f741a.firebaseapp.com",projectId:"football2024-f741a",storageBucket:"football2024-f741a.appspot.com",messagingSenderId:"988342307794",appId:"1:988342307794:web:7b6093345325be89f4d60b",measurementId:"G-GKR00LWSND"},Sb=dS(Q6),ur=A6(Sb),Tc=L5(Sb),Y6=async(t,e,n,r,i,a)=>{vM(Tc,t,e).then(async u=>{const d=u.user,f=Kr(ur,"users",d.email);if((await Sc(f)).exists())n({isVisible:!0,type:"success",message:"Welcome Back!"}),await a(d.email),r(i);else return await Xf(f,{email:d.email,username:d.email.split("@")[0],isPremium:!1,subscription:null}).then(async w=>{n({isVisible:!0,type:"success",message:"Welcome Back!"}),await a(d.email),r(i)}).catch(async w=>{const E=await w.message;n({isVisible:!0,type:"error",message:E})})}).catch(async u=>{const d=await u.message;n({isVisible:!0,type:"error",message:d})})},X6=async(t,e,n,r,i,a)=>{yM(Tc,e,n).then(async u=>{const d=u.user,f=Kr(ur,"users",d.email);if((await Sc(f)).exists())return r({isVisible:!0,type:"error",message:"The user already exists! Login instead."});await Xf(f,{email:d.email,username:t,isPremium:!1,subscription:null}).then(async w=>{r({isVisible:!0,type:"success",message:`User with ${d.email} has been registered successfully`}),await a(d.email),i("/login")}).catch(async w=>{const E=await w.message;r({isVisible:!0,type:"error",message:E})})}).catch(async u=>{const d=await u.message;r({isVisible:!0,type:"error",message:d})})},Gg=async(t,e,n,r)=>{const i=Kr(ur,"users",t);bl(i,{isPremium:e,subscription:n}).then(a=>{r({isVisible:!0,type:"success",message:"user data updated!"})}).catch(a=>{r({isVisible:!0,type:"error",message:"An Unkown Error Occurred"+a.message})})},J6=async(t,e)=>{const n=Kr(ur,"users",t);bl(n,{locality:e}).then(r=>{}).catch(r=>{})},Z6=async(t,e,n)=>{if(!t||!e)return;const r=e.replace(/\./g,"_"),i=Kr(ur,"users",t);try{await bl(i,{[`visitedWebsites.${r}`]:{originalUrl:e,device:n,lastVisitedAt:K6()}})}catch{}},Jf=async(t,e)=>{const n=await Sc(Kr(ur,"users",t));if(n.exists()){const r=n.data();return e(r),r}else return null},e9=async(t,e)=>{e(!0);try{const n=cb(ur,"users"),r=await _b(n),i=[];r.forEach(a=>{i.push({id:a.id,...a.data()})}),t(i)}catch{}finally{e(!1)}},t9=async(t,e,n)=>{try{const r=Kr(ur,"mail-list",t.email);if((await Sc(r)).exists())return e({isVisible:!0,type:"warning",message:"The email already exists! Try a new one."});await Xf(r,{...t}),e({isVisible:!0,type:"success",message:"You are now subscribed to our newsletter."}),n("")}catch(r){e({isVisible:!0,type:"error",message:r.message||"An error occurred while subscribing."})}},n9=async(t,e,n)=>{n(!0);const r=Kr(ur,"tips",t.home.trim()+t.away.trim()+t.date.split("/").join(""));await Xf(r,{...t}).then(async i=>{e({isVisible:!0,type:"success",message:"tip added"}),window.location.replace("/tips")}
3178).catch(async i=>{e({isVisible:!0,type:"error",message:i.message}),n(!1)}),n(!1)},r9=async(t,e,n,r,i)=>{r(!0);const a=Kr(ur,"tips",t);await bl(a,{...e}).then(async u=>{n({isVisible:!0,type:"success",message:"Tip updated successfully!"});const d=await Sc(a);return d.exists()?(i(d.data()),d.data()):null}).catch(async u=>{n({isVisible:!0,type:"error",message:u.message}),r(!1)}),r(!1)},s9=async(t,e,n)=>{e(!0);try{const r=cb(ur,"tips"),i=$6(r,B6("date","==",n)),a=await _b(i),u=[];a.forEach(d=>{u.push({id:d.id,...d.data()})}),t(u)}catch{t([])}finally{e(!1)}},i9=async t=>await gM(Tc,t),Tb="/assets/logo-VBsn0SZC.png",o9=["[email protected]","[email protected]","[email protected]"],a9=()=>{var I;const[t,e]=A.useState(!1),[n,r]=A.useState(!1),[i,a]=Wi(br),[u,d]=A.useState(!1),[f,p]=A.useState(()=>{const L=localStorage.getItem("theme");return L||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}),w=zt(),E=A.useCallback(()=>{SM(Tc),a(null)},[a]),T=A.useCallback(()=>{e(L=>!L)},[]),b=A.useCallback(()=>{p(L=>L==="dark"?"light":"dark")},[]);return A.useEffect(()=>{document.documentElement.setAttribute("data-theme",f),localStorage.setItem("theme",f)},[f]),A.useEffect(()=>{const L=window.matchMedia("(prefers-color-scheme: dark)"),V=U=>{localStorage.getItem("theme")||p(U.matches?"dark":"light")};return L.addEventListener("change",V),()=>L.removeEventListener("change",V)},[]),A.useEffect(()=>{const L=()=>r(window.scrollY>20);return window.addEventListener("scroll",L,{passive:!0}),()=>window.removeEventListener("scroll",L)},[]),A.useEffect(()=>{e(!1)},[w]),A.useEffect(()=>{d(i&&o9.includes(i.email))},[i]),m.jsx("header",{className:`navbar ${n?"scrolled":""}`,children:m.jsxs("div",{className:"navbar-inner",children:[m.jsxs(vt,{to:"/",className:"navbar-logo",children:[m.jsx("img",{src:Tb,alt:"Goal Genius"}),m.jsx("span",{className:"logo-text",children:"GoalGenius"})]}),m.jsxs("nav",{className:`navbar-nav ${t?"active":""}`,children:[m.jsxs("div",{className:"nav-links",children:[m.jsx(vt,{to:"/",className:"nav-link",children:"Home"}),m.jsx(vt,{to:"/about",className:"nav-link",children:"About"}),m.jsx(vt,{to:"/subscribe",className:"nav-link",children:"Subscribe"}),u&&m.jsxs(m.Fragment,{children:[m.jsx(vt,{to:"/add-tip",className:"nav-link",children:"Add Tip"}),m.jsx(vt,{to:"/users",className:"nav-link",children:"Users"})]})]}),m.jsx("div",{className:"nav-actions",children:i?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"nav-user",children:i.username||((I=i.email)==null?void 0:I.split("@")[0])}),m.jsx("button",{className:"btn ghost",onClick:E,children:"Logout"})]}):m.jsxs(m.Fragment,{children:[m.jsx(vt,{className:"btn ghost",to:"/login",state:{from:w},children:"Sign In"}),m.jsx(vt,{className:"btn",to:"/register",state:{from:w},children:"Get Started"})]})})]}),m.jsxs("div",{className:"navbar-actions",children:[m.jsx("button",{className:"theme-toggle",onClick:b,"aria-label":`Switch to ${f==="dark"?"light":"dark"} theme`,children:f==="dark"?m.jsx(RD,{}):m.jsx(CD,{})}),m.jsx("button",{className:"menu-toggle",onClick:T,"aria-label":"Toggle menu",children:t?m.jsx(ED,{}):m.jsx(ID,{})})]})]})})},l9=()=>{const t=gl(br),[e,n]=A.useState(!1);return A.useEffect(()=>{n(t&&["[email protected]","[email protected]","[email protected]"].includes(t.email))},[t]),m.jsxs("footer",{className:"footer",children:[m.jsxs("div",{className:"footer-inner",children:[m.jsxs("div",{className:"footer-brand",children:[m.jsxs("div",{className:"footer-logo",children:[m.jsx("img",{src:Tb,alt:"Goal Genius"}),m.jsx("span",{children:"GoalGenius"})]}),m.jsx("p",{className:"footer-tagline",children:"Expert football predictions and tips. Play like a pro."}),m.jsx("div",{className:"footer-social",children:VD.map(r=>m.jsx(cy,{to:r.url,title:r.title,target:"_blank",rel:"noopener noreferrer",children:r.icon},r.id))})]}),m.jsxs("div",{className:"footer-links",children:[m.jsxs("div",{className:"footer-column",children:[m.jsx("h4",{children:"Navigation"}),m.jsx(vt,{to:"/",children:"Home"}),m.jsx(vt,{to:"/about",children:"About"}),m.jsx(vt,{to:"/subscribe",children:"Subscribe"}),!t&&m.jsx(vt,{to:"/login",children:"Sign In"}),!t&&m.jsx(vt,{to:"/register",children:"Get Started"})]}),e&&m.jsxs("div",{className:"footer-column",children:[m.jsx("h4",{children:"Admin"}),m.jsx(vt,{to:"/add-tip",children:"Add Tip"}),m.jsx(vt,{to:"/users",children:"All Users"})]}),m.jsxs("div",{className:"footer-column",children:[m.jsx("h4",{children:"Support"}),m.jsx(vt,{to:"/about",children:"FAQ"}),m.jsx(vt,{to:"/about",children:"Contact"}),m.jsx(vt,{to:"/about",children:"Privacy"})]})]})]}),m.jsx("div",{className:"footer-bottom",children:m.jsxs("p",{children:["© ",new Date().getFullYear()," GoalGenius. All rights reserved."]})})]})};function Il(){return m.jsxs("div",{className:"loader",children:[m.jsx("div",{className:"loader-ring",children:m.jsx("span",{className:"loader-dot"})}),m.jsx("p",{className:"loader-text",children:"Loading..."})]})}function vv(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(t)}function wv(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"}
3178,child:[]}]})(t)}function _v(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(t)}function bb(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function u9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function c9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(t)}function Ev(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"1",y1:"10",x2:"23",y2:"10"},child:[]}]})(t)}function d9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(t)}function Sv(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"},child:[]}]})(t)}function h9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"},child:[]},{tag:"polyline",attr:{points:"10 17 15 12 10 7"},child:[]},{tag:"line",attr:{x1:"15",y1:"12",x2:"3",y2:"12"},child:[]}]})(t)}function Yu(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"},child:[]},{tag:"polyline",attr:{points:"22,6 12,13 2,6"},child:[]}]})(t)}function f9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(t)}function p9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"},child:[]},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"},child:[]},{tag:"polyline",attr:{points:"7 3 7 8 15 8"},child:[]}]})(t)}function m9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(t)}function Ib(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"},child:[]}]})(t)}function Kg(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12.01",y2:"18"},child:[]}]})(t)}function g9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 6 13.5 15.5 8.5 10.5 1 18"},child:[]},{tag:"polyline",attr:{points:"17 6 23 6 23 12"},child:[]}]})(t)}function y9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7",r:"4"},child:[]},{tag:"line",attr:{x1:"20",y1:"8",x2:"20",y2:"14"},child:[]},{tag:"line",attr:{x1:"23",y1:"11",x2:"17",y2:"11"},child:[]}]})(t)}function v9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(t)}function w9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"9",cy:"7",r:"4"},child:[]},{tag:"path",attr:{d:"M23 21v-2a4 4 0 0 0-3-3.87"},child:[]},{tag:"path",attr:{d:"M16 3.13a4 4 0 0 1 0 7.75"},child:[]}]})(t)}function _9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(t)}const E9=[Ib,Sv,g9,_9],S9=()=>m.jsxs("section",{className:"featured-section",children:[m.jsx("h2",{className:"section-title",children:"Why Choose Us"}),m.jsx("p",{className:"section-subtitle",children:"Trusted by thousands of football enthusiasts across Africa"}),m.jsx("div",{className:"features-grid",children:OD.map((t,e)=>{const n=E9[e]||Ib;return m.jsxs("div",{className:"feature-card",style:{animationDelay:`${e*.1}s`},children:[m.jsx("div",{className:"feature-icon-wrap",children:m.jsx(n,{className:"feature-icon"})}),m.jsx("h3",{children:t.title}),m.jsx("p",{children:["Verified by experts","Secure encrypted payments","Data-driven analysis","Real-time updates"][e]})]},t.title)})})]}),ku={KE:{code:"KE",name:"Kenya",currency:"KES",symbol:"KSH",rate:1},NG:{code:"NG",name:"Nigeria",currency:"NGN",symbol:"₦",rate:11.63},GH:{code:"GH",name:"Ghana",currency:"GHS",symbol:"GH₵",rate:.11},ZA:{code:"ZA",name:"South Africa",currency:"ZAR",symbol:"R",rate:.14},UG:{code:"UG",name:"Uganda",currency:"UGX",symbol:"USh",rate:28.5},TZ:{code:"TZ",name:"Tanzania",currency:"TZS",symbol:"TSh",rate:20.2},RW:{code:"RW",name:"Rwanda",currency:"RWF",symbol:"FRw",rate:10.1}
3178,ZM:{code:"ZM",name:"Zambia",currency:"ZMW",symbol:"ZK",rate:.21},MW:{code:"MW",name:"Malawi",currency:"MWK",symbol:"MK",rate:13.2},BF:{code:"BF",name:"Burkina Faso",currency:"XOF",symbol:"CFA",rate:4.6},CI:{code:"CI",name:"Côte d'Ivoire",currency:"XOF",symbol:"CFA",rate:4.6},SN:{code:"SN",name:"Senegal",currency:"XOF",symbol:"CFA",rate:4.6},CM:{code:"CM",name:"Cameroon",currency:"XAF",symbol:"FCFA",rate:4.6},US:{code:"US",name:"United States",currency:"USD",symbol:"$",rate:.0076},GB:{code:"GB",name:"United Kingdom",currency:"GBP",symbol:"£",rate:.006},EU:{code:"EU",name:"Eurozone",currency:"EUR",symbol:"€",rate:.007}},ls=ku.KE,Cb=A.createContext(null);function T9({children:t}){const[e,n]=A.useState(ls),[r,i]=A.useState(null),[a,u]=A.useState(null),[d,f]=A.useState(!0),p=A.useCallback(async()=>{f(!0);try{const T=await fetch("https://ipapi.co/json/");if(T.ok){const b=await T.json();await u(b);const I=ku[b.country_code];if(I){n(I),i(I);return}else if(ku[b.continent_code]){n(ku[b.continent_code]),i(ku[b.continent_code]);return}}n(ls),i(ls)}catch{n(ls),i(ls)}finally{f(!1)}},[]);A.useEffect(()=>{p()},[p]);const w=A.useCallback(T=>Math.round((T||0)*e.rate),[e]),E={country:e,detected:r,loading:d,currency:e.currency,symbol:e.symbol,rate:e.rate,convertPrice:w,setCountry:n,locality:a};return m.jsx(Cb.Provider,{value:E,children:t})}function Tv(){const t=A.useContext(Cb);return t||{country:ls,detected:null,locality:null,loading:!1,currency:ls.currency,symbol:ls.symbol,rate:ls.rate,convertPrice:e=>Math.round((e||0)*ls.rate),setCountry:()=>{}}}function b9(){const[t,e]=A.useState("Week"),n=zt(),{symbol:r,convertPrice:i}=Tv(),a=kf.filter(u=>u.billing===t);return m.jsxs("div",{className:"pricing-section",id:"pricing",children:[m.jsx("h2",{className:"section-title",children:"Pricing Plans"}),m.jsx("p",{className:"section-subtitle",children:"Choose the plan that works for you. Upgrade anytime."}),m.jsx("div",{className:"billing-tabs",children:["Day","Week","Month"].map(u=>m.jsx("button",{className:`billing-tab ${t===u?"active":""}`,onClick:()=>e(u),children:u==="Day"?"Daily":u==="Week"?"Weekly":"Monthly"},u))}),m.jsx("div",{className:"pricing-cards",children:a.map((u,d)=>{const f=i(u.price);return m.jsxs("div",{className:`pricing-card ${d===1?"popular":""}`,style:{animationDelay:`${d*.1}s`},children:[d===1&&m.jsx("span",{className:"popular-badge",children:"Best Value"}),m.jsxs("div",{className:"card-header",children:[m.jsx("h3",{className:"plan-name",children:u.plan}),m.jsx("p",{className:"plan-title",children:u.title})]}),m.jsxs("div",{className:"card-price",children:[m.jsxs("span",{className:"price",children:[r," ",f.toLocaleString()]}),m.jsxs("span",{className:"period",children:["/",u.billing]})]}),m.jsx("ul",{className:"card-features",children:u.features.map((p,w)=>m.jsxs("li",{children:[m.jsx(_v,{className:"feature-icon"}),p]},w))}),m.jsxs(vt,{className:"btn subscribe-btn",state:{from:n,subscription:u},to:"/subscribe",children:["Subscribe Now ",m.jsx(u9,{})]})]},u.id)})})]})}function I9(){const t=zt();return m.jsx("div",{className:"flyer-section",children:m.jsxs("div",{className:"flyer-content",children:[m.jsx("h2",{children:"Ready to level up your predictions?"}),m.jsx("p",{children:"Join thousands of football enthusiasts who trust our expert tips and analysis."}),m.jsxs(vt,{to:"/subscribe",className:"btn",state:{from:t,subscription:kf[1]},children:["Get VIP Access ",m.jsx(wv,{})]})]})})}const Es=()=>{const t=zt();return A.useLayoutEffect(()=>{window.scrollTo({top:0,behavior:"smooth"});const e=t.hash;if(e){const n=document.querySelector(e);n&&n.scrollIntoView({behavior:"smooth"})}},[t]),null};var ng,XE;function C9(){if(XE)return ng;XE=1;var t=typeof Element<"u",e=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(a,u){if(a===u)return!0;if(a&&u&&typeof a=="object"&&typeof u=="object"){if(a.constructor!==u.constructor)return!1;var d,f,p;if(Array.isArray(a)){if(d=a.length,d!=u.length)return!1;for(f=d;f--!==0;)if(!i(a[f],u[f]))return!1;return!0}var w;if(e&&a instanceof Map&&u instanceof Map){if(a.size!==u.size)return!1;for(w=a.entries();!(f=w.next()).done;)if(!u.has(f.value[0]))return!1;for(w=a.entries();!(f=w.next()).done;)if(!i(f.value[1],u.get(f.value[0])))return!1;return!0}if(n&&a instanceof Set&&u instanceof Set){if(a.size!==u.size)return!1;for(w=a.entries();!(f=w.next()).done;)if(!u.has(f.value[0]))return!1;return!0}
3178if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(u)){if(d=a.length,d!=u.length)return!1;for(f=d;f--!==0;)if(a[f]!==u[f])return!1;return!0}if(a.constructor===RegExp)return a.source===u.source&&a.flags===u.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof u.valueOf=="function")return a.valueOf()===u.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof u.toString=="function")return a.toString()===u.toString();if(p=Object.keys(a),d=p.length,d!==Object.keys(u).length)return!1;for(f=d;f--!==0;)if(!Object.prototype.hasOwnProperty.call(u,p[f]))return!1;if(t&&a instanceof Element)return!1;for(f=d;f--!==0;)if(!((p[f]==="_owner"||p[f]==="__v"||p[f]==="__o")&&a.$$typeof)&&!i(a[p[f]],u[p[f]]))return!1;return!0}return a!==a&&u!==u}return ng=function(u,d){try{return i(u,d)}catch(f){if((f.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw f}},ng}var R9=C9();const A9=Ju(R9);var rg,JE;function k9(){if(JE)return rg;JE=1;var t=function(e,n,r,i,a,u,d,f){if(!e){var p;if(n===void 0)p=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var w=[r,i,a,u,d,f],E=0;p=new Error(n.replace(/%s/g,function(){return w[E++]})),p.name="Invariant Violation"}throw p.framesToPop=1,p}};return rg=t,rg}var x9=k9();const ZE=Ju(x9);var sg,e2;function P9(){return e2||(e2=1,sg=function(e,n,r,i){var a=r?r.call(i,e,n):void 0;if(a!==void 0)return!!a;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var u=Object.keys(e),d=Object.keys(n);if(u.length!==d.length)return!1;for(var f=Object.prototype.hasOwnProperty.bind(n),p=0;p<u.length;p++){var w=u[p];if(!f(w))return!1;var E=e[w],T=n[w];if(a=r?r.call(i,E,T,w):void 0,a===!1||a===void 0&&E!==T)return!1}return!0}),sg}var N9=P9();const L9=Ju(N9);var Rb=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(Rb||{}),ig={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},t2=Object.values(Rb),bv={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},D9=Object.entries(bv).reduce((t,[e,n])=>(t[n]=e,t),{}),zr="data-rh",qa={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Ga=(t,e)=>{for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},O9=t=>{let e=Ga(t,"title");const n=Ga(t,qa.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,()=>e);const r=Ga(t,qa.DEFAULT_TITLE);return e||r||void 0},V9=t=>Ga(t,qa.ON_CHANGE_CLIENT_STATE)||(()=>{}),og=(t,e)=>e.filter(n=>typeof n[t]<"u").map(n=>n[t]).reduce((n,r)=>({...n,...r}),{}),M9=(t,e)=>e.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const i=Object.keys(r);for(let a=0;a<i.length;a+=1){const d=i[a].toLowerCase();if(t.indexOf(d)!==-1&&r[d])return n.concat(r)}}return n},[]),j9=t=>console&&typeof console.warn=="function"&&console.warn(t),_u=(t,e,n)=>{const r={};return n.filter(i=>Array.isArray(i[t])?!0:(typeof i[t]<"u"&&j9(`Helmet: ${t} should be of type "Array". Instead found type "${typeof i[t]}"`),!1)).map(i=>i[t]).reverse().reduce((i,a)=>{const u={};a.filter(f=>{let p;const w=Object.keys(f);for(let T=0;T<w.length;T+=1){const b=w[T],I=b.toLowerCase();e.indexOf(I)!==-1&&!(p==="rel"&&f[p].toLowerCase()==="canonical")&&!(I==="rel"&&f[I].toLowerCase()==="stylesheet")&&(p=I),e.
3178indexOf(b)!==-1&&(b==="innerHTML"||b==="cssText"||b==="itemprop")&&(p=b)}if(!p||!f[p])return!1;const E=f[p].toLowerCase();return r[p]||(r[p]={}),u[p]||(u[p]={}),r[p][E]?!1:(u[p][E]=!0,!0)}).reverse().forEach(f=>i.push(f));const d=Object.keys(u);for(let f=0;f<d.length;f+=1){const p=d[f],w={...r[p],...u[p]};r[p]=w}return i},[]).reverse()},F9=(t,e)=>{if(Array.isArray(t)&&t.length){for(let n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},U9=t=>({baseTag:M9(["href"],t),bodyAttributes:og("bodyAttributes",t),defer:Ga(t,qa.DEFER),encode:Ga(t,qa.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:og("htmlAttributes",t),linkTags:_u("link",["rel","href"],t),metaTags:_u("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:_u("noscript",["innerHTML"],t),onChangeClientState:V9(t),scriptTags:_u("script",["src","innerHTML"],t),styleTags:_u("style",["cssText"],t),title:O9(t),titleAttributes:og("titleAttributes",t),prioritizeSeoTags:F9(t,qa.PRIORITIZE_SEO_TAGS)}),Ab=t=>Array.isArray(t)?t.join(""):t,$9=(t,e)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&e[n[r]].includes(t[n[r]]))return!0;return!1},ag=(t,e)=>Array.isArray(t)?t.reduce((n,r)=>($9(r,e)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:t,priority:[]},n2=(t,e)=>({...t,[e]:void 0}),B9=["noscript","script","style"],Qg=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),kb=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]<"u"?`${n}="${t[n]}"`:`${n}`;return e?`${e} ${r}`:r},""),z9=(t,e,n,r)=>{const i=kb(n),a=Ab(e);return i?`<${t} ${zr}="true" ${i}>${Qg(a,r)}</${t}>`:`<${t} ${zr}="true">${Qg(a,r)}</${t}>`},H9=(t,e,n=!0)=>e.reduce((r,i)=>{const a=i,u=Object.keys(a).filter(p=>!(p==="innerHTML"||p==="cssText")).reduce((p,w)=>{const E=typeof a[w]>"u"?w:`${w}="${Qg(a[w],n)}"`;return p?`${p} ${E}`:E},""),d=a.innerHTML||a.cssText||"",f=B9.indexOf(t)===-1;return`${r}<${t} ${zr}="true" ${u}${f?"/>":`>${d}</${t}>`}`},""),xb=(t,e={})=>Object.keys(t).reduce((n,r)=>{const i=bv[r];return n[i||r]=t[r],n},e),W9=(t,e,n)=>{const r={key:e,[zr]:!0},i=xb(n,r);return[Ke.createElement("title",i,e)]},Ch=(t,e)=>e.map((n,r)=>{const i={key:r,[zr]:!0};return Object.keys(n).forEach(a=>{const d=bv[a]||a;if(d==="innerHTML"||d==="cssText"){const f=n.innerHTML||n.cssText;i.dangerouslySetInnerHTML={__html:f}}else i[d]=n[a]}),Ke.createElement(t,i)}),Sr=(t,e,n=!0)=>{switch(t){case"title":return{toComponent:()=>W9(t,e.title,e.titleAttributes),toString:()=>z9(t,e.title,e.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>xb(e),toString:()=>kb(e)};default:return{toComponent:()=>Ch(t,e),toString:()=>H9(t,e,n)}}},q9=({metaTags:t,linkTags:e,scriptTags:n,encode:r})=>{const i=ag(t,ig.meta),a=ag(e,ig.link),u=ag(n,ig.script);return{priorityMethods:{toComponent:()=>[...Ch("meta",i.priority),...Ch("link",a.priority),...Ch("script",u.priority)],toString:()=>`${Sr("meta",i.priority,r)} ${Sr("link",a.priority,r)} ${Sr("script",u.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:u.default}},G9=t=>{const{baseTag:e,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:u,title:d="",titleAttributes:f,prioritizeSeoTags:p}=t;let{linkTags:w,metaTags:E,scriptTags:T}=t,b={toComponent:()=>{},toString:()=>""};return p&&({priorityMethods:b,linkTags:w,metaTags:E,scriptTags:T}=q9(t)),{priority:b,base:Sr("base",e,r),bodyAttributes:Sr("bodyAttributes",n,r),htmlAttributes:Sr("htmlAttributes",i,r),link:Sr("link",w,r),meta:Sr("meta",E,r),noscript:Sr("noscript",a,r),script:Sr("script",T,r),style:Sr("style",u,r),title:Sr("title",{title:d,titleAttributes:f},r)}},Pb=G9,rh=[],Nb=!!(typeof window<"u"&&window.document&&window.document.createElement),Yg=class{constructor(t,e){js(this,"instances",[]);js(this,"canUseDOM",Nb);js(this,"context");js(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?rh:this.instances,add:t=>{(this.canUseDOM?rh:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?rh:this.instances).indexOf(t);(this.canUseDOM?rh:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=Pb({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},K9={},Lb=Ke.createContext(K9),Oo,Db=(Oo=class extends A.Component{constructor(n){super(n);js(this,"helmetData");this.helmetData=new Yg(this.props.context||{},Oo.canUseDOM)}render(){return Ke.createElement(Lb.Provider,{value:this.helmetData.value},this.props.children)}},js(Oo,"canUseDOM",Nb),Oo),Oa=(t,e)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${t}[${zr}]`),i=[].slice.call(r),a=[];let u;return e&&e.length&&e.forEach(d=>{const f=document.createElement(t);for(const p in d)if(Object.prototype.hasOwnProperty.call(d,p))if(p==="innerHTML")f.innerHTML=d.innerHTML;else if(p==="cssText")f.styleSheet?f.styleSheet.cssText=d.cssText:f.appendChild(document.createTextNode(d.cssText));else{const w=p,E=typeof d[w]>"u"?"":d[w];f.setAttribute(p,E)}f.setAttribute(zr,"true"),i.some((p,w)=>(u=w,f.isEqualNode(p)))?i.splice(u,1):a.push(f)}
3178),i.forEach(d=>{var f;return(f=d.parentNode)==null?void 0:f.removeChild(d)}),a.forEach(d=>n.appendChild(d)),{oldTags:i,newTags:a}},Xg=(t,e)=>{const n=document.getElementsByTagName(t)[0];if(!n)return;const r=n.getAttribute(zr),i=r?r.split(","):[],a=[...i],u=Object.keys(e);for(const d of u){const f=e[d]||"";n.getAttribute(d)!==f&&n.setAttribute(d,f),i.indexOf(d)===-1&&i.push(d);const p=a.indexOf(d);p!==-1&&a.splice(p,1)}for(let d=a.length-1;d>=0;d-=1)n.removeAttribute(a[d]);i.length===a.length?n.removeAttribute(zr):n.getAttribute(zr)!==u.join(",")&&n.setAttribute(zr,u.join(","))},Q9=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=Ab(t)),Xg("title",e)},r2=(t,e)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:u,noscriptTags:d,onChangeClientState:f,scriptTags:p,styleTags:w,title:E,titleAttributes:T}=t;Xg("body",r),Xg("html",i),Q9(E,T);const b={baseTag:Oa("base",n),linkTags:Oa("link",a),metaTags:Oa("meta",u),noscriptTags:Oa("noscript",d),scriptTags:Oa("script",p),styleTags:Oa("style",w)},I={},L={};Object.keys(b).forEach(V=>{const{newTags:U,oldTags:M}=b[V];U.length&&(I[V]=U),M.length&&(L[V]=b[V].oldTags)}),e&&e(),f(t,I,L)},Eu=null,Y9=t=>{Eu&&cancelAnimationFrame(Eu),t.defer?Eu=requestAnimationFrame(()=>{r2(t,()=>{Eu=null})}):(r2(t),Eu=null)},X9=Y9,s2=class extends A.Component{constructor(){super(...arguments);js(this,"rendered",!1)}shouldComponentUpdate(e){return!L9(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const i=U9(e.get().map(a=>{const u={...a.props};return delete u.context,u}));Db.canUseDOM?X9(i):r=Pb(i),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},dg,J9=(dg=class extends A.Component{shouldComponentUpdate(t){return!A9(n2(this.props,"helmetData"),n2(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,n,r){return{...e,[t.type]:[...e[t.type]||[],{...n,...this.mapNestedChildrenToProps(t,r)}]}}mapObjectTypeChildren(t,e,n,r){switch(t.type){case"title":return{...e,[t.type]:r,titleAttributes:{...n}};case"body":return{...e,bodyAttributes:{...n}};case"html":return{...e,htmlAttributes:{...n}};default:return{...e,[t.type]:{...n}}}}mapArrayTypeChildrenToProps(t,e){let n={...e};return Object.keys(t).forEach(r=>{n={...n,[r]:t[r]}}),n}warnOnInvalidChildren(t,e){return ZE(t2.some(n=>t.type===n),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${t2.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),ZE(!e||typeof e=="string"||Array.isArray(e)&&!e.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let n={};return Ke.Children.forEach(t,r=>{if(!r||!r.props)return;const{children:i,...a}=r.props,u=Object.keys(a).reduce((f,p)=>(f[D9[p]||p]=a[p],f),{});let{type:d}=r;
3178switch(typeof d=="symbol"?d=d.toString():this.warnOnInvalidChildren(r,i),d){case"Symbol(react.fragment)":e=this.mapChildrenToProps(i,e);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,u,i);break;default:e=this.mapObjectTypeChildren(r,e,u,i);break}}),this.mapArrayTypeChildrenToProps(n,e)}render(){const{children:t,...e}=this.props;let n={...e},{helmetData:r}=e;if(t&&(n=this.mapChildrenToProps(t,n)),r&&!(r instanceof Yg)){const i=r;r=new Yg(i.context,!0),delete n.helmetData}return r?Ke.createElement(s2,{...n,context:r.value}):Ke.createElement(Lb.Consumer,null,i=>Ke.createElement(s2,{...n,context:i}))}},js(dg,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),dg);function Ss({title:t}){const e=zt(),n=`${window.location.origin}${e.pathname}`;return m.jsxs(J9,{children:[m.jsx("meta",{charSet:"UTF-8"}),m.jsx("link",{rel:"icon",href:"/favicon.ico"}),m.jsx("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/logo32.png"}),m.jsx("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/logo16.png"}),m.jsx("link",{rel:"apple-touch-icon",href:"/logo192.png"}),m.jsx("link",{rel:"manifest",href:"/manifest.json",crossorigin:"anonymous"}),m.jsx("link",{rel:"shortcut icon",type:"image/x-icon",href:"/logo512.png"}),m.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, user-scalable=no"}),m.jsx("meta",{name:"theme-color",content:"#00BFFF"}),m.jsx("meta",{name:"description",content:"Get all the latest ✓Fixed VIP Tips ✓Football Predictions, ✓Latest Football Betting Odds and livescores, results & fixtures for all leagues and competitions, including the Premier League, Championship and across the world."}),m.jsx("meta",{name:"keywords",content:"Football Predictions, Betting Odds, Live Scores, Live Sports, Football Results, Football Fixtures, Football Today, Premier League, Championship, Super Sports, Laliga, Bundesliga, Serie A"}),m.jsx("meta",{name:"author",content:"GOAL GENIUS"}),m.jsx("link",{rel:"canonical",href:n}),m.jsx("meta",{property:"og:title",content:t}),m.jsx("meta",{property:"og:description",content:"Get all the latest ✓Fixed VIP Tips ✓Football Predictions, ✓Latest Football Betting Odds and livescores, results & fixtures for all leagues and competitions."}),m.jsx("meta",{property:"og:image",content:`${window.location.origin}/logo512.png`}),m.jsx("meta",{property:"og:url",content:n}),m.jsx("meta",{property:"og:type",content:"website"}),m.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),m.jsx("meta",{name:"twitter:title",content:t}),m.jsx("meta",{name:"twitter:description",content:"Get all the latest ✓Fixed VIP Tips ✓Football Predictions, ✓Latest Football Betting Odds and livescores, results & fixtures for all leagues and competitions."}),m.jsx("meta",{name:"twitter:image",content:`${window.location.origin}/logo512.png`}),m.jsxs("title",{children:[t," | GOAL GENIUS - Fixed VIP Football Tips & Predictions, Insights and News"]})]})}function Z9(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85a.637.637 0 0 0-.83.22l-1.88 3.24a11.463 11.463 0 0 0-8.94 0L5.65 5.67a.643.643 0 0 0-.87-.2c-.28.18-.37.54-.22.83L6.4 9.48A10.78 10.78 0 0 0 1 18h22a10.78 10.78 0 0 0-5.4-8.52zM7 15.25a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5zm10 0a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5z"},child:[]}]})(t)}function eF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 1.74.5 3.37 1.41 4.84.95 1.54 2.2 2.86 3.16 4.4.47.75.81 1.45 1.17 2.26.26.55.47 1.5 1.26 1.5s1-.95 1.25-1.5c.37-.81.7-1.51 1.17-2.26.96-1.53 2.21-2.85 3.16-4.4C18.5 12.37 19 10.74 19 9c0-3.87-3.13-7-7-7zm0 9.75a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z"},child:[]}]})(t)}function tF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"},child:[]}]})(t)}function nF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(t)}function i2(t,e){return t.length>e?t.substring(0,e)+"...":t}const rF=180;function sF(t,e){if(!t)return null;const[n,r,i]=t.split("/").map(Number),[a,u]=(e||"00:00").split(":").map(Number);if(!n||!r||!i)return null;const f=Date.UTC(i,n-1,r,a||0,u||0,0)-rF*60*1e3;return new Date(f)}function iF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m7 17.013 4.413-.015 9.632-9.54c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.756-.756-2.075-.752-2.825-.
3178003L7 12.583v4.43zM18.045 4.458l1.589 1.583-1.597 1.582-1.586-1.585 1.594-1.58zM9 13.417l6.03-5.973 1.586 1.586-6.029 5.971L9 15.006v-1.589z"},child:[]},{tag:"path",attr:{d:"M5 21h14c1.103 0 2-.897 2-2v-8.668l-2 2V19H8.158c-.026 0-.053.01-.079.01-.033 0-.066-.009-.1-.01H5V5h6.847l2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2z"},child:[]}]})(t)}function oF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 4H4c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm0 2v.511l-8 6.223-8-6.222V6h16zM4 18V9.044l7.386 5.745a.994.994 0 0 0 1.228 0L20 9.044 20.002 18H4z"},child:[]}]})(t)}function aF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.001 10h2v5h-2zM11 16h2v2h-2z"},child:[]},{tag:"path",attr:{d:"M13.768 4.2C13.42 3.545 12.742 3.138 12 3.138s-1.42.407-1.768 1.063L2.894 18.064a1.986 1.986 0 0 0 .054 1.968A1.984 1.984 0 0 0 4.661 21h14.678c.708 0 1.349-.362 1.714-.968a1.989 1.989 0 0 0 .054-1.968L13.768 4.2zM4.661 19 12 5.137 19.344 19H4.661z"},child:[]}]})(t)}function lF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2a5 5 0 1 0 5 5 5 5 0 0 0-5-5zm0 8a3 3 0 1 1 3-3 3 3 0 0 1-3 3zm9 11v-1a7 7 0 0 0-7-7h-4a7 7 0 0 0-7 7v1h2v-1a5 5 0 0 1 5-5h4a5 5 0 0 1 5 5v1z"},child:[]}]})(t)}function uF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.6 48 48 141.6 48 256s93.6 208 208 208 208-93.6 208-208S370.4 48 256 48zm-42.7 318.9L106.7 260.3l29.9-29.9 76.8 76.8 162.1-162.1 29.9 29.9-192.1 191.9z"},child:[]}]})(t)}function cF(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"},child:[]}]})(t)}const dF=cD({key:"userNameSelector",get:({get:t})=>{const e=t(br);return!!(e&&e.isPremium)}});function hF({tip:t,isAdmin:e,today:n}){const[r,i]=A.useState(!0),a=gl(dF);A.useEffect(()=>{e||a?i(!1):t.date===n&&t.premium?i(t.status!=="finished"):i(!1)},[a,e,t,n]);const d=(E=>E.status==="pending"?{label:"PENDING",className:"status-pending",icon:"⏳"}:E.won==="won"?{label:"WON",className:"status-won",icon:m.jsx(uF,{})}:{label:"LOST",className:"status-lost",icon:m.jsx(cF,{})})(t),f=t.premium,p=sF(t.date,t.time),w=p?new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(p):t.time;return p?new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(p):t.date,m.jsxs("div",{className:`tip-card ${f?"premium":""}`,children:[m.jsxs("div",{className:"tip-card-header",children:[m.jsxs("div",{className:"tip-meta",children:[m.jsx("span",{className:"tip-time",children:w}),m.jsx("span",{className:`tip-badge ${f?"vip":"free"}`,children:f?"💎 VIP":"🔓 Free"})]}),m.jsxs("div",{className:"tip-actions",children:[m.jsxs("span",{className:"tip-odd",children:["Odd ",t.odd]}),e&&m.jsx(vt,{className:"tip-edit",to:"/edit-tip",state:t,children:m.jsx(iF,{})})]})]}),m.jsx("div",{className:"tip-card-body",children:m.jsxs("div",{className:"tip-teams",children:[m.jsx("span",{className:`team-name home ${r?"hidden":""}`,children:r?"Locked":i2(t.home,50)}),m.jsx("div",{className:"tip-vs",children:m.jsx("span",{className:"vs-pick",children:t.pick})}),m.jsx("span",{className:`team-name away ${r?"hidden":""}`,children:r?"Locked":i2(t.away,50)})]})}),m.jsxs("div",{className:"tip-card-footer",children:[m.jsxs("div",{className:"tip-result",children:[m.jsx("span",{className:"result-label",children:"Result"}),m.jsx("span",{className:"result-score",children:t.results||"—"})]}),m.jsxs("div",{className:`tip-status ${d.className}`,children:[m.jsx("span",{className:"status-icon",children:d.icon}),m.jsx("span",{className:"status-label",children:d.label})]})]})]})}const fF={Morning:{label:"Morning",sub:"12AM - 6AM",icon:"🌙"}
3178,Afternoon:{label:"Afternoon",sub:"6AM - 12PM",icon:"☀️"},Evening:{label:"Evening",sub:"12PM - 6PM",icon:"🌤️"},Night:{label:"Night",sub:"6PM - 12AM",icon:"🌙"}},pF=[{value:"ALL",label:"All",icon:"⚽"},{value:"1X2",label:"WDW",icon:"1️⃣"},{value:"CS",label:"CS",icon:"🎯"},{value:"GG",label:"BTTS",icon:"⚡"},{value:"OV_UN",label:"Total",icon:"📊"}];function mF(){const[t,e]=A.useState(!1),[n,r]=A.useState(!0),[i,a]=A.useState(!1),[u,d]=A.useState(null),[f,p]=A.useState(null),[w,E]=Wi(br),[T,b]=A.useState(!1),[I,L]=A.useState(null),[V,U]=A.useState("ALL"),[M,Q]=A.useState(null),[te,he]=A.useState(0),ae=A.useRef(null),D=A.useRef(!1),R=A.useRef(!1),x=A.useRef(0),k=A.useRef(0),F=zt(),B=A.useCallback(de=>new Date(de).toLocaleDateString("en-US"),[]),P=A.useCallback(de=>{const[re,ge,ee]=de.split("-").map(Number),j=new Date(re,ge-1,ee);if(isNaN(j.getTime()))return{weekday:"Invalid",day:"Date",isToday:!1};const N=new Date,X=j.getDate()===N.getDate()&&j.getMonth()===N.getMonth()&&j.getFullYear()===N.getFullYear(),ne=j.toLocaleDateString("en-US",{weekday:"short"}),ye=j.toLocaleDateString("en-US",{month:"short",day:"numeric"});return X?{weekday:"Today",day:ye,isToday:!0}:{weekday:ne,day:ye,isToday:!1}},[]),le=A.useCallback(()=>{if(!ae.current)return;const de=Math.round(ae.current.scrollLeft),re=ae.current.scrollWidth-ae.current.clientWidth;e(de>2),r(re>de+2)},[]),qe=A.useCallback(de=>{if(!ae.current)return;const re=de==="left"?-280:280;ae.current.scrollBy({left:re,behavior:"smooth"})},[]);A.useEffect(()=>{const de=[],re=new Date;for(let ge=0;ge<14;ge++){const ee=new Date(re);ee.setDate(ee.getDate()-ge);const j=ee.getFullYear(),N=String(ee.getMonth()+1).padStart(2,"0"),X=String(ee.getDate()).padStart(2,"0");de.push(`${j}-${N}-${X}`)}d(de.reverse())},[]),A.useEffect(()=>{u&&p(u[u.length-1])},[u]),A.useEffect(()=>{if(!ae.current||!u)return;const de=ae.current;de.scrollLeft=de.scrollWidth-de.clientWidth,le()},[u,le]),A.useEffect(()=>{f&&s9(Q,a,B(f))},[f,B]),A.useEffect(()=>{if(M===null)return;const de={};M.forEach(ge=>{const[ee]=ge.time.split(":").map(Number);let j="Morning";ee>=6&&ee<12?j="Afternoon":ee>=12&&ee<18?j="Evening":ee>=18&&(j="Night"),de[j]||(de[j]=[]),de[j].push(ge)});const re=Object.keys(de).map(ge=>({timeSlot:ge,items:de[ge].sort((ee,j)=>ee.time.localeCompare(j.time))})).sort((ge,ee)=>ge.timeSlot.localeCompare(ee.timeSlot));L(re),he(M.length)},[M]),A.useEffect(()=>{const de=ae.current;if(!de)return;const re=N=>{D.current=!0,R.current=!1,x.current=N.pageX,k.current=de.scrollLeft,de.style.cursor="grabbing"},ge=N=>{if(!D.current)return;const X=N.pageX-x.current;Math.abs(X)>5&&(R.current=!0),de.scrollLeft=k.current-X},ee=()=>{D.current=!1,de.style.cursor="grab"},j=()=>le();return de.addEventListener("mousedown",re),de.addEventListener("mousemove",ge),de.addEventListener("mouseup",ee),de.addEventListener("mouseleave",ee),de.addEventListener("scroll",j),()=>{de.removeEventListener("mousedown",re),de.removeEventListener("mousemove",ge),de.removeEventListener("mouseup",ee),de.removeEventListener("mouseleave",ee),de.removeEventListener("scroll",j)}},[le]),A.useEffect(()=>{b(w&&["[email protected]","[email protected]","[email protected]"].includes(w.email))},[w]);const Xe=u?B(u[u.length-1]):"";return m.jsxs("div",{className:"tips-section",children:[m.jsx(Ss,{title:"Tips"}),m.jsx(Es,{}),m.jsxs("div",{className:"tips-header",children:[m.jsx("h2",{className:"section-title",children:"Match Predictions"}),m.jsx("p",{className:"section-subtitle",children:te>0?`${te} tips available for today`:"Daily tips updated regularly"})]}),m.jsxs("div",{className:"date-picker",children:[m.jsx("button",{className:`date-arrow ${t?"visible":""}`,onClick:()=>qe("left"),children:m.jsx(tF,{})}),m.jsx("ul",{className:"date-tabs",ref:ae,style:{cursor:"grab"},children:u&&u.map(de=>{const re=P(de);return m.jsxs("li",{className:`date-tab ${f===de?"active":""} ${re.isToday?"today":""}`,onClick:()=>{R.current||p(de)},"aria-label":de,children:[m.jsx("span",{className:"day-name",children:re.weekday}),m.jsx("span",{className:"day-date",children:re.day}
3178),re.isToday&&m.jsx("span",{className:"today-badge"})]},de)})}),m.jsx("button",{className:`date-arrow ${n?"visible":""}`,onClick:()=>qe("right"),children:m.jsx(nF,{})})]}),m.jsx("div",{className:"game-filter",children:pF.map(de=>m.jsxs("button",{className:`filter-chip ${V===de.value?"active":""}`,onClick:()=>U(de.value),children:[m.jsx("span",{className:"chip-icon",children:de.icon}),m.jsx("span",{className:"chip-label",children:de.label})]},de.value))}),m.jsx("div",{className:"tips-cta",children:m.jsxs(vt,{to:"/subscribe",className:"btn",state:{from:F,subscription:kf[1]},children:[m.jsx("span",{className:"diamond",children:"💎"}),"Unlock VIP Tips"]})}),i&&m.jsx(Il,{}),!i&&m.jsxs("div",{className:"tips-content",children:[I&&I.map(de=>{const re=fF[de.timeSlot],ge=de.items.filter(ee=>V==="ALL"||ee.type===V);return ge.length===0?null:m.jsxs("div",{className:"time-group",children:[m.jsxs("div",{className:"time-group-header",children:[m.jsx("span",{className:"time-icon",children:re.icon}),m.jsxs("div",{className:"time-info",children:[m.jsx("span",{className:"time-label",children:re.label}),m.jsx("span",{className:"time-sub",children:re.sub})]}),m.jsxs("span",{className:"time-count",children:[ge.length," ",ge.length===1?"match":"matches"]})]}),m.jsx("div",{className:"tip-cards",children:ge.map((ee,j)=>m.jsx(hF,{tip:ee,isAdmin:T,today:Xe},ee.id||j))})]},de.timeSlot)}),I&&!I.some(de=>de.items.some(re=>V==="ALL"||re.type===V))&&m.jsxs("div",{className:"no-tips",children:[m.jsx("div",{className:"no-tips-icon",children:"🎯"}),m.jsx("h3",{children:"No tips available"}),m.jsx("p",{children:"No matches found for the selected date and filter."})]})]})]})}function gF(){return m.jsxs("div",{className:"Home",children:[m.jsx(Es,{}),m.jsx(Ss,{title:""}),m.jsx(mF,{}),m.jsx(b9,{}),m.jsx(S9,{}),m.jsx(I9,{})]})}function yF(){const[t,e]=A.useState(null),n=r=>{e(i=>i===r?null:r)};return m.jsxs("div",{className:"faq-section",id:"faq",children:[m.jsx("h2",{className:"section-title",children:"Frequently Asked Questions"}),m.jsx("p",{className:"section-subtitle",children:"Got questions? We have answers."}),m.jsx("div",{className:"faq-list",children:DD.map(r=>m.jsxs("div",{className:`faq-item ${t===r.id?"active":""}`,onClick:()=>n(r.id),children:[m.jsxs("button",{className:"faq-question",onClick:i=>{i.stopPropagation(),n(r.id)},children:[m.jsx("span",{children:r.question}),m.jsx(bb,{className:"faq-chevron"})]}),m.jsx("div",{className:`faq-answer ${t===r.id?"open":""}`,children:m.jsx("p",{children:r.answer})})]},r.id))})]})}const vF=()=>{const[t,e]=A.useState(""),[n,r]=A.useState(!1),i=Zi(Js),a=u=>{if(u.preventDefault(),!t||!t.includes("@")){i({isVisible:!0,type:"warning",message:"Please enter a valid email address"});return}r(!0),t9({email:t},i,d=>{e(d),r(!1)})};return m.jsx("div",{className:"newsletter-section",id:"subscribe",children:m.jsxs("div",{className:"newsletter-card",children:[m.jsx("div",{className:"newsletter-icon",children:m.jsx(Yu,{})}),m.jsx("h2",{className:"section-title",children:"Stay in the Loop"}),m.jsx("p",{className:"section-subtitle",children:"Get the latest tips and insights delivered to your inbox."}),m.jsxs("form",{onSubmit:a,className:"newsletter-form",children:[m.jsxs("div",{className:"input-wrap",children:[m.jsx(Yu,{className:"input-icon"}),m.jsx("input",{type:"email",placeholder:"[email protected]",value:t,onChange:u=>e(u.target.value),className:"newsletter-input"})]}),m.jsx("button",{type:"submit",className:"btn",disabled:n,children:n?"Subscribing...":m.jsxs(m.Fragment,{children:[m.jsx(wv,{})," Subscribe"]})})]})]})})};function wF(){return m.jsxs("div",{className:"testimonials-section",children:[m.jsx("h2",{className:"section-title",children:"What Our Users Say"}),m.jsx("p",{className:"section-subtitle",children:"Join thousands of satisfied subscribers winning with GoalGenius"}),m.jsx("div",{className:"testimonials-grid",children:MD.map((t,e)=>m.jsxs("div",{className:"testimonial-card",style:{animationDelay:`${e*.1}s`},children:[m.jsx("div",{className:"testimonial-quote",children:'"'}),m.jsx("p",{className:"testimonial-text",children:t.description}),m.jsxs("div",{className:"testimonial-author",children:[m.jsx("div",{className:"author-avatar",children:t.name.split(" ").map(n=>n[0]).join("").slice(0,2)}),m.jsxs("div",{className:"author-info",children:[m.jsx("span",{className:"author-name",children:t.name}),m.jsx("span",{className:"author-plan",children:t.title})]})]})]},t.id))})]})}const _F=()=>m.jsxs("div",{className:"about-page",children:[m.jsx(Es,{}),m.jsx(Ss,{title:"About"}),m.jsxs("div",{className:"about-hero",children:[m.jsx("h1",{className:"section-title",children:"About GoalGenius"}),m.jsx("p",{className:"section-subtitle",children:"Your trusted partner for football predictions and expert analysis"})]}),m.jsxs("div",{className:"about-content",children:[m.jsxs("div",{className:"about-card",children:[m.jsx("h3",{children:"For Football Fans"}),m.jsx("p",{children:"Your ultimate destination for accurate match forecasts, insightful analysis, and real-time updates. From the Premier League to international tournaments, we provide forecasts backed by data and expert insights."})]}),m.jsxs("div",{className:"about-card",children:[m.jsx("h3",{children:"For Bettors & Analysts"}),m.jsx("p",{children:"Gain access to detailed match predictions, player stats, and historical data to make informed decisions. Our platform empowers you with the tools you need to succeed."})]}),m.jsxs("div",{className:"about-card",children:[m.jsx("h3",{children:"Our Mission"}),m.jsx("p",{children:"We aim to revolutionize football predictions by combining cutting-edge technology, expert knowledge, and community-driven engagement. Join us and be part of a thriving football community."})]})]}),m.jsx("div",{className:"about-cta",children:m.jsxs(vt,{to:"/subscribe",className:"btn",children:["Get Started ",m.jsx(wv,{})]})}),m.jsx(yF,{}),m.jsx(wF,{}),m.jsx(vF,{})]}),EF=()=>{var M;const[t,e]=A.useState(""),[n,r]=A.useState(""),[i,a]=A.useState(!1),[u,d]=A.useState(""),[f,p]=A.useState(!1),[w,E]=Wi(br),T=Zi(Js),b=zt(),I=vs(),L=((M=b.state)==null?void 0:M.from)||"/",V=Q=>{Q.preventDefault(),t&&n?Y6(t,n,T,I,L,async he=>{await Jf(he,E)}):T({isVisible:!0,type:"warning",message:"You have entered an invali
3178d email address!"})},U=async Q=>{if(Q.preventDefault(),!u){T({isVisible:!0,type:"warning",message:"Please enter your email address"});return}p(!0);try{await i9(u),T({isVisible:!0,type:"success",message:"Password reset email sent! Check your inbox."}),a(!1),d("")}catch(te){T({isVisible:!0,type:"error",message:te.message})}finally{p(!1)}};return m.jsxs("div",{className:"auth-page",children:[m.jsx(Ss,{title:"Login"}),m.jsx(Es,{}),m.jsx("div",{className:"auth-card",children:i?m.jsxs(m.Fragment,{children:[m.jsx("h1",{children:"Reset Password"}),m.jsx("p",{className:"auth-subtitle",children:"Enter your email to receive a reset link"}),m.jsxs("form",{onSubmit:U,children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{htmlFor:"reset-email",children:"Email"}),m.jsxs("div",{className:"input-group",children:[m.jsx(Yu,{className:"input-icon"}),m.jsx("input",{type:"email",id:"reset-email",placeholder:"[email protected]",value:u,onChange:Q=>d(Q.target.value),className:"input-field",required:!0})]})]}),m.jsxs("button",{type:"submit",className:"btn",disabled:f,children:[m.jsx(d9,{})," ",f?"Sending...":"Send Reset Link"]}),m.jsxs("button",{type:"button",className:"btn ghost back-link",onClick:()=>a(!1),children:[m.jsx(vv,{})," Back to Sign In"]})]})]}):m.jsxs(m.Fragment,{children:[m.jsx("h1",{children:"Welcome Back"}),m.jsx("p",{className:"auth-subtitle",children:"Sign in to your account"}),m.jsxs("form",{onSubmit:V,children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{htmlFor:"email",children:"Email"}),m.jsxs("div",{className:"input-group",children:[m.jsx(Yu,{className:"input-icon"}),m.jsx("input",{type:"email",id:"email",placeholder:"[email protected]",value:t,onChange:Q=>e(Q.target.value),className:"input-field",required:!0})]})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{htmlFor:"password",children:"Password"}),m.jsxs("div",{className:"input-group",children:[m.jsx(Sv,{className:"input-icon"}),m.jsx("input",{type:"password",id:"password",placeholder:"Enter your password",value:n,onChange:Q=>r(Q.target.value),className:"input-field",required:!0})]})]}),m.jsx("div",{className:"form-extra",children:m.jsx("button",{type:"button",className:"forgot-link",onClick:()=>{d(t),a(!0)},children:"Forgot password?"})}),m.jsxs("button",{type:"submit",className:"btn",children:[m.jsx(h9,{})," Sign In"]})]}),m.jsxs("p",{className:"auth-footer",children:["Don't have an account? ",m.jsx(vt,{to:"/register",children:"Get Started"})]})]})})]})},SF=()=>{const[t,e]=A.useState(""),[n,r]=A.useState(""),[i,a]=A.useState(""),[u,d]=A.useState(!1),f=Zi(Js),[p,w]=Wi(br),E=vs(),T=async b=>{b.preventDefault(),n&&i?(d(!0),await X6(t,n,i,f,E,async L=>{await Jf(L,w),E("/subscribe")}),d(!1)):f({isVisible:!0,type:"warning",message:"Please fill in all fields!"})};return m.jsxs("div",{className:"auth-page",children:[m.jsx(Ss,{title:"Register"}),m.jsx(Es,{}),m.jsxs("div",{className:"auth-card",children:[m.jsx("h1",{children:"Get Started"}),m.jsx("p",{className:"auth-subtitle",children:"Create your account to unlock VIP tips"}),m.jsxs("form",{onSubmit:T,children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{htmlFor:"email",children:"Email"}),m.jsxs("div",{className:"input-group",children:[m.jsx(Yu,{className:"input-icon"}),m.jsx("input",{type:"email",id:"email",placeholder:"[email protected]",value:n,onChange:b=>r(b.target.value),className:"input-field",required:!0})]})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{htmlFor:"username",children:"Username"}),m.jsxs("div",{className:"input-group",children:[m.jsx(v9,{className:"input-icon"}),m.jsx("input",{type:"text",id:"username",placeholder:"Choose a username",value:t,onChange:b=>e(b.target.value),className:"input-field",required:!0})]}),m.jsx("p",{className:"hint-text",children:"4-15 characters, letters, numbers, dots, underscores, hyphens"})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{htmlFor:"password",children:"Password"}),m.jsxs("div",{className:"input-group",children:[m.jsx(Sv,{className:"input-icon"}),m.jsx("input",{type:"password",id:"password",placeholder:"Create a password",value:i,onChange:b=>a(b.target.value),className:"input-field",required:!0})]})]}),m.jsxs("button",{type:"submit",className:"btn",disabled:u,children:[m.jsx(y9,{})," ",u?"Creating...":"Create Account"]})]}),m.jsxs("p",{className:"auth-footer",children:["Already registered? ",m.jsx(vt,{to:"/login",children:"Sign In"})]})]})]})};function TF(){return m.jsxs("div",{className:"not-found",children:[m.jsx(Ss,{title:"404 Error"}),m.jsx(Es,{}),m.jsx("span",{className:"not-found-code",children:"404"}),m.jsx("h2",{children:"Page Not Found"}),m.jsx("p",{children:"The page you are looking for does not exist or has been moved."}),m.jsx("button",{onClick:()=>window.history.back(),className:"btn",children:"Go Back"})]})}function bF(){const[t,e]=A.useState(""),[n,r]=A.useState(""),[i,a]=A.useState(""),[u,d]=A.useState(""),[f,p]=A.useState(""),[w,E]=A.useState(""),[T,b]=A.useState(""),[I,L]=A.useState(!1),[V,U]=A.useState(""),[M,Q]=A.useState(!1),te=Zi(Js),he=vs(),[ae,D]=A.useState("1X2"),R=k=>{D(k.target.value)},x=k=>{k.preventDefault();const F=new Date(w),B=new Intl.DateTimeFormat("en-US").format(F),P=F.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});n9({home:t,away:n,date:B,odd:i,pick:u,status:f,time:P,won:T,premium:I,results:V,type:ae},te,Q)};return m.jsxs("div",{className:"admin-tips",children:[m.jsx(Ss,{title:"Add Tip"}),m.jsx(Es,{}),m.jsx("h1",{children:"Add Tip"}),!M&&m.jsxs("form",{onSubmit:x,children:[m.jsxs("div",{className:"input-container vertical",children:[m.jsx("label",{htmlFor:"home",children:"Home Team"}),m.jsx("input",{type:"text",placeholder:"e.g. Manchester United",id:"home",value:t,onChange:k=>e(k.target.value),required:!0})]}),m.jsxs("div",{className:"input-container vertical",children:[m.jsx("label",{htmlFor:"away",children:"Away Team"}),m.jsx("input",{type:"text",placeholder:"e.g. Liverpool",id:"away",value:n,onChange:k=>r(k.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"odds",children:"Odds"}),m.jsx("input",{type:"text",placeholder:"1.85",id:"odds",value:i,onChange:k=>a(k.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"pick",children:"Pick"}),m.jsx("input",{type:"text",placeholder:"1 / X / 2 / Over 2.5",id:"pick",value:u,onChange:k=>d(k.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"status",children:"Status"}),m.jsx("input",{type:"text",placeholder:"Finish / Pending / Live",id:"status",value:f,onChange:k=>p(k.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"time",children:"Date & Time"}),m.jsx("input",{type:"datetime-local",id:"time",value:w,onChange:k=>E(k.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"results",children:"Results"}),m.jsx("input",{type:"text",placeholder:"2-1",id:"results",value:V,onChange:k=>U(k.target.value)})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"won",children:"Is Won"}),m.jsx("input",{type:"text",placeholder:"won / pending / lost",id:"won",value:T,onChange:k=>b(k.target.value),required:!0})]}),m.jsx("div",{className:"input-container",children:m.jsxs("label",{className:"checkbox-label",children:[m.jsx("input",{type:"checkbox",id:"premium",onChange:k=>L(k.target.checked),checked:I}),"Premium Tip"]})}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{children:"Select Type"}),m.jsxs("div",{className:"radio-group",children:[m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"1X2",checked:ae==="1X2",onCh
3178ange:R}),"WDW (1X2)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"CS",checked:ae==="CS",onChange:R}),"Goals (CS)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"GG",checked:ae==="GG",onChange:R}),"BTTS (GG/NG)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"OV_UN",checked:ae==="OV_UN",onChange:R}),"Total (OV/UN)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"DC",checked:ae==="DC",onChange:R}),"DC 1X2"]})]})]}),m.jsxs("div",{className:"form-actions",children:[m.jsxs("button",{type:"submit",className:"btn",title:"Add Tip","aria-label":"add",children:[m.jsx(f9,{})," Add Tip"]}),m.jsxs("button",{type:"button",className:"btn secondary",onClick:()=>he("/"),children:[m.jsx(vv,{})," Back"]})]})]}),M&&m.jsx(Il,{})]})}function IF(){const[t,e]=A.useState(""),[n,r]=A.useState(""),[i,a]=A.useState(""),[u,d]=A.useState(""),[f,p]=A.useState(""),[w,E]=A.useState(""),[T,b]=A.useState(""),[I,L]=A.useState(!1),[V,U]=A.useState("1X2"),[M,Q]=A.useState(""),[te,he]=A.useState(!1),ae=Zi(Js),[D,R]=A.useState(null),x=vs(),k=le=>{U(le.target.value)},F=zt();A.useEffect(()=>{R(F.state)},[F]);const B=le=>{le.preventDefault();const qe=new Date(w),Xe=new Intl.DateTimeFormat("en-US").format(qe),de=qe.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});r9(D.id,{home:t,away:n,odd:i,pick:u,status:f,won:T,premium:I,type:V,results:M,date:Xe,time:de},ae,he,R)},P=(le,qe)=>{const[Xe,de,re]=le.split("/").map(X=>parseInt(X,10)),ge=new Date(re,Xe-1,de),ee=ge.getFullYear(),j=String(ge.getMonth()+1).padStart(2,"0"),N=String(ge.getDate()).padStart(2,"0");return`${ee}-${j}-${N}T${qe}`};return A.useEffect(()=>{if(D){e(D.home),r(D.away),a(D.odd),d(D.pick),p(D.status),Q(D.results),b(D.won),L(D.premium),U(D.type);const le=P(D.date,D.time);E(le)}},[D]),m.jsxs("div",{className:"admin-tips",children:[m.jsx(Ss,{title:"Edit Tip"}),m.jsx(Es,{}),m.jsx("h1",{children:"Update Tip"}),!te&&m.jsxs("form",{onSubmit:B,children:[m.jsxs("div",{className:"input-container vertical",children:[m.jsx("label",{htmlFor:"home",children:"Home Team"}),m.jsx("input",{type:"text",placeholder:"home",id:"home",value:t,onChange:le=>e(le.target.value),required:!0})]}),m.jsxs("div",{className:"input-container vertical",children:[m.jsx("label",{htmlFor:"away",children:"Away Team"}),m.jsx("input",{type:"text",placeholder:"away",id:"away",value:n,onChange:le=>r(le.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"odds",children:"Odds"}),m.jsx("input",{type:"text",placeholder:"odds",id:"odds",value:i,onChange:le=>a(le.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"pick",children:"Pick"}),m.jsx("input",{type:"text",placeholder:"pick",id:"pick",value:u,onChange:le=>d(le.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"status",children:"Status"}),m.jsx("input",{type:"text",placeholder:"Finish / Pending / Live",id:"status",value:f,onChange:le=>p(le.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"time",children:"Date & Time"}),m.jsx("input",{type:"datetime-local",id:"time",value:w,onChange:le=>E(le.target.value),required:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"results",children:"Results"}),m.jsx("input",{type:"text",placeholder:"results",id:"results",value:M,onChange:le=>Q(le.target.value)})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"won",children:"Is Won"}),m.jsx("input",{type:"text",placeholder:"won / pending / lost",id:"won",value:T,onChange:le=>b(le.target.value),required:!0})]}),m.jsx("div",{className:"input-container",children:m.jsxs("label",{className:"checkbox-label",children:[m.jsx("input",{type:"checkbox",id:"premium",onChange:le=>L(le.target.checked),checked:I}),"Premium Tip"]})}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{children:"Select Type"}),m.jsxs("div",{className:"radio-group",children:[m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"1X2",checked:V==="1X2",onCh
3178ange:k}),"WDW (1X2)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"CS",checked:V==="CS",onChange:k}),"Goals (CS)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"GG",checked:V==="GG",onChange:k}),"BTTS (GG/NG)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"OV_UN",checked:V==="OV_UN",onChange:k}),"Total (OV/UN)"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"DC",checked:V==="DC",onChange:k}),"DC 1X2"]})]})]}),m.jsxs("div",{className:"form-actions",children:[m.jsxs("button",{type:"submit",className:"btn",title:"Submit","aria-label":"add",children:[m.jsx(p9,{})," Update"]}),m.jsxs("button",{type:"button",className:"btn secondary",onClick:()=>x("/"),children:[m.jsx(vv,{})," Done"]})]})]}),te&&m.jsx(Il,{})]})}const CF=({user:t})=>{function e(r){if(!r)return"Not subscribed";const i=new Date(r);if(isNaN(i.getTime()))return"Invalid date";let a=i.getDate();return`${a}${(d=>{if(d>3&&d<21)return"th";switch(d%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(a)} ${i.toLocaleString("en-GB",{month:"long",year:"numeric"})}`}const n=(t.username||t.email||"U").split(/[@\s]+/).map(r=>r[0]).join("").slice(0,2).toUpperCase();return m.jsxs(vt,{className:"user-card",to:`/users/${t.email}`,state:t,children:[m.jsxs("div",{className:"user-card-top",children:[m.jsx("div",{className:`user-badge ${t.isPremium?"premium":"free"}`,children:t.isPremium?"VIP":"Free"}),m.jsx("span",{className:"plan-badge",children:t.locality&&m.jsxs(m.Fragment,{children:[m.jsx(eF,{className:"badge-icon"}),t.locality.city,", ",t.locality.region]})})]}),m.jsxs("div",{className:"user-card-body",children:[m.jsx("div",{className:"user-avatar",children:m.jsx("span",{children:n})}),m.jsxs("div",{className:"user-details",children:[m.jsxs("div",{className:"user-name",children:[m.jsxs("div",{children:[m.jsx(lF,{className:"detail-icon"}),m.jsx("span",{children:t.username||"No username"})]}),t.visitedWebsites&&(()=>{const r=Object.entries(t.visitedWebsites).find(([d,f])=>f&&f.device),i=r?r[1]:null,a=i?i.device:null,u=a&&typeof a=="object"?(a.device||a.type||"").toLowerCase():"";if(u)switch(u){case"ios":case"mac":return m.jsx(AD,{className:"detail-icon"});case"android":return m.jsx(Z9,{className:"detail-icon"});case"windows":return m.jsx(ND,{className:"detail-icon"});case"linux":return m.jsx(xD,{});default:return m.jsx(kD,{className:"detail-icon"})}return null})()]}),m.jsxs("div",{className:"user-email",children:[m.jsx(oF,{className:"detail-icon"}),m.jsx("span",{children:t.email})]}),m.jsxs("div",{className:"user-plan",children:["Plan: ",t.subscription&&t.subscription.plan||"None"]}),m.jsx("div",{className:"user-sub-date",children:t.subscription&&t.subscription.subDate?e(t.subscription.subDate):"Never subscribed"})]})]})]})},RF=["[email protected]","[email protected]","[email protected]"];function AF(){const[t,e]=A.useState(!0),[n,r]=A.useState([]),i=gl(br),a=vs(),[u,d]=A.useState(!1),[f,p]=A.useState("All"),[w,E]=A.useState("");A.useEffect(()=>{i&&RF.includes(i.email)?d(!0):d(!1)},[i]),A.useEffect(()=>{},[u,a]),A.useEffect(()=>{u&&e9(r,e)},[u]);const T=A.useMemo(()=>(n&&n.length>0&&n.forEach(I=>{if(!I.email)return;const L=Kr(ur,"users",I.email);I.isPremium&&(I.subscription==null||I.subscription=="")&&bl(L,{isPremium:!1,subscription:null})}),n.filter(I=>{const L=f==="All"||f==="Free"&&!I.isPremium||f==="Premium"&&I.isPremium||f==="withLocality"&&I.locality,V=w===""||I.username&&I.username.toLowerCase().includes(w.toLowerCase())||I.email&&I.email.toLowerCase().includes(w.toLowerCase());return L&&V})),[n,f,w]),b=A.useMemo(()=>({total:n.length,premium:n.filter(I=>I.isPremium).length,free:n.filter(I=>!I.isPremium).length}),[n]);return m.jsxs("div",{className:"list-users",children:[t&&m.jsx(Il,{}),m.jsxs("div",{className:"list-users-header",children:[m.jsx("h2",{className:"section-title",children:"All Users"}),m.jsx("p",{className:"section-subtitle",children:"Manage and view all registered users"})]}),m.jsxs("div",{className:"stats-bar",children:[m.jsxs("div",{className:"stat-item",children:[m.jsx(w9,{}),m.jsx("span",{className:"stat-value",children:b.total}),m.jsx("span",{className:"stat-label",children:"Total"})]}),m.jsxs("div",{className:"stat-item",children:[m.jsx("span",{className:"stat-value",children:b.premium}),m.jsx("span",{className:"stat-label",children:"Premium"})]}),m.jsxs("div",{className:"stat-item",children:[m.jsx("span",{className:"stat-value",children:b.free}),m.jsx("span",{className:"stat-label",children:"Free"})]})]}),m.jsxs("div",{className:"users-toolbar",children:[m.jsxs("div",{className:"search-box",children:[m.jsx(m9,{className:"search-icon"}),m.jsx("input",{type:"search",placeholder:"Search by username, email...",value:w,onChange:I=>E(I.target.value)})]}),n.length>0&&m.jsxs("select",{onChange:I=>p(I.target.value),value:f,className:"filter-select",children:[m.jsx("option",{value:"All",children:"All Users"}),m.jsx("option",{value:"Free",children:"Free Users"}),m.jsx("option",{value:"Premium",children:"Premium Users"}),m.jsx("option",{value:"withLocality",children:"With Locality"})]})]}),m.jsx("div",{className:"users-grid",children:T.length>0?T.map(I=>m.jsx(CF,{user:I},I.email)):!t&&m.jsx("div",{className:"no-results",children:"No users found matching your criteria"})})]})}function kF(){const t=zt(),[e,n]=A.useState(null),[r,i]=A.useState(!1),a=Zi(Js),[u,d]=A.useState(""),[f,p]=A.useState(""),[w,E]=A.useState(""),[T,b]=A.useState(""),[I,L]=A.useState(!1);function V(M){const Q=new Date(M),te=Q.getFullYear(),he=String(Q.getMonth()+1).padStart(2,"0"),ae=String(Q.getDate()).padStart(2,"0"),D=String(Q.getHours()).padStart(2,"0"),R=String(Q.getMinutes()).padStart(2,"0");return`${te}-${he}-${ae}T${D}:${R}`}A.useEffect(()=>{e&&(p(e.email),d(e.username),L(e.isPremium),e.subscription?E(e.subscription.plan):E("Free"),e.subscription&&e.subscription.subDate&&b(V(e.subscription.subDate)))},[e]),A.useEffect(()=>{n(t.state)},[t]),A.useEffect(()=>{L(w!=="Free")},[w]);const U=M=>{M.preventDefault(),i(!0);const Q=Kr(ur,"users",e.id);bl(Q,{isPremium:I,subscription:!I||w==="Free"?null:{billing:w==="Free"?"":w==="Daily"?"Day":w.slice(0,-2),plan:w==="Free"?"":w,subDate:T}}).then(te=>{a({isVisible:!0,type:"success",message:"User Updated "+te}),i(!1)}).catch(te=>{a({isVisible:!0,type:"error",message:te.message}),i(!1)})};return m.jsxs("div",{className:"admin-tips",children:[m.jsx(Ss,{title:"Edit User"}),m.jsx(Es,{}),m.jsx("h1",{children:"Update User"}),r&&m.jsx(Il,{}),!r&&m.jsxs("form",{onSubmit:U,children:[m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"username",children:"Username: "}),m.jsx("input",{type:"text",placeholder:"@someone",id:"username",value:u,onChange:M=>d(M.target.value)})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"email",children:"Email:"}),m.jsx("input",{type:"text",placeholder:"[email protected]",id:"email",value:f,onChange:M=>p(M.target.value),readOnly:!0})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"subscription",children:"Subscription:"}),m.jsx("input",{type:"text",placeholder:"subscription",id:"subscription",value:w,onChange:M=>E(M.target.value)}),m.jsxs("div",{className:"radio-group",children:[m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"Free",checked:w==="Free",onCh
3178ange:M=>E(M.target.value)}),"Free"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"Daily",checked:w==="Daily",onChange:M=>E(M.target.value)}),"Daily"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"Weekly",checked:w==="Weekly",onChange:M=>E(M.target.value)}),"Weekly"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"Monthly",checked:w==="Monthly",onChange:M=>E(M.target.value)}),"Monthly"]}),m.jsxs("label",{className:"radio-label",children:[m.jsx("input",{type:"radio",name:"games-type",value:"Yearly",checked:w==="Yearly",onChange:M=>E(M.target.value)}),"Yearly"]})]})]}),m.jsxs("div",{className:"input-container",children:[m.jsx("label",{htmlFor:"subDate",children:"Subscribed On: "}),m.jsx("input",{type:"datetime-local",id:"subDate",value:T,onChange:M=>b(M.target.value)})]}),m.jsxs("div",{className:"input-container",style:{display:"none"},children:[m.jsx("label",{htmlFor:"premium",children:"Is premium"}),m.jsx("input",{type:"checkbox",placeholder:"premium",id:"premium",onChange:M=>L(M.target.checked),checked:I})]}),m.jsxs("span",{style:{width:"100%",display:"flex",alignItems:"items",justifyContent:"space-evenly"},children:[m.jsx("button",{type:"submit",className:"btn",title:"Submit","aria-label":"add",children:"Update"}),m.jsx("span",{className:"btn",onClick:()=>window.history.back(),children:"DONE"})]})]})]})}const xF=({children:t})=>{const e=gl(br),n=zt();return e?t:m.jsx(VR,{to:"/login",state:{from:n},replace:!0})},o2=({children:t})=>{const e=gl(br),n=vs(),r=zt();return A.useEffect(()=>{var i;if(e){const a=((i=r.state)==null?void 0:i.from)||"/";n(a,{replace:!0})}},[e,n,r]),e?null:t},sh=({children:t})=>{const e=gl(br),n=vs(),r=zt();return A.useEffect(()=>{var i;if(!e||!["[email protected]","[email protected]","[email protected]"].includes(e.email)){const a=((i=r.state)==null?void 0:i.from)||"/";n(a,{replace:!0})}},[e,n,r]),!e||!["[email protected]","[email protected]","[email protected]"].includes(e.email)?null:t},PF=(t,e)=>{if(!t||!t.isPremium)return;const n=new Date,r=new Date(t.subscription.subDate);if(t.subscription.billing==="Day"){const u=new Date(n.getFullYear(),n.getMonth(),n.getDate()),d=new Date(r.getFullYear(),r.getMonth(),r.getDate());u>d&&Gg(t.email,!1,null,e);return}const i=n-r,a={Weeky:7*24*60*60*1e3,Monthy:30*24*60*60*1e3,Yeary:365*24*60*60*1e3};i>=a[t.subscription.billing]&&Gg(t.email,!1,null,e)},NF=(t,e)=>{if(!(!t||t.locality)&&!t.locality){J6(t.email,e);return}};function LF(){const t=navigator.userAgent,e=/iPad|iPhone|iPod/.test(t)&&!window.MSStream,n=/Android/.test(t),r=/Windows/.test(t),i=/Macintosh/.test(t),a=/Linux/.test(t);return{isIOS:e,isAndroid:n,isWindows:r,isMac:i,isLinux:a,isMobile:e||n}}function DF(){const t=LF();return t.isIOS?"ios":t.isAndroid?"android":t.isWindows?"windows":t.isMac?"mac":"pwa"}/*!
3179 * react-paypal-js v8.9.2 (2025-10-02T20:17:55.069Z)
3180 * Copyright 2020-present, PayPal, Inc. All rights reserved.
3181 *
3182 * Licensed under the Apache License, Version 2.0 (the "License");
3183 * you may not use this file except in compliance with the License.
3184 * You may obtain a copy of the License at
3185 *
3186 * https://www.apache.org/licenses/LICENSE-2.0
3187 *
3188 * Unless required by applicable law or agreed to in writing, software
3189 * distributed under the License is distributed on an "AS IS" BASIS,
3190 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3191 * See the License for the specific language governing permissions and
3192 * limitations under the License.
3193 */var Gn;(function(t){t.INITIAL="initial",t.PENDING="pending",t.REJECTED="rejected",t.RESOLVED="resolved"})(Gn||(Gn={}));var zi;(function(t){t.LOADING_STATUS="setLoadingStatus",t.RESET_OPTIONS="resetOptions",t.SET_BRAINTREE_INSTANCE="braintreeInstance"})(zi||(zi={}));var a2;(function(t){t.NUMBER="number",t.CVV="cvv",t.EXPIRATION_DATE="expirationDate",t.EXPIRATION_MONTH="expirationMonth",t.EXPIRATION_YEAR="expirationYear",t.POSTAL_CODE="postalCode"})(a2||(a2={}));var Kt=function(){return Kt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Kt.apply(this,arguments)};function Ob(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 l2(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;
3193r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var Xu="data-react-paypal-script-id",Do={DATA_CLIENT_TOKEN:"dataClientToken",DATA_JS_SDK_LIBRARY:"dataJsSdkLibrary",DATA_LIBRARY_VALUE:"react-paypal-js",DATA_NAMESPACE:"dataNamespace",DATA_SDK_INTEGRATION_SOURCE:"dataSdkIntegrationSource",DATA_USER_ID_TOKEN:"dataUserIdToken"},OF="Failed to load the PayPal JS SDK script.",Vb="paypal",VF="usePayPalScriptReducer must be used within a PayPalScriptProvider";function MF(t){return t===void 0&&(t=Vb),window[t]}function jF(t){for(var e="",n=0;n<t.length;n++){var r=t[n].charCodeAt(0)*n;t[n+1]&&(r+=t[n+1].charCodeAt(0)*(n-1)),e+=String.fromCharCode(97+Math.abs(r)%26)}return e}function FF(t){var e=t.reactComponentName,n=t.sdkComponentKey,r=t.sdkRequestedComponents,i=r===void 0?"":r,a=t.sdkDataNamespace,u=a===void 0?Vb:a,d=n.charAt(0).toUpperCase().concat(n.substring(1)),f="Unable to render <".concat(e," /> because window.").concat(u,".").concat(d," is undefined."),p=typeof i=="string"?i:i.join(",");if(!p.includes(n)){var w=[p,n].filter(Boolean).join();f+=`
3194To fix the issue, add '`.concat(n,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(w,"'}}>`.")}return f}function Mb(t){var e=t,n=Xu;e[n];var r=Ob(e,[n+""]);return"react-paypal-js-".concat(jF(JSON.stringify(r)))}function UF(t){var e=self.document.querySelector("script[".concat(Xu,'="').concat(t,'"]'));e!=null&&e.parentNode&&e.parentNode.removeChild(e)}function $F(t,e){var n,r;switch(e.type){case zi.LOADING_STATUS:return typeof e.value=="object"?Kt(Kt({},t),{loadingStatus:e.value.state,loadingStatusErrorMessage:e.value.message}):Kt(Kt({},t),{loadingStatus:e.value});case zi.RESET_OPTIONS:return UF(t.options[Xu]),Kt(Kt({},t),{loadingStatus:Gn.PENDING,options:Kt(Kt((n={},n[Do.DATA_SDK_INTEGRATION_SOURCE]=Do.DATA_LIBRARY_VALUE,n),e.value),(r={},r[Xu]="".concat(Mb(e.value)),r))});case zi.SET_BRAINTREE_INSTANCE:return Kt(Kt({},t),{braintreePayPalCheckoutInstance:e.value});default:return t}}var jb=A.createContext(null);function BF(t){if(typeof(t==null?void 0:t.dispatch)=="function"&&t.dispatch.length!==0)return t;throw new Error(VF)}function zF(){var t=BF(A.useContext(jb)),e=Kt(Kt({},t),{isInitial:t.loadingStatus===Gn.INITIAL,isPending:t.loadingStatus===Gn.PENDING,isResolved:t.loadingStatus===Gn.RESOLVED,isRejected:t.loadingStatus===Gn.REJECTED});return[e,t.dispatch]}A.createContext({});function HF(t){var e=A.useRef(new Proxy({},{get:function(n,r,i){return typeof n[r]=="function"?function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n[r].apply(n,a)}:Reflect.get(n,r,i)}}));return e.current=Object.assign(e.current,t),e.current}var Iv=function(t){var e,n=t.className,r=n===void 0?"":n,i=t.disabled,a=i===void 0?!1:i,u=t.children,d=t.forceReRender,f=d===void 0?[]:d,p=Ob(t,["className","disabled","children","forceReRender"]),w=a?{opacity:.38}:{},E="".concat(r," ").concat(a?"paypal-buttons-disabled":"").trim(),T=A.useRef(null),b=A.useRef(null),I=HF(p),L=zF()[0],V=L.isResolved,U=L.options,M=A.useState(null),Q=M[0],te=M[1],he=A.useState(!0),ae=he[0],D=he[1],R=A.useState(null),x=R[1];function k(){b.current!==null&&b.current.close().catch(function(){})}return!((e=b.current)===null||e===void 0)&&e.updateProps&&b.current.updateProps({message:p.message}),A.useEffect(function(){if(V===!1)return k;var F=MF(U.dataNamespace);if(F===void 0||F.Buttons===void 0)return x(function(){throw new Error(FF({reactComponentName:Iv.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:U.components,sdkDataNamespace:U[Do.DATA_NAMESPACE]}))}),k;var B=function(P,le){te(le),typeof p.onInit=="function"&&p.onInit(P,le)};try{b.current=F.Buttons(Kt(Kt({},I),{onInit:B}))}catch(P){return x(function(){throw new Error("Failed to render <PayPalButtons /> component. Failed to initialize:  ".concat(P))})}return b.current.isEligible()===!1?(D(!1),k):(T.current&&b.current.render(T.current).catch(function(P){T.current===null||T.current.children.length===0||x(function(){throw new Error("Failed to render <PayPalButtons /> component. ".concat(P))})}),k)},l2(l2([V],f,!0),[p.fundingSource],!1)),A.useEffect(function(){Q!==null&&(a===!0?Q.disable().catch(function(){}):Q.enable().catch(function(){}))},[a,Q]),Ke.createElement(Ke.Fragment,null,ae?Ke.createElement("div",{ref:T,style:w,className:E}):u)};Iv.displayName="PayPalButtons";function WF(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 qF(t,e){var n=document.querySelector('script[src="'.concat(t,'"]'));if(n===null)return null;var r=Fb(t,e),i=n.cloneNode();if(delete i.dataset.uidAuto,Object.keys(i.dataset).length!==Object.keys(r.dataset).length)return null;var a=!0;return Object.keys(i.dataset).forEach(function(u){i.dataset[u]!==r.dataset[u]&&(a=!1)}),a?n:null}function GF(t){var e=t.url,n=t.attributes,r=t.onSuccess,i=t.onError,a=Fb(e,n);a.onerror=i,a.onload=r,document.head.insertBefore(a,document.head.firstElementChild)}function KF(t){var e=t.sdkBaseUrl,n=t.environment,r=WF(t,["sdkBaseUrl","environment"]),i=e||XF(n),a=r,u=Object.keys(a).filter(function(p){return typeof a[p]<"u"&&a[p]!==null&&a[p]!==""}).reduce(function(p,w){var E=a[w].toString();return w=QF(w),w.substring(0,4)==="data"||w==="crossorigin"?p.attributes[w]=E:p.queryParams[w]=E,p},{queryParams:{},attributes:{}}),d=u.queryParams,f=u.attributes;return d["merchant-id"]&&d["merchant-id"].indexOf(",")!==-1&&(f["data-merchant-id"]=d["merchant-id"],d["merchant-id"]="*"),{url:"".concat(i,"?").concat(YF(d)),attributes:f}}function QF(t){var e=function(n,r){return(r?"-":"")+n.toLowerCase()};return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,e)}function YF(t){var e="";return Object.keys(t).forEach(function(n){e.length!==0&&(e+="&"),e+=n+"="+t[n]}),e}function XF(t){return t==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function Fb(t,e){e===void 0&&(e={});var n=document.createElement("script");return n.src=t,Object.keys(e).forEach(function(r){n.setAttribute(r,e[r]),r==="data-csp-nonce"&&n.setAttribute("nonce",e["data-csp-nonce"])}),n}function JF(t,e){if(e===void 0&&(e=Promise),Ub(t,e),typeof document>"u")return e.resolve(null);var n=KF(t),r=n.url,i=n.attributes,a=i["data-namespace"]||"paypal",u=u2(a);return i["data-js-sdk-library"]||(i["data-js-sdk-library"]="paypal-js"),qF(r,i)&&u?e.resolve(u):ZF({url:r,attributes:i},e).then(function(){var d=u2(a);if(d)return d;throw new Error("The window.".concat(a," global variable is not available."))})}function ZF(t,e){e===void 0&&(e=Promise),Ub(t,e);var n=t.url,r=t.attributes;
3194if(typeof n!="string"||n.length===0)throw new Error("Invalid url.");if(typeof r<"u"&&typeof r!="object")throw new Error("Expected attributes to be an object.");return new e(function(i,a){if(typeof document>"u")return i();GF({url:n,attributes:r,onSuccess:function(){return i()},onError:function(){var u=new Error('The script "'.concat(n,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return a(u)}})})}function u2(t){return window[t]}function Ub(t,e){if(typeof t!="object"||t===null)throw new Error("Expected an options object.");var n=t.environment;if(n&&n!=="production"&&n!=="sandbox")throw new Error('The `environment` option must be either "production" or "sandbox".');if(typeof e<"u"&&typeof e!="function")throw new Error("Expected PromisePonyfill to be a function.")}var eU=function(t){var e,n=t.options,r=n===void 0?{clientId:"test"}:n,i=t.children,a=t.deferLoading,u=a===void 0?!1:a,d=A.useReducer($F,{options:Kt(Kt({},r),(e={},e[Do.DATA_JS_SDK_LIBRARY]=Do.DATA_LIBRARY_VALUE,e[Do.DATA_SDK_INTEGRATION_SOURCE]=Do.DATA_LIBRARY_VALUE,e[Xu]="".concat(Mb(r)),e)),loadingStatus:u?Gn.INITIAL:Gn.PENDING}),f=d[0],p=d[1];return A.useEffect(function(){if(u===!1&&f.loadingStatus===Gn.INITIAL)return p({type:zi.LOADING_STATUS,value:Gn.PENDING});if(f.loadingStatus===Gn.PENDING){var w=!0;return JF(f.options).then(function(){w&&p({type:zi.LOADING_STATUS,value:Gn.RESOLVED})}).catch(function(E){console.error("".concat(OF," ").concat(E)),w&&p({type:zi.LOADING_STATUS,value:{state:Gn.REJECTED,message:String(E)}})}),function(){w=!1}}},[f.options,u,f.loadingStatus]),Ke.createElement(jb.Provider,{value:Kt(Kt({},f),{dispatch:p})},i)};function c2(){}A.createContext({cardFieldsForm:null,fields:{},registerField:c2,unregisterField:c2});/*!
3195* sweetalert2 v11.26.25
3196* Released under the MIT License.
3197*/function $b(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function tU(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d2(t,e){return t.get($b(t,e))}function nU(t,e,n){tU(t,e),e.set(t,n)}function rU(t,e,n){return t.set($b(t,e),n),n}const sU=100,De={},iU=()=>{De.previousActiveElement instanceof HTMLElement?(De.previousActiveElement.focus(),De.previousActiveElement=null):document.body&&document.body.focus()},oU=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,r=window.scrollY;De.restoreFocusTimeout=setTimeout(()=>{iU(),e()},sU),window.scrollTo(n,r)}),Bb="swal2-",aU=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"],Z=aU.reduce((t,e)=>(t[e]=Bb+e,t),{}),lU=["success","warning","info","question","error"],Jh=lU.reduce((t,e)=>(t[e]=Bb+e,t),{}),zb="SweetAlert2:",Cv=t=>t.charAt(0).toUpperCase()+t.slice(1),On=t=>{console.warn(`${zb} ${typeof t=="object"?t.join(" "):t}`)},Qo=t=>{console.error(`${zb} ${t}`)},h2=[],uU=t=>{h2.includes(t)||(h2.push(t),On(t))},Hb=(t,e=null)=>{uU(`"${t}" is deprecated and will be removed in the next major release.${e?` Use "${e}" instead.`:""}`)},Zf=t=>typeof t=="function"?t():t,Rv=t=>t&&typeof t.toPromise=="function",bc=t=>Rv(t)?t.toPromise():Promise.resolve(t),Av=t=>t&&Promise.resolve(t)===t,cU=()=>navigator.userAgent.includes("Firefox"),Vn=()=>document.body.querySelector(`.${Z.container}`),Ic=t=>{const e=Vn();return e?e.querySelector(t):null},cr=t=>Ic(`.${t}`),ct=()=>cr(Z.popup),Cl=()=>cr(Z.icon),dU=()=>cr(Z["icon-content"]),Wb=()=>cr(Z.title),kv=()=>cr(Z["html-container"]),qb=()=>cr(Z.image),xv=()=>cr(Z["progress-steps"]),ep=()=>cr(Z["validation-message"]),gs=()=>Ic(`.${Z.actions} .${Z.confirm}`),Rl=()=>Ic(`.${Z.actions} .${Z.cancel}`),Yo=()=>Ic(`.${Z.actions} .${Z.deny}`),hU=()=>cr(Z["input-label"]),Al=()=>Ic(`.${Z.loader}`),Cc=()=>cr(Z.actions),Gb=()=>cr(Z.footer),tp=()=>cr(Z["timer-progress-bar"]),Pv=()=>cr(Z.close),fU=`
3198  a[href],
3199  area[href],
3200  input:not([disabled]),
3201  select:not([disabled]),
3202  textarea:not([disabled]),
3203  button:not([disabled]),
3204  iframe,
3205  object,
3206  embed,
3207  [tabindex="0"],
3208  [contenteditable],
3209  audio[controls],
3210  video[controls],
3211  summary
3212`,Nv=()=>{const t=ct();if(!t)return[];
3212const e=t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(e).sort((a,u)=>{const d=parseInt(a.getAttribute("tabindex")||"0"),f=parseInt(u.getAttribute("tabindex")||"0");return d>f?1:d<f?-1:0}),r=t.querySelectorAll(fU),i=Array.from(r).filter(a=>a.getAttribute("tabindex")!=="-1");return[...new Set(n.concat(i))].filter(a=>Yn(a))},Lv=()=>Ws(document.body,Z.shown)&&!Ws(document.body,Z["toast-shown"])&&!Ws(document.body,Z["no-backdrop"]),np=()=>{const t=ct();return t?Ws(t,Z.toast):!1},pU=()=>{const t=ct();return t?t.hasAttribute("data-loading"):!1},dr=(t,e)=>{if(t.textContent="",e){const r=new DOMParser().parseFromString(e,"text/html"),i=r.querySelector("head");i&&Array.from(i.childNodes).forEach(u=>{t.appendChild(u)});const a=r.querySelector("body");a&&Array.from(a.childNodes).forEach(u=>{u instanceof HTMLVideoElement||u instanceof HTMLAudioElement?t.appendChild(u.cloneNode(!0)):t.appendChild(u)})}},Ws=(t,e)=>e?e.split(/\s+/).every(n=>t.classList.contains(n)):!1,mU=(t,e)=>{Array.from(t.classList).forEach(n=>{!Object.values(Z).includes(n)&&!Object.values(Jh).includes(n)&&!Object.values(e.showClass||{}).includes(n)&&t.classList.remove(n)})},lr=(t,e,n)=>{if(mU(t,e),!e.customClass)return;const r=e.customClass[n];if(r){if(typeof r!="string"&&!r.forEach){On(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`);return}ut(t,r)}},rp=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${Z.popup} > .${Z[e]}`);case"checkbox":return t.querySelector(`.${Z.popup} > .${Z.checkbox} input`);case"radio":return t.querySelector(`.${Z.popup} > .${Z.radio} input:checked`)||t.querySelector(`.${Z.popup} > .${Z.radio} input:first-child`);case"range":return t.querySelector(`.${Z.popup} > .${Z.range} input`);default:return t.querySelector(`.${Z.popup} > .${Z.input}`)}},Kb=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Qb=(t,e,n)=>{if(!t||!e)return;const r=typeof e=="string"?e.split(/\s+/).filter(Boolean):e;(Array.isArray(t)?t:[t]).forEach(a=>{r.forEach(u=>{n?a.classList.add(u):a.classList.remove(u)})})},ut=(t,e)=>{Qb(t,e,!0)},Tr=(t,e)=>{Qb(t,e,!1)},Vi=(t,e)=>Array.from(t.children).find(n=>n instanceof HTMLElement&&Ws(n,e)),Mo=(t,e,n)=>{n===`${parseInt(`${n}`)}`&&(n=parseInt(n)),n||n===0?t.style.setProperty(e,typeof n=="number"?`${n}px`:n):t.style.removeProperty(e)},dn=(t,e="flex")=>{t&&(t.style.display=e)},kn=t=>{t&&(t.style.display="none")},Dv=(t,e="block")=>{t&&new MutationObserver(()=>{Rc(t,t.innerHTML,e)}).observe(t,{childList:!0,subtree:!0})},f2=(t,e,n,r)=>{const i=t.querySelector(e);i&&i.style.setProperty(n,r)},Rc=(t,e,n="flex")=>{e?dn(t,n):kn(t)},Yn=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),gU=()=>!Yn(gs())&&!Yn(Yo())&&!Yn(Rl()),Jg=t=>t.scrollHeight>t.clientHeight,yU=(t,e)=>{let n=t;for(;n&&n!==e;){if(Jg(n))return!0;n=n.parentElement}return!1},Yb=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),r=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||r>0},Ov=(t,e=!1)=>{const n=tp();n&&Yn(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},vU=()=>{const t=tp();if(!t)return;const e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),r=e/n*100;t.style.width=`${r}%`},wU=()=>typeof window>"u"||typeof document>"u",_U=`
3213 <div aria-labelledby="${Z.title}" aria-describedby="${Z["html-container"]}" class="${Z.popup}" tabindex="-1">
3214   <button type="button" class="${Z.close}"></button>
3215   <ul class="${Z["progress-steps"]}"></ul>
3216   <div class="${Z.icon}"></div>
3217   <img class="${Z.image}" />
3218   <h2 class="${Z.title}" id="${Z.title}"></h2>
3219   <div class="${Z["html-container"]}" id="${Z["html-container"]}"></div>
3220   <input class="${Z.input}" id="${Z.input}" />
3221   <input type="file" class="${Z.file}" />
3222   <div class="${Z.range}">
3223     <input type="range" />
3224     <output></output>
3225   </div>
3226   <select class="${Z.select}" id="${Z.select}"></select>
3227   <div class="${Z.radio}"></div>
3228   <label class="${Z.checkbox}">
3229     <input type="checkbox" id="${Z.checkbox}" />
3230     <span class="${Z.label}"></span>
3231   </label>
3232   <textarea class="${Z.textarea}" id="${Z.textarea}"></textarea>
3233   <div class="${Z["validation-message"]}" id="${Z["validation-message"]}"></div>
3234   <div class="${Z.actions}">
3235     <div class="${Z.loader}"></div>
3236     <button type="button" class="${Z.confirm}"></button>
3237     <button type="button" class="${Z.deny}"></button>
3238     <button type="button" class="${Z.cancel}"></button>
3239   </div>
3240   <div class="${Z.footer}"></div>
3241   <div class="${Z["timer-progress-bar-container"]}">
3242     <div class="${Z["timer-progress-bar"]}"></div>
3243   </div>
3244 </div>
3245`.replace(/(^|\n)\s*/g,""),EU=()=>{const t=Vn();return t?(t.remove(),Tr([document.documentElement,document.body],[Z["no-backdrop"],Z["toast-shown"],Z["has-column"]]),!0):!1},xo=()=>{De.currentInstance&&De.currentInstance.resetValidationMessage()},SU=()=>{const t=ct();if(!t)return;const e=Vi(t,Z.input),n=Vi(t,Z.file),r=t.querySelector(`.${Z.range} input`),i=t.querySelector(`.${Z.range} output`),a=Vi(t,Z.select),u=t.querySelector(`.${Z.checkbox} input`),d=Vi(t,Z.textarea);e&&(e.oninput=xo),n&&(n.onchange=xo),a&&(a.onchange=xo),u&&(u.onchange=xo),d&&(
3245d.oninput=xo),r&&i&&(r.oninput=()=>{xo(),i.value=r.value},r.onchange=()=>{xo(),i.value=r.value})},TU=t=>{if(typeof t=="string"){const e=document.querySelector(t);if(!e)throw new Error(`Target element "${t}" not found`);return e}return t},bU=t=>{const e=ct();e&&(e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true"))},IU=t=>{window.getComputedStyle(t).direction==="rtl"&&(ut(Vn(),Z.rtl),De.isRTL=!0)},CU=t=>{const e=EU();if(wU()){Qo("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=Z.container,e&&ut(n,Z["no-transition"]),dr(n,_U),n.dataset.swal2Theme=t.theme;const r=TU(t.target||"body");r.appendChild(n),t.topLayer&&(n.setAttribute("popover",""),n.showPopover()),bU(t),IU(r),SU()},Vv=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?RU(t,e):t&&dr(e,t)},RU=(t,e)=>{"jquery"in t?AU(e,t):dr(e,t.toString())},AU=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},kU=(t,e)=>{const n=Cc(),r=Al();!n||!r||(!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?kn(n):dn(n),lr(n,e,"actions"),xU(n,r,e),dr(r,e.loaderHtml||""),lr(r,e,"loader"))};function xU(t,e,n){const r=gs(),i=Yo(),a=Rl();!r||!i||!a||(lg(r,"confirm",n),lg(i,"deny",n),lg(a,"cancel",n),PU(r,i,a,n),n.reverseButtons&&(n.toast?(t.insertBefore(a,r),t.insertBefore(i,r)):(t.insertBefore(a,e),t.insertBefore(i,e),t.insertBefore(r,e))))}function PU(t,e,n,r){if(!r.buttonsStyling){Tr([t,e,n],Z.styled);return}ut([t,e,n],Z.styled),[[t,"confirm",r.confirmButtonColor],[e,"deny",r.denyButtonColor],[n,"cancel",r.cancelButtonColor]].forEach(([a,u,d])=>{d&&a.style.setProperty(`--swal2-${u}-button-background-color`,d),NU(a)})}function NU(t){const e=window.getComputedStyle(t);if(e.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const n=e.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");t.style.setProperty("--swal2-action-button-focus-box-shadow",e.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${n}`))}function lg(t,e,n){const r=Cv(e);Rc(t,n[`show${r}Button`],"inline-block"),dr(t,n[`${e}ButtonText`]||""),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]||""),t.className=Z[e],lr(t,n,`${e}Button`)}const LU=(t,e)=>{const n=Pv();n&&(dr(n,e.closeButtonHtml||""),lr(n,e,"closeButton"),Rc(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))},DU=(t,e)=>{const n=Vn();n&&(OU(n,e.backdrop),VU(n,e.position),MU(n,e.grow),lr(n,e,"container"))};function OU(t,e){typeof e=="string"?t.style.background=e:e||ut([document.documentElement,document.body],Z["no-backdrop"])}function VU(t,e){e&&(e in Z?ut(t,Z[e]):(On('The "position" parameter is not valid, defaulting to "center"'),ut(t,Z.center)))}function MU(t,e){e&&ut(t,Z[`grow-${e}`])}var mt={innerParams:new WeakMap,domCache:new WeakMap,focusedElement:new WeakMap};const jU=["input","file","range","select","radio","checkbox","textarea"],FU=(t,e)=>{const n=ct();if(!n)return;const r=mt.innerParams.get(t),i=!r||e.input!==r.input;jU.forEach(a=>{const u=Vi(n,Z[a]);u&&(BU(a,e.inputAttributes),u.className=Z[a],i&&kn(u))}),e.input&&(i&&UU(e),zU(e))},UU=t=>{if(!t.input)return;if(!Ut[t.input]){Qo(`Unexpected type of input! Expected ${Object.keys(Ut).join(" | ")}, got "${t.input}"`);return}const e=Xb(t.input);if(!e)return;const n=Ut[t.input](e,t);dn(e),t.inputAutoFocus&&setTimeout(()=>{Kb(n)})},$U=t=>{for(const{name:e}of Array.from(t.attributes))["id","type","value","style"].includes(e)||t.removeAttribute(e)},BU=(t,e)=>{const n=ct();if(!n)return;const r=rp(n,t);if(r){$U(r);for(const i in e)r.setAttribute(i,e[i])}},zU=t=>{if(!t.input)return;const e=Xb(t.input);e&&lr(e,t,"input")},Mv=(t,e)=>{!t.placeholder&&e.inputPlaceholder&&(t.placeholder=e.inputPlaceholder)},Ac=(t,e,n)=>{if(n.inputLabel){const r=document.createElement("label"),i=Z["input-label"];r.setAttribute("for",t.id),r.className=i,typeof n.customClass=="object"&&ut(r,n.customClass.inputLabel),r.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",r)}},Xb=t=>{const e=ct();if(e)return Vi(e,Z[t]||Z.input)},Zh=(t,e)=>{["string","number"].includes(typeof e)?t.value=`${e}`:Av(e)||On(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e}"`)},Ut={};Ut.text=Ut.email=Ut.password=Ut.number=Ut.tel=Ut.url=Ut.search=Ut.date=Ut["datetime-local"]=Ut.time=Ut.week=Ut.month=(t,e)=>{const n=t;return Zh(n,e.inputValue),Ac(n,n,e),Mv(n,e),n.type=e.input,n};Ut.file=(t,e)=>{const n=t;return Ac(n,n,e),Mv(n,e),n};Ut.range=(t,e)=>{const n=t,r=n.querySelector("input"),i=n.querySelector("output");return r&&(Zh(r,e.inputValue),r.type=e.input,Ac(r,t,e)),i&&Zh(i,e.inputValue),t};Ut.select=(t,e)=>{const n=t;if(n.textContent="",e.inputPlaceholder){const r=document.createElement("option");dr(r,e.inputPlaceholder),r.value="",r.disabled=!0,r.selected=!0,n.appendChild(r)}return Ac(n,n,e),n};Ut.radio=t=>{const e=t;return e.textContent="",t};Ut.checkbox=(t,e)=>{const n=ct();if(!n)throw new Error("Popup not found");const r=rp(n,"checkbox");if(!r)throw new Error("Checkbox input not found");r.value="1",r.checked=!!e.inputValue;const a=t.querySelector("span");
3245if(a){const u=e.inputPlaceholder||e.inputLabel;u&&dr(a,u)}return r};Ut.textarea=(t,e)=>{const n=t;Zh(n,e.inputValue),Mv(n,e),Ac(n,n,e);const r=i=>parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const i=ct();if(!i)return;const a=parseInt(window.getComputedStyle(i).width),u=()=>{if(!document.body.contains(n))return;const d=n.offsetWidth+r(n),f=ct();f&&(d>a?f.style.width=`${d}px`:Mo(f,"width",e.width))};new MutationObserver(u).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const HU=(t,e)=>{const n=kv();n&&(Dv(n),lr(n,e,"htmlContainer"),e.html?(Vv(e.html,n),dn(n,"block")):e.text?(n.textContent=e.text,dn(n,"block")):kn(n),FU(t,e))},WU=(t,e)=>{const n=Gb();n&&(Dv(n),Rc(n,!!e.footer,"block"),e.footer&&Vv(e.footer,n),lr(n,e,"footer"))},qU=(t,e)=>{const n=mt.innerParams.get(t),r=Cl();if(!r)return;if(n&&e.icon===n.icon){m2(r,e),p2(r,e);return}if(!e.icon&&!e.iconHtml){kn(r);return}if(e.icon&&Object.keys(Jh).indexOf(e.icon)===-1){Qo(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),kn(r);return}dn(r),m2(r,e),p2(r,e),ut(r,e.showClass&&e.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Jb)},p2=(t,e)=>{for(const[n,r]of Object.entries(Jh))e.icon!==n&&Tr(t,r);ut(t,e.icon&&Jh[e.icon]),QU(t,e),Jb(),lr(t,e,"icon")},Jb=()=>{const t=ct();if(!t)return;const e=window.getComputedStyle(t).getPropertyValue("background-color");t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix").forEach(r=>{r.style.backgroundColor=e})},GU=t=>`
3246  ${t.animation?'<div class="swal2-success-circular-line-left"></div>':""}
3247  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
3248  <div class="swal2-success-ring"></div>
3249  ${t.animation?'<div class="swal2-success-fix"></div>':""}
3250  ${t.animation?'<div class="swal2-success-circular-line-right"></div>':""}
3251`,KU=`
3252  <span class="swal2-x-mark">
3253    <span class="swal2-x-mark-line-left"></span>
3254    <span class="swal2-x-mark-line-right"></span>
3255  </span>
3256`,m2=(t,e)=>{if(!e.icon&&!e.iconHtml)return;let n=t.innerHTML,r="";e.iconHtml?r=g2(e.iconHtml):e.icon==="success"?(r=GU(e),n=n.replace(/ style=".*?"/g,"")):e.icon==="error"?r=KU:e.icon&&(r=g2({question:"?",warning:"!",info:"i"}[e.icon])),n.trim()!==r.trim()&&dr(t,r)},QU=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])f2(t,n,"background-color",e.iconColor);f2(t,".swal2-success-ring","border-color",e.iconColor)}},g2=t=>`<div class="${Z["icon-content"]}">${t}</div>`,YU=(t,e)=>{const n=qb();if(n){if(!e.imageUrl){kn(n);return}dn(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),Mo(n,"width",e.imageWidth),Mo(n,"height",e.imageHeight),n.className=Z.image,lr(n,e,"image")}};let jv=!1,Zb=0,eI=0,tI=0,nI=0;const XU=t=>{t.addEventListener("mousedown",ef),document.body.addEventListener("mousemove",tf),t.addEventListener("mouseup",nf),t.addEventListener("touchstart",ef),document.body.addEventListener("touchmove",tf),t.addEventListener("touchend",nf)},JU=t=>{t.removeEventListener("mousedown",ef),document.body.removeEventListener("mousemove",tf),t.removeEventListener("mouseup",nf),t.removeEventListener("touchstart",ef),document.body.removeEventListener("touchmove",tf),t.removeEventListener("touchend",nf)},ef=t=>{const e=ct();if(!e)return;const n=Cl();if(t.target===e||n&&n.contains(t.target)){jv=!0;const r=rI(t);Zb=r.clientX,eI=r.clientY,tI=parseInt(e.style.insetInlineStart)||0,nI=parseInt(e.style.insetBlockStart)||0,ut(e,"swal2-dragging")}},tf=t=>{const e=ct();if(e&&jv){let{clientX:n,clientY:r}=rI(t);const i=n-Zb;e.style.insetInlineStart=`${tI+(De.isRTL?-i:i)}px`,e.style.insetBlockStart=`${nI+(r-eI)}px`}},nf=()=>{const t=ct();jv=!1,Tr(t,"swal2-dragging")},rI=t=>{const e=t.type.startsWith("touch")?t.touches[0]:t;return{clientX:e.clientX,clientY:e.clientY}},ZU=(t,e)=>{const n=Vn(),r=ct();if(!(!n||!r)){if(e.toast){Mo(n,"width",e.width),r.style.width="100%";const i=Al();i&&r.insertBefore(i,Cl())}else Mo(r,"width",e.width);Mo(r,"padding",e.padding),e.color&&(r.style.color=e.color),e.background&&(r.style.background=e.background),kn(ep()),e8(r,e),e.draggable&&!e.toast?(ut(r,Z.draggable),XU(r)):(Tr(r,Z.draggable),JU(r))}},e8=(t,e)=>{const n=e.showClass||{};t.className=`${Z.popup} ${Yn(t)?n.popup:""}`,e.toast?(ut([document.documentElement,document.body],Z["toast-shown"]),ut(t,Z.toast)):ut(t,Z.modal),lr(t,e,"popup"),typeof e.customClass=="string"&&ut(t,e.customClass),e.icon&&ut(t,Z[`icon-${e.icon}`])},t8=(t,e)=>{const n=xv();if(!n)return;const{progressSteps:r,currentProgressStep:i}=e;if(!r||r.length===0||i===void 0){kn(n);return}dn(n),n.textContent="",i>=r.length&&On("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.forEach((a,u)=>{const d=n8(a);if(n.appendChild(d),u===i&&ut(d,Z["active-progress-step"]),u!==r.length-1){const f=r8(e);n.appendChild(f)}})},n8=t=>{const e=document.createElement("li");return ut(e,Z["progress-step"]),dr(e,t),e},r8=t=>{const e=document.createElement("li");return ut(e,Z["progress-step-line"]),t.progressStepsDistance&&Mo(e,"width",t.progressStepsDistance),e},s8=(t,e)=>{const n=Wb();n&&(Dv(n),Rc(n,!!(e.title||e.titleText),"block"),e.title&&Vv(e.title,n),e.titleText&&(n.innerText=e.titleText),lr(n,e,"title"))},sI=(t,e)=>{var n;ZU(t,e),DU(t,e),t8(t,e),qU(t,e),YU(t,e),s8(t,e),LU(t,e),HU(t,e),kU(t,e),WU(t,e);const r=ct();typeof e.didRender=="function"&&r&&e.didRender(r),(n=De.eventEmitter)===null||n===void 0||n.emit("didRender",r)},i8=()=>Yn(ct()),iI=()=>{var t;return(t=gs())===null||t===void 0?void 0:t.click()},o8=()=>{var t;return(t=Yo())===null||t===void 0?void 0:t.click()},a8=()=>{var t;return(t=Rl())===null||t===void 0?void 0:t.click()},kl=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),oI=t=>{if(t.keydownTarget&&t.keydownHandlerAdded&&t.keydownHandler){const e=t.keydownHandler;t.keydownTarget.removeEventListener("keydown",e,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1}},l8=(t,e,n)=>{if(oI(t),!e.toast){const r=a=>c8(e,a,n);t.keydownHandler=r;const i=e.keydownListenerCapture?window:ct();if(i){t.keydownTarget=i,t.keydownListenerCapture=e.keydownListenerCapture;const a=r;t.keydownTarget.addEventListener("keydown",a,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0}}},Zg=(t,e)=>{var n;const r=Nv();return r.length?(t=t+e,t===-2&&(t=r.length-1),t===r.length?t=0:t===-1&&(t=r.length-1),r[t].focus(),!(cU()&&r[t]instanceof HTMLIFrameElement)):((n=ct())===null||n===void 0||n.focus(),!0)},aI=["ArrowRight","ArrowDown"],u8=["ArrowLeft","ArrowUp"],c8=(t,e,n)=>{t&&(e.isComposing||e.keyCode===229||(t.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?d8(e,t):e.ke
3256y==="Tab"?h8(e):[...aI,...u8].includes(e.key)?f8(e.key):e.key==="Escape"&&p8(e,t,n)))},d8=(t,e)=>{if(!Zf(e.allowEnterKey))return;const n=ct();if(!n||!e.input)return;const r=rp(n,e.input);if(t.target&&r&&t.target instanceof HTMLElement&&t.target.outerHTML===r.outerHTML){if(["textarea","file"].includes(e.input))return;iI(),t.preventDefault()}},h8=t=>{const e=t.target,r=Nv().findIndex(a=>a===e);let i=!0;t.shiftKey?i=Zg(r,-1):i=Zg(r,1),t.stopPropagation(),i&&t.preventDefault()},f8=t=>{const e=Cc(),n=gs(),r=Yo(),i=Rl();if(!e||!n||!r||!i)return;const a=[n,r,i];if(document.activeElement instanceof HTMLElement&&!a.includes(document.activeElement))return;const u=aI.includes(t)?"nextElementSibling":"previousElementSibling";let d=document.activeElement;if(d){for(let f=0;f<e.children.length;f++){if(d=d[u],!d)return;if(d instanceof HTMLButtonElement&&Yn(d))break}d instanceof HTMLButtonElement&&d.focus()}},p8=(t,e,n)=>{t.preventDefault(),Zf(e.allowEscapeKey)&&n(kl.esc)};var ll={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const m8=()=>{const t=Vn();Array.from(document.body.children).forEach(n=>{n.contains(t)||(n.hasAttribute("aria-hidden")&&n.setAttribute("data-previous-aria-hidden",n.getAttribute("aria-hidden")||""),n.setAttribute("aria-hidden","true"))})},lI=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},Fv=typeof window<"u"&&!!window.GestureEvent,g8=Fv&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,y8=()=>{if(Fv&&!Ws(document.body,Z.iosfix)){const t=document.body.scrollTop;document.body.style.top=`${t*-1}px`,ut(document.body,Z.iosfix),v8()}},v8=()=>{const t=Vn();if(!t)return;let e;t.ontouchstart=n=>{e=w8(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},w8=t=>{const e=t.target,n=Vn(),r=kv();return!n||!r||_8(t)||E8(t)?!1:e===n||!Jg(n)&&e instanceof HTMLElement&&!yU(e,r)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Jg(r)&&r.contains(e))},_8=t=>!!(t.touches&&t.touches.length&&t.touches[0].touchType==="stylus"),E8=t=>t.touches&&t.touches.length>1,S8=()=>{if(Ws(document.body,Z.iosfix)){const t=parseInt(document.body.style.top,10);Tr(document.body,Z.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},T8=()=>{const t=document.createElement("div");t.className=Z["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e};let Ka=null;const b8=t=>{Ka===null&&(document.body.scrollHeight>window.innerHeight||t==="scroll")&&(Ka=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Ka+T8()}px`)},I8=()=>{Ka!==null&&(document.body.style.paddingRight=`${Ka}px`,Ka=null)};function uI(t,e,n,r){np()?y2(t,r):(oU(n).then(()=>y2(t,r)),oI(De)),Fv?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Lv()&&(I8(),S8(),lI()),C8()}function C8(){Tr([document.documentElement,document.body],[Z.shown,Z["height-auto"],Z["no-backdrop"],Z["toast-shown"]])}function Mi(t){t=A8(t);const e=ll.swalPromiseResolve.get(this),n=R8(this);this.isAwaitingPromise?t.isDismissed||(kc(this),e(t)):n&&e(t)}const R8=t=>{const e=ct();if(!e)return!1;const n=mt.innerParams.get(t);if(!n||Ws(e,n.hideClass.popup))return!1;Tr(e,n.showClass.popup),ut(e,n.hideClass.popup);const r=Vn();return Tr(r,n.showClass.backdrop),ut(r,n.hideClass.backdrop),k8(t,e,n),!0};function cI(t){const e=ll.swalPromiseReject.get(this);kc(this),e&&e(t)}const kc=t=>{t.isAwaitingPromise&&(delete t.isAwaitingPromise,mt.innerParams.get(t)||t._destroy())},A8=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),k8=(t,e,n)=>{var r;const i=Vn(),a=Yb(e);typeof n.willClose=="function"&&n.willClose(e),(r=De.eventEmitter)===null||r===void 0||r.emit("willClose",e),a&&i?x8(t,e,i,!!n.returnFocus,n.didClose):i&&uI(t,i,!!n.returnFocus,n.didClose)},x8=(t,e,n,r,i)=>{De.swalCloseEventFinishedCallback=uI.bind(null,t,n,r,i);const a=function(u){if(u.target===e){var d;(d=De.swalCloseEventFinishedCallback)===null||d===void 0||d.call(De),delete De.swalCloseEventFinishedCallback,e.removeEventListener("animationend",a),e.removeEventListener("transitionend",a)}};e.addEventListener("animationend",a),e.addEventListener("transitionend",a)},y2=(t,e)=>{setTimeout(()=>{var n;typeof e=="function"&&e.bind(t.params)(),(n=De.eventEmitter)===null||n===void 0||n.emit("didClose"),t._destroy&&t._destroy()})},ul=t=>{let e=ct();if(e||new Bt,e=ct(),!e)return;const n=Al();np()?kn(Cl()):P8(e,t),dn(n),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()},P8=(t,e)=>{const n=Cc(),r=Al();!n||!r||(!e&&Yn(gs())&&(e=gs()),dn(n),e&&(kn(e),r.setAttribute("data-button-to-replace",e.className),n.insertBefore(r,e)),ut([t,n],Z.loading))},N8=(t,e)=>{e.input==="select"||e.input==="radio"?M8(t,e):["text","email","number","tel","textarea"].some(n=>n===e.input)&&(Rv(e.inputValue)||Av(e.inputValue))&&(ul(gs()),j8(t,e))},L8=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return D8(n);case"radio":return O8(n);case"file":return V8(n);default:return e.inputAutoTrim?n.value.trim():n.value}},D8=t=>t.checked?1:0,O8=t=>t.checked?t.value:null,V8=t=>t.files&&t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,M8=(t,e)=>{const n=ct();if(!n)return;const r=i=>
3256{e.input==="select"?F8(n,ey(i),e):e.input==="radio"&&U8(n,ey(i),e)};Rv(e.inputOptions)||Av(e.inputOptions)?(ul(gs()),bc(e.inputOptions).then(i=>{t.hideLoading(),r(i)})):typeof e.inputOptions=="object"?r(e.inputOptions):Qo(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},j8=(t,e)=>{const n=t.getInput();n&&(kn(n),bc(e.inputValue).then(r=>{n.value=e.input==="number"?`${parseFloat(r)||0}`:`${r}`,dn(n),n.focus(),t.hideLoading()}).catch(r=>{Qo(`Error in inputValue promise: ${r}`),n.value="",dn(n),n.focus(),t.hideLoading()}))};function F8(t,e,n){const r=Vi(t,Z.select);if(!r)return;const i=(a,u,d)=>{const f=document.createElement("option");f.value=d,dr(f,u),f.selected=dI(d,n.inputValue),a.appendChild(f)};e.forEach(a=>{const u=a[0],d=a[1];if(Array.isArray(d)){const f=document.createElement("optgroup");f.label=u,f.disabled=!1,r.appendChild(f),d.forEach(p=>i(f,p[1],p[0]))}else i(r,d,u)}),r.focus()}function U8(t,e,n){const r=Vi(t,Z.radio);if(!r)return;e.forEach(a=>{const u=a[0],d=a[1],f=document.createElement("input"),p=document.createElement("label");f.type="radio",f.name=Z.radio,f.value=u,dI(u,n.inputValue)&&(f.checked=!0);const w=document.createElement("span");dr(w,d),w.className=Z.label,p.appendChild(f),p.appendChild(w),r.appendChild(p)});const i=r.querySelectorAll("input");i.length&&i[0].focus()}const ey=t=>(t instanceof Map?Array.from(t):Object.entries(t)).map(([n,r])=>[n,typeof r=="object"?ey(r):r]),dI=(t,e)=>!!e&&e!=null&&e.toString()===t.toString(),$8=t=>{const e=mt.innerParams.get(t);t.disableButtons(),e.input?hI(t,"confirm"):$v(t,!0)},B8=t=>{const e=mt.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?hI(t,"deny"):Uv(t,!1)},z8=(t,e)=>{t.disableButtons(),e(kl.cancel)},hI=(t,e)=>{const n=mt.innerParams.get(t);if(!n.input){Qo(`The "input" parameter is needed to be set when using returnInputValueOn${Cv(e)}`);return}const r=t.getInput(),i=L8(t,n);n.inputValidator?H8(t,i,e):r&&!r.checkValidity()?(t.enableButtons(),t.showValidationMessage(n.validationMessage||r.validationMessage)):e==="deny"?Uv(t,i):$v(t,i)},H8=(t,e,n)=>{const r=mt.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>bc(r.inputValidator(e,r.validationMessage))).then(a=>{t.enableButtons(),t.enableInput(),a?t.showValidationMessage(a):n==="deny"?Uv(t,e):$v(t,e)})},Uv=(t,e)=>{const n=mt.innerParams.get(t);n.showLoaderOnDeny&&ul(Yo()),n.preDeny?(t.isAwaitingPromise=!0,Promise.resolve().then(()=>bc(n.preDeny(e,n.validationMessage))).then(i=>{i===!1?(t.hideLoading(),kc(t)):t.close({isDenied:!0,value:typeof i>"u"?e:i})}).catch(i=>fI(t,i))):t.close({isDenied:!0,value:e})},v2=(t,e)=>{t.close({isConfirmed:!0,value:e})},fI=(t,e)=>{t.rejectPromise(e)},$v=(t,e)=>{const n=mt.innerParams.get(t);n.showLoaderOnConfirm&&ul(),n.preConfirm?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then(()=>bc(n.preConfirm(e,n.validationMessage))).then(i=>{Yn(ep())||i===!1?(t.hideLoading(),kc(t)):v2(t,typeof i>"u"?e:i)}).catch(i=>fI(t,i))):v2(t,e)};function rf(){const t=mt.innerParams.get(this);if(!t)return;const e=mt.domCache.get(this);kn(e.loader),np()?t.icon&&dn(Cl()):W8(e),Tr([e.popup,e.actions],Z.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),this.enableButtons()}const W8=t=>{const e=t.loader.getAttribute("data-button-to-replace"),n=e?t.popup.getElementsByClassName(e):[];n.length?dn(n[0],"inline-block"):gU()&&kn(t.actions)};function pI(){const t=mt.innerParams.get(this),e=mt.domCache.get(this);return e?rp(e.popup,t.input):null}function mI(t,e,n){const r=mt.domCache.get(t);e.forEach(i=>{r[i].disabled=n})}function gI(t,e){const n=ct();!n||!t||(t.type==="radio"?n.querySelectorAll(`[name="${Z.radio}"]`).forEach(i=>{i.disabled=e}):t.disabled=e)}function yI(){mI(this,["confirmButton","denyButton","cancelButton"],!1);const t=mt.focusedElement.get(this);t instanceof HTMLElement&&document.activeElement===document.body&&t.focus(),mt.focusedElement.delete(this)}function vI(){mt.focusedElement.set(this,document.activeElement),mI(this,["confirmButton","denyButton","cancelButton"],!0)}function wI(){gI(this.getInput(),!1)}function _I(){gI(this.getInput(),!0)}function EI(t){const e=mt.domCache.get(this),n=mt.innerParams.get(this);dr(e.validationMessage,t),e.validationMessage.className=Z["validation-message"],n.customClass&&n.customClass.validationMessage&&ut(e.validationMessage,n.customClass.validationMessage),dn(e.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid","true"),r.setAttribute("aria-describedby",Z["validation-message"]),Kb(r),ut(r,Z.inputerror))}function SI(){const t=mt.domCache.get(this);t.validationMessage&&kn(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Tr(e,Z.inputerror))}const ji={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose
3256:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},q8=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],G8={allowEnterKey:void 0},K8=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],TI=t=>Object.prototype.hasOwnProperty.call(ji,t),bI=t=>q8.indexOf(t)!==-1,II=t=>G8[t],Q8=t=>{TI(t)||On(`Unknown parameter "${t}"`)},Y8=t=>{K8.includes(t)&&On(`The parameter "${t}" is incompatible with toasts`)},X8=t=>{const e=II(t);e&&Hb(t,e)},CI=t=>{t.backdrop===!1&&t.allowOutsideClick&&On('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(t.theme)&&On(`Invalid theme "${t.theme}"`);for(const e in t)Q8(e),t.toast&&Y8(e),X8(e)};function RI(t){const e=Vn(),n=ct(),r=mt.innerParams.get(this);if(!n||Ws(n,r.hideClass.popup)){On("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}const i=J8(t),a=Object.assign({},r,i);CI(a),e&&(e.dataset.swal2Theme=a.theme),sI(this,a),mt.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const J8=t=>{const e={};return Object.keys(t).forEach(n=>{if(bI(n)){const r=t;e[n]=r[n]}else On(`Invalid parameter to update: ${n}`)}),e};function AI(){var t;const e=mt.domCache.get(this),n=mt.innerParams.get(this);if(!n){kI(this);return}e.popup&&De.swalCloseEventFinishedCallback&&(De.swalCloseEventFinishedCallback(),delete De.swalCloseEventFinishedCallback),typeof n.didDestroy=="function"&&n.didDestroy(),(t=De.eventEmitter)===null||t===void 0||t.emit("didDestroy"),Z8(this)}const Z8=t=>{kI(t),delete t.params,delete De.keydownHandler,delete De.keydownTarget,delete De.currentInstance},kI=t=>{t.isAwaitingPromise?(ug(mt,t),t.isAwaitingPromise=!0):(ug(ll,t),ug(mt,t),delete t.isAwaitingPromise,delete t.disableButtons,delete t.enableButtons,delete t.getInput,delete t.disableInput,delete t.enableInput,delete t.hideLoading,delete t.disableLoading,delete t.showValidationMessage,delete t.resetValidationMessage,delete t.close,delete t.closePopup,delete t.closeModal,delete t.closeToast,delete t.rejectPromise,delete t.update,delete t._destroy)},ug=(t,e)=>{for(const n in t)t[n].delete(e)};var e7=Object.freeze({__proto__:null,_destroy:AI,close:Mi,closeModal:Mi,closePopup:Mi,closeToast:Mi,disableButtons:vI,disableInput:_I,disableLoading:rf,enableButtons:yI,enableInput:wI,getInput:pI,handleAwaitingPromise:kc,hideLoading:rf,rejectPromise:cI,resetValidationMessage:SI,showValidationMessage:EI,update:RI});const t7=(t,e,n)=>{t.toast?n7(t,e,n):(s7(e),i7(e),o7(t,e,n))},n7=(t,e,n)=>{e.popup.onclick=()=>{t&&(r7(t)||t.timer||t.input)||n(kl.close)}},r7=t=>!!(t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton);let sf=!1;const s7=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=()=>{},e.target===t.container&&(sf=!0)}}},i7=t=>{t.container.onmousedown=e=>{e.target===t.container&&e.preventDefault(),t.popup.onmouseup=function(n){t.popup.onmouseup=()=>{},(n.target===t.popup||n.target instanceof HTMLElement&&t.popup.contains(n.target))&&(sf=!0)}}},o7=(t,e,n)=>{e.container.onclick=r=>{if(sf){sf=!1;return}r.target===e.container&&Zf(t.allowOutsideClick)&&n(kl.backdrop)}},a7=t=>typeof t=="object"&&t!==null&&"jquery"in t,w2=t=>t instanceof Element||a7(t),l7=t=>{const e={};return typeof t[0]=="object"&&!w2(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,r)=>{const i=t[r];typeof i=="string"||w2(i)?e[n]=i:i!==void 0&&Qo(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)}),e};function u7(...t){return new this(...t)}function c7(t){class e extends this{_main(r,i){return super._main(r,Object.assign({},t,i))}}return e}const d7=()=>De.timeout&&De.timeout.getTimerLeft(),xI=()=>
3256{if(De.timeout)return vU(),De.timeout.stop()},PI=()=>{if(De.timeout){const t=De.timeout.start();return Ov(t),t}},h7=()=>{const t=De.timeout;return t&&(t.running?xI():PI())},f7=t=>{if(De.timeout){const e=De.timeout.increase(t);return Ov(e,!0),e}},p7=()=>!!(De.timeout&&De.timeout.isRunning());let _2=!1;const ty={};function m7(t="data-swal-template"){ty[t]=this,_2||(document.body.addEventListener("click",g7),_2=!0)}const g7=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in ty){const r=e.getAttribute&&e.getAttribute(n);if(r){ty[n].fire({template:r});return}}};class y7{constructor(){this.events={}}_getHandlersByEventName(e){return typeof this.events[e]>"u"&&(this.events[e]=[]),this.events[e]}on(e,n){const r=this._getHandlersByEventName(e);r.includes(n)||r.push(n)}once(e,n){const r=(...i)=>{this.removeListener(e,r),n.apply(this,i)};this.on(e,r)}emit(e,...n){this._getHandlersByEventName(e).forEach(r=>{try{r.apply(this,n)}catch(i){console.error(i)}})}removeListener(e,n){const r=this._getHandlersByEventName(e),i=r.indexOf(n);i>-1&&r.splice(i,1)}removeAllListeners(e){this.events[e]!==void 0&&(this.events[e].length=0)}reset(){this.events={}}}De.eventEmitter=new y7;const v7=(t,e)=>{De.eventEmitter&&De.eventEmitter.on(t,e)},w7=(t,e)=>{De.eventEmitter&&De.eventEmitter.once(t,e)},_7=(t,e)=>{if(De.eventEmitter){if(!t){De.eventEmitter.reset();return}e?De.eventEmitter.removeListener(t,e):De.eventEmitter.removeAllListeners(t)}};var E7=Object.freeze({__proto__:null,argsToParams:l7,bindClickHandler:m7,clickCancel:a8,clickConfirm:iI,clickDeny:o8,enableLoading:ul,fire:u7,getActions:Cc,getCancelButton:Rl,getCloseButton:Pv,getConfirmButton:gs,getContainer:Vn,getDenyButton:Yo,getFocusableElements:Nv,getFooter:Gb,getHtmlContainer:kv,getIcon:Cl,getIconContent:dU,getImage:qb,getInputLabel:hU,getLoader:Al,getPopup:ct,getProgressSteps:xv,getTimerLeft:d7,getTimerProgressBar:tp,getTitle:Wb,getValidationMessage:ep,increaseTimer:f7,isDeprecatedParameter:II,isLoading:pU,isTimerRunning:p7,isUpdatableParameter:bI,isValidParameter:TI,isVisible:i8,mixin:c7,off:_7,on:v7,once:w7,resumeTimer:PI,showLoading:ul,stopTimer:xI,toggleTimer:h7});class S7{constructor(e,n){this.callback=e,this.remaining=n,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const NI=["swal-title","swal-html","swal-footer"],T7=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return P7(n),Object.assign(b7(n),I7(n),C7(n),R7(n),A7(n),k7(n),x7(n,NI))},b7=t=>{const e={};return Array.from(t.querySelectorAll("swal-param")).forEach(r=>{Ho(r,["name","value"]);const i=r.getAttribute("name"),a=r.getAttribute("value");!i||!a||(i in ji&&typeof ji[i]=="boolean"?e[i]=a!=="false":i in ji&&typeof ji[i]=="object"?e[i]=JSON.parse(a):e[i]=a)}),e},I7=t=>{const e={};return Array.from(t.querySelectorAll("swal-function-param")).forEach(r=>{const i=r.getAttribute("name"),a=r.getAttribute("value");!i||!a||(e[i]=new Function(`return ${a}`)())}),e},C7=t=>{const e={};return Array.from(t.querySelectorAll("swal-button")).forEach(r=>{Ho(r,["type","color","aria-label"]);const i=r.getAttribute("type");if(!i||!["confirm","cancel","deny"].includes(i))return;e[`${i}ButtonText`]=r.innerHTML,e[`show${Cv(i)}Button`]=!0;const a=r.getAttribute("color");a!==null&&(e[`${i}ButtonColor`]=a);const u=r.getAttribute("aria-label");u!==null&&(e[`${i}ButtonAriaLabel`]=u)}),e},R7=t=>{const e={},n=t.querySelector("swal-image");if(n){Ho(n,["src","width","height","alt"]);const r=n.getAttribute("src");r!==null&&(e.imageUrl=r||void 0);const i=n.getAttribute("width");i!==null&&(e.imageWidth=i||void 0);const a=n.getAttribute("height");a!==null&&(e.imageHeight=a||void 0);const u=n.getAttribute("alt");u!==null&&(e.imageAlt=u||void 0)}return e},A7=t=>{const e={},n=t.querySelector("swal-icon");return n&&(Ho(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},k7=t=>{const e={},n=t.querySelector("swal-input");n&&(Ho(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const r=Array.from(t.querySelectorAll("swal-input-option"));return r.length&&(e.inputOptions={},r.forEach(i=>
3256{Ho(i,["value"]);const a=i.getAttribute("value");if(!a)return;const u=i.innerHTML;e.inputOptions[a]=u})),e},x7=(t,e)=>{const n={};for(const r in e){const i=e[r],a=t.querySelector(i);a&&(Ho(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},P7=t=>{const e=NI.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(t.children).forEach(n=>{const r=n.tagName.toLowerCase();e.includes(r)||On(`Unrecognized element <${r}>`)})},Ho=(t,e)=>{Array.from(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&On([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},LI=10,N7=t=>{var e,n;const r=Vn(),i=ct();if(!r||!i)return;typeof t.willOpen=="function"&&t.willOpen(i),(e=De.eventEmitter)===null||e===void 0||e.emit("willOpen",i);const u=window.getComputedStyle(document.body).overflowY;if(O7(r,i,t),setTimeout(()=>{L7(r,i)},LI),Lv()&&(D7(r,t.scrollbarPadding!==void 0?t.scrollbarPadding:!1,u),m8()),g8&&t.backdrop===!1&&i.scrollHeight>r.clientHeight&&(r.style.pointerEvents="auto"),!np()&&!De.previousActiveElement&&(De.previousActiveElement=document.activeElement),typeof t.didOpen=="function"){const d=t.didOpen;setTimeout(()=>d(i))}(n=De.eventEmitter)===null||n===void 0||n.emit("didOpen",i)},of=t=>{const e=ct();if(!e||t.target!==e)return;const n=Vn();n&&(e.removeEventListener("animationend",of),e.removeEventListener("transitionend",of),n.style.overflowY="auto",Tr(n,Z["no-transition"]))},L7=(t,e)=>{Yb(e)?(t.style.overflowY="hidden",e.addEventListener("animationend",of),e.addEventListener("transitionend",of)):t.style.overflowY="auto"},D7=(t,e,n)=>{y8(),e&&n!=="hidden"&&b8(n),setTimeout(()=>{t.scrollTop=0})},O7=(t,e,n)=>{var r;(r=n.showClass)!==null&&r!==void 0&&r.backdrop&&ut(t,n.showClass.backdrop),n.animation?(e.style.setProperty("opacity","0","important"),dn(e,"grid"),setTimeout(()=>{var i;(i=n.showClass)!==null&&i!==void 0&&i.popup&&ut(e,n.showClass.popup),e.style.removeProperty("opacity")},LI)):dn(e,"grid"),ut([document.documentElement,document.body],Z.shown),n.heightAuto&&n.backdrop&&!n.toast&&ut([document.documentElement,document.body],Z["height-auto"])};var E2={email:(t,e)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function V7(t){t.inputValidator||(t.input==="email"&&(t.inputValidator=E2.email),t.input==="url"&&(t.inputValidator=E2.url))}function M7(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(On('Target parameter is not valid, defaulting to "body"'),t.target="body")}function j7(t){V7(t),t.showLoaderOnConfirm&&!t.preConfirm&&On(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
3257showLoaderOnConfirm should be used together with preConfirm, see usage example:
3258https://sweetalert2.github.io/#ajax-request`),M7(t),typeof t.title=="string"&&(t.title=t.title.split(`
3259`).join("<br />")),CU(t)}let as;var ih=new WeakMap;class Ht{constructor(...e){if(nU(this,ih,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),typeof window>"u")return;as=this;const n=Object.freeze(this.constructor.argsToParams(e));this.params=n,this.isAwaitingPromise=!1,rU(ih,this,this._main(as.params))}_main(e,n={}){if(CI(Object.assign({},n,e)),De.currentInstance){const a=ll.swalPromiseResolve.get(De.currentInstance),{isAwaitingPromise:u}=De.currentInstance;De.currentInstance._destroy(),u||a({isDismissed:!0}),Lv()&&lI()}De.currentInstance=as;const r=U7(e,n);j7(r),Object.freeze(r),De.timeout&&(De.timeout.stop(),delete De.timeout),clearTimeout(De.restoreFocusTimeout);const i=$7(as);return sI(as,r),mt.innerParams.set(as,r),F7(as,i,r)}then(e){return d2(ih,this).then(e)}finally(e){return d2(ih,this).finally(e)}}const F7=(t,e,n)=>new Promise((r,i)=>{const a=u=>{t.close({isDismissed:!0,dismiss:u,isConfirmed:!1,isDenied:!1})};ll.swalPromiseResolve.set(t,r),ll.swalPromiseReject.set(t,i),e.confirmButton.onclick=()=>{$8(t)},e.denyButton.onclick=()=>{B8(t)},e.cancelButton.onclick=()=>{z8(t,a)},e.closeButton.onclick=()=>{a(kl.close)},t7(n,e,a),l8(De,n,a),N8(t,n),N7(n),B7(De,n,a),z7(e,n),setTimeout(()=>{e.container.scrollTop=0})}),U7=(t,e)=>{const n=T7(t),r=Object.assign({},ji,e,n,t);return r.showClass=Object.assign({},ji.showClass,r.showClass),r.hideClass=Object.assign({},ji.hideClass,r.hideClass),r.animation===!1&&(r.showClass={backdrop:"swal2-noanimation"},r.hideClass={}),r},$7=t=>{const e={popup:ct(),container:Vn(),actions:Cc(),confirmButton:gs(),denyButton:Yo(),cancelButton:Rl(),loader:Al(),closeButton:Pv(),val
3259idationMessage:ep(),progressSteps:xv()};return mt.domCache.set(t,e),e},B7=(t,e,n)=>{const r=tp();kn(r),e.timer&&(t.timeout=new S7(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&r&&(dn(r),lr(r,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Ov(e.timer)})))},z7=(t,e)=>{if(!e.toast){if(!Zf(e.allowEnterKey)){Hb("allowEnterKey","preConfirm: () => false"),t.popup.focus();return}H7(t)||W7(t,e)||Zg(-1,1)}},H7=t=>{const e=Array.from(t.popup.querySelectorAll("[autofocus]"));for(const n of e)if(n instanceof HTMLElement&&Yn(n))return n.focus(),!0;return!1},W7=(t,e)=>e.focusDeny&&Yn(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&Yn(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&Yn(t.confirmButton)?(t.confirmButton.focus(),!0):!1;Ht.prototype.disableButtons=vI;Ht.prototype.enableButtons=yI;Ht.prototype.getInput=pI;Ht.prototype.disableInput=_I;Ht.prototype.enableInput=wI;Ht.prototype.hideLoading=rf;Ht.prototype.disableLoading=rf;Ht.prototype.showValidationMessage=EI;Ht.prototype.resetValidationMessage=SI;Ht.prototype.close=Mi;Ht.prototype.closePopup=Mi;Ht.prototype.closeModal=Mi;Ht.prototype.closeToast=Mi;Ht.prototype.rejectPromise=cI;Ht.prototype.update=RI;Ht.prototype._destroy=AI;Object.assign(Ht,E7);Object.keys(e7).forEach(t=>{Ht[t]=function(...e){if(as&&as[t])return as[t](...e)}});Ht.DismissReason=kl;Ht.version="11.26.25";const Bt=Ht;Bt.default=Bt;typeof document<"u"&&function(t,e){var n=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=e);else try{n.innerHTML=e}catch{n.innerText=e}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end
vendor: 12,791 bytes, line 3259
3259";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:
3259"!
vendor: 11,078 bytes, line 3259
3259";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}
3259');function q7(t){return Fe({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.648 14.423l.003-.004a1.34 1.34 0 0 1-.498.659c-.269.189-.647.338-1.188.364l-1.99.004v-2.93c.288.008 1.565-.013 2.119.015.722.035 1.171.321 1.41.668.262.351.293.82.144 1.224zm-2.129-3.261c.503-.024.852-.162 1.101-.336.214-.146.375-.367.46-.611.134-.375.107-.81-.136-1.135-.223-.319-.638-.584-1.306-.616-.495-.026-1.413-.003-1.664-.01v2.709c.025.004 1.539-.001 1.545-.001zM24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12zm-6.65 2.142c.022-1.477-1.24-2.332-1.908-2.572.715-.491 1.206-1.043 1.206-2.085 0-1.655-1.646-2.43-2.647-2.529-.082-.009-.31-.013-.31-.013V5.361h-1.633l.004 1.583H10.97V5.367H9.31v1.569c-.292.007-2.049.006-2.049.006v1.401h.571c.601.016.822.362.798.677v6.041a.408.408 0 0 1-.371.391c-.249.011-.621 0-.621 0l-.32 1.588h1.996v1.6h1.661v-1.591h1.091v1.594h1.624v-1.588c1.899.05 3.643-1.071 3.66-2.913z"},child:[]}]})(t)}const G7=()=>m.jsx("svg",{viewBox:"0 0 24 24",width:"24",height:"24",className:"method-icon",children:m.jsx("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})}),K7=({selected:t,onChange:e,currency:n})=>{const r=[{id:"mpesa",label:"Mobile Money",icon:Kg,desc:"Pay via M-Pesa, Airtel"},{id:"kora",label:"Kora",icon:Ev,desc:"Mobile Money, Card, Bank"},{id:"flutterwave",label:"Flutterwave",icon:G7,desc:"Card, Mobile Money, Bank, USSD"},{id:"crypto",label:"Crypto",icon:q7,desc:"BTC, ETH, USDT"}],a=(()=>{let u=[...r];return n==="KES"?u=u.filter(d=>d.id!=="flutterwave"):n==="NGN"?u=u.filter(d=>d.id!=="mpesa"&&d.id!=="flutterwave"):u=u.filter(d=>d.id!=="mpesa"&&d.id!=="kora"),u})();return m.jsxs("div",{className:"method-selector",children:[m.jsx("p",{className:"selector-label",children:"Choose Payment Method"}),m.jsx("div",{className:"method-grid",children:a.map(u=>{const d=u.icon;return m.jsxs("button",{className:`method-card ${t===u.id?"active":""}`,onClick:()=>e(u.id),children:[m.jsx(d,{className:"method-icon"}),m.jsx("span",{className:"method-name",children:u.label}),m.jsx("span",{className:"method-desc",children:u.desc})]},u.id)})})]})},oh="https://genuine-flow-production-b0ae.up.railway.app/api",ah="tenant_app_kibet";async function lh(t){const e=await t.text();try{return JSON.parse(e)}catch{return{error:"Invalid JSON response",raw:e,status:t.status}}}function uh(){return{"Content-Type":"application/json"}}function ch(t,e,n){var i;const r=(t==null?void 0:t.message)||(t==null?void 0:t.error)||((i=t==null?void 0:t.paystack_error)==null?void 0:i.message)||(t==null?void 0:t.error_type)||`${n}: ${e.status}`;return new Error(r)}const ju={async initialize({email:t,amount:e,phone:n,userId:r,activation_type:i}){const a=await fetch(`${oh}/initialize`,{method:"POST",headers:uh(),body:JSON.stringify({appId:ah,email:t,amount:e.toString(),phone:n,userId:r||"anonymous",activation_type:i||"account_activation"})}),u=await lh(a);if(!a.ok||!u.success)throw ch(u,a,"Payment initialization failed");return u},async checkStatus(t){const e=await fetch(`${oh}/status/${encodeURIComponent(t)}?appId=${ah}`,{method:"GET",headers:uh()}),n=await lh(e);if(!e.ok||!n.success)throw ch(n,e,"Status check failed");return n},async verify(t){const e=await fetch(`${oh}/verify/${encodeURIComponent(t)}?appId=${ah}`,{method:"GET",headers:uh()}),n=await lh(e);if(!e.ok||!n.success)throw ch(n,e,"Verification failed");return n},async submitOtp(t,e){const n=await fetch(`${oh}/submit-otp`,{appId:ah,method:"POST",headers:uh(),body:JSON.stringify({otp:e.toString(),reference:t})}),r=await lh(n);if(!n.ok||!r.success)throw ch(r,n,"OTP submission failed");return r},pollTransaction(t,e,n,r,i=36){let a=0,u=!1,d=!1,f=null;const p=async()=>{if(!(d||u)){a++;try{const w=await ju.checkStatus(t);if(d)return;if(w.paid){const E=await ju.verify(t).catch(()=>null);e(E||w);return}if(w.requires_action&&w.status==="send_otp"&&r){u=!0,r(t);return}if(w.can_retry){n({message:w.message||"Payment failed. Please try again."});return}a>=i&&n({timeout:!0})}catch(w){if(d)return;a>=i&&n({timeout:!0,error:w.message})}}};return f=setInterval(p,5e3),p(),{async resume(){d||(u=!1,a=0,p())},cancel(){d=!0,f&&clearInterval(f)}}}},cg="D7YT1YV-PCAM4ZN-HX9W5M1-H02KFCV",Q7=128,DI=t=>!t||isNaN(t)?"0.00":(t/Q7).toFixed(2),Y7=t=>{if(!t)return"";let e=t.replace(/\D/g,"");return e.startsWith("0")?e:e.startsWith("254")?"0"+e.slice(3):e.startsWith("7")||e.startsWith("1")?"0"+e:e},X7=({user:t,plan:e,onSuccess:n,onError:r,setProcessing:i,processing:a})=>{const[u,d]=A.useState(""),[f,p]=A.useState(""),[w,E]=A.useState(!1),[T,b]=A.useState(0),[I,L]=A.useState(null),V=A.useRef(null),U=A.useRef(null);A.useEffect(()=>()=>{V.current&&V.current.cancel()},[]);const M=async()=>
3259{if(!u){L("Please enter your phone number");return}L(null),i(!0),E(!1),p("");try{const te=await ju.initialize({email:t==null?void 0:t.email,amount:e.price,phone:u,userId:(t==null?void 0:t.uid)||(t==null?void 0:t.email),activation_type:"account_activation"});if(!te.reference)throw new Error("No reference returned from payment gateway");U.current=te.reference,b(1),V.current=ju.pollTransaction(te.reference,async()=>{i(!1),await n()},he=>{i(!1),b(0),L(he!=null&&he.timeout?"Payment timed out. Please check your transaction status.":(he==null?void 0:he.message)||"Payment failed. Please try again."),r&&r(he)},he=>{E(!0),i(!1)})}catch(te){i(!1),L(te.message),r&&r(te)}},Q=async()=>{if(!f){L("Please enter the OTP sent to your phone");return}L(null),i(!0);try{await ju.submitOtp(U.current,f),E(!1),i(!0),b(1),V.current&&await V.current.resume()}catch(te){i(!1),L(te.message),r&&r(te)}};return m.jsxs("div",{className:"mpesa-form",children:[I&&m.jsxs("div",{className:"error-message",children:[m.jsx("span",{className:"error-icon",children:"⚠️"}),I]}),!w&&m.jsxs(m.Fragment,{children:[m.jsx("label",{className:"input-label",children:"Phone Number"}),m.jsxs("div",{className:"input-group",children:[m.jsx("span",{className:"input-prefix",children:"🇰🇪 +254"}),m.jsx("input",{type:"tel",placeholder:"7XX XXX XXX",value:u,onChange:te=>d(Y7(te.target.value)),className:"input-field",maxLength:10})]}),m.jsx("p",{className:"input-hint",children:"Enter your M-Pesa registered number"}),m.jsx("button",{className:"btn pay-btn",onClick:M,disabled:a,children:a?m.jsx("span",{className:"spinner",children:"Processing..."}):m.jsxs(m.Fragment,{children:[m.jsx(Kg,{})," Pay KSH ",e==null?void 0:e.price]})})]}),w&&m.jsxs(m.Fragment,{children:[m.jsx("label",{className:"input-label",children:"Enter OTP"}),m.jsx("input",{type:"text",placeholder:"Enter the code sent to your phone",value:f,onChange:te=>p(te.target.value),className:"input-field",maxLength:6}),m.jsx("p",{className:"input-hint",children:"A one-time code was sent to your phone to authorize this payment."}),m.jsx("button",{className:"btn pay-btn",onClick:Q,disabled:a,children:a?m.jsx("span",{className:"spinner",children:"Verifying..."}):m.jsxs(m.Fragment,{children:[m.jsx(Kg,{})," Submit OTP"]})})]})]})},J7="sk_live_QSCFYWDHaEL8Yv3V4JA49G7vm2muVRHxAiBhuhgP",Z7="https://api.korapay.com/merchant/api/v1/charges/initialize",e$=({user:t,plan:e,convertedPrice:n,symbol:r,subscription:i,onSuccess:a,processing:u,setProcessing:d})=>{const[f,p]=A.useState(null),w=()=>`ref-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,E=async()=>{var T;if(!(t!=null&&t.email)){Bt.fire({title:"Login Required",text:"Please login first",icon:"warning",confirmButtonText:"OK"});return}if(!e){Bt.fire({title:"Error",text:"No plan selected",icon:"error",confirmButtonText:"OK"});return}d(!0),p(null),Bt.fire({title:"Initializing Payment",text:"Please wait...",allowOutsideClick:!1,showConfirmButton:!1,didOpen:()=>Bt.showLoading()});try{const b=w(),I=window.location.href.split("?")[0],L=n||e.convertedPrice||e.price,V=((i==null?void 0:i.currency)||r)==="₦"?"NGN":"KES",U=Math.round(Number(L)),M={amount:U,redirect_url:`${I}?reference=${b}`,currency:V,reference:b,narration:`${e.plan} VIP Subscription`,customer:{name:(t==null?void 0:t.username)||(t!=null&&t.email?t.email.split("@")[0]:"Customer"),email:t==null?void 0:t.email},metadata:{plan:e.plan,user_id:t==null?void 0:t.email,original_price:e.price,converted_price:U}},te=await(await fetch(Z7,{method:"POST",headers:{Authorization:`Bearer ${J7}`,"Content-Type":"application/json"},body:JSON.stringify(M)})).json();if(Bt.close(),te.status&&((T=te.data)!=null&&T.checkout_url))window.location.href=te.data.checkout_url;else throw new Error(te.message||"Failed to initialize payment")}catch(b){d(!1),p(b.message||"Failed to initialize payment"),Bt.fire({title:"Payment Error",text:b.message||"Failed to initialize payment",icon:"error",confirmButtonText:"OK"})}};return m.jsxs("div",{className:"kora-form",children:[f&&m.jsxs("div",{className:"error-message",children:[m.jsx("span",{className:"error-icon",children:"⚠️"}),f]}),m.jsx("p",{className:"input-hint",children:"Pay securely with M-Pesa, card, or bank transfer via Kora. You will be redirected to complete your payment."}),m.jsxs("p",{className:"payment-amount",children:["Amount to pay: ",m.jsxs("strong",{children:[r," ",n||(e==null?void 0:e.convertedPrice)||(e==null?void 0:e.price)]})]}),m.jsx("button",{className:"btn pay-btn",onClick:E,disabled:u,children:u?m.jsx("span",{className:"spinner",children:"Processing..."}):m.jsxs(m.Fragment,{children:[m.jsx(Ev,{})," Pay ",r," ",n||(e==null?void 0:e.convertedPrice)||(e==null?void 0:e.price)]})})]})},t$=({user:t,plan:e,convertedPrice:n,symbol:r,currency:i,onSuccess:a,processing:u,setProcessing:d})=>{const[f,p]=A.useState(null),w=()=>{var U;const L=n||(e==null?void 0:e.convertedPrice)||(e==null?void 0:e.price)||0;return{public_key:"FLWPUBK-38aac8e4c9002a02b46496e8ef4b32ab-X",tx_ref:`fw-${Date.now()}-${Math.random().toString(36).substr(2,6)}`,amount:Number(L),currency:i,payment_options:"card,mobilemoney,ussd,banktransfer",redirect_url:window.location.href,customer:{email:(t==null?void 0:t.email)||"[email protected]",phonenumber:(t==null?void 0:t.phone)||"",name:(t==null?void 0:t.username)||((U=t==null?void 0:t.email)==null?void 0:U.split("@")[0])||"Customer"}
3259,customizations:{title:`${(e==null?void 0:e.plan)||"VIP"} Subscription`,description:`Upgrade to ${(e==null?void 0:e.plan)||"Premium"} plan - ${(e==null?void 0:e.billing)||"monthly"} subscription`,logo:"https://your-logo-url.com/logo.png"},meta:{plan:(e==null?void 0:e.plan)||"premium",user_id:(t==null?void 0:t.email)||"unknown",billing:(e==null?void 0:e.billing)||"monthly",original_price:(e==null?void 0:e.price)||0}}},E=useFlutterwave(w()),T=()=>{p(null),d(!0),E({callback:async L=>{L.status==="successful"?(d(!1),Bt.fire({icon:"success",title:"Payment Successful!",text:"Your subscription is being activated...",timer:1500,showConfirmButton:!1}),await a()):L.status==="cancelled"?(d(!1),p("Payment was cancelled")):(d(!1),p("Payment failed. Please try again."))},onClose:()=>{d(!1)}})};A.useEffect(()=>{const L=new URLSearchParams(window.location.search),V=L.get("status"),U=L.get("tx_ref");L.get("transaction_id"),V==="successful"&&U&&b()},[]);const b=async(L,V)=>{d(!0),Bt.fire({title:"Verifying Payment",text:"Please wait...",allowOutsideClick:!1,showConfirmButton:!1,didOpen:()=>Bt.showLoading()});try{setTimeout(async()=>{Bt.close(),await a(),d(!1)},2e3),window.history.replaceState({},document.title,window.location.pathname)}catch{Bt.close(),d(!1),Bt.fire({title:"Verification Error",text:"Please contact support",icon:"error",confirmButtonText:"OK"})}},I=w();return m.jsxs("div",{className:"flutterwave-form",children:[f&&m.jsxs("div",{className:"error-message",children:[m.jsx("span",{className:"error-icon",children:"⚠️"}),f]}),m.jsx("p",{className:"input-hint",children:"Pay securely with card, mobile money, or bank transfer via Flutterwave."}),m.jsxs("div",{className:"payment-details",children:[m.jsxs("div",{className:"detail-row",children:[m.jsx("span",{children:"Plan:"}),m.jsxs("strong",{children:[e==null?void 0:e.plan," (",e==null?void 0:e.billing,")"]})]}),m.jsxs("div",{className:"detail-row",children:[m.jsx("span",{children:"Amount:"}),m.jsxs("strong",{children:[r," ",n||(e==null?void 0:e.convertedPrice)||(e==null?void 0:e.price)]})]}),m.jsxs("div",{className:"detail-row",children:[m.jsx("span",{children:"Currency:"}),m.jsx("strong",{children:I.currency})]}),m.jsxs("div",{className:"detail-row",children:[m.jsx("span",{children:"Reference:"}),m.jsx("strong",{className:"reference-text",children:I.tx_ref})]})]}),m.jsx("button",{className:"btn pay-btn flutterwave-btn",onClick:T,disabled:u,children:u?m.jsx("span",{className:"spinner",children:"Processing..."}):m.jsxs(m.Fragment,{children:[m.jsx("svg",{className:"fw-icon",viewBox:"0 0 24 24",width:"20",height:"20",children:m.jsx("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})}),"Pay ",r," ",n||(e==null?void 0:e.convertedPrice)||(e==null?void 0:e.price)," with Flutterwave"]})}),m.jsx("p",{className:"payment-secure",children:"🔒 Secured by Flutterwave"})]})},n$=({plan:t,onSuccess:e})=>{var x;const[n,r]=A.useState("BTC"),[i,a]=A.useState(null),[u,d]=A.useState([]),[f,p]=A.useState(!1),[w,E]=A.useState(null),[T,b]=A.useState(!1),[I,L]=A.useState(null),[V,U]=A.useState(!1),M=A.useRef(null);A.useEffect(()=>{(async()=>{try{const B=await(await fetch("https://api.nowpayments.io/v1/merchant/coins",{headers:{"x-api-key":cg}})).json();d((B==null?void 0:B.selectedCurrencies)||[])}catch(F){console.error("Crypto currencies fetch failed",F)}})()},[]),A.useEffect(()=>()=>{M.current&&(clearInterval(M.current),M.current=null)},[]);const Q=()=>{if(!t)return 0;const k=t.convertedPrice||t.price||0;return DI(k)},te=async()=>{b(!0),E(null),a(null),L(null),M.current&&(clearInterval(M.current),M.current=null),U(!1);try{const k=Q(),F=await fetch("https://api.nowpayments.io/v1/payment",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":cg},body:JSON.stringify({price_amount:parseFloat(k),price_currency:"usd",pay_currency:n.toLowerCase(),order_id:`VIP-${(t==null?void 0:t.plan)||"sub"}-${Date.now()}`,order_description:`${(t==null?void 0:t.plan)||""} VIP Subscription`})}),B=await F.json();if(!F.ok||!B.pay_address)throw new Error(B.message||"Failed to generate address");a({amount:B.pay_amount,currency:B.pay_currency,address:B.pay_address,network:B.network}),L(B.payment_id)}catch(k){E((k==null?void 0:k.message)||"Failed to generate crypto address. Please try again.")}finally{b(!1)}},he=k=>{r(k),a(null),L(null),M.current&&(clearInterval(M.current),M.current=null),U(!1)},ae=async()=>
3259{if(!I)return!1;try{const B=(await(await fetch(`https://api.nowpayments.io/v1/payment/${I}`,{headers:{"x-api-key":cg}})).json()).payment_status;return B==="finished"||B==="confirmed"||B==="sending"?(M.current&&(clearInterval(M.current),M.current=null),U(!1),await e(),!0):B==="failed"||B==="refunded"||B==="expired"?(M.current&&(clearInterval(M.current),M.current=null),U(!1),E("Payment was not successful. Please generate a new address and try again."),!0):!1}catch{return!1}},D=()=>{if(!I){E("Please generate a payment address first.");return}M.current&&clearInterval(M.current),U(!0),E(null),M.current=setInterval(async()=>{await ae()&&M.current&&(clearInterval(M.current),M.current=null)},1e4),ae()},R=()=>{i!=null&&i.address&&(navigator.clipboard.writeText(i.address),p(!0),setTimeout(()=>p(!1),1500))};return m.jsxs("div",{className:"crypto-form",children:[w&&m.jsxs("div",{className:"error-message",children:[m.jsx("span",{className:"error-icon",children:"⚠️"}),w]}),m.jsxs("div",{className:"currency-selector",children:[m.jsx("label",{className:"input-label",children:"Select Currency"}),m.jsxs("div",{className:"select-wrapper",children:[m.jsx("select",{value:n,onChange:k=>he(k.target.value),className:"input-field select",disabled:T,children:u.map(k=>m.jsx("option",{value:k,children:k},k))}),m.jsx(bb,{className:"select-icon"})]})]}),i?m.jsxs("div",{className:"crypto-info",children:[m.jsxs("div",{className:"crypto-row",children:[m.jsx("span",{className:"crypto-label",children:"Amount to send"}),m.jsxs("span",{className:"crypto-value",children:[i.amount," ",i.currency]})]}),m.jsxs("div",{className:"crypto-row",children:[m.jsx("span",{className:"crypto-label",children:"Network"}),m.jsx("span",{className:"crypto-value",children:(x=i.network)==null?void 0:x.toUpperCase()})]}),m.jsxs("div",{className:"crypto-row address",children:[m.jsx("span",{className:"crypto-label",children:"Address"}),m.jsxs("div",{className:"address-box",children:[m.jsx("input",{value:i.address,readOnly:!0,className:"address-input"}),m.jsx("button",{onClick:R,className:"copy-btn",children:f?m.jsx(_v,{}):m.jsx(c9,{})})]})]}),m.jsx("p",{className:"crypto-note",children:"Send the exact amount to the address above."}),m.jsxs("div",{className:"crypto-actions",children:[m.jsx("button",{className:"btn pay-btn",onClick:te,disabled:T,children:T?"Generating...":"Generate New Address"}),!V&&m.jsx("button",{className:"btn pay-btn",onClick:D,disabled:!I,children:"Check Payment Status"})]}),V&&m.jsx("p",{className:"crypto-note polling-note",children:"Monitoring payment status..."})]}):m.jsx("button",{className:"btn pay-btn full-width",onClick:te,disabled:T,children:T?"Generating Address...":"Generate Payment Address"})]})},r$=({plan:t,onSuccess:e,onError:n,processing:r,setProcessing:i})=>{const[a,u]=A.useState(0);A.useEffect(()=>{u(E=>E+1)},[t==null?void 0:t.price]);const d=()=>DI((t==null?void 0:t.price)||0),f=(E,T)=>T.order.create({purchase_units:[{amount:{value:d(),currency_code:"USD"},description:`${t.plan} VIP Subscription`}]}),p=(E,T)=>T.order.capture().then(async()=>{i(!0),await e(),i(!1)}),w=E=>{console.error("PayPal Error:",E),i(!1);const T=(E==null?void 0:E.message)||"PayPal payment failed. Please try again.";n&&n(T)};return m.jsxs("div",{className:"paypal-form",children:[m.jsxs("div",{className:"paypal-price",children:[m.jsx("span",{className:"usd-label",children:"Pay with PayPal"}),m.jsxs("span",{className:"usd-amount",children:["$",d()]})]}),m.jsx("div",{className:"paypal-buttons",children:m.jsx(Iv,{style:{layout:"horizontal",color:"gold",shape:"pill",label:"pay"},createOrder:f,onApprove:p,onError:w,disabled:r},a)})]})},dh="https://nyozbdktnycqdiurbbjv.supabase.co",ki="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im55b3piZGt0bnljcWRpdXJiYmp2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODU0NjgwODksImV4cCI6MjEwMTA0NDA4OX0.pHdJF8VCY14dhYRBGz7YqQYWgKgdC5sqeL4L5Z8jZuY";async function hh(t){const e=await t.text();try{return JSON.parse(e)}catch{return{error:"Invalid JSON response",raw:e,status:t.status}}}const OI={async initiateMpesa(t,e,n,r,i){const a=await fetch(`${dh}/functions/v1/payment/initiate/mpesa`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ki}`,apikey:ki},body:JSON.stringify({amount:t.toString(),currency:e||"KES",phone:n,email:r||"[email protected]",fullname:i||"Customer"})}),u=await hh(a);if(!a.ok)throw new Error(u.error||u.message||`Payment failed: ${a.status}`);return u},async checkStatus(t){const e=await fetch(`${dh}/functions/v1/payment/status`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ki}`,apikey:ki},body:JSON.stringify({checkoutId:t})}),n=await hh(e);if(!e.ok)throw new Error(n.error||n.message||`Status check failed: ${e.status}`);return n},pollTransaction(t,e,n,r=30){let i=0;const a=setInterval(async()=>{i++;try{const u=await OI.checkStatus(t);u.success&&u.status==="SUCCESS"?(clearInterval(a),e(u)):u.status==="FAILED"?(clearInterval(a),n(u)):i>=r&&(clearInterval(a),n({timeout:!0}))}catch(u){i>=r&&(clearInterval(a),n({timeout:!0,error:u.message}))}},5e3);return()=>clearInterval(a)},async verifyKora(t){const e=await fetch(`${dh}/functions/v1/payment/kora/verify`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ki}`,apikey:ki},body:JSON.stringify({reference:t})}),n=await hh(e);if(!e.ok)throw new Error(n.error||n.message||`Verification failed: ${e.status}`);return n},async initiateCard(t,e,n,r,i,a,u,d,f){const p=await fetch(`${dh}/functions/v1/payment/initiate/card`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ki}`,apikey:ki},body:JSON.stringify({amount:t.toString(),currency:e||"KES",email:n,fullname:r,card_number:i,cvv:a,expiry_month:u,expiry_year:d,pin:f})}),w=await hh(p);if(!p.ok)throw new Error(w.error||w.message||`Payment failed: ${p.status}`);return w}},s$=({plan:t,user:e,onSuccess:n,processing:r,setProcessing:i,onError:a})=>{const[u,d]=A.useState({card_number:"",cvv:"",expiry_month:"",expiry_year:"",pin:""}),[f,p]=A.useState(null),w=async()=>{var M;const{card_number:b,cvv:I,expiry_month:L,expiry_year:V,pin:U}=u;if(!b||!I||!L||!V){p("Please fill all card fields");return}p(null),i(!0);try{const Q=await OI.initiateCard(t.price,"KES",e==null?void 0:e.email,(M=e==null?void 0:e.email)==null?void 0:M.split("@")[0],b,I,L,V,U);if(Q.success)i(!1),await n();else throw new Error(Q.message||"Payment failed")}catch(Q){i(!1),p(Q.message),a&&a(Q.message)}},E=b=>(b.replace(/\s/g,"").replace(/\D/g,"").match(/(\d{0,4}
3259)/g)||[]).filter(Boolean).join(" "),T=(b,I)=>{let L=I;L=E(I),d({...u,[b]:L})};return m.jsxs("div",{className:"card-form",children:[f&&m.jsxs("div",{className:"error-message",children:[m.jsx("span",{className:"error-icon",children:"⚠️"}),f]}),m.jsx("div",{className:"input-group-2",children:m.jsxs("div",{children:[m.jsx("label",{className:"input-label",children:"Card Number"}),m.jsx("input",{type:"text",placeholder:"1234 5678 9012 3456",value:u.card_number,onChange:b=>T("card_number",b.target.value),className:"input-field",maxLength:19})]})}),m.jsxs("div",{className:"input-group-3",children:[m.jsxs("div",{children:[m.jsx("label",{className:"input-label",children:"MM"}),m.jsx("input",{type:"text",placeholder:"MM",value:u.expiry_month,onChange:b=>d({...u,expiry_month:b.target.value}),className:"input-field",maxLength:2})]}),m.jsxs("div",{children:[m.jsx("label",{className:"input-label",children:"YY"}),m.jsx("input",{type:"text",placeholder:"YY",value:u.expiry_year,onChange:b=>d({...u,expiry_year:b.target.value}),className:"input-field",maxLength:2})]}),m.jsxs("div",{children:[m.jsx("label",{className:"input-label",children:"CVV"}),m.jsx("input",{type:"text",placeholder:"123",value:u.cvv,onChange:b=>d({...u,cvv:b.target.value}),className:"input-field",maxLength:4})]})]}),m.jsxs("div",{children:[m.jsx("label",{className:"input-label",children:"PIN (optional)"}),m.jsx("input",{type:"password",placeholder:"****",value:u.pin,onChange:b=>d({...u,pin:b.target.value}),className:"input-field",maxLength:4})]}),m.jsx("button",{className:"btn pay-btn",onClick:w,disabled:r,children:r?m.jsx("span",{className:"spinner",children:"Processing..."}):m.jsxs(m.Fragment,{children:[m.jsx(Ev,{})," Pay KSH ",t==null?void 0:t.price]})})]})},i$=({plan:t,phone:e})=>m.jsxs("div",{className:"processing-step",children:[m.jsx("div",{className:"processing-ring",children:m.jsx("div",{className:"processing-spinner"})}),m.jsx("h3",{children:"Processing Payment"}),m.jsx("p",{children:"Please check your phone and enter your M-Pesa PIN to complete the transaction."}),m.jsxs("div",{className:"processing-details",children:[m.jsxs("span",{children:["Amount: KSH ",t==null?void 0:t.price]}),m.jsxs("span",{children:["Phone: ",e]})]})]}),o$={"client-id":"AXIggvGGvXozbZhdkvizPLd89nVYW8KoyNlHO0gHx7hjY_Ah_IfgXihUQGf7T2HUUVYx-D5SNncM0CtU",currency:"USD",intent:"capture"};function a$(){var B,P;const[t,e]=Wi(br),[n,r]=A.useState(!1),[i,a]=A.useState("kora"),[u,d]=A.useState(null),[f,p]=A.useState(0),[w,E]=A.useState(""),T=vs(),b=zt(),I=Zi(Js),[L,V]=Wi(jD),[U,M]=A.useState(null),[Q,te]=A.useState(0),{symbol:he,currency:ae,convertPrice:D}=Tv();A.useEffect(()=>{var le;switch((le=b.state)!=null&&le.subscription?(M(b.state.subscription),V(b.state.subscription)):M(L),ae){case"KES":a("kora");break;case"NGN":a("kora");break;default:a("flutterwave");break}},[b,L]),A.useEffect(()=>{var Xe;let le;(Xe=b.state)!=null&&Xe.subscription?le=b.state.subscription:le={...pricings[0]};const qe=D(le.price);M({...le,price:le.price,convertedPrice:qe,currency:le.currency||he}),te(qe),V(le)},[(B=b.state)==null?void 0:B.subscription]),A.useEffect(()=>{if((U==null?void 0:U.price)!==void 0){const le=D(U.price);te(le),M(qe=>({...qe,convertedPrice:le}))}},[U==null?void 0:U.price,D]),A.useEffect(()=>{new URLSearchParams(window.location.search).get("reference")&&!n&&R()},[]);const R=async le=>{r(!0),Bt.fire({title:"Verifying Payment",text:"Please wait...",allowOutsideClick:!1,showConfirmButton:!1,didOpen:()=>Bt.showLoading()});try{Bt.close(),await x(),window.history.replaceState({},document.title,window.location.pathname)}catch{Bt.close(),Bt.fire({title:"Verification Error",text:"Please contact support",icon:"error",confirmButtonText:"OK"}),r(!1)}},x=async()=>{try{const le=new Date().toISOString();await Gg(t.email,!0,{subDate:le,billing:U.billing,plan:U.plan},I),await Jf(t.email,e),r(!1),Bt.fire({icon:"success",title:"Welcome to VIP! 🎉",text:`You are now subscribed to the ${U.plan} plan.`,confirmButtonColor:"#059212",timer:3e3,showConfirmButton:!0}),T("/",{replace:!0})}catch(le){throw console.error("Upgrade error:",le),r(!1),d("Failed to update subscription. Please contact support."),le}},k=le=>{const qe=(le==null?void 0:le.message)||le||"Payment failed";d(qe)},F=le=>{a(le),d(null),p(0)};return m.jsx(eU,{options:o$,children:m.jsxs("div",{className:"pay-section",children:[m.jsx(Ss,{title:"Subscription"}),m.jsx(Es,{}),m.jsxs("div",{className:"pay-card",children:[m.jsxs("div",{className:"plan-header",children:[m.jsx("div",{className:"plan-badge",children:U==null?void 0:U.plan}),m.jsxs("h2",{className:"plan-title",children:["Upgrade to ",(U==null?void 0:U.plan)||"Premium"," Plan"]}),m.jsx("p",{className:"plan-desc",children:(U==null?void 0:U.title)||"Get access to premium features"}),m.jsxs("div",{className:"plan-price",children:[m.jsxs("span",{className:"price-amount",children:[he," ",Q||D(U==null?void 0:U.price)]}),m.jsxs("span",{className:"price-period",children:["/",(U==null?void 0:U.billing)||"month"]})]}),m.jsx("div",{className:"plan-features",children:(P=U==null?void 0:U.features)==null?void 0:P.map((le,qe)=>m.jsxs("span",{className:"feature-tag",children:[m.jsx(_v,{})," ",le]},qe))})]}),f===0&&m.jsxs(m.Fragment,{children:[m.jsx(K7,{selected:i,onChange:F,currency:ae}),m.jsxs("div",{className:"payment-form",children:[u&&m.jsxs("div",{className:"error-message",children:[m.jsx("span",{className:"error-icon",children:"⚠️"}),u]}),i==="mpesa"&&m.jsx(X7,{user:t,plan:U,onSuccess:x,onError:k,processing:n,setProcessing:r,convertedPrice:Q,symbol:he,subscription:L}),i==="kora"&&m.jsx(e$,{user:t,plan:U,onSuccess:x,onError:k,processing:n,setProcessing:r,convertedPrice:Q,symbol:he,currency:ae,subscription:L}),i==="flutterwave"&&m.jsx(t$,{user:t,plan:U,convertedPrice:Q,currency:ae,symbol
3259:he,onSuccess:x,processing:n,setProcessing:r}),i==="crypto"&&m.jsx(n$,{plan:U,onSuccess:x}),i==="card"&&m.jsx(s$,{plan:U,user:t,onSuccess:x,processing:n,setProcessing:r,onError:le=>d(le)}),i==="paypal"&&m.jsx(r$,{plan:U,onSuccess:x,onError:k,processing:n,setProcessing:r})]})]}),f===1&&m.jsx(i$,{plan:U,phone:w})]})]})})}function l$(t){return Fe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"},child:[]},{tag:"path",attr:{d:"m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"},child:[]}]})(t)}function u$(t){return Fe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"},child:[]},{tag:"path",attr:{d:"M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"},child:[]}]})(t)}function c$(t){return Fe({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"},child:[]},{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"},child:[]}]})(t)}function d$(t){return Fe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z",fill:"currentColor"},child:[]}]})(t)}function h$(){const[t,e]=Wi(Js);A.useEffect(()=>{if(t.isVisible){const i=setTimeout(()=>{e({isVisible:!1,type:null,message:null})},3500);return()=>clearTimeout(i)}},[t.isVisible,e]);const n=()=>{e({isVisible:!1,type:null,message:null})},r={error:m.jsx(aF,{className:"icon"}),warning:m.jsx(u$,{className:"icon"}),success:m.jsx(l$,{className:"icon"})};return t.isVisible?m.jsxs("div",{className:`notification ${t.type}`,children:[m.jsxs("div",{className:"notification-content",children:[r[t.type]||m.jsx(c$,{className:"icon"}),m.jsx("span",{className:"message",children:t.message})]}),m.jsx("button",{className:"close-btn",onClick:n,"aria-label":"Close",children:m.jsx(d$,{})})]}):null}function f$(){const[t,e]=A.useState(!0),[n,r]=Wi(br),[i,a]=A.useState(!1),u=Zi(Js),{locality:d}=Tv();A.useEffect(()=>{const p=EM(Tc,w=>{(async()=>(w?await Jf(w.email,r):r(null),e(!1)))()});return()=>p()},[]),A.useEffect(()=>{PF(n,u)},[n]),A.useEffect(()=>{if(n&&d!==void 0){NF(n,d);const p=DF();navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues(["architecture","model","platformVersion","fullVersionList"]).then(w=>{Z6(n.email,window.location.hostname,{device:p,...w})})}},[n]),A.useEffect(()=>{const p=()=>a(window.scrollY>200);return window.addEventListener("scroll",p,{passive:!0}),()=>window.removeEventListener("scroll",p)},[]);const f=()=>{window.scrollTo({top:0,behavior:"smooth"})};return t?m.jsx(Il,{}):m.jsxs("div",{className:"App",children:[m.jsx(a9,{}),m.jsx(h$,{}),m.jsxs(jR,{children:[m.jsx($r,{path:"/",element:m.jsx(gF,{})}),m.jsx($r,{path:"subscribe",element:m.jsx(xF,{children:m.jsx(a$,{})})}),m.jsx($r,{path:"about",element:m.jsx(_F,{})}),m.jsx($r,{path:"login",element:m.jsx(o2,{children:m.jsx(EF,{})})}),m.jsx($r,{path:"register",element:m.jsx(o2,{children:m.jsx(SF,{})})}),m.jsx($r,{path:"add-tip",element:m.jsx(sh,{children:m.jsx(bF,{})})}),m.jsx($r,{path:"edit-tip",element:m.jsx(sh,{children:m.jsx(IF,{})})}),m.jsx($r,{path:"users",element:m.jsx(sh,{children:m.jsx(AF,{})})}),m.jsx($r,{path:"users/:id",element:m.jsx(sh,{children:m.jsx(kF,{})})}),m.jsx($r,{path:"*",element:m.jsx(TF,{})})]}),i&&m.jsx("button",{className:"btn top",title:"to top",onClick:f,children:m.jsx(_D,{})}),m.jsx(l9,{})]})}GC.createRoot(document.getElementById("root")).render(m.jsx(uD,{children:m.jsx(lA,{children:m.jsx(A.StrictMode,{children:m.jsx(Db,{children:m.jsx(T9,{children:m.jsx(f$,{})})})})})}));

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.