PageSourceSearch

https://openfeedback.io/assets/index-4f48tAZ0.js

js openfeedback.io collected 2026-09-25 19:47:20 UTC 1,527,137 bytes, 6,513 lines download raw bytes

vendor: 4,374 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AdminApp-B8vFZvJm.js","assets/index-D351QW6U.js","assets/AdapterLuxon-CMl1aTWT.js","assets/AdapterLuxon-CxQ-jThw.css","assets/smallchat-d5sW7ySa.js","assets/Root-CxMUGQFv.js","assets/SuperAdminApp-D0cKHoNh.js"])))=>i.map(i=>d[i]);
2function J5(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var tRe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Oo(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var j0={exports:{}},zf={},B0={exports:{}},Xe={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var iA;function X5(){if(iA)return Xe;iA=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"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function g(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function w(M,G,ae){this.props=M,this.context=G,this.refs=S,this.updater=ae||v}w.prototype.isReactComponent={},w.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,G,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function b(){}b.prototype=w.prototype;function C(M,G,ae){this.props=M,this.context=G,this.refs=S,this.updater=ae||v}var I=C.prototype=new b;I.constructor=C,E(I,w.prototype),I.isPureReactComponent=!0;var P=Array.isArray,x=Object.prototype.hasOwnProperty,N={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function V(M,G,ae){var pe,ue={},Ee=null,fe=null;if(G!=null)for(pe in G.ref!==void 0&&(fe=G.ref),G.key!==void 0&&(Ee=""+G.key),G)x.call(G,pe)&&!k.hasOwnProperty(pe)&&(ue[pe]=G[pe]);var Re=arguments.length-2;if(Re===1)ue.children=ae;else if(1<Re){for(var Se=Array(Re),Me=0;Me<Re;Me++)Se[Me]=arguments[Me+2];ue.children=Se}if(M&&M.defaultProps)for(pe in Re=M.defaultProps,Re)ue[pe]===void 0&&(ue[pe]=Re[pe]);return{$$typeof:t,type:M,key:Ee,ref:fe,props:ue,_owner:N.current}}function L(M,G){return{$$typeof:t,type:M.type,key:G,ref:M.ref,props:M.props,_owner:M._owner}}
vendor: 5,145 bytes, lines 10-18
10function F(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function K(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ae){return G[ae]})}var ne=/\/+/g;function Q(M,G){return typeof M=="object"&&M!==null&&M.key!=null?K(""+M.key):G.toString(36)}function X(M,G,ae,pe,ue){var Ee=typeof M;(Ee==="undefined"||Ee==="boolean")&&(M=null);var fe=!1;if(M===null)fe=!0;else switch(Ee){case"string":case"number":fe=!0;break;case"object":switch(M.$$typeof){case t:case e:fe=!0}}if(fe)return fe=M,ue=ue(fe),M=pe===""?"."+Q(fe,0):pe,P(ue)?(ae="",M!=null&&(ae=M.replace(ne,"$&/")+"/"),X(ue,G,ae,"",function(Me){return Me})):ue!=null&&(F(ue)&&(ue=L(ue,ae+(!ue.key||fe&&fe.key===ue.key?"":(""+ue.key).replace(ne,"$&/")+"/")+M)),G.push(ue)),1;if(fe=0,pe=pe===""?".":pe+":",P(M))for(var Re=0;Re<M.length;Re++){Ee=M[Re];var Se=pe+Q(Ee,Re);fe+=X(Ee,G,ae,Se,ue)}else if(Se=g(M),typeof Se=="function")for(M=Se.call(M),Re=0;!(Ee=M.next()).done;)Ee=Ee.value,Se=pe+Q(Ee,Re++),fe+=X(Ee,G,ae,Se,ue);else if(Ee==="object")throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return fe}function ee(M,G,ae){if(M==null)return M;var pe=[],ue=0;return X(M,pe,"","",function(Ee){return G.call(ae,Ee,ue++)}),pe}function J(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(ae){(M._status===0||M._status===-1)&&(M._status=1,M._result=ae)},function(ae){(M._status===0||M._status===-1)&&(M._status=2,M._result=ae)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var Z={current:null},B={transition:null},te={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:B,ReactCurrentOwner:N};return Xe.Children={map:ee,forEach:function(M,G,ae){ee(M,function(){G.apply(this,arguments)},ae)},count:function(M){var G=0;return ee(M,function(){G++}),G},toArray:function(M){return ee(M,function(G){return G})||[]},only:function(M){if(!F(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Xe.Component=w,Xe.Fragment=n,Xe.Profiler=i,Xe.PureComponent=C,Xe.StrictMode=r,Xe.Suspense=c,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Xe.cloneElement=function(M,G,ae){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var pe=E({},M.props),ue=M.key,Ee=M.ref,fe=M._owner;if(G!=null){if(G.ref!==void 0&&(Ee=G.ref,fe=N.current),G.key!==void 0&&(ue=""+G.key),M.type&&M.type.defaultProps)var Re=M.type.defaultProps;for(Se in G)x.call(G,Se)&&!k.hasOwnProperty(Se)&&(pe[Se]=G[Se]===void 0&&Re!==void 0?Re[Se]:G[Se])}var Se=arguments.length-2;if(Se===1)pe.children=ae;else if(1<Se){Re=Array(Se);for(var Me=0;Me<Se;Me++)Re[Me]=arguments[Me+2];pe.children=Re}return{$$typeof:t,type:M.type,key:ue,ref:Ee,props:pe,_owner:fe}},Xe.createContext=function(M){return M={$$typeof:o,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:s,_context:M},M.Consumer=M},Xe.createElement=V,Xe.createFactory=function(M){var G=V.bind(null,M);return G.type=M,G},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(M){return{$$typeof:l,render:M}},Xe.isValidElement=F,Xe.lazy=function(M){return{$$typeof:h,_payload:{_status:-1,_result:M},_init:J}},Xe.memo=function(M,G){return{$$typeof:d,type:M,compare:G===void 0?null:G}},Xe.startTransition=function(M){var G=B.transition;B.transition={};try{M()}finally{B.transition=G}},Xe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},Xe.useCallback=function(M,G){return Z.current.useCallback(M,G)},Xe.useContext=function(M){return Z.current.useContext(M)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(M){return Z.current.useDeferredValue(M)},Xe.useEffect=function(M,G){return Z.current.useEffect(M,G)},Xe.useId=function(){return Z.current.useId()},Xe.useImperativeHandle=function(M,G,ae){return Z.current.useImperativeHandle(M,G,ae)},Xe.useInsertionEffect=function(M,G){return Z.current.useInsertionEffect(M,G)},Xe.useLayoutEffect=function(M,G){return Z.current.useLayoutEffect(M,G)},Xe.useMemo=function(M,G){return Z.current.useMemo(M,G)},Xe.useReducer=function(M,G,ae){return Z.current.useReducer(M,G,ae)},Xe.useRef=function(M){return Z.current.useRef(M)},Xe.useState=function(M){return Z.current.useState(M)},Xe.useSyncExternalStore=function(M,G,ae){return Z.current.useSyncExternalStore(M,G,ae)},Xe.useTransition=function(){return Z.current.useTransition()},Xe.version="18.2.0",Xe}var sA;function Hp(){return sA||(sA=1,B0.exports=X5()),B0.exports}/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var oA;function Z5(){if(oA)return zf;oA=1;var t=Hp(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INT
vendor: 6,116 bytes, lines 18-34
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,d){var h,m={},g=null,v=null;d!==void 0&&(g=""+d),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(v=c.ref);for(h in c)r.call(c,h)&&!s.hasOwnProperty(h)&&(m[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)m[h]===void 0&&(m[h]=c[h]);return{$$typeof:e,type:l,key:g,ref:v,props:m,_owner:i.current}}return zf.Fragment=n,zf.jsx=o,zf.jsxs=o,zf}var aA;function to(){return aA||(aA=1,j0.exports=Z5()),j0.exports}var A=to(),T=Hp();const ii=Pr(T),nv=J5({__proto__:null,default:ii},[T]);var ey={},z0={exports:{}},ti={},W0={exports:{}},q0={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */var lA;function eW(){return lA||(lA=1,(function(t){function e(B,te){var M=B.length;B.push(te);e:for(;0<M;){var G=M-1>>>1,ae=B[G];if(0<i(ae,te))B[G]=te,B[M]=ae,M=G;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var te=B[0],M=B.pop();if(M!==te){B[0]=M;e:for(var G=0,ae=B.length,pe=ae>>>1;G<pe;){var ue=2*(G+1)-1,Ee=B[ue],fe=ue+1,Re=B[fe];if(0>i(Ee,M))fe<ae&&0>i(Re,Ee)?(B[G]=Re,B[fe]=M,G=fe):(B[G]=Ee,B[ue]=M,G=ue);else if(fe<ae&&0>i(Re,M))B[G]=Re,B[fe]=M,G=fe;else break e}}return te}function i(B,te){var M=B.sortIndex-te.sortIndex;return M!==0?M:B.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],d=[],h=1,m=null,g=3,v=!1,E=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(B){for(var te=n(d);te!==null;){if(te.callback===null)r(d);else if(te.startTime<=B)r(d),te.sortIndex=te.expirationTime,e(c,te);else break;te=n(d)}}function P(B){if(S=!1,I(B),!E)if(n(c)!==null)E=!0,J(x);else{var te=n(d);te!==null&&Z(P,te.startTime-B)}}function x(B,te){E=!1,S&&(S=!1,b(V),V=-1),v=!0;var M=g;try{for(I(te),m=n(c);m!==null&&(!(m.expirationTime>te)||B&&!K());){var G=m.callback;if(typeof G=="function"){m.callback=null,g=m.priorityLevel;var ae=G(m.expirationTime<=te);te=t.unstable_now(),typeof ae=="function"?m.callback=ae:m===n(c)&&r(c),I(te)}else r(c);m=n(c)}if(m!==null)var pe=!0;else{var ue=n(d);ue!==null&&Z(P,ue.startTime-te),pe=!1}return pe}finally{m=null,g=M,v=!1}}var N=!1,k=null,V=-1,L=5,F=-1;function K(){return!(t.unstable_now()-F<L)}function ne(){if(k!==null){var B=t.unstable_now();F=B;var te=!0;try{te=k(!0,B)}finally{te?Q():(N=!1,k=null)}}else N=!1}var Q;if(typeof C=="function")Q=function(){C(ne)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ee=X.port2;X.port1.onmessage=ne,Q=function(){ee.postMessage(null)}}else Q=function(){w(ne,0)};function J(B){k=B,N||(N=!0,Q())}function Z(B,te){V=w(function(){B(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_continueExecution=function(){E||v||(E=!0,J(x))},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(B){switch(g){case 1:case 2:case 3:var te=3;break;default:te=g}var M=g;g=te;try{return B()}finally{g=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(B,te){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var M=g;g=B;try{return te()}finally{g=M}},t.unstable_scheduleCallback=function(B,te,M){var G=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?G+M:G):M=G,B){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=M+ae,B={id:h++,callback:te,priorityLevel:B,startTime:M,expirationTime:ae,sortIndex:-1},M>G?(B.sortIndex=M,e(d,B),n(c)===null&&B===n(d)&&(S?(b(V),V=-1):S=!0,Z(P,M-G))):(B.sortIndex=ae,e(c,B),E||v||(E=!0,J(x))),B},t.unstable_shouldYield=K,t.unstable_wrapCallback=function(B){var te=g;return function(){var M=g;g=te;try{return B.apply(this,arguments)}finally{g=M}}}})(q0)),q0}var uA;function tW(){return uA||(uA=1,W0.exports=eW()),W0.exports}/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var cA;function nW(){if(cA)return ti;cA=1;var t=Hp(),e=tW();function n(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)u+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(a,u){o(a,u),o(a+"Capture",u)}function o(a,u){for(i[a]=u,a=0;a<u.length;a++)r.add(u[a])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},m={};
vendor: 13,983 bytes, lines 34-38
34function g(a){return c.call(m,a)?!0:c.call(h,a)?!1:d.test(a)?m[a]=!0:(h[a]=!0,!1)}function v(a,u,f,p){if(f!==null&&f.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return p?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function E(a,u,f,p){if(u===null||typeof u>"u"||v(a,u,f,p))return!0;if(p)return!1;if(f!==null)switch(f.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function S(a,u,f,p,y,_,R){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=f,this.propertyName=a,this.type=u,this.sanitizeURL=_,this.removeEmptyString=R}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){w[a]=new S(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var u=a[0];w[u]=new S(u,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){w[a]=new S(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){w[a]=new S(a,2,!1,a,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(a){w[a]=new S(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){w[a]=new S(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){w[a]=new S(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){w[a]=new S(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){w[a]=new S(a,5,!1,a.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function C(a){return a[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(a){var u=a.replace(b,C);w[u]=new S(u,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var u=a.replace(b,C);w[u]=new S(u,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var u=a.replace(b,C);w[u]=new S(u,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){w[a]=new S(a,1,!1,a.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){w[a]=new S(a,1,!1,a.toLowerCase(),null,!0,!0)});function I(a,u,f,p){var y=w.hasOwnProperty(u)?w[u]:null;(y!==null?y.type!==0:p||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(E(u,f,y,p)&&(f=null),p||y===null?g(u)&&(f===null?a.removeAttribute(u):a.setAttribute(u,""+f)):y.mustUseProperty?a[y.propertyName]=f===null?y.type===3?!1:"":f:(u=y.attributeName,p=y.attributeNamespace,f===null?a.removeAttribute(u):(y=y.type,f=y===3||y===4&&f===!0?"":""+f,p?a.setAttributeNS(p,u,f):a.setAttribute(u,f))))}var P=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),N=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),K=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),B=Symbol.iterator;function te(a){return a===null||typeof a!="object"?null:(a=B&&a[B]||a["@@iterator"],typeof a=="function"?a:null)}var M=Object.assign,G;function ae(a){if(G===void 0)try{throw Error()}catch(f){var u=f.stack.trim().match(/\n( *(at )?)/);G=u&&u[1]||""}return`
35`+G+a}var pe=!1;function ue(a,u){if(!a||pe)return"";pe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(q){var p=q}Reflect.construct(a,[],u)}else{try{u.call()}catch(q){p=q}a.call(u.prototype)}else{try{throw Error()}catch(q){p=q}a()}}catch(q){if(q&&p&&typeof q.stack=="string"){for(var y=q.stack.split(`
36`),_=p.stack.split(`
37`),R=y.length-1,D=_.length-1;1<=R&&0<=D&&y[R]!==_[D];)D--;for(;1<=R&&0<=D;R--,D--)if(y[R]!==_[D]){if(R!==1||D!==1)do if(R--,D--,0>D||y[R]!==_[D]){var $=`
38`+y[R].replace(" at new "," at ");return a.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",a.displayName)),$}while(1<=R&&0<=D);break}}}finally{pe=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?ae(a):""}function Ee(a){switch(a.tag){case 5:return ae(a.type);case 16:return ae("Lazy");case 13:return ae("Suspense");case 19:return ae("SuspenseList");case 0:case 2:case 15:return a=ue(a.type,!1),a;case 11:return a=ue(a.type.render,!1),a;case 1:return a=ue(a.type,!0),a;default:return""}}function fe(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case k:return"Fragment";case N:return"Portal";case L:return"Profiler";case V:return"StrictMode";case Q:return"Suspense";case X:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case K:return(a.displayName||"Context")+".Consumer";case F:return(a._context.displayName||"Context")+".Provider";case ne:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ee:return u=a.displayName||null,u!==null?u:fe(a.type)||"Memo";case J:u=a._payload,a=a._init;try{return fe(a(u))}catch{}}return null}function Re(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=u.render,a=a.displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fe(u);case 8:return u===V?"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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function Se(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Me(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function kt(a){var u=Me(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,u),p=""+a[u];if(!a.hasOwnProperty(u)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,_=f.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return y.call(this)},set:function(R){p=""+R,_.call(this,R)}}),Object.defineProperty(a,u,{enumerable:f.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function Ue(a){a._valueTracker||(a._valueTracker=kt(a))}function Qe(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var f=u.getValue(),p="";return a&&(p=Me(a)?a.checked?"true":"false":a.value),a=p,a!==f?(u.setValue(a),!0):!1}function Ne(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function We(a,u){var f=u.checked;return M({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function qe(a,u){var f=u.defaultValue==null?"":u.defaultValue,p=u.checked!=null?u.checked:u.defaultChecked;f=Se(u.value!=null?u.value:f),a._wrapperState={initialChecked:p,initialValue:f,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Nn(a,u){u=u.checked,u!=null&&I(a,"checked",u,!1)}function Yt(a,u){Nn(a,u);var f=Se(u.value),p=u.type;if(f!=null)p==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}u.hasOwnProperty("value")?Tn(a,u.type,f):u.hasOwnProperty("defaultValue")&&Tn(a,u.type,Se(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(a.defaultChecked=!!u.defaultChecked)}function Jt(a,u,f){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var p=u.type;if(!(p!=="submit"&&p!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+a._wrapperState.initialValue,f||u===a.value||(a.value=u),a.defaultValue=u}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function Tn(a,u,f){(u!=="number"||Ne(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var _t=Array.isArray;function Je(a,u,f,p){if(a=a.options,u){u={};for(var y=0;y<f.length;y++)u["$"+f[y]]=!0;for(f=0;f<a.length;f++)y=u.hasOwnProperty("$"+a[f].value),a[f].selected!==y&&(a[f].selected=y),y&&p&&(a[f].defaultSelected=!0)}else{for(f=""+Se(f),u=null,y=0;y<a.length;y++){if(a[y].value===f){a[y].selected=!0,p&&(a[y].defaultSelected=!0);return}u!==null||a[y].disabled||(u=a[y])}u!==null&&(u.selected=!0)}}function mn(a,u){if(u.dangerouslySetInnerHTML!=null)throw Error(n(91));return M({},u,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function jt(a,u){var f=u.value;if(f==null){if(f=u.children,u=u.defaultValue,f!=null){if(u!=null)throw Error(n(92));if(_t(f)){if(1<f.length)throw Error(n(93));f=f[0]}u=f}u==null&&(u=""),f=u}a._wrapperState={initialValue:Se(f)}}function at(a,u){var f=Se(u.value),p=Se(u.defaultValue);f!=null&&(f=""+f,f!==a.value&&(a.value=f),u.defaultValue==null&&a.defaultValue!==f&&(a.defaultValue=f)),p!=null&&(a.defaultValue=""+p)}function bn(a){var u=a.textContent;u===a._wrapperState.initialValue&&u!==""&&u!==null&&(a.value=u)}function Dn(a){switch(a){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 Mn(a,u){return a==null||a==="http://www.w3.org/1999/xhtml"?Dn(u):a==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var et,Le=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,f,p,y){MSApp.execUnsafeLocalFunction(function(){return a(u,f,p,y)})}:a})(function(a,u){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=u;else{for(et=et||document.createElement("div"),et.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=et.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}});function Nt(a,u){if(u){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=u;return}}a.textContent=u}var Mr={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},di=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(a){di.forEach(function(u){u=u+a.charAt(0).toUpperCase()+a.substring(1),Mr[u]=Mr[a]})});function De(a,u,f){return u==null||typeof u=="boolean"||u===""?"":f||typeof u!="number"||u===0||Mr.hasOwnProperty(a)&&Mr[a]?(""+u).trim():u+"px"}function mt(a,u){a=a.style;for(var f in u)if(u.hasOwnProperty(f)){var p=f.indexOf("--")===0,y=De(f,u[f],p);f==="float"&&(f="cssFloat"),p?a.setProperty(f,y):a[f]=y}}var Bt=M({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 Lr(a,u){if(u){if(Bt[a]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,a));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function ws(a,u){if(a.indexOf("-")===-1)return typeof u.is=="str
38ing";switch(a){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 Du=null;function rf(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var sf=null,Bo=null,so=null;function of(a){if(a=kf(a)){if(typeof sf!="function")throw Error(n(280));var u=a.stateNode;u&&(u=mg(u),sf(a.stateNode,a.type,u))}}function af(a){Bo?so?so.push(a):so=[a]:Bo=a}function lf(){if(Bo){var a=Bo,u=so;if(so=Bo=null,of(a),u)for(a=0;a<u.length;a++)of(u[a])}}function jm(a,u){return a(u)}function Bm(){}var uf=!1;function Mu(a,u,f){if(uf)return a(u,f);uf=!0;try{return jm(a,u,f)}finally{uf=!1,(Bo!==null||so!==null)&&(Bm(),lf())}}function ll(a,u){var f=a.stateNode;if(f===null)return null;var p=mg(f);if(p===null)return null;f=p[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(n(231,u,typeof f));return f}var oo=!1;if(l)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){oo=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{oo=!1}function fi(a,u,f,p,y,_,R,D,$){var q=Array.prototype.slice.call(arguments,3);try{u.apply(f,q)}catch(oe){this.onError(oe)}}var Zi=!1,Lu=null,Es=!1,ul=null,zm={onError:function(a){Zi=!0,Lu=a}};function Wm(a,u,f,p,y,_,R,D,$){Zi=!1,Lu=null,fi.apply(zm,arguments)}function qm(a,u,f,p,y,_,R,D,$){if(Wm.apply(this,arguments),Zi){if(Zi){var q=Lu;Zi=!1,Lu=null}else throw Error(n(198));Es||(Es=!0,ul=q)}}function Ss(a){var u=a,f=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do u=a,(u.flags&4098)!==0&&(f=u.return),a=u.return;while(a)}return u.tag===3?f:null}function Hm(a){if(a.tag===13){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function Gm(a){if(Ss(a)!==a)throw Error(n(188))}function oE(a){var u=a.alternate;if(!u){if(u=Ss(a),u===null)throw Error(n(188));return u!==a?null:a}for(var f=a,p=u;;){var y=f.return;if(y===null)break;var _=y.alternate;if(_===null){if(p=y.return,p!==null){f=p;continue}break}if(y.child===_.child){for(_=y.child;_;){if(_===f)return Gm(y),a;if(_===p)return Gm(y),u;_=_.sibling}throw Error(n(188))}if(f.return!==p.return)f=y,p=_;else{for(var R=!1,D=y.child;D;){if(D===f){R=!0,f=y,p=_;break}if(D===p){R=!0,p=y,f=_;break}D=D.sibling}if(!R){for(D=_.child;D;){if(D===f){R=!0,f=_,p=y;break}if(D===p){R=!0,p=_,f=y;break}D=D.sibling}if(!R)throw Error(n(189))}}if(f.alternate!==p)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?a:u}function Km(a){return a=oE(a),a!==null?Ye(a):null}function Ye(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var u=Ye(a);if(u!==null)return u;a=a.sibling}return null}var mr=e.unstable_scheduleCallback,Pk=e.unstable_cancelCallback,lz=e.unstable_shouldYield,uz=e.unstable_requestPaint,gn=e.unstable_now,cz=e.unstable_getCurrentPriorityLevel,aE=e.unstable_ImmediatePriority,Ok=e.unstable_UserBlockingPriority,Qm=e.unstable_NormalPriority,dz=e.unstable_LowPriority,Nk=e.unstable_IdlePriority,Ym=null,Ts=null;function fz(a){if(Ts&&typeof Ts.onCommitFiberRoot=="function")try{Ts.onCommitFiberRoot(Ym,a,void 0,(a.current.flags&128)===128)}catch{}}var es=Math.clz32?Math.clz32:mz,hz=Math.log,pz=Math.LN2;function mz(a){return a>>>=0,a===0?32:31-(hz(a)/pz|0)|0}var Jm=64,Xm=4194304;function cf(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Zm(a,u){var f=a.pendingLanes;if(f===0)return 0;var p=0,y=a.suspendedLanes,_=a.pingedLanes,R=f&268435455;if(R!==0){var D=R&~y;D!==0?p=cf(D):(_&=R,_!==0&&(p=cf(_)))}else R=f&~y,R!==0?p=cf(R):_!==0&&(p=cf(_));if(p===0)return 0;if(u!==0&&u!==p&&(u&y)===0&&(y=p&-p,_=u&-u,y>=_||y===16&&(_&4194240)!==0))return u;if((p&4)!==0&&(p|=f&16),u=a.entangledLanes,u!==0)for(a=a.entanglements,u&=p;0<u;)f=31-es(u),y=1<<f,p|=a[f],u&=~y;return p}function gz(a,u){switch(a){case 1:case 2:case 4:return u+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 u+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 yz(a,u){for(var f=a.suspendedLanes,p=a.pingedLanes,y=a.expirationTimes,_=a.pendingLanes;0<_;){var R=31-es(_),D=1<<R,$=y[R];$===-1?((D&f)===0||(D&p)!==0)&&(y[R]=gz(D,u)):$<=u&&(a.expiredLanes|=D),_&=~D}}function lE(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Dk(){var a=Jm;return Jm<<=1,(Jm&4194240)===0&&(Jm=64),a}function uE(a){for(var u=[],f=0;31>f;f++)u.push(a);return u}function df(a,u,f){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,u=31-es(u),a[u]=f}function vz(a,u){var f=a.pendingLanes&~u;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=u,a.mutableReadLanes&=u,a.entangledLanes&=u,u=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0<f;){var y=31-es(f),_=1<<y;u[y]=0,p[y]=-1,a[y]=-1,f&=~_}}function cE(a,u){var f=a.entangledLanes|=u;for(a=a.entanglements;f;){var p=31-es(f),y=1<<p;y&u|a[p]&u&&(a[p]|=u),f&=~y}}var Tt=0;function Mk(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var Lk,dE,Vk,Fk,$k,fE=!1,eg=[],zo=null,Wo=null,qo=null,ff=new Map,hf=new Map,Ho=[],_z="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 Uk(a,u){switch(a){case"focusin":case"focusout":zo=null;break;case"dragenter":case"dragleave":Wo=null;break;case"mouseover":case"mouseout":qo=null;break;case"pointerover":case"pointerout":ff.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":hf.delete(u.pointerId)}}function pf(a,u,f,p,y,_){return a===null||a.nativeEvent!==_?(a={blockedOn:u,domEventName:f,eventSystemFlags:p,nativeEvent:_,targetContainers:[y]},u!==null&&(u=kf(u),u!==null&&dE(u)),a):(a.eventSystemFlags|=p,u=a.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),a)}
vendor: 4,120 bytes, line 38
38function wz(a,u,f,p,y){switch(u){case"focusin":return zo=pf(zo,a,u,f,p,y),!0;case"dragenter":return Wo=pf(Wo,a,u,f,p,y),!0;case"mouseover":return qo=pf(qo,a,u,f,p,y),!0;case"pointerover":var _=y.pointerId;return ff.set(_,pf(ff.get(_)||null,a,u,f,p,y)),!0;case"gotpointercapture":return _=y.pointerId,hf.set(_,pf(hf.get(_)||null,a,u,f,p,y)),!0}return!1}function jk(a){var u=cl(a.target);if(u!==null){var f=Ss(u);if(f!==null){if(u=f.tag,u===13){if(u=Hm(f),u!==null){a.blockedOn=u,$k(a.priority,function(){Vk(f)});return}}else if(u===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function tg(a){if(a.blockedOn!==null)return!1;for(var u=a.targetContainers;0<u.length;){var f=pE(a.domEventName,a.eventSystemFlags,u[0],a.nativeEvent);if(f===null){f=a.nativeEvent;var p=new f.constructor(f.type,f);Du=p,f.target.dispatchEvent(p),Du=null}else return u=kf(f),u!==null&&dE(u),a.blockedOn=f,!1;u.shift()}return!0}function Bk(a,u,f){tg(a)&&f.delete(u)}function Ez(){fE=!1,zo!==null&&tg(zo)&&(zo=null),Wo!==null&&tg(Wo)&&(Wo=null),qo!==null&&tg(qo)&&(qo=null),ff.forEach(Bk),hf.forEach(Bk)}function mf(a,u){a.blockedOn===u&&(a.blockedOn=null,fE||(fE=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Ez)))}function gf(a){function u(y){return mf(y,a)}if(0<eg.length){mf(eg[0],a);for(var f=1;f<eg.length;f++){var p=eg[f];p.blockedOn===a&&(p.blockedOn=null)}}for(zo!==null&&mf(zo,a),Wo!==null&&mf(Wo,a),qo!==null&&mf(qo,a),ff.forEach(u),hf.forEach(u),f=0;f<Ho.length;f++)p=Ho[f],p.blockedOn===a&&(p.blockedOn=null);for(;0<Ho.length&&(f=Ho[0],f.blockedOn===null);)jk(f),f.blockedOn===null&&Ho.shift()}var Vu=P.ReactCurrentBatchConfig,ng=!0;function Sz(a,u,f,p){var y=Tt,_=Vu.transition;Vu.transition=null;try{Tt=1,hE(a,u,f,p)}finally{Tt=y,Vu.transition=_}}function Tz(a,u,f,p){var y=Tt,_=Vu.transition;Vu.transition=null;try{Tt=4,hE(a,u,f,p)}finally{Tt=y,Vu.transition=_}}function hE(a,u,f,p){if(ng){var y=pE(a,u,f,p);if(y===null)PE(a,u,p,rg,f),Uk(a,p);else if(wz(y,a,u,f,p))p.stopPropagation();else if(Uk(a,p),u&4&&-1<_z.indexOf(a)){for(;y!==null;){var _=kf(y);if(_!==null&&Lk(_),_=pE(a,u,f,p),_===null&&PE(a,u,p,rg,f),_===y)break;y=_}y!==null&&p.stopPropagation()}else PE(a,u,p,null,f)}}var rg=null;function pE(a,u,f,p){if(rg=null,a=rf(p),a=cl(a),a!==null)if(u=Ss(a),u===null)a=null;else if(f=u.tag,f===13){if(a=Hm(u),a!==null)return a;a=null}else if(f===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;a=null}else u!==a&&(a=null);return rg=a,null}function zk(a){switch(a){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(cz()){case aE:return 1;case Ok:return 4;case Qm:case dz:return 16;case Nk:return 536870912;default:return 16}default:return 16}}var Go=null,mE=null,ig=null;function Wk(){if(ig)return ig;var a,u=mE,f=u.length,p,y="value"in Go?Go.value:Go.textContent,_=y.length;for(a=0;a<f&&u[a]===y[a];a++);var R=f-a;for(p=1;p<=R&&u[f-p]===y[_-p];p++);return ig=y.slice(a,1<p?1-p:void 0)}function sg(a){var u=a.keyCode;
vendor: 57,877 bytes, lines 38-41
38return"charCode"in a?(a=a.charCode,a===0&&u===13&&(a=13)):a=u,a===10&&(a=13),32<=a||a===13?a:0}function og(){return!0}function qk(){return!1}function hi(a){function u(f,p,y,_,R){this._reactName=f,this._targetInst=y,this.type=p,this.nativeEvent=_,this.target=R,this.currentTarget=null;for(var D in a)a.hasOwnProperty(D)&&(f=a[D],this[D]=f?f(_):_[D]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?og:qk,this.isPropagationStopped=qk,this}return M(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=og)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=og)},persist:function(){},isPersistent:og}),u}var Fu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gE=hi(Fu),yf=M({},Fu,{view:0,detail:0}),bz=hi(yf),yE,vE,vf,ag=M({},yf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wE,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==vf&&(vf&&a.type==="mousemove"?(yE=a.screenX-vf.screenX,vE=a.screenY-vf.screenY):vE=yE=0,vf=a),yE)},movementY:function(a){return"movementY"in a?a.movementY:vE}}),Hk=hi(ag),Iz=M({},ag,{dataTransfer:0}),Rz=hi(Iz),xz=M({},yf,{relatedTarget:0}),_E=hi(xz),kz=M({},Fu,{animationName:0,elapsedTime:0,pseudoElement:0}),Cz=hi(kz),Az=M({},Fu,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Pz=hi(Az),Oz=M({},Fu,{data:0}),Gk=hi(Oz),Nz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dz={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"},Mz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lz(a){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(a):(a=Mz[a])?!!u[a]:!1}function wE(){return Lz}var Vz=M({},yf,{key:function(a){if(a.key){var u=Nz[a.key]||a.key;if(u!=="Unidentified")return u}return a.type==="keypress"?(a=sg(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Dz[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wE,charCode:function(a){return a.type==="keypress"?sg(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?sg(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Fz=hi(Vz),$z=M({},ag,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kk=hi($z),Uz=M({},yf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wE}),jz=hi(Uz),Bz=M({},Fu,{propertyName:0,elapsedTime:0,pseudoElement:0}),zz=hi(Bz),Wz=M({},ag,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),qz=hi(Wz),Hz=[9,13,27,32],EE=l&&"CompositionEvent"in window,_f=null;l&&"documentMode"in document&&(_f=document.documentMode);var Gz=l&&"TextEvent"in window&&!_f,Qk=l&&(!EE||_f&&8<_f&&11>=_f),Yk=" ",Jk=!1;function Xk(a,u){switch(a){case"keyup":return Hz.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zk(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var $u=!1;function Kz(a,u){switch(a){case"compositionend":return Zk(u);case"keypress":return u.which!==32?null:(Jk=!0,Yk);case"textInput":return a=u.data,a===Yk&&Jk?null:a;default:return null}}function Qz(a,u){if($u)return a==="compositionend"||!EE&&Xk(a,u)?(a=Wk(),ig=mE=Go=null,$u=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Qk&&u.locale!=="ko"?null:u.data;default:return null}}var Yz={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 e1(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u==="input"?!!Yz[a.type]:u==="textarea"}function t1(a,u,f,p){af(p),u=fg(u,"onChange"),0<u.length&&(f=new gE("onChange","change",null,f,p),a.push({event:f,listeners:u}))}var wf=null,Ef=null;function Jz(a){_1(a,0)}function lg(a){var u=Wu(a);if(Qe(u))return a}function Xz(a,u){if(a==="change")return u}var n1=!1;if(l){var SE;if(l){var TE="oninput"in document;if(!TE){var r1=document.createElement("div");r1.setAttribute("oninput","return;"),TE=typeof r1.oninput=="function"}SE=TE}else SE=!1;n1=SE&&(!document.documentMode||9<document.documentMode)}function i1(){wf&&(wf.detachEvent("onpropertychange",s1),Ef=wf=null)}function s1(a){if(a.propertyName==="value"&&lg(Ef)){var u=[];t1(u,Ef,a,rf(a)),Mu(Jz,u)}}function Zz(a,u,f){a==="focusin"?(i1(),wf=u,Ef=f,wf.attachEvent("onpropertychange",s1)):a==="focusout"&&i1()}function e5(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return lg(Ef)}function t5(a,u){if(a==="click")return lg(u)}function n5(a,u){if(a==="input"||a==="change")return lg(u)}function r5(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var ts=typeof Object.is=="function"?Object.is:r5;function Sf(a,u){if(ts(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var f=Object.keys(a),p=Object.keys(u);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var y=f[p];if(!c.call(u,y)||!ts(a[y],u[y]))return!1}return!0}function o1(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function a1(a,u){var f=o1(a);a=0;for(var p;f;){if(f.nodeType===3){if(p=a+f.textContent.length,a<=u&&p>=u)return{node:f,offset:u-a};a=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=o1(f)}}function l1(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?l1(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function u1(){for(var a=window,u=Ne();u instanceof a.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)a=u.contentWindow;else break;u=Ne(a.document)}return u}function bE(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}function i5(a){var u=u1(),f=a.focusedElem,p=a.selectionRange;if(u!==f&&f&&f.ownerDocument&&l1(f.ownerDocument.documentElement,f)){if(p!==null&&bE(f)){if(u=p.start,a=p.end,a===void 0&&(a=u),"selectionStart"in f)f.selectionStart=u,f.selectionEnd=Math.min(a,f.value.length);else if(a=(u=f.ownerDocument||document)&&u.defaultView||window,a.getSelection){a=a.getSelection();var y=f.textContent.length,_=Math.min(p.start,y);p=p.end===void 0?_:Math.min(p.end,y),!a.extend&&_>p&&(y=p,p=_,_=y),y=a1(f,_);var R=a1(f,p);y&&R&&(a.rangeCount!==1||a.anchorNode!==y.node||a.anchorOffset!==y.offset||a.focusNode!==R.node||a.focusOffset!==R.offset)&&(u=u.createRange(),u.setStart(y.node,y.offset),a.removeAllRanges(),_>p?(a.addRange(u),a.extend(R.node,R.offset)):(u.setEnd(R.node,R.offset),a.addRange(u)))}}for(u=[],a=f;a=a.parentNode;)a.nodeType===1&&u.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<u.length;f++)a=u[f],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var s5=l&&"documentMode"in document&&11>=document.documentMode,Uu=null,IE=null,Tf=null,RE=!1;function c1(a,u,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;RE||Uu==null||Uu!==Ne(p)||(p=Uu,"selectionStart"in p&&bE(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Tf&&Sf(Tf,p)||(Tf=p,p=fg(IE,"onSelect"),0<p.length&&(u=new gE("onSelect","select",null,u,f),a.push({event:u,listeners:p}),u.target=Uu)))}function ug(a,u){var f={};return f[a.toLowerCase()]=u.toLowerCase(),f["Webkit"+a]="webkit"+u,f["Moz"+a]="moz"+u,f}var ju={animationend:ug("Animation","AnimationEnd"),animationiteration:ug("Animation","AnimationIteration"),animationstart:ug("Animation","AnimationStart"),transitionend:ug("Transition","TransitionEnd")},xE={},d1={};l&&(d1=document.createElement("div").style,"AnimationEvent"in window||(delete ju.animationend.animation,delete ju.animationiteration.animation,delete ju.animationstart.animation),"TransitionEvent"in window||delete ju.transitionend.transition);function cg(a){if(xE[a])return xE[a];if(!ju[a])return a;var u=ju[a],f;for(f in u)if(u.hasOwnProperty(f)&&f in d1)return xE[a]=u[f];return a}var f1=cg("animationend"),h1=cg("animationiteration"),p1=cg("animationstart"),m1=cg("transitionend"),g1=new Map,y1="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 Ko(a,u){g1.set(a,u),s(u,[a])}for(var kE=0;kE<y1.length;kE++){var CE=y1[kE],o5=CE.toLowerCase(),a5=CE[0].toUpperCase()+CE.slice(1);Ko(o5,"on"+a5)}Ko(f1,"onAnimationEnd"),Ko(h1,"onAnimationIteration"),Ko(p1,"onAnimationStart"),Ko("dblclick","onDoubleClick"),Ko("focusin","onFocus"),Ko("focusout","onBlur"),Ko(m1,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bf="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(" "),l5=new Set("cancel close invalid load scroll toggle".split(" ").concat(bf));function v1(a,u,f){var p=a.type||"unknown-event";a.currentTarget=f,qm(p,u,void 0,a),a.currentTarget=null}function _1(a,u){u=(u&4)!==0;for(var f=0;f<a.length;f++){var p=a[f],y=p.event;p=p.listeners;e:{var _=void 0;if(u)for(var R=p.length-1;0<=R;R--){var D=p[R],$=D.instance,q=D.currentTarget;if(D=D.listener,$!==_&&y.isPropagationStopped())break e;v1(y,D,q),_=$}else for(R=0;R<p.length;R++){if(D=p[R],$=D.instance,q=D.currentTarget,D=D.listener,$!==_&&y.isPropagationStopped())break e;v1(y,D,q),_=$}}}if(Es)throw a=ul,Es=!1,ul=null,a}function Dt(a,u){var f=u[VE];f===void 0&&(f=u[VE]=new Set);var p=a+"__bubble";f.has(p)||(w1(u,a,2,!1),f.add(p))}function AE(a,u,f){var p=0;u&&(p|=4),w1(f,a,p,u)}var dg="_reactListening"+Math.random().toString(36).slice(2);function If(a){if(!a[dg]){a[dg]=!0,r.forEach(function(f){f!=="selectionchange"&&(l5.has(f)||AE(f,!1,a),AE(f,!0,a))});var u=a.nodeType===9?a:a.ownerDocument;u===null||u[dg]||(u[dg]=!0,AE("selectionchange",!1,u))}}function w1(a,u,f,p){switch(zk(u)){case 1:var y=Sz;break;case 4:y=Tz;break;default:y=hE}f=y.bind(null,u,f,a),y=void 0,!oo||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),p?y!==void 0?a.addEventListener(u,f,{capture:!0,passive:y}):a.addEventListener(u,f,!0):y!==void 0?a.addEventListener(u,f,{passive:y}):a.addEventListener(u,f,!1)}function PE(a,u,f,p,y){var _=p;if((u&1)===0&&(u&2)===0&&p!==null)e:for(;;){if(p===null)return;var R=p.tag;if(R===3||R===4){var D=p.stateNode.containerInfo;if(D===y||D.nodeType===8&&D.parentNode===y)break;if(R===4)for(R=p.return;R!==null;){var $=R.tag;if(($===3||$===4)&&($=R.stateNode.containerInfo,$===y||$.nodeType===8&&$.parentNode===y))return;R=R.return}for(;D!==null;){if(R=cl(D),R===null)return;if($=R.tag,$===5||$===6){p=_=R;continue e}D=D.parentNode}}p=p.return}Mu(function(){var q=_,oe=rf(f),le=[];e:{var ie=g1.get(a);if(ie!==void 0){var we=gE,xe=a;switch(a){case"keypress":if(sg(f)===0)break e;case"keydown":case"keyup":we=Fz;break;case"focusin":xe="focus",we=_E;break;case"focusout":xe="blur",we=_E;break;case"beforeblur":case"afterblur":we=_E;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=Hk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=Rz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=jz;break;case f1:case h1:case p1:we=Cz;break;case m1:we=zz;break;case"scroll":we=bz;break;case"wheel":we=qz;break;case"copy":case"cut":case"paste":we=Pz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=Kk}var ke=(u&4)!==0,yn=!ke&&a==="scroll",j=ke?ie!==null?ie+"Capture":null:ie;ke=[];for(var U=q,z;U!==null;){z=U;var de=z.stateNode;if(z.tag===5&&de!==null&&(z=de,j!==null&&(de=ll(U,j),de!=null&&ke.push(Rf(U,de,z)))),yn)break;U=U.return}0<ke.length&&(ie=new we(ie,xe,null,f,oe),le.push({event:ie,listeners:ke}))}}if((u&7)===0){e:{if(ie=a==="mouseover"||a==="pointerover",we=a==="mouseout"||a==="pointerout",ie&&f!==Du&&(xe=f.relatedTarget||f.fromElement)&&(cl(xe)||xe[lo]))break e;if((we||ie)&&(ie=oe.window===oe?oe:(ie=oe.ownerDocument)?ie.defaultView||ie.parentWindow:window,we?(xe=f.relatedTarget||f.toElement,we=q,xe=xe?cl(xe):null,xe!==null&&(yn=Ss(xe),xe!==yn||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(we=null,xe=q),we!==xe)){if(ke=Hk,de="onMouseLeave",j="onMouseEnter",U="mouse",(a==="pointerout"||a==="pointerover")&&(ke=Kk,de="onPointerLeave",j="onPointerEnter",U="pointer"),yn=we==null?ie:Wu(we),z=xe==null?ie:Wu(xe),ie=new ke(de,U+"leave",we,f,oe),ie.target=yn,ie.relatedTarget=z,de=null,cl(oe)===q&&(ke=new ke(j,U+"enter",xe,f,oe),ke.target=z,ke.relatedTarget=yn,de=ke),yn=de,we&&xe)t:{for(ke=we,j=xe,U=0,z=ke;z;z=Bu(z))U++;for(z=0,de=j;de;de=Bu(de))z++;for(;0<U-z;)ke=Bu(ke),U--;for(;0<z-U;)j=Bu(j),z--;for(;U--;){if(ke===j||j!==null&&ke===j.alternate)break t;ke=Bu(ke),j=Bu(j)}ke=null}else ke=null;we!==null&&E1(le,ie,we,ke,!1),xe!==null&&yn!==null&&E1(le,yn,xe,ke,!0)}}e:{if(ie=q?Wu(q):window,we=ie.nodeName&&ie.nodeName.toLowerCase(),we==="select"||we==="input"&&ie.type==="file")var Ce=Xz;else if(e1(ie))if(n1)Ce=n5;else{Ce=e5;var Fe=Zz}else(we=ie.nodeName)&&we.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(Ce=t5);if(Ce&&(Ce=Ce(a,q))){t1(le,Ce,f,oe);break e}Fe&&Fe(a,ie,q),a==="focusout"&&(Fe=ie._wrapperState)&&Fe.controlled&&ie.type==="number"&&Tn(ie,"number",ie.value)}switch(Fe=q?Wu(q):window,a){case"focusin":(e1(Fe)||Fe.contentEditable==="true")&&(Uu=Fe,IE=q,Tf=null);break;case"focusout":Tf=IE=Uu=null;break;case"mousedown":RE=!0;break;case"contextmenu":case"mouseup":case"dragend":RE=!1,c1(le,f,oe);break;case"selectionchange":if(s5)break;case"keydown":case"keyup":c1(le,f,oe)}var $e;if(EE)e:{switch(a){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else $u?Xk(a,f)&&(je="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(je="onCompositionStart");je&&(Qk&&f.locale!=="ko"&&($u||je!=="onCompositionStart"?je==="onCompositionEnd"&&$u&&($e=Wk()):(Go=oe,mE="value"in Go?Go.value:Go.textContent,$u=!0)),Fe=fg(q,je),0<Fe.length&&(je=new Gk(je,a,null,f,oe),le.push({event:je,listeners:Fe}),$e?je.data=$e:($e=Zk(f),$e!==null&&(je.data=$e)))),($e=Gz?Kz(a,f):Qz(a,f))&&(q=fg(q,"onBeforeInput"),0<q.length&&(oe=new Gk("onBeforeInput","beforeinput",null,f,oe),le.push({event:oe,listeners:q}),oe.data=$e))}_1(le,u)})}function Rf(a,u,f){return{instance:a,listener:u,currentTarget:f}}function fg(a,u){for(var f=u+"Capture",p=[];a!==null;){var y=a,_=y.stateNode;y.tag===5&&_!==null&&(y=_,_=ll(a,f),_!=null&&p.unshift(Rf(a,_,y)),_=ll(a,u),_!=null&&p.push(Rf(a,_,y))),a=a.return}return p}function Bu(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function E1(a,u,f,p,y){for(var _=u._reactName,R=[];f!==null&&f!==p;){var D=f,$=D.alternate,q=D.stateNode;if($!==null&&$===p)break;D.tag===5&&q!==null&&(D=q,y?($=ll(f,_),$!=null&&R.unshift(Rf(f,$,D))):y||($=ll(f,_),$!=null&&R.push(Rf(f,$,D)))),f=f.return}R.length!==0&&a.push({event:u,listeners:R})}var u5=/\r\n?/g,c5=/\u0000|\uFFFD/g;function S1(a){return(typeof a=="string"?a:""+a).replace(u5,`
39`).replace(c5,"")}function hg(a,u,f){if(u=S1(u),S1(a)!==u&&f)throw Error(n(425))}function pg(){}var OE=null,NE=null;function DE(a,u){return a==="textarea"||a==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var ME=typeof setTimeout=="function"?setTimeout:void 0,d5=typeof clearTimeout=="function"?clearTimeout:void 0,T1=typeof Promise=="function"?Promise:void 0,f5=typeof queueMicrotask=="function"?queueMicrotask:typeof T1<"u"?function(a){return T1.resolve(null).then(a).catch(h5)}:ME;function h5(a){setTimeout(function(){throw a})}function LE(a,u){var f=u,p=0;do{var y=f.nextSibling;if(a.removeChild(f),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(p===0){a.removeChild(y),gf(u);return}p--}else f!=="$"&&f!=="$?"&&f!=="$!"||p++;f=y}while(f);gf(u)}function Qo(a){for(;a!=null;a=a.nextSibling){var u=a.nodeType;if(u===1||u===3)break;if(u===8){if(u=a.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return a}function b1(a){a=a.previousSibling;for(var u=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"){if(u===0)return a;u--}else f==="/$"&&u++}a=a.previousSibling}return null}var zu=Math.random().toString(36).slice(2),bs="__reactFiber$"+zu,xf="__reactProps$"+zu,lo="__reactContainer$"+zu,VE="__reactEvents$"+zu,p5="__reactListeners$"+zu,m5="__reactHandles$"+zu;function cl(a){var u=a[bs];if(u)return u;for(var f=a.parentNode;f;){if(u=f[lo]||f[bs]){if(f=u.alternate,u.child!==null||f!==null&&f.child!==null)for(a=b1(a);a!==null;){if(f=a[bs])return f;a=b1(a)}return u}a=f,f=a.parentNode}return null}function kf(a){return a=a[bs]||a[lo],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Wu(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(n(33))}function mg(a){return a[xf]||null}var FE=[],qu=-1;function Yo(a){return{current:a}}function Mt(a){0>qu||(a.current=FE[qu],FE[qu]=null,qu--)}function Ct(a,u){qu++,FE[qu]=a.current,a.current=u}var Jo={},gr=Yo(Jo),Yr=Yo(!1),dl=Jo;function Hu(a,u){var f=a.type.contextTypes;if(!f)return Jo;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===u)return p.__reactInternalMemoizedMaskedChildContext;var y={},_;for(_ in f)y[_]=u[_];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=y),y}function Jr(a){return a=a.childContextTypes,a!=null}function gg(){Mt(Yr),Mt(gr)}function I1(a,u,f){if(gr.current!==Jo)throw Error(n(168));Ct(gr,u),Ct(Yr,f)}function R1(a,u,f){var p=a.stateNode;if(u=u.childContextTypes,typeof p.getChildContext!="function")return f;p=p.getChildContext();for(var y in p)if(!(y in u))throw Error(n(108,Re(a)||"Unknown",y));return M({},f,p)}function yg(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Jo,dl=gr.current,Ct(gr,a),Ct(Yr,Yr.current),!0}function x1(a,u,f){var p=a.stateNode;if(!p)throw Error(n(169));f?(a=R1(a,u,dl),p.__reactInternalMemoizedMergedChildContext=a,Mt(Yr),Mt(gr),Ct(gr,a)):Mt(Yr),Ct(Yr,f)}var uo=null,vg=!1,$E=!1;function k1(a){uo===null?uo=[a]:uo.push(a)}function g5(a){vg=!0,k1(a)}function Xo(){if(!$E&&uo!==null){$E=!0;var a=0,u=Tt;try{var f=uo;for(Tt=1;a<f.length;a++){var p=f[a];do p=p(!0);while(p!==null)}uo=null,vg=!1}catch(y){throw uo!==null&&(uo=uo.slice(a+1)),mr(aE,Xo),y}finally{Tt=u,$E=!1}}return null}var Gu=[],Ku=0,_g=null,wg=0,Ai=[],Pi=0,fl=null,co=1,fo="";function hl(a,u){Gu[Ku++]=wg,Gu[Ku++]=_g,_g=a,wg=u}function C1(a,u,f){Ai[Pi++]=co,Ai[Pi++]=fo,Ai[Pi++]=fl,fl=a;var p=co;a=fo;var y=32-es(p)-1;p&=~(1<<y),f+=1;var _=32-es(u)+y;if(30<_){var R=y-y%5;_=(p&(1<<R)-1).toString(32),p>>=R,y-=R,co=1<<32-es(u)+y|f<<y|p,fo=_+a}else co=1<<_|f<<y|p,fo=a}function UE(a){a.return!==null&&(hl(a,1),C1(a,1,0))}function jE(a){for(;a===_g;)_g=Gu[--Ku],Gu[Ku]=null,wg=Gu[--Ku],Gu[Ku]=null;for(;a===fl;)fl=Ai[--Pi],Ai[Pi]=null,fo=Ai[--Pi],Ai[Pi]=null,co=Ai[--Pi],Ai[Pi]=null}var pi=null,mi=null,zt=!1,ns=null;function A1(a,u){var f=Mi(5,null,null,0);f.elementType="DELETED",f.stateNode=u,f.return=a,u=a.deletions,u===null?(a.deletions=[f],a.flags|=16):u.push(f)}function P1(a,u){switch(a.tag){case 5:var f=a.type;return u=u.nodeType!==1||f.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(a.stateNode=u,pi=a,mi=Qo(u.firstChild),!0):!1;case 6:return u=a.pendingProps===""||u.nodeType!==3?null:u,u!==null?(a.stateNode=u,pi=a,mi=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(f=fl!==null?{id:co,overflow:fo}:null,a.memoizedState={dehydrated:u,treeContext:f,retryLane:1073741824},f=Mi(18,null,null,0),f.stateNode=u,f.return=a,a.child=f,pi=a,mi=null,!0):!1;default:return!1}}function BE(a){return(a.mode&1)!==0&&(a.flags&128)===0}function zE(a){if(zt){var u=mi;if(u){var f=u;if(!P1(a,u)){if(BE(a))throw Error(n(418));u=Qo(f.nextSibling);var p=pi;u&&P1(a,u)?A1(p,f):(a.flags=a.flags&-4097|2,zt=!1,pi=a)}}else{if(BE(a))throw Error(n(418));a.flags=a.flags&-4097|2,zt=!1,pi=a}}}function O1(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;pi=a}function Eg(a){if(a!==pi)return!1;if(!zt)return O1(a),zt=!0,!1;var u;if((u=a.tag!==3)&&!(u=a.tag!==5)&&(u=a.type,u=u!=="head"&&u!=="body"&&!DE(a.type,a.memoizedProps)),u&&(u=mi)){if(BE(a))throw N1(),Error(n(418));for(;u;)A1(a,u),u=Qo(u.nextSibling)}if(O1(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));e:{for(a=a.nextSibling,u=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"){if(u===0){mi=Qo(a.nextSibling);break e}u--}else f!=="$"&&f!=="$!"&&f!=="$?"||u++}a=a.nextSibling}mi=null}}else mi=pi?Qo(a.stateNode.nextSibling):null;return!0}function N1(){for(var a=mi;a;)a=Qo(a.nextSibling)}function Qu(){mi=pi=null,zt=!1}function WE(a){ns===null?ns=[a]:ns.push(a)}var y5=P.ReactCurrentBatchConfig;function rs(a,u){if(a&&a.defaultProps){u=M({},u),a=a.defaultProps;for(var f in a)u[f]===void 0&&(u[f]=a[f]);return u}return u}var Sg=Yo(null),Tg=null,Yu=null,qE=null;function HE(){qE=Yu=Tg=null}function GE(a){var u=Sg.current;Mt(Sg),a._currentValue=u}function KE(a,u,f){for(;a!==null;){var p=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,p!==null&&(p.childLanes|=u)):p!==null&&(p.childLanes&u)!==u&&(p.childLanes|=u),a===f)break;a=a.return}}function Ju(a,u){Tg=a,qE=Yu=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&u)!==0&&(Xr=!0),a.firstContext=null)}function Oi(a){var u=a._currentValue;if(qE!==a)if(a={context:a,memoizedValue:u,next:null},Yu===null){if(Tg===null)throw Error(n(308));Yu=a,Tg.dependencies={lanes:0,firstContext:a}}else Yu=Yu.next=a;return u}var pl=null;function QE(a){pl===null?pl=[a]:pl.push(a)}function D1(a,u,f,p){var y=u.interleaved;return y===null?(f.next=f,QE(u)):(f.next=y.next,y.next=f),u.interleaved=f,ho(a,p)}function ho(a,u){a.lanes|=u;var f=a.alternate;for(f!==null&&(f.lanes|=u),f=a,a=a.return;a!==null;)a.childLanes|=u,f=a.alternate,f!==null&&(f.childLanes|=u),f=a,a=a.return;return f.tag===3?f.stateNode:null}var Zo=!1;function YE(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M1(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function po(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function ea(a,u,f){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(ct&2)!==0){var y=p.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),p.pending=u,ho(a,f)}return y=p.interleaved,y===null?(u.next=u,QE(p)):(u.next=y.next,y.next=u),p.interleaved=u,ho(a,f)}function bg(a,u,f){if(u=u.updateQueue,u!==null&&(u=u.shared,(f&4194240)!==0)){var p=u.lanes;p&=a.pendingLanes,f|=p,u.lanes=f,cE(a,f)}}function L1(a,u){var f=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var y=null,_=null;if(f=f.firstBaseUpdate,f!==null){do{var R={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};_===null?y=_=R:_=_.next=R,f=f.next}while(f!==null);_===null?y=_=u:_=_.next=u}else y=_=u;f={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:_,shared:p.shared,effects:p.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=u}function Ig(a,u,f,p){var y=a.updateQueue;Zo=!1;var _=y.firstBaseUpdate,R=y.lastBaseUpdate,D=y.shared.pending;if(D!==null){y.shared.pending=null;var $=D,q=$.next;$.next=null,R===null?_=q:R.next=q,R=$;var oe=a.alternate;oe!==null&&(oe=oe.updateQueue,D=oe.lastBaseUpdate,D!==R&&(D===null?oe.firstBaseUpdate=q:D.next=q,oe.lastBaseUpdate=$))}if(_!==null){var le=y.baseState;R=0,oe=q=$=null,D=_;do{var ie=D.lane,we=D.eventTime;if((p&ie)===ie){oe!==null&&(oe=oe.next={eventTime:we,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var xe=a,ke=D;switch(ie=u,we=f,ke.tag){case 1:if(xe=ke.payload,typeof xe=="function"){le=xe.call(we,le,ie);break e}le=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ke.payload,ie=typeof xe=="function"?xe.call(we,le,ie):xe,ie==null)break e;le=M({},le,ie);break e;case 2:Zo=!0}}D.callback!==null&&D.lane!==0&&(a.flags|=64,ie=y.effects,ie===null?y.effects=[D]:ie.push(D))}else we={eventTime:we,lane:ie,tag:D.tag,payload:D.payload,callback:D.callback,next:null},oe===null?(q=oe=we,$=le):oe=oe.next=we,R|=ie;if(D=D.next,D===null){if(D=y.shared.pending,D===null)break;ie=D,D=ie.next,ie.next=null,y.lastBaseUpdate=ie,y.shared.pending=null}}while(!0);if(oe===null&&($=le),y.baseState=$,y.firstBaseUpdate=q,y.lastBaseUpdate=oe,u=y.shared.interleaved,u!==null){y=u;do R|=y.lane,y=y.next;while(y!==u)}else _===null&&(y.shared.lanes=0);yl|=R,a.lanes=R,a.memoizedState=le}}function V1(a,u,f){if(a=u.effects,u.effects=null,a!==null)for(u=0;u<a.length;u++){var p=a[u],y=p.callback;if(y!==null){if(p.callback=null,p=f,typeof y!="function")throw Error(n(191,y));y.call(p)}}}var F1=new t.Component().refs;function JE(a,u,f,p){u=a.memoizedState,f=f(p,u),f=f==null?u:M({},u,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Rg={isMounted:function(a){return(a=a._reactInternals)?Ss(a)===a:!1},enqueueSetState:function(a,u,f){a=a._reactInternals;var p=Fr(),y=ia(a),_=po(p,y);_.payload=u,f!=null&&(_.callback=f),u=ea(a,_,y),u!==null&&(os(u,a,y,p),bg(u,a,y))},enqueueReplaceState:function(a,u,f){a=a._reactInternals;var p=Fr(),y=ia(a),_=po(p,y);_.tag=1,_.payload=u,f!=null&&(_.callback=f),u=ea(a,_,y),u!==null&&(os(u,a,y,p),bg(u,a,y))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var f=Fr(),p=ia(a),y=po(f,p);y.tag=2,u!=null&&(y.callback=u),u=ea(a,y,p),u!==null&&(os(u,a,p,f),bg(u,a,p))}};function $1(a,u,f,p,y,_,R){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,_,R):u.prototype&&u.prototype.isPureReactComponent?!Sf(f,p)||!Sf(y,_):!0}function U1(a,u,f){var p=!1,y=Jo,_=u.contextType;return typeof _=="object"&&_!==null?_=Oi(_):(y=Jr(u)?dl:gr.current,p=u.contextTypes,_=(p=p!=null)?Hu(a,y):Jo),u=new u(f,_),a.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Rg,a.stateNode=u,u._reactInternals=a,p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=y,a.__reactInternalMemoizedMaskedChildContext=_),u}function j1(a,u,f,p){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(f,p),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(f,p),u.state!==a&&Rg.enqueueReplaceState(u,u.state,null)}function XE(a,u,f,p){var y=a.stateNode;y.props=f,y.state=a.memoizedState,y.refs=F1,YE(a);var _=u.contextType;typeof _=="object"&&_!==null?y.context=Oi(_):(_=Jr(u)?dl:gr.current,y.context=Hu(a,_)),y.state=a.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(JE(a,u,_,f),y.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(u=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),u!==y.state&&Rg.enqueueReplaceState(y,y.state,null),Ig(a,f,y,p),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308)}function Cf(a,u,f){if(a=f.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(n(309));var p=f.stateNode}if(!p)throw Error(n(147,a));var y=p,_=""+a;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===_?u.ref:(u=function(R){var D=y.refs;D===F1&&(D=y.refs={}),R===null?delete D[_]:D[_]=R},u._stringRef=_,u)}if(typeof a!="string")throw Error(n(284));if(!f._owner)throw Error(n(290,a))}return a}function xg(a,u){throw a=Object.prototype.toString.call(u),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a))}function B1(a){var u=a._init;return u(a._payload)}function z1(a){function u(j,U){if(a){var z=j.deletions;z===null?(j.deletions=[U],j.flags|=16):z.push(U)}}function f(j,U){if(!a)return null;for(;U!==null;)u(j,U),U=U.sibling;return null}function p(j,U){for(j=new Map;U!==null;)U.key!==null?j.set(U.key,U):j.set(U.index,U),U=U.sibling;return j}function y(j,U){return j=oa(j,U),j.index=0,j.sibling=null,j}function _(j,U,z){return j.index=z,a?(z=j.alternate,z!==null?(z=z.index,z<U?(j.flags|=2,U):z):(j.flags|=2,U)):(j.flags|=1048576,U)}function R(j){return a&&j.alternate===null&&(j.flags|=2),j}function D(j,U,z,de){return U===null||U.tag!==6?(U=M0(z,j.mode,de),U.return=j,U):(U=y(U,z),U.return=j,U)}function $(j,U,z,de){var Ce=z.type;return Ce===k?oe(j,U,z.props.children,de,z.key):U!==null&&(U.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&B1(Ce)===U.type)?(de=y(U,z.props),de.ref=Cf(j,U,z),de.return=j,de):(de=Hg(z.type,z.key,z.props,null,j.mode,de),de.ref=Cf(j,U,z),de.return=j,de)}function q(j,U,z,de){return U===null||U.tag!==4||U.stateNode.containerInfo!==z.containerInfo||U.stateNode.implementation!==z.implementation?(U=L0(z,j.mode,de),U.return=j,U):(U=y(U,z.children||[]),U.return=j,U)}function oe(j,U,z,de,Ce){return U===null||U.tag!==7?(U=El(z,j.mode,de,Ce),U.return=j,U):(U=y(U,z),U.return=j,U)}function le(j,U,z){if(typeof U=="string"&&U!==""||typeof U=="number")return U=M0(""+U,j.mode,z),U.return=j,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return z=Hg(U.type,U.key,U.props,null,j.mode,z),z.ref=Cf(j,null,U),z.return=j,z;case N:return U=L0(U,j.mode,z),U.return=j,U;case J:var de=U._init;return le(j,de(U._payload),z)}if(_t(U)||te(U))return U=El(U,j.mode,z,null),U.return=j,U;xg(j,U)}return null}function ie(j,U,z,de){var Ce=U!==null?U.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return Ce!==null?null:D(j,U,""+z,de);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case x:return z.key===Ce?$(j,U,z,de):null;case N:return z.key===Ce?q(j,U,z,de):null;case J:return Ce=z._init,ie(j,U,Ce(z._payload),de)}if(_t(z)||te(z))return Ce!==null?null:oe(j,U,z,de,null);xg(j,z)}return null}function we(j,U,z,de,Ce){if(typeof de=="string"&&de!==""||typeof de=="number")return j=j.get(z)||null,D(U,j,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case x:return j=j.get(de.key===null?z:de.key)||null,$(U,j,de,Ce);case N:return j=j.get(de.key===null?z:de.key)||null,q(U,j,de,Ce);case J:var Fe=de._init;return we(j,U,z,Fe(de._payload),Ce)}if(_t(de)||te(de))return j=j.get(z)||null,oe(U,j,de,Ce,null);xg(U,de)}return null}function xe(j,U,z,de){for(var Ce=null,Fe=null,$e=U,je=U=0,zn=null;$e!==null&&je<z.length;je++){$e.index>je?(zn=$e,$e=null):zn=$e.sibling;var pt=ie(j,$e,z[je],de);if(pt===null){$e===null&&($e=zn);break}a&&$e&&pt.alternate===null&&u(j,$e),U=_(pt,U,je),Fe===null?Ce=pt:Fe.sibling=pt,Fe=pt,$e=zn}if(je===z.length)return f(j,$e),zt&&hl(j,je),Ce;if($e===null){for(;je<z.length;je++)$e=le(j,z[je],de),$e!==null&&(U=_($e,U,je),Fe===null?Ce=$e:Fe.sibling=$e,Fe=$e);return zt&&hl(j,je),Ce}for($e=p(j,$e);je<z.length;je++)zn=we($e,j,je,z[je],de),zn!==null&&(a&&zn.alternate!==null&&$e.delete(zn.key===null?je:zn.key),U=_(zn,U,je),Fe===null?Ce=zn:Fe.sibling=zn,Fe=zn);return a&&$e.forEach(function(aa){return u(j,aa)}),zt&&hl(j,je),Ce}function ke(j,U,z,de){var Ce=te(z);if(typeof Ce!="function")throw Error(n(150));if(z=Ce.call(z),z==null)throw Error(n(151));for(var Fe=Ce=null,$e=U,je=U=0,zn=null,pt=z.next();$e!==null&&!pt.done;je++,pt=z.next()){$e.index>je?(zn=$e,$e=null):zn=$e.sibling;var aa=ie(j,$e,pt.value,de);if(aa===null){$e===null&&($e=zn);break}a&&$e&&aa.alternate===null&&u(j,$e),U=_(aa,U,je),Fe===null?Ce=aa:Fe.sibling=aa,Fe=aa,$e=zn}if(pt.done)return f(j,$e),zt&&hl(j,je),Ce;if($e===null){for(;!pt.done;je++,pt=z.next())pt=le(j,pt.value,de),pt!==null&&(U=_(pt,U,je),Fe===null?Ce=pt:Fe.sibling=pt,Fe=pt);return zt&&hl(j,je),Ce}for($e=p(j,$e);!pt.done;je++,pt=z.next())pt=we($e,j,je,pt.value,de),pt!==null&&(a&&pt.alternate!==null&&$e.delete(pt.key===null?je:pt.key),U=_(pt,U,je),Fe===null?Ce=pt:Fe.sibling=pt,Fe=pt);return a&&$e.forEach(function(Y5){return u(j,Y5)}),zt&&hl(j,je),Ce}function yn(j,U,z,de){if(typeof z=="object"&&z!==null&&z.type===k&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case x:e:{for(var Ce=z.key,Fe=U;Fe!==null;){if(Fe.key===Ce){if(Ce=z.type,Ce===k){if(Fe.tag===7){f(j,Fe.sibling),U=y(Fe,z.props.children),U.return=j,j=U;break e}}else if(Fe.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&B1(Ce)===Fe.type){f(j,Fe.sibling),U=y(Fe,z.props),U.ref=Cf(j,Fe,z),U.return=j,j=U;break e}f(j,Fe);break}else u(j,Fe);Fe=Fe.sibling}z.type===k?(U=El(z.props.children,j.mode,de,z.key),U.return=j,j=U):(de=Hg(z.type,z.key,z.props,null,j.mode,de),de.ref=Cf(j,U,z),de.return=j,j=de)}return R(j);case N:e:{for(Fe=z.key;U!==null;){if(U.key===Fe)if(U.tag===4&&U.stateNode.containerInfo===z.containerInfo&&U.stateNode.implementation===z.implementation){f(j,U.sibling),U=y(U,z.children||[]),U.return=j,j=U;break e}else{f(j,U);break}else u(j,U);U=U.sibling}U=L0(z,j.mode,de),U.return=j,j=U}return R(j);case J:return Fe=z._init,yn(j,U,Fe(z._payload),de)}if(_t(z))return xe(j,U,z,de);if(te(z))return ke(j,U,z,de);xg(j,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,U!==null&&U.tag===6?(f(j,U.sibling),U=y(U,z),U.return=j,j=U):(f(j,U),U=M0(z,j.mode,de),U.return=j,j=U),R(j)):f(j,U)}return yn}var Xu=z1(!0),W1=z1(!1),Af={},Is=Yo(Af),Pf=Yo(Af),Of=Yo(Af);function ml(a){if(a===Af)throw Error(n(174));return a}function ZE(a,u){switch(Ct(Of,u),Ct(Pf,a),Ct(Is,Af),a=u.nodeType,a){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:Mn(null,"");break;default:a=a===8?u.parentNode:u,u=a.namespaceURI||null,a=a.tagName,u=Mn(u,a)}Mt(Is),Ct(Is,u)}function Zu(){Mt(Is),Mt(Pf),Mt(Of)}function q1(a){ml(Of.current);var u=ml(Is.current),f=Mn(u,a.type);u!==f&&(Ct(Pf,a),Ct(Is,f))}function e0(a){Pf.current===a&&(Mt(Is),Mt(Pf))}var Xt=Yo(0);function kg(a){for(var u=a;u!==null;){if(u.tag===13){var f=u.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var t0=[];function n0(){for(var a=0;a<t0.length;a++)t0[a]._workInProgressVersionPrimary=null;t0.length=0}var Cg=P.ReactCurrentDispatcher,r0=P.ReactCurrentBatchConfig,gl=0,Zt=null,Ln=null,jn=null,Ag=!1,Nf=!1,Df=0,v5=0;function yr(){throw Error(n(321))}function i0(a,u){if(u===null)return!1;for(var f=0;f<u.length&&f<a.length;f++)if(!ts(a[f],u[f]))return!1;return!0}function s0(a,u,f,p,y,_){if(gl=_,Zt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Cg.current=a===null||a.memoizedState===null?S5:T5,a=f(p,y),Nf){_=0;do{if(Nf=!1,Df=0,25<=_)throw Error(n(301));_+=1,jn=Ln=null,u.updateQueue=null,Cg.current=b5,a=f(p,y)}while(Nf)}if(Cg.current=Ng,u=Ln!==null&&Ln.next!==null,gl=0,jn=Ln=Zt=null,Ag=!1,u)throw Error(n(300));return a}function o0(){var a=Df!==0;return Df=0,a}function Rs(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?Zt.memoizedState=jn=a:jn=jn.next=a,jn}function Ni(){if(Ln===null){var a=Zt.alternate;a=a!==null?a.memoizedState:null}else a=Ln.next;var u=jn===null?Zt.memoizedState:jn.next;if(u!==null)jn=u,Ln=a;else{if(a===null)throw Error(n(310));Ln=a,a={memoizedState:Ln.memoizedState,baseState:Ln.baseState,baseQueue:Ln.baseQueue,queue:Ln.queue,next:null},jn===null?Zt.memoizedState=jn=a:jn=jn.next=a}return jn}function Mf(a,u){return typeof u=="function"?u(a):u}function a0(a){var u=Ni(),f=u.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=a;var p=Ln,y=p.baseQueue,_=f.pending;if(_!==null){if(y!==null){var R=y.next;y.next=_.next,_.next=R}p.baseQueue=y=_,f.pending=null}if(y!==null){_=y.next,p=p.baseState;var D=R=null,$=null,q=_;do{var oe=q.lane;if((gl&oe)===oe)$!==null&&($=$.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),p=q.hasEagerState?q.eagerState:a(p,q.action);else{var le={lane:oe,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};$===null?(D=$=le,R=p):$=$.next=le,Zt.lanes|=oe,yl|=oe}q=q.next}while(q!==null&&q!==_);$===null?R=p:$.next=D,ts(p,u.memoizedState)||(Xr=!0),u.memoizedState=p,u.baseState=R,u.baseQueue=$,f.lastRenderedState=p}if(a=f.interleaved,a!==null){y=a;do _=y.lane,Zt.lanes|=_,yl|=_,y=y.next;while(y!==a)}else y===null&&(f.lanes=0);return[u.memoizedState,f.dispatch]}function l0(a){var u=Ni(),f=u.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=a;var p=f.dispatch,y=f.pending,_=u.memoizedState;if(y!==null){f.pending=null;var R=y=y.next;do _=a(_,R.action),R=R.next;while(R!==y);ts(_,u.memoizedState)||(Xr=!0),u.memoizedState=_,u.baseQueue===null&&(u.baseState=_),f.lastRenderedState=_}return[_,p]}function H1(){}function G1(a,u){var f=Zt,p=Ni(),y=u(),_=!ts(p.memoizedState,y);if(_&&(p.memoizedState=y,Xr=!0),p=p.queue,u0(Y1.bind(null,f,p,a),[a]),p.getSnapshot!==u||_||jn!==null&&jn.memoizedState.tag&1){if(f.flags|=2048,Lf(9,Q1.bind(null,f,p,y,u),void 0,null),Bn===null)throw Error(n(349));(gl&30)!==0||K1(f,u,y)}return y}function K1(a,u,f){a.flags|=16384,a={getSnapshot:u,value:f},u=Zt.updateQueue,u===null?(u={lastEffect:null,stores:null},Zt.updateQueue=u,u.stores=[a]):(f=u.stores,f===null?u.stores=[a]:f.push(a))}function Q1(a,u,f,p){u.value=f,u.getSnapshot=p,J1(u)&&X1(a)}function Y1(a,u,f){return f(function(){J1(u)&&X1(a)})}function J1(a){var u=a.getSnapshot;a=a.value;try{var f=u();return!ts(a,f)}catch{return!0}}function X1(a){var u=ho(a,1);u!==null&&os(u,a,1,-1)}function Z1(a){var u=Rs();return typeof a=="function"&&(a=a()),u.memoizedState=u.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mf,lastRenderedState:a},u.queue=a,a=a.dispatch=E5.bind(null,Zt,a),[u.memoizedState,a]}function Lf(a,u,f,p){return a={tag:a,create:u,destroy:f,deps:p,next:null},u=Zt.updateQueue,u===null?(u={lastEffect:null,stores:null},Zt.updateQueue=u,u.lastEffect=a.next=a):(f=u.lastEffect,f===null?u.lastEffect=a.next=a:(p=f.next,f.next=a,a.next=p,u.lastEffect=a)),a}function eC(){return Ni().memoizedState}function Pg(a,u,f,p){var y=Rs();Zt.flags|=a,y.memoizedState=Lf(1|u,f,void 0,p===void 0?null:p)}function Og(a,u,f,p){var y=Ni();p=p===void 0?null:p;var _=void 0;if(Ln!==null){var R=Ln.memoizedState;if(_=R.destroy,p!==null&&i0(p,R.deps)){y.memoizedState=Lf(u,f,_,p);return}}Zt.flags|=a,y.memoizedState=Lf(1|u,f,_,p)}function tC(a,u){return Pg(8390656,8,a,u)}function u0(a,u){return Og(2048,8,a,u)}function nC(a,u){return Og(4,2,a,u)}function rC(a,u){return Og(4,4,a,u)}function iC(a,u){if(typeof u=="function")return a=a(),u(a),function(){u(null)};if(u!=null)return a=a(),u.current=a,function(){u.current=null}}function sC(a,u,f){return f=f!=null?f.concat([a]):null,Og(4,4,iC.bind(null,u,a),f)}function c0(){}function oC(a,u){var f=Ni();u=u===void 0?null:u;var p=f.memoizedState;return p!==null&&u!==null&&i0(u,p[1])?p[0]:(f.memoizedState=[a,u],a)}function aC(a,u){var f=Ni();u=u===void 0?null:u;var p=f.memoizedState;return p!==null&&u!==null&&i0(u,p[1])?p[0]:(a=a(),f.memoizedState=[a,u],a)}function lC(a,u,f){return(gl&21)===0?(a.baseState&&(a.baseState=!1,Xr=!0),a.memoizedState=f):(ts(f,u)||(f=Dk(),Zt.lanes|=f,yl|=f,a.baseState=!0),u)}function _5(a,u){var f=Tt;Tt=f!==0&&4>f?f:4,a(!0);var p=r0.transition;r0.transition={};try{a(!1),u()}finally{Tt=f,r0.transition=p}}function uC(){return Ni().memoizedState}function w5(a,u,f){var p=ia(a);if(f={lane:p,action:f,hasEagerState:!1,eagerState:null,next:null},cC(a))dC(u,f);else if(f=D1(a,u,f,p),f!==null){var y=Fr();os(f,a,p,y),fC(f,u,p)}}function E5(a,u,f){var p=ia(a),y={lane:p,action:f,hasEagerState:!1,eagerState:null,next:null};if(cC(a))dC(u,y);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=u.lastRenderedReducer,_!==null))try{var R=u.lastRenderedState,D=_(R,f);if(y.hasEagerState=!0,y.eagerState=D,ts(D,R)){var $=u.interleaved;$===null?(y.next=y,QE(u)):(y.next=$.next,$.next=y),u.interleaved=y;return}}catch{}finally{}f=D1(a,u,y,p),f!==null&&(y=Fr(),os(f,a,p,y),fC(f,u,p))}}function cC(a){var u=a.alternate;return a===Zt||u!==null&&u===Zt}function dC(a,u){Nf=Ag=!0;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}function fC(a,u,f){if((f&4194240)!==0){var p=u.lanes;p&=a.pendingLanes,f|=p,u.lanes=f,cE(a,f)}}var Ng={readContext:Oi,useCallback:yr,useContext:yr,useEffect:yr,useImperativeHandle:yr,useInsertionEffect:yr,useLayoutEffect:yr,useMemo:yr,useReducer:yr,useRef:yr,useState:yr,useDebugValue:yr,useDeferredValue:yr,useTransition:yr,useMutableSource:yr,useSyncExternalStore:yr,useId:yr,unstable_isNewReconciler:!1},S5={readContext:Oi,useCallback:function(a,u){return Rs().memoizedState=[a,u===void 0?null:u],a},useContext:Oi,useEffect:tC,useImperativeHandle:function(a,u,f){return f=f!=null?f.concat([a]):null,Pg(4194308,4,iC.bind(null,u,a),f)},useLayoutEffect:function(a,u){return Pg(4194308,4,a,u)},useInsertionEffect:function(a,u){return Pg(4,2,a,u)},useMemo:function(a,u){var f=Rs();return u=u===void 0?null:u,a=a(),f.memoizedState=[a,u],a},useReducer:function(a,u,f){var p=Rs();return u=f!==void 0?f(u):u,p.memoizedState=p.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},p.queue=a,a=a.dispatch=w5.bind(null,Zt,a),[p.memoizedState,a]},useRef:function(a){var u=Rs();return a={current:a},u.memoizedState=a},useState:Z1,useDebugValue:c0,useDeferredValue:function(a){return Rs().memoizedState=a},useTransition:function(){var a=Z1(!1),u=a[0];return a=_5.bind(null,a[1]),Rs().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,f){var p=Zt,y=Rs();if(zt){if(f===void 0)throw Error(n(407));f=f()}else{if(f=u(),Bn===null)throw Error(n(349));(gl&30)!==0||K1(p,u,f)}y.memoizedState=f;var _={value:f,getSnapshot:u};return y.queue=_,tC(Y1.bind(null,p,_,a),[a]),p.flags|=2048,Lf(9,Q1.bind(null,p,_,f,u),void 0,null),f},useId:function(){var a=Rs(),u=Bn.identifierPrefix;if(zt){var f=fo,p=co;f=(p&~(1<<32-es(p)-1)).toString(32)+f,u=":"+u+"R"+f,f=Df++,0<f&&(u+="H"+f.toString(32)),u+=":"}else f=v5++,u=":"+u+"r"+f.toString(32)+":";return a.memoizedState=u},unstable_isNewReconciler:!1},T5={readContext:Oi,useCallback:oC,useContext:Oi,useEffect:u0,useImperativeHandle:sC,useInsertionEffect:nC,useLayoutEffect:rC,useMemo:aC,useReducer:a0,useRef:eC,useState:function(){return a0(Mf)},useDebugValue:c0,useDeferredValue:function(a){var u=Ni();return lC(u,Ln.memoizedState,a)},useTransition:function(){var a=a0(Mf)[0],u=Ni().memoizedState;return[a,u]},useMutableSource:H1,useSyncExternalStore:G1,useId:uC,unstable_isNewReconciler:!1},b5={readContext:Oi,useCallback:oC,useContext:Oi,useEffect:u0,useImperativeHandle:sC,useInsertionEffect:nC,useLayoutEffect:rC,useMemo:aC,useReducer:l0,useRef:eC,useState:function(){return l0(Mf)},useDebugValue:c0,useDeferredValue:function(a){var u=Ni();return Ln===null?u.memoizedState=a:lC(u,Ln.memoizedState,a)},useTransition:function(){var a=l0(Mf)[0],u=Ni().memoizedState;return[a,u]},useMutableSource:H1,useSyncExternalStore:G1,useId:uC,unstable_isNewReconciler:!1};function ec(a,u){try{var f="",p=u;do f+=Ee(p),p=p.return;while(p);var y=f}catch(_){y=`
40Error generating stack: `+_.message+`
41`+_.stack}return{value:a,source:u,stack:y,digest:null}}function d0(a,u,f){return{value:a,source:null,stack:f??null,digest:u??null}}function f0(a,u){try{console.error(u.value)}catch(f){setTimeout(function(){throw f})}}var I5=typeof WeakMap=="function"?WeakMap:Map;function hC(a,u,f){f=po(-1,f),f.tag=3,f.payload={element:null};var p=u.value;return f.callback=function(){Ug||(Ug=!0,x0=p),f0(a,u)},f}function pC(a,u,f){f=po(-1,f),f.tag=3;var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;f.payload=function(){return p(y)},f.callback=function(){f0(a,u)}}var _=a.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(f.callback=function(){f0(a,u),typeof p!="function"&&(na===null?na=new Set([this]):na.add(this));var R=u.stack;this.componentDidCatch(u.value,{componentStack:R!==null?R:""})}),f}function mC(a,u,f){var p=a.pingCache;if(p===null){p=a.pingCache=new I5;var y=new Set;p.set(u,y)}else y=p.get(u),y===void 0&&(y=new Set,p.set(u,y));y.has(f)||(y.add(f),a=$5.bind(null,a,u,f),u.then(a,a))}function gC(a){do{var u;if((u=a.tag===13)&&(u=a.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return a;a=a.return}while(a!==null);return null}function yC(a,u,f,p,y){return(a.mode&1)===0?(a===u?a.flags|=65536:(a.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(u=po(-1,1),u.tag=2,ea(f,u,1))),f.lanes|=1),a):(a.flags|=65536,a.lanes=y,a)}var R5=P.ReactCurrentOwner,Xr=!1;function Vr(a,u,f,p){u.child=a===null?W1(u,null,f,p):Xu(u,a.child,f,p)}function vC(a,u,f,p,y){f=f.render;var _=u.ref;return Ju(u,y),p=s0(a,u,f,p,_,y),f=o0(),a!==null&&!Xr?(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~y,mo(a,u,y)):(zt&&f&&UE(u),u.flags|=1,Vr(a,u,p,y),u.child)}function _C(a,u,f,p,y){if(a===null){var _=f.type;return typeof _=="function"&&!D0(_)&&_.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(u.tag=15,u.type=_,wC(a,u,_,p,y)):(a=Hg(f.type,null,p,u,u.mode,y),a.ref=u.ref,a.return=u,u.child=a)}if(_=a.child,(a.lanes&y)===0){var R=_.memoizedProps;if(f=f.compare,f=f!==null?f:Sf,f(R,p)&&a.ref===u.ref)return mo(a,u,y)}return u.flags|=1,a=oa(_,p),a.ref=u.ref,a.return=u,u.child=a}function wC(a,u,f,p,y){if(a!==null){var _=a.memoizedProps;if(Sf(_,p)&&a.ref===u.ref)if(Xr=!1,u.pendingProps=p=_,(a.lanes&y)!==0)(a.flags&131072)!==0&&(Xr=!0);else return u.lanes=a.lanes,mo(a,u,y)}return h0(a,u,f,p,y)}function EC(a,u,f){var p=u.pendingProps,y=p.children,_=a!==null?a.memoizedState:null;if(p.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ct(nc,gi),gi|=f;else{if((f&1073741824)===0)return a=_!==null?_.baseLanes|f:f,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:a,cachePool:null,transitions:null},u.updateQueue=null,Ct(nc,gi),gi|=a,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=_!==null?_.baseLanes:f,Ct(nc,gi),gi|=p}else _!==null?(p=_.baseLanes|f,u.memoizedState=null):p=f,Ct(nc,gi),gi|=p;return Vr(a,u,y,f),u.child}function SC(a,u){var f=u.ref;(a===null&&f!==null||a!==null&&a.ref!==f)&&(u.flags|=512,u.flags|=2097152)}function h0(a,u,f,p,y){var _=Jr(f)?dl:gr.current;return _=Hu(u,_),Ju(u,y),f=s0(a,u,f,p,_,y),p=o0(),a!==null&&!Xr?(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~y,mo(a,u,y)):(zt&&p&&UE(u),u.flags|=1,Vr(a,u,f,y),u.child)}function TC(a,u,f,p,y){if(Jr(f)){var _=!0;yg(u)}else _=!1;if(Ju(u,y),u.stateNode===null)Mg(a,u),U1(u,f,p),XE(u,f,p,y),p=!0;else if(a===null){var R=u.stateNode,D=u.memoizedProps;R.props=D;var $=R.context,q=f.contextType;typeof q=="object"&&q!==null?q=Oi(q):(q=Jr(f)?dl:gr.current,q=Hu(u,q));var oe=f.getDerivedStateFromProps,le=typeof oe=="function"||typeof R.getSnapshotBeforeUpdate=="function";le||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(D!==p||$!==q)&&j1(u,R,p,q),Zo=!1;var ie=u.memoizedState;R.state=ie,Ig(u,p,R,y),$=u.memoizedState,D!==p||ie!==$||Yr.current||Zo?(typeof oe=="function"&&(JE(u,f,oe,p),$=u.memoizedState),(D=Zo||$1(u,f,D,p,ie,$,q))?(le||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(u.flags|=4194308)):(typeof R.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=p,u.memoizedState=$),R.props=p,R.state=$,R.context=q,p=D):(typeof R.componentDidMount=="function"&&(u.flags|=4194308),p=!1)}else{R=u.stateNode,M1(a,u),D=u.memoizedProps,q=u.type===u.elementType?D:rs(u.type,D),R.props=q,le=u.pendingProps,ie=R.context,$=f.contextType,typeof $=="object"&&$!==null?$=Oi($):($=Jr(f)?dl:gr.current,$=Hu(u,$));var we=f.getDerivedStateFromProps;(oe=typeof we=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(D!==le||ie!==$)&&j1(u,R,p,$),Zo=!1,ie=u.memoizedState,R.state=ie,Ig(u,p,R,y);var xe=u.memoizedState;D!==le||ie!==xe||Yr.current||Zo?(typeof we=="function"&&(JE(u,f,we,p),xe=u.memoizedState),(q=Zo||$1(u,f,q,p,ie,xe,$)||!1)?(oe||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(p,xe,$),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(p,xe,$)),typeof R.componentDidUpdate=="function"&&(u.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof R.componentDidUpdate!="function"||D===a.memoizedProps&&ie===a.memoizedState||(u.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&ie===a.memoizedState||(u.flags|=1024),u.memoizedProps=p,u.memoizedState=xe),R.props=p,R.state=xe,R.context=$,p=q):(typeof R.componentDidUpdate!="function"||D===a.memoizedProps&&ie===a.memoizedState||(u.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&ie===a.memoizedState||(u.flags|=1024),p=!1)}return p0(a,u,f,p,_,y)}function p0(a,u,f,p,y,_){SC(a,u);var R=(u.flags&128)!==0;if(!p&&!R)return y&&x1(u,f,!1),mo(a,u,_);p=u.stateNode,R5.current=u;var D=R&&typeof f.getDerivedStateFromError!="function"?null:p.render();return u.flags|=1,a!==null&&R?(u.child=Xu(u,a.child,null,_),u.child=Xu(u,null,D,_)):Vr(a,u,D,_),u.memoizedState=p.state,y&&x1(u,f,!0),u.child}function bC(a){var u=a.stateNode;u.pendingContext?I1(a,u.pendingContext,u.pendingContext!==u.context):u.context&&I1(a,u.context,!1),ZE(a,u.containerInfo)}function IC(a,u,f,p,y){return Qu(),WE(y),u.flags|=256,Vr(a,u,f,p),u.child}var m0={dehydrated:null,treeContext:null,retryLane:0};function g0(a){return{baseLanes:a,cachePool:null,transitions:null}}function RC(a,u,f){var p=u.pendingProps,y=Xt.current,_=!1,R=(u.flags&128)!==0,D;if((D=R)||(D=a!==null&&a.memoizedState===null?!1:(y&2)!==0),D?(_=!0,u.flags&=-129):(a===null||a.memoizedState!==null)&&(y|=1),Ct(Xt,y&1),a===null)return zE(u),a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((u.mode&1)===0?u.lanes=1:a.data==="$!"?u.lanes=8:u.lanes=1073741824,null):(R=p.children,a=p.fallback,_?(p=u.mode,_=u.child,R={mode:"hidden",children:R},(p&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=R):_=Gg(R,p,0,null),a=El(a,p,f,null),_.return=u,a.return=u,_.sibling=a,u.child=_,u.child.memoizedState=g0(f),u.memoizedState=m0,a):y0(u,R));if(y=a.memoizedState,y!==null&&(D=y.dehydrated,D!==null))return x5(a,u,R,p,D,y,f);if(_){_=p.fallback,R=u.mode,y=a.child,D=y.sibling;var $={mode:"hidden",children:p.children};return(R&1)===0&&u.child!==y?(p=u.child,p.childLanes=0,p.pendingProps=$,u.deletions=null):(p=oa(y,$),p.subtreeFlags=y.subtreeFlags&14680064),D!==null?_=oa(D,_):(_=El(_,R,f,null),_.flags|=2),_.return=u,p.return=u,p.sibling=_,u.child=p,p=_,_=u.child,R=a.child.memoizedState,R=R===null?g0(f):{baseLanes:R.baseLanes|f,cachePool:null,transitions:R.transitions},_.memoizedState=R,_.childLanes=a.childLanes&~f,u.memoizedState=m0,p}return _=a.child,a=_.sibling,p=oa(_,{mode:"visible",children:p.children}),(u.mode&1)===0&&(p.lanes=f),p.return=u,p.sibling=null,a!==null&&(f=u.deletions,f===null?(u.deletions=[a],u.flags|=16):f.push(a)),u.child=p,u.memoizedState=null,p}function y0(a,u){return u=Gg({mode:"visible",children:u},a.mode,0,null),u.return=a,a.child=u}function Dg(a,u,f,p){return p!==null&&WE(p),Xu(u,a.child,null,f),a=y0(u,u.pendingProps.children),a.flags|=2,u.memoizedState=null,a}function x5(a,u,f,p,y,_,R){if(f)return u.flags&256?(u.flags&=-257,p=d0(Error(n(422))),Dg(a,u,R,p)):u.memoizedState!==null?(u.child=a.child,u.flags|=128,null):(_=p.fallback,y=u.mode,p=Gg({mode:"visible",children:p.children},y,0,null),_=El(_,y,R,null),_.flags|=2,p.return=u,_.return=u,p.sibling=_,u.child=p,(u.mode&1)!==0&&Xu(u,a.child,null,R),u.child.memoizedState=g0(R),u.memoizedState=m0,_);if((u.mode&1)===0)return Dg(a,u,R,null);if(y.data==="$!"){if(p=y.nextSibling&&y.nextSibling.dataset,p)var D=p.dgst;return p=D,_=Error(n(419)),p=d0(_,p,void 0),Dg(a,u,R,p)}if(D=(R&a.childLanes)!==0,Xr||D){if(p=Bn,p!==null){switch(R&-R){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(p.suspendedLanes|R))!==0?0:y,y!==0&&y!==_.retryLane&&(_.retryLane=y,ho(a,y),os(p,a,y,-1))}return N0(),p=d0(Error(n(421))),Dg(a,u,R,p)}return y.data==="$?"?(u.flags|=128,u.child=a.child,u=U5.bind(null,a),y._reactRetry=u,null):(a=_.treeContext,mi=Qo(y.nextSibling),pi=u,zt=!0,ns=null,a!==null&&(Ai[Pi++]=co,Ai[Pi++]=fo,Ai[Pi++]=fl,co=a.id,fo=a.overflow,fl=u),u=y0(u,p.children),u.flags|=4096,u)}function xC(a,u,f){a.lanes|=u;var p=a.alternate;p!==null&&(p.lanes|=u),KE(a.return,u,f)}function v0(a,u,f,p,y){var _=a.memoizedState;_===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:y}:(_.isBackwards=u,_.rendering=null,_.renderingStartTime=0,_.last=p,_.tail=f,_.tailMode=y)}function kC(a,u,f){var p=u.pendingProps,y=p.revealOrder,_=p.tail;if(Vr(a,u,p.children,f),p=Xt.current,(p&2)!==0)p=p&1|2,u.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&xC(a,f,u);else if(a.tag===19)xC(a,f,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}p&=1}if(Ct(Xt,p),(u.mode&1)===0)u.memoizedState=null;else switch(y){case"forwards":for(f=u.child,y=null;f!==null;)a=f.alternate,a!==null&&kg(a)===null&&(y=f),f=f.sibling;f=y,f===null?(y=u.child,u.child=null):(y=f.sibling,f.sibling=null),v0(u,!1,y,f,_);break;case"backwards":for(f=null,y=u.child,u.child=null;y!==null;){if(a=y.alternate,a!==null&&kg(a)===null){u.child=y;break}a=y.sibling,y.sibling=f,f=y,y=a}v0(u,!0,f,null,_);break;case"together":v0(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Mg(a,u){(u.mode&1)===0&&a!==null&&(a.alternate=null,u.alternate=null,u.flags|=2)}
vendor: 3,104 bytes, line 41
41function mo(a,u,f){if(a!==null&&(u.dependencies=a.dependencies),yl|=u.lanes,(f&u.childLanes)===0)return null;if(a!==null&&u.child!==a.child)throw Error(n(153));if(u.child!==null){for(a=u.child,f=oa(a,a.pendingProps),u.child=f,f.return=u;a.sibling!==null;)a=a.sibling,f=f.sibling=oa(a,a.pendingProps),f.return=u;f.sibling=null}return u.child}function k5(a,u,f){switch(u.tag){case 3:bC(u),Qu();break;case 5:q1(u);break;case 1:Jr(u.type)&&yg(u);break;case 4:ZE(u,u.stateNode.containerInfo);break;case 10:var p=u.type._context,y=u.memoizedProps.value;Ct(Sg,p._currentValue),p._currentValue=y;break;case 13:if(p=u.memoizedState,p!==null)return p.dehydrated!==null?(Ct(Xt,Xt.current&1),u.flags|=128,null):(f&u.child.childLanes)!==0?RC(a,u,f):(Ct(Xt,Xt.current&1),a=mo(a,u,f),a!==null?a.sibling:null);Ct(Xt,Xt.current&1);break;case 19:if(p=(f&u.childLanes)!==0,(a.flags&128)!==0){if(p)return kC(a,u,f);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Ct(Xt,Xt.current),p)break;return null;case 22:case 23:return u.lanes=0,EC(a,u,f)}return mo(a,u,f)}var CC,_0,AC,PC;CC=function(a,u){for(var f=u.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},_0=function(){},AC=function(a,u,f,p){var y=a.memoizedProps;if(y!==p){a=u.stateNode,ml(Is.current);var _=null;switch(f){case"input":y=We(a,y),p=We(a,p),_=[];break;case"select":y=M({},y,{value:void 0}),p=M({},p,{value:void 0}),_=[];break;case"textarea":y=mn(a,y),p=mn(a,p),_=[];break;default:typeof y.onClick!="function"&&typeof p.onClick=="function"&&(a.onclick=pg)}Lr(f,p);var R;f=null;for(q in y)if(!p.hasOwnProperty(q)&&y.hasOwnProperty(q)&&y[q]!=null)if(q==="style"){var D=y[q];for(R in D)D.hasOwnProperty(R)&&(f||(f={}),f[R]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(i.hasOwnProperty(q)?_||(_=[]):(_=_||[]).push(q,null));for(q in p){var $=p[q];if(D=y?.[q],p.hasOwnProperty(q)&&$!==D&&($!=null||D!=null))if(q==="style")if(D){for(R in D)!D.hasOwnProperty(R)||$&&$.hasOwnProperty(R)||(f||(f={}),f[R]="");for(R in $)$.hasOwnProperty(R)&&D[R]!==$[R]&&(f||(f={}),f[R]=$[R])}else f||(_||(_=[]),_.push(q,f)),f=$;else q==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,D=D?D.__html:void 0,$!=null&&D!==$&&(_=_||[]).push(q,$)):q==="children"?typeof $!="string"&&typeof $!="number"||(_=_||[]).push(q,""+$):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(i.hasOwnProperty(q)?($!=null&&q==="onScroll"&&Dt("scroll",a),_||D===$||(_=[])):(_=_||[]).push(q,$))}f&&(_=_||[]).push("style",f);var q=_;(u.updateQueue=q)&&(u.flags|=4)}},PC=function(a,u,f,p){f!==p&&(u.flags|=4)};function Vf(a,u){if(!zt)switch(a.tailMode){case"hidden":u=a.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var p=null;f!==null;
vendor: 29,033 bytes, line 41
41)f.alternate!==null&&(p=f),f=f.sibling;p===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function vr(a){var u=a.alternate!==null&&a.alternate.child===a.child,f=0,p=0;if(u)for(var y=a.child;y!==null;)f|=y.lanes|y.childLanes,p|=y.subtreeFlags&14680064,p|=y.flags&14680064,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)f|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=p,a.childLanes=f,u}function C5(a,u,f){var p=u.pendingProps;switch(jE(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vr(u),null;case 1:return Jr(u.type)&&gg(),vr(u),null;case 3:return p=u.stateNode,Zu(),Mt(Yr),Mt(gr),n0(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(a===null||a.child===null)&&(Eg(u)?u.flags|=4:a===null||a.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,ns!==null&&(A0(ns),ns=null))),_0(a,u),vr(u),null;case 5:e0(u);var y=ml(Of.current);if(f=u.type,a!==null&&u.stateNode!=null)AC(a,u,f,p,y),a.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!p){if(u.stateNode===null)throw Error(n(166));return vr(u),null}if(a=ml(Is.current),Eg(u)){p=u.stateNode,f=u.type;var _=u.memoizedProps;switch(p[bs]=u,p[xf]=_,a=(u.mode&1)!==0,f){case"dialog":Dt("cancel",p),Dt("close",p);break;case"iframe":case"object":case"embed":Dt("load",p);break;case"video":case"audio":for(y=0;y<bf.length;y++)Dt(bf[y],p);break;case"source":Dt("error",p);break;case"img":case"image":case"link":Dt("error",p),Dt("load",p);break;case"details":Dt("toggle",p);break;case"input":qe(p,_),Dt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!_.multiple},Dt("invalid",p);break;case"textarea":jt(p,_),Dt("invalid",p)}Lr(f,_),y=null;for(var R in _)if(_.hasOwnProperty(R)){var D=_[R];R==="children"?typeof D=="string"?p.textContent!==D&&(_.suppressHydrationWarning!==!0&&hg(p.textContent,D,a),y=["children",D]):typeof D=="number"&&p.textContent!==""+D&&(_.suppressHydrationWarning!==!0&&hg(p.textContent,D,a),y=["children",""+D]):i.hasOwnProperty(R)&&D!=null&&R==="onScroll"&&Dt("scroll",p)}switch(f){case"input":Ue(p),Jt(p,_,!0);break;case"textarea":Ue(p),bn(p);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(p.onclick=pg)}p=y,u.updateQueue=p,p!==null&&(u.flags|=4)}else{R=y.nodeType===9?y:y.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=Dn(f)),a==="http://www.w3.org/1999/xhtml"?f==="script"?(a=R.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=R.createElement(f,{is:p.is}):(a=R.createElement(f),f==="select"&&(R=a,p.multiple?R.multiple=!0:p.size&&(R.size=p.size))):a=R.createElementNS(a,f),a[bs]=u,a[xf]=p,CC(a,u,!1,!1),u.stateNode=a;e:{switch(R=ws(f,p),f){case"dialog":Dt("cancel",a),Dt("close",a),y=p;break;case"iframe":case"object":case"embed":Dt("load",a),y=p;break;case"video":case"audio":for(y=0;y<bf.length;y++)Dt(bf[y],a);y=p;break;case"source":Dt("error",a),y=p;break;case"img":case"image":case"link":Dt("error",a),Dt("load",a),y=p;break;case"details":Dt("toggle",a),y=p;break;case"input":qe(a,p),y=We(a,p),Dt("invalid",a);break;case"option":y=p;break;case"select":a._wrapperState={wasMultiple:!!p.multiple},y=M({},p,{value:void 0}),Dt("invalid",a);break;case"textarea":jt(a,p),y=mn(a,p),Dt("invalid",a);break;default:y=p}Lr(f,y),D=y;for(_ in D)if(D.hasOwnProperty(_)){var $=D[_];_==="style"?mt(a,$):_==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Le(a,$)):_==="children"?typeof $=="string"?(f!=="textarea"||$!=="")&&Nt(a,$):typeof $=="number"&&Nt(a,""+$):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?$!=null&&_==="onScroll"&&Dt("scroll",a):$!=null&&I(a,_,$,R))}switch(f){case"input":Ue(a),Jt(a,p,!1);break;case"textarea":Ue(a),bn(a);break;case"option":p.value!=null&&a.setAttribute("value",""+Se(p.value));break;case"select":a.multiple=!!p.multiple,_=p.value,_!=null?Je(a,!!p.multiple,_,!1):p.defaultValue!=null&&Je(a,!!p.multiple,p.defaultValue,!0);break;default:typeof y.onClick=="function"&&(a.onclick=pg)}switch(f){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return vr(u),null;case 6:if(a&&u.stateNode!=null)PC(a,u,a.memoizedProps,p);else{if(typeof p!="string"&&u.stateNode===null)throw Error(n(166));if(f=ml(Of.current),ml(Is.current),Eg(u)){if(p=u.stateNode,f=u.memoizedProps,p[bs]=u,(_=p.nodeValue!==f)&&(a=pi,a!==null))switch(a.tag){case 3:hg(p.nodeValue,f,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&hg(p.nodeValue,f,(a.mode&1)!==0)}_&&(u.flags|=4)}else p=(f.nodeType===9?f:f.ownerDocument).createTextNode(p),p[bs]=u,u.stateNode=p}return vr(u),null;case 13:if(Mt(Xt),p=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(zt&&mi!==null&&(u.mode&1)!==0&&(u.flags&128)===0)N1(),Qu(),u.flags|=98560,_=!1;else if(_=Eg(u),p!==null&&p.dehydrated!==null){if(a===null){if(!_)throw Error(n(318));if(_=u.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(n(317));_[bs]=u}else Qu(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;vr(u),_=!1}else ns!==null&&(A0(ns),ns=null),_=!0;if(!_)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=f,u):(p=p!==null,p!==(a!==null&&a.memoizedState!==null)&&p&&(u.child.flags|=8192,(u.mode&1)!==0&&(a===null||(Xt.current&1)!==0?Vn===0&&(Vn=3):N0())),u.updateQueue!==null&&(u.flags|=4),vr(u),null);case 4:return Zu(),_0(a,u),a===null&&If(u.stateNode.containerInfo),vr(u),null;case 10:return GE(u.type._context),vr(u),null;case 17:return Jr(u.type)&&gg(),vr(u),null;case 19:if(Mt(Xt),_=u.memoizedState,_===null)return vr(u),null;if(p=(u.flags&128)!==0,R=_.rendering,R===null)if(p)Vf(_,!1);else{if(Vn!==0||a!==null&&(a.flags&128)!==0)for(a=u.child;a!==null;){if(R=kg(a),R!==null){for(u.flags|=128,Vf(_,!1),p=R.updateQueue,p!==null&&(u.updateQueue=p,u.flags|=4),u.subtreeFlags=0,p=f,f=u.child;f!==null;)_=f,a=p,_.flags&=14680066,R=_.alternate,R===null?(_.childLanes=0,_.lanes=a,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=R.childLanes,_.lanes=R.lanes,_.child=R.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=R.memoizedProps,_.memoizedState=R.memoizedState,_.updateQueue=R.updateQueue,_.type=R.type,a=R.dependencies,_.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),f=f.sibling;return Ct(Xt,Xt.current&1|2),u.child}a=a.sibling}_.tail!==null&&gn()>rc&&(u.flags|=128,p=!0,Vf(_,!1),u.lanes=4194304)}else{if(!p)if(a=kg(R),a!==null){if(u.flags|=128,p=!0,f=a.updateQueue,f!==null&&(u.updateQueue=f,u.flags|=4),Vf(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!zt)return vr(u),null}else 2*gn()-_.renderingStartTime>rc&&f!==1073741824&&(u.flags|=128,p=!0,Vf(_,!1),u.lanes=4194304);_.isBackwards?(R.sibling=u.child,u.child=R):(f=_.last,f!==null?f.sibling=R:u.child=R,_.last=R)}return _.tail!==null?(u=_.tail,_.rendering=u,_.tail=u.sibling,_.renderingStartTime=gn(),u.sibling=null,f=Xt.current,Ct(Xt,p?f&1|2:f&1),u):(vr(u),null);case 22:case 23:return O0(),p=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(u.flags|=8192),p&&(u.mode&1)!==0?(gi&1073741824)!==0&&(vr(u),u.subtreeFlags&6&&(u.flags|=8192)):vr(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function A5(a,u){switch(jE(u),u.tag){case 1:return Jr(u.type)&&gg(),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return Zu(),Mt(Yr),Mt(gr),n0(),a=u.flags,(a&65536)!==0&&(a&128)===0?(u.flags=a&-65537|128,u):null;case 5:return e0(u),null;case 13:if(Mt(Xt),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(n(340));Qu()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return Mt(Xt),null;case 4:return Zu(),null;case 10:return GE(u.type._context),null;case 22:case 23:return O0(),null;case 24:return null;default:return null}}var Lg=!1,_r=!1,P5=typeof WeakSet=="function"?WeakSet:Set,be=null;function tc(a,u){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(p){rn(a,u,p)}else f.current=null}function w0(a,u,f){try{f()}catch(p){rn(a,u,p)}}var OC=!1;function O5(a,u){if(OE=ng,a=u1(),bE(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var y=p.anchorOffset,_=p.focusNode;p=p.focusOffset;try{f.nodeType,_.nodeType}catch{f=null;break e}var R=0,D=-1,$=-1,q=0,oe=0,le=a,ie=null;t:for(;;){for(var we;le!==f||y!==0&&le.nodeType!==3||(D=R+y),le!==_||p!==0&&le.nodeType!==3||($=R+p),le.nodeType===3&&(R+=le.nodeValue.length),(we=le.firstChild)!==null;)ie=le,le=we;for(;;){if(le===a)break t;if(ie===f&&++q===y&&(D=R),ie===_&&++oe===p&&($=R),(we=le.nextSibling)!==null)break;le=ie,ie=le.parentNode}le=we}f=D===-1||$===-1?null:{start:D,end:$}}else f=null}f=f||{start:0,end:0}}else f=null;for(NE={focusedElem:a,selectionRange:f},ng=!1,be=u;be!==null;)if(u=be,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,be=a;else for(;be!==null;){u=be;try{var xe=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,yn=xe.memoizedState,j=u.stateNode,U=j.getSnapshotBeforeUpdate(u.elementType===u.type?ke:rs(u.type,ke),yn);j.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var z=u.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){rn(u,u.return,de)}if(a=u.sibling,a!==null){a.return=u.return,be=a;break}be=u.return}return xe=OC,OC=!1,xe}function Ff(a,u,f){var p=u.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&a)===a){var _=y.destroy;y.destroy=void 0,_!==void 0&&w0(u,f,_)}y=y.next}while(y!==p)}}function Vg(a,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var f=u=u.next;do{if((f.tag&a)===a){var p=f.create;f.destroy=p()}f=f.next}while(f!==u)}}function E0(a){var u=a.ref;if(u!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof u=="function"?u(a):u.current=a}}function NC(a){var u=a.alternate;u!==null&&(a.alternate=null,NC(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&(delete u[bs],delete u[xf],delete u[VE],delete u[p5],delete u[m5])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function DC(a){return a.tag===5||a.tag===3||a.tag===4}function MC(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||DC(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function S0(a,u,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,u?f.nodeType===8?f.parentNode.insertBefore(a,u):f.insertBefore(a,u):(f.nodeType===8?(u=f.parentNode,u.insertBefore(a,f)):(u=f,u.appendChild(a)),f=f._reactRootContainer,f!=null||u.onclick!==null||(u.onclick=pg));else if(p!==4&&(a=a.child,a!==null))for(S0(a,u,f),a=a.sibling;a!==null;)S0(a,u,f),a=a.sibling}function T0(a,u,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,u?f.insertBefore(a,u):f.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(T0(a,u,f),a=a.sibling;a!==null;)T0(a,u,f),a=a.sibling}var nr=null,is=!1;function ta(a,u,f){for(f=f.child;f!==null;)LC(a,u,f),f=f.sibling}function LC(a,u,f){if(Ts&&typeof Ts.onCommitFiberUnmount=="function")try{Ts.onCommitFiberUnmount(Ym,f)}catch{}switch(f.tag){case 5:_r||tc(f,u);case 6:var p=nr,y=is;nr=null,ta(a,u,f),nr=p,is=y,nr!==null&&(is?(a=nr,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):nr.removeChild(f.stateNode));break;case 18:nr!==null&&(is?(a=nr,f=f.stateNode,a.nodeType===8?LE(a.parentNode,f):a.nodeType===1&&LE(a,f),gf(a)):LE(nr,f.stateNode));break;case 4:p=nr,y=is,nr=f.stateNode.containerInfo,is=!0,ta(a,u,f),nr=p,is=y;break;case 0:case 11:case 14:case 15:if(!_r&&(p=f.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var _=y,R=_.destroy;_=_.tag,R!==void 0&&((_&2)!==0||(_&4)!==0)&&w0(f,u,R),y=y.next}while(y!==p)}ta(a,u,f);break;case 1:if(!_r&&(tc(f,u),p=f.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=f.memoizedProps,p.state=f.memoizedState,p.componentWillUnmount()}catch(D){rn(f,u,D)}ta(a,u,f);break;case 21:ta(a,u,f);break;case 22:f.mode&1?(_r=(p=_r)||f.memoizedState!==null,ta(a,u,f),_r=p):ta(a,u,f);break;default:ta(a,u,f)}}function VC(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new P5),u.forEach(function(p){var y=j5.bind(null,a,p);f.has(p)||(f.add(p),p.then(y,y))})}}function ss(a,u){var f=u.deletions;if(f!==null)for(var p=0;p<f.length;p++){var y=f[p];try{var _=a,R=u,D=R;e:for(;D!==null;){switch(D.tag){case 5:nr=D.stateNode,is=!1;break e;case 3:nr=D.stateNode.containerInfo,is=!0;break e;case 4:nr=D.stateNode.containerInfo,is=!0;break e}D=D.return}if(nr===null)throw Error(n(160));LC(_,R,y),nr=null,is=!1;var $=y.alternate;$!==null&&($.return=null),y.return=null}catch(q){rn(y,u,q)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)FC(u,a),u=u.sibling}function FC(a,u){var f=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(ss(u,a),xs(a),p&4){try{Ff(3,a,a.return),Vg(3,a)}catch(ke){rn(a,a.return,ke)}try{Ff(5,a,a.return)}catch(ke){rn(a,a.return,ke)}}break;case 1:ss(u,a),xs(a),p&512&&f!==null&&tc(f,f.return);break;case 5:if(ss(u,a),xs(a),p&512&&f!==null&&tc(f,f.return),a.flags&32){var y=a.stateNode;try{Nt(y,"")}catch(ke){rn(a,a.return,ke)}}if(p&4&&(y=a.stateNode,y!=null)){var _=a.memoizedProps,R=f!==null?f.memoizedProps:_,D=a.type,$=a.updateQueue;if(a.updateQueue=null,$!==null)try{D==="input"&&_.type==="radio"&&_.name!=null&&Nn(y,_),ws(D,R);var q=ws(D,_);for(R=0;R<$.length;R+=2){var oe=$[R],le=$[R+1];oe==="style"?mt(y,le):oe==="dangerouslySetInnerHTML"?Le(y,le):oe==="children"?Nt(y,le):I(y,oe,le,q)}switch(D){case"input":Yt(y,_);break;case"textarea":at(y,_);break;case"select":var ie=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!_.multiple;var we=_.value;we!=null?Je(y,!!_.multiple,we,!1):ie!==!!_.multiple&&(_.defaultValue!=null?Je(y,!!_.multiple,_.defaultValue,!0):Je(y,!!_.multiple,_.multiple?[]:"",!1))}y[xf]=_}catch(ke){rn(a,a.return,ke)}}break;case 6:if(ss(u,a),xs(a),p&4){if(a.stateNode===null)throw Error(n(162));y=a.stateNode,_=a.memoizedProps;try{y.nodeValue=_}catch(ke){rn(a,a.return,ke)}}break;case 3:if(ss(u,a),xs(a),p&4&&f!==null&&f.memoizedState.isDehydrated)try{gf(u.containerInfo)}catch(ke){rn(a,a.return,ke)}break;case 4:ss(u,a),xs(a);break;case 13:ss(u,a),xs(a),y=a.child,y.flags&8192&&(_=y.memoizedState!==null,y.stateNode.isHidden=_,!_||y.alternate!==null&&y.alternate.memoizedState!==null||(R0=gn())),p&4&&VC(a);break;case 22:if(oe=f!==null&&f.memoizedState!==null,a.mode&1?(_r=(q=_r)||oe,ss(u,a),_r=q):ss(u,a),xs(a),p&8192){if(q=a.memoizedState!==null,(a.stateNode.isHidden=q)&&!oe&&(a.mode&1)!==0)for(be=a,oe=a.child;oe!==null;){for(le=be=oe;be!==null;){switch(ie=be,we=ie.child,ie.tag){case 0:case 11:case 14:case 15:Ff(4,ie,ie.return);break;case 1:tc(ie,ie.return);var xe=ie.stateNode;if(typeof xe.componentWillUnmount=="function"){p=ie,f=ie.return;try{u=p,xe.props=u.memoizedProps,xe.state=u.memoizedState,xe.componentWillUnmount()}catch(ke){rn(p,f,ke)}}break;case 5:tc(ie,ie.return);break;case 22:if(ie.memoizedState!==null){jC(le);continue}}we!==null?(we.return=ie,be=we):jC(le)}oe=oe.sibling}e:for(oe=null,le=a;;){if(le.tag===5){if(oe===null){oe=le;try{y=le.stateNode,q?(_=y.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(D=le.stateNode,$=le.memoizedProps.style,R=$!=null&&$.hasOwnProperty("display")?$.display:null,D.style.display=De("display",R))}catch(ke){rn(a,a.return,ke)}}}else if(le.tag===6){if(oe===null)try{le.stateNode.nodeValue=q?"":le.memoizedProps}catch(ke){rn(a,a.return,ke)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===a)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===a)break e;for(;le.sibling===null;){if(le.return===null||le.return===a)break e;oe===le&&(oe=null),le=le.return}oe===le&&(oe=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:ss(u,a),xs(a),p&4&&VC(a);break;case 21:break;default:ss(u,a),xs(a)}}function xs(a){var u=a.flags;if(u&2){try{e:{for(var f=a.return;f!==null;){if(DC(f)){var p=f;break e}f=f.return}throw Error(n(160))}switch(p.tag){case 5:var y=p.stateNode;p.flags&32&&(Nt(y,""),p.flags&=-33);var _=MC(a);T0(a,_,y);break;case 3:case 4:var R=p.stateNode.containerInfo,D=MC(a);S0(a,D,R);break;default:throw Error(n(161))}}catch($){rn(a,a.return,$)}a.flags&=-3}u&4096&&(a.flags&=-4097)}function N5(a,u,f){be=a,$C(a)}function $C(a,u,f){for(var p=(a.mode&1)!==0;be!==null;){var y=be,_=y.child;if(y.tag===22&&p){var R=y.memoizedState!==null||Lg;if(!R){var D=y.alternate,$=D!==null&&D.memoizedState!==null||_r;D=Lg;var q=_r;if(Lg=R,(_r=$)&&!q)for(be=y;be!==null;)R=be,$=R.child,R.tag===22&&R.memoizedState!==null?BC(y):$!==null?($.return=R,be=$):BC(y);for(;_!==null;)be=_,$C(_),_=_.sibling;be=y,Lg=D,_r=q}UC(a)}else(y.subtreeFlags&8772)!==0&&_!==null?(_.return=y,be=_):UC(a)}}function UC(a){for(;be!==null;){var u=be;if((u.flags&8772)!==0){var f=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:_r||Vg(5,u);break;case 1:var p=u.stateNode;if(u.flags&4&&!_r)if(f===null)p.componentDidMount();else{var y=u.elementType===u.type?f.memoizedProps:rs(u.type,f.memoizedProps);p.componentDidUpdate(y,f.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var _=u.updateQueue;_!==null&&V1(u,_,p);break;case 3:var R=u.updateQueue;if(R!==null){if(f=null,u.child!==null)switch(u.child.tag){case 5:f=u.child.stateNode;break;case 1:f=u.child.stateNode}V1(u,R,f)}break;case 5:var D=u.stateNode;if(f===null&&u.flags&4){f=D;var $=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&f.focus();break;case"img":$.src&&(f.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var q=u.alternate;if(q!==null){var oe=q.memoizedState;if(oe!==null){var le=oe.dehydrated;le!==null&&gf(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}_r||u.flags&512&&E0(u)}catch(ie){rn(u,u.return,ie)}}if(u===a){be=null;break}if(f=u.sibling,f!==null){f.return=u.return,be=f;break}be=u.return}}function jC(a){for(;be!==null;){var u=be;if(u===a){be=null;break}var f=u.sibling;if(f!==null){f.return=u.return,be=f;break}be=u.return}}function BC(a){for(;be!==null;){var u=be;try{switch(u.tag){case 0:case 11:case 15:var f=u.return;try{Vg(4,u)}catch($){rn(u,f,$)}break;case 1:var p=u.stateNode;if(typeof p.componentDidMount=="function"){var y=u.return;try{p.componentDidMount()}catch($){rn(u,y,$)}}var _=u.return;try{E0(u)}catch($){rn(u,_,$)}break;case 5:var R=u.return;try{E0(u)}catch($){rn(u,R,$)}}}catch($){rn(u,u.return,$)}if(u===a){be=null;break}var D=u.sibling;if(D!==null){D.return=u.return,be=D;break}be=u.return}}var D5=Math.ceil,Fg=P.ReactCurrentDispatcher,b0=P.ReactCurrentOwner,Di=P.ReactCurrentBatchConfig,ct=0,Bn=null,In=null,rr=0,gi=0,nc=Yo(0),Vn=0,$f=null,yl=0,$g=0,I0=0,Uf=null,Zr=null,R0=0,rc=1/0,go=null,Ug=!1,x0=null,na=null,jg=!1,ra=null,Bg=0,jf=0,k0=null,zg=-1,Wg=0;function Fr(){return(ct&6)!==0?gn():zg!==-1?zg:zg=gn()}function ia(a){return(a.mode&1)===0?1:(ct&2)!==0&&rr!==0?rr&-rr:y5.transition!==null?(Wg===0&&(Wg=Dk()),Wg):(a=Tt,a!==0||(a=window.event,a=a===void 0?16:zk(a.type)),a)}function os(a,u,f,p){if(50<jf)throw jf=0,k0=null,Error(n(185));df(a,f,p),((ct&2)===0||a!==Bn)&&(a===Bn&&((ct&2)===0&&($g|=f),Vn===4&&sa(a,rr)),ei(a,p),f===1&&ct===0&&(u.mode&1)===0&&(rc=gn()+500,vg&&Xo()))}function ei(a,u){var f=a.callbackNode;yz(a,u);var p=Zm(a,a===Bn?rr:0);if(p===0)f!==null&&Pk(f),a.callbackNode=null,a.callbackPriority=0;else if(u=p&-p,a.callbackPriority!==u){if(f!=null&&Pk(f),u===1)a.tag===0?g5(WC.bind(null,a)):k1(WC.bind(null,a)),f5(function(){(ct&6)===0&&Xo()}),f=null;else{switch(Mk(p)){case 1:f=aE;break;case 4:f=Ok;break;case 16:f=Qm;break;case 536870912:f=Nk;break;default:f=Qm}f=XC(f,zC.bind(null,a))}a.callbackPriority=u,a.callbackNode=f}}function zC(a,u){if(zg=-1,Wg=0,(ct&6)!==0)throw Error(n(327));var f=a.callbackNode;if(ic()&&a.callbackNode!==f)return null;var p=Zm(a,a===Bn?rr:0);if(p===0)return null;if((p&30)!==0||(p&a.expiredLanes)!==0||u)u=qg(a,p);else{u=p;var y=ct;ct|=2;var _=HC();(Bn!==a||rr!==u)&&(go=null,rc=gn()+500,_l(a,u));do try{V5();break}catch(D){qC(a,D)}while(!0);HE(),Fg.current=_,ct=y,In!==null?u=0:(Bn=null,rr=0,u=Vn)}if(u!==0){if(u===2&&(y=lE(a),y!==0&&(p=y,u=C0(a,y))),u===1)throw f=$f,_l(a,0),sa(a,p),ei(a,gn()),f;if(u===6)sa(a,p);else{if(y=a.current.alternate,(p&30)===0&&!M5(y)&&(u=qg(a,p),u===2&&(_=lE(a),_!==0&&(p=_,u=C0(a,_))),u===1))throw f=$f,_l(a,0),sa(a,p),ei(a,gn()),f;switch(a.finishedWork=y,a.finishedLanes=p,u){case 0:case 1:throw Error(n(345));case 2:wl(a,Zr,go);break;case 3:if(sa(a,p),(p&130023424)===p&&(u=R0+500-gn(),10<u)){if(Zm(a,0)!==0)break;if(y=a.suspendedLanes,(y&p)!==p){Fr(),a.pingedLanes|=a.suspendedLanes&y;break}a.timeoutHandle=ME(wl.bind(null,a,Zr,go),u);break}wl(a,Zr,go);break;case 4:if(sa(a,p),(p&4194240)===p)break;for(u=a.eventTimes,y=-1;0<p;){var R=31-es(p);_=1<<R,R=u[R],R>y&&(y=R),p&=~_}if(p=y,p=gn()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*D5(p/1960))-p,10<p){a.timeoutHandle=ME(wl.bind(null,a,Zr,go),p);break}wl(a,Zr,go);break;case 5:wl(a,Zr,go);break;default:throw Error(n(329))}}}return ei(a,gn()),a.callbackNode===f?zC.bind(null,a):null}function C0(a,u){var f=Uf;return a.current.memoizedState.isDehydrated&&(_l(a,u).flags|=256),a=qg(a,u),a!==2&&(u=Zr,Zr=f,u!==null&&A0(u)),a}function A0(a){Zr===null?Zr=a:Zr.push.apply(Zr,a)}function M5(a){for(var u=a;;){if(u.flags&16384){var f=u.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var p=0;p<f.length;p++){var y=f[p],_=y.getSnapshot;y=y.value;try{if(!ts(_(),y))return!1}catch{return!1}}}if(f=u.child,u.subtreeFlags&16384&&f!==null)f.return=u,u=f;else{if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function sa(a,u){for(u&=~I0,u&=~$g,a.suspendedLanes|=u,a.pingedLanes&=~u,a=a.expirationTimes;0<u;){var f=31-es(u),p=1<<f;a[f]=-1,u&=~p}}function WC(a){if((ct&6)!==0)throw Error(n(327));ic();var u=Zm(a,0);if((u&1)===0)return ei(a,gn()),null;var f=qg(a,u);if(a.tag!==0&&f===2){var p=lE(a);p!==0&&(u=p,f=C0(a,p))}if(f===1)throw f=$f,_l(a,0),sa(a,u),ei(a,gn()),f;if(f===6)throw Error(n(345));return a.finishedWork=a.current.alternate,a.finishedLanes=u,wl(a,Zr,go),ei(a,gn()),null}function P0(a,u){var f=ct;ct|=1;try{return a(u)}finally{ct=f,ct===0&&(rc=gn()+500,vg&&Xo())}}function vl(a){ra!==null&&ra.tag===0&&(ct&6)===0&&ic();var u=ct;ct|=1;var f=Di.transition,p=Tt;try{if(Di.transition=null,Tt=1,a)return a()}finally{Tt=p,Di.transition=f,ct=u,(ct&6)===0&&Xo()}}function O0(){gi=nc.current,Mt(nc)}function _l(a,u){a.finishedWork=null,a.finishedLanes=0;var f=a.timeoutHandle;if(f!==-1&&(a.timeoutHandle=-1,d5(f)),In!==null)for(f=In.return;f!==null;){var p=f;switch(jE(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&gg();break;case 3:Zu(),Mt(Yr),Mt(gr),n0();break;case 5:e0(p);break;case 4:Zu();break;case 13:Mt(Xt);break;case 19:Mt(Xt);break;case 10:GE(p.type._context);break;case 22:case 23:O0()}f=f.return}if(Bn=a,In=a=oa(a.current,null),rr=gi=u,Vn=0,$f=null,I0=$g=yl=0,Zr=Uf=null,pl!==null){for(u=0;u<pl.length;u++)if(f=pl[u],p=f.interleaved,p!==null){f.interleaved=null;var y=p.next,_=f.pending;if(_!==null){var R=_.next;_.next=y,p.next=R}f.pending=p}pl=null}return a}function qC(a,u){do{var f=In;try{if(HE(),Cg.current=Ng,Ag){for(var p=Zt.memoizedState;p!==null;){var y=p.queue;y!==null&&(y.pending=null),p=p.next}Ag=!1}if(gl=0,jn=Ln=Zt=null,Nf=!1,Df=0,b0.current=null,f===null||f.return===null){Vn=1,$f=u,In=null;break}e:{var _=a,R=f.return,D=f,$=u;if(u=rr,D.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var q=$,oe=D,le=oe.tag;if((oe.mode&1)===0&&(le===0||le===11||le===15)){var ie=oe.alternate;ie?(oe.updateQueue=ie.updateQueue,oe.memoizedState=ie.memoizedState,oe.lanes=ie.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var we=gC(R);if(we!==null){we.flags&=-257,yC(we,R,D,_,u),we.mode&1&&mC(_,q,u),u=we,$=q;var xe=u.updateQueue;if(xe===null){var ke=new Set;ke.add($),u.updateQueue=ke}else xe.add($);break e}else{if((u&1)===0){mC(_,q,u),N0();break e}$=Error(n(426))}}else if(zt&&D.mode&1){var yn=gC(R);if(yn!==null){(yn.flags&65536)===0&&(yn.flags|=256),yC(yn,R,D,_,u),WE(ec($,D));break e}}_=$=ec($,D),Vn!==4&&(Vn=2),Uf===null?Uf=[_]:Uf.push(_),_=R;do{switch(_.tag){case 3:_.flags|=65536,u&=-u,_.lanes|=u;var j=hC(_,$,u);L1(_,j);break e;case 1:D=$;var U=_.type,z=_.stateNode;if((_.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(na===null||!na.has(z)))){_.flags|=65536,u&=-u,_.lanes|=u;var de=pC(_,D,u);L1(_,de);break e}}_=_.return}while(_!==null)}KC(f)}catch(Ce){u=Ce,In===f&&f!==null&&(In=f=f.return);continue}break}while(!0)}function HC(){var a=Fg.current;return Fg.current=Ng,a===null?Ng:a}function N0(){(Vn===0||Vn===3||Vn===2)&&(Vn=4),Bn===null||(yl&268435455)===0&&($g&268435455)===0||sa(Bn,rr)}function qg(a,u){var f=ct;ct|=2;var p=HC();(Bn!==a||rr!==u)&&(go=null,_l(a,u));do try{L5();break}catch(y){qC(a,y)}while(!0);if(HE(),ct=f,Fg.current=p,In!==null)throw Error(n(261));return Bn=null,rr=0,Vn}function L5(){for(;In!==null;)GC(In)}function V5(){for(;In!==null&&!lz();)GC(In)}function GC(a){var u=JC(a.alternate,a,gi);a.memoizedProps=a.pendingProps,u===null?KC(a):In=u,b0.current=null}function KC(a){var u=a;do{var f=u.alternate;if(a=u.return,(u.flags&32768)===0){if(f=C5(f,u,gi),f!==null){In=f;return}}else{if(f=A5(f,u),f!==null){f.flags&=32767,In=f;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Vn=6,In=null;return}}if(u=u.sibling,u!==null){In=u;return}In=u=a}while(u!==null);Vn===0&&(Vn=5)}function wl(a,u,f){var p=Tt,y=Di.transition;try{Di.transition=null,Tt=1,F5(a,u,f,p)}finally{Di.transition=y,Tt=p}return null}function F5(a,u,f,p){do ic();while(ra!==null);if((ct&6)!==0)throw Error(n(327));f=a.finishedWork;var y=a.finishedLanes;if(f===null)return null;if(a.finishedWork=null,a.finishedLanes=0,f===a.current)throw Error(n(177));a.callbackNode=null,a.callbackPriority=0;var _=f.lanes|f.childLanes;if(vz(a,_),a===Bn&&(In=Bn=null,rr=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||jg||(jg=!0,XC(Qm,function(){return ic(),null})),_=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||_){_=Di.transition,Di.transition=null;var R=Tt;Tt=1;var D=ct;ct|=4,b0.current=null,O5(a,f),FC(f,a),i5(NE),ng=!!OE,NE=OE=null,a.current=f,N5(f),uz(),ct=D,Tt=R,Di.transition=_}else a.current=f;if(jg&&(jg=!1,ra=a,Bg=y),_=a.pendingLanes,_===0&&(na=null),fz(f.stateNode),ei(a,gn()),u!==null)for(p=a.onRecoverableError,f=0;f<u.length;f++)y=u[f],p(y.value,{componentStack:y.stack,digest:y.digest});if(Ug)throw Ug=!1,a=x0,x0=null,a;return(Bg&1)!==0&&a.tag!==0&&ic(),_=a.pendingLanes,(_&1)!==0?a===k0?jf++:(jf=0,k0=a):jf=0,Xo(),null}function ic(){if(ra!==null){var a=Mk(Bg),u=Di.transition,f=Tt;try{if(Di.transition=null,Tt=16>a?16:a,ra===null)var p=!1;else{if(a=ra,ra=null,Bg=0,(ct&6)!==0)throw Error(n(331));var y=ct;for(ct|=4,be=a.current;be!==null;){var _=be,R=_.child;if((be.flags&16)!==0){var D=_.deletions;if(D!==null){for(var $=0;$<D.length;$++){var q=D[$];for(be=q;be!==null;){var oe=be;switch(oe.tag){case 0:case 11:case 15:Ff(8,oe,_)}var le=oe.child;if(le!==null)le.return=oe,be=le;else for(;be!==null;){oe=be;var ie=oe.sibling,we=oe.return;if(NC(oe),oe===q){be=null;break}if(ie!==null){ie.return=we,be=ie;break}be=we}}}var xe=_.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var yn=ke.sibling;ke.sibling=null,ke=yn}while(ke!==null)}}be=_}}if((_.subtreeFlags&2064)!==0&&R!==null)R.return=_,be=R;else e:for(;be!==null;){if(_=be,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:Ff(9,_,_.return)}var j=_.sibling;if(j!==null){j.return=_.return,be=j;break e}be=_.return}}var U=a.current;for(be=U;be!==null;){R=be;var z=R.child;if((R.subtreeFlags&2064)!==0&&z!==null)z.return=R,be=z;else e:for(R=U;be!==null;){if(D=be,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:Vg(9,D)}}catch(Ce){rn(D,D.return,Ce)}if(D===R){be=null;break e}var de=D.sibling;if(de!==null){de.return=D.return,be=de;break e}be=D.return}}if(ct=y,Xo(),Ts&&typeof Ts.onPostCommitFiberRoot=="function")try{Ts.onPostCommitFiberRoot(Ym,a)}catch{}p=!0}return p}finally{Tt=f,Di.transition=u}}return!1}function QC(a,u,f){u=ec(f,u),u=hC(a,u,1),a=ea(a,u,1),u=Fr(),a!==null&&(df
vendor: 5,031 bytes, line 41
41(a,1,u),ei(a,u))}function rn(a,u,f){if(a.tag===3)QC(a,a,f);else for(;u!==null;){if(u.tag===3){QC(u,a,f);break}else if(u.tag===1){var p=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(na===null||!na.has(p))){a=ec(f,a),a=pC(u,a,1),u=ea(u,a,1),a=Fr(),u!==null&&(df(u,1,a),ei(u,a));break}}u=u.return}}function $5(a,u,f){var p=a.pingCache;p!==null&&p.delete(u),u=Fr(),a.pingedLanes|=a.suspendedLanes&f,Bn===a&&(rr&f)===f&&(Vn===4||Vn===3&&(rr&130023424)===rr&&500>gn()-R0?_l(a,0):I0|=f),ei(a,u)}function YC(a,u){u===0&&((a.mode&1)===0?u=1:(u=Xm,Xm<<=1,(Xm&130023424)===0&&(Xm=4194304)));var f=Fr();a=ho(a,u),a!==null&&(df(a,u,f),ei(a,f))}function U5(a){var u=a.memoizedState,f=0;u!==null&&(f=u.retryLane),YC(a,f)}function j5(a,u){var f=0;switch(a.tag){case 13:var p=a.stateNode,y=a.memoizedState;y!==null&&(f=y.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(u),YC(a,f)}var JC;JC=function(a,u,f){if(a!==null)if(a.memoizedProps!==u.pendingProps||Yr.current)Xr=!0;else{if((a.lanes&f)===0&&(u.flags&128)===0)return Xr=!1,k5(a,u,f);Xr=(a.flags&131072)!==0}else Xr=!1,zt&&(u.flags&1048576)!==0&&C1(u,wg,u.index);switch(u.lanes=0,u.tag){case 2:var p=u.type;Mg(a,u),a=u.pendingProps;var y=Hu(u,gr.current);Ju(u,f),y=s0(null,u,p,a,y,f);var _=o0();return u.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Jr(p)?(_=!0,yg(u)):_=!1,u.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,YE(u),y.updater=Rg,u.stateNode=y,y._reactInternals=u,XE(u,p,a,f),u=p0(null,u,p,!0,_,f)):(u.tag=0,zt&&_&&UE(u),Vr(null,u,y,f),u=u.child),u;case 16:p=u.elementType;e:{switch(Mg(a,u),a=u.pendingProps,y=p._init,p=y(p._payload),u.type=p,y=u.tag=z5(p),a=rs(p,a),y){case 0:u=h0(null,u,p,a,f);break e;case 1:u=TC(null,u,p,a,f);break e;case 11:u=vC(null,u,p,a,f);break e;case 14:u=_C(null,u,p,rs(p.type,a),f);break e}throw Error(n(306,p,""))}return u;case 0:return p=u.type,y=u.pendingProps,y=u.elementType===p?y:rs(p,y),h0(a,u,p,y,f);case 1:return p=u.type,y=u.pendingProps,y=u.elementType===p?y:rs(p,y),TC(a,u,p,y,f);case 3:e:{if(bC(u),a===null)throw Error(n(387));p=u.pendingProps,_=u.memoizedState,y=_.element,M1(a,u),Ig(u,p,null,f);var R=u.memoizedState;if(p=R.element,_.isDehydrated)if(_={element:p,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},u.updateQueue.baseState=_,u.memoizedState=_,u.flags&256){y=ec(Error(n(423)),u),u=IC(a,u,p,f,y);break e}else if(p!==y){y=ec(Error(n(424)),u),u=IC(a,u,p,f,y);break e}else for(mi=Qo(u.stateNode.containerInfo.firstChild),pi=u,zt=!0,ns=null,f=W1(u,null,p,f),u.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Qu(),p===y){u=mo(a,u,f);break e}Vr(a,u,p,f)}u=u.child}return u;case 5:return q1(u),a===null&&zE(u),p=u.type,y=u.pendingProps,_=a!==null?a.memoizedProps:null,R=y.children,DE(p,y)?R=null:_!==null&&DE(p,_)&&(u.flags|=32),SC(a,u),Vr(a,u,R,f),u.child;case 6:return a===null&&zE(u),null;case 13:return RC(a,u,f);case 4:return ZE(u,u.stateNode.containerInfo),p=u.pendingProps,a===null?u.child=Xu(u,null,p,f):Vr(a,u,p,f),u.child;case 11:return p=u.type,y=u.pendingProps,y=u.elementType===p?y:rs(p,y),vC(a,u,p,y,f);case 7:return Vr(a,u,u.pendingProps,f),u.child;case 8:return Vr(a,u,u.pendingProps.children,f),u.child;case 12:return Vr(a,u,u.pendingProps.children,f),u.child;case 10:e:{if(p=u.type._context,y=u.pendingProps,_=u.memoizedProps,R=y.value,Ct(Sg,p._currentValue),p._currentValue=R,_!==null)if(ts(_.value,R)){if(_.children===y.children&&!Yr.current){u=mo(a,u,f);break e}}else for(_=u.child,_!==null&&(_.return=u);_!==null;){var D=_.dependencies;if(D!==null){R=_.child;for(var $=D.firstContext;$!==null;){if($.context===p){if(_.tag===1){$=po(-1,f&-f),$.tag=2;var q=_.updateQueue;if(q!==null){q=q.shared;var oe=q.pending;oe===null?$.next=$:($.next=oe.next,oe.next=$),q.pending=$}}_.lanes|=f,$=_.alternate,$!==null&&($.lanes|=f),KE(_.return,f,u),D.lanes|=f;break}$=$.next}}else if(_.tag===10)R=_.type===u.type?null:_.child;else if(_.tag===18){if(R=_.return,R===null)throw Error(n(341));R.lanes|=f,D=R.alternate,D!==null&&(D.lanes|=f),KE(R,f,u),R=_.sibling}else R=_.child;if(R!==null)R.return=_;else for(R=_;R!==null;){if(R===u){R=null;break}if(_=R.sibling,_!==null){_.return=R.return,R=_;break}R=R.return}_=R}Vr(a,u,y.children,f),u=u.child}return u;case 9:return y=u.type,p=u.pendingProps.children,Ju(u,f),y=Oi(y),p=p(y),u.flags|=1,Vr(a,u,p,f),u.child;case 14:return p=u.type,y=rs(p,u.pendingProps),y=rs(p.type,y),_C(a,u,p,y,f);case 15:return wC(a,u,u.type,u.pendingProps,f);case 17:return p=u.type,y=u.pendingProps,y=u.elementType===p?y:rs(p,y),Mg(a,u),u.tag=1,Jr(p)?(a=!0,yg(u)):a=!1,Ju(u,f),U1(u,p,y),XE(u,p,y,f),p0(null,u,p,!0,a,f);case 19:return kC(a,u,f);case 22:return EC(a,u,f)}throw Error(n(156,u.tag))};function XC(a,u){return mr(a,u)}function B5(a,u,f,p){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 6,511 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(a,u,f,p){return new B5(a,u,f,p)}function D0(a){return a=a.prototype,!(!a||!a.isReactComponent)}function z5(a){if(typeof a=="function")return D0(a)?1:0;if(a!=null){if(a=a.$$typeof,a===ne)return 11;if(a===ee)return 14}return 2}function oa(a,u){var f=a.alternate;return f===null?(f=Mi(a.tag,u,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=u,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,u=a.dependencies,f.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function Hg(a,u,f,p,y,_){var R=2;if(p=a,typeof a=="function")D0(a)&&(R=1);else if(typeof a=="string")R=5;else e:switch(a){case k:return El(f.children,y,_,u);case V:R=8,y|=8;break;case L:return a=Mi(12,f,u,y|2),a.elementType=L,a.lanes=_,a;case Q:return a=Mi(13,f,u,y),a.elementType=Q,a.lanes=_,a;case X:return a=Mi(19,f,u,y),a.elementType=X,a.lanes=_,a;case Z:return Gg(f,y,_,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case F:R=10;break e;case K:R=9;break e;case ne:R=11;break e;case ee:R=14;break e;case J:R=16,p=null;break e}throw Error(n(130,a==null?a:typeof a,""))}return u=Mi(R,f,u,y),u.elementType=a,u.type=p,u.lanes=_,u}function El(a,u,f,p){return a=Mi(7,a,p,u),a.lanes=f,a}function Gg(a,u,f,p){return a=Mi(22,a,p,u),a.elementType=Z,a.lanes=f,a.stateNode={isHidden:!1},a}function M0(a,u,f){return a=Mi(6,a,null,u),a.lanes=f,a}function L0(a,u,f){return u=Mi(4,a.children!==null?a.children:[],a.key,u),u.lanes=f,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function W5(a,u,f,p,y){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uE(0),this.expirationTimes=uE(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uE(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function V0(a,u,f,p,y,_,R,D,$){return a=new W5(a,u,f,D,$),u===1?(u=1,_===!0&&(u|=8)):u=0,_=Mi(3,null,null,u),a.current=_,_.stateNode=a,_.memoizedState={element:p,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},YE(_),a}function q5(a,u,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N,key:p==null?null:""+p,children:a,containerInfo:u,implementation:f}}function ZC(a){if(!a)return Jo;a=a._reactInternals;e:{if(Ss(a)!==a||a.tag!==1)throw Error(n(170));var u=a;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(Jr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(n(171))}if(a.tag===1){var f=a.type;if(Jr(f))return R1(a,f,u)}return u}function eA(a,u,f,p,y,_,R,D,$){return a=V0(f,p,!0,a,y,_,R,D,$),a.context=ZC(null),f=a.current,p=Fr(),y=ia(f),_=po(p,y),_.callback=u??null,ea(f,_,y),a.current.lanes=y,df(a,y,p),ei(a,p),a}function Kg(a,u,f,p){var y=u.current,_=Fr(),R=ia(y);return f=ZC(f),u.context===null?u.context=f:u.pendingContext=f,u=po(_,R),u.payload={element:a},p=p===void 0?null:p,p!==null&&(u.callback=p),a=ea(y,u,R),a!==null&&(os(a,y,R,_),bg(a,y,R)),R}function Qg(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function tA(a,u){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<u?f:u}}function F0(a,u){tA(a,u),(a=a.alternate)&&tA(a,u)}function H5(){return null}var nA=typeof reportError=="function"?reportError:function(a){console.error(a)};function $0(a){this._internalRoot=a}Yg.prototype.render=$0.prototype.render=function(a){var u=this._internalRoot;if(u===null)throw Error(n(409));Kg(a,u,null,null)},Yg.prototype.unmount=$0.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var u=a.containerInfo;vl(function(){Kg(null,a,null,null)}),u[lo]=null}};function Yg(a){this._internalRoot=a}Yg.prototype.unstable_scheduleHydration=function(a){if(a){var u=Fk();a={blockedOn:null,target:a,priority:u};for(var f=0;f<Ho.length&&u!==0&&u<Ho[f].priority;f++);Ho.splice(f,0,a),f===0&&jk(a)}};function U0(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Jg(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function rA(){}function G5(a,u,f,p,y){if(y){if(typeof p=="function"){var _=p;p=function(){var q=Qg(R);_.call(q)}}var R=eA(u,p,a,0,null,!1,!1,"",rA);return a._reactRootContainer=R,a[lo]=R.current,If(a.nodeType===8?a.parentNode:a),vl(),R}for(;y=a.lastChild;)a.removeChild(y);if(typeof p=="function"){var D=p;p=function(){var q=Qg($);D.call(q)}}var $=V0(a,0,!1,null,null,!1,!1,"",rA);return a._reactRootContainer=$,a[lo]=$.current,If(a.nodeType===8?a.parentNode:a),vl(function(){Kg(u,$,f,p)}),$}function Xg(a,u,f,p,y){var _=f._reactRootContainer;if(_){var R=_;if(typeof y=="function"){var D=y;y=function(){var $=Qg(R);D.call($)}}Kg(u,R,a,y)}else R=G5(f,u,a,y,p);return Qg(R)}Lk=function(a){switch(a.tag){case 3:var u=a.stateNode;if(u.current.memoizedState.isDehydrated){var f=cf(u.pendingLanes);f!==0&&(cE(u,f|1),ei(u,gn()),(ct&6)===0&&(rc=gn()+500,Xo()))}break;case 13:vl(function(){var p=ho(a,1);if(p!==null){var y=Fr();os(p,a,1,y)}}),F0(a,1)}},dE=function(a){if(a.tag===13){var u=ho(a,134217728);if(u!==null){var f=Fr();os(u,a,134217728,f)}F0(a,134217728)}},Vk=function(a){if(a.tag===13){var u=ia(a),f=ho(a,u);if(f!==null){var p=Fr();os(f,a,u,p)}F0(a,u)}},Fk=function(){return Tt},$k=function(a,u){var f=Tt;try{return Tt=a,u()}finally{Tt=f}},sf=function(a,u,f){switch(u){case"input":if(Yt(a,f),u=f.name,f.type==="radio"&&u!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<f.length;u++){var p=f[u];
41if(p!==a&&p.form===a.form){var y=mg(p);if(!y)throw Error(n(90));Qe(p),Yt(p,y)}}}break;case"textarea":at(a,f);break;case"select":u=f.value,u!=null&&Je(a,!!f.multiple,u,!1)}},jm=P0,Bm=vl;var K5={usingClientEntryPoint:!1,Events:[kf,Wu,mg,af,lf,P0]},Bf={findFiberByHostInstance:cl,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Q5={bundleType:Bf.bundleType,version:Bf.version,rendererPackageName:Bf.rendererPackageName,rendererConfig:Bf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=Km(a),a===null?null:a.stateNode},findFiberByHostInstance:Bf.findFiberByHostInstance||H5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zg.isDisabled&&Zg.supportsFiber)try{Ym=Zg.inject(Q5),Ts=Zg}catch{}}return ti.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K5,ti.createPortal=function(a,u){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!U0(u))throw Error(n(200));return q5(a,u,null,f)},ti.createRoot=function(a,u){if(!U0(a))throw Error(n(299));var f=!1,p="",y=nA;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(p=u.identifierPrefix),u.onRecoverableError!==void 0&&(y=u.onRecoverableError)),u=V0(a,1,!1,null,null,f,!1,p,y),a[lo]=u.current,If(a.nodeType===8?a.parentNode:a),new $0(u)},ti.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=Km(u),a=a===null?null:a.stateNode,a},ti.flushSync=function(a){return vl(a)},ti.hydrate=function(a,u,f){if(!Jg(u))throw Error(n(200));return Xg(null,a,u,!0,f)},ti.hydrateRoot=function(a,u,f){if(!U0(a))throw Error(n(405));var p=f!=null&&f.hydratedSources||null,y=!1,_="",R=nA;if(f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(_=f.identifierPrefix),f.onRecoverableError!==void 0&&(R=f.onRecoverableError)),u=eA(u,null,a,1,f??null,y,!1,_,R),a[lo]=u.current,If(a),p)for(a=0;a<p.length;a++)f=p[a],y=f._getVersion,y=y(f._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[f,y]:u.mutableSourceEagerHydrationData.push(f,y);return new Yg(u)},ti.render=function(a,u,f){if(!Jg(u))throw Error(n(200));return Xg(null,a,u,!1,f)},ti.unmountComponentAtNode=function(a){if(!Jg(a))throw Error(n(40));return a._reactRootContainer?(vl(function(){Xg(null,null,a,!1,function(){a._reactRootContainer=null,a[lo]=null})}),!0):!1},ti.unstable_batchedUpdates=P0,ti.unstable_renderSubtreeIntoContainer=function(a,u,f,p){if(!Jg(f))throw Error(n(200));if(a==null||a._reactInternals===void 0)throw Error(n(38));return Xg(a,u,f,!1,p)},ti.version="18.2.0-next-9e3b772b8-20220608",ti}var dA;function EM(){if(dA)return z0.exports;dA=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(),z0.exports=nW(),z0.exports}var fA;function rW(){if(fA)return ey;fA=1;var t=EM();return ey.createRoot=t.createRoot,ey.hydrateRoot=t.hydrateRoot,ey}var iW=rW(),H0={exports:{}},G0={};/**
42 * @license React
43 * use-sync-external-store-with-selector.production.min.js
44 *
45 * Copyright (c) Facebook, Inc. and its affiliates.
46 *
47 * This source code is licensed under the MIT license found in the
48 * LICENSE file in the root directory of this source tree.
49 */var hA;function sW(){if(hA)return G0;hA=1;var t=Hp();function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,s=t.useEffect,o=t.useMemo,l=t.useDebugValue;return G0.useSyncExternalStoreWithSelector=function(c,d,h,m,g){var v=i(null);if(v.current===null){var E={hasValue:!1,value:null};v.current=E}else E=v.current;v=o(function(){function w(x){if(!b){if(b=!0,C=x,x=m(x),g!==void 0&&E.hasValue){var N=E.value;if(g(N,x))return I=N}return I=x}if(N=I,n(C,x))return N;var k=m(x);return g!==void 0&&g(N,k)?N:(C=x,I=k)}var b=!1,C,I,P=h===void 0?null:h;return[function(){return w(d())},P===null?void 0:function(){return w(P())}]},[d,h,m,g]);var S=r(c,v[0],v[1]);return s(function(){E.hasValue=!0,E.value=S},[S]),l(S),S},G0}var pA;function oW(){return pA||(pA=1,H0.exports=sW()),H0.exports}var aW=oW(),wi=ii,mA=Symbol.for("react-redux-context"),gA=typeof globalThis<"u"?globalThis:{};function lW(){if(!wi.createContext)return{};const t=gA[mA]??(gA[mA]=new Map);let e=t.get(wi.createContext);return e||(e=wi.createContext(null),t.set(wi.createContext,e)),e}var Da=lW(),uW=()=>{throw new Error("uSES not initialized!")};function sI(t=Da){return function(){return wi.useContext(t)}
49}var SM=sI(),TM=uW,cW=t=>{TM=t},dW=(t,e)=>t===e;function fW(t=Da){const e=t===Da?SM:sI(t),n=(r,i={})=>{const{equalityFn:s=dW,devModeChecks:o={}}=typeof i=="function"?{equalityFn:i}:i,{store:l,subscription:c,getServerState:d,stabilityCheck:h,identityFunctionCheck:m}=e();wi.useRef(!0);const g=wi.useCallback({[r.name](E){return r(E)}}[r.name],[r,h,o.stabilityCheck]),v=TM(c.addNestedSub,l.getState,d||l.getState,g,s);return wi.useDebugValue(v),v};return Object.assign(n,{withTypes:()=>n}),n}var st=fW();function hW(t){t()}function pW(){let t=null,e=null;return{clear(){t=null,e=null},notify(){hW(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=e={callback:n,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!r||t===null||(r=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var yA={notify(){},get:()=>[]};function mW(t,e){let n,r=yA,i=0,s=!1;function o(S){h();const w=r.subscribe(S);let b=!1;return()=>{b||(b=!0,w(),m())}}function l(){r.notify()}function c(){E.onStateChange&&E.onStateChange()}function d(){return s}function h(){i++,n||(n=t.subscribe(c),r=pW())}function m(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=yA)}function g(){s||(s=!0,h())}function v(){s&&(s=!1,m())}const E={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:g,tryUnsubscribe:v,getListeners:()=>r};return E}var gW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yW=gW?wi.useLayoutEffect:wi.useEffect;function vW({store:t,context:e,children:n,serverState:r,stabilityCheck:i="once",identityFunctionCheck:s="once"}){const o=wi.useMemo(()=>{const d=mW(t);return{store:t,subscription:d,getServerState:r?()=>r:void 0,stabilityCheck:i,identityFunctionCheck:s}},[t,r,i,s]),l=wi.useMemo(()=>t.getState(),[t]);yW(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),l!==t.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,l]);const c=e||Da;return wi.createElement(c.Provider,{value:o},n)}var _W=vW;function bM(t=Da){const e=t===Da?SM:sI(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var wW=bM();function EW(t=Da){const e=t===Da?wW:bM(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Eu=EW();cW(aW.useSyncExternalStoreWithSelector);var IM=EM();const ty=Pr(IM);/**
50 * @remix-run/router v1.15.3
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function ip(){return ip=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},ip.apply(this,arguments)}var Sa;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Sa||(Sa={}));const vA="popstate";function SW(t){t===void 0&&(t={});function e(r,i){let{pathname:s,search:o,hash:l}=r.location;return _T("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:rv(i)}return bW(e,n,null,t)}function Gt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function RM(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function TW(){return Math.random().toString(36).substr(2,8)}function _A(t,e){return{usr:t.state,key:t.key,idx:e}}function _T(t,e,n,r){return n===void 0&&(n=null),ip({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?xd(e):e,{state:n,key:e&&e.key||r||TW()})}function rv(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function xd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function bW(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Sa.Pop,c=null,d=h();d==null&&(d=0,o.replaceState(ip({},o.state,{idx:d}),""));function h(){return(o.state||{idx:null}).idx}function m(){l=Sa.Pop;let w=h(),b=w==null?null:w-d;d=w,c&&c({action:l,location:S.location,delta:b})}function g(w,b){l=Sa.Push;let C=_T(S.location,w,b);d=h()+1;let I=_A(C,d),P=S.createHref(C);try{o.pushState(I,"",P)}
vendor: 3,162 bytes, line 58
58catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(P)}s&&c&&c({action:l,location:S.location,delta:1})}function v(w,b){l=Sa.Replace;let C=_T(S.location,w,b);d=h();let I=_A(C,d),P=S.createHref(C);o.replaceState(I,"",P),s&&c&&c({action:l,location:S.location,delta:0})}function E(w){let b=i.location.origin!=="null"?i.location.origin:i.location.href,C=typeof w=="string"?w:rv(w);return C=C.replace(/ $/,"%20"),Gt(b,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,b)}let S={get action(){return l},get location(){return t(i,o)},listen(w){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(vA,m),c=w,()=>{i.removeEventListener(vA,m),c=null}},createHref(w){return e(i,w)},createURL:E,encodeLocation(w){let b=E(w);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:g,replace:v,go(w){return o.go(w)}};return S}var wA;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(wA||(wA={}));function IW(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?xd(e):e,i=Zc(r.pathname||"/",n);if(i==null)return null;let s=xM(t);RW(s);let o=null;for(let l=0;o==null&&l<s.length;++l){let c=VW(i);o=MW(s[l],c)}return o}function xM(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(Gt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=xa([r,c.relativePath]),h=n.concat(c);s.children&&s.children.length>0&&(Gt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),xM(s.children,e,h,d)),!(s.path==null&&!s.index)&&e.push({path:d,score:NW(d,s.index),routesMeta:h})};return t.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of kM(s.path))i(s,o,c)}),e}function kM(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=kM(r.join("/")),l=[];return l.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...o),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function RW(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:DW(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const xW=/^:[\w-]+$/,kW=3,CW=2,AW=1,PW=10,OW=-2,EA=t=>t==="*";function NW(t,e){let n=t.split("/"),r=n.length;return n.some(EA)&&(r+=OW),e&&(r+=CW),n.filter(i=>!EA(i)).reduce((i,s)=>i+(xW.test(s)?kW:s===""?AW:PW),r)}function DW(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 MW(t,e){let{routesMeta:n}=t,r={},i="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],c=o===n.length-1,d=i==="/"?e:e.slice(i.length)||"/",h=iv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d);if(!h)return null;
vendor: 9,609 bytes, lines 58-67
58Object.assign(r,h.params);let m=l.route;s.push({params:r,pathname:xa([i,h.pathname]),pathnameBase:jW(xa([i,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(i=xa([i,h.pathnameBase]))}return s}function iv(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=LW(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((d,h,m)=>{let{paramName:g,isOptional:v}=h;if(g==="*"){let S=l[m]||"";o=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const E=l[m];return v&&!E?d[g]=void 0:d[g]=(E||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:t}}function LW(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),RM(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function VW(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return RM(!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 Zc(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 FW(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?xd(t):t;return{pathname:n?n.startsWith("/")?n:$W(n,e):e,search:BW(r),hash:zW(i)}}function $W(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 K0(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 UW(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function oI(t,e){let n=UW(t);return e?n.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function aI(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=xd(t):(i=ip({},t),Gt(!i.pathname||!i.pathname.includes("?"),K0("?","pathname","search",i)),Gt(!i.pathname||!i.pathname.includes("#"),K0("#","pathname","hash",i)),Gt(!i.search||!i.search.includes("#"),K0("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let m=e.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}l=m>=0?e[m]:"/"}let c=FW(i,l),d=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const xa=t=>t.join("/").replace(/\/\/+/g,"/"),jW=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),BW=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,zW=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function WW(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const CM=["post","put","patch","delete"];new Set(CM);const qW=["get",...CM];new Set(qW);/**
59 * React Router v6.22.3
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function sp(){return sp=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},sp.apply(this,arguments)}const t_=T.createContext(null),AM=T.createContext(null),No=T.createContext(null),n_=T.createContext(null),no=T.createContext({outlet:null,matches:[],isDataRoute:!1}),PM=T.createContext(null);function HW(t,e){let{relative:n}=e===void 0?{}:e;Su()||Gt(!1);let{basename:r,navigator:i}=T.useContext(No),{hash:s,pathname:o,search:l}=s_(t,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:xa([r,o])),i.createHref({pathname:c,search:l,hash:s})}function Su(){return T.useContext(n_)!=null}function Ya(){return Su()||Gt(!1),T.useContext(n_).location}function nRe(t){Su()||Gt(!1);let{pathname:e}=Ya();return T.useMemo(()=>iv(t,e),[e,t])}function OM(t){T.useContext(No).static||T.useLayoutEffect(t)}function r_(){let{isDataRoute:t}=T.useContext(no);return t?a9():GW()}function GW(){Su()||Gt(!1);let t=T.useContext(t_),{basename:e,future:n,navigator:r}=T.useContext(No),{matches:i}=T.useContext(no),{pathname:s}=Ya(),o=JSON.stringify(oI(i,n.v7_relativeSplatPath)),l=T.useRef(!1);return OM(()=>{l.current=!0}),T.useCallback(function(d,h){if(h===void 0&&(h={}),!l.current)return;if(typeof d=="number"){r.go(d);return}let m=aI(d,JSON.parse(o),s,h.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:xa([e,m.pathname])),(h.replace?r.replace:r.push)(m,h.state,h)},[e,r,o,s,t])}const KW=T.createContext(null);function QW(t){let e=T.useContext(no).outlet;return e&&T.createElement(KW.Provider,{value:t},e)}function i_(){let{matches:t}=T.useContext(no),e=t[t.length-1];return e?e.params:{}}function s_(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=T.useContext(No),{matches:i}=T.useContext(no),{pathname:s}=Ya(),o=JSON.stringify(oI(i,r.v7_relativeSplatPath));return T.useMemo(()=>aI(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function YW(t,e){return JW(t,e)}function JW(t,e,n,r){Su()||Gt(!1);let{navigator:i}=T.useContext(No),{matches:s}=T.useContext(no),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let d=Ya(),h;if(e){var m;let w=typeof e=="string"?xd(e):e;c==="/"||(m=w.pathname)!=null&&m.startsWith(c)||Gt(!1),h=w}else h=d;let g=h.pathname||"/",v=g;if(c!=="/"){let w=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let E=IW(t,{pathname:v}),S=n9(E&&E.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:xa([c,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:xa([c,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return e&&S?T.createElement(n_.Provider,{value:{location:sp({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Sa.Pop}},S):S}function XW(){let t=o9(),e=WW(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:i},n):null,null)}const ZW=T.createElement(XW,null);class e9 extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?T.createElement(no.Provider,{value:this.props.routeContext},T.createElement(PM.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function t9(t){let{routeContext:e,match:n,children:r}=t,i=T.useContext(t_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(no.Provider,{value:e},r)}function n9(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if((s=n)!=null&&s.errors)t=n.matches;else return null}let o=t,l=(i=n)==null?void 0:i.errors;if(l!=null){let h=o.findIndex(m=>m.route.id&&l?.[m.route.id]);h>=0||Gt(!1),o=o.slice(0,Math.min(o.length,h+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<o.length;h++){let m=o[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=h),m.route.id){let{loaderData:g,errors:v}=n,E=m.route.loader&&g[m.route.id]===void 0&&(!v||v[m.route.id]===void 0);if(m.route.lazy||E){c=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((h,m,g)=>{let v,E=!1,S=null,w=null;n&&(v=l&&m.route.id?l[m.route.id]:void 0,S=m.route.errorElement||ZW,c&&(d<0&&g===0?(l9("route-fallback"),E=!0,w=null):d===g&&(E=!0,w=m.route.hydrateFallbackElement||null)));let b=e.concat(o.slice(0,g+1)),C=()=>{let I;return v?I=S:E?I=w:m.route.Component?I=T.createElement(m.route.Component,null):m.route.element?I=m.route.element:I=h,T.createElement(t9,{match:m,routeContext:{outlet:h,matches:b,isDataRoute:n!=null},children:I})};return n&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?T.createElement(e9,{location:n.location,revalidation:n.revalidation,component:S,error:v,children:C(),routeC
67ontext:{outlet:null,matches:b,isDataRoute:!0}}):C()},null)}var NM=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(NM||{}),DM=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(DM||{});function r9(t){let e=T.useContext(t_);return e||Gt(!1),e}function i9(t){let e=T.useContext(AM);return e||Gt(!1),e}function s9(t){let e=T.useContext(no);return e||Gt(!1),e}function MM(t){let e=s9(),n=e.matches[e.matches.length-1];return n.route.id||Gt(!1),n.route.id}function o9(){var t;let e=T.useContext(PM),n=i9(),r=MM();return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function a9(){let{router:t}=r9(NM.UseNavigateStable),e=MM(DM.UseNavigateStable),n=T.useRef(!1);return OM(()=>{n.current=!0}),T.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,sp({fromRouteId:e},s)))},[t,e])}const SA={};function l9(t,e,n){SA[t]||(SA[t]=!0)}function u9(t){let{to:e,replace:n,state:r,relative:i}=t;Su()||Gt(!1);let{future:s,static:o}=T.useContext(No),{matches:l}=T.useContext(no),{pathname:c}=Ya(),d=r_(),h=aI(e,oI(l,s.v7_relativeSplatPath),c,i==="path"),m=JSON.stringify(h);return T.useEffect(()=>d(JSON.parse(m),{replace:n,state:r,relative:i}),[d,m,i,n,r]),null}function rRe(t){return QW(t.context)}function cs(t){Gt(!1)}function c9(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Sa.Pop,navigator:s,static:o=!1,future:l}=t;Su()&&Gt(!1);let c=e.replace(/^\/*/,"/"),d=T.useMemo(()=>({basename:c,navigator:s,static:o,future:sp({v7_relativeSplatPath:!1},l)}),[c,l,s,o]);typeof r=="string"&&(r=xd(r));let{pathname:h="/",search:m="",hash:g="",state:v=null,key:E="default"}=r,S=T.useMemo(()=>{let w=Zc(h,c);return w==null?null:{location:{pathname:w,search:m,hash:g,state:v,key:E},navigationType:i}},[c,h,m,g,v,E,i]);return S==null?null:T.createElement(No.Provider,{value:d},T.createElement(n_.Provider,{children:n,value:S}))}function LM(t){let{children:e,location:n}=t;return YW(wT(e),n)}new Promise(()=>{});function wT(t,e){e===void 0&&(e=[]);let n=[];return T.Children.forEach(t,(r,i)=>{if(!T.isValidElement(r))return;let s=[...e,i];if(r.type===T.Fragment){n.push.apply(n,wT(r.props.children,s));return}r.type!==cs&&Gt(!1),!r.props.index||!r.props.children||Gt(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=wT(r.props.children,s)),n.push(o)}),n}/**
68 * React Router DOM v6.22.3
69 *
70 * Copyright (c) Remix Software Inc.
71 *
72 * This source code is licensed under the MIT license found in the
73 * LICENSE.md file in the root directory of this source tree.
74 *
75 * @license MIT
76 */function sv(){return sv=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},sv.apply(this,arguments)}function VM(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function d9(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function f9(t,e){return t.button===0&&(!e||e==="_self")&&!d9(t)}const h9=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],p9=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],m9="6";try{window.__reactRouterVersion=m9}catch{}const g9=T.createContext({isTransitioning:!1}),y9="startTransition",TA=nv[y9];function v9(t){let{basename:e,children:n,future:r,window:i}=t,s=T.useRef();s.current==null&&(s.current=SW({window:i,v5Compat:!0}));let o=s.current,[l,c]=T.useState({action:o.action,location:o.location}),{v7_startTransition:d}=r||{},h=T.useCallback(m=>{d&&TA?TA(()=>c(m)):c(m)},[c,d]);return T.useLayoutEffect(()=>o.listen(h),[o,h]),T.createElement(c9,{basename:e,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const _9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",w9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,o_=T.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:c,to:d,preventScrollReset:h,unstable_viewTransition:m}=e,g=VM(e,h9),{basename:v}=T.useContext(No),E,S=!1;
76if(typeof d=="string"&&w9.test(d)&&(E=d,_9))try{let I=new URL(window.location.href),P=d.startsWith("//")?new URL(I.protocol+d):new URL(d),x=Zc(P.pathname,v);P.origin===I.origin&&x!=null?d=x+P.search+P.hash:S=!0}catch{}let w=HW(d,{relative:i}),b=S9(d,{replace:o,state:l,target:c,preventScrollReset:h,relative:i,unstable_viewTransition:m});function C(I){r&&r(I),I.defaultPrevented||b(I)}return T.createElement("a",sv({},g,{href:E||w,onClick:S||s?r:C,ref:n,target:c}))}),iRe=T.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:l,to:c,unstable_viewTransition:d,children:h}=e,m=VM(e,p9),g=s_(c,{relative:m.relative}),v=Ya(),E=T.useContext(AM),{navigator:S,basename:w}=T.useContext(No),b=E!=null&&T9(g)&&d===!0,C=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,I=v.pathname,P=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;i||(I=I.toLowerCase(),P=P?P.toLowerCase():null,C=C.toLowerCase()),P&&w&&(P=Zc(P,w)||P);const x=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let N=I===C||!o&&I.startsWith(C)&&I.charAt(x)==="/",k=P!=null&&(P===C||!o&&P.startsWith(C)&&P.charAt(C.length)==="/"),V={isActive:N,isPending:k,isTransitioning:b},L=N?r:void 0,F;typeof s=="function"?F=s(V):F=[s,N?"active":null,k?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let K=typeof l=="function"?l(V):l;return T.createElement(o_,sv({},m,{"aria-current":L,className:F,ref:n,style:K,to:c,unstable_viewTransition:d}),typeof h=="function"?h(V):h)});var ET;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(ET||(ET={}));var bA;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(bA||(bA={}));function E9(t){let e=T.useContext(t_);return e||Gt(!1),e}function S9(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:l}=e===void 0?{}:e,c=r_(),d=Ya(),h=s_(t,{relative:o});return T.useCallback(m=>{if(f9(m,n)){m.preventDefault();let g=r!==void 0?r:rv(d)===rv(h);c(t,{replace:g,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:l})}},[d,c,h,r,i,n,t,s,o,l])}function T9(t,e){e===void 0&&(e={});let n=T.useContext(g9);n==null&&Gt(!1);let{basename:r}=E9(ET.useViewTransitionState),i=s_(t,{relative:e.relative});if(!n.isTransitioning)return!1;let s=Zc(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Zc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return iv(i.pathname,o)!=null||iv(i.pathname,s)!=null}class b9 extends T.Component{render(){return A.jsx("div",{children:"404 ¯\\_(ツ)_/¯"})}}const I9=t=>{const e=document.querySelector("link[rel*='icon']")||document.createElement("link");e.type="image/png",e.rel="shortcut icon",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)};function R9(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function x9(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function k9(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var IA=t=>Array.isArray(t)?t:[t];function C9(t){const e=Array.isArray(t[0])?t[0]:t;return k9(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function A9(t,e){const n=[],{length:r}=t;for(let i=0;i<r;i++)n.push(t[i].apply(null,e));return n}var P9=class{constructor(t){this.value=t}deref(){return this.value}},O9=typeof WeakRef<"u"?WeakRef:P9,N9=0,RA=1;function ny(){return{s:N9,v:void 0,o:null,p:null}}function FM(t,e={}){let n=ny();const{resultEqualityCheck:r}=e;let i,s=0;function o(){let l=n;const{length:c}=arguments;for(let m=0,g=c;m<g;m++){const v=arguments[m];if(typeof v=="function"||typeof v=="object"&&v!==null){let E=l.o;E===null&&(l.o=E=new WeakMap);const S=E.get(v);S===void 0?(l=ny(),E.set(v,l)):l=S}else{let E=l.p;E===null&&(l.p=E=new Map);const S=E.get(v);S===void 0?(l=ny(),E.set(v,l)):l=S}}const d=l;let h;if(l.s===RA?h=l.v:(h=t.apply(null,arguments),s++),d.s=RA,r){const m=i?.deref?.()??i;m!=null&&r(m,h)&&(h=m,s!==0&&s--),i=typeof h=="object"&&h!==null||typeof h=="function"?new O9(h):h}return d.v=h,h}return o.clearCache=()=>{n=ny(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}function D9(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...i)=>{let s=0,o=0,l,c={},d=i.pop();typeof d=="object"&&(c=d,d=i.pop()),R9(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...c},{memoize:m,memoizeOptions:g=[],argsMemoize:v=FM,argsMemoizeOptions:E=[]}=h,S=IA(g),w=IA(E),b=C9(i),C=m(function(){return s++,d.apply(null,arguments)},...S),I=v(function(){o++;const x=A9(b,arguments);return l=C.apply(null,x),l},...w);return Object.assign(I,{resultFunc:d,memoizedResultFunc:C,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:m,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var Xn=D9(FM),M9=Object.assign((t,e=Xn)=>{x9(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(s=>t[s]);return e(r,(...s)=>s.reduce((o,l,c)=>(o[n[c]]=l,o),{}))},{withTypes:()=>M9});const kd=t=>t.project,ST=t=>kd(t).project,On=t=>ST(t).id?ST(t):null,$M=t=>ST(t).id,L9=t=>[On(t).voteStartTime,On(t).voteEndTime],V9=t=>On(t).voteItems,F9=t=>kd(t).talkVotes,$9=t=>kd(t).projectLoadError,U9=t=>kd(t).projectLoadNotFound,Gp=t=>kd(t).selectedDate,j9=t=>
76kd(t).projectVotesError,B9=t=>On(t).chipColors,z9=t=>On(t).hideVotesUntilUserVote,W9=t=>On(t).liveUserVotes,UM=t=>On(t).displayFullDates,q9=Xn(V9,t=>t?t.sort((e,n)=>e.position>n.position?1:-1):[]);var Wf={},Q0={exports:{}},xA;function ys(){return xA||(xA=1,(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Q0)),Q0.exports}var Y0={};function O(){return O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(null,arguments)}function va(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function jM(t){if(!va(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=jM(t[n])}),e}function kr(t,e,n={clone:!0}){const r=n.clone?O({},t):t;return va(t)&&va(e)&&Object.keys(e).forEach(i=>{va(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&va(t[i])?r[i]=kr(t[i],e[i],n):n.clone?r[i]=va(e[i])?jM(e[i]):e[i]:r[i]=e[i]}),r}const H9=Object.freeze(Object.defineProperty({__proto__:null,default:kr,isPlainObject:va},Symbol.toStringTag,{value:"Module"}));var J0={exports:{}},X0,kA;function G9(){if(kA)return X0;kA=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return X0=t,X0}var Z0,CA;function K9(){if(CA)return Z0;CA=1;var t=G9();function e(){}function n(){}return n.resetWarningCache=e,Z0=function(){function r(o,l,c,d,h,m){if(m!==t){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Z0}var AA;function Q9(){return AA||(AA=1,J0.exports=K9()()),J0.exports}var Y9=Q9();const Pc=Pr(Y9);function Hs(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}const J9=Object.freeze(Object.defineProperty({__proto__:null,default:Hs},Symbol.toStringTag,{value:"Module"}));var eS={exports:{}},wt={};/**
77 * @license React
78 * react-is.production.min.js
79 *
80 * Copyright (c) Facebook, Inc. and its affiliates.
81 *
82 * This source code is licensed under the MIT license found in the
83 * LICENSE file in the root directory of this source tree.
84 */var PA;function X9(){if(PA)return wt;PA=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"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),E;E=Symbol.for("react.module.reference");function S(w){if(typeof w=="object"&&w!==null){var b=w.$$typeof;switch(b){case t:switch(w=w.type,w){case n:case i:case r:case d:case h:return w;default:switch(w=w&&w.$$typeof,w){case l:case o:case c:case g:case m:case s:return w;default:return b}}case e:return b}}}return wt.ContextConsumer=o,wt.ContextProvider=s,wt.Element=t,wt.ForwardRef=c,wt.Fragment=n,wt.Lazy=g,wt.Memo=m,wt.Portal=e,wt.Profiler=i,wt.StrictMode=r,wt.Suspense=d,wt.SuspenseList=h,wt.isAsyncMode=function(){return!1},wt.isConcurrentMode=function(){return!1},wt.isContextConsumer=function(w){return S(w)===o},wt.isContextProvider=function(w){return S(w)===s},wt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},wt.isForwardRef=function(w){return S(w)===c},wt.isFragment=function(w){return S(w)===n},wt.isLazy=function(w){return S(w)===g},wt.isMemo=function(w){return S(w)===m},wt.isPortal=function(w){return S(w)===e},wt.isProfiler=function(w){return S(w)===i},wt.isStrictMode=function(w){return S(w)===r},wt.isSuspense=function(w){return S(w)===d},wt.isSuspenseList=function(w){return S(w)===h},wt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===i||w===r||w===d||w===h||w===v||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===m||w.$$typeof===s||w.$$typeof===o||w.$$typeof===c||w.$$typeof===E||w.getModuleId!==void 0)},wt.typeOf=S,wt}var OA;function Z9(){return OA||(OA=1,eS.exports=X9()),eS.exports}var NA=Z9();const eq=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function BM(t){const e=`${t}`.match(eq);return e&&e[1]||""}function zM(t,e=""){return t.displayName||t.name||BM(t)||e}function DA(t,e,n){const r=zM(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function tq(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return zM(t,"Component");if(typeof t=="object")switch(t.$$typeof){case NA.ForwardRef:return DA(t,t.render,"ForwardRef");case NA.Memo:return DA(t,t.type,"memo");default:return}}}const nq=Object.freeze(Object.defineProperty({__proto__:null,default:tq,getFunctionName:BM},Symbol.toStringTag,{value:"Module"}));function Ie(t){if(typeof t!="string")throw new Error(Hs(7));return t.charAt(0).toUpperCase()+t.slice(1)}const rq=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"}));function TT(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function lI(t,e=166){let n;function r(...i){const s=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}return r.clear=()=>{clearTimeout(n)},r}function iq(t,e){return()=>null}function Ny(t,e){var n,r;return T.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function $n(t){return t&&t.ownerDocument||document}function Ma(t){return $n(t).defaultView||window}function sq(t,e){return()=>null}function ov(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Gi=typeof window<"u"?T.useLayoutEffect:T.useEffect;let MA=0;function oq(t){const[e,n]=T.useState(t),r=t||e;return T.useEffect(()=>{e==null&&(MA+=1,n(`mui-${MA}`))},[e]),r}const LA=nv.useId;function Kp(t){if(LA!==void 0){const e=LA();return t??e}return oq(t)}function aq(t,e,n,r,i){return null}function op({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=T.useRef(t!==void 0),[s,o]=T.useState(e),l=i?t:s,c=T.useCallback(d=>{i||o(d)},[]);return[l,c]}function Ui(t){const e=T.useRef(t);return Gi(()=>{e.current=t}),T.useRef((...n)=>(0,e.current)(...n)).current}function wn(...t){return T.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{ov(n,e)})},t)}const VA={};function lq(t,e){const n=T.useRef(VA);return n.current===VA&&(n.current=t(e)),n}const uq=[];function cq(t){T.useEffect(t,uq)}class Qp{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Qp}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Fl(){const t=lq(Qp.create).current;return cq(t.disposeEffect),t}let a_=!0,bT=!1;const dq=new Qp,fq={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function hq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&fq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function pq(t){t.metaKey||t.altKey||t.ctrlKey||(a_=!0)}function tS(){a_=!1}function mq(){this.visibilityState==="hidden"&&bT&&(a_=!0)}function gq(t){t.addEventListener("keydown",pq,!0),t.addEventListener("mousedown",tS,!0),t.addEventListener("pointerdown",tS,!0),t.addEventListener("touchstart",tS,!0),t.addEventListener("visibilitychange",mq,!0)}function yq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return a_||hq(e)}function l_(){const t=T.useCallback(i=>{i!=null&&gq(i.ownerDocument)},[]),e=T.useRef(!1);function n(){return e.current?(bT=!0,dq.start(100,()=>{bT=!1}),e.current=!1,!0):!1}function r(i){return yq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function WM(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function uI(t,e){const n=O({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=O({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},s=e[r];n[r]={},!s||!Object.keys(s)?n[r]=i:!i||!Object.keys(i)?n[r]=s:(n[r]=O({}
84,s),Object.keys(i).forEach(o=>{n[r][o]=uI(i[o],s[o])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function rt(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((s,o)=>{if(o){const l=e(o);l!==""&&s.push(l),n&&n[o]&&s.push(n[o])}return s},[]).join(" ")}),r}const FA=t=>t,vq=()=>{let t=FA;return{configure(e){t=e},generate(e){return t(e)},reset(){t=FA}}},cI=vq(),qM={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function it(t,e,n="Mui"){const r=qM[e];return r?`${n}-${r}`:`${cI.generate(t)}-${e}`}function Ze(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=it(t,i,n)}),r}function HM(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const _q=Object.freeze(Object.defineProperty({__proto__:null,default:HM},Symbol.toStringTag,{value:"Module"}));function ve(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}function GM(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=GM(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ve(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=GM(t))&&(r&&(r+=" "),r+=e);return r}function dI(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:uI(e.components[n].defaultProps,r)}const wq=["values","unit","step"],Eq=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>O({},n,{[r.key]:r.val}),{})};function KM(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=ve(t,wq),s=Eq(e),o=Object.keys(s);function l(g){return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n})`}function c(g){return`@media (max-width:${(typeof e[g]=="number"?e[g]:g)-r/100}${n})`}function d(g,v){const E=o.indexOf(v);return`@media (min-width:${typeof e[g]=="number"?e[g]:g}${n}) and (max-width:${(E!==-1&&typeof e[o[E]]=="number"?e[o[E]]:v)-r/100}${n})`}function h(g){return o.indexOf(g)+1<o.length?d(g,o[o.indexOf(g)+1]):l(g)}function m(g){const v=o.indexOf(g);return v===0?l(o[1]):v===o.length-1?c(o[v]):d(g,o[o.indexOf(g)+1]).replace("@media","@media not all and")}return O({keys:o,values:s,up:l,down:c,between:d,only:h,not:m,unit:n},i)}const Sq={borderRadius:4};function Fh(t,e){return e?kr(t,e,{clone:!1}):t}const fI={xs:0,sm:600,md:900,lg:1200,xl:1536},$A={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${fI[t]}px)`};function Ki(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const s=r.breakpoints||$A;return e.reduce((o,l,c)=>(o[s.up(s.keys[c])]=n(e[c]),o),{})}if(typeof e=="object"){const s=r.breakpoints||$A;return Object.keys(e).reduce((o,l)=>{if(Object.keys(s.values||fI).indexOf(l)!==-1){const c=s.up(l);o[c]=n(e[l],l)}else{const c=l;o[c]=e[c]}return o},{})}return n(e)}function QM(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const s=t.up(i);return r[s]={},r},{}))||{}}function YM(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function sRe(t,...e){const n=QM(t),r=[n,...e].reduce((i,s)=>kr(i,s),{});return YM(Object.keys(n),r)}function Tq(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,s)=>{s<t.length&&(n[i]=!0)}):r.forEach(i=>{t[i]!=null&&(n[i]=!0)}),n}function u_({values:t,breakpoints:e,base:n}){const r=n||Tq(t,e),i=Object.keys(r);if(i.length===0)return t;let s;return i.reduce((o,l,c)=>(Array.isArray(t)?(o[l]=t[c]!=null?t[c]:t[s],s=c):typeof t=="object"?(o[l]=t[l]!=null?t[l]:t[s],s=l):o[l]=t,o),{})}function ed(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function av(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=ed(t,n)||r,e&&(i=e(i,r,t)),i}function Sn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,s=o=>
84{if(o[e]==null)return null;const l=o[e],c=o.theme,d=ed(c,r)||{};return Ki(o,l,m=>{let g=av(d,i,m);return m===g&&typeof m=="string"&&(g=av(d,i,`${e}${m==="default"?"":Ie(m)}`,m)),n===!1?g:{[n]:g}})};return s.propTypes={},s.filterProps=[e],s}function bq(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const Iq={m:"margin",p:"padding"},Rq={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},UA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},xq=bq(t=>{if(t.length>2)if(UA[t])t=UA[t];else return[t];const[e,n]=t.split(""),r=Iq[e],i=Rq[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),hI=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],pI=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...hI,...pI];function Yp(t,e,n,r){var i;const s=(i=ed(t,e,!1))!=null?i:n;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function JM(t){return Yp(t,"spacing",8)}function Jp(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function kq(t,e){return n=>t.reduce((r,i)=>(r[i]=Jp(e,n),r),{})}function Cq(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=xq(n),s=kq(i,r),o=t[n];return Ki(t,o,s)}function XM(t,e){const n=JM(t.theme);return Object.keys(t).map(r=>Cq(t,e,r,n)).reduce(Fh,{})}function sn(t){return XM(t,hI)}sn.propTypes={};sn.filterProps=hI;function on(t){return XM(t,pI)}on.propTypes={};on.filterProps=pI;function Aq(t=8){if(t.mui)return t;const e=JM({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function c_(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>e[s]?Fh(i,e[s](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Fi(t){return typeof t!="number"?t:`${t}px solid`}function Xi(t,e){return Sn({prop:t,themeKey:"borders",transform:e})}const Pq=Xi("border",Fi),Oq=Xi("borderTop",Fi),Nq=Xi("borderRight",Fi),Dq=Xi("borderBottom",Fi),Mq=Xi("borderLeft",Fi),Lq=Xi("borderColor"),Vq=Xi("borderTopColor"),Fq=Xi("borderRightColor"),$q=Xi("borderBottomColor"),Uq=Xi("borderLeftColor"),jq=Xi("outline",Fi),Bq=Xi("outlineColor"),d_=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Yp(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:Jp(e,r)});return Ki(t,t.borderRadius,n)}return null};d_.propTypes={};d_.filterProps=["borderRadius"];c_(Pq,Oq,Nq,Dq,Mq,Lq,Vq,Fq,$q,Uq,d_,jq,Bq);const f_=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Yp(t.theme,"spacing",8),n=r=>({gap:Jp(e,r)});return Ki(t,t.gap,n)}return null};f_.propTypes={};f_.filterProps=["gap"];const h_=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Yp(t.theme,"spacing",8),n=r=>({columnGap:Jp(e,r)});return Ki(t,t.columnGap,n)}return null};h_.propTypes={};h_.filterProps=["columnGap"];const p_=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Yp(t.theme,"spacing",8),n=r=>({rowGap:Jp(e,r)});return Ki(t,t.rowGap,n)}return null};p_.propTypes={};p_.filterProps=["rowGap"];const zq=Sn({prop:"gridColumn"}),Wq=Sn({prop:"gridRow"}),qq=Sn({prop:"gridAutoFlow"}),Hq=Sn({prop:"gridAutoColumns"}),Gq=Sn({prop:"gridAutoRows"}),Kq=Sn({prop:"gridTemplateColumns"}),Qq=Sn({prop:"gridTemplateRows"}),Yq=Sn({prop:"gridTemplateAreas"}),Jq=Sn({prop:"gridArea"});c_(f_,h_,p_,zq,Wq,qq,Hq,Gq,Kq,Qq,Yq,Jq);function Vc(t,e){return e==="grey"?e:t}const Xq=Sn({prop:"color",themeKey:"palette",transform:Vc}),Zq=Sn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Vc}),eH=Sn({prop:"backgroundColor",themeKey:"palette",transform:Vc});c_(Xq,Zq,eH);function _i(t){return t<=1&&t!==0?`${t*100}%`:t}const tH=Sn({prop:"width",transform:_i}),mI=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const s=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||fI[n];return s?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${t.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:_i(n)}};return Ki(t,t.maxWidth,e)}return null};mI.filterProps=["maxWidth"];const nH=Sn({prop:"minWidth",transform:_i}),rH=Sn({prop:"height",transform:_i}),iH=Sn({prop:"maxHeight",transform:_i}),sH=Sn({prop:"minHeight",transform:_i});Sn({prop:"size",cssProperty:"width",transform:_i});Sn({prop:"size",cssProperty:"height",transform:_i});const oH=Sn({prop:"boxSizing"});c_(tH,mI,nH,rH,iH,sH,oH);const Xp={border:{themeKey:"borders",transform:Fi},borderTop:{themeKey:"borders",transform:Fi},borderRight:{themeKey:"borders",transform:Fi},borderBottom:{themeKey:"borders",transform:Fi},borderLeft:{themeKey:"borders",transform:Fi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:d_},color:{themeKey:"palette",transform:Vc},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Vc},backgroundColor:{themeKey:"palette",transform:Vc},p:{style:on},pt:{style:on},pr:{style:on},pb:{style:on},pl:{style:on},px:{style:on},py:{style:on},padding:{style:on},paddingTop:{style:on},paddingRight:{style:on}
84,paddingBottom:{style:on},paddingLeft:{style:on},paddingX:{style:on},paddingY:{style:on},paddingInline:{style:on},paddingInlineStart:{style:on},paddingInlineEnd:{style:on},paddingBlock:{style:on},paddingBlockStart:{style:on},paddingBlockEnd:{style:on},m:{style:sn},mt:{style:sn},mr:{style:sn},mb:{style:sn},ml:{style:sn},mx:{style:sn},my:{style:sn},margin:{style:sn},marginTop:{style:sn},marginRight:{style:sn},marginBottom:{style:sn},marginLeft:{style:sn},marginX:{style:sn},marginY:{style:sn},marginInline:{style:sn},marginInlineStart:{style:sn},marginInlineEnd:{style:sn},marginBlock:{style:sn},marginBlockStart:{style:sn},marginBlockEnd:{style:sn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:f_},rowGap:{style:p_},columnGap:{style:h_},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:_i},maxWidth:{style:mI},minWidth:{transform:_i},height:{transform:_i},maxHeight:{transform:_i},minHeight:{transform:_i},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function aH(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function lH(t,e){return typeof t=="function"?t(e):t}function ZM(){function t(n,r,i,s){const o={[n]:r,theme:i},l=s[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:h,style:m}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const g=ed(i,d)||{};return m?m(o):Ki(o,r,E=>{let S=av(g,h,E);return E===S&&typeof E=="string"&&(S=av(g,h,`${n}${E==="default"?"":Ie(E)}`,E)),c===!1?S:{[c]:S}})}function e(n){var r;const{sx:i,theme:s={}}=n||{};if(!i)return null;const o=(r=s.unstable_sxConfig)!=null?r:Xp;function l(c){let d=c;if(typeof c=="function")d=c(s);else if(typeof c!="object")return c;if(!d)return null;const h=QM(s.breakpoints),m=Object.keys(h);let g=h;return Object.keys(d).forEach(v=>{const E=lH(d[v],s);if(E!=null)if(typeof E=="object")if(o[v])g=Fh(g,t(v,E,s,o));else{const S=Ki({theme:s},E,w=>({[v]:w}));aH(S,E)?g[v]=e({sx:E,theme:s}):g=Fh(g,S)}else g=Fh(g,t(v,E,s,o))}),YM(m,g)}return Array.isArray(i)?i.map(l):l(i)}return e}const Zp=ZM();Zp.filterProps=["sx"];function eL(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const uH=["breakpoints","palette","spacing","shape"];function gI(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:s={}}=t,o=ve(t,uH),l=KM(n),c=Aq(i);let d=kr({breakpoints:l,direction:"ltr",components:{},palette:O({mode:"light"},r),spacing:c,shape:O({},Sq,s)},o);return d.applyStyles=eL,d=e.reduce((h,m)=>kr(h,m),d),d.unstable_sxConfig=O({},Xp,o?.unstable_sxConfig),d.unstable_sx=function(m){return Zp({sx:m,theme:this})},d}const cH=Object.freeze(Object.defineProperty({__proto__:null,default:gI,private_createBreakpoints:KM,unstable_applyStyles:eL},Symbol.toStringTag,{value:"Module"}));function tL(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var dH=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInl
84ine|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,fH=tL(function(t){return dH.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function hH(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function pH(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var mH=(function(){function t(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(pH(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=hH(i);
vendor: 7,383 bytes, line 84
84try{s.insertRule(r,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},t})(),Er="-ms-",lv="-moz-",yt="-webkit-",nL="comm",yI="rule",vI="decl",gH="@import",rL="@keyframes",yH="@layer",vH=Math.abs,m_=String.fromCharCode,_H=Object.assign;function wH(t,e){return ar(t,0)^45?(((e<<2^ar(t,0))<<2^ar(t,1))<<2^ar(t,2))<<2^ar(t,3):0}function iL(t){return t.trim()}function EH(t,e){return(t=e.exec(t))?t[0]:t}function vt(t,e,n){return t.replace(e,n)}function IT(t,e){return t.indexOf(e)}function ar(t,e){return t.charCodeAt(e)|0}function ap(t,e,n){return t.slice(e,n)}function Cs(t){return t.length}function _I(t){return t.length}function ry(t,e){return e.push(t),t}function SH(t,e){return t.map(e).join("")}var g_=1,td=1,sL=0,ci=0,Cn=0,Cd="";function y_(t,e,n,r,i,s,o){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:g_,column:td,length:o,return:""}}function qf(t,e){return _H(y_("",null,null,"",null,null,0),t,{length:-t.length},e)}function TH(){return Cn}function bH(){return Cn=ci>0?ar(Cd,--ci):0,td--,Cn===10&&(td=1,g_--),Cn}function Ti(){return Cn=ci<sL?ar(Cd,ci++):0,td++,Cn===10&&(td=1,g_++),Cn}function Bs(){return ar(Cd,ci)}function Dy(){return ci}function em(t,e){return ap(Cd,t,e)}function lp(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function oL(t){return g_=td=1,sL=Cs(Cd=t),ci=0,[]}function aL(t){return Cd="",t}function My(t){return iL(em(ci-1,RT(t===91?t+2:t===40?t+1:t)))}function IH(t){for(;(Cn=Bs())&&Cn<33;)Ti();return lp(t)>2||lp(Cn)>3?"":" "}function RH(t,e){for(;--e&&Ti()&&!(Cn<48||Cn>102||Cn>57&&Cn<65||Cn>70&&Cn<97););return em(t,Dy()+(e<6&&Bs()==32&&Ti()==32))}function RT(t){for(;Ti();)switch(Cn){case t:return ci;case 34:case 39:t!==34&&t!==39&&RT(Cn);break;case 40:t===41&&RT(t);break;case 92:Ti();break}return ci}function xH(t,e){for(;Ti()&&t+Cn!==57;)if(t+Cn===84&&Bs()===47)break;return"/*"+em(e,ci-1)+"*"+m_(t===47?t:Ti())}function kH(t){for(;!lp(Bs());)Ti();return em(t,ci)}function CH(t){return aL(Ly("",null,null,null,[""],t=oL(t),0,[0],t))}function Ly(t,e,n,r,i,s,o,l,c){for(var d=0,h=0,m=o,g=0,v=0,E=0,S=1,w=1,b=1,C=0,I="",P=i,x=s,N=r,k=I;w;)switch(E=C,C=Ti()){case 40:if(E!=108&&ar(k,m-1)==58){IT(k+=vt(My(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=My(C);break;case 9:case 10:case 13:case 32:k+=IH(E);break;case 92:k+=RH(Dy()-1,7);continue;case 47:switch(Bs()){case 42:case 47:ry(AH(xH(Ti(),Dy()),e,n),c);break;default:k+="/"}break;case 123*S:l[d++]=Cs(k)*b;case 125*S:case 59:case 0:switch(C){case 0:case 125:w=0;case 59+h:b==-1&&(k=vt(k,/\f/g,"")),v>0&&Cs(k)-m&&ry(v>32?BA(k+";",r,n,m-1):BA(vt(k," ","")+";",r,n,m-2),c);break;case 59:k+=";";default:if(ry(N=jA(k,e,n,d,h,i,l,I,P=[],x=[],m),s),C===123)if(h===0)Ly(k,e,N,N,P,s,m,l,x);else switch(g===99&&ar(k,3)===110?100:g){case 100:case 108:case 109:case 115:Ly(t,N,N,r&&ry(jA(t,N,N,0,0,i,l,I,i,P=[],m),x),i,x,m,l,r?P:x);break;default:Ly(k,N,N,N,[""],x,0,l,x)}}d=h=v=0,S=b=1,I=k="",m=o;break;case 58:m=1+Cs(k),v=E;default:if(S<1){if(C==123)--S;else if(C==125&&S++==0&&bH()==125)continue}switch(k+=m_(C),C*S){case 38:b=h>0?1:(k+="\f",-1);break;case 44:l[d++]=(Cs(k)-1)*b,b=1;break;case 64:Bs()===45&&(k+=My(Ti())),g=Bs(),h=m=Cs(I=k+=kH(Dy())),C++;break;case 45:E===45&&Cs(k)==2&&(S=0)}}return s}function jA(t,e,n,r,i,s,o,l,c,d,h){for(var m=i-1,g=i===0?s:[""],v=_I(g),E=0,S=0,w=0;E<r;++E)for(var b=0,C=ap(t,m+1,m=vH(S=o[E])),I=t;b<v;++b)(I=iL(S>0?g[b]+" "+C:vt(C,/&\f/g,g[b])))&&(c[w++]=I);return y_(t,e,n,i===0?yI:l,c,d,h)}function AH(t,e,n){return y_(t,e,n,nL,m_(TH()),ap(t,2,-2),0)}function BA(t,e,n,r){return y_(t,e,n,vI,ap(t,0,r),ap(t,r+1,-1),r)}function Fc(t,e){for(var n="",r=_I(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function PH(t,e,n,r){switch(t.type){case yH:if(t.children.length)break;case gH:case vI:return t.return=t.return||t.value;case nL:return"";case rL:return t.return=t.value+"{"+Fc(t.children,r)+"}";case yI:t.value=t.props.join(",")}return Cs(n=Fc(t.children,r))?t.return=t.value+"{"+n+"}":""}function OH(t){var e=_I(t);return function(n,r,i,s){for(var o="",l=0;l<e;l++)o+=t[l](n,r,i,s)||"";return o}}function NH(t){return function(e){e.root||(e=e.return)&&t(e)}}var DH=function(e,n,r){for(var i=0,s=0;i=s,s=Bs(),i===38&&s===12&&(n[r]=1),!lp(s);)Ti();return em(e,ci)},MH=function(e,n){var r=-1,i=44;do switch(lp(i)){case 0:i===38&&Bs()===12&&(n[r]=1),e[r]+=DH(ci-1,n,r);break;case 2:e[r]+=My(i);break;case 4:if(i===44){e[++r]=Bs()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=m_(i)}while(i=Ti());return e},LH=function(e,n){return aL(MH(oL(e),n))},zA=new WeakMap,VH=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!zA.get(r))&&!i){zA.set(e,!0);for(var s=[],o=LH(n,s),l=r.props,c=0,d=0;c<o.length;c++)for(var h=0;h<l.length;h++,d++)e.props[d]=s[c]?o[c].replace(/&\f/g,l[h]):l[h]+" "+o[c]}}},FH=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function lL(t,e){switch(wH(t,e)){case 5103:return yt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return yt+t+lv+t+Er+t+t;case 6828:case 4268:return yt+t+Er+t+t;case 6165:return yt+t+Er+"flex-"+t+t;case 5187:return yt+t+vt(t,/(\w+).+(:[^]+)/,yt+"box-$1$2"+Er+"flex-$1$2")+t;case 5443:return yt+t+Er+"flex-item-"+vt(t,/flex-|-self/,"")+t;case 4675:return yt+t+Er+"flex-line-pack"+vt(t,/align-content|flex-|-self/,"")+t;case 5548:return yt+t+Er+vt(t,"shrink","negative")+t;case 5292:return yt+t+Er+vt(t,"basis","preferred-size")+t;case 6060:return yt+"box-"+vt(t,"-grow","")+yt+t+Er+vt(t,"grow","positive")+t;case 4554:return yt+vt(t,/([^-])(transform)/g,"$1"+yt+"$2")+t;case 6187:return vt(vt(vt(t,/(zoom-|grab)/,yt+"$1"),/(image-set)/,yt+"$1"),t,"")+t;case 5495:case 3959:return vt(t,/(image-set\([^]*)/,yt+"$1$`$1");case 4968:return vt(vt(t,/(.+:)(flex-)?(.*)/,yt+"box-pack:$3"+Er+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yt+t+t;case 4095:case 3583:case 4068:case 2532:return vt(t,/(.+)-inline(.+)/,yt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Cs(t)-1-e>6)switch(ar(t,e+1)){case 109:if(ar(t,e+4)!==45)break;case 102:return vt(t,/(.+:)(.+)-([^]+)/,"$1"+yt+"$2-$3$1"+lv+(ar(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~IT(t,"stretch")?lL(vt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(ar(t,e+1)!==115)break;case 6444:switch(ar(t,Cs(t)-3-(~IT(t,"!important")&&10))){case 107:return vt(t,":",":"+yt)+t;case 101:return vt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+yt+(ar(t,14)===45?"inline-":"")+"box$3$1"+yt+"$2$3$1"+Er+"$2box$3")+t}break;case 5936:switch(ar(t,e+11)){case 114:return yt+t+Er+vt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
vendor: 4,899 bytes, lines 84-91
84case 108:return yt+t+Er+vt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return yt+t+Er+vt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return yt+t+Er+t+t}return t}var $H=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case vI:e.return=lL(e.value,e.length);break;case rL:return Fc([qf(e,{value:vt(e.value,"@","@"+yt)})],i);case yI:if(e.length)return SH(e.props,function(s){switch(EH(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Fc([qf(e,{props:[vt(s,/:(read-\w+)/,":"+lv+"$1")]})],i);case"::placeholder":return Fc([qf(e,{props:[vt(s,/:(plac\w+)/,":"+yt+"input-$1")]}),qf(e,{props:[vt(s,/:(plac\w+)/,":"+lv+"$1")]}),qf(e,{props:[vt(s,/:(plac\w+)/,Er+"input-$1")]})],i)}return""})}},UH=[$H],uL=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var w=S.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=e.stylisPlugins||UH,s={},o,l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var w=S.getAttribute("data-emotion").split(" "),b=1;b<w.length;b++)s[w[b]]=!0;l.push(S)});var c,d=[VH,FH];{var h,m=[PH,NH(function(S){h.insert(S)})],g=OH(d.concat(i,m)),v=function(w){return Fc(CH(w),g)};c=function(w,b,C,I){h=C,v(w?w+"{"+b.styles+"}":b.styles),I&&(E.inserted[b.name]=!0)}}var E={key:n,sheet:new mH({key:n,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:c};return E.sheet.hydrate(l),E},nS={exports:{}},Et={};/** @license React v16.13.1
85 * react-is.production.min.js
86 *
87 * Copyright (c) Facebook, Inc. and its affiliates.
88 *
89 * This source code is licensed under the MIT license found in the
90 * LICENSE file in the root directory of this source tree.
91 */var WA;function jH(){if(WA)return Et;WA=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,m=t?Symbol.for("react.suspense"):60113,g=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,E=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,w=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function I(x){if(typeof x=="object"&&x!==null){var N=x.$$typeof;switch(N){case e:switch(x=x.type,x){case c:case d:case r:case s:case i:case m:return x;default:switch(x=x&&x.$$typeof,x){case l:case h:case E:case v:case o:return x;default:return N}}case n:return N}}}function P(x){return I(x)===d}return Et.AsyncMode=c,Et.ConcurrentMode=d,Et.ContextConsumer=l,Et.ContextProvider=o,Et.Element=e,Et.ForwardRef=h,Et.Fragment=r,Et.Lazy=E,Et.Memo=v,Et.Portal=n,Et.Profiler=s,Et.StrictMode=i,Et.Suspense=m,Et.isAsyncMode=function(x){return P(x)||I(x)===c},Et.isConcurrentMode=P,Et.isContextConsumer=function(x){return I(x)===l},Et.isContextProvider=function(x){return I(x)===o},Et.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},Et.isForwardRef=function(x){return I(x)===h},Et.isFragment=function(x){return I(x)===r},Et.isLazy=function(x){return I(x)===E},Et.isMemo=function(x){return I(x)===v},Et.isPortal=function(x){return I(x)===n},Et.isProfiler=function(x){return I(x)===s},Et.isStrictMode=function(x){return I(x)===i},Et.isSuspense=function(x){return I(x)===m},Et.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===d||x===s||x===i||x===m||x===g||typeof x=="object"&&x!==null&&(x.$$typeof===E||x.$$typeof===v||x.$$typeof===o||x.$$typeof===l||x.$$typeof===h||x.$$typeof===w||x.$$typeof===b||x.$$typeof===C||x.$$typeof===S)},Et.typeOf=I,Et}var qA;function BH(){return qA||(qA=1,nS.exports=jH()),nS.exports}var rS,HA;function zH(){if(HA)return rS;HA=1;var t=BH(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[t.ForwardRef]=r,s[t.Memo]=i;function o(E){return t.isMemo(E)?i:s[E.$$typeof]||e}var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;
vendor: 2,471 bytes, line 91
91function v(E,S,w){if(typeof S!="string"){if(g){var b=m(S);b&&b!==g&&v(E,b,w)}var C=c(S);d&&(C=C.concat(d(S)));for(var I=o(E),P=o(S),x=0;x<C.length;++x){var N=C[x];if(!n[N]&&!(w&&w[N])&&!(P&&P[N])&&!(I&&I[N])){var k=h(S,N);try{l(E,N,k)}catch{}}}}return E}return rS=v,rS}var WH=zH();const oRe=Pr(WH);var qH=!0;function cL(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var wI=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||qH===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},EI=function(e,n,r){wI(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+i:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function HH(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var GH={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},KH=/[A-Z]|^ms/g,QH=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dL=function(e){return e.charCodeAt(1)===45},GA=function(e){return e!=null&&typeof e!="boolean"},iS=tL(function(t){return dL(t)?t:t.replace(KH,"-$&").toLowerCase()}),KA=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(QH,function(r,i,s){return As={name:i,styles:s,next:As},i})}return GH[e]!==1&&!dL(e)&&typeof n=="number"&&n!==0?n+"px":n};function up(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";
vendor: 4,060 bytes, line 91
91case"object":{if(n.anim===1)return As={name:n.name,styles:n.styles,next:As},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)As={name:r.name,styles:r.styles,next:As},r=r.next;var i=n.styles+";";return i}return YH(t,e,n)}case"function":{if(t!==void 0){var s=As,o=n(t);return As=s,up(t,e,o)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function YH(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=up(t,e,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object")e!=null&&e[o]!==void 0?r+=s+"{"+e[o]+"}":GA(o)&&(r+=iS(s)+":"+KA(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var l=0;l<o.length;l++)GA(o[l])&&(r+=iS(s)+":"+KA(s,o[l])+";");else{var c=up(t,e,o);switch(s){case"animation":case"animationName":{r+=iS(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var QA=/label:\s*([^\s;\n{]+)\s*(;|$)/g,As,v_=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,s="";As=void 0;var o=e[0];o==null||o.raw===void 0?(i=!1,s+=up(r,n,o)):s+=o[0];for(var l=1;l<e.length;l++)s+=up(r,n,e[l]),i&&(s+=o[l]);QA.lastIndex=0;for(var c="",d;(d=QA.exec(s))!==null;)c+="-"+d[1];var h=HH(s)+c;return{name:h,styles:s,next:As}},JH=function(e){return e()},fL=nv.useInsertionEffect?nv.useInsertionEffect:!1,hL=fL||JH,YA=fL||T.useLayoutEffect,__={}.hasOwnProperty,pL=T.createContext(typeof HTMLElement<"u"?uL({key:"css"}):null),XH=pL.Provider,SI=function(e){return T.forwardRef(function(n,r){var i=T.useContext(pL);return e(n,i,r)})},Ad=T.createContext({}),xT="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",mL=function(e,n){var r={};for(var i in n)__.call(n,i)&&(r[i]=n[i]);return r[xT]=e,r},ZH=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return wI(n,r,i),hL(function(){return EI(n,r,i)}),null},eG=SI(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[xT],s=[r],o="";typeof t.className=="string"?o=cL(e.registered,s,t.className):t.className!=null&&(o=t.className+" ");var l=v_(s,void 0,T.useContext(Ad));o+=e.key+"-"+l.name;var c={};for(var d in t)__.call(t,d)&&d!=="css"&&d!==xT&&(c[d]=t[d]);return c.ref=n,c.className=o,T.createElement(T.Fragment,null,T.createElement(ZH,{cache:e,serialized:l,isStringTag:typeof i=="string"}),T.createElement(i,c))}),gL=eG,tG=SI(function(t,e){var n=t.styles,r=v_([n],void 0,T.useContext(Ad)),i=T.useRef();return YA(function(){var s=e.key+"-global",o=new e.sheet.constructor({key:s,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+s+" "+r.name+'"]');return e.sheet.tags.length&&(o.before=e.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",s),o.hydrate([c])),i.current=[o,l],function(){o.flush()}},[e]),YA(function(){var s=i.current,o=s[0],l=s[1];if(l){s[1]=!1;return}if(r.next!==void 0&&EI(e,r.next,!0),o.tags.length){var c=o.tags[o.tags.length-1].nextElementSibling;o.before=c,o.flush()}e.insert("",r,o,!1)},[e,r.name]),null});function w_(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v_(e)}var Pd=function(){var e=w_.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},nG=fH,rG=function(e){return e!=="theme"},JA=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?nG:rG},XA=function(e,n,r){var i;if(n){var s=n.shouldForwardProp;i=e.__emotion_forwardProp&&s?function(o){return e.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},iG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return wI(n,r,i),hL(function(){return EI(n,r,i)}),null},sG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,s,o;n!==void 0&&(s=n.label,o=n.target);var l=XA(e,n,r),c=l||JA(i),d=!c("as");return function(){var h=arguments,m=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&m.push("label:"+s+";
91"),h[0]==null||h[0].raw===void 0)m.push.apply(m,h);else{m.push(h[0][0]);for(var g=h.length,v=1;v<g;v++)m.push(h[v],h[0][v])}var E=SI(function(S,w,b){var C=d&&S.as||i,I="",P=[],x=S;if(S.theme==null){x={};for(var N in S)x[N]=S[N];x.theme=T.useContext(Ad)}typeof S.className=="string"?I=cL(w.registered,P,S.className):S.className!=null&&(I=S.className+" ");var k=v_(m.concat(P),w.registered,x);I+=w.key+"-"+k.name,o!==void 0&&(I+=" "+o);var V=d&&l===void 0?JA(C):c,L={};for(var F in S)d&&F==="as"||V(F)&&(L[F]=S[F]);return L.className=I,L.ref=b,T.createElement(T.Fragment,null,T.createElement(iG,{cache:w,serialized:k,isStringTag:typeof C=="string"}),T.createElement(C,L))});return E.displayName=s!==void 0?s:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",E.defaultProps=e.defaultProps,E.__emotion_real=E,E.__emotion_base=i,E.__emotion_styles=m,E.__emotion_forwardProp=l,Object.defineProperty(E,"toString",{value:function(){return"."+o}}),E.withComponent=function(S,w){return t(S,O({},n,w,{shouldForwardProp:XA(E,w,!0)})).apply(void 0,m)},E}},oG=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],kT=sG.bind();oG.forEach(function(t){kT[t]=kT(t)});let CT;typeof document=="object"&&(CT=uL({key:"css",prepend:!0}));function yL(t){const{injectFirst:e,children:n}=t;return e&&CT?A.jsx(XH,{value:CT,children:n}):n}function aG(t){return t==null||Object.keys(t).length===0}function vL(t){const{styles:e,defaultTheme:n={}}=t,r=typeof e=="function"?i=>e(aG(i)?n:i):e;return A.jsx(tG,{styles:r})}function _L(t,e){return kT(t,e)}const lG=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},uG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:vL,StyledEngineProvider:yL,ThemeContext:Ad,css:w_,default:_L,internal_processStyles:lG,keyframes:Pd},Symbol.toStringTag,{value:"Module"}));function cG(t){return Object.keys(t).length===0}function TI(t=null){const e=T.useContext(Ad);return!e||cG(e)?t:e}const dG=gI();function E_(t=dG){return TI(t)}function fG({props:t,name:e,defaultTheme:n,themeId:r}){let i=E_(n);return r&&(i=i[r]||i),dI({theme:i,name:e,props:t})}const hG=["sx"],pG=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:Xp;return Object.keys(t).forEach(s=>{i[s]?r.systemProps[s]=t[s]:r.otherProps[s]=t[s]}),r};function S_(t){const{sx:e}=t,n=ve(t,hG),{systemProps:r,otherProps:i}=pG(n);let s;return Array.isArray(e)?s=[r,...e]:typeof e=="function"?s=(...o)=>{const l=e(...o);return va(l)?O({},r,l):r}:s=O({},r,e),O({},i,{sx:s})}const mG=Object.freeze(Object.defineProperty({__proto__:null,default:Zp,extendSxProp:S_,unstable_createStyleFunctionSx:ZM,unstable_defaultSxConfig:Xp},Symbol.toStringTag,{value:"Module"}));function gG(t,e){return O({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var en={};const yG=Oo(J9),vG=Oo(_q);var ZA;function _G(){if(ZA)return en;ZA=1;var t=ys();Object.defineProperty(en,"__esModule",{value:!0}),en.alpha=E,en.blend=N,en.colorChannel=void 0,en.darken=w,en.decomposeColor=o,en.emphasize=P,en.getContrastRatio=v,en.getLuminance=g,en.hexToRgb=i,en.hslToRgb=m,en.lighten=C,en.private_safeAlpha=S,en.private_safeColorChannel=void 0,en.private_safeDarken=b,en.private_safeEmphasize=x,en.private_safeLighten=I,en.recomposeColor=d,en.rgbToHex=
vendor: 4,404 bytes, line 91
91h;var e=t(yG),n=t(vG);function r(k,V=0,L=1){return(0,n.default)(k,V,L)}function i(k){k=k.slice(1);const V=new RegExp(`.{1,${k.length>=6?2:1}}`,"g");let L=k.match(V);return L&&L[0].length===1&&(L=L.map(F=>F+F)),L?`rgb${L.length===4?"a":""}(${L.map((F,K)=>K<3?parseInt(F,16):Math.round(parseInt(F,16)/255*1e3)/1e3).join(", ")})`:""}function s(k){const V=k.toString(16);return V.length===1?`0${V}`:V}function o(k){if(k.type)return k;if(k.charAt(0)==="#")return o(i(k));const V=k.indexOf("("),L=k.substring(0,V);if(["rgb","rgba","hsl","hsla","color"].indexOf(L)===-1)throw new Error((0,e.default)(9,k));let F=k.substring(V+1,k.length-1),K;if(L==="color"){if(F=F.split(" "),K=F.shift(),F.length===4&&F[3].charAt(0)==="/"&&(F[3]=F[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(K)===-1)throw new Error((0,e.default)(10,K))}else F=F.split(",");return F=F.map(ne=>parseFloat(ne)),{type:L,values:F,colorSpace:K}}const l=k=>{const V=o(k);return V.values.slice(0,3).map((L,F)=>V.type.indexOf("hsl")!==-1&&F!==0?`${L}%`:L).join(" ")};en.colorChannel=l;const c=(k,V)=>{try{return l(k)}catch{return k}};en.private_safeColorChannel=c;function d(k){const{type:V,colorSpace:L}=k;let{values:F}=k;return V.indexOf("rgb")!==-1?F=F.map((K,ne)=>ne<3?parseInt(K,10):K):V.indexOf("hsl")!==-1&&(F[1]=`${F[1]}%`,F[2]=`${F[2]}%`),V.indexOf("color")!==-1?F=`${L} ${F.join(" ")}`:F=`${F.join(", ")}`,`${V}(${F})`}function h(k){if(k.indexOf("#")===0)return k;const{values:V}=o(k);return`#${V.map((L,F)=>s(F===3?Math.round(255*L):L)).join("")}`}function m(k){k=o(k);const{values:V}=k,L=V[0],F=V[1]/100,K=V[2]/100,ne=F*Math.min(K,1-K),Q=(J,Z=(J+L/30)%12)=>K-ne*Math.max(Math.min(Z-3,9-Z,1),-1);let X="rgb";const ee=[Math.round(Q(0)*255),Math.round(Q(8)*255),Math.round(Q(4)*255)];return k.type==="hsla"&&(X+="a",ee.push(V[3])),d({type:X,values:ee})}function g(k){k=o(k);let V=k.type==="hsl"||k.type==="hsla"?o(m(k)).values:k.values;return V=V.map(L=>(k.type!=="color"&&(L/=255),L<=.03928?L/12.92:((L+.055)/1.055)**2.4)),Number((.2126*V[0]+.7152*V[1]+.0722*V[2]).toFixed(3))}function v(k,V){const L=g(k),F=g(V);return(Math.max(L,F)+.05)/(Math.min(L,F)+.05)}function E(k,V){return k=o(k),V=r(V),(k.type==="rgb"||k.type==="hsl")&&(k.type+="a"),k.type==="color"?k.values[3]=`/${V}`:k.values[3]=V,d(k)}function S(k,V,L){try{return E(k,V)}catch{return k}}function w(k,V){if(k=o(k),V=r(V),k.type.indexOf("hsl")!==-1)k.values[2]*=1-V;else if(k.type.indexOf("rgb")!==-1||k.type.indexOf("color")!==-1)for(let L=0;L<3;L+=1)k.values[L]*=1-V;return d(k)}function b(k,V,L){try{return w(k,V)}catch{return k}}function C(k,V){if(k=o(k),V=r(V),k.type.indexOf("hsl")!==-1)k.values[2]+=(100-k.values[2])*V;else if(k.type.indexOf("rgb")!==-1)for(let L=0;L<3;L+=1)k.values[L]+=(255-k.values[L])*V;else if(k.type.indexOf("color")!==-1)for(let L=0;L<3;L+=1)k.values[L]+=(1-k.values[L])*V;return d(k)}function I(k,V,L){try{return C(k,V)}catch{return k}}function P(k,V=.15){return g(k)>.5?w(k,V):C(k,V)}function x(k,V,L){try{return P(k,V)}catch{return k}}function N(k,V,L,F=1){const K=(ee,J)=>Math.round((ee**(1/F)*(1-L)+J**(1/F)*L)**F),ne=o(k),Q=o(V),X=[K(ne.values[0],Q.values[0]),K(ne.values[1],Q.values[1]),K(ne.values[2],Q.values[2])];return d({type:"rgb",values:X})}return en}var zr=_G();const cp={black:"#000",white:"#fff"},ir={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},sc={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},oc={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Hf={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ac={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},lc={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},uc={300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},wG=["mode","contrastThreshold","tonalOffset"],eP={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:cp.white,default:cp.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackgroun
91d:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},sS={text:{primary:cp.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:cp.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function tP(t,e,n,r){const i=r.light||r,s=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=zr.lighten(t.main,i):e==="dark"&&(t.dark=zr.darken(t.main,s)))}function EG(t="light"){return t==="dark"?{main:ac[200],light:ac[50],dark:ac[400]}:{main:ac[700],light:ac[400],dark:ac[800]}}function SG(t="light"){return t==="dark"?{main:sc[200],light:sc[50],dark:sc[400]}:{main:sc[500],light:sc[300],dark:sc[700]}}function TG(t="light"){return t==="dark"?{main:oc[500],light:oc[300],dark:oc[700]}:{main:oc[700],light:oc[400],dark:oc[800]}}function bG(t="light"){return t==="dark"?{main:lc[400],light:lc[300],dark:lc[700]}:{main:lc[700],light:lc[500],dark:lc[900]}}function IG(t="light"){return t==="dark"?{main:uc[400],light:uc[300],dark:uc[700]}:{main:uc[800],light:uc[500],dark:uc[900]}}function RG(t="light"){return t==="dark"?{main:Hf[400],light:Hf[300],dark:Hf[700]}:{main:"#ed6c02",light:Hf[500],dark:Hf[900]}}function xG(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=ve(t,wG),s=t.primary||EG(e),o=t.secondary||SG(e),l=t.error||TG(e),c=t.info||bG(e),d=t.success||IG(e),h=t.warning||RG(e);function m(S){return zr.getContrastRatio(S,sS.text.primary)>=n?sS.text.primary:eP.text.primary}const g=({color:S,name:w,mainShade:b=500,lightShade:C=300,darkShade:I=700})=>{if(S=O({},S),!S.main&&S[b]&&(S.main=S[b]),!S.hasOwnProperty("main"))throw new Error(Hs(11,w?` (${w})`:"",b));if(typeof S.main!="string")throw new Error(Hs(12,w?` (${w})`:"",JSON.stringify(S.main)));return tP(S,"light",C,r),tP(S,"dark",I,r),S.contrastText||(S.contrastText=m(S.main)),S},v={dark:sS,light:eP};return kr(O({common:O({},cp),mode:e,primary:g({color:s,name:"primary"}),secondary:g({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:l,name:"error"}),warning:g({color:h,name:"warning"}),info:g({color:c,name:"info"}),success:g({color:d,name:"success"}),grey:ir,contrastThreshold:n,getContrastText:m,augmentColor:g,tonalOffset:r},v[e]),i)}const kG=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function CG(t){return Math.round(t*1e5)/1e5}const nP={textTransform:"uppercase"},rP='"Roboto", "Helvetica", "Arial", sans-serif';function AG(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=rP,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:h,pxToRem:m}=n,g=ve(n,kG),v=i/14,E=m||(b=>`${b/d*v}rem`),S=(b,C,I,P,x)=>O({fontFamily:r,fontWeight:b,fontSize:E(C),lineHeight:I},r===rP?{letterSpacing:`${CG(P/C)}em`}:{},x,h),w={h1:S(s,96,1.167,-1.5),h2:S(s,60,1.2,-.5),h3:S(o,48,1.167,0),h4:S(o,34,1.235,.25),h5:S(o,24,1.334,0),h6:S(l,20,1.6,.15),subtitle1:S(o,16,1.75,.15),subtitle2:S(l,14,1.57,.1),body1:S(o,16,1.5,.15),body2:S(o,14,1.43,.15),button:S(l,14,1.75,.4,nP),caption:S(o,12,1.66,.4),overline:S(o,12,2.66,1,nP),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return kr(O({htmlFontSize:d,pxToRem:E,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:l,fontWeightBold:c},w),g,{clone:!1})}const PG=.2,OG=.14,NG=.12;function Wt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${PG})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${OG})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${NG})`].join(",")}const DG=["none",Wt(0,2,1,-1,0,1,1,0,0,1,3,0),Wt(0,3,1,-2,0,2,2,0,0,1,5,0),Wt(0,3,3,-2,0,3,4,0,0,1,8,0),Wt(0,2,4,-1,0,4,5,0,0,1,10,0),Wt(0,3,5,-1,0,5,8,0,0,1,14,0),Wt(0,3,5,-1,0,6,10,0,0,1,18,0),Wt(0,4,5,-2,0,7,10,1,0,2,16,1),Wt(0,5,5,-3,0,8,10,1,0,3,14,2),Wt(0,5,6,-3,0,9,12,1,0,3,16,2),Wt(0,6,6,-3,0,10,14,1,0,4,18,3),Wt(0,6,7,-4,0,11,15,1,0,4,20,3),Wt(0,7,8,-4,0,12,17,2,0,5,22,4),Wt(0,7,8,-4,0,13,19,2,0,5,24,4),Wt(0,7,9,-4,0,14,21,2,0,5,26,4),Wt(0,8,9,-5,0,15,22,2,0,6,28,5),Wt(0,8,10,-5,0,16,24,2,0,6,30,5),Wt(0,8,11,-5,0,17,26,2,0,6,32,5),Wt(0,9,11,-5,0,18,28,2,0,7,34,6),Wt(0,9,12,-6,0,19,29,2,0,7,36,6
91),Wt(0,10,13,-6,0,20,31,3,0,8,38,7),Wt(0,10,13,-6,0,21,33,3,0,8,40,7),Wt(0,10,14,-6,0,22,35,3,0,8,42,7),Wt(0,11,14,-7,0,23,36,3,0,9,44,8),Wt(0,11,15,-7,0,24,38,3,0,9,46,8)],MG=["duration","easing","delay"],LG={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},VG={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function iP(t){return`${Math.round(t)}ms`}function FG(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function $G(t){const e=O({},LG,t.easing),n=O({},VG,t.duration);return O({getAutoHeightDuration:FG,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:l=e.easeInOut,delay:c=0}=s;return ve(s,MG),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof o=="string"?o:iP(o)} ${l} ${typeof c=="string"?c:iP(c)}`).join(",")}},t,{easing:e,duration:n})}const UG={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},jG=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function bI(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:s={}}=t,o=ve(t,jG);if(t.vars)throw new Error(Hs(18));const l=xG(r),c=gI(t);let d=kr(c,{mixins:gG(c.breakpoints,n),palette:l,shadows:DG.slice(),typography:AG(l,s),transitions:$G(i),zIndex:O({},UG)});return d=kr(d,o),d=e.reduce((h,m)=>kr(h,m),d),d.unstable_sxConfig=O({},Xp,o?.unstable_sxConfig),d.unstable_sx=function(m){return Zp({sx:m,theme:this})},d}const T_=bI(),tu="$$material";function ot({props:t,name:e}){return fG({props:t,name:e,defaultTheme:T_,themeId:tu})}var Sl={},oS={exports:{}},sP;function BG(){return sP||(sP=1,(function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)({}).hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(null,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(oS)),oS.exports}var aS={exports:{}},oP;function zG(){return oP||(oP=1,(function(t){function e(n,r){if(n==null)return{};var i={};for(var s in n)if({}.hasOwnProperty.call(n,s)){if(r.includes(s))continue;i[s]=n[s]}return i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(aS)),aS.exports}const wL=Oo(uG),WG=Oo(H9),qG=Oo(rq),HG=Oo(nq),GG=Oo(cH),KG=Oo(mG);var aP;function QG(){if(aP)return Sl;aP=1;var t=ys();Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.default=P,Sl.shouldForwardProp=E,Sl.systemDefaultTheme=void 0;var e=t(BG()),n=t(zG()),r=m(wL),i=WG;t(qG),t(HG);var s=t(GG),o=t(KG);const l=["ownerState"],c=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(x){if(typeof WeakMap!="function")return null;var N=new WeakMap,k=new WeakMap;return(h=function(V){return V?k:N})(x)}function m(x,N){if(x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var k=h(N);if(k&&k.has(x))return k.get(x);var V={__proto__:null},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in x)if(F!=="default"&&Object.prototype.hasOwnProperty.call(x,F)){var K=L?Object.getOwnPropertyDescriptor(x,F):null;K&&(K.get||K.set)?Object.defineProperty(V,F,K):V[F]=x[F]}return V.default=x,k&&k.set(x,V),V}function g(x){return Object.keys(x).length===0}function v(x){return typeof x=="string"&&x.charCodeAt(0)>96}function E(x){return x!=="ownerState"&&x!=="theme"&&x!=="sx"&&x!=="as"}const S=Sl.systemDefaultTheme=(0,s.default)(),w=x=>x&&x.charAt(0).toLowerCase()+x.slice(1);function b({defaultTheme:x,theme:N,themeId:k}){return g(N)?x:N[k]||N}function C(x){return x?(N,k)=>k[x]:null}function I(x,N){let{ownerState:k}=N,V=(0,n.default)(N,l);const L=typeof x=="function"?x((0,e.default)({ownerState:k},V)):x;if(Array.isArray(L))return L.flatMap(F=>I(F,(0,e.default)({ownerState:k},V)));if(L&&typeof L=="object"&&Array.isArray(L.variants)){const{variants:F=[]}=L;let ne=(0,n.default)(L,c);return F.forEach(Q=>{let X=!0;typeof Q.props=="function"?X=Q.props((0,e.default)({ownerState:k}
91,V,k)):Object.keys(Q.props).forEach(ee=>{k?.[ee]!==Q.props[ee]&&V[ee]!==Q.props[ee]&&(X=!1)}),X&&(Array.isArray(ne)||(ne=[ne]),ne.push(typeof Q.style=="function"?Q.style((0,e.default)({ownerState:k},V,k)):Q.style))}),ne}return L}function P(x={}){const{themeId:N,defaultTheme:k=S,rootShouldForwardProp:V=E,slotShouldForwardProp:L=E}=x,F=K=>(0,o.default)((0,e.default)({},K,{theme:b((0,e.default)({},K,{defaultTheme:k,themeId:N}))}));return F.__mui_systemSx=!0,(K,ne={})=>{(0,r.internal_processStyles)(K,fe=>fe.filter(Re=>!(Re!=null&&Re.__mui_systemSx)));const{name:Q,slot:X,skipVariantsResolver:ee,skipSx:J,overridesResolver:Z=C(w(X))}=ne,B=(0,n.default)(ne,d),te=ee!==void 0?ee:X&&X!=="Root"&&X!=="root"||!1,M=J||!1;let G,ae=E;X==="Root"||X==="root"?ae=V:X?ae=L:v(K)&&(ae=void 0);const pe=(0,r.default)(K,(0,e.default)({shouldForwardProp:ae,label:G},B)),ue=fe=>typeof fe=="function"&&fe.__emotion_real!==fe||(0,i.isPlainObject)(fe)?Re=>I(fe,(0,e.default)({},Re,{theme:b({theme:Re.theme,defaultTheme:k,themeId:N})})):fe,Ee=(fe,...Re)=>{let Se=ue(fe);const Me=Re?Re.map(ue):[];Q&&Z&&Me.push(Qe=>{const Ne=b((0,e.default)({},Qe,{defaultTheme:k,themeId:N}));if(!Ne.components||!Ne.components[Q]||!Ne.components[Q].styleOverrides)return null;const We=Ne.components[Q].styleOverrides,qe={};return Object.entries(We).forEach(([Nn,Yt])=>{qe[Nn]=I(Yt,(0,e.default)({},Qe,{theme:Ne}))}),Z(Qe,qe)}),Q&&!te&&Me.push(Qe=>{var Ne;const We=b((0,e.default)({},Qe,{defaultTheme:k,themeId:N}
91)),qe=We==null||(Ne=We.components)==null||(Ne=Ne[Q])==null?void 0:Ne.variants;return I({variants:qe},(0,e.default)({},Qe,{theme:We}))}),M||Me.push(F);const kt=Me.length-Re.length;if(Array.isArray(fe)&&kt>0){const Qe=new Array(kt).fill("");Se=[...fe,...Qe],Se.raw=[...fe.raw,...Qe]}const Ue=pe(Se,...Me);return K.muiName&&(Ue.muiName=K.muiName),Ue};return pe.withConfig&&(Ee.withConfig=pe.withConfig),Ee}}return Sl}var YG=QG();const JG=Pr(YG);function EL(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const vs=t=>EL(t)&&t!=="classes",_e=JG({themeId:tu,defaultTheme:T_,rootShouldForwardProp:vs});function XG(t){return it("MuiSvgIcon",t)}Ze("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ZG=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],e8=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${Ie(e)}`,`fontSize${Ie(n)}`]};return rt(i,XG,r)},t8=_e("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${Ie(n.color)}`],e[`fontSize${Ie(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,s,o,l,c,d,h,m,g,v,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((s=t.typography)==null||(o=s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem",medium:((l=t.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=t.typography)==null||(h=d.pxToRem)==null?void 0:h.call(d,35))||"2.1875rem"}[e.fontSize],color:(m=(g=(t.vars||t).palette)==null||(g=g[e.color])==null?void 0:g.main)!=null?m:{action:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(E=(t.vars||t).palette)==null||(E=E.action)==null?void 0:E.disabled,inherit:void 0}[e.color]}}),AT=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:h=!1,titleAccess:m,viewBox:g="0 0 24 24"}=r,v=ve(r,ZG),E=T.isValidElement(i)&&i.type==="svg",S=O({},r,{color:o,component:l,fontSize:c,instanceFontSize:e.fontSize,inheritViewBox:h,viewBox:g,hasSvgAsChild:E}),w={};h||(w.viewBox=g);const b=e8(S);return A.jsxs(t8,O({as:l,className:Ve(b.root,s),focusable:"false",color:d,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n},w,v,E&&i.props,{ownerState:S,children:[E?i.props.children:i,m?A.jsx("title",{children:m}):null]}))});AT.muiName="SvgIcon";function II(t,e){function n(r,i){return A.jsx(AT,O({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=AT.muiName,T.memo(T.forwardRef(n))}const n8={configure:t=>{cI.configure(t)}},r8=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Ie,createChainedFunction:TT,createSvgIcon:II,debounce:lI,deprecatedPropType:iq,isMuiElement:Ny,ownerDocument:$n,ownerWindow:Ma,requirePropFactory:sq,setRef:ov,unstable_ClassNameGenerator:n8,unstable_useEnhancedEffect:Gi,unstable_useId:Kp,unsupportedProp:aq,useControlled:op,useEventCallback:Ui,useForkRef:wn,useIsFocusVisible:l_},Symbol.toStringTag,{value:"Module"})),i8=Oo(r8);var lP;function Do(){return lP||(lP=1,(function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=i8})(Y0)),Y0}var uP;function s8(){if(uP)return Wf;uP=1;var t=ys();Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.default=void 0;var e=t(Do()),n=to();return Wf.default=(0,e.default)((0,n.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Wf}var o8=s8();const a8=Pr(o8);function l8({styles:t,themeId:e,defaultTheme:n={}}){const r=E_(n),i=typeof t=="function"?t(e&&r[e]||r):t;return A.jsx(vL,{styles:i})}const u8=["className","component"];function c8(t={}){const{themeId:e,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=t,s=_L("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(Zp);return T.forwardRef(function(c,d){const h=E_(n),m=S_(c),{className:g,component:v="div"}=m,E=ve(m,u8);return A.jsx(s,O({as:v,ref:d,className:Ve(g,i?i(r):r),theme:e&&h[e]||h},E))})}function d8(t,e,n,r,i){const[s,o]=T.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return Gi(()=>{let l=!0;if(!n)return;const c=n(t),d=()=>{l&&o(c.matches)};return d(),c.addListener(d),()=>{l=!1,c.removeListener(d)}},[t,n]),s}const SL=T.useSyncExternalStore;function f8(t,e,n,r,i){const s=T.useCallback(()=>e,[e]),o=T.useMemo(()=>
91{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:h}=r(t);return()=>h}return s},[s,t,r,i,n]),[l,c]=T.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const h=n(t);return[()=>h.matches,m=>(h.addListener(m),()=>{h.removeListener(m)})]},[s,n,t]);return SL(c,l,o)}function TL(t,e={}){const n=TI(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:s=r?window.matchMedia:null,ssrMatchMedia:o=null,noSsr:l=!1}=dI({name:"MuiUseMediaQuery",props:e,theme:n});let c=typeof t=="function"?t(n):t;return c=c.replace(/^@media( ?)/m,""),(SL!==void 0?f8:d8)(c,i,s,o,l)}function RI(t,e=0,n=1){return HM(t,e,n)}function h8(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function nu(t){if(t.type)return t;if(t.charAt(0)==="#")return nu(h8(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Hs(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Hs(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}function b_(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function p8(t){t=nu(t);const{values:e}
91=t,n=e[0],r=e[1]/100,i=e[2]/100,s=r*Math.min(i,1-i),o=(d,h=(d+n/30)%12)=>i-s*Math.max(Math.min(h-3,9-h,1),-1);let l="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(l+="a",c.push(e[3])),b_({type:l,values:c})}function m8(t){t=nu(t);let e=t.type==="hsl"||t.type==="hsla"?nu(p8(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function g8(t,e){return t=nu(t),e=RI(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,b_(t)}function Gl(t,e){if(t=nu(t),e=RI(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return b_(t)}function I_(t,e){if(t=nu(t),e=RI(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return b_(t)}function bL(t,e=.15){return m8(t)>.5?Gl(t,e):I_(t,e)}const IL=T.createContext(null);function xI(){return T.useContext(IL)}const y8=typeof Symbol=="function"&&Symbol.for,RL=y8?Symbol.for("mui.nested"):"__THEME_NESTED__";function v8(t,e){return typeof e=="function"?e(t):O({},t,e)}function _8(t){const{children:e,theme:n}=t,r=xI(),i=T.useMemo(()=>{const s=r===null?n:v8(r,n);return s!=null&&(s[RL]=r!==null),s},[n,r]);return A.jsx(IL.Provider,{value:i,children:e})}const w8=["value"],xL=T.createContext();function E8(t){let{value:e}=t,n=ve(t,w8);return A.jsx(xL.Provider,O({value:e??!0},n))}const kL=()=>{const t=T.useContext(xL);return t??!1},S8=T.createContext(void 0);function T8({value:t,children:e}){return A.jsx(S8.Provider,{value:t,children:e})}const cP={};function dP(t,e,n,r=!1){return T.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const s=n(i),o=t?O({},e,{[t]:s}):s;return r?()=>o:o}return t?O({},e,{[t]:n}):O({},e,n)},[t,e,n,r])}function b8(t){const{children:e,theme:n,themeId:r}=t,i=TI(cP),s=xI()||cP,o=dP(r,i,n),l=dP(r,s,n,!0),c=o.direction==="rtl";return A.jsx(_8,{theme:l,children:A.jsx(Ad.Provider,{value:o,children:A.jsx(E8,{value:c,children:A.jsx(T8,{value:o?.components,children:e})})})})}function Rr(t){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(t)}function I8(t,e){if(Rr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Rr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function CL(t){var e=I8(t,"string");return Rr(e)=="symbol"?e:e+""}function fP(t){return String(parseFloat(t)).length===String(t).length}function R8(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Tl(t){return parseFloat(t)}function x8(t){return(e,n)=>{const r=R8(e);if(r===n)return e;let i=Tl(e);r!=="px"&&(r==="em"||r==="rem")&&(i=Tl(e)*Tl(t));let s=i;if(n!=="px")if(n==="em")s=i/Tl(t);else if(n==="rem")s=i/Tl(t);else return e;return parseFloat(s.toFixed(5))+n}}function k8({size:t,grid:e}){const n=t-t%e,r=n+e;return t-n<r-t?n:r}function C8({lineHeight:t,pixels:e,htmlFontSize:n}){return e/(t*n)}function A8({cssProperty:t,min:e,max:n,unit:r="rem",breakpoints:i=[600,900,1200],transform:s=null}){const o={[t]:`${e}${r}`},l=(n-e)/i[i.length-1];return i.forEach(c=>{let d=e+l*c;s!==null&&(d=s(d)),o[`@media (min-width:${c}px)`]={[t]:`${Math.round(d*1e4)/1e4}${r}`}}),o}function P8(t,e={}){const{breakpoints:n=["sm","md","lg"],disableAlign:r=!1,factor:i=2,variants:s=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=e,o=O({},t);o.typography=O({},o.typography);const l=o.typography,c=x8(l.htmlFontSize),d=n.map(h=>o.breakpoints.values[h]);return s.forEach(h=>{const m=l[h],g=parseFloat(c(m.fontSize,"rem"));if(g<=1)return;const v=g,E=1+(v-1)/i;let{lineHeight:S}=m;if(!fP(S)&&!r)throw new Error(Hs(6));fP(S)||(S=parseFloat(c(S,"rem"))/parseFloat(g));let w=null;r||(w=b=>k8({size:b,grid:C8({pixels:4,lineHeight:S,htmlFontSize:l.htmlFontSize})})),l[h]=O({},m,A8({cssProperty:"fontSize",min:E,max:v,unit:"rem",breakpoints:d,transform:w}))}),o}function Or(){const t=E_(T_);return t[tu]||t}const O8=["theme"];function N8(t){let{theme:e}=t,n=ve(t,O8);const r=e[tu];return A.jsx(b8,O({},n,{themeId:r?tu:void 0,theme:r||e}))}const hP=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function D8(t){return ot}function uv(t,e){return uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},uv(t,e)}function R_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,uv(t,e)}const pP={disabled:!1},cv=ii.createContext(null);var M8=function(e){return e.scrollTop},bh="unmounted",kl="exited",Cl="entering",bc="entered",PT="exiting",ro=(function(t){R_(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,l=o&&!o.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=kl,s.appearStatus=Cl):c=bc:r.unmountOnExit||r.mountOnEnter?c=bh:c=kl,s.state={status:c},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===bh?{status:kl}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Cl&&o!==bc&&(s=Cl):(o===Cl||o===bc)&&(s=PT)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,l;return s=o=l=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,l=i.appear!==void 0?i.appear:o),{exit:s,enter
vendor: 3,782 bytes, line 91
91:o,appear:l}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Cl){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:ty.findDOMNode(this);o&&M8(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===kl&&this.setState({status:bh})},n.performEnter=function(i){var s=this,o=this.props.enter,l=this.context?this.context.isMounting:i,c=this.props.nodeRef?[l]:[ty.findDOMNode(this),l],d=c[0],h=c[1],m=this.getTimeouts(),g=l?m.appear:m.enter;if(!i&&!o||pP.disabled){this.safeSetState({status:bc},function(){s.props.onEntered(d)});return}this.props.onEnter(d,h),this.safeSetState({status:Cl},function(){s.props.onEntering(d,h),s.onTransitionEnd(g,function(){s.safeSetState({status:bc},function(){s.props.onEntered(d,h)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),l=this.props.nodeRef?void 0:ty.findDOMNode(this);if(!s||pP.disabled){this.safeSetState({status:kl},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:PT},function(){i.props.onExiting(l),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:kl},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(l){o&&(o=!1,s.nextCallback=null,i(l))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:ty.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!o||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],d=c[0],h=c[1];this.props.addEndListener(d,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===bh)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=ve(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ii.createElement(cv.Provider,{value:null},typeof o=="function"?o(i,l):ii.cloneElement(ii.Children.only(o),l))},e})(ii.Component);ro.contextType=cv;ro.propTypes={};function cc(){}ro.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:cc,onEntering:cc,onEntered:cc,onExit:cc,onExiting:cc,onExited:cc};ro.UNMOUNTED=bh;ro.EXITED=kl;ro.ENTERING=Cl;ro.ENTERED=bc;ro.EXITING=PT;function Gs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kI(t,e){var n=function(s){return e&&T.isValidElement(s)?e(s):s},r=Object.create(null);return t&&T.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function L8(t,e){t=t||{},e=e||{};function n(h){return h in e?e[h]:t[h]}var r=Object.create(null),i=[];for(var s in t)s in e?i.length&&(r[s]=i,i=[]):i.push(s);var o,l={};for(var c in e){if(r[c])for(o=0;o<r[c].length;o++){var d=r[c][o];l[r[c][o]]=n(d)}l[c]=n(c)}for(o=0;o<i.length;o++)l[i[o]]=n(i[o]);return l}function $l(t,e,n){return n[e]!=null?n[e]:t.props[e]}function V8(t,e){return kI(t.children,function(n){return T.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:$l(n,"appear",t),enter:$l(n,"enter",t),exit:$l(n,"exit",t)})})}function F8(t,e,n){var r=kI(t.children),i=L8(e,r);
vendor: 4,100 bytes, line 91
91return Object.keys(i).forEach(function(s){var o=i[s];if(T.isValidElement(o)){var l=s in e,c=s in r,d=e[s],h=T.isValidElement(d)&&!d.props.in;c&&(!l||h)?i[s]=T.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:$l(o,"exit",t),enter:$l(o,"enter",t)}):!c&&l&&!h?i[s]=T.cloneElement(o,{in:!1}):c&&l&&T.isValidElement(d)&&(i[s]=T.cloneElement(o,{onExited:n.bind(null,o),in:d.props.in,exit:$l(o,"exit",t),enter:$l(o,"enter",t)}))}}),i}var $8=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},U8={component:"div",childFactory:function(e){return e}},CI=(function(t){R_(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=s.handleExited.bind(Gs(s));return s.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,s){var o=s.children,l=s.handleExited,c=s.firstRender;return{children:c?V8(i,l):F8(i,o,l),firstRender:!1}},n.handleExited=function(i,s){var o=kI(this.props.children);i.key in o||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(l){var c=O({},l.children);return delete c[i.key],{children:c}}))},n.render=function(){var i=this.props,s=i.component,o=i.childFactory,l=ve(i,["component","childFactory"]),c=this.state.contextValue,d=$8(this.state.children).map(o);return delete l.appear,delete l.enter,delete l.exit,s===null?ii.createElement(cv.Provider,{value:c},d):ii.createElement(cv.Provider,{value:c},ii.createElement(s,l,d))},e})(ii.Component);CI.propTypes={};CI.defaultProps=U8;const AL=t=>t.scrollTop;function dv(t,e){var n,r;const{timeout:i,easing:s,style:o={}}=t;return{duration:(n=o.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=o.transitionTimingFunction)!=null?r:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}function j8(t){return it("MuiPaper",t)}Ze("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const B8=["className","component","elevation","square","variant"],z8=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return rt(s,j8,i)},W8=_e("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return O({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&O({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${zr.alpha("#fff",hP(e.elevation))}, ${zr.alpha("#fff",hP(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Tu=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiPaper"}),{className:i,component:s="div",elevation:o=1,square:l=!1,variant:c="elevation"}=r,d=ve(r,B8),h=O({},r,{component:s,elevation:o,square:l,variant:c}),m=z8(h);return A.jsx(W8,O({as:s,ownerState:h,className:Ve(m.root,i),ref:n},d))});function fv(t){return typeof t=="string"}function Oc(t,e,n){return t===void 0||fv(t)?e:O({},e,{ownerState:O({},e.ownerState,n)})}const q8={disableDefaultClasses:!1},H8=T.createContext(q8);function G8(t){const{disableDefaultClasses:e}=T.useContext(H8);return n=>e?"":t(n)}function hv(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEac
91h(r=>{n[r]=t[r]}),n}function PL(t,e,n){return typeof t=="function"?t(e,n):t}function mP(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function OL(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=t;if(!e){const v=Ve(n?.className,s,i?.className,r?.className),E=O({},n?.style,i?.style,r?.style),S=O({},n,i,r);return v.length>0&&(S.className=v),Object.keys(E).length>0&&(S.style=E),{props:S,internalRef:void 0}}const o=hv(O({},i,r)),l=mP(r),c=mP(i),d=e(o),h=Ve(d?.className,n?.className,s,i?.className,r?.className),m=O({},d?.style,n?.style,i?.style,r?.style),g=O({},d,n,c,l);return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:d.ref}}const K8=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function La(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=t,o=ve(t,K8),l=s?{}:PL(r,i),{props:c,internalRef:d}=OL(O({},o,{externalSlotProps:l})),h=wn(d,l?.ref,(e=t.additionalProps)==null?void 0:e.ref);return Oc(n,O({},c,{ref:h}),i)}const Q8=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Y8=["component","slots","slotProps"],J8=["component"];function X8(t,e){const{className:n,elementType:r,ownerState:i,externalForwardedProps:s,getSlotOwnerState:o,internalForwardedProps:l}=e,c=ve(e,Q8),{component:d,slots:h={[t]:void 0},slotProps:m={[t]:void 0}}=s;ve(s,Y8);const g=h[t]||r,v=PL(m[t],i),E=OL(O({className:n},c,{externalForwardedProps:void 0,externalSlotProps:v})),{props:{component:S},internalRef:w}=E,b=ve(E.props,J8),C=wn(w,v?.ref,e.ref),I=o?o(b):{},P=O({},i,I),x=S,N=Oc(g,O({},t==="root",!h[t]&&l,b,x&&{as:x},{ref:C}),P);return Object.keys(I).forEach(k=>{delete N[k]}),[g,N]}function Z8(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:l,onExited:c,timeout:d}=t,[h,m]=T.useState(!1),g=Ve(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},E=Ve(n.child,h&&n.childLeaving,r&&n.childPulsate);return!l&&!h&&m(!0),T.useEffect(()=>{if(!l&&c!=null){const S=setTimeout(c,d);return()=>{clearTimeout(S)}}},[c,l,d]),A.jsx("span",{className:g,style:v,children:A.jsx("span",{className:E})})}const Vi=Ze("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),eK=["center","classes","className"];let x_=t=>t,gP,yP,vP,_P;const OT=550,tK=80,nK=Pd(gP||(gP=x_`
92  0% {
93    transform: scale(0);
94    opacity: 0.1;
95  }
96
97  100% {
98    transform: scale(1);
99    opacity: 0.3;
100  }
101`)),rK=Pd(yP||(yP=x_`
102  0% {
103    opacity: 1;
104  }
105
106  100% {
107    opacity: 0;
108  }
109`)),iK=Pd(vP||(vP=x_`
110  0% {
111    transform: scale(1);
112  }
113
114  50% {
115    transform: scale(0.92);
116  }
117
118  100% {
119    transform: scale(1);
120  }
121`)),sK=_e("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),oK=_e(Z8,{name:"MuiTouchRipple",slot:"Ripple"})(_P||(_P=x_`
122  opacity: 0;
123  position: absolute;
124
125  &.${0} {
126    opacity: 0.3;
127    transform: scale(1);
128    animation-name: ${0};
129    animation-duration: ${0}ms;
130    animation-timing-function: ${0};
131  }
132
133  &.${0} {
134    animation-duration: ${0}ms;
135  }
136
137  & .${0} {
138    opacity: 1;
139    display: block;
140    width: 100%;
141    height: 100%;
142    border-radius: 50%;
143    background-color: currentColor;
144  }
145
146  & .${0} {
147    opacity: 0;
148    animation-name: ${0};
149    animation-duration: ${0}ms;
150    animation-timing-function: ${0};
151  }
152
153  & .${0} {
154    position: absolute;
155    /* @noflip */
156    left: 0px;
157    top: 0;
158    animation-name: ${0};
159    animation-duration: 2500ms;
160    animation-timing-function: ${0};
161    animation-iteration-count: infinite;
162    animation-delay: 200ms;
163  }
164`),Vi.rippleVisible,nK,OT,({theme:t})=>t.transitions.easing.easeInOut,Vi.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Vi.child,Vi.childLeaving,rK,OT,({theme:t})=>t.transitions.easing.easeInOut,Vi.childPulsate,iK,({theme:t})=>t.transitions.easing.easeInOut),aK=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:o}=r,l=ve(r,eK),[c,d]=T.useState([]),h=T.useRef(0),m=T.useRef(null);T.useEffect(()=>{m.current&&(m.current(),m.current=null)},[c]);const g=T.useRef(!1),v=Fl(),E=T.useRef(null),S=T.useRef(null),w=T.useCallback(P=>{const{pulsate:x,rippleX:N,rippleY:k,rippleSize:V,cb:L}=P;d(F=>[...F,A.jsx(oK,{classes:{ripple:Ve(s.ripple,Vi.ripple),rippleVisible:Ve(s.rippleVisible,Vi.rippleVisible),ripplePulsate:Ve(s.ripplePulsate,Vi.ripplePulsate),
vendor: 11,908 bytes, line 164
164child:Ve(s.child,Vi.child),childLeaving:Ve(s.childLeaving,Vi.childLeaving),childPulsate:Ve(s.childPulsate,Vi.childPulsate)},timeout:OT,pulsate:x,rippleX:N,rippleY:k,rippleSize:V},h.current)]),h.current+=1,m.current=L},[s]),b=T.useCallback((P={},x={},N=()=>{})=>{const{pulsate:k=!1,center:V=i||x.pulsate,fakeElement:L=!1}=x;if(P?.type==="mousedown"&&g.current){g.current=!1;return}P?.type==="touchstart"&&(g.current=!0);const F=L?null:S.current,K=F?F.getBoundingClientRect():{width:0,height:0,left:0,top:0};let ne,Q,X;if(V||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)ne=Math.round(K.width/2),Q=Math.round(K.height/2);else{const{clientX:ee,clientY:J}=P.touches&&P.touches.length>0?P.touches[0]:P;ne=Math.round(ee-K.left),Q=Math.round(J-K.top)}if(V)X=Math.sqrt((2*K.width**2+K.height**2)/3),X%2===0&&(X+=1);else{const ee=Math.max(Math.abs((F?F.clientWidth:0)-ne),ne)*2+2,J=Math.max(Math.abs((F?F.clientHeight:0)-Q),Q)*2+2;X=Math.sqrt(ee**2+J**2)}P!=null&&P.touches?E.current===null&&(E.current=()=>{w({pulsate:k,rippleX:ne,rippleY:Q,rippleSize:X,cb:N})},v.start(tK,()=>{E.current&&(E.current(),E.current=null)})):w({pulsate:k,rippleX:ne,rippleY:Q,rippleSize:X,cb:N})},[i,w,v]),C=T.useCallback(()=>{b({},{pulsate:!0})},[b]),I=T.useCallback((P,x)=>{if(v.clear(),P?.type==="touchend"&&E.current){E.current(),E.current=null,v.start(0,()=>{I(P,x)});return}E.current=null,d(N=>N.length>0?N.slice(1):N),m.current=x},[v]);return T.useImperativeHandle(n,()=>({pulsate:C,start:b,stop:I}),[C,b,I]),A.jsx(sK,O({className:Ve(Vi.root,s.root,o),ref:S},l,{children:A.jsx(CI,{component:null,exit:!0,children:c})}))});function lK(t){return it("MuiButtonBase",t)}const uK=Ze("MuiButtonBase",["root","disabled","focusVisible"]),cK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],dK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,o=rt({root:["root",e&&"disabled",n&&"focusVisible"]},lK,i);return n&&r&&(o.root+=` ${r}`),o},fK=_e("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${uK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),NL=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:o,className:l,component:c="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:m=!1,focusRipple:g=!1,LinkComponent:v="a",onBlur:E,onClick:S,onContextMenu:w,onDragLeave:b,onFocus:C,onFocusVisible:I,onKeyDown:P,onKeyUp:x,onMouseDown:N,onMouseLeave:k,onMouseUp:V,onTouchEnd:L,onTouchMove:F,onTouchStart:K,tabIndex:ne=0,TouchRippleProps:Q,touchRippleRef:X,type:ee}=r,J=ve(r,cK),Z=T.useRef(null),B=T.useRef(null),te=wn(B,X),{isFocusVisibleRef:M,onFocus:G,onBlur:ae,ref:pe}=l_(),[ue,Ee]=T.useState(!1);d&&ue&&Ee(!1),T.useImperativeHandle(i,()=>({focusVisible:()=>{Ee(!0),Z.current.focus()}}),[]);const[fe,Re]=T.useState(!1);T.useEffect(()=>{Re(!0)},[]);const Se=fe&&!h&&!d;T.useEffect(()=>{ue&&g&&!h&&fe&&B.current.pulsate()},[h,g,ue,fe]);function Me(Le,Nt,Mr=m){return Ui(di=>(Nt&&Nt(di),!Mr&&B.current&&B.current[Le](di),!0))}const kt=Me("start",N),Ue=Me("stop",w),Qe=Me("stop",b),Ne=Me("stop",V),We=Me("stop",Le=>{ue&&Le.preventDefault(),k&&k(Le)}),qe=Me("start",K),Nn=Me("stop",L),Yt=Me("stop",F),Jt=Me("stop",Le=>{ae(Le),M.current===!1&&Ee(!1),E&&E(Le)},!1),Tn=Ui(Le=>{Z.current||(Z.current=Le.currentTarget),G(Le),M.current===!0&&(Ee(!0),I&&I(Le)),C&&C(Le)}),_t=()=>{const Le=Z.current;return c&&c!=="button"&&!(Le.tagName==="A"&&Le.href)},Je=T.useRef(!1),mn=Ui(Le=>{g&&!Je.current&&ue&&B.current&&Le.key===" "&&(Je.current=!0,B.current.stop(Le,()=>{B.current.start(Le)})),Le.target===Le.currentTarget&&_t()&&Le.key===" "&&Le.preventDefault(),P&&P(Le),Le.target===Le.currentTarget&&_t()&&Le.key==="Enter"&&!d&&(Le.preventDefault(),S&&S(Le))}),jt=Ui(Le=>{g&&Le.key===" "&&B.current&&ue&&!Le.defaultPrevented&&(Je.current=!1,B.current.stop(Le,()=>{B.current.pulsate(Le)})),x&&x(Le),S&&Le.target===Le.currentTarget&&_t()&&Le.key===" "&&!Le.defaultPrevented&&S(Le)});let at=c;at==="button"&&(J.href||J.to)&&(at=v);const bn={};at==="button"?(bn.type=ee===void 0?"button":ee,bn.disabled=d):(!J.href&&!J.to&&(bn.role="button"),d&&(bn["aria-disabled"]=d));const Dn=wn(n,pe,Z),Mn=O({},r,{centerRipple:s,component:c,disabled:d,disableRipple:h,disableTouchRipple:m,focusRipple:g,tabIndex:ne,focusVisible:ue}),et=dK(Mn);return A.jsxs(fK,O({as:at,className:Ve(et.root,l),ownerState:Mn,onBlur:Jt,onClick:S,onContextMenu:Ue,onFocus:Tn,onKeyDown:mn,onKeyUp:jt,onMouseDown:kt,onMouseLeave:We,onMouseUp:Ne,onDragLeave:Qe,onTouchEnd:Nn,onTouchMove:Yt,onTouchStart:qe,ref:Dn,tabIndex:d?-1:ne,type:ee},bn,J,{children:[o,Se?A.jsx(aK,O({ref:te,center:s},Q)):null]}))});function hK(t){return it("MuiIconButton",t)}const pK=Ze("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),mK=["edge","children","className","color","disabled","disableFocusRipple","size"],gK=t=>{const{classes:e,disabled:n,color:r,edge:i,size:s}=t,o={root:["root",n&&"disabled",r!=="default"&&`color${Ie(r)}`,i&&`edge${Ie(i)}`,`size${Ie(s)}`]};return rt(o,hK,e)},yK=_e(NL,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${Ie(n.color)}`],n.edge&&e[`edge${Ie(n.edge)}`],e[`size${Ie(n.size)}`]]}})(({theme:t,ownerState:e})=>O({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:zr.alpha(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return O({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&O({color:r?.main},!e.disableRipple&&{"&:hover":O({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zr.alpha(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${pK.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),DL=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiIconButton"}),{edge:i=!1,children:s,className:o,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:h="medium"}=r,m=ve(r,mK),g=O({},r,{edge:i,color:l,disabled:c,disableFocusRipple:d,size:h}),v=gK(g);return A.jsx(yK,O({className:Ve(v.root,o),centerRipple:!0,focusRipple:!d,disabled:c,ref:n},m,{ownerState:g,children:s}))});function vK(t){return it("MuiTypography",t)}Ze("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _K=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],wK=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=t,l={root:["root",s,t.align!=="inherit"&&`align${Ie(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return rt(l,vK,o)},EK=_e("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${Ie(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>O({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),wP={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},SK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},TK=t=>SK[t]||t,Nr=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiTypography"}),i=TK(r.color),s=S_(O({},r,{color:i})),{align:o="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:h=!1,paragraph:m=!1,variant:g="body1",variantMapping:v=wP}=s,E=ve(s,_K),S=O({},s,{align:o,color:i,className:l,component:c,gutterBottom:d,noWrap:h,paragraph:m,variant:g,variantMapping:v}),w=c||(m?"p":v[g]||wP[g])||"span",b=wK(S);return A.jsx(EK,O({as:w,ref:n,ownerState:S,className:Ve(b.root,l)},E))}),ML="base";function bK(t){return`${ML}--${t}`}function IK(t,e){return`${ML}-${t}-${e}`}function RK(t,e){const n=qM[e];return n?bK(n):IK(t,e)}function EP(t){return t.substring(2).toLowerCase()}function xK(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function kK(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:s="onTouchEnd"}=t,o=T.useRef(!1),l=T.useRef(null),c=T.useRef(!1),d=T.useRef(!1);T.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const h=wn(e.ref,l),m=Ui(E=>{const S=d.current;d.current=!1;const w=$n(l.current);if(!c.current||!l.current||"clientX"in E&&xK(E,w))return;if(o.current){o.current=!1;return}let b;E.composedPath?b=E.composedPath().indexOf(l.current)>-1:b=!w.documentElement.contains(E.target)||l.current.contains(E.target),!b&&(n||!S)&&i(E)}),g=E=>S=>{d.current=!0;const w=e.props[E];w&&w(S)},v={ref:h};return s!==!1&&(v[s]=g(s)),T.useEffect(()=>{if(s!==!1){const E=EP(s),S=$n(l.current),w=()=>{o.current=!0};return S.addEventListener(E,m),S.addEventListener("touchmove",w),()=>{S.removeEventListener(E,m),S.removeEventListener("touchmove",w)}}},[m,s]),r!==!1&&(v[r]=g(r)),T.useEffect(()=>{if(r!==!1){const E=EP(r),S=$n(l.current);return S.addEventListener(E,m),()=>{S.removeEventListener(E,m)}}},[m,r]),A.jsx(T.Fragment,{children:T.cloneElement(e,v)})}const CK=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function AK(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function PK(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function OK(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||PK(t))}function NK(t){const e=[],n=[];
164return Array.from(t.querySelectorAll(CK)).forEach((r,i)=>{const s=AK(r);s===-1||!OK(r)||(s===0?e.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function DK(){return!0}function MK(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=NK,isEnabled:o=DK,open:l}=t,c=T.useRef(!1),d=T.useRef(null),h=T.useRef(null),m=T.useRef(null),g=T.useRef(null),v=T.useRef(!1),E=T.useRef(null),S=wn(e.ref,E),w=T.useRef(null);T.useEffect(()=>{!l||!E.current||(v.current=!n)},[n,l]),T.useEffect(()=>{if(!l||!E.current)return;const I=$n(E.current);return E.current.contains(I.activeElement)||(E.current.hasAttribute("tabIndex")||E.current.setAttribute("tabIndex","-1"),v.current&&E.current.focus()),()=>{i||(m.current&&m.current.focus&&(c.current=!0,m.current.focus()),m.current=null)}},[l]),T.useEffect(()=>{if(!l||!E.current)return;const I=$n(E.current),P=k=>{w.current=k,!(r||!o()||k.key!=="Tab")&&I.activeElement===E.current&&k.shiftKey&&(c.current=!0,h.current&&h.current.focus())},x=()=>{const k=E.current;if(k===null)return;if(!I.hasFocus()||!o()||c.current){c.current=!1;return}if(k.contains(I.activeElement)||r&&I.activeElement!==d.current&&I.activeElement!==h.current)return;if(I.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!v.current)return;let V=[];if((I.activeElement===d.current||I.activeElement===h.current)&&(V=s(E.current)),V.length>0){var L,F;const K=!!((L=w.current)!=null&&L.shiftKey&&((F=w.current)==null?void 0:F.key)==="Tab"),ne=V[0],Q=V[V.length-1];typeof ne!="string"&&typeof Q!="string"&&(K?Q.focus():ne.focus())}else k.focus()};I.addEventListener("focusin",x),I.addEventListener("keydown",P,!0);const N=setInterval(()=>{I.activeElement&&I.activeElement.tagName==="BODY"&&x()},50);return()=>{clearInterval(N),I.removeEventListener("focusin",x),I.removeEventListener("keydown",P,!0)}},[n,r,i,o,l,s]);const b=I=>{m.current===null&&(m.current=I.relatedTarget),v.current=!0,g.current=I.target;const P=e.props.onFocus;P&&P(I)},C=I=>{m.current===null&&(m.current=I.relatedTarget),v.current=!0};return A.jsxs(T.Fragment,{children:[A.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:d,"data-testid":"sentinelStart"}),T.cloneElement(e,{ref:S,onFocus:b}),A.jsx("div",{tabIndex:l?0:-1,onFocus:C,ref:h,"data-testid":"sentinelEnd"})]})}function LK(t){return typeof t=="function"?t():t}const LL=T.forwardRef(function(e,n){const{children:r,container:i,disablePortal:s=!1}=e,[o,l]=T.useState(null),c=wn(T.isValidElement(r)?r.ref:null,n);if(Gi(()=>{s||l(LK(i)||document.body)},[i,s]),Gi(()=>{if(o&&!s)return ov(n,o),()=>{ov(n,null)}},[n,o,s]),s){if(T.isValidElement(r)){const d={ref:c};return T.cloneElement(r,d)}return A.jsx(T.Fragment,{children:r})}return A.jsx(T.Fragment,{children:o&&IM.createPortal(r,o)})});function VK(t){const e=$n(t);return e.body===t?Ma(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function $h(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function SP(t){return parseInt(Ma(t).getComputedStyle(t).paddingRight,10)||0}function FK(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function TP(t,e,n,r,i){const s=[e,n,...r];[].forEach.call(t.children,o=>{const l=s.indexOf(o)===-1,c=!FK(o);l&&c&&$h(o,i)})}function lS(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function $K(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(VK(r)){const o=WM($n(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${SP(r)+o}px`;const l=$n(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${SP(c)+o}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=$n(r).body;else{const o=r.parentElement,l=Ma(r);s=o?.nodeName==="HTML"&&l.getComputedStyle(o).overflowY==="scroll"?o:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>
164{n.forEach(({value:s,el:o,property:l})=>{s?o.style.setProperty(l,s):o.style.removeProperty(l)})}}function UK(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class jK{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&$h(e.modalRef,!1);const i=UK(n);TP(n,e.mount,e.modalRef,i,!0);const s=lS(this.containers,o=>o.container===n);return s!==-1?(this.containers[s].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=lS(this.containers,s=>s.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=$K(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=lS(this.containers,o=>o.modals.indexOf(e)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&$h(e.modalRef,n),TP(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=s.modals[s.modals.length-1];o.modalRef&&$h(o.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function BK(t){return typeof t=="function"?t():t}function zK(t){return t?t.props.hasOwnProperty("in"):!1}const WK=new jK;function qK(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=WK,closeAfterTransition:s=!1,onTransitionEnter:o,onTransitionExited:l,children:c,onClose:d,open:h,rootRef:m}=t,g=T.useRef({}),v=T.useRef(null),E=T.useRef(null),S=wn(E,m),[w,b]=T.useState(!h),C=zK(c);let I=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(I=!1);const P=()=>$n(v.current),x=()=>(g.current.modalRef=E.current,g.current.mount=v.current,g.current),N=()=>{i.mount(x(),{disableScrollLock:r}),E.current&&(E.current.scrollTop=0)},k=Ui(()=>{const J=BK(e)||P().body;i.add(x(),J),E.current&&N()}),V=T.useCallback(()=>i.isTopModal(x()),[i]),L=Ui(J=>{v.current=J,J&&(h&&V()?N():E.current&&$h(E.current,I))}),F=T.useCallback(()=>{i.remove(x(),I)},[I,i]);T.useEffect(()=>()=>{F()},[F]),T.useEffect(()=>{h?k():(!C||!s)&&F()},[h,F,C,s,k]);const K=J=>Z=>{var B;(B=J.onKeyDown)==null||B.call(J,Z),!(Z.key!=="Escape"||Z.which===229||!V())&&(n||(Z.stopPropagation(),d&&d(Z,"escapeKeyDown")))},ne=J=>Z=>{var B;(B=J.onClick)==null||B.call(J,Z),Z.target===Z.currentTarget&&d&&d(Z,"backdropClick")};return{getRootProps:(J={})=>{const Z=hv(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const B=O({},Z,J);return O({role:"presentation"},B,{onKeyDown:K(B),ref:S})},getBackdropProps:(J={})=>{const Z=J;return O({"aria-hidden":!0},Z,{onClick:ne(Z),open:h})},getTransitionProps:()=>{const J=()=>{b(!1),o&&o()},Z=()=>{b(!0),l&&l(),s&&F()};return{onEnter:TT(J,c?.props.onEnter),onExited:TT(Z,c?.props.onExited)}},rootRef:S,portalRef:L,isTopModal:V,exited:w,hasTransition:C}}var li="top",Qi="bottom",Yi="right",ui="left",AI="auto",tm=[li,Qi,Yi,ui],nd="start",dp="end",HK="clippingParents",VL="viewport",Gf="popper",GK="reference",bP=tm.reduce(function(t,e){return t.concat([e+"-"+nd,e+"-"+dp])},[]),FL=[].concat(tm,[AI]).reduce(function(t,e){return t.concat([e,e+"-"+nd,e+"-"+dp])},[]),KK="beforeRead",QK="read",YK="afterRead",JK="beforeMain",XK="main",ZK="afterMain",e7="beforeWrite",t7="write",n7="afterWrite",r7=[KK,QK,YK,JK,XK,ZK,e7,t7,n7];function Ks(t){return t?(t.nodeName||"").toLowerCase():null}function Ri(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ru(t){var e=Ri(t).Element;return t instanceof e||t instanceof Element}function Hi(t){var e=Ri(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function PI(t){if(typeof ShadowRoot>"u")return!1;var e=Ri(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function i7(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},s=e.elements[n];
vendor: 16,154 bytes, line 164
164!Hi(s)||!Ks(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var l=i[o];l===!1?s.removeAttribute(o):s.setAttribute(o,l===!0?"":l)}))})}function s7(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=o.reduce(function(c,d){return c[d]="",c},{});!Hi(i)||!Ks(i)||(Object.assign(i.style,l),Object.keys(s).forEach(function(c){i.removeAttribute(c)}))})}}const o7={name:"applyStyles",enabled:!0,phase:"write",fn:i7,effect:s7,requires:["computeStyles"]};function zs(t){return t.split("-")[0]}var Kl=Math.max,pv=Math.min,rd=Math.round;function NT(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function $L(){return!/^((?!chrome|android).)*safari/i.test(NT())}function id(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,s=1;e&&Hi(t)&&(i=t.offsetWidth>0&&rd(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&rd(r.height)/t.offsetHeight||1);var o=ru(t)?Ri(t):window,l=o.visualViewport,c=!$L()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,h=(r.top+(c&&l?l.offsetTop:0))/s,m=r.width/i,g=r.height/s;return{width:m,height:g,top:h,right:d+m,bottom:h+g,left:d,x:d,y:h}}function OI(t){var e=id(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function UL(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&PI(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xo(t){return Ri(t).getComputedStyle(t)}function a7(t){return["table","td","th"].indexOf(Ks(t))>=0}function Ja(t){return((ru(t)?t.ownerDocument:t.document)||window.document).documentElement}function k_(t){return Ks(t)==="html"?t:t.assignedSlot||t.parentNode||(PI(t)?t.host:null)||Ja(t)}function IP(t){return!Hi(t)||xo(t).position==="fixed"?null:t.offsetParent}function l7(t){var e=/firefox/i.test(NT()),n=/Trident/i.test(NT());if(n&&Hi(t)){var r=xo(t);if(r.position==="fixed")return null}var i=k_(t);for(PI(i)&&(i=i.host);Hi(i)&&["html","body"].indexOf(Ks(i))<0;){var s=xo(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function nm(t){for(var e=Ri(t),n=IP(t);n&&a7(n)&&xo(n).position==="static";)n=IP(n);return n&&(Ks(n)==="html"||Ks(n)==="body"&&xo(n).position==="static")?e:n||l7(t)||e}function NI(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Uh(t,e,n){return Kl(t,pv(e,n))}function u7(t,e,n){var r=Uh(t,e,n);return r>n?n:r}function jL(){return{top:0,right:0,bottom:0,left:0}}function BL(t){return Object.assign({},jL(),t)}function zL(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var c7=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,BL(typeof e!="number"?e:zL(e,tm))};function d7(t){var e,n=t.state,r=t.name,i=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,l=zs(n.placement),c=NI(l),d=[ui,Yi].indexOf(l)>=0,h=d?"height":"width";if(!(!s||!o)){var m=c7(i.padding,n),g=OI(s),v=c==="y"?li:ui,E=c==="y"?Qi:Yi,S=n.rects.reference[h]+n.rects.reference[c]-o[c]-n.rects.popper[h],w=o[c]-n.rects.reference[c],b=nm(s),C=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,I=S/2-w/2,P=m[v],x=C-g[h]-m[E],N=C/2-g[h]/2+I,k=Uh(P,N,x),V=c;n.modifiersData[r]=(e={},e[V]=k,e.centerOffset=k-N,e)}}function f7(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||UL(e.elements.popper,i)&&(e.elements.arrow=i))}const h7={name:"arrow",enabled:!0,phase:"main",fn:d7,effect:f7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function sd(t){return t.split("-")[1]}var p7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function m7(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:rd(n*i)/i||0,y:rd(r*i)/i||0}}function RP(t){var e,n=t.popper,r=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,l=t.position,c=t.gpuAcceleration,d=t.adaptive,h=t.roundOffsets,m=t.isFixed,g=o.x,v=g===void 0?0:g,E=o.y,S=E===void 0?0:E,w=typeof h=="function"?h({x:v,y:S}):{x:v,y:S};v=w.x,S=w.y;var b=o.hasOwnProperty("x"),C=o.hasOwnProperty("y"),I=ui,P=li,x=window;if(d){var N=nm(n),k="clientHeight",V="clientWidth";if(N===Ri(n)&&(N=Ja(n),xo(N).position!=="static"&&l==="absolute"&&(k="scrollHeight",V="scrollWidth")),N=N,i===li||(i===ui||i===Yi)&&s===dp){P=Qi;var L=m&&N===x&&x.visualViewport?x.visualViewport.height:N[k];S-=L-r.height,S*=c?1:-1}if(i===ui||(i===li||i===Qi)&&s===dp){I=Yi;var F=m&&N===x&&x.visualViewport?x.visualViewport.width:N[V];v-=F-r.width,v*=c?1:-1}}var K=Object.assign({position:l},d&&p7),ne=h===!0?m7({x:v,y:S},Ri(n)):{x:v,y:S};if(v=ne.x,S=ne.y,c){var Q;return Object.assign({},K,(Q={},Q[P]=C?"0":"",Q[I]=b?"0":"",Q.transform=(x.devicePixelRatio||1)<=1?"translate("+v+"px, "+S+"px)":"translate3d("+v+"px, "+S+"px, 0)",Q))}return Object.assign({},K,(e={},e[P]=C?S+"px":"",e[I]=b?v+"px":"",e.transform="",e))}function g7(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:zs(e.placement),variation:sd(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,RP(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,RP(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const y7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g7,data:{}};var iy={passive:!0};function v7(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,l=o===void 0?!0:o,c=Ri(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&d.forEach(function(h){h.addEventListener("scroll",n.update,iy)}),l&&c.addEventListener("resize",n.update,iy),function(){s&&d.forEach(function(h){h.removeEventListener("scroll",n.update,iy)}),l&&c.removeEventListener("resize",n.update,iy)}}const _7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:v7,data:{}};var w7={left:"right",right:"left",bottom:"top",top:"bottom"};function Vy(t){return t.replace(/left|right|bottom|top/g,function(e){return w7[e]})}var E7={start:"end",end:"start"};function xP(t){return t.replace(/start|end/g,function(e){return E7[e]})}function DI(t){var e=Ri(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function MI(t){return id(Ja(t)).left+DI(t).scrollLeft}function S7(t,e){var n=Ri(t),r=Ja(t),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,l=0,c=0;if(i){s=i.width,o=i.height;var d=$L();(d||!d&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:l+MI(t),y:c}}function T7(t){var e,n=Ja(t),r=DI(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=Kl(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Kl(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+MI(t),c=-r.scrollTop;return xo(i||n).direction==="rtl"&&(l+=Kl(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:l,y:c}}function LI(t){var e=xo(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function WL(t){return["html","body","#document"].indexOf(Ks(t))>=0?t.ownerDocument.body:Hi(t)&&LI(t)?t:WL(k_(t))}function jh(t,e){var n;e===void 0&&(e=[]);var r=WL(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=Ri(r),o=i?[s].concat(s.visualViewport||[],LI(r)?r:[]):r,l=e.concat(o);return i?l:l.concat(jh(k_(o)))}function DT(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function b7(t,e){var n=id(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function kP(t,e,n){return e===VL?DT(S7(t,n)):ru(e)?b7(e,n):DT(T7(Ja(t)))}function I7(t){var e=jh(k_(t)),n=["absolute","fixed"].indexOf(xo(t).position)>=0,r=n&&Hi(t)?nm(t):t;return ru(r)?e.filter(function(i){return ru(i)&&UL(i,r)&&Ks(i)!=="body"}):[]}function R7(t,e,n,r){var i=e==="clippingParents"?I7(t):[].concat(e),s=[].concat(i,[n]),o=s[0],l=s.reduce(function(c,d){var h=kP(t,d,r);return c.top=Kl(h.top,c.top),c.right=pv(h.right,c.right),c.bottom=pv(h.bottom,c.bottom),c.left=Kl(h.left,c.left),c},kP(t,o,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function qL(t){var e=t.reference,n=t.element,r=t.placement,i=r?zs(r):null,s=r?sd(r):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,c;switch(i){case li:c={x:o,y:e.y-n.height};break;case Qi:c={x:o,y:e.y+e.height};break;case Yi:c={x:e.x+e.width,y:l};break;case ui:c={x:e.x-n.width,y:l};break;default:c={x:e.x,y:e.y}}var d=i?NI(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(s){case nd:c[d]=c[d]-(e[h]/2-n[h]/2);break;case dp:c[d]=c[d]+(e[h]/2-n[h]/2);break}}return c}function fp(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,s=n.strategy,o=s===void 0?t.strategy:s,l=n.boundary,c=l===void 0?HK:l,d=n.rootBoundary,h=d===void 0?VL:d,m=n.elementContext,g=m===void 0?Gf:m,v=n.altBoundary,E=v===void 0?!1:v,S=n.padding,w=S===void 0?0:S,b=BL(typeof w!="number"?w:zL(w,tm)),C=g===Gf?GK:Gf,I=t.rects.popper,P=t.elements[E?C:g],x=R7(ru(P)?P:P.contextElement||Ja(t.elements.popper),c,h,o),N=id(t.elements.reference),k=qL({reference:N,element:I,placement:i}),V=DT(Object.assign({},I,k)),L=g===Gf?V:N,F={top:x.top-L.top+b.top,bottom:L.bottom-x.bottom+b.bottom,left:x.left-L.left+b.left,right:L.right-x.right+b.right},K=t.modifiersData.offset;if(g===Gf&&K){var ne=K[i];Object.keys(F).forEach(function(Q){var X=[Yi,Qi].indexOf(Q)>=0?1:-1,ee=[li,Qi].indexOf(Q)>=0?"y":"x";F[Q]+=ne[ee]*X})}return F}function x7(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?FL:c,h=sd(r),m=h?l?bP:bP.filter(function(E){return sd(E)===h}):tm,g=m.filter(function(E){return d.indexOf(E)>=0});g.length===0&&(g=m);var v=g.reduce(function(E,S){return E[S]=fp(t,{placement:S,boundary:i,rootBoundary:s,padding:o})[zs(S)],E},{});return Object.keys(v).sort(function(E,S){return v[E]-v[S]})}function k7(t){if(zs(t)===AI)return[];var e=Vy(t);return[xP(t),e,xP(e)]}function C7(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!0:o,c=n.fallbackPlacements,d=n.padding,h=n.boundary,m=n.rootBoundary,g=n.altBoundary,v=n.flipVariations,E=v===void 0?!0:v,S=n.allowedAutoPlacements,w=e.options.placement,b=zs(w),C=b===w,I=c||(C||!E?[Vy(w)]:k7(w)),P=[w].concat(I).reduce(function(ue,Ee){return ue.concat(zs(Ee)===AI?x7(e,{placement:Ee,boundary:h,rootBoundary:m,padding:d,flipVariations:E,allowedAutoPlacements:S}):Ee)},[]),x=e.rects.reference,N=e.rects.popper,k=new Map,V=!0,L=P[0],F=0;F<P.length;F++){var K=P[F],ne=zs(K),Q=sd(K)===nd,X=[li,Qi].indexOf(ne)>=0,ee=X?"width":"height",J=fp(e,{placement:K,boundary:h,rootBoundary:m,altBoundary:g,padding:d}),Z=X?Q?Yi:ui:Q?Qi:li;x[ee]>N[ee]&&(Z=Vy(Z));var B=Vy(Z),te=[];if(s&&te.push(J[ne]<=0),l&&te.push(J[Z]<=0,J[B]<=0),te.every(function(ue){return ue})){L=K,V=!1;break}k.set(K,te)}if(V)for(var M=E?3:1,G=function(Ee){var fe=P.find(function(Re){var Se=k.get(Re);if(Se)return Se.slice(0,Ee).every(function(Me){return Me})});if(fe)return L=fe,"break"},ae=M;ae>0;ae--){var pe=G(ae);if(pe==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const A7={name:"flip",enabled:!0,phase:"main",fn:C7,requiresIfExists:["offset"],data:{_skip:!1}};function CP(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function AP(t){return[li,Yi,Qi,ui].some(function(e){return t[e]>=0})}function P7(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=fp(e,{elementContext:"reference"}),l=fp(e,{altBoundary:!0}),c=CP(o,r),d=CP(l,i,s),h=AP(c),m=AP(d);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const O7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:P7};function N7(t,e,n){var r=zs(t),i=[ui,li].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=s[0],l=s[1];return o=o||0,l=(l||0)*i,[ui,Yi].indexOf(r)>=0?{x:l,y:o}:{x:o,y:l}}function D7(t){var e=t.state,n=t.options,r=t.name,i=n.offset,s=i===void 0?[0,0]:i,o=FL.reduce(function(h,m){return h[m]=N7(m,e.rects,s),h},{}),l=o[e.placement],c=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=o}const M7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:D7};function L7(t){var e=t.state,n=t.name;e.modifiersData[n]=qL({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const V7={name:"popperOffsets",enabled:!0,phase:"read",fn:L7,data:{}};function F7(t){return t==="x"?"y":"x"}function $7(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!1:o,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,m=n.padding,g=n.tether,v=g===void 0?!0:g,E=n.tetherOffset,S=E===void 0?0:E,w=fp(e,{boundary:c,rootBoundary:d,padding:m,altBoundary:h}),b=zs(e.placement),C=sd(e.placement),I=!C,P=NI(b),x=F7(P),N=e.modifiersData.popperOffsets,k=e.rects.reference,V=e.rects.popper,L=typeof S=="function"?S(Object.assign({},e.rects,{placement:e.placement})):S,F=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),K=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ne={x:0,y:0};if(N){if(s){var Q,X=P==="y"?li:ui,ee=P==="y"?Qi:Yi,J=P==="y"?"height":"width",Z=N[P],B=Z+w[X],te=Z-w[ee],M=v?-V[J]/2:0,G=C===nd?k[J]:V[J],ae=C===nd?-V[J]:-k[J],pe=e.elements.arrow,ue=v&&pe?OI(pe):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:jL(),fe=Ee[X],Re=Ee[ee],Se=Uh(0,k[J],ue[J]),Me=I?k[J]/2-M-Se-fe-F.mainAxis:G-Se-fe-F.mainAxis,kt=I?-k[J]/2+M+Se+Re+F.mainAxis:ae+Se+Re+F.mainAxis,Ue=e.elements.arrow&&nm(e.elements.arrow),Qe=Ue?P==="y"?Ue.clientTop||0:Ue.clientLeft||0:0,Ne=(Q=K?.[P])!=null?Q:0,We=Z+Me-Ne-Qe,qe=Z+kt-Ne,Nn=Uh(v?pv(B,We):B,Z,v?Kl(te,qe):te);N[P]=Nn,ne[P]=Nn-Z}if(l){var Yt,Jt=P==="x"?li:ui,Tn=P==="x"?Qi:Yi,_t=N[x],Je=x==="y"?"height":"width",mn=_t+w[Jt],jt=_t-w[Tn],at=[li,ui].indexOf(b)!==-1,bn=(Yt=K?.[x])!=null?Yt:0,Dn=at?mn:_t-k[Je]-V[Je]-bn+F.altAxis,Mn=at?_t+k[Je]+V[Je]-bn-F.altAxis:jt,et=v&&at?u7(Dn,_t,Mn):Uh(v?Dn:mn,_t,v?Mn:jt);N[x]=et,ne[x]=et-_t}e.modifiersData[r]=ne}}const U7={name:"preventOverflow",enabled:!0,phase:"main",fn:$7,requiresIfExists:["offset"]};function j7(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function B7(t){return t===Ri(t)||!Hi(t)?DI(t):j7(t)}function z7(t){var e=t.getBoundingClientRect(),n=rd(e.width)/t.offsetWidth||1,r=rd(e.height)/t.offsetHeight||1;return n!==1||r!==1}function W7(t,e,n){n===void 0&&(n=!1);var r=Hi(e),i=Hi(e)&&z7(e),s=Ja(e),o=id(t,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};
vendor: 4,216 bytes, line 164
164return(r||!r&&!n)&&((Ks(e)!=="body"||LI(s))&&(l=B7(e)),Hi(e)?(c=id(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):s&&(c.x=MI(s))),{x:o.left+l.scrollLeft-c.x,y:o.top+l.scrollTop-c.y,width:o.width,height:o.height}}function q7(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var c=e.get(l);c&&i(c)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||i(s)}),r}function H7(t){var e=q7(t);return r7.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function G7(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function K7(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var PP={placement:"bottom",modifiers:[],strategy:"absolute"};function OP(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Q7(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,s=i===void 0?PP:i;return function(l,c,d){d===void 0&&(d=s);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},PP,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},m=[],g=!1,v={state:h,setOptions:function(b){var C=typeof b=="function"?b(h.options):b;S(),h.options=Object.assign({},s,h.options,C),h.scrollParents={reference:ru(l)?jh(l):l.contextElement?jh(l.contextElement):[],popper:jh(c)};var I=H7(K7([].concat(r,h.options.modifiers)));return h.orderedModifiers=I.filter(function(P){return P.enabled}),E(),v.update()},forceUpdate:function(){if(!g){var b=h.elements,C=b.reference,I=b.popper;if(OP(C,I)){h.rects={reference:W7(C,nm(I),h.options.strategy==="fixed"),popper:OI(I)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(F){return h.modifiersData[F.name]=Object.assign({},F.data)});for(var P=0;P<h.orderedModifiers.length;P++){if(h.reset===!0){h.reset=!1,P=-1;continue}var x=h.orderedModifiers[P],N=x.fn,k=x.options,V=k===void 0?{}:k,L=x.name;typeof N=="function"&&(h=N({state:h,options:V,name:L,instance:v})||h)}}}},update:G7(function(){return new Promise(function(w){v.forceUpdate(),w(h)})}),destroy:function(){S(),g=!0}};if(!OP(l,c))return v;v.setOptions(d).then(function(w){!g&&d.onFirstUpdate&&d.onFirstUpdate(w)});function E(){h.orderedModifiers.forEach(function(w){var b=w.name,C=w.options,I=C===void 0?{}:C,P=w.effect;if(typeof P=="function"){var x=P({state:h,name:b,instance:v,options:I}),N=function(){};m.push(x||N)}})}function S(){m.forEach(function(w){return w()}),m=[]}return v}}var Y7=[_7,V7,y7,o7,M7,A7,U7,h7,O7],J7=Q7({defaultModifiers:Y7});const X7="Popper";function Z7(t){return RK(X7,t)}const eQ=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],tQ=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function nQ(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function MT(t){return typeof t=="function"?t():t}function rQ(t){return t.nodeType!==void 0}const iQ=()=>rt({root:["root"]},G8(Z7)),sQ={},oQ=T.forwardRef(function(e,n){var r;const{anchorEl:i,children:s,direction:o,disablePortal:l,modifiers:c,open:d,placement:h,popperOptions:m,popperRef:g,slotProps:v={},slots:E={},TransitionProps:S}=e,w=ve(e,eQ),b=T.useRef(null),C=wn(b,n),I=T.useRef(null),P=wn(I,g),x=T.useRef(P);Gi(()=>{x.current=P},[P]),T.useImperativeHandle(g,()=>I.current,[]);const N=nQ(h,o),[k,V]=T.useState(N),[L,F]=T.useState(MT(i));T.useEffect(()=>{I.current&&I.current.forceUpdate()}),T.useEffect(()=>{i&&F(MT(i))},[i]),Gi(()=>
164{if(!L||!d)return;const ee=B=>{V(B.placement)};let J=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:B})=>{ee(B)}}];c!=null&&(J=J.concat(c)),m&&m.modifiers!=null&&(J=J.concat(m.modifiers));const Z=J7(L,b.current,O({placement:N},m,{modifiers:J}));return x.current(Z),()=>{Z.destroy(),x.current(null)}},[L,l,c,d,m,N]);const K={placement:k};S!==null&&(K.TransitionProps=S);const ne=iQ(),Q=(r=E.root)!=null?r:"div",X=La({elementType:Q,externalSlotProps:v.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:C},ownerState:e,className:ne.root});return A.jsx(Q,O({},X,{children:typeof s=="function"?s(K):s}))}),aQ=T.forwardRef(function(e,n){const{anchorEl:r,children:i,container:s,direction:o="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:h,placement:m="bottom",popperOptions:g=sQ,popperRef:v,style:E,transition:S=!1,slotProps:w={},slots:b={}}=e,C=ve(e,tQ),[I,P]=T.useState(!0),x=()=>{P(!1)},N=()=>{P(!0)};if(!c&&!h&&(!S||I))return null;let k;if(s)k=s;else if(r){const F=MT(r);k=F&&rQ(F)?$n(F).body:$n(null).body}const V=!h&&c&&(!S||I)?"none":void 0,L=S?{in:h,onEnter:x,onExited:N}:void 0;return A.jsx(LL,{disablePortal:l,container:k,children:A.jsx(oQ,O({anchorEl:r,direction:o,disablePortal:l,modifiers:d,ref:n,open:S?!I:h,placement:m,popperOptions:g,popperRef:v,slotProps:w,slots:b},C,{style:O({position:"fixed",top:0,left:0,display:V},E),TransitionProps:L,children:i}))})});function lQ(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:s}=t,o=Fl();T.useEffect(()=>{if(!i)return;function b(C){C.defaultPrevented||(C.key==="Escape"||C.key==="Esc")&&r?.(C,"escapeKeyDown")}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const l=Ui((b,C)=>{r?.(b,C)}),c=Ui(b=>{!r||b==null||o.start(b,()=>{l(null,"timeout")})});T.useEffect(()=>(i&&c(e),o.clear),[i,e,c,o]);const d=b=>{r?.(b,"clickaway")},h=o.clear,m=T.useCallback(()=>{e!=null&&c(s??e*.5)},[e,s,c]),g=b=>C=>{const I=b.onBlur;
164I?.(C),m()},v=b=>C=>{const I=b.onFocus;I?.(C),h()},E=b=>C=>{const I=b.onMouseEnter;I?.(C),h()},S=b=>C=>{const I=b.onMouseLeave;I?.(C),m()};return T.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}},[n,i,m,h]),{getRootProps:(b={})=>{const C=O({},hv(t),hv(b));return O({role:"presentation"},b,C,{onBlur:g(C),onFocus:v(C),onMouseEnter:E(C),onMouseLeave:S(C)})},onClickAway:d}}const uQ=["onChange","maxRows","minRows","style","value"];function sy(t){return parseInt(t,10)||0}const cQ={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function dQ(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const fQ=T.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:s=1,style:o,value:l}=e,c=ve(e,uQ),{current:d}=T.useRef(l!=null),h=T.useRef(null),m=wn(n,h),g=T.useRef(null),v=T.useCallback(()=>{const w=h.current,C=Ma(w).getComputedStyle(w);if(C.width==="0px")return{outerHeightStyle:0,overflowing:!1};const I=g.current;I.style.width=C.width,I.value=w.value||e.placeholder||"x",I.value.slice(-1)===`
165`&&(I.value+=" ");const P=C.boxSizing,x=sy(C.paddingBottom)+sy(C.paddingTop),N=sy(C.borderBottomWidth)+sy(C.borderTopWidth),k=I.scrollHeight;I.value="x";const V=I.scrollHeight;let L=k;s&&(L=Math.max(Number(s)*V,L)),i&&(L=Math.min(Number(i)*V,L)),L=Math.max(L,V);const F=L+(P==="border-box"?x+N:0),K=Math.abs(L-k)<=1;return{outerHeightStyle:F,overflowing:K}},[i,s,e.placeholder]),E=T.useCallback(()=>{const w=v();if(dQ(w))return;const b=h.current;b.style.height=`${w.outerHeightStyle}px`,b.style.overflow=w.overflowing?"hidden":""},[v]);Gi(()=>{const w=()=>{E()};let b;const C=lI(w),I=h.current,P=Ma(I);P.addEventListener("resize",C);let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(w),x.observe(I)),()=>{C.clear(),cancelAnimationFrame(b),P.removeEventListener("resize",C),x&&x.disconnect()}},[v,E]),Gi(()=>{E()});const S=w=>{d||E(),r&&r(w)};return A.jsxs(T.Fragment,{children:[A.jsx("textarea",O({value:l,onChange:S,ref:m,rows:s,style:o},c)),A.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:g,tabIndex:-1,style:O({},cQ.shadow,o,{paddingTop:0,paddingBottom:0})})]})});var Kf={},NP;function hQ(){if(NP)return Kf;NP=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.default=void 0;var t=r(Hp()),e=wL;function n(o){if(typeof WeakMap!="function")return null;var l=new WeakMap,c=new WeakMap;return(n=function(d){return d?c:l})(o)}function r(o,l){if(o&&o.__esModule)return o;if(o===null||typeof o!="object"&&typeof o!="function")return{default:o};var c=n(l);if(c&&c.has(o))return c.get(o);var d={__proto__:null},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in o)if(m!=="default"&&Object.prototype.hasOwnProperty.call(o,m)){var g=h?Object.getOwnPropertyDescriptor(o,m):null;g&&(g.get||g.set)?Object.defineProperty(d,m,g):d[m]=o[m]}return d.default=o,c&&c.set(o,d),d}function i(o){return Object.keys(o).length===0}function s(o=null){const l=t.useContext(e.ThemeContext);return!l||i(l)?o:l}return Kf.default=s,Kf}var pQ=hQ();const mQ=Pr(pQ),gQ=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],yQ=_e(aQ,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),HL=T.forwardRef(function(e,n){var r;const i=mQ(),s=ot({props:e,name:"MuiPopper"}),{anchorEl:o,component:l,components:c,componentsProps:d,container:h,disablePortal:m,keepMounted:g,modifiers:v,open:E,placement:S,popperOptions:w,popperRef:b,transition:C,slots:I,slotProps:P}=s,x=ve(s,gQ),N=(r=I?.root)!=null?r:c?.Root,k=O({anchorEl:o,container:h,disablePortal:m,keepMounted:g,modifiers:v,open:E,placement:S,popperOptions:w,popperRef:b,transition:C},x);return A.jsx(yQ,O({as:l,direction:i?.direction,slots:{root:N},slotProps:P??d},k,{ref:n}))});function Od({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const C_=T.createContext(void 0);function bu(){return T.useContext(C_)}function vQ(t){return A.jsx(l8,O({},t,{defaultTheme:T_,themeId:tu}))}function DP(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function mv(t,e=!1){return t&&(DP(t.value)&&t.value!==""||e&&DP(t.defaultValue)&&t.defaultValue!=="")}function _Q(t){return t.startAdornment}function wQ(t){return it("MuiInputBase",t)}const od=Ze("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),EQ=["aria-describedby","autoComplete","autoF
165ocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],A_=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${Ie(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},P_=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},SQ=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:s,focused:o,formControl:l,fullWidth:c,hiddenLabel:d,multiline:h,readOnly:m,size:g,startAdornment:v,type:E}=t,S={root:["root",`color${Ie(n)}`,r&&"disabled",i&&"error",c&&"fullWidth",o&&"focused",l&&"formControl",g&&g!=="medium"&&`size${Ie(g)}`,h&&"multiline",v&&"adornedStart",s&&"adornedEnd",d&&"hiddenLabel",m&&"readOnly"],input:["input",r&&"disabled",E==="search"&&"inputTypeSearch",h&&"inputMultiline",g==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",v&&"inputAdornedStart",s&&"inputAdornedEnd",m&&"readOnly"]};return rt(S,wQ,e)},O_=_e("div",{name:"MuiInputBase",slot:"Root",overridesResolver:A_})(({theme:t,ownerState:e})=>O({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${od.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&O({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),N_=_e("input",{name:"MuiInputBase",slot:"Input",overridesResolver:P_})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=O({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return O({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${od.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${od.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),TQ=A.jsx(vQ,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),D_=T.forwardRef(function(e,n){var r;const i=ot({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:o,autoFocus:l,className:c,components:d={},componentsProps:h={},defaultValue:m,disabled:g,disableInjectingGlobalStyles:v,endAdornment:E,fullWidth:S=!1,id:w,inputComponent:b="input",inputProps:C={},inputRef:I,maxRows:P,minRows:x,multiline:N=!1,name:k,onBlur:V,onChange:L,onClick:F,onFocus:K,onKeyDown:ne,onKeyUp:Q,placeholder:X,readOnly:ee,render
165Suffix:J,rows:Z,slotProps:B={},slots:te={},startAdornment:M,type:G="text",value:ae}=i,pe=ve(i,EQ),ue=C.value!=null?C.value:ae,{current:Ee}=T.useRef(ue!=null),fe=T.useRef(),Re=T.useCallback(et=>{},[]),Se=wn(fe,I,C.ref,Re),[Me,kt]=T.useState(!1),Ue=bu(),Qe=Od({props:i,muiFormControl:Ue,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Qe.focused=Ue?Ue.focused:Me,T.useEffect(()=>{!Ue&&g&&Me&&(kt(!1),V&&V())},[Ue,g,Me,V]);const Ne=Ue&&Ue.onFilled,We=Ue&&Ue.onEmpty,qe=T.useCallback(et=>{mv(et)?Ne&&Ne():We&&We()},[Ne,We]);Gi(()=>{Ee&&qe({value:ue})},[ue,qe,Ee]);const Nn=et=>{if(Qe.disabled){et.stopPropagation();return}K&&K(et),C.onFocus&&C.onFocus(et),Ue&&Ue.onFocus?Ue.onFocus(et):kt(!0)},Yt=et=>{V&&V(et),C.onBlur&&C.onBlur(et),Ue&&Ue.onBlur?Ue.onBlur(et):kt(!1)},Jt=(et,...Le)=>{if(!Ee){const Nt=et.target||fe.current;if(Nt==null)throw new Error(Hs(1));qe({value:Nt.value})}C.onChange&&C.onChange(et,...Le),L&&L(et,...Le)};T.useEffect(()=>{qe(fe.current)},[]);const Tn=et=>{fe.current&&et.currentTarget===et.target&&fe.current.focus(),F&&F(et)};let _t=b,Je=C;N&&_t==="input"&&(Z?Je=O({type:void 0,minRows:Z,maxRows:Z},Je):Je=O({type:void 0,maxRows:P,minRows:x},Je),_t=fQ);const mn=et=>{qe(et.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};T.useEffect(()=>{Ue&&Ue.setAdornedStart(!!M)},[Ue,M]);const jt=O({},i,{color:Qe.color||"primary",disabled:Qe.disabled,endAdornment:E,error:Qe.error,focused:Qe.focused,formControl:Ue,fullWidth:S,hiddenLabel:Qe.hiddenLabel,multiline:N,size:Qe.size,startAdornment:M,type:G}),at=SQ(jt),bn=te.root||d.Root||O_,Dn=B.root||h.root||{},Mn=te.input||d.Input||N_;return Je=O({},Je,(r=B.input)!=null?r:h.input),A.jsxs(T.Fragment,{children:[!v&&TQ,A.jsxs(bn,O({},Dn,!fv(bn)&&{ownerState:O({},jt,Dn.ownerState)},{ref:n,onClick:Tn},pe,{className:Ve(at.root,Dn.className,c,ee&&"MuiInputBase-readOnly"),children:[M,A.jsx(C_.Provider,{value:null,children:A.jsx(Mn,O({ownerState:jt,"aria-invalid":Qe.error,"aria-describedby":s,autoComplete:o,autoFocus:l,defaultValue:m,disabled:Qe.disabled,id:w,onAnimationStart:mn,name:k,placeholder:X,readOnly:ee,required:Qe.required,rows:Z,value:ue,onKeyDown:ne,onKeyUp:Q,type:G},Je,!fv(Mn)&&{as:_t,ownerState:O({},jt,Je.ownerState)},{ref:Se,className:Ve(at.input,Je.className,ee&&"MuiInputBase-readOnly"),onBlur:Yt,onChange:Jt,onFocus:Nn}))}),E,J?J(O({},Qe,{startAdornment:M})):null]}))]})});function bQ(t){return it("MuiInput",t)}const Qf=O({},od,Ze("MuiInput",["root","underline","input"]));function IQ(t){return it("MuiOutlinedInput",t)}const la=O({},od,Ze("MuiOutlinedInput",["root","notchedOutline","input"]));function RQ(t){return it("MuiFilledInput",t)}const bl=O({},od,Ze("MuiFilledInput",["root","underline","input"])),xQ=II(A.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),kQ=II(A.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function CQ(t){return it("MuiAvatar",t)}Ze("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const AQ=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],PQ=D8(),OQ=t=>{const{classes:e,variant:n,colorDefault:r}=t;return rt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},CQ,e)},NQ=_e("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],n.colorDefault&&e.colorDefault]}})(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:O({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:O({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]})),DQ=_e("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(t,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),MQ=_e(kQ,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(t,e)=>e.fallback})({width:"75%",height:"75%"});function LQ({crossOrigin:t,referrerPolicy:e,src:n,srcSet:r}){const[i,s]=T.useState(!1);return T.useEffect(()=>{if(!n&&!r)return;s(!1);let o=!0;const l=new Image;return l.onload=()=>{o&&s("loaded")},l.onerror=()=>{o&&s("error")},l.crossOrigin=t,l.referrerPolicy=e,l.src=n,r&&(l.srcset=r),()=>{o=!1}},[t,e,n,r]),i}const VQ=T.forwardRef(function(e,n){const r=PQ({props:e,name:"MuiAvatar"}),{alt:i,children:s,className:o,component:l="div",slots:c={},slotProps:d={},imgProps:h,sizes:m,src:g,srcSet:v,variant:E="circular"}=r,S=ve(r,AQ);let w=null;const b=LQ(O({},h,{src:g,srcSet:v})),C=g||v,I=C&&b!=="error",P=O({},r,{colorDefault:!I,component:l,variant:E}),x=OQ(P),[N,k]=X8("img",{className:x.img,elementType:DQ,externalForwardedProps:{slots:c,slotProps:{img:O({},h,d.img)}},additionalProps:{alt:i,src:g,srcSet:v,sizes:m},ownerState:P});return I?w=A.jsx(N,O({},k)):s||s===0?w=s:C&&i?w=i[0]:w=A.jsx(MQ,{ownerState:P,className:x.fallback}),A.jsx(NQ,O({as:l,ownerState:P,className:Ve(x.root,o),ref:n},S,{children:w}))}),FQ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],$Q={entering:{opacity:1},entered:{opacity:1}},GL=T.forwardRef(function(e,n){const r=Or(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:l,easing:c,in:d,onEnter:h,onEntered:m,onEntering:g,onExit:v,onExited:E,onExiting:S,style:w,timeout:b=i,TransitionComponent:C=ro}=e,I=ve(e,FQ),P=T.useRef(null),x=wn(P,l.ref,n),N=X=>ee=>{if(X){const J=P.current;ee===void 0?X(J):X(J,ee)}},k=N(g),V=N((X,ee)=>{AL(X);const J=dv({style:w,timeout:b,easing:c},{mode:"enter"});X.style.webkitTransition=r.transitions.create("opacity",J),X.style.transition=r.transitions.create("opacity",J),h&&h(X,ee)}),L=N(m),F=N(S),K=N(X=>{const ee=dv({style:w,timeout:b,easing:c},{mode:"exit"});X.style.webkitTransition=r.transitions.create("opacity",ee),X.style.transition=r.transitions.create("opacity",ee),v&&v(X)}),ne=N(E),Q=X=>{s&&s(P.current,X)};return A.jsx(C,O({appear:o,in:d,nodeRef:P,onEnter:V,onEntered:L,onEntering:k,onExit:K,onExited:ne,onExiting:F,addEndListener:Q,timeout:b},I,{children:(X,ee)=>T.cloneElement(l,O({style:O({opacity:0,visibility:X==="exited"&&!d?"hidden":void 0},$Q[X],w,l.props.style),ref:x},ee))}))});function UQ(t){return it("MuiBackdrop",t)}Ze("MuiBackdrop",["root","invisible"]);const jQ=["children","className","component","components","componentsProps","invisible","open","slotProps","
165slots","TransitionComponent","transitionDuration"],BQ=t=>{const{classes:e,invisible:n}=t;return rt({root:["root",n&&"invisible"]},UQ,e)},zQ=_e("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>O({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),KL=T.forwardRef(function(e,n){var r,i,s;const o=ot({props:e,name:"MuiBackdrop"}),{children:l,className:c,component:d="div",components:h={},componentsProps:m={},invisible:g=!1,open:v,slotProps:E={},slots:S={},TransitionComponent:w=GL,transitionDuration:b}=o,C=ve(o,jQ),I=O({},o,{component:d,invisible:g}),P=BQ(I),x=(r=E.root)!=null?r:m.root;return A.jsx(w,O({in:v,timeout:b},C,{children:A.jsx(zQ,O({"aria-hidden":!0},x,{as:(i=(s=S.root)!=null?s:h.Root)!=null?i:d,className:Ve(P.root,c,x?.className),ownerState:O({},I,x?.ownerState),classes:P,ref:n,children:l}))}))}),WQ=Ze("MuiBox",["root"]),qQ=bI(),An=c8({themeId:tu,defaultTheme:qQ,defaultClassName:WQ.root,generateClassName:cI.generate});function HQ(t){return it("MuiButton",t)}const oy=Ze("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),GQ=T.createContext({}),KQ=T.createContext(void 0),QQ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],YQ=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:s,classes:o}=t,l={root:["root",s,`${s}${Ie(e)}`,`size${Ie(i)}`,`${s}Size${Ie(i)}`,`color${Ie(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Ie(i)}`],endIcon:["icon","endIcon",`iconSize${Ie(i)}`]},c=rt(l,HQ,o);return O({},o,c)},QL=t=>O({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),JQ=_e(NL,{shouldForwardProp:t=>vs(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Ie(n.color)}`],e[`size${Ie(n.size)}`],e[`${n.variant}Size${Ie(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],s=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return O({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":O({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:zr.alpha(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zr.alpha(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}
165`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zr.alpha(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":O({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${oy.focusVisible}`]:O({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${oy.disabled}`]:O({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${zr.alpha(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${oy.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oy.disabled}`]:{boxShadow:"none"}}),XQ=_e("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${Ie(n.size)}`]]}})(({ownerState:t})=>O({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},QL(t))),ZQ=_e("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${Ie(n.size)}`]]}})(({ownerState:t})=>O({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},QL(t))),iu=T.forwardRef(function(e,n){const r=T.useContext(GQ),i=T.useContext(KQ),s=uI(r,e),o=ot({props:s,name:"MuiButton"}),{children:l,color:c="primary",component:d="button",className:h,disabled:m=!1,disableElevation:g=!1,disableFocusRipple:v=!1,endIcon:E,focusVisibleClassName:S,fullWidth:w=!1,size:b="medium",startIcon:C,type:I,variant:P="text"}=o,x=ve(o,QQ),N=O({},o,{color:c,component:d,disabled:m,disableElevation:g,disableFocusRipple:v,fullWidth:w,size:b,type:I,variant:P}),k=YQ(N),V=C&&A.jsx(XQ,{className:k.startIcon,ownerState:N,children:C}),L=E&&A.jsx(ZQ,{className:k.endIcon,ownerState:N,children:E}),F=i||"";return A.jsxs(JQ,O({ownerState:N,className:Ve(r.className,k.root,h,F),component:d,disabled:m,focusRipple:!v,focusVisibleClassName:Ve(k.focusVisible,S),ref:n,type:I},x,{classes:k,children:[V,l,L]}))});function eY(t){return it("MuiCircularProgress",t)}Ze("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const tY=["className","color","disableShrink","size","style","thickness","value","variant"];let M_=t=>t,MP,LP,VP,FP;const ua=44,nY=Pd(MP||(MP=M_`
166  0% {
167    transform: rotate(0deg);
168  }
169
170  100% {
171    transform: rotate(360deg);
172  }
173`)),rY=Pd(LP||(LP=M_`
174  0% {
175    stroke-dasharray: 1px, 200px;
176    stroke-dashoffset: 0;
177  }
178
179  50% {
180    stroke-dasharray: 100px, 200px;
181    stroke-dashoffset: -15px;
182  }
183
184  100% {
185    stroke-dasharray: 100px, 200px;
186    stroke-dashoffset: -125px;
187  }
188`)),iY=t=>{const{classes:e,variant:n,color:r,disableShrink:i}=t,s={root:["root",n,`color${Ie(r)}
188`],svg:["svg"],circle:["circle",`circle${Ie(n)}`,i&&"circleDisableShrink"]};return rt(s,eY,e)},sY=_e("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${Ie(n.color)}`]]}})(({ownerState:t,theme:e})=>O({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&w_(VP||(VP=M_`
189      animation: ${0} 1.4s linear infinite;
190    `),nY)),oY=_e("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),aY=_e("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Ie(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>O({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&w_(FP||(FP=M_`
191      animation: ${0} 1.4s ease-in-out infinite;
192    `),rY)),VI=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:o=!1,size:l=40,style:c,thickness:d=3.6,value:h=0,variant:m="indeterminate"}=r,g=ve(r,tY),v=O({},r,{color:s,disableShrink:o,size:l,thickness:d,value:h,variant:m}),E=iY(v),S={},w={},b={};if(m==="determinate"){const C=2*Math.PI*((ua-d)/2);S.strokeDasharray=C.toFixed(3),b["aria-valuenow"]=Math.round(h),S.strokeDashoffset=`${((100-h)/100*C).toFixed(3)}px`,w.transform="rotate(-90deg)"}return A.jsx(sY,O({className:Ve(E.root,i),style:O({width:l,height:l},w,c),ownerState:v,ref:n,role:"progressbar"},b,g,{children:A.jsx(oY,{className:E.svg,ownerState:v,viewBox:`${ua/2} ${ua/2} ${ua} ${ua}`,children:A.jsx(aY,{className:E.circle,style:S,ownerState:v,cx:ua,cy:ua,r:(ua-d)/2,fill:"none",strokeWidth:d})})}))});function lY(t){return it("MuiModal",t)}Ze("MuiModal",["root","hidden","backdrop"]);const uY=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],cY=t=>{const{open:e,exited:n,classes:r}=t;return rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},lY,r)},dY=_e("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>O({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),fY=_e(KL,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),YL=T.forwardRef(function(e,n){var r,i,s,o,l,c;const d=ot({name:"MuiModal",props:e}),{BackdropComponent:h=fY,BackdropProps:m,className:g,closeAfterTransition:v=!1,children:E,container:S,component:w,components:b={},componentsProps:C={},disableAutoFocus:I=!1,disableEnforceFocus:P=!1,disableEscapeKeyDown:x=!1,disablePortal:N=!1,disableRestoreFocus:k=!1,disableScrollLock:V=!1,hideBackdrop:L=!1,keepMounted:F=!1,onBackdropClick:K,open:ne,slotProps:Q,slots:X}=d,ee=ve(d,uY),J=O({},d,{closeAfterTransition:v,disableAutoFocus:I,disableEnforceFocus:P,disableEscapeKeyDown:x,disablePortal:N,disableRestoreFocus:k,disableScrollLock:V,hideBackdrop:L,keepMounted:F}),{getRootProps:Z,getBackdropProps:B,getTransitionProps:te,portalRef:M,isTopModal:G,exited:ae,hasTransition:pe}=qK(O({},J,{rootRef:n})),ue=O({},J,{exited:ae}),Ee=cY(ue),fe={};if(E.props.tabIndex===void 0&&(fe.tabIndex="-1"),pe){const{onEnter:Ne,onExited:We}=te();fe.onEnter=Ne,fe.onExited=We}const Re=(r=(i=X?.root)!=null?i:b.Root)!=null?r:dY,Se=(s=(o=X?.backdrop)!=null?o:b.Backdrop)!=null?s:h,Me=(l=Q?.root)!=null?l:C.root,kt=(c=Q?.backdrop)!=null?c:C.backdrop,Ue=La({elementType:Re,externalSlotProps:Me,externalForwardedProps:ee,getSlotProps:Z,additionalProps:{ref:n,as:w},ownerState:ue,className:Ve(g,Me?.className,Ee?.root,!ue.open&&ue.exited&&Ee?.hidden)}),Qe=La({elementType:Se,externalSlotProps:kt,additionalProps:m,getSlotProps:Ne=>B(O({},Ne,{onClick:We=>{K&&K(We),Ne!=null&&Ne.onClick&&Ne.onClick(We)}})),className:Ve(kt?.className,m?.className,Ee?.backdrop),ownerState:ue});return!F&&!ne&&(!pe||ae)?null:A.jsx(LL,{ref:M,container:S,disablePortal:N,
192children:A.jsxs(Re,O({},Ue,{children:[!L&&h?A.jsx(Se,O({},Qe)):null,A.jsx(MK,{disableEnforceFocus:P,disableAutoFocus:I,disableRestoreFocus:k,isEnabled:G,open:ne,children:T.cloneElement(E,fe)})]}))})});function hY(t){return it("MuiDialog",t)}const uS=Ze("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),JL=T.createContext({}),pY=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],mY=_e(KL,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),gY=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:s}=t,o={root:["root"],container:["container",`scroll${Ie(n)}`],paper:["paper",`paperScroll${Ie(n)}`,`paperWidth${Ie(String(r))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return rt(o,hY,e)},yY=_e(YL,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),vY=_e("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Ie(n.scroll)}`]]}})(({ownerState:t})=>O({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),_Y=_e(Tu,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Ie(n.scroll)}`],e[`paperWidth${Ie(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>O({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${uS.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${uS.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${uS.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),wY=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiDialog"}),i=Or(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:h,className:m,disableEscapeKeyDown:g=!1,fullScreen:v=!1,fullWidth:E=!1,maxWidth:S="sm",onBackdropClick:w,onClose:b,open:C,PaperComponent:I=Tu,PaperProps:P={},scroll:x="paper",TransitionComponent:N=GL,transitionDuration:k=s,TransitionProps:V}=r,L=ve(r,pY),F=O({},r,{disableEscapeKeyDown:g,fullScreen:v,fullWidth:E,maxWidth:S,scroll:x}),K=gY(F),ne=T.useRef(),Q=Z=>{ne.current=Z.target===Z.currentTarget},X=Z=>{ne.current&&(ne.current=null,w&&w(Z),b&&b(Z,"backdropClick"))},ee=Kp(l),J=T.useMemo(()=>({titleId:ee}),[ee]);return A.jsx(yY,O({className:Ve(K.root,m),closeAfterTransition:!0,components:{Backdrop:mY},componentsProps:{backdrop:O({transitionDuration:k,as:c},d)},disableEscapeKeyDown:g,onClose:b,open:C,ref:n,onClick:X,ownerState:F},L,{children:A.jsx(N,O({appear:!0,in:C,timeout:k,role:"presentation"},V,{children:A.jsx(vY,{className:Ve(K.container),onMouseDown:Q,ownerState:F,children:A.jsx(_Y,O({as:I,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":ee},P,{className:Ve(K.paper,P.className),ownerState:F,children:A.jsx(JL.Provider,{value:J,children:h})}))})}))}))});function EY(t){return it("MuiDialogActions",t)}Ze("MuiDialogActions",["root","spacing"]);const SY=["className","disableSpacing"],TY=t=>{const{classes:e,disableSpacing:n}=t;return rt({root:["root",!n&&"spacing"]},EY,e)},bY=_e("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>O({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),IY=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:s=!1}=r,o=ve(r,SY),l=O({},r,{disableSpacing:s}),c=TY(l);return A.jsx(bY,O({className:Ve(c.root,i),ownerState:l,ref:n},o))});function RY(t){return it("MuiDialogContent",t)}Ze("MuiDialogContent",["root","dividers"]);function xY(t){return it("MuiDialogTitle",t)}const kY=Ze("MuiDialogTitle",["root"]),CY=["className","dividers"],AY=t=>{const{classes:e,dividers:n}=t;return rt({root:["root",n&&"dividers"]},RY,e)},PY=_e("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>O({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${kY.root} + &`]:{paddingTop:0}})),OY=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=r,o=ve(r,CY),l=O({},r,{dividers:s}),c=AY(l);return A.jsx(PY,O({className:Ve(c.root,i),ownerState:l,ref:n},o))}),NY=["className","id"],DY=t=>{const{classes:e}=t;return rt({root:["root"]},xY,e)},MY=_e(Nr,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),LY=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiDialogTitle"}),{className:i,id:s}=r,o=ve(r,NY),l=r,c=DY(l),{titleId:d=s}=T.useContext(JL);return A.jsx(MY,O({component:"h2",className:Ve(c.root,i),ownerState:l,ref:n,variant:"h6",id:s??d},o))}),VY=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","
192slots","type"],FY=t=>{const{classes:e,disableUnderline:n}=t,i=rt({root:["root",!n&&"underline"],input:["input"]},RQ,e);return O({},e,i)},$Y=_e(O_,{shouldForwardProp:t=>vs(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...A_(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return O({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${bl.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${bl.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${bl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${bl.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${bl.disabled}, .${bl.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${bl.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&O({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),UY=_e(N_,{name:"MuiFilledInput",slot:"Input",overridesResolver:P_})(({theme:t,ownerState:e})=>O({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),FI=T.forwardRef(function(e,n){var r,i,s,o;const l=ot({props:e,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:h=!1,inputComponent:m="input",multiline:g=!1,slotProps:v,slots:E={},type:S="text"}=l,w=ve(l,VY),b=O({},l,{fullWidth:h,inputComponent:m,multiline:g,type:S}),C=FY(l),I={root:{ownerState:b},input:{ownerState:b}},P=v??d?kr(I,v??d):I,x=(r=(i=E.root)!=null?i:c.Root)!=null?r:$Y,N=(s=(o=E.input)!=null?o:c.Input)!=null?s:UY;return A.jsx(D_,O({slots:{root:x,input:N},componentsProps:P,fullWidth:h,inputComponent:m,multiline:g,ref:n,type:S},w,{classes:C}))});FI.muiName="Input";function jY(t){return it("MuiFormControl",t)}Ze("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const BY=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],zY=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${Ie(n)}`,r&&"fullWidth"]};return rt(i,jY,e)},WY=_e("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>O({},e.root,e[`margin${Ie(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>O({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),qY=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiFormControl"}),{children:i,className:s,color:o="primary",component:l="div",disabled:c=!1,error:d=!1,focused:h,fullWidth:m=!1,hiddenLabel:g=!1,margin:v="none",required:E=!1,size:S="medium",variant:w="outlined"}=r,b=ve(r,BY),C=O({},r,{color:o,component:l,disabled:c,error:d,fullWidth:m,hiddenLabel:g,margin:v,required:E,size:S,variant:w}),I=zY(C),[P,x]=T.useState(()=>{let Q=!1;
192return i&&T.Children.forEach(i,X=>{if(!Ny(X,["Input","Select"]))return;const ee=Ny(X,["Select"])?X.props.input:X;ee&&_Q(ee.props)&&(Q=!0)}),Q}),[N,k]=T.useState(()=>{let Q=!1;return i&&T.Children.forEach(i,X=>{Ny(X,["Input","Select"])&&(mv(X.props,!0)||mv(X.props.inputProps,!0))&&(Q=!0)}),Q}),[V,L]=T.useState(!1);c&&V&&L(!1);const F=h!==void 0&&!c?h:V;let K;const ne=T.useMemo(()=>({adornedStart:P,setAdornedStart:x,color:o,disabled:c,error:d,filled:N,focused:F,fullWidth:m,hiddenLabel:g,size:S,onBlur:()=>{L(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{L(!0)},registerEffect:K,required:E,variant:w}),[P,o,c,d,N,F,m,g,K,E,S,w]);return A.jsx(C_.Provider,{value:ne,children:A.jsx(WY,O({as:l,ownerState:C,className:Ve(I.root,s),ref:n},b,{children:i}))})});function HY(t){return it("MuiFormHelperText",t)}const $P=Ze("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var UP;const GY=["children","className","component","disabled","error","filled","focused","margin","required","variant"],KY=t=>{const{classes:e,contained:n,size:r,disabled:i,error:s,filled:o,focused:l,required:c}=t,d={root:["root",i&&"disabled",s&&"error",r&&`size${Ie(r)}`,n&&"contained",l&&"focused",o&&"filled",c&&"required"]};return rt(d,HY,e)},QY=_e("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Ie(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>O({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${$P.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${$P.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),YY=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiFormHelperText"}),{children:i,className:s,component:o="p"}=r,l=ve(r,GY),c=bu(),d=Od({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),h=O({},r,{component:o,contained:d.variant==="filled"||d.variant==="outlined",variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),m=KY(h);return A.jsx(QY,O({as:o,ownerState:h,className:Ve(m.root,s),ref:n},l,{children:i===" "?UP||(UP=A.jsx("span",{className:"notranslate",children:"​"})):i}))});function JY(t){return it("MuiFormLabel",t)}const Bh=Ze("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),XY=["children","className","color","component","disabled","error","filled","focused","required"],ZY=t=>{const{classes:e,color:n,focused:r,disabled:i,error:s,filled:o,required:l}=t,c={root:["root",`color${Ie(n)}`,i&&"disabled",s&&"error",o&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",s&&"error"]};return rt(c,JY,e)},eJ=_e("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>O({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>O({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Bh.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Bh.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Bh.error}`]:{color:(t.vars||t).palette.error.main}})),tJ=_e("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Bh.error}`]:{color:(t.vars||t).palette.error.main}})),nJ=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiFormLabel"}),{children:i,className:s,component:o="label"}=r,l=ve(r,XY),c=bu(),d=Od({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),h=O({},r,{color:d.color||"primary",component:o,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),m=ZY(h);return A.jsxs(eJ,O({as:o,ownerState:h,className:Ve(m.root,s),ref:n},l,{children:[i,d.required&&A.jsxs(tJ,{ownerState:h,"aria-hidden":!0,
192className:m.asterisk,children:[" ","*"]})]}))}),jP=T.createContext();function rJ(t){return it("MuiGrid",t)}const iJ=[0,1,2,3,4,5,6,7,8,9,10],sJ=["column-reverse","column","row-reverse","row"],oJ=["nowrap","wrap-reverse","wrap"],Yf=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],hp=Ze("MuiGrid",["root","container","item","zeroMinWidth",...iJ.map(t=>`spacing-xs-${t}`),...sJ.map(t=>`direction-xs-${t}`),...oJ.map(t=>`wrap-xs-${t}`),...Yf.map(t=>`grid-xs-${t}`),...Yf.map(t=>`grid-sm-${t}`),...Yf.map(t=>`grid-md-${t}`),...Yf.map(t=>`grid-lg-${t}`),...Yf.map(t=>`grid-xl-${t}`)]),aJ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function $c(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function lJ({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let s={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)s={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const o=u_({values:e.columns,breakpoints:t.breakpoints.values}),l=typeof o=="object"?o[i]:o;if(l==null)return r;const c=`${Math.round(n/l*1e8)/1e6}%`;let d={};if(e.container&&e.item&&e.columnSpacing!==0){const h=t.spacing(e.columnSpacing);if(h!=="0px"){const m=`calc(${c} + ${$c(h)})`;d={flexBasis:m,maxWidth:m}}}s=O({flexBasis:c,flexGrow:0,maxWidth:c},d)}return t.breakpoints.values[i]===0?Object.assign(r,s):r[t.breakpoints.up(i)]=s,r},{})}function uJ({theme:t,ownerState:e}){const n=u_({values:e.direction,breakpoints:t.breakpoints.values});return Ki({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${hp.item}`]={maxWidth:"none"}),i})}function XL({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,s)=>t[i]-t[s]);return r.slice(0,r.indexOf(n))}function cJ({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const s=u_({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=XL({breakpoints:t.breakpoints.values,values:s})),i=Ki({theme:t},s,(l,c)=>{var d;const h=t.spacing(l);return h!=="0px"?{marginTop:`-${$c(h)}`,[`& > .${hp.item}`]:{paddingTop:$c(h)}}:(d=o)!=null&&d.includes(c)?{}:{marginTop:0,[`& > .${hp.item}`]:{paddingTop:0}}})}return i}function dJ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const s=u_({values:r,breakpoints:t.breakpoints.values});let o;typeof s=="object"&&(o=XL({breakpoints:t.breakpoints.values,values:s})),i=Ki({theme:t},s,(l,c)=>{var d;const h=t.spacing(l);return h!=="0px"?{width:`calc(100% + ${$c(h)})`,marginLeft:`-${$c(h)}`,[`& > .${hp.item}`]:{paddingLeft:$c(h)}}:(d=o)!=null&&d.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${hp.item}`]:{paddingLeft:0}}})}return i}function fJ(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const s=t[i];Number(s)>0&&r.push(n[`spacing-${i}-${String(s)}`])}),r}const hJ=_e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:s,spacing:o,wrap:l,zeroMinWidth:c,breakpoints:d}=n;let h=[];r&&(h=fJ(o,d,e));const m=[];return d.forEach(g=>{const v=n[g];v&&m.push(e[`grid-${g}-${String(v)}`])}),[e.root,r&&e.container,s&&e.item,c&&e.zeroMinWidth,...h,i!=="row"&&e[`direction-xs-${String(i)}`],l!=="wrap"&&e[`wrap-xs-${String(l)}`],...m]}})(({ownerState:t})=>O({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),uJ,cJ,dJ,lJ);function pJ(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const s=`spacing-${r}-${String(i)}`;n.push(s)}}),n}const mJ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:s,wrap:o,zeroMinWidth:l,breakpoints:c}=t;let d=[];n&&(d=pJ(s,c));const h=[];
192c.forEach(g=>{const v=t[g];v&&h.push(`grid-${g}-${String(v)}`)});const m={root:["root",n&&"container",i&&"item",l&&"zeroMinWidth",...d,r!=="row"&&`direction-xs-${String(r)}`,o!=="wrap"&&`wrap-xs-${String(o)}`,...h]};return rt(m,rJ,e)},Xa=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiGrid"}),{breakpoints:i}=Or(),s=S_(r),{className:o,columns:l,columnSpacing:c,component:d="div",container:h=!1,direction:m="row",item:g=!1,rowSpacing:v,spacing:E=0,wrap:S="wrap",zeroMinWidth:w=!1}=s,b=ve(s,aJ),C=v||E,I=c||E,P=T.useContext(jP),x=h?l||12:P,N={},k=O({},b);i.keys.forEach(F=>{b[F]!=null&&(N[F]=b[F],delete k[F])});const V=O({},s,{columns:x,container:h,direction:m,item:g,rowSpacing:C,columnSpacing:I,wrap:S,zeroMinWidth:w,spacing:E},N,{breakpoints:i.keys}),L=mJ(V);return A.jsx(jP.Provider,{value:x,children:A.jsx(hJ,O({ownerState:V,className:Ve(L.root,o),as:d,ref:n},k))})}),gJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function LT(t){return`scale(${t}, ${t**2})`}const yJ={entering:{opacity:1,transform:LT(1)},entered:{opacity:1,transform:"none"}},cS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),pp=T.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:s,easing:o,in:l,onEnter:c,onEntered:d,onEntering:h,onExit:m,onExited:g,onExiting:v,style:E,timeout:S="auto",TransitionComponent:w=ro}=e,b=ve(e,gJ),C=Fl(),I=T.useRef(),P=Or(),x=T.useRef(null),N=wn(x,s.ref,n),k=ee=>J=>{if(ee){const Z=x.current;J===void 0?ee(Z):ee(Z,J)}},V=k(h),L=k((ee,J)=>{AL(ee);const{duration:Z,delay:B,easing:te}=dv({style:E,timeout:S,easing:o},{mode:"enter"});let M;S==="auto"?(M=P.transitions.getAutoHeightDuration(ee.clientHeight),I.current=M):M=Z,ee.style.transition=[P.transitions.create("opacity",{duration:M,delay:B}),P.transitions.create("transform",{duration:cS?M:M*.666,delay:B,easing:te})].join(","),c&&c(ee,J)}),F=k(d),K=k(v),ne=k(ee=>{const{duration:J,delay:Z,easing:B}=dv({style:E,timeout:S,easing:o},{mode:"exit"});let te;S==="auto"?(te=P.transitions.getAutoHeightDuration(ee.clientHeight),I.current=te):te=J,ee.style.transition=[P.transitions.create("opacity",{duration:te,delay:Z}),P.transitions.create("transform",{duration:cS?te:te*.666,delay:cS?Z:Z||te*.333,easing:B})].join(","),ee.style.opacity=0,ee.style.transform=LT(.75),m&&m(ee)}),Q=k(g),X=ee=>{S==="auto"&&C.start(I.current||0,ee),r&&r(x.current,ee)};return A.jsx(w,O({appear:i,in:l,nodeRef:x,onEnter:L,onEntered:F,onEntering:V,onExit:ne,onExited:Q,onExiting:K,addEndListener:X,timeout:S==="auto"?null:S},b,{children:(ee,J)=>T.cloneElement(s,O({style:O({opacity:0,transform:LT(.75),visibility:ee==="exited"&&!l?"hidden":void 0},yJ[ee],E,s.props.style),ref:N},J))}))});pp.muiSupportAuto=!0;const vJ=["initialWidth","width"],Ta=["xs","sm","md","lg","xl"],_J=(t,e,n=!0)=>n?Ta.indexOf(t)<=Ta.indexOf(e):Ta.indexOf(t)<Ta.indexOf(e),wJ=(t,e,n=!1)=>n?Ta.indexOf(e)<=Ta.indexOf(t):Ta.indexOf(e)<Ta.indexOf(t),EJ=(t={})=>e=>{const{withTheme:n=!1,noSSR:r=!1,initialWidth:i}=t;function s(o){const l=Or(),c=o.theme||l,d=dI({theme:c,name:"MuiWithWidth",props:o}),{initialWidth:h,width:m}=d,g=ve(d,vJ),[v,E]=T.useState(!1);Gi(()=>{E(!0)},[]);const w=c.breakpoints.keys.slice().reverse().reduce((C,I)=>{const P=TL(c.breakpoints.up(I));return!C&&P?I:C},null),b=O({width:m||(v||r?w:void 0)||h||i},n?{theme:c}:{},g);return b.width===void 0?null:A.jsx(e,O({},b))}return s};function SJ(t){const{children:e,only:n,width:r}=t,i=Or();let s=!0;if(n)if(Array.isArray(n))for(let o=0;o<n.length;o+=1){const l=n[o];if(r===l){s=!1;break}}else n&&r===n&&(s=!1);if(s)for(let o=0;o<i.breakpoints.keys.length;o+=1){const l=i.breakpoints.keys[o],c=t[`${l}Up`],d=t[`${l}Down`];if(c&&_J(l,r)||d&&wJ(l,r)){s=!1;break}}return s?A.jsx(T.Fragment,{children:e}):null}const TJ=EJ()(SJ);function bJ(t){return it("PrivateHiddenCss",t)}Ze("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const IJ=["children","className","only"],RJ=t=>{const{classes:e,breakpoints:n}=t,r={root:["root",...n.map(({breakpoint:i,dir:s})=>s==="only"?`${s}${Ie(i)}`:`${i}${Ie(s)}`)]};return rt(r,bJ,e)}
vendor: 12,064 bytes, line 192
192,xJ=_e("div",{name:"PrivateHiddenCss",slot:"Root"})(({theme:t,ownerState:e})=>{const n={display:"none"};return O({},e.breakpoints.map(({breakpoint:r,dir:i})=>i==="only"?{[t.breakpoints.only(r)]:n}:i==="up"?{[t.breakpoints.up(r)]:n}:{[t.breakpoints.down(r)]:n}).reduce((r,i)=>(Object.keys(i).forEach(s=>{r[s]=i[s]}),r),{}))});function kJ(t){const{children:e,className:n,only:r}=t,i=ve(t,IJ),s=Or(),o=[];for(let d=0;d<s.breakpoints.keys.length;d+=1){const h=s.breakpoints.keys[d],m=i[`${h}Up`],g=i[`${h}Down`];m&&o.push({breakpoint:h,dir:"up"}),g&&o.push({breakpoint:h,dir:"down"})}r&&(Array.isArray(r)?r:[r]).forEach(h=>{o.push({breakpoint:h,dir:"only"})});const l=O({},t,{breakpoints:o}),c=RJ(l);return A.jsx(xJ,{className:Ve(c.root,n),ownerState:l,children:e})}const CJ=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"];function AJ(t){const{implementation:e="js",lgDown:n=!1,lgUp:r=!1,mdDown:i=!1,mdUp:s=!1,smDown:o=!1,smUp:l=!1,xlDown:c=!1,xlUp:d=!1,xsDown:h=!1,xsUp:m=!1}=t,g=ve(t,CJ);return e==="js"?A.jsx(TJ,O({lgDown:n,lgUp:r,mdDown:i,mdUp:s,smDown:o,smUp:l,xlDown:c,xlUp:d,xsDown:h,xsUp:m},g)):A.jsx(kJ,O({lgDown:n,lgUp:r,mdDown:i,mdUp:s,smDown:o,smUp:l,xlDown:c,xlUp:d,xsDown:h,xsUp:m},g))}const PJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],OJ=t=>{const{classes:e,disableUnderline:n}=t,i=rt({root:["root",!n&&"underline"],input:["input"]},bQ,e);return O({},e,i)},NJ=_e(O_,{shouldForwardProp:t=>vs(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...A_(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),O({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Qf.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qf.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Qf.disabled}, .${Qf.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Qf.disabled}:before`]:{borderBottomStyle:"dotted"}})}),DJ=_e(N_,{name:"MuiInput",slot:"Input",overridesResolver:P_})({}),$I=T.forwardRef(function(e,n){var r,i,s,o;const l=ot({props:e,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:h,fullWidth:m=!1,inputComponent:g="input",multiline:v=!1,slotProps:E,slots:S={},type:w="text"}=l,b=ve(l,PJ),C=OJ(l),P={root:{ownerState:{disableUnderline:c}}},x=E??h?kr(E??h,P):P,N=(r=(i=S.root)!=null?i:d.Root)!=null?r:NJ,k=(s=(o=S.input)!=null?o:d.Input)!=null?s:DJ;return A.jsx(D_,O({slots:{root:N,input:k},slotProps:x,fullWidth:m,inputComponent:g,multiline:v,ref:n,type:w},b,{classes:C}))});$I.muiName="Input";function MJ(t){return it("MuiInputAdornment",t)}const BP=Ze("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var zP;const LJ=["children","className","component","disablePointerEvents","disableTypography","position","variant"],VJ=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${Ie(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},FJ=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:i,size:s,variant:o}=t,l={root:["root",n&&"disablePointerEvents",i&&`position${Ie(i)}`,o,r&&"hiddenLabel",s&&`size${Ie(s)}`]};return rt(l,MJ,e)},$J=_e("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:VJ})(({theme:t,ownerState:e})=>O({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},e.variant==="filled"&&{[`&.${BP.positionStart}&:not(.${BP.hiddenLabel})`]:{marginTop:16}},e.position==="start"&&{marginRight:8},e.position==="end"&&{marginLeft:8},e.disablePointerEvents===!0&&{pointerEvents:"none"})),UJ=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiInputAdornment"}),{children:i,className:s,component:o="div",disablePointerEvents:l=!1,disableTypography:c=!1,position:d,variant:h}=r,m=ve(r,LJ),g=bu()||{};let v=h;h&&g.variant,g&&!v&&(v=g.variant);const E=O({},r,{hiddenLabel:g.hiddenLabel,size:g.size,disablePointerEvents:l,position:d,variant:v}),S=FJ(E);return A.jsx(C_.Provider,{value:null,children:A.jsx($J,O({as:o,ownerState:E,className:Ve(S.root,s),ref:n},m,{children:typeof i=="string"&&!c?A.jsx(Nr,{color:"text.secondary",children:i}):A.jsxs(T.Fragment,{children:[d==="start"?zP||(zP=A.jsx("span",{className:"notranslate",children:"​"})):null,i]})}))})});function jJ(t){return it("MuiInputLabel",t)}Ze("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const BJ=["disableAnimation","margin","shrink","variant","className"],zJ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:s,variant:o,required:l}=t,c={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Ie(r)}`,o],asterisk:[l&&"asterisk"]},d=rt(c,jJ,e);return O({},e,d)},WJ=_e(nJ,{shouldForwardProp:t=>vs(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Bh.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>O({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&O({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&O({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&O({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),qJ=T.forwardRef(function(e,n){const r=ot({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:s,className:o}=r,l=ve(r,BJ),c=bu();let d=s;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const h=Od({props:r,muiFormControl:c,states:["size","variant","required","focused"]}),m=O({},r,{disableAnimation:i,formControl:c,shrink:d,size:h.size,variant:h.variant,required:h.required,focused:h.focused}),g=zJ(m);return A.jsx(WJ,O({"data-shrink":d,ownerState:m,ref:n,className:Ve(g.root,o)},l,{classes:g}))});function HJ(t){return it("MuiLink",t)}const GJ=Ze("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),ZL={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},KJ=t=>ZL[t]||t,QJ=({theme:t,ownerState:e})=>{const n=KJ(e.color),r=ed(t,`palette.${n}`,!1)||e.color,i=ed(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:zr.alpha(r,.4)},YJ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],JJ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,s={root:["root",`underline${Ie(i)}`,n==="button"&&"button",r&&"focusVisible"]};return rt(s,HJ,e)},XJ=_e(Nr,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${Ie(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>O({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&O({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:QJ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${GJ.focusVisible}`]:{outline:"auto"}})),eV=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiLink"}),{className:i,color:s="primary",component:o="a",onBlur:l,onFocus:c,TypographyClasses:d,underline:h="always",variant:m="inherit",sx:g}=r,v=ve(r,YJ),{isFocusVisibleRef:E,onBlur:S,onFocus:w,ref:b}=l_(),[C,I]=T.useState(!1),P=wn(n,b),x=L=>{S(L),E.current===!1&&I(!1),l&&l(L)},N=L=>{w(L),E.current===!0&&I(!0),c&&c(L)},k=O({},r,{color:s,component:o,focusVisible:C,underline:h,variant:m}),V=JJ(k);return A.jsx(XJ,O({color:s,className:Ve(V.root,i),classes:d,component:o,onBlur:x,onFocus:N,ref:P,ownerState:k,variant:m,sx:[...Object.keys(ZL).includes(s)?[]:[{color:s}],...Array.isArray(g)?g:[g]]},v))}),ZJ=T.createContext({});function eX(t){return it("MuiList",t)}Ze("MuiList",["root","padding","dense","subheader"]);const tX=["children","className","component","dense","disablePadding","subheader"],nX=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},eX,e)},rX=_e("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>O({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),iX=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiList"}),{children:i,className:s,component:o="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=r,h=ve(r,tX),m=T.useMemo(()=>({dense:l}),[l]),g=O({},r,{component:o,dense:l,disablePadding:c}),v=nX(g);return A.jsx(ZJ.Provider,{value:m,children:A.jsxs(rX,O({as:o,className:Ve(v.root,s),ref:n,ownerState:g},h,{children:[d,i]}))})}),sX=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function dS(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function WP(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function tV(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Jf(t,e,n,r,i,s){let o=!1,l=i(t,e,e?n:!1);for(;l;){if(l===t.firstChild){if(o)return!1;o=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!tV(l,s)||c)l=i(t,l,n);else return l.focus(),!0}return!1}
192const oX=T.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:o,className:l,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:h,variant:m="selectedMenu"}=e,g=ve(e,sX),v=T.useRef(null),E=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Gi(()=>{i&&v.current.focus()},[i]),T.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(I,{direction:P})=>{const x=!v.current.style.width;if(I.clientHeight<v.current.clientHeight&&x){const N=`${WM($n(I))}px`;v.current.style[P==="rtl"?"paddingLeft":"paddingRight"]=N,v.current.style.width=`calc(100% + ${N})`}return v.current}}),[]);const S=I=>{const P=v.current,x=I.key,N=$n(P).activeElement;if(x==="ArrowDown")I.preventDefault(),Jf(P,N,d,c,dS);else if(x==="ArrowUp")I.preventDefault(),Jf(P,N,d,c,WP);else if(x==="Home")I.preventDefault(),Jf(P,null,d,c,dS);else if(x==="End")I.preventDefault(),Jf(P,null,d,c,WP);else if(x.length===1){const k=E.current,V=x.toLowerCase(),L=performance.now();k.keys.length>0&&(L-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&V!==k.keys[0]&&(k.repeating=!1)),k.lastTime=L,k.keys.push(V);const F=N&&!k.repeating&&tV(N,k);k.previousKeyMatched&&(F||Jf(P,N,!1,c,dS,k))?I.preventDefault():k.previousKeyMatched=!1}h&&h(I)},w=wn(v,n);let b=-1;T.Children.forEach(o,(I,P)=>{if(!T.isValidElement(I)){b===P&&(b+=1,b>=o.length&&(b=-1));return}I.props.disabled||(m==="selectedMenu"&&I.props.selected||b===-1)&&(b=P),b===P&&(I.props.disabled||I.props.muiSkipListHighlight||I.type.muiSkipListHighlight)&&(b+=1,b>=o.length&&(b=-1))});const C=T.Children.map(o,(I,P)=>{if(P===b){const x={};return s&&(x.autoFocus=!0),I.props.tabIndex===void 0&&m==="selectedMenu"&&(x.tabIndex=0),T.cloneElement(I,x)}return I});return A.jsx(iX,O({role:"menu",ref:w,className:l,onKeyDown:S,tabIndex:i?0:-1},g,{children:C}))});function aX(t){return it("MuiPopover",t)}Ze("MuiPopover",["root","paper"]);const lX=["onEntering"],uX=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],cX=["slotProps"];function qP(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function HP(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function GP(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function fS(t){return typeof t=="function"?t():t}const dX=t=>{const{classes:e}=t;return rt({root:["root"],paper:["paper"]},aX,e)},fX=_e(YL,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),nV=_e(Tu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),hX=T.forwardRef(function(e,n){var r,i,s;const o=ot({props:e,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:h,anchorReference:m="anchorEl",children:g,className:v,container:E,elevation:S=8,marginThreshold:w=16,open:b,PaperProps:C={},slots:I,slotProps:P,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:N=pp,transitionDuration:k="auto",TransitionProps:{onEntering:V}={},disableScrollLock:L=!1}=o,F=ve(o.TransitionProps,lX),K=ve(o,uX),ne=(r=P?.paper)!=null?r:C,Q=T.useRef(),X=wn(Q,ne.ref),ee=O({},o,{anchorOrigin:d,anchorReference:m,elevation:S,marginThreshold:w,externalPaperSlotProps:ne,transformOrigin:x,TransitionComponent:N,transitionDuration:k,TransitionProps:F}),J=dX(ee),Z=T.useCallback(()=>{if(m==="anchorPosition")return h;const Ne=fS(c),qe=(Ne&&Ne.nodeType===1?Ne:$n(Q.current).body).getBoundingClientRect();return{top:qe.top+qP(qe,d.vertical),left:qe.left+HP(qe,d.horizontal)}},[c,d.horizontal,d.vertical,h,m]),B=T.useCallback(Ne=>({vertical:qP(Ne,x.vertical),horizontal:HP(Ne,x.horizontal)}),[x.horizontal,x.vertical]),te=T.useCallback(Ne=>{const We={width:Ne.offsetWidth,height:Ne.offsetHeight},qe=B(We);if(m==="none")return{top:null,left:null,transformOrigin:GP(qe)};const Nn=Z();let Yt=Nn.top-qe.vertical,Jt=Nn.left-qe.horizontal;
vendor: 4,815 bytes, line 192
192const Tn=Yt+We.height,_t=Jt+We.width,Je=Ma(fS(c)),mn=Je.innerHeight-w,jt=Je.innerWidth-w;if(w!==null&&Yt<w){const at=Yt-w;Yt-=at,qe.vertical+=at}else if(w!==null&&Tn>mn){const at=Tn-mn;Yt-=at,qe.vertical+=at}if(w!==null&&Jt<w){const at=Jt-w;Jt-=at,qe.horizontal+=at}else if(_t>jt){const at=_t-jt;Jt-=at,qe.horizontal+=at}return{top:`${Math.round(Yt)}px`,left:`${Math.round(Jt)}px`,transformOrigin:GP(qe)}},[c,m,Z,B,w]),[M,G]=T.useState(b),ae=T.useCallback(()=>{const Ne=Q.current;if(!Ne)return;const We=te(Ne);We.top!==null&&(Ne.style.top=We.top),We.left!==null&&(Ne.style.left=We.left),Ne.style.transformOrigin=We.transformOrigin,G(!0)},[te]);T.useEffect(()=>(L&&window.addEventListener("scroll",ae),()=>window.removeEventListener("scroll",ae)),[c,L,ae]);const pe=(Ne,We)=>{V&&V(Ne,We),ae()},ue=()=>{G(!1)};T.useEffect(()=>{b&&ae()}),T.useImperativeHandle(l,()=>b?{updatePosition:()=>{ae()}}:null,[b,ae]),T.useEffect(()=>{if(!b)return;const Ne=lI(()=>{ae()}),We=Ma(c);return We.addEventListener("resize",Ne),()=>{Ne.clear(),We.removeEventListener("resize",Ne)}},[c,b,ae]);let Ee=k;k==="auto"&&!N.muiSupportAuto&&(Ee=void 0);const fe=E||(c?$n(fS(c)).body:void 0),Re=(i=I?.root)!=null?i:fX,Se=(s=I?.paper)!=null?s:nV,Me=La({elementType:Se,externalSlotProps:O({},ne,{style:M?ne.style:O({},ne.style,{opacity:0})}),additionalProps:{elevation:S,ref:X},ownerState:ee,className:Ve(J.paper,ne?.className)}),kt=La({elementType:Re,externalSlotProps:P?.root||{},externalForwardedProps:K,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:fe,open:b},ownerState:ee,className:Ve(J.root,v)}),{slotProps:Ue}=kt,Qe=ve(kt,cX);return A.jsx(Re,O({},Qe,!fv(Re)&&{slotProps:Ue,disableScrollLock:L},{children:A.jsx(N,O({appear:!0,in:b,onEntering:pe,onExited:ue,timeout:Ee},F,{children:A.jsx(Se,O({},Me,{children:g}))}))}))});function pX(t){return it("MuiMenu",t)}Ze("MuiMenu",["root","paper","list"]);const mX=["onEntering"],gX=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],yX={vertical:"top",horizontal:"right"},vX={vertical:"top",horizontal:"left"},_X=t=>{const{classes:e}=t;return rt({root:["root"],paper:["paper"],list:["list"]},pX,e)},wX=_e(hX,{shouldForwardProp:t=>vs(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),EX=_e(nV,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),SX=_e(oX,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),TX=T.forwardRef(function(e,n){var r,i;const s=ot({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:l,className:c,disableAutoFocusItem:d=!1,MenuListProps:h={},onClose:m,open:g,PaperProps:v={},PopoverClasses:E,transitionDuration:S="auto",TransitionProps:{onEntering:w}={},variant:b="selectedMenu",slots:C={},slotProps:I={}}=s,P=ve(s.TransitionProps,mX),x=ve(s,gX),N=kL(),k=O({},s,{autoFocus:o,disableAutoFocusItem:d,MenuListProps:h,onEntering:w,PaperProps:v,transitionDuration:S,TransitionProps:P,variant:b}),V=_X(k),L=o&&!d&&g,F=T.useRef(null),K=(B,te)=>{F.current&&F.current.adjustStyleForScrollbar(B,{direction:N?"rtl":"ltr"}),w&&w(B,te)},ne=B=>{B.key==="Tab"&&(B.preventDefault(),m&&m(B,"tabKeyDown"))};let Q=-1;T.Children.map(l,(B,te)=>{T.isValidElement(B)&&(B.props.disabled||(b==="selectedMenu"&&B.props.selected||Q===-1)&&(Q=te))});const X=(r=C.paper)!=null?r:EX,ee=(i=I.paper)!=null?i:v,J=La({elementType:C.root,externalSlotProps:I.root,ownerState:k,className:[V.root,c]}),Z=La({elementType:X,externalSlotProps:ee,ownerState:k,className:V.paper});return A.jsx(wX,O({onClose:m,anchorOrigin:{vertical:"bottom",horizontal:N?"right":"left"},transformOrigin:N?yX:vX,slots:{paper:X,root:C.root},slotProps:{root:J,paper:Z},open:g,ref:n,transitionDuration:S,TransitionProps:O({onEntering:K},P),ownerState:k},x,{classes:E,children:A.jsx(SX,O({onKeyDown:ne,actions:F,autoFocus:o&&(Q===-1||d),autoFocusItem:L,variant:b},h,{className:Ve(V.list,h.className),children:l}))}))});function bX(t){return it("MuiNativeSelect",t)}const UI=Ze("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),IX=["className","disabled","error","IconComponent","inputRef","variant"],RX=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,l={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${Ie(n)}`,s&&"iconOpen",r&&"disabled"]};return rt(l,bX,e)},rV=({ownerState:t,theme:e})=>O({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":O({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroun
192dChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${UI.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),xX=_e("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:vs,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${UI.multiple}`]:e.multiple}]}})(rV),iV=({ownerState:t,theme:e})=>O({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${UI.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),kX=_e("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ie(n.variant)}`],n.open&&e.iconOpen]}})(iV),CX=T.forwardRef(function(e,n){const{className:r,disabled:i,error:s,IconComponent:o,inputRef:l,variant:c="standard"}=e,d=ve(e,IX),h=O({},e,{disabled:i,variant:c,error:s}),m=RX(h);return A.jsxs(T.Fragment,{children:[A.jsx(xX,O({ownerState:h,className:Ve(m.select,r),disabled:i,ref:l||n},d)),e.multiple?null:A.jsx(kX,{as:o,ownerState:h,className:m.icon})]})});var KP;const AX=["children","classes","className","label","notched"],PX=_e("fieldset",{shouldForwardProp:vs})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),OX=_e("legend",{shouldForwardProp:vs})(({ownerState:t,theme:e})=>O({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&O({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function NX(t){const{className:e,label:n,notched:r}=t,i=ve(t,AX),s=n!=null&&n!=="",o=O({},t,{notched:r,withLabel:s});return A.jsx(PX,O({"aria-hidden":!0,className:e,ownerState:o},i,{children:A.jsx(OX,{ownerState:o,children:s?A.jsx("span",{children:n}):KP||(KP=A.jsx("span",{className:"notranslate",children:"​"}))})}))}const DX=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],MX=t=>{const{classes:e}=t,r=rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},IQ,e);return O({},e,r)},LX=_e(O_,{shouldForwardProp:t=>vs(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:A_})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return O({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${la.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${la.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${la.focused} .${la.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${la.error} .${la.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${la.disabled} .${la.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&O({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),VX=_e(NX,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroun
192dChannel} / 0.23)`:e}}),FX=_e(N_,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:P_})(({theme:t,ownerState:e})=>O({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),jI=T.forwardRef(function(e,n){var r,i,s,o,l;const c=ot({props:e,name:"MuiOutlinedInput"}),{components:d={},fullWidth:h=!1,inputComponent:m="input",label:g,multiline:v=!1,notched:E,slots:S={},type:w="text"}=c,b=ve(c,DX),C=MX(c),I=bu(),P=Od({props:c,muiFormControl:I,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x=O({},c,{color:P.color||"primary",disabled:P.disabled,error:P.error,focused:P.focused,formControl:I,fullWidth:h,hiddenLabel:P.hiddenLabel,multiline:v,size:P.size,type:w}),N=(r=(i=S.root)!=null?i:d.Root)!=null?r:LX,k=(s=(o=S.input)!=null?o:d.Input)!=null?s:FX;return A.jsx(D_,O({slots:{root:N,input:k},renderSuffix:V=>A.jsx(VX,{ownerState:x,className:C.notchedOutline,label:g!=null&&g!==""&&P.required?l||(l=A.jsxs(T.Fragment,{children:[g," ","*"]})):g,notched:typeof E<"u"?E:!!(V.startAdornment||V.filled||V.focused)}
vendor: 4,990 bytes, line 192
192),fullWidth:h,inputComponent:m,multiline:v,ref:n,type:w},b,{classes:O({},C,{notchedOutline:null})}))});jI.muiName="Input";const $X=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function UX(t={}){const{boundaryCount:e=1,componentName:n="usePagination",count:r=1,defaultPage:i=1,disabled:s=!1,hideNextButton:o=!1,hidePrevButton:l=!1,onChange:c,page:d,showFirstButton:h=!1,showLastButton:m=!1,siblingCount:g=1}=t,v=ve(t,$X),[E,S]=op({controlled:d,default:i,name:n,state:"page"}),w=(L,F)=>{d||S(F),c&&c(L,F)},b=(L,F)=>{const K=F-L+1;return Array.from({length:K},(ne,Q)=>L+Q)},C=b(1,Math.min(e,r)),I=b(Math.max(r-e+1,e+1),r),P=Math.max(Math.min(E-g,r-e-g*2-1),e+2),x=Math.min(Math.max(E+g,e+g*2+2),I.length>0?I[0]-2:r-1),N=[...h?["first"]:[],...l?[]:["previous"],...C,...P>e+2?["start-ellipsis"]:e+1<r-e?[e+1]:[],...b(P,x),...x<r-e-1?["end-ellipsis"]:r-e>e?[r-e]:[],...I,...o?[]:["next"],...m?["last"]:[]],k=L=>{switch(L){case"first":return 1;case"previous":return E-1;case"next":return E+1;case"last":return r;default:return null}},V=N.map(L=>typeof L=="number"?{onClick:F=>{w(F,L)},type:"page",page:L,selected:L===E,disabled:s,"aria-current":L===E?"true":void 0}:{onClick:F=>{w(F,k(L))},type:L,page:k(L),selected:!1,disabled:s||L.indexOf("ellipsis")===-1&&(L==="next"||L==="last"?E>=r:E<=1)});return O({items:V},v)}function jX(t){return it("MuiSelect",t)}const Xf=Ze("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var QP;const BX=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],zX=_e("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Xf.select}`]:e.select},{[`&.${Xf.select}`]:e[n.variant]},{[`&.${Xf.error}`]:e.error},{[`&.${Xf.multiple}`]:e.multiple}]}})(rV,{[`&.${Xf.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),WX=_e("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ie(n.variant)}`],n.open&&e.iconOpen]}})(iV),qX=_e("input",{shouldForwardProp:t=>EL(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function YP(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function HX(t){return t==null||typeof t=="string"&&!t.trim()}const GX=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:s,error:o}=t,l={select:["select",n,r&&"disabled",i&&"multiple",o&&"error"],icon:["icon",`icon${Ie(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return rt(l,jX,e)},KX=T.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":s,autoFocus:o,autoWidth:l,children:c,className:d,defaultOpen:h,defaultValue:m,disabled:g,displayEmpty:v,error:E=!1,IconComponent:S,inputRef:w,labelId:b,MenuProps:C={},multiple:I,name:P,onBlur:x,onChange:N,onClose:k,onFocus:V,onOpen:L,open:F,readOnly:K,renderValue:ne,SelectDisplayProps:Q={},tabIndex:X,value:ee,variant:J="standard"}=e,Z=ve(e,BX),[B,te]=op({controlled:ee,default:m,name:"Select"}),[M,G]=op({controlled:F,default:h,name:"Select"}),ae=T.useRef(null),pe=T.useRef(null),[ue,Ee]=T.useState(null),{current:fe}=T.useRef(F!=null),[Re,Se]=T.useState(),Me=wn(n,w),kt=T.useCallback(De=>{pe.current=De,De&&Ee(De)},[]),Ue=ue?.parentNode;T.useImperativeHandle(Me,()=>({focus:()=>{pe.current.focus()},node:ae.current,value:B}),[B]),T.useEffect(()=>{h&&M&&ue&&!fe&&(Se(l?null:Ue.clientWidth),pe.current.focus())},[ue,l]),T.useEffect(()=>{o&&pe.current.focus()},[o]),T.useEffect(()=>{if(!b)return;const De=$n(pe.current).getElementById(b);if(De){const mt=()=>{getSelection().isCollapsed&&pe.current.focus()};return De.addEventListener("click",mt),()=>{De.removeEventListener("click",mt)}}},[b]);const Qe=(De,mt)=>{De?L&&L(mt):k&&k(mt),fe||(Se(l?null:Ue.clientWidth),G(De))},Ne=De=>{De.button===0&&(De.preventDefault(),pe.current.focus(),Qe(!0,De))},We=De=>{Qe(!1,De)},qe=T.Children.toArray(c),Nn=De=>{const mt=qe.find(Bt=>Bt.props.value===De.target.value);mt!==void 0&&(te(mt.props.value),N&&N(De,mt))},Yt=De=>mt=>{let Bt;if(mt.currentTarget.hasAttribute("tabindex")){if(I){Bt=Array.isArray(B)?B.slice():[];const Lr=B.indexOf(De.props.value);Lr===-1?Bt.push(De.props.value):Bt.splice(Lr,1)}else Bt=De.props.value;if(De.props.onClick&&De.props.onClick(mt),B!==Bt&&(te(Bt),N)){const Lr=mt.nativeEvent||mt,ws=new Lr.constructor(Lr.type,Lr);
vendor: 5,306 bytes, line 192
192Object.defineProperty(ws,"target",{writable:!0,value:{value:Bt,name:P}}),N(ws,De)}I||Qe(!1,mt)}},Jt=De=>{K||[" ","ArrowUp","ArrowDown","Enter"].indexOf(De.key)!==-1&&(De.preventDefault(),Qe(!0,De))},Tn=ue!==null&&M,_t=De=>{!Tn&&x&&(Object.defineProperty(De,"target",{writable:!0,value:{value:B,name:P}}),x(De))};delete Z["aria-invalid"];let Je,mn;const jt=[];let at=!1;(mv({value:B})||v)&&(ne?Je=ne(B):at=!0);const bn=qe.map(De=>{if(!T.isValidElement(De))return null;let mt;if(I){if(!Array.isArray(B))throw new Error(Hs(2));mt=B.some(Bt=>YP(Bt,De.props.value)),mt&&at&&jt.push(De.props.children)}else mt=YP(B,De.props.value),mt&&at&&(mn=De.props.children);return T.cloneElement(De,{"aria-selected":mt?"true":"false",onClick:Yt(De),onKeyUp:Bt=>{Bt.key===" "&&Bt.preventDefault(),De.props.onKeyUp&&De.props.onKeyUp(Bt)},role:"option",selected:mt,value:void 0,"data-value":De.props.value})});at&&(I?jt.length===0?Je=null:Je=jt.reduce((De,mt,Bt)=>(De.push(mt),Bt<jt.length-1&&De.push(", "),De),[]):Je=mn);let Dn=Re;!l&&fe&&ue&&(Dn=Ue.clientWidth);let Mn;typeof X<"u"?Mn=X:Mn=g?null:0;const et=Q.id||(P?`mui-component-select-${P}`:void 0),Le=O({},e,{variant:J,value:B,open:Tn,error:E}),Nt=GX(Le),Mr=O({},C.PaperProps,(r=C.slotProps)==null?void 0:r.paper),di=Kp();return A.jsxs(T.Fragment,{children:[A.jsx(zX,O({ref:kt,tabIndex:Mn,role:"combobox","aria-controls":di,"aria-disabled":g?"true":void 0,"aria-expanded":Tn?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[b,et].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:Jt,onMouseDown:g||K?null:Ne,onBlur:_t,onFocus:V},Q,{ownerState:Le,className:Ve(Q.className,Nt.select,d),id:et,children:HX(Je)?QP||(QP=A.jsx("span",{className:"notranslate",children:"​"})):Je})),A.jsx(qX,O({"aria-invalid":E,value:Array.isArray(B)?B.join(","):B,name:P,ref:ae,"aria-hidden":!0,onChange:Nn,tabIndex:-1,disabled:g,className:Nt.nativeInput,autoFocus:o,ownerState:Le},Z)),A.jsx(WX,{as:S,className:Nt.icon,ownerState:Le}),A.jsx(TX,O({id:`menu-${P||""}`,anchorEl:Ue,open:Tn,onClose:We,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},C,{MenuListProps:O({"aria-labelledby":b,role:"listbox","aria-multiselectable":I?"true":void 0,disableListWrap:!0,id:di},C.MenuListProps),slotProps:O({},C.slotProps,{paper:O({},Mr,{style:O({minWidth:Dn},Mr!=null?Mr.style:null)})}),children:bn}))]})}),QX=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],YX=["root"],JX=t=>{const{classes:e}=t;return e},BI={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>vs(t)&&t!=="variant",slot:"Root"},XX=_e($I,BI)(""),ZX=_e(jI,BI)(""),eZ=_e(FI,BI)(""),sV=T.forwardRef(function(e,n){const r=ot({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:s,classes:o={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:h=xQ,id:m,input:g,inputProps:v,label:E,labelId:S,MenuProps:w,multiple:b=!1,native:C=!1,onClose:I,onOpen:P,open:x,renderValue:N,SelectDisplayProps:k,variant:V="outlined"}=r,L=ve(r,QX),F=C?CX:KX,K=bu(),ne=Od({props:r,muiFormControl:K,states:["variant","error"]}),Q=ne.variant||V,X=O({},r,{variant:Q,classes:o}),ee=JX(X),J=ve(ee,YX),Z=g||{standard:A.jsx(XX,{ownerState:X}),outlined:A.jsx(ZX,{label:E,ownerState:X}),filled:A.jsx(eZ,{ownerState:X})}[Q],B=wn(n,Z.ref);return A.jsx(T.Fragment,{children:T.cloneElement(Z,O({inputComponent:F,inputProps:O({children:s,error:ne.error,IconComponent:h,variant:Q,type:void 0,multiple:b},C?{id:m}:{autoWidth:i,defaultOpen:c,displayEmpty:d,labelId:S,MenuProps:w,onClose:I,onOpen:P,open:x,renderValue:N,SelectDisplayProps:O({id:m},k)},v,{classes:v?kr(J,v.classes):J},g?g.props.inputProps:{})},(b&&C||d)&&Q==="outlined"?{notched:!0}:{},{ref:B,className:Ve(Z.props.className,l,ee.root)},!g&&{variant:Q},L))})});sV.muiName="Select";function tZ(t){return it("MuiSnackbarContent",t)}Ze("MuiSnackbarContent",["root","message","action"]);const nZ=["action","className","message","role"],rZ=t=>{const{classes:e}=t;return rt({root:["root"],action:["action"],message:["message"]},tZ,e)},iZ=_e(Tu,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,n=zr.emphasize(t.palette.background.default,e);return O({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),sZ=_e("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),oZ=_e("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),aZ=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiSnackbarContent"}),{action:i,className:s,message:o,role:l="alert"}=r,c=ve(r,nZ),d=r,h=rZ(d);return A.jsxs(iZ,O({role:l,square:!0,elevation:6,className:Ve(h.root,s),ownerState:d,ref:n}
vendor: 5,962 bytes, line 192
192,c,{children:[A.jsx(sZ,{className:h.message,ownerState:d,children:o}),i?A.jsx(oZ,{className:h.action,ownerState:d,children:i}):null]}))});function lZ(t){return it("MuiSnackbar",t)}Ze("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const uZ=["onEnter","onExited"],cZ=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],dZ=t=>{const{classes:e,anchorOrigin:n}=t,r={root:["root",`anchorOrigin${Ie(n.vertical)}${Ie(n.horizontal)}`]};return rt(r,lZ,e)},JP=_e("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`anchorOrigin${Ie(n.anchorOrigin.vertical)}${Ie(n.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return O({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:O({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&n,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),fZ=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiSnackbar"}),i=Or(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:o,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:h,className:m,ClickAwayListenerProps:g,ContentProps:v,disableWindowBlurListener:E=!1,message:S,open:w,TransitionComponent:b=pp,transitionDuration:C=s,TransitionProps:{onEnter:I,onExited:P}={}}=r,x=ve(r.TransitionProps,uZ),N=ve(r,cZ),k=O({},r,{anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:d,disableWindowBlurListener:E,TransitionComponent:b,transitionDuration:C}),V=dZ(k),{getRootProps:L,onClickAway:F}=lQ(O({},k)),[K,ne]=T.useState(!0),Q=La({elementType:JP,getSlotProps:L,externalForwardedProps:N,ownerState:k,additionalProps:{ref:n},className:[V.root,m]}),X=J=>{ne(!0),P&&P(J)},ee=(J,Z)=>{ne(!1),I&&I(J,Z)};return!w&&K?null:A.jsx(kK,O({onClickAway:F},g,{children:A.jsx(JP,O({},Q,{children:A.jsx(b,O({appear:!0,in:w,timeout:C,direction:l==="top"?"down":"up",onEnter:ee,onExited:X},x,{children:h||A.jsx(aZ,O({message:S,action:o},v))}))}))}))});function hZ(t){return it("MuiTooltip",t)}const ba=Ze("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),pZ=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function mZ(t){return Math.round(t*1e5)/1e5}const gZ=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:i,placement:s}=t,o={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Ie(s.split("-")[0])}`],arrow:["arrow"]};return rt(o,hZ,e)},yZ=_e(HL,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>O({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${ba.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ba.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ba.arrow}`]:O({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${ba.arrow}`]:O({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),vZ=_e("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${Ie(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>O({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:zr.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${mZ(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${ba.popper}[data-popper-placement*="left"] &`]:O({transformOrigin:"right center"},e.isRtl?O({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):O({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${ba.popper}[data-popper-placement*="right"] &`]:O({transformOrigin:"left center"},e.isRtl?O({marginRight:"14px"},e.touch&&{marginRight:"24px"}):O({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${ba.popper}
192[data-popper-placement*="top"] &`]:O({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${ba.popper}[data-popper-placement*="bottom"] &`]:O({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),_Z=_e("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:zr.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let ay=!1;const XP=new Qp;let Zf={x:0,y:0};function ly(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const wZ=T.forwardRef(function(e,n){var r,i,s,o,l,c,d,h,m,g,v,E,S,w,b,C,I,P,x;const N=ot({props:e,name:"MuiTooltip"}),{arrow:k=!1,children:V,components:L={},componentsProps:F={},describeChild:K=!1,disableFocusListener:ne=!1,disableHoverListener:Q=!1,disableInteractive:X=!1,disableTouchListener:ee=!1,enterDelay:J=100,enterNextDelay:Z=0,enterTouchDelay:B=700,followCursor:te=!1,id:M,leaveDelay:G=0,leaveTouchDelay:ae=1500,onClose:pe,onOpen:ue,open:Ee,placement:fe="bottom",PopperComponent:Re,PopperProps:Se={},slotProps:Me={},slots:kt={},title:Ue,TransitionComponent:Qe=pp,TransitionProps:Ne}=N,We=ve(N,pZ),qe=T.isValidElement(V)?V:A.jsx("span",{children:V}),Nn=Or(),Yt=kL(),[Jt,Tn]=T.useState(),[_t,Je]=T.useState(null),mn=T.useRef(!1),jt=X||te,at=Fl(),bn=Fl(),Dn=Fl(),Mn=Fl(),[et,Le]=op({controlled:Ee,default:!1,name:"Tooltip",state:"open"});let Nt=et;const Mr=Kp(M),di=T.useRef(),De=Ui(()=>{di.current!==void 0&&(document.body.style.WebkitUserSelect=di.current,di.current=void 0),Mn.clear()});T.useEffect(()=>De,[De]);const mt=Ye=>{XP.clear(),ay=!0,Le(!0),ue&&!Nt&&ue(Ye)},Bt=Ui(Ye=>{XP.start(800+G,()=>{ay=!1}),Le(!1),pe&&Nt&&pe(Ye),at.start(Nn.transitions.duration.shortest,()=>{mn.current=!1})}),Lr=Ye=>{mn.current&&Ye.type!=="touchstart"||(Jt&&Jt.removeAttribute("title"),bn.clear(),Dn.clear(),J||ay&&Z?bn.start(ay?Z:J,()=>{mt(Ye)}):mt(Ye))},ws=Ye=>{bn.clear(),Dn.start(G,()=>{Bt(Ye)})},{isFocusVisibleRef:Du,onBlur:rf,onFocus:sf,ref:Bo}=l_(),[,so]=T.useState(!1),of=Ye=>{rf(Ye),Du.current===!1&&(so(!1),ws(Ye))},af=Ye=>{Jt||Tn(Ye.currentTarget),sf(Ye),Du.current===!0&&(so(!0),Lr(Ye))},lf=Ye=>{mn.current=!0;const mr=qe.props;mr.onTouchStart&&mr.onTouchStart(Ye)},jm=Ye=>{lf(Ye),Dn.clear(),at.clear(),De(),di.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Mn.start(B,()=>{document.body.style.WebkitUserSelect=di.current,Lr(Ye)})},Bm=Ye=>{qe.props.onTouchEnd&&qe.props.onTouchEnd(Ye),De(),Dn.start(ae,()=>{Bt(Ye)})};T.useEffect(()=>{if(!Nt)return;function Ye(mr){(mr.key==="Escape"||mr.key==="Esc")&&Bt(mr)}return document.addEventListener("keydown",Ye),()=>{document.removeEventListener("keydown",Ye)}},[Bt,Nt]);const uf=wn(qe.ref,Bo,Tn,n);!Ue&&Ue!==0&&(Nt=!1);const Mu=T.useRef(),ll=Ye=>{const mr=qe.props;mr.onMouseMove&&mr.onMouseMove(Ye),Zf={x:Ye.clientX,y:Ye.clientY},Mu.current&&Mu.current.update()},oo={},ao=typeof Ue=="string";K?(oo.title=!Nt&&ao&&!Q?Ue:null,oo["aria-describedby"]=Nt?Mr:null):(oo["aria-label"]=ao?Ue:null,oo["aria-labelledby"]=Nt&&!ao?Mr:null);const fi=O({},oo,We,qe.props,{className:Ve(We.className,qe.props.className),onTouchStart:lf,ref:uf},te?{onMouseMove:ll}:{}),Zi={};ee||(fi.onTouchStart=jm,fi.onTouchEnd=Bm),Q||(fi.onMouseOver=ly(Lr,fi.onMouseOver),fi.onMouseLeave=ly(ws,fi.onMouseLeave),jt||(Zi.onMouseOver=Lr,Zi.onMouseLeave=ws)),ne||(fi.onFocus=ly(af,fi.onFocus),fi.onBlur=ly(of,fi.onBlur),jt||(Zi.onFocus=af,Zi.onBlur=of));const Lu=T.useMemo(()=>{var Ye;let mr=[{name:"arrow",enabled:!!_t,options:{element:_t,padding:4}}];return(Ye=Se.popperOptions)!=null&&Ye.modifiers&&(mr=mr.concat(Se.popperOptions.modifiers)),O({},Se.popperOptions,{modifiers:mr})},[_t,Se]),Es=O({},N,{isRtl:Yt,arrow:k,disableInteractive:jt,placement:fe,PopperComponentProp:Re,touch:mn.current}),ul=gZ(Es),zm=(r=(i=kt.popper)!=null?i:L.Popper)!=null?r:yZ,Wm=(s=(o=(l=kt.transition)!=null?l:L.Transition)!=null?o:Qe)!=null?s:pp,qm=(c=(d=kt.tooltip)!=null?d:L.Tooltip)!=null?c:vZ,Ss=(h=(m=kt.arrow)!=null?m:L.Arrow)!=null?h:_Z,Hm=Oc(zm,O({},Se,(g=Me.popper)!=null?g:F.popper,{className:Ve(ul.popper,Se?.className,(v=(E=Me.popper)!=null?E:F.popper)==null?void 0:v.className)}),Es),Gm=Oc(Wm,O({},Ne,(S=Me.transition)!=null?S:F.transition),Es),oE=Oc(qm,O({},(w=Me.tooltip)!=null?w:F.tooltip,{className:Ve(ul.tooltip,(b=(C=Me.tooltip)!=null?C:F.tooltip)==null?void 0:b.className)}),Es),Km=Oc(Ss,O({},(I=Me.arrow)!=null?I:F.arrow,{className:Ve(ul.arrow,(P=(x=Me.arrow)!=null?x:F.arrow)==null?void 0:P.className)}),Es);return A.jsxs(T.Fragment,{children:[T.cloneElement(qe,fi),A.jsx(zm,O({as:Re??HL,placement:fe,anchorEl:te?{getBoundingClientRect:()=>({top:Zf.y,left:Zf.x,right:Zf.x,bottom:Zf.y,width:0,height:0})}:Jt,popperRef:Mu,open:Jt?Nt:!1,id:Mr,transition:!0},Zi,Hm,{popperOptions:Lu,children:({TransitionProps:Ye})=>A.jsx(Wm,O({timeout:Nn.transitions.duration.shorter},Ye,Gm,{children:A.jsxs(qm,O({}
192,oE,{children:[Ue,k?A.jsx(Ss,O({},Km,{ref:Je})):null]}))}))}))]})});function EZ(t){return it("MuiTextField",t)}Ze("MuiTextField",["root"]);const SZ=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],TZ={standard:$I,filled:FI,outlined:jI},bZ=t=>{const{classes:e}=t;return rt({root:["root"]},EZ,e)},IZ=_e(qY,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),RZ=T.forwardRef(function(e,n){const r=ot({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:s=!1,children:o,className:l,color:c="primary",defaultValue:d,disabled:h=!1,error:m=!1,FormHelperTextProps:g,fullWidth:v=!1,helperText:E,id:S,InputLabelProps:w,inputProps:b,InputProps:C,inputRef:I,label:P,maxRows:x,minRows:N,multiline:k=!1,name:V,onBlur:L,onChange:F,onFocus:K,placeholder:ne,required:Q=!1,rows:X,select:ee=!1,SelectProps:J,type:Z,value:B,variant:te="outlined"}=r,M=ve(r,SZ),G=O({},r,{autoFocus:s,color:c,disabled:h,error:m,fullWidth:v,multiline:k,required:Q,select:ee,variant:te}),ae=bZ(G),pe={};te==="outlined"&&(w&&typeof w.shrink<"u"&&(pe.notched=w.shrink),pe.label=P),ee&&((!J||!J.native)&&(pe.id=void 0),pe["aria-describedby"]=void 0);const ue=Kp(S),Ee=E&&ue?`${ue}-helper-text`:void 0,fe=P&&ue?`${ue}-label`:void 0,Re=TZ[te],Se=A.jsx(Re,O({"aria-describedby":Ee,autoComplete:i,autoFocus:s,defaultValue:d,fullWidth:v,multiline:k,name:V,rows:X,maxRows:x,minRows:N,type:Z,value:B,id:ue,inputRef:I,onBlur:L,onChange:F,onFocus:K,placeholder:ne,inputProps:b},pe,C));return A.jsxs(IZ,O({className:Ve(ae.root,l),disabled:h,error:m,fullWidth:v,ref:n,required:Q,color:c,variant:te,ownerState:G},M,{children:[P!=null&&P!==""&&A.jsx(qJ,O({htmlFor:ue,id:fe},w,{children:P})),ee?A.jsx(sV,O({"aria-describedby":Ee,id:ue,labelId:fe,value:B,input:Se},J,{children:o})):Se,E&&A.jsx(YY,O({id:Ee},g,{children:E}))]}))}),xZ=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function kZ(t={}){const{disableGlobal:e=!1,productionPrefix:n="jss",seed:r=""}=t,i=r===""?"":`${r}-`;let s=0;const o=()=>(s+=1,s);return(l,c)=>{const d=c.options.name;if(d&&d.indexOf("Mui")===0&&!c.options.link&&!e){if(xZ.indexOf(l.key)!==-1)return`Mui-${l.key}`;const h=`${i}${d}-${l.key}`;return!c.options.theme[RL]||r!==""?h:`${h}-${o()}`}return`${i}${n}${o()}`}}var ZP=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm=(typeof window>"u"?"undefined":ZP(window))==="object"&&(typeof document>"u"?"undefined":ZP(document))==="object"&&document.nodeType===9;function eO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,CL(r.key),r)}}function Ci(t,e,n){return e&&eO(t.prototype,e),n&&eO(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var CZ={}.constructor;function VT(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(VT);if(t.constructor!==CZ)return t;var e={};for(var n in t)e[n]=VT(t[n]);return e}function zI(t,e,n){t===void 0&&(t="unnamed");var r=n.jss,i=VT(e),s=r.plugins.onCreateRule(t,i,n);return s||(t[0],null)}var tO=function(e,n){for(var r="",i=0;i<e.length&&e[i]!=="!important";i++)r&&(r+=n),r+=e[i];return r},Ql=function(e){if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&e[r]!=="!important";r++)n&&(n+=", "),n+=tO(e[r]," ");else n=tO(e,", ");return e[e.length-1]==="!important"&&(n+=" !important"),n};function Nd(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
193`,space:" "}}function eh(t,e){for(var n="",r=0;r<e;r++)n+="  ";return n+t}function mp(t,e,n){n===void 0&&(n={});var r="";if(!e)return r;var i=n,s=i.indent,o=s===void 0?0:s,l=e.fallbacks;n.format===!1&&(o=-1/0);var c=Nd(n),d=c.linebreak,h=c.space;if(t&&o++,l)if(Array.isArray(l))for(var m=0;m<l.length;m++){var g=l[m];for(var v in g){var E=g[v];E!=null&&(r&&(r+=d),r+=eh(v+":"+h+Ql(E)+";",o))}}else for(var S in l){var w=l[S];w!=null&&(r&&(r+=d),r+=eh(S+":"+h+Ql(w)+";",o))}for(var b in e){var C=e[b];C!=null&&b!=="fallbacks"&&(r&&(r+=d),r+=eh(b+":"+h+Ql(C)+";",o))}return!r&&!n.allowEmpty||!t?r:(o--,r&&(r=""+d+r+d),eh(""+t+h+"{"+r,o)+eh("}",o))}var AZ=/([[\].#*$><+~=|^:(),"'`\s])/g,nO=typeof CSS<"u"&&CSS.escape,WI=(function(t){return nO?nO(t):t.replace(AZ,"\\$1")}),oV=(function(){function t(n,r,i){this.type="style",this.isProcessed=!1;var s=i.sheet,o=i.Renderer;this.key=n,this.options=i,this.style=r,s?this.renderer=s.renderer:o&&
193(this.renderer=new o)}var e=t.prototype;return e.prop=function(r,i,s){if(i===void 0)return this.style[r];var o=s?s.force:!1;if(!o&&this.style[r]===i)return this;var l=i;(!s||s.process!==!1)&&(l=this.options.jss.plugins.onChangeValue(i,r,this));var c=l==null||l===!1,d=r in this.style;if(c&&!d&&!o)return this;var h=c&&d;if(h?delete this.style[r]:this.style[r]=l,this.renderable&&this.renderer)return h?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,l),this;var m=this.options.sheet;return m&&m.attached,this},t})(),FT=(function(t){R_(e,t);function e(r,i,s){var o;o=t.call(this,r,i,s)||this;var l=s.selector,c=s.scoped,d=s.sheet,h=s.generateId;return l?o.selectorText=l:c!==!1&&(o.id=h(Gs(Gs(o)),d),o.selectorText="."+WI(o.id)),o}var n=e.prototype;return n.applyTo=function(i){var s=this.renderer;if(s){var o=this.toJSON();for(var l in o)s.setProperty(i,l,o[l])}return this},n.toJSON=function(){var i={};for(var s in this.style){var o=this.style[s];typeof o!="object"?i[s]=o:Array.isArray(o)&&(i[s]=Ql(o))}return i},n.toString=function(i){var s=this.options.sheet,o=s?s.options.link:!1,l=o?O({},i,{allowEmpty:!0}):i;return mp(this.selectorText,this.style,l)},Ci(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var s=this.renderer,o=this.renderable;if(!(!o||!s)){var l=s.setSelector(o,i);l||s.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),e})(oV),PZ={onCreateRule:function(e,n,r){return e[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new FT(e,n,r)}},hS={indent:1,children:!0},OZ=/@([\w-]+)/,NZ=(function(){function t(n,r,i){this.type="conditional",this.isProcessed=!1,this.key=n;var s=n.match(OZ);this.at=s?s[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new L_(O({},i,{parent:this}));for(var o in r)this.rules.add(o,r[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(r){return this.rules.get(r)},e.indexOf=function(r){return this.rules.indexOf(r)},e.addRule=function(r,i,s){var o=this.rules.add(r,i,s);return o?(this.options.jss.plugins.onProcessRule(o),o):null},e.replaceRule=function(r,i,s){var o=this.rules.replace(r,i,s);return o&&this.options.jss.plugins.onProcessRule(o),o},e.toString=function(r){r===void 0&&(r=hS);var i=Nd(r),s=i.linebreak;if(r.indent==null&&(r.indent=hS.indent),r.children==null&&(r.children=hS.children),r.children===!1)return this.query+" {}";var o=this.rules.toString(r);return o?this.query+" {"+s+o+s+"}":""},t})(),DZ=/@container|@media|@supports\s+/,MZ={onCreateRule:function(e,n,r){return DZ.test(e)?new NZ(e,n,r):null}},pS={indent:1,children:!0},LZ=/@keyframes\s+([\w-]+)/,$T=(function(){function t(n,r,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var s=n.match(LZ);s&&s[1]?this.name=s[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var o=i.scoped,l=i.sheet,c=i.generateId;this.id=o===!1?this.name:WI(c(this,l)),this.rules=new L_(O({},i,{parent:this}));for(var d in r)this.rules.add(d,r[d],O({},i,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(r){r===void 0&&(r=pS);var i=Nd(r),s=i.linebreak;if(r.indent==null&&(r.indent=pS.indent),r.children==null&&(r.children=pS.children),r.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(r);return o&&(o=""+s+o+s),this.at+" "+this.id+" {"+o+"}"},t})(),VZ=/@keyframes\s+/,FZ=/\$([\w-]+)/g,UT=function(e,n){return typeof e=="string"?e.replace(FZ,function(r,i){return i in n?n[i]:r}):e},rO=function(e,n,r){var i=e[n],s=UT(i,r);s!==i&&(e[n]=s)},$Z={onCreateRule:function(e,n,r){return typeof e=="string"&&VZ.test(e)?new $T(e,n,r):null},onProcessStyle:function(e,n,r){return n.type!=="style"||!r||("animation-name"in e&&rO(e,"animation-name",r.keyframes),"animation"in e&&rO(e,"animation",r.keyframes)),e},onChangeValue:function(e,n,r){var i=r.options.sheet;if(!i)return e;switch(n){case"animation":return UT(e,i.keyframes);case"animation-name":return UT(e,i.keyframes);default:return e}}},UZ=(function(t){R_(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.toString=function(i){var s=this.options.sheet,o=s?s.options.link:!1,l=o?O({},i,{allowEmpty:!0}):i;return mp(this.key,this.style,l)},e})(oV),jZ={onCreateRule:function(e,n,r){return r.parent&&r.parent.type==="
193keyframes"?new UZ(e,n,r):null}},BZ=(function(){function t(n,r,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var e=t.prototype;return e.toString=function(r){var i=Nd(r),s=i.linebreak;if(Array.isArray(this.style)){for(var o="",l=0;l<this.style.length;l++)o+=mp(this.at,this.style[l]),this.style[l+1]&&(o+=s);return o}return mp(this.at,this.style,r)},t})(),zZ=/@font-face/,WZ={onCreateRule:function(e,n,r){return zZ.test(e)?new BZ(e,n,r):null}},qZ=(function(){function t(n,r,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var e=t.prototype;return e.toString=function(r){return mp(this.key,this.style,r)},t})(),HZ={onCreateRule:function(e,n,r){return e==="@viewport"||e==="@-ms-viewport"?new qZ(e,n,r):null}},GZ=(function(){function t(n,r,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=r,this.options=i}var e=t.prototype;return e.toString=function(r){if(Array.isArray(this.value)){for(var i="",s=0;s<this.value.length;s++)i+=this.key+" "+this.value[s]+";",this.value[s+1]&&(i+=`
194`);return i}return this.key+" "+this.value+";"},t})(),KZ={"@charset":!0,"@import":!0,"@namespace":!0},QZ={onCreateRule:function(e,n,r){return e in KZ?new GZ(e,n,r):null}},iO=[PZ,MZ,$Z,jZ,WZ,HZ,QZ],YZ={process:!0},sO={force:!0,process:!0},L_=(function(){function t(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var e=t.prototype;return e.add=function(r,i,s){var o=this.options,l=o.parent,c=o.sheet,d=o.jss,h=o.Renderer,m=o.generateId,g=o.scoped,v=O({classes:this.classes,parent:l,sheet:c,jss:d,Renderer:h,generateId:m,scoped:g,name:r,keyframes:this.keyframes,selector:void 0},s),E=r;r in this.raw&&(E=r+"-d"+this.counter++),this.raw[E]=i,E in this.classes&&(v.selector="."+WI(this.classes[E]));var S=zI(E,i,v);if(!S)return null;this.register(S);var w=v.index===void 0?this.index.length:v.index;return this.index.splice(w,0,S),S},e.replace=function(r,i,s){var o=this.get(r),l=this.index.indexOf(o);o&&this.remove(o);var c=s;return l!==-1&&(c=O({},s,{index:l})),this.add(r,i,c)},e.get=function(r){return this.map[r]},e.remove=function(r){this.unregister(r),delete this.raw[r.key],this.index.splice(this.index.indexOf(r),1)},e.indexOf=function(r){return this.index.indexOf(r)},e.process=function(){var r=this.options.jss.plugins;this.index.slice(0).forEach(r.onProcessRule,r)},e.register=function(r){this.map[r.key]=r,r instanceof FT?(this.map[r.selector]=r,r.id&&(this.classes[r.key]=r.id)):r instanceof $T&&this.keyframes&&(this.keyframes[r.name]=r.id)},e.unregister=function(r){delete this.map[r.key],r instanceof FT?(delete this.map[r.selector],delete this.classes[r.key]):r instanceof $T&&delete this.keyframes[r.name]},e.update=function(){var r,i,s;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(r=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],s=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],s=arguments.length<=1?void 0:arguments[1],r=null),r)this.updateOne(this.get(r),i,s);else for(var o=0;o<this.index.length;o++)this.updateOne(this.index[o],i,s)},e.updateOne=function(r,i,s){s===void 0&&(s=YZ);var o=this.options,l=o.jss.plugins,c=o.sheet;if(r.rules instanceof t){r.rules.update(i,s);return}var d=r.style;if(l.onUpdate(i,r,c,s),s.process&&d&&d!==r.style){l.onProcessStyle(r.style,r,c);for(var h in r.style){var m=r.style[h],g=d[h];m!==g&&r.prop(h,m,sO)}for(var v in d){var E=r.style[v],S=d[v];E==null&&E!==S&&r.prop(v,null,sO)}}},e.toString=function(r){for(var i="",s=this.options.sheet,o=s?s.options.link:!1,l=Nd(r),c=l.linebreak,d=0;d<this.index.length;d++){var h=this.index[d],m=h.toString(r);!m&&!o||(i&&(i+=c),i+=m)}return i},t})(),aV=(function(){function t(n,r){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=O({},r,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),r.Renderer&&(this.renderer=new r.Renderer(this)),this.rules=new L_(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(r,i,s){var o=this.queue;
194this.attached&&!o&&(this.queue=[]);var l=this.rules.add(r,i,s);return l?(this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&(o?o.push(l):(this.insertRule(l),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),l):(this.deployed=!1,l)):null},e.replaceRule=function(r,i,s){var o=this.rules.get(r);if(!o)return this.addRule(r,i,s);var l=this.rules.replace(r,i,s);return l&&this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&this.renderer&&(l?o.renderable&&this.renderer.replaceRule(o.renderable,l):this.renderer.deleteRule(o)),l):(this.deployed=!1,l)},e.insertRule=function(r){this.renderer&&this.renderer.insertRule(r)},e.addRules=function(r,i){var s=[];for(var o in r){var l=this.addRule(o,r[o],i);l&&s.push(l)}return s},e.getRule=function(r){return this.rules.get(r)},e.deleteRule=function(r){var i=typeof r=="object"?r:this.rules.get(r);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(r){return this.rules.indexOf(r)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var r;return(r=this.rules).update.apply(r,arguments),this},e.updateOne=function(r,i,s){return this.rules.updateOne(r,i,s),this},e.toString=function(r){return this.rules.toString(r)},t})(),JZ=(function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(r,i,s){for(var o=0;o<this.registry.onCreateRule.length;o++){var l=this.registry.onCreateRule[o](r,i,s);if(l)return l}return null},e.onProcessRule=function(r){if(!r.isProcessed){for(var i=r.options.sheet,s=0;s<this.registry.onProcessRule.length;s++)this.registry.onProcessRule[s](r,i);r.style&&this.onProcessStyle(r.style,r,i),r.isProcessed=!0}},e.onProcessStyle=function(r,i,s){for(var o=0;o<this.registry.onProcessStyle.length;o++)i.style=this.registry.onProcessStyle[o](i.style,i,s)},e.onProcessSheet=function(r){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](r)},e.onUpdate=function(r,i,s,o){for(var l=0;l<this.registry.onUpdate.length;l++)this.registry.onUpdate[l](r,i,s,o)},e.onChangeValue=function(r,i,s){for(var o=r,l=0;l<this.registry.onChangeValue.length;l++)o=this.registry.onChangeValue[l](o,i,s);return o},e.use=function(r,i){i===void 0&&(i={queue:"external"});var s=this.plugins[i.queue];s.indexOf(r)===-1&&(s.push(r),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(o,l){for(var c in l)c in o&&o[c].push(l[c]);return o},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t})(),XZ=(function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(r){var i=this.registry,s=r.options.index;if(i.indexOf(r)===-1){if(i.length===0||s>=this.index){i.push(r);return}for(var o=0;o<i.length;o++)if(i[o].options.index>s){i.splice(o,0,r);return}}},e.reset=function(){this.registry=[]},e.remove=function(r){var i=this.registry.indexOf(r);this.registry.splice(i,1)},e.toString=function(r){for(var i=r===void 0?{}:r,s=i.attached,o=ve(i,["attached"]),l=Nd(o),c=l.linebreak,d="",h=0;h<this.registry.length;h++){var m=this.registry[h];s!=null&&m.attached!==s||(d&&(d+=c),d+=m.toString(o))}return d},Ci(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t})(),zh=new XZ,jT=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),BT="2f1acc6c3a606b082e5eef5e54414ffb";jT[BT]==null&&(jT[BT]=0);var oO=jT[BT]++,aO=function(e){e===void 0&&(e={});var n=0,r=function(s,o){n+=1;var l="",c="";return o&&(o.options.classNamePrefix&&(c=o.options.classNamePrefix),o.options.jss.id!=null&&(l=String(o.options.jss.id))),e.minify?""+(c||"c")+oO+l+n:c+s.key+"-"+oO+(l?"-"+l:"")+"-"+n};return r},lV=function(e){var n;return function(){return n||(n=e()),n}},ZZ=function(e,n){try{return e.attributeStyleMap?e.attributeStyleMap.get(n):e.style.getPropertyValue(n)}catch{return""}},eee=function(e,n,r){try{var i=r;if(Array.isArray(r)&&(i=Ql(r)),e.attributeStyleMap)e.attributeStyleMap.set(n,i);else{var s=i?i.indexOf("!important"):-1,o=s>-1?i.substr(0,s-1):i;e.style.setProperty(n,o,s>-1?"important":"")}}catch{return!1}return!0},tee=function(e,n){try{e.attributeStyleMap?e.attributeStyleMap.delete(n):e.style.removeProperty(n)}catch{}},nee=function(e,n){return e.selectorText=n,e.selectorText===n},uV=lV(function(){return document.querySelector("head")});function ree(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.attached&&r.options.index>e.index&&r.options.insertionPoint===e.insertionPoint)return r}return null}function iee(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.attached&&r.options.insertionPoint===e.insertionPoint)return r}return null}function see(t){for(var e=uV(),n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];
194if(r.nodeType===8&&r.nodeValue.trim()===t)return r}return null}function oee(t){var e=zh.registry;if(e.length>0){var n=ree(e,t);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=iee(e,t),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=t.insertionPoint;if(r&&typeof r=="string"){var i=see(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function aee(t,e){var n=e.insertionPoint,r=oee(e);if(r!==!1&&r.parent){r.parent.insertBefore(t,r.node);return}if(n&&typeof n.nodeType=="number"){var i=n,s=i.parentNode;s&&s.insertBefore(t,i.nextSibling);return}uV().appendChild(t)}var lee=lV(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),lO=function(e,n,r){try{"insertRule"in e?e.insertRule(n,r):"appendRule"in e&&e.appendRule(n)}catch{return!1}return e.cssRules[r]},uO=function(e,n){var r=e.cssRules.length;return n===void 0||n>r?r:n},uee=function(){var e=document.createElement("style");return e.textContent=`
195`,e},cee=(function(){function t(n){this.getPropertyValue=ZZ,this.setProperty=eee,this.removeProperty=tee,this.setSelector=nee,this.hasInsertedRules=!1,this.cssRules=[],n&&zh.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},i=r.media,s=r.meta,o=r.element;this.element=o||uee(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),s&&this.element.setAttribute("data-meta",s);var l=lee();l&&this.element.setAttribute("nonce",l)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){aee(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
196`)}},e.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=`
197`+r.toString()+`
198`}},e.insertRules=function(r,i){for(var s=0;s<r.index.length;s++)this.insertRule(r.index[s],s,i)},e.insertRule=function(r,i,s){if(s===void 0&&(s=this.element.sheet),r.rules){var o=r,l=s;if(r.type==="conditional"||r.type==="keyframes"){var c=uO(s,i);if(l=lO(s,o.toString({children:!1}),c),l===!1)return!1;this.refCssRule(r,c,l)}return this.insertRules(o.rules,l),l}var d=r.toString();if(!d)return!1;var h=uO(s,i),m=lO(s,d,h);return m===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(r,h,m),m)},e.refCssRule=function(r,i,s){r.renderable=s,r.options.parent instanceof aV&&this.cssRules.splice(i,0,s)},e.deleteRule=function(r){var i=this.element.sheet,s=this.indexOf(r);return s===-1?!1:(i.deleteRule(s),this.cssRules.splice(s,1),!0)},e.indexOf=function(r){return this.cssRules.indexOf(r)},e.replaceRule=function(r,i){var s=this.indexOf(r);return s===-1?!1:(this.element.sheet.deleteRule(s),this.cssRules.splice(s,1),this.insertRule(i,s))},e.getRules=function(){return this.element.sheet.cssRules},t})(),dee=0,fee=(function(){function t(n){this.id=dee++,this.version="10.10.0",this.plugins=new JZ,this.options={id:{minify:!1},createGenerateId:aO,Renderer:rm?cee:null,plugins:[]},this.generateId=aO({minify:!1});for(var r=0;r<iO.length;r++)this.plugins.use(iO[r],{queue:"internal"});this.setup(n)}var e=t.prototype;return e.setup=function(r){return r===void 0&&(r={}),r.createGenerateId&&(this.options.createGenerateId=r.createGenerateId),r.id&&(this.options.id=O({},this.options.id,r.id)),(r.createGenerateId||r.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),r.insertionPoint!=null&&(this.options.insertionPoint=r.insertionPoint),"Renderer"in r&&(this.options.Renderer=r.Re
198nderer),r.plugins&&this.use.apply(this,r.plugins),this},e.createStyleSheet=function(r,i){i===void 0&&(i={});var s=i,o=s.index;typeof o!="number"&&(o=zh.index===0?0:zh.index+1);var l=new aV(r,O({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:o}));return this.plugins.onProcessSheet(l),l},e.removeStyleSheet=function(r){return r.detach(),zh.remove(r),this},e.createRule=function(r,i,s){if(i===void 0&&(i={}),s===void 0&&(s={}),typeof r=="object")return this.createRule(void 0,r,i);var o=O({},s,{name:r,jss:this,Renderer:this.options.Renderer});o.generateId||(o.generateId=this.generateId),o.classes||(o.classes={}),o.keyframes||(o.keyframes={});var l=zI(r,i,o);return l&&this.plugins.onProcessRule(l),l},e.use=function(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return s.forEach(function(l){r.plugins.use(l)}),this},t})(),cV=function(e){return new fee(e)},qI=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function dV(t){var e=null;for(var n in t){var r=t[n],i=typeof r;if(i==="function")e||(e={}),e[n]=r;else if(i==="object"&&r!==null&&!Array.isArray(r)){var s=dV(r);s&&(e||(e={}),e[n]=s)}}return e}/**
199 * A better abstraction over CSS.
200 *
201 * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
202 * @website https://github.com/cssinjs/jss
203 * @license MIT
204 */cV();var fV=Date.now(),mS="fnValues"+fV,gS="fnStyle"+ ++fV,hee=function(){return{onCreateRule:function(n,r,i){if(typeof r!="function")return null;var s=zI(n,{},i);return s[gS]=r,s},onProcessStyle:function(n,r){if(mS in r||gS in r)return n;var i={};for(var s in n){var o=n[s];typeof o=="function"&&(delete n[s],i[s]=o)}return r[mS]=i,n},onUpdate:function(n,r,i,s){var o=r,l=o[gS];l&&(o.style=l(n)||{});var c=o[mS];if(c)for(var d in c)o.prop(d,c[d](n),s)}}},ka="@global",zT="@global ",pee=(function(){function t(n,r,i){this.type="global",this.at=ka,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new L_(O({},i,{parent:this}));for(var s in r)this.rules.add(s,r[s]);this.rules.process()}var e=t.prototype;return e.getRule=function(r){return this.rules.get(r)},e.addRule=function(r,i,s){var o=this.rules.add(r,i,s);return o&&this.options.jss.plugins.onProcessRule(o),o},e.replaceRule=function(r,i,s){var o=this.rules.replace(r,i,s);return o&&this.options.jss.plugins.onProcessRule(o),o},e.indexOf=function(r){return this.rules.indexOf(r)},e.toString=function(r){return this.rules.toString(r)},t})(),mee=(function(){function t(n,r,i){this.type="global",this.at=ka,this.isProcessed=!1,this.key=n,this.options=i;var s=n.substr(zT.length);this.rule=i.jss.createRule(s,r,O({},i,{parent:this}))}var e=t.prototype;return e.toString=function(r){return this.rule?this.rule.toString(r):""},t})(),gee=/\s*,\s*/g;function hV(t,e){for(var n=t.split(gee),r="",i=0;i<n.length;i++)r+=e+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function yee(t,e){var n=t.options,r=t.style,i=r?r[ka]:null;if(i){for(var s in i)e.addRule(s,i[s],O({},n,{selector:hV(s,t.selector)}));delete r[ka]}}function vee(t,e){var n=t.options,r=t.style;for(var i in r)if(!(i[0]!=="@"||i.substr(0,ka.length)!==ka)){var s=hV(i.substr(ka.length),t.selector);e.addRule(s,r[i],O({},n,{selector:s})),delete r[i]}}function _ee(){function t(n,r,i){if(!n)return null;if(n===ka)return new pee(n,r,i);if(n[0]==="@"&&n.substr(0,zT.length)===zT)return new mee(n,r,i);var s=i.parent;return s&&(s.type==="global"||s.options.parent&&s.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=n),null}function e(n,r){n.type!=="style"||!r||(yee(n,r),vee(n,r))}return{onCreateRule:t,onProcessRule:e}}var cO=/\s*,\s*/g,wee=/&/g,Eee=/\$([\w-]+)/g;function See(){function t(i,s){return function(o,l){var c=i.getRule(l)||s&&s.getRule(l);return c?c.selector:l}}function e(i,s){for(var o=s.split(cO),l=i.split(cO),c="",d=0;d<o.length;d++)for(var h=o[d],m=0;m<l.length;m++){var g=l[m];c&&(c+=", "),c+=g.indexOf("&")!==-1?g.replace(wee,h):h+" "+g}return c}function n(i,s,o){if(o)return O({},o,{index:o.index+1});var l=i.options.nestingLevel;l=l===void 0?1:l+1;var c=O({},i.options,{nestingLevel:l,index:s.indexOf(i)+1});return delete c.name,c}function r(i,s,o){if(s.type!=="style")return i;var l=s,c=l.options.parent,d,h;for(var m in i){var g=m.indexOf("&")!==-1,v=m[0]==="@";if(!(!g&&!v)){if(d=n(l,c,d),g){var E=e(m,l.selector);h||(h=t(c,o)),E=E.replace(Eee,h);var S=l.key+"-"+m;"replaceRule"in c?c.replaceRule(S,i[m],O({},d,{selector:E})):c.addRule(S,i[m],O({},d,{selector:E}))}else v&&c.addRule(m,{},d).addRule(l.key,i[m],{selector:l.selector});delete i[m]}}return i}return{onProcessStyle:r}}var Tee=/[A-Z]/g,bee=/^ms-/,yS={};function Iee(t){return"-"+t.toLowerCase()}function pV(t){if(yS.hasOwnProperty(t))return yS[t];var e=t.replace(Tee,Iee);return yS[t]=bee.test(e)?"-"+e:e}
204function gv(t){var e={};for(var n in t){var r=n.indexOf("--")===0?n:pV(n);e[r]=t[n]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map(gv):e.fallbacks=gv(t.fallbacks)),e}function Ree(){function t(n){if(Array.isArray(n)){for(var r=0;r<n.length;r++)n[r]=gv(n[r]);return n}return gv(n)}function e(n,r,i){if(r.indexOf("--")===0)return n;var s=pV(r);return r===s?n:(i.prop(s,n),null)}return{onProcessStyle:t,onChangeValue:e}}var Y=qI&&CSS?CSS.px:"px",uy=qI&&CSS?CSS.ms:"ms",dc=qI&&CSS?CSS.percent:"%",xee={"animation-delay":uy,"animation-duration":uy,"background-position":Y,"background-position-x":Y,"background-position-y":Y,"background-size":Y,border:Y,"border-bottom":Y,"border-bottom-left-radius":Y,"border-bottom-right-radius":Y,"border-bottom-width":Y,"border-left":Y,"border-left-width":Y,"border-radius":Y,"border-right":Y,"border-right-width":Y,"border-top":Y,"border-top-left-radius":Y,"border-top-right-radius":Y,"border-top-width":Y,"border-width":Y,"border-block":Y,"border-block-end":Y,"border-block-end-width":Y,"border-block-start":Y,"border-block-start-width":Y,"border-block-width":Y,"border-inline":Y,"border-inline-end":Y,"border-inline-end-width":Y,"border-inline-start":Y,"border-inline-start-width":Y,"border-inline-width":Y,"border-start-start-radius":Y,"border-start-end-radius":Y,"border-end-start-radius":Y,"border-end-end-radius":Y,margin:Y,"margin-bottom":Y,"margin-left":Y,"margin-right":Y,"margin-top":Y,"margin-block":Y,"margin-block-end":Y,"margin-block-start":Y,"margin-inline":Y,"margin-inline-end":Y,"margin-inline-start":Y,padding:Y,"padding-bottom":Y,"padding-left":Y,"padding-right":Y,"padding-top":Y,"padding-block":Y,"padding-block-end":Y,"padding-block-start":Y,"padding-inline":Y,"padding-inline-end":Y,"padding-inline-start":Y,"mask-position-x":Y,"mask-position-y":Y,"mask-size":Y,height:Y,width:Y,"min-height":Y,"max-height":Y,"min-width":Y,"max-width":Y,bottom:Y,left:Y,top:Y,right:Y,inset:Y,"inset-block":Y,"inset-block-end":Y,"inset-block-start":Y,"inset-inline":Y,"inset-inline-end":Y,"inset-inline-start":Y,"box-shadow":Y,"text-shadow":Y,"column-gap":Y,"column-rule":Y,"column-rule-width":Y,"column-width":Y,"font-size":Y,"font-size-delta":Y,"letter-spacing":Y,"text-decoration-thickness":Y,"text-indent":Y,"text-stroke":Y,"text-stroke-width":Y,"word-spacing":Y,motion:Y,"motion-offset":Y,outline:Y,"outline-offset":Y,"outline-width":Y,perspective:Y,"perspective-origin-x":dc,"perspective-origin-y":dc,"transform-origin":dc,"transform-origin-x":dc,"transform-origin-y":dc,"transform-origin-z":dc,"transition-delay":uy,"transition-duration":uy,"vertical-align":Y,"flex-basis":Y,"shape-margin":Y,size:Y,gap:Y,grid:Y,"grid-gap":Y,"row-gap":Y,"grid-row-gap":Y,"grid-column-gap":Y,"grid-template-rows":Y,"grid-template-columns":Y,"grid-auto-rows":Y,"grid-auto-columns":Y,"box-shadow-x":Y,"box-shadow-y":Y,"box-shadow-blur":Y,"box-shadow-spread":Y,"font-line-height":Y,"text-shadow-x":Y,"text-shadow-y":Y,"text-shadow-blur":Y};function mV(t){var e=/(-[a-z])/g,n=function(o){return o[1].toUpperCase()},r={};for(var i in t)r[i]=t[i],r[i.replace(e,n)]=t[i];return r}var kee=mV(xee);function Wh(t,e,n){if(e==null)return e;if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]=Wh(t,e[r],n);else if(typeof e=="object")if(t==="fallbacks")for(var i in e)e[i]=Wh(i,e[i],n);else for(var s in e)e[s]=Wh(t+"-"+s,e[s],n);else if(typeof e=="number"&&isNaN(e)===!1){var o=n[t]||kee[t];return o&&!(e===0&&o===Y)?typeof o=="function"?o(e).toString():""+e+o:e.toString()}return e}function Cee(t){t===void 0&&(t={});var e=mV(t);function n(i,s){if(s.type!=="style")return i;for(var o in i)i[o]=Wh(o,i[o],e);return i}function r(i,s){return Wh(s,i,e)}return{onProcessStyle:n,onChangeValue:r}}function WT(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Aee(t){if(Array.isArray(t))return WT(t)}function Pee(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function gV(t,e){if(t){if(typeof t=="string")return WT(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?WT(t,e):void 0}}function Oee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
205In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nee(t){return Aee(t)||Pee(t)||gV(t)||Oee()}var Ih="",qT="",yV="",vV="",Dee=rm&&"ontouchstart"in document.documentElement;if(rm){var vS={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Mee=document.createElement("p"),_S=Mee.style,Lee="Transform";for(var wS in vS)if(wS+Lee in _S){Ih=wS,qT=vS[wS];break}Ih==="Webkit"&&"msHyphens"in _S&&(Ih="ms",qT=vS.ms,vV="edge"),Ih==="Webkit"&&"-apple-trailing-word"in _S&&(yV="apple")}var Ke={js:Ih,css:qT,vendor:yV,browser:vV,isTouch:Dee};function Vee(t){return t[1]==="-"||Ke.js==="ms"?t:"@"+Ke.css+"keyframes"+t.substr(10)}var Fee={noPrefill:["appearance"],supportedProperty:function(e){return e!=="appearance"?!1:Ke.js==="ms"?"-webkit-"+e:Ke.css+e}},$ee={noPrefill:["color-adjust"],supportedProperty:function(e){return e!=="color-adjust"?!1:Ke.js==="Webkit"?Ke.css+"print-"+e:e}},Uee=/[-\s]+(.)?/g;function jee(t,e){return e?e.toUpperCase():""}function HI(t){return t.replace(Uee,jee)}function Va(t){return HI("-"+t)}
205var Bee={noPrefill:["mask"],supportedProperty:function(e,n){if(!/^mask/.test(e))return!1;if(Ke.js==="Webkit"){var r="mask-image";if(HI(r)in n)return e;if(Ke.js+Va(r)in n)return Ke.css+e}return e}},zee={noPrefill:["text-orientation"],supportedProperty:function(e){return e!=="text-orientation"?!1:Ke.vendor==="apple"&&!Ke.isTouch?Ke.css+e:e}},Wee={noPrefill:["transform"],supportedProperty:function(e,n,r){return e!=="transform"?!1:r.transform?e:Ke.css+e}},qee={noPrefill:["transition"],supportedProperty:function(e,n,r){return e!=="transition"?!1:r.transition?e:Ke.css+e}},Hee={noPrefill:["writing-mode"],supportedProperty:function(e){return e!=="writing-mode"?!1:Ke.js==="Webkit"||Ke.js==="ms"&&Ke.browser!=="edge"?Ke.css+e:e}},Gee={noPrefill:["user-select"],supportedProperty:function(e){return e!=="user-select"?!1:Ke.js==="Moz"||Ke.js==="ms"||Ke.vendor==="apple"?Ke.css+e:e}},Kee={supportedProperty:function(e,n){if(!/^break-/.test(e))return!1;if(Ke.js==="Webkit"){var r="WebkitColumn"+Va(e);return r in n?Ke.css+"column-"+e:!1}if(Ke.js==="Moz"){var i="page"+Va(e);return i in n?"page-"+e:!1}return!1}},Qee={supportedProperty:function(e,n){if(!/^(border|margin|padding)-inline/.test(e))return!1;if(Ke.js==="Moz")return e;var r=e.replace("-inline","");return Ke.js+Va(r)in n?Ke.css+r:!1}},Yee={supportedProperty:function(e,n){return HI(e)in n?e:!1}},Jee={supportedProperty:function(e,n){var r=Va(e);return e[0]==="-"||e[0]==="-"&&e[1]==="-"?e:Ke.js+r in n?Ke.css+e:Ke.js!=="Webkit"&&"Webkit"+r in n?"-webkit-"+e:!1}},Xee={supportedProperty:function(e){return e.substring(0,11)!=="scroll-snap"?!1:Ke.js==="ms"?""+Ke.css+e:e}},Zee={supportedProperty:function(e){return e!=="overscroll-behavior"?!1:Ke.js==="ms"?Ke.css+"scroll-chaining":e}},ete={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},tte={supportedProperty:function(e,n){var r=ete[e];return r&&Ke.js+Va(r)in n?Ke.css+r:!1}},_V={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},nte=Object.keys(_V),rte=function(e){return Ke.css+e},ite={supportedProperty:function(e,n,r){var i=r.multiple;if(nte.indexOf(e)>-1){var s=_V[e];if(!Array.isArray(s))return Ke.js+Va(s)in n?Ke.css+s:!1;if(!i)return!1;for(var o=0;o<s.length;o++)if(!(Ke.js+Va(s[0])in n))return!1;return s.map(rte)}return!1}},wV=[Fee,$ee,Bee,zee,Wee,qee,Hee,Gee,Kee,Qee,Yee,Jee,Xee,Zee,tte,ite],dO=wV.filter(function(t){return t.supportedProperty}).map(function(t){return t.supportedProperty}),ste=wV.filter(function(t){return t.noPrefill}).reduce(function(t,e){return t.push.apply(t,Nee(e.noPrefill)),t},[]),Rh,Ol={};if(rm){Rh=document.createElement("p");var ES=window.getComputedStyle(document.documentElement,"");for(var SS in ES)isNaN(SS)||(Ol[ES[SS]]=ES[SS]);ste.forEach(function(t){return delete Ol[t]})}function HT(t,e){if(e===void 0&&(e={}),!Rh)return t;if(Ol[t]!=null)return Ol[t];(t==="transition"||t==="transform")&&(e[t]=t in Rh.style);for(var n=0;n<dO.length&&(Ol[t]=dO[n](t,Rh.style,e),!Ol[t]);n++);try{Rh.style[t]=""}catch{return!1}return Ol[t]}var fc={},ote={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},ate=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,ga;function lte(t,e,n){if(e==="var")return"var";if(e==="all")return"all";if(n==="all")return", all";var r=e?HT(e):", "+HT(n);return r||e||n}rm&&(ga=document.createElement("p"));function fO(t,e){var n=e;if(!ga||t==="content")return e;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var r=t+n;if(fc[r]!=null)return fc[r];try{ga.style[t]=n}catch{return fc[r]=!1,!1}if(ote[t])n=n.replace(ate,lte);else if(ga.style[t]===""&&(n=Ke.css+n,n==="-ms-flex"&&(ga.style[t]="-ms-flexbox"),ga.style[t]=n,ga.style[t]===""))return fc[r]=!1,!1;return ga.style[t]="",fc[r]=n,fc[r]}function ute(){function t(i){if(i.type==="keyframes"){var s=i;s.at=Vee(s.at)}}function e(i){for(var s in i){var o=i[s];if(s==="fallbacks"&&Array.isArray(o)){i[s]=o.map(e);continue}var l=!1,c=HT(s);c&&c!==s&&(l=!0);var d=!1,h=fO(c,Ql(o));h&&h!==o&&(d=!0),(l||d)&&(l&&delete i[s],i[c||s]=h||o)}return i}function n(i,s){return s.type!=="style"?i:e(i)}function r(i,s){return fO(s,Ql(i))||i}return{onProcessRule:t,onProcessStyle:n,onChangeValue:r}}function cte(){var t=function(n,r){return n.length===r.length?n>r?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var i={},s=Object.keys(n).sort(t),o=0;o<s.length;o++)i[s[o]]=n[s[o]];return i}}}function dte(){return{plugins:[hee(),_ee(),See(),Ree(),Cee(),typeof window>"u"?null:ute(),cte()]}}function EV(t={}){const{baseClasses:e,newClasses:n,Component:r}=t;if(!n)return e;const i=O({},e);
205return Object.keys(n).forEach(s=>{n[s]&&(i[s]=`${e[s]} ${n[s]}`)}),i}const Nc={set:(t,e,n,r)=>{let i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)},get:(t,e,n)=>{const r=t.get(e);return r?r.get(n):void 0},delete:(t,e,n)=>{t.get(e).delete(n)}};function fte(){var t;const e=xI();return(t=e?.$$material)!=null?t:e}const hte=cV(dte()),pte=kZ(),mte=new Map,gte={disableGeneration:!1,generateClassName:pte,jss:hte,sheetsCache:null,sheetsManager:mte,sheetsRegistry:null},yte=T.createContext(gte);let hO=-1e9;function vte(){return hO+=1,hO}const _te=["variant"];function pO(t){return t.length===0}function wte(t){const{variant:e}=t,n=ve(t,_te);let r=e||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=pO(r)?t[i]:Ie(t[i]):r+=`${pO(r)?i:Ie(i)}${Ie(t[i].toString())}`}),r}const Ete={};function Ste(t){const e=typeof t=="function";return{create:(n,r)=>{let i;try{i=e?t(n):t}catch(c){throw c}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const s=n.components[r].styleOverrides||{},o=n.components[r].variants||[],l=O({},i);return Object.keys(s).forEach(c=>{l[c]=kr(l[c]||{},s[c])}),o.forEach(c=>{const d=wte(c.props);l[d]=kr(l[d]||{},c.style)}),l},options:{}}}const Tte=["name","classNamePrefix","Component","defaultTheme"];function bte({state:t,stylesOptions:e},n,r){if(e.disableGeneration)return n||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});let i=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,i=!0),n!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=n,i=!0),i&&(t.cacheClasses.value=EV({baseClasses:t.cacheClasses.lastJSS,newClasses:n,Component:r})),t.cacheClasses.value}function Ite({state:t,theme:e,stylesOptions:n,stylesCreator:r,name:i},s){if(n.disableGeneration)return;let o=Nc.get(n.sheetsManager,r,e);o||(o={refs:0,staticSheet:null,dynamicStyles:null},Nc.set(n.sheetsManager,r,e,o));const l=O({},r.options,n,{theme:e,flip:typeof n.flip=="boolean"?n.flip:e.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=n.sheetsRegistry;if(o.refs===0){let d;n.sheetsCache&&(d=Nc.get(n.sheetsCache,r,e));const h=r.create(e,i);d||(d=n.jss.createStyleSheet(h,O({link:!1},l)),d.attach(),n.sheetsCache&&Nc.set(n.sheetsCache,r,e,d)),c&&c.add(d),o.staticSheet=d,o.dynamicStyles=dV(h)}if(o.dynamicStyles){const d=n.jss.createStyleSheet(o.dynamicStyles,O({link:!0},l));d.update(s),d.attach(),t.dynamicSheet=d,t.classes=EV({baseClasses:o.staticSheet.classes,newClasses:d.classes}),c&&c.add(d)}else t.classes=o.staticSheet.classes;o.refs+=1}function Rte({state:t},e){t.dynamicSheet&&t.dynamicSheet.update(e)}function xte({state:t,theme:e,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const i=Nc.get(n.sheetsManager,r,e);i.refs-=1;const s=n.sheetsRegistry;i.refs===0&&(Nc.delete(n.sheetsManager,r,e),n.jss.removeStyleSheet(i.staticSheet),s&&s.remove(i.staticSheet)),t.dynamicSheet&&(n.jss.removeStyleSheet(t.dynamicSheet),s&&s.remove(t.dynamicSheet))}function kte(t,e){const n=T.useRef([]);let r;const i=T.useMemo(()=>({}),e);n.current!==i&&(n.current=i,r=t()),T.useEffect(()=>()=>{r&&r()},[i])}function Dr(t,e={}){const{name:n,classNamePrefix:r,Component:i,defaultTheme:s=Ete}=e,o=ve(e,Tte),l=Ste(t),c=n||r||"makeStyles";return l.options={index:vte(),name:n,meta:c,classNamePrefix:c},(h={})=>{const m=fte()||s,g=O({},T.useContext(yte),o),v=T.useRef(),E=T.useRef();return kte(()=>{const w={name:n,state:{},stylesCreator:l,stylesOptions:g,theme:m};return Ite(w,h),E.current=!1,v.current=w,()=>{xte(w)}},[m,l]),T.useEffect(()=>{E.current&&Rte(v.current,h),E.current=!0}),bte(v.current,h.classes,i)}}const Cte=Dr(()=>({root:{maxWidth:"100%",textAlign:"center",display:"flex",alignItems:"center",height:"100vh",justifyContent:"center",flexDirection:"column"},errorDetail:{fontFamily:"monospace"},button:{marginTop:"30px"}})),qh=({error:t,errorDetail:e})=>{const n=Cte(),r=`mailto:[email protected]?subject=OpenFeedback%20Error&body=@error:${JSON.stringify(t)}@detail:${JSON.stringify(e)}@url:${JSON.stringify(window.location.href)}`;return A.jsxs(An,{maxWidth:"100%",textAlign:"center",display:"flex",alignItems:"center",height:"100vh",justifyContent:"center",flexDirection:"column",children:[A.jsx(a8,{}),A.jsx("p",{children:A.jsx("b",{children:t})}),A.jsx("p",{children:"Error:"}),A.jsx(Nr,{sx:{fontFamily:"monospace"},children:e}),A.jsx(iu,{variant:"contained",color:"primary",sx:{marginTop:"30px"},children:"Reload the page"}),A.jsx(iu,{variant:"contained",className:n.button,href:r,children:"Report"})]})};var Ate=A.Fragment;function Wn(t,e,n){return __.call(e,"css")?A.jsx(gL,mL(t,e),n):A.jsx(t,e,n)}function SV(t,e,n){return __.call(e,"css")?A.jsxs(gL,mL(t,e),n):A.jsxs(t,e,n)}function TV(t,e){if(t==null)return{};var n,r,i=ve(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.includes(n)||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function GI(t,e,n){return(e=CL(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var TS,mO;function Pte(){return mO||(mO=1,TS={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),TS}var Ote=Pte();const Nte=Pr(Ote);var Dte=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function gO(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=t.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(e.name=n[1],(Nte[n[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var r=t.indexOf("-->");return{type:"comment",comment:r!==-1?t.slice(4,r):""}}for(var i=new RegExp(Dte),s=null;(s=i.exec(t))!==null;)if(s[0].trim())if(s[1]){var o=s[1].trim(),l=[o,""];o.indexOf("=")>-1&&(l=o.split("=")),e.attrs[l[0]]=l[1],i.lastIndex--}else s[2]&&(e.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return e}var Mte=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Lte=/^\s*$/,Vte=Object.create(null);function bV(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?(function(n){var r=[];for(var i in n)r.push(i+'="'+n[i]+'"');return r.length?" "+r.join(" "):""})(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(bV,"")+"</"+e.name+">";
205case"comment":return t+"<!--"+e.comment+"-->"}}var Fte={parse:function(t,e){e||(e={}),e.components||(e.components=Vte);var n,r=[],i=[],s=-1,o=!1;if(t.indexOf("<")!==0){var l=t.indexOf("<");r.push({type:"text",content:l===-1?t:t.substring(0,l)})}return t.replace(Mte,function(c,d){if(o){if(c!=="</"+n.name+">")return;o=!1}var h,m=c.charAt(1)!=="/",g=c.startsWith("<!--"),v=d+c.length,E=t.charAt(v);if(g){var S=gO(c);return s<0?(r.push(S),r):((h=i[s]).children.push(S),r)}if(m&&(s++,(n=gO(c)).type==="tag"&&e.components[n.name]&&(n.type="component",o=!0),n.voidElement||o||!E||E==="<"||n.children.push({type:"text",content:t.slice(v,t.indexOf("<",v))}),s===0&&r.push(n),(h=i[s-1])&&h.children.push(n),i[s]=n),(!m||n.voidElement)&&(s>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(s--,n=s===-1?r:i[s]),!o&&E!=="<"&&E)){h=s===-1?r:i[s].children;var w=t.indexOf("<",v),b=t.slice(v,w===-1?void 0:w);Lte.test(b)&&(b=" "),(w>-1&&s+h.length>=0||b!==" ")&&h.push({type:"text",content:b})}}),r},stringify:function(t){return t.reduce(function(e,n){return e+bV("",n)},"")}};function _s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var $te=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ute={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},jte=function(e){return Ute[e]},Bte=function(e){return e.replace($te,jte)},zte={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Bte},Wte,KI=T.createContext();function IV(){return zte}var qte=(function(){function t(){_s(this,t),this.usedNamespaces={}}return Ci(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t})();function RV(){return Wte}function Fy(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(t=console).warn.apply(t,n)}}var yO={};function yv(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&yO[e[0]]||(typeof e[0]=="string"&&(yO[e[0]]=new Date),Fy.apply(void 0,e))}function vO(t,e,n){t.loadNamespaces(e,function(){if(t.isInitialized)n();else{var r=function i(){setTimeout(function(){t.off("initialized",i)},0),n()};t.on("initialized",r)}})}function Hte(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var o=function(c,d){var h=e.services.backendConnector.state["".concat(c,"|").concat(d)];return h===-1||h===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}function Gte(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return yv("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(s,o){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,t))return!1}}):Hte(t,e,n)}var Kte=["format"],Qte=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function _O(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 Fn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
205e%2?_O(Object(n),!0).forEach(function(r){GI(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_O(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bS(t,e){if(!t)return!1;var n=t.props?t.props.children:t.children;return e?n.length>0:!!n}function IS(t){return t?t.props?t.props.children:t.children:[]}function Yte(t){return Object.prototype.toString.call(t)!=="[object Array]"?!1:t.every(function(e){return T.isValidElement(e)})}function xh(t){return Array.isArray(t)?t:[t]}function Jte(t,e){var n=Fn({},e);return n.props=Object.assign(t.props,e.props),n}function xV(t,e){if(!t)return"";var n="",r=xh(t),i=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return r.forEach(function(s,o){if(typeof s=="string")n+="".concat(s);else if(T.isValidElement(s)){var l=Object.keys(s.props).length,c=i.indexOf(s.type)>-1,d=s.props.children;if(!d&&c&&l===0)n+="<".concat(s.type,"/>");else if(!d&&(!c||l!==0))n+="<".concat(o,"></").concat(o,">");else if(s.props.i18nIsDynamicList)n+="<".concat(o,"></").concat(o,">");else if(c&&l===1&&typeof d=="string")n+="<".concat(s.type,">").concat(d,"</").concat(s.type,">");else{var h=xV(d,e);n+="<".concat(o,">").concat(h,"</").concat(o,">")}}else if(s===null)Fy("Trans: the passed in value is invalid - seems you passed in a null child.");else if(Rr(s)==="object"){var m=s.format,g=TV(s,Kte),v=Object.keys(g);if(v.length===1){var E=m?"".concat(v[0],", ").concat(m):v[0];n+="{{".concat(E,"}}")}else Fy("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",s)}else Fy("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",s)}),n}function Xte(t,e,n,r,i,s){if(e==="")return[];var o=r.transKeepBasicHtmlNodesFor||[],l=e&&new RegExp(o.join("|")).test(e);if(!t&&!l)return[e];var c={};function d(w){var b=xh(w);b.forEach(function(C){typeof C!="string"&&(bS(C)?d(IS(C)):Rr(C)==="object"&&!T.isValidElement(C)&&Object.assign(c,C))})}d(t);var h=Fte.parse("<0>".concat(e,"</0>")),m=Fn(Fn({},c),i);function g(w,b,C){var I=IS(w),P=E(I,b.children,C);return Yte(I)&&P.length===0?I:P}function v(w,b,C,I,P){w.dummy&&(w.children=b),C.push(T.cloneElement(w,Fn(Fn({},w.props),{},{key:I}),P?void 0:b))}function E(w,b,C){var I=xh(w),P=xh(b);return P.reduce(function(x,N,k){var V=N.children&&N.children[0]&&N.children[0].content&&n.services.interpolator.interpolate(N.children[0].content,m,n.language);if(N.type==="tag"){var L=I[parseInt(N.name,10)];!L&&C.length===1&&C[0][N.name]&&(L=C[0][N.name]),L||(L={});var F=Object.keys(N.attrs).length!==0?Jte({props:N.attrs},L):L,K=T.isValidElement(F),ne=K&&bS(N,!0)&&!N.voidElement,Q=l&&Rr(F)==="object"&&F.dummy&&!K,X=Rr(t)==="object"&&t!==null&&Object.hasOwnProperty.call(t,N.name);if(typeof F=="string"){var ee=n.services.interpolator.interpolate(F,m,n.language);x.push(ee)}else if(bS(F)||ne){var J=g(F,N,C);v(F,J,x,k)}else if(Q){var Z=E(I,N.children,C);x.push(T.cloneElement(F,Fn(Fn({},F.props),{},{key:k}),Z))}else if(Number.isNaN(parseFloat(N.name)))if(X){var B=g(F,N,C);v(F,B,x,k,N.voidElement)}else if(r.transSupportBasicHtmlNodes&&o.indexOf(N.name)>-1)if(N.voidElement)x.push(T.createElement(N.name,{key:"".concat(N.name,"-").concat(k)}));else{var te=E(I,N.children,C);x.push(T.createElement(N.name,{key:"".concat(N.name,"-").concat(k)},te))}else if(N.voidElement)x.push("<".concat(N.name," />"));else{var M=E(I,N.children,C);x.push("<".concat(N.name,">").concat(M,"</").concat(N.name,">"))}else if(Rr(F)==="object"&&!K){var G=N.children[0]?V:null;G&&x.push(G)}else N.children.length===1&&V?x.push(T.cloneElement(F,Fn(Fn({},F.props),{},{key:k}),V)):x.push(T.cloneElement(F,Fn(Fn({},F.props),{},{key:k})))}else if(N.type==="text"){var ae=r.transWrapTextNodes,pe=s?r.unescape(n.services.interpolator.interpolate(N.content,m,n.language)):n.services.interpolator.interpolate(N.content,m,n.language);ae?x.push(T.createElement(ae,{key:"".concat(N.name,"-").concat(k)},pe)):x.push(pe)}return x},[])}var S=E([{dummy:!0,children:t||[]}],h,xh(t||[]));return IS(S[0])}function RS(t){var e=t.children,n=t.count,r=t.parent,i=t.i18nKey,s=t.context,o=t.tOptions,l=o===void 0?{}:o,c=t.values,d=t.defaults,h=t.components,m=t.ns,g=t.i18n,v=t.t,E=t.shouldUne
205scape,S=TV(t,Qte),w=T.useContext(KI)||{},b=w.i18n,C=w.defaultNS,I=g||b||RV();if(!I)return yv("You will need to pass in an i18next instance by using i18nextReactModule"),e;var P=v||I.t.bind(I)||function(ee){return ee};s&&(l.context=s);var x=Fn(Fn({},IV()),I.options&&I.options.react),N=m||P.ns||C||I.options&&I.options.defaultNS;N=typeof N=="string"?[N]:N||["translation"];var k=d||xV(e,x)||x.transEmptyNodeValue||i,V=x.hashTransKey,L=i||(V?V(k):k),F=c?l.interpolation:{interpolation:Fn(Fn({},l.interpolation),{},{prefix:"#$?",suffix:"?$#"})},K=Fn(Fn(Fn(Fn({},l),{},{count:n},c),F),{},{defaultValue:k,ns:N}),ne=L?P(L,K):k,Q=Xte(h||e,ne,I,x,K,E),X=r!==void 0?r:x.defaultTransParent;return X?T.createElement(X,S,Q):Q}function Zte(t){if(Array.isArray(t))return t}function ene(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,d=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(d)throw i}}return l}}function tne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
206In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nne(t,e){return Zte(t)||ene(t,e)||gV(t,e)||tne()}function wO(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 xS(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wO(Object(n),!0).forEach(function(r){GI(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rne=function(e,n){var r=T.useRef();return T.useEffect(function(){r.current=e},[e,n]),r.current};function pr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=T.useContext(KI)||{},i=r.i18n,s=r.defaultNS,o=n||i||RV();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new qte),!o){yv("You will need to pass in an i18next instance by using initReactI18next");var l=function(L){return Array.isArray(L)?L[L.length-1]:L},c=[l,{},!1];return c.t=l,c.i18n={},c.ready=!1,c}o.options.react&&o.options.react.wait!==void 0&&yv("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=xS(xS(xS({},IV()),o.options.react),e),h=d.useSuspense,m=d.keyPrefix,g=s||o.options&&o.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(g);var v=(o.isInitialized||o.initializedStoreOnce)&&g.every(function(V){return Gte(V,o,d)});function E(){return o.getFixedT(null,d.nsMode==="fallback"?g:g[0],m)}var S=T.useState(E),w=nne(S,2),b=w[0],C=w[1],I=g.join(),P=rne(I),x=T.useRef(!0);T.useEffect(function(){var V=d.bindI18n,L=d.bindI18nStore;x.current=!0,!v&&!h&&vO(o,g,function(){x.current&&C(E)}),v&&P&&P!==I&&x.current&&C(E);function F(){x.current&&C(E)}return V&&o&&o.on(V,F),L&&o&&o.store.on(L,F),function(){x.current=!1,V&&o&&V.split(" ").forEach(function(K){return o.off(K,F)}),L&&o&&L.split(" ").forEach(function(K){return o.store.off(K,F)})}},[o,I]);var N=T.useRef(!0);T.useEffect(function(){x.current&&!N.current&&C(E),N.current=!1},[o,m]);var k=[b,o,v];if(k.t=b,k.i18n=o,k.ready=v,v||!v&&!h)return k;throw new Promise(function(V){vO(o,g,function(){V()})})}function ine(t){var e=t.i18n,n=t.defaultNS,r=t.children,i=T.useMemo(function(){return{i18n:e,defaultNS:n}},[e,n]);return T.createElement(KI.Provider,{value:i},r)}const sne=_e("div",{})(({theme:t,width:e,height:n,maxWidth:r})=>({textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",opacity:0,transition:"all 1s ease-in",animation:"1s appearDelayed",animationDelay:"500ms",animationFillMode:"forwards",width:e,height:n,maxWidth:r,"& > div":{color:t?.palette.primary.main},"@keyframes appearDelayed":{from:{opacity:0}
206,to:{opacity:1}}})),Dd=({height:t="100vh",width:e="100%",style:n={},maxWidth:r=void 0})=>{const{t:i}=pr();return Wn(sne,{height:t,width:e,maxWidth:r,children:Wn(VI,{style:n,"aria-label":i("common.loading")})})},QI=t=>t.auth,kV=t=>QI(t).isLogin,im=t=>QI(t).user,one=t=>QI(t).error,ane="https://storage.googleapis.com/open-sponsor.firebasestorage.app/scopes/Ogh97t2FZ7xzsGp6N3ro/projects/openfeedback.json",lne=()=>{const[t,e]=T.useState([]);return T.useEffect(()=>{(async()=>{const i=await(await fetch(ane)).json();e(i.sponsors||[])})().catch(console.error)},[]),t},une=()=>{const{t}=pr(),e=Or(),n=e.palette.mode==="dark",r=n?"white":"black",i=lne();return A.jsxs(An,{display:"flex",alignItems:"top",justifyContent:"center",padding:1,marginTop:2,flexWrap:"wrap",gap:2,color:e.palette.textDimmed,component:"footer",children:[A.jsxs(An,{display:"flex",flexDirection:"row",children:[A.jsx("span",{style:{marginRight:6,marginTop:-2},children:t("footer.madeBy")}),A.jsx("a",{href:"https://github.com/HugoGresse/open-feedback",target:"_blank",rel:"noopener noreferrer",children:A.jsx("img",{height:"25",
206src:`/static/logos/openfeedback-${r}-orange.svg`,alt:"open feedback"})})]}),A.jsxs(An,{display:"flex",flexDirection:"row",paddingRight:1.8,paddingTop:.5,gap:2,borderRadius:10,border:"1px solid #888",alignItems:"center",marginTop:-2,marginLeft:2,justifyContent:"center",flexWrap:"wrap",children:[A.jsx(An,{marginInlineEnd:2,children:A.jsx(eV,{href:"https://github.com/sponsors/HugoGresse",target:"_blank",rel:"noopener noreferrer",sx:{color:e.palette.textDimmed,textDecoration:"none","&:hover":{opacity:.4,transition:"opacity 0.2s ease-in-out"}},children:A.jsx("span",{style:{left:16,top:-2,position:"relative"},children:t("common.becomeSponsor")})})}),i.map(s=>A.jsx(An,{component:"a",href:s.website,target:"_blank",onClick:()=>{fetch(s.tracking)},sx:{"&:hover":{opacity:.4,transition:"opacity 0.2s ease-in-out"}},children:A.jsx("img",{src:n&&s.logoDark||s.logo,alt:s.name,style:{height:30,borderRadius:5}})},s.name))]})]})};class Iu extends Error{}class cne extends Iu{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class dne extends Iu{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class fne extends Iu{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Dc extends Iu{}class CV extends Iu{constructor(e){super(`Invalid unit ${e}`)}}class Sr extends Iu{}class ca extends Iu{constructor(){super("Zone is an abstract class")}}const ge="numeric",fs="short",bi="long",vv={year:ge,month:ge,day:ge},AV={year:ge,month:fs,day:ge},hne={year:ge,month:fs,day:ge,weekday:fs},PV={year:ge,month:bi,day:ge},OV={year:ge,month:bi,day:ge,weekday:bi},NV={hour:ge,minute:ge},DV={hour:ge,minute:ge,second:ge},MV={hour:ge,minute:ge,second:ge,timeZoneName:fs},LV={hour:ge,minute:ge,second:ge,timeZoneName:bi},VV={hour:ge,minute:ge,hourCycle:"h23"},FV={hour:ge,minute:ge,second:ge,hourCycle:"h23"},$V={hour:ge,minute:ge,second:ge,hourCycle:"h23",timeZoneName:fs},UV={hour:ge,minute:ge,second:ge,hourCycle:"h23",timeZoneName:bi},jV={year:ge,month:ge,day:ge,hour:ge,minute:ge},BV={year:ge,month:ge,day:ge,hour:ge,minute:ge,second:ge},zV={year:ge,month:fs,day:ge,hour:ge,minute:ge},WV={year:ge,month:fs,day:ge,hour:ge,minute:ge,second:ge},pne={year:ge,month:fs,day:ge,weekday:fs,hour:ge,minute:ge},qV={year:ge,month:bi,day:ge,hour:ge,minute:ge,timeZoneName:fs},HV={year:ge,month:bi,day:ge,hour:ge,minute:ge,second:ge,timeZoneName:fs},GV={year:ge,month:bi,day:ge,weekday:bi,hour:ge,minute:ge,timeZoneName:bi},KV={year:ge,month:bi,day:ge,weekday:bi,hour:ge,minute:ge,second:ge,timeZoneName:bi};class sm{get type(){throw new ca}get name(){throw new ca}get ianaName(){return this.name}get isUniversal(){throw new ca}offsetName(e,n){throw new ca}formatOffset(e,n){throw new ca}offset(e){throw new ca}equals(e){throw new ca}get isValid(){throw new ca}}let kS=null;class V_ extends sm{static get instance(){return kS===null&&(kS=new V_),kS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return rF(e,n,r)}formatOffset(e,n){return Hh(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let $y={};function mne(t){return $y[t]||($y[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),$y[t]}const gne={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function yne(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,o,l,c,d,h]=r;return[o,i,s,l,c,d,h]}function vne(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:s,value:o}=n[i],l=gne[s];s==="era"?r[l]=o:Be(l)||(r[l]=parseInt(o,10))}return r}let cy={};class ko extends sm{static create(e){return cy[e]||(cy[e]=new ko(e)),cy[e]}static resetCache(){cy={},$y={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ko.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return rF(e,n,r,this.name)}formatOffset(e,n){return Hh(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=mne(this.name);let[i,s,o,l,c,d,h]=r.formatToParts?vne(r,n):yne(r,n);l==="BC"&&(i=-Math.abs(i)+1);const g=$_({year:i,month:s,day:o,hour:c===24?0:c,minute:d,second:h,millisecond:0});let v=+n;const E=v%1e3;return v-=E>=0?E:1e3+E,(g-v)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let EO={};function _ne(t,e={}){const n=JSON.stringify([t,e]);let r=EO[n];return r||(r=new Intl.ListFormat(t,e),EO[n]=r),r}let GT={};function KT(t,e={}){const n=JSON.stringify([t,e]);let r=GT[n];return r||(r=new Intl.DateTimeFormat(t,e),GT[n]=r),r}let QT={};function wne(t,e={}){const n=JSON.stringify([t,e]);let r=QT[n];return r||(r=new Intl.NumberFormat(t,e),QT[n]=r),r}let YT={};function Ene(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let s=YT[i];return s||(s=new Intl.RelativeTimeFormat(t,e),YT[i]=s),s}let kh=null;function Sne(){return kh||(kh=new Intl.DateTimeFormat().resolvedOptions().locale,kh)}let SO={};function Tne(t){let e=SO[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,SO[t]=e}return e}function bne(t){const e=t.indexOf("-x-");
vendor: 38,934 bytes, line 206
206e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=KT(t).resolvedOptions(),i=t}catch{const c=t.substring(0,n);r=KT(c).resolvedOptions(),i=c}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Ine(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Rne(t){const e=[];for(let n=1;n<=12;n++){const r=Ae.utc(2009,n,1);e.push(t(r))}return e}function xne(t){const e=[];for(let n=1;n<=7;n++){const r=Ae.utc(2016,11,13+n);e.push(t(r))}return e}function dy(t,e,n,r){const i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function kne(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Cne{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:s,...o}=r;if(!n||Object.keys(o).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=wne(e,l)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):eR(e,3);return xn(n,this.padTo)}}}class Ane{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ko.create(l).valid?(i=l,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=KT(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Pne{constructor(e,n,r){this.opts={style:"long",...r},!n&&tF()&&(this.rtf=Ene(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):ere(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const One={firstDay:1,minimalDays:4,weekend:[6,7]};class St{static fromOpts(e){return St.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,s=!1){const o=e||ln.defaultLocale,l=o||(s?"en-US":Sne()),c=n||ln.defaultNumberingSystem,d=r||ln.defaultOutputCalendar,h=JT(i)||ln.defaultWeekSettings;return new St(l,c,d,h,o)}static resetCache(){kh=null,GT={},QT={},YT={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return St.create(e,n,r,i)}constructor(e,n,r,i,s){const[o,l,c]=bne(e);this.locale=o,this.numberingSystem=n||l||null,this.outputCalendar=r||c||null,this.weekSettings=i,this.intl=Ine(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=kne(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:St.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,JT(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return dy(this,e,oF,()=>{const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=Rne(s=>this.extract(s,r,"month"))),this.monthsCache[i][e]})}weekdays(e,n=!1){return dy(this,e,uF,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=xne(s=>this.extract(s,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return dy(this,void 0,()=>cF,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ae.utc(2016,11,13,9),Ae.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return dy(this,e,dF,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ae.utc(-40,1,1),Ae.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),s=i.formatToParts(),o=s.find(l=>l.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new Cne(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Ane(e,this.intl,n)}relFormatter(e={}){return new Pne(this.intl,this.isEnglish(),e)}listFormatter(e={}){return _ne(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:nF()?Tne(this.locale):One}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let CS=null;class Wr extends sm{static get utcInstance(){return CS===null&&(CS=new Wr(0)),CS}static instance(e){return e===0?Wr.utcInstance:new Wr(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Wr(U_(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Hh(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Hh(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Hh(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Nne extends sm{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function _a(t,e){if(Be(t)||t===null)return e;if(t instanceof sm)return t;if($ne(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?V_.instance:n==="utc"||n==="gmt"?Wr.utcInstance:Wr.parseSpecifier(n)||ko.create(t)}else return Ca(t)?Wr.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Nne(t)}const YI={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},TO={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Dne=YI.hanidec.replace(/[\[|\]]/g,"").split("");function Mne(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(YI.hanidec)!==-1)e+=Dne.indexOf(t[n]);else for(const i in TO){const[s,o]=TO[i];r>=s&&r<=o&&(e+=r-s)}}return parseInt(e,10)}else return e}let Ic={};function Lne(){Ic={}}function as({numberingSystem:t},e=""){const n=t||"latn";return Ic[n]||(Ic[n]={}),Ic[n][e]||(Ic[n][e]=new RegExp(`${YI[n]}${e}`)),Ic[n][e]}let bO=()=>Date.now(),IO="system",RO=null,xO=null,kO=null,CO=60,AO,PO=null;class ln{static get now(){return bO}static set now(e){bO=e}static set defaultZone(e){IO=e}static get defaultZone(){return _a(IO,V_.instance)}static get defaultLocale(){return RO}static set defaultLocale(e){RO=e}static get defaultNumberingSystem(){return xO}static set defaultNumberingSystem(e){xO=e}static get defaultOutputCalendar(){return kO}static set defaultOutputCalendar(e){kO=e}static get defaultWeekSettings(){return PO}static set defaultWeekSettings(e){PO=JT(e)}static get twoDigitCutoffYear(){return CO}static set twoDigitCutoffYear(e){CO=e%100}static get throwOnInvalid(){return AO}static set throwOnInvalid(e){AO=e}static resetCaches(){St.resetCache(),ko.resetCache(),Ae.resetCache(),Lne()}}class ds{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const QV=[0,31,59,90,120,151,181,212,243,273,304,334],YV=[0,31,60,91,121,152,182,213,244,274,305,335];function ji(t,e){return new ds("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function JI(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function JV(t,e,n){return n+(om(t)?YV:QV)[e-1]}function XV(t,e){const n=om(t)?YV:QV,r=n.findIndex(s=>s<e),i=e-n[r];return{month:r+1,day:i}}function XI(t,e){return(t-e+7)%7+1}function _v(t,e=4,n=1){const{year:r,month:i,day:s}=t,o=JV(r,i,s),l=XI(JI(r,i,s),n);let c=Math.floor((o-l+14-e)/7),d;return c<1?(d=r-1,c=gp(d,e,n)):c>gp(r,e,n)?(d=r+1,c=1):d=r,{weekYear:d,weekNumber:c,weekday:l,...j_(t)}}function OO(t,e=4,n=1){const{weekYear:r,weekNumber:i,weekday:s}=t,o=XI(JI(r,1,e),n),l=Uc(r);let c=i*7+s-o-7+e,d;c<1?(d=r-1,c+=Uc(d)):c>l?(d=r+1,c-=Uc(r)):d=r;const{month:h,day:m}=XV(d,c);return{year:d,month:h,day:m,...j_(t)}}function AS(t){const{year:e,month:n,day:r}=t,i=JV(e,n,r);return{year:e,ordinal:i,...j_(t)}}function NO(t){const{year:e,ordinal:n}=t,{month:r,day:i}=XV(e,n);return{year:e,month:r,day:i,...j_(t)}}function DO(t,e){if(!Be(t.localWeekday)||!Be(t.localWeekNumber)||!Be(t.localWeekYear)){if(!Be(t.weekday)||!Be(t.weekNumber)||!Be(t.weekYear))throw new Dc("Cannot mix locale-based week fields with ISO-based week fields");return Be(t.localWeekday)||(t.weekday=t.localWeekday),Be(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Be(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Vne(t,e=4,n=1){const r=F_(t.weekYear),i=Bi(t.weekNumber,1,gp(t.weekYear,e,n)),s=Bi(t.weekday,1,7);return r?i?s?!1:ji("weekday",t.weekday):ji("week",t.weekNumber):ji("weekYear",t.weekYear)}function Fne(t){const e=F_(t.year),n=Bi(t.ordinal,1,Uc(t.year));return e?n?!1:ji("ordinal",t.ordinal):ji("year",t.year)}function ZV(t){const e=F_(t.year),n=Bi(t.month,1,12),r=Bi(t.day,1,wv(t.year,t.month));return e?n?r?!1:ji("day",t.day):ji("month",t.month):ji("year",t.year)}function eF(t){const{hour:e,minute:n,second:r,millisecond:i}=t,s=Bi(e,0,23)||e===24&&n===0&&r===0&&i===0,o=Bi(n,0,59),l=Bi(r,0,59),c=Bi(i,0,999);return s?o?l?c?!1:ji("millisecond",i):ji("second",r):ji("minute",n):ji("hour",e)}function Be(t){return typeof t>"u"}function Ca(t){return typeof t=="number"}function F_(t){return typeof t=="number"&&t%1===0}function $ne(t){return typeof t=="string"}function Une(t){return Object.prototype.toString.call(t)==="[object Date]"}function tF(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function nF(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jne(t){return Array.isArray(t)?t:[t]}function MO(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const s=[e(i),i];return r&&n(r[0],s[0])===r[0]?r:s},null)[1]}function Bne(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function ad(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function JT(t){if(t==null)return null;if(typeof t!="object")throw new Sr("Week settings must be an object");if(!Bi(t.firstDay,1,7)||!Bi(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Bi(e,1,7)))throw new Sr("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Bi(t,e,n){return F_(t)&&t>=e&&t<=n}function zne(t,e){return t-e*Math.floor(t/e)}function xn(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function ya(t){if(!(Be(t)||t===null||t===""))return parseInt(t,10)}function Il(t){if(!(Be(t)||t===null||t===""))return parseFloat(t)}function ZI(t){if(!(Be(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function eR(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function om(t){return t%4===0&&(t%100!==0||t%400===0)}function Uc(t){return om(t)?366:365}function wv(t,e){const n=zne(e-1,12)+1,r=t+(e-n)/12;return n===2?om(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function $_(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function LO(t,e,n){return-XI(JI(t,1,e),n)+e-1}function gp(t,e=4,n=1){const r=LO(t,e,n),i=LO(t+1,e,n);return(Uc(t)-r+i)/7}function XT(t){return t>99?t:t>ln.twoDigitCutoffYear?1900+t:2e3+t}function rF(t,e,n,r=null){const i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const o={timeZoneName:e,...s},l=new Intl.DateTimeFormat(n,o).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return l?l.value:null}function U_(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function iF(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Sr(`Invalid unit value ${t}`);return e}function Ev(t,e){const n={};for(const r in t)if(ad(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=iF(i)}return n}function Hh(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${xn(n,2)}:${xn(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${xn(n,2)}${xn(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function j_(t){return Bne(t,["hour","minute","second","millisecond"])}const Wne=["January","February","March","April","May","June","July","August","September","October","November","December"],sF=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qne=["J","F","M","A","M","J","J","A","S","O","N","D"];function oF(t){switch(t){case"narrow":return[...qne];case"short":return[...sF];case"long":return[...Wne];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const aF=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],lF=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Hne=["M","T","W","T","F","S","S"];function uF(t){switch(t){case"narrow":return[...Hne];case"short":return[...lF];case"long":return[...aF];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const cF=["AM","PM"],Gne=["Before Christ","Anno Domini"],Kne=["BC","AD"],Qne=["B","A"];function dF(t){switch(t){case"narrow":return[...Qne];case"short":return[...Kne];case"long":return[...Gne];default:return null}}function Yne(t){return cF[t.hour<12?0:1]}function Jne(t,e){return uF(e)[t.weekday-1]}function Xne(t,e){return oF(e)[t.month-1]}function Zne(t,e){return dF(e)[t.year<0?0:1]}function ere(t,e,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&s){const m=t==="days";switch(e){case 1:return m?"tomorrow":`next ${i[t][0]}`;case-1:return m?"yesterday":`last ${i[t][0]}`;case 0:return m?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,l=Math.abs(e),c=l===1,d=i[t],h=r?c?d[1]:d[2]||d[1]:c?i[t][0]:t;return o?`${l} ${h} ago`:`in ${l} ${h}`}function VO(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const tre={D:vv,DD:AV,DDD:PV,DDDD:OV,t:NV,tt:DV,ttt:MV,tttt:LV,T:VV,TT:FV,TTT:$V,TTTT:UV,f:jV,ff:zV,fff:qV,ffff:GV,F:BV,FF:WV,FFF:HV,FFFF:KV};class Ir{static create(e,n={}){return new Ir(e,n)}static parseFormat(e){let n=null,r="",i=!1;const s=[];for(let o=0;o<e.length;o++){const l=e.charAt(o);l==="'"?(r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||l===n?r+=l:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return tre[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return xn(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(v,E)=>this.loc.extract(e,v,E),o=v=>e.isOffsetFixed&&e.offset===0&&v.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,v.format):"",l=()=>r?Yne(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(v,E)=>r?Xne(e,v):s(E?{month:v}:{month:v,day:"numeric"},"month"),d=(v,E)=>r?Jne(e,v):s(E?{weekday:v}:{weekday:v,month:"long",day:"numeric"},"weekday"),h=v=>{const E=Ir.macroTokenToFormatOpts(v);return E?this.formatWithSystemDefault(e,E):v},m=v=>r?Zne(e,v):s({era:v},"era"),g=v=>{switch(v){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return l();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return h(v)}};return VO(Ir.parseFormat(n),g)}formatDurationFromString(e,n){const r=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=c=>d=>{const h=r(d);return h?this.num(c.get(h),d.length):d},s=Ir.parseFormat(n),o=s.reduce((c,{literal:d,val:h})=>d?c:c.concat(h),[]),l=e.shiftTo(...o.map(r).filter(c=>c));return VO(s,i(l))}}const fF=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Md(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function Ld(...t){return e=>t.reduce(([n,r,i],s)=>{const[o,l,c]=s(e,i);return[{...n,...o},l||r,c]},[{},null,1]).slice(0,2)}function Vd(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function hF(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=ya(e[n+i]);return[r,null,n+i]}}const pF=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,nre=`(?:${pF.source}?(?:\\[(${fF.source})\\])?)?`,tR=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,mF=RegExp(`${tR.source}${nre}`),nR=RegExp(`(?:T${mF.source})?`),rre=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ire=/(\d{4})-?W(\d\d)(?:-?(\d))?/,sre=/(\d{4})-?(\d{3})/,ore=hF("weekYear","weekNumber","weekDay"),are=hF("year","ordinal"),lre=/(\d{4})-(\d\d)-(\d\d)/,gF=RegExp(`${tR.source} ?(?:${pF.source}|(${fF.source}))?`),ure=RegExp(`(?: ${gF.source})?`);function jc(t,e,n){const r=t[e];return Be(r)?n:ya(r)}function cre(t,e){return[{year:jc(t,e),month:jc(t,e+1,1),day:jc(t,e+2,1)},null,e+3]}function Fd(t,e){return[{hours:jc(t,e,0),minutes:jc(t,e+1,0),seconds:jc(t,e+2,0),milliseconds:ZI(t[e+3])},null,e+4]}function am(t,e){const n=!t[e]&&!t[e+1],r=U_(t[e+1],t[e+2]),i=n?null:Wr.instance(r);return[{},i,e+3]}function lm(t,e){const n=t[e]?ko.create(t[e]):null;return[{},n,e+1]}const dre=RegExp(`^T?${tR.source}$`),fre=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function hre(t){const[e,n,r,i,s,o,l,c,d]=t,h=e[0]==="-",m=c&&c[0]==="-",g=(v,E=!1)=>v!==void 0&&(E||v&&h)?-v:v;return[{years:g(Il(n)),months:g(Il(r)),weeks:g(Il(i)),days:g(Il(s)),hours:g(Il(o)),minutes:g(Il(l)),seconds:g(Il(c),c==="-0"),milliseconds:g(ZI(d),m)}]}const pre={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function rR(t,e,n,r,i,s,o){const l={year:e.length===2?XT(ya(e)):ya(e),month:sF.indexOf(n)+1,day:ya(r),hour:ya(i),minute:ya(s)};return o&&(l.second=ya(o)),t&&(l.weekday=t.length>3?aF.indexOf(t)+1:lF.indexOf(t)+1),l}const mre=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function gre(t){const[,e,n,r,i,s,o,l,c,d,h,m]=t,g=rR(e,i,r,n,s,o,l);let v;return c?v=pre[c]:d?v=0:v=U_(h,m),[g,new Wr(v)]}function yre(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const vre=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,_re=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,wre=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function FO(t){const[,e,n,r,i,s,o,l]=t;return[rR(e,i,r,n,s,o,l),Wr.utcInstance]}function Ere(t){const[,e,n,r,i,s,o,l]=t;return[rR(e,l,n,r,i,s,o),Wr.utcInstance]}const Sre=Md(rre,nR),Tre=Md(ire,nR),bre=Md(sre,nR),Ire=Md(mF),yF=Ld(cre,Fd,am,lm),Rre=Ld(ore,Fd,am,lm),xre=Ld(are,Fd,am,lm),kre=Ld(Fd,am,lm);function Cre(t){return Vd(t,[Sre,yF],[Tre,Rre],[bre,xre],[Ire,kre])}function Are(t){return Vd(yre(t),[mre,gre])}function Pre(t){return Vd(t,[vre,FO],[_re,FO],[wre,Ere])}function Ore(t){return Vd(t,[fre,hre])}const Nre=Ld(Fd);function Dre(t){return Vd(t,[dre,Nre])}const Mre=Md(lre,ure),Lre=Md(gF),Vre=Ld(Fd,am,lm);function Fre(t){return Vd(t,[Mre,yF],[Lre,Vre])}const $O="Invalid Duration",vF={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},$re={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...vF},Li=146097/400,hc=146097/4800,Ure={years:{quarters:4,months:12,weeks:Li/7,days:Li,hours:Li*24,minutes:Li*24*60,seconds:Li*24*60*60,milliseconds:Li*24*60*60*1e3},quarters:{months:3,weeks:Li/28,days:Li/4,hours:Li*24/4,minutes:Li*24*60/4,seconds:Li*24*60*60/4,milliseconds:Li*24*60*60*1e3/4},months:{weeks:hc/7,days:hc,hours:hc*24,minutes:hc*24*60,seconds:hc*24*60*60,milliseconds:hc*24*60*60*1e3},...vF},Ul=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],jre=Ul.slice(0).reverse();function da(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new dt(r)}function _F(t,e){let n=e.milliseconds??0;for(const r of jre.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function UO(t,e){const n=_F(t,e)<0?-1:1;Ul.reduceRight((r,i)=>{if(Be(e[i]))return r;if(r){const s=e[r]*n,o=t[i][r],l=Math.floor(s/o);e[i]+=l*n,e[r]-=l*o*n}return i},null),Ul.reduce((r,i)=>{if(Be(e[i]))return r;if(r){const s=e[r]%1;e[r]-=s,e[i]+=s*t[r][i]}return i},null)}function Bre(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class dt{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?Ure:$re;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||St.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return dt.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Sr(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new dt({values:Ev(e,dt.normalizeUnit),loc:St.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Ca(e))return dt.fromMillis(e);if(dt.isDuration(e))return e;if(typeof e=="object")return dt.fromObject(e);throw new Sr(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=Ore(e);return r?dt.fromObject(r,n):dt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=Dre(e);return r?dt.fromObject(r,n):dt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Sr("need to specify a reason the Duration is invalid");const r=e instanceof ds?e:new ds(e,n);if(ln.throwOnInvalid)throw new fne(r);return new dt({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new CV(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ir.create(this.loc,r).formatDurationFromString(this,e):$O}toHuman(e={}){if(!this.isValid)return $O;const n=Ul.map(r=>{const i=this.values[r];return Be(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=eR(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Ae.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?_F(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=dt.fromDurationLike(e),r={};for(const i of Ul)(ad(n.values,i)||ad(this.values,i))&&(r[i]=n.get(i)+this.get(i));return da(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=dt.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=iF(e(this.values[r],r));return da(this,{values:n},!0)}get(e){return this[dt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Ev(e,dt.normalizeUnit)};return da(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return da(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return UO(this.matrix,e),da(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Bre(this.normalize().shiftToAll().toObject());return da(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>dt.normalizeUnit(o));const n={},r={},i=this.toObject();let s;for(const o of Ul)if(e.indexOf(o)>=0){s=o;let l=0;for(const d in r)l+=this.matrix[d][o]*r[d],r[d]=0;Ca(i[o])&&(l+=i[o]);const c=Math.trunc(l);n[o]=c,r[o]=(l*1e3-c*1e3)/1e3}else Ca(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(n[s]+=o===s?r[o]:r[o]/this.matrix[s][o]);return UO(this.matrix,n),da(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return da(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of Ul)if(!n(this.values[r],e.values[r]))return!1;return!0}}const pc="Invalid Interval";function zre(t,e){return!t||!t.isValid?an.invalid("missing or invalid start"):!e||!e.isValid?an.invalid("missing or invalid end"):e<t?an.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class an{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Sr("need to specify a reason the Interval is invalid");const r=e instanceof ds?e:new ds(e,n);if(ln.throwOnInvalid)throw new dne(r);return new an({invalid:r})}static fromDateTimes(e,n){const r=th(e),i=th(n),s=zre(r,i);return s??new an({start:r,end:i})}static after(e,n){const r=dt.fromDurationLike(n),i=th(e);return an.fromDateTimes(i,i.plus(r))}static before(e,n){const r=dt.fromDurationLike(n),i=th(e);return an.fromDateTimes(i.minus(r),i)}static fromISO(e,n){const[r,i]=(e||"").split("/",2);if(r&&i){let s,o;try{s=Ae.fromISO(r,n),o=s.isValid}catch{o=!1}let l,c;try{l=Ae.fromISO(i,n),c=l.isValid}catch{c=!1}if(o&&c)return an.fromDateTimes(s,l);if(o){const d=dt.fromISO(i,n);if(d.isValid)return an.after(s,d)}else if(c){const d=dt.fromISO(r,n);if(d.isValid)return an.before(l,d)}}return an.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let i;return n?.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?an.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(th).filter(o=>this.contains(o)).sort((o,l)=>o.toMillis()-l.toMillis()),r=[];let{s:i}=this,s=0;for(;i<this.e;){const o=n[s]||this.e,l=+o>+this.e?this.e:o;r.push(an.fromDateTimes(i,l)),i=l,s+=1}return r}splitBy(e){const n=dt.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,s;const o=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(c=>c*i));s=+l>+this.e?this.e:l,o.push(an.fromDateTimes(r,s)),r=s,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:an.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return an.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[i,s.union(o)]:[i.concat([s]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],s=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),o=Array.prototype.concat(...s),l=o.sort((c,d)=>c.time-d.time);for(const c of l)r+=c.type==="s"?1:-1,r===1?n=c.time:(n&&+n!=+c.time&&i.push(an.fromDateTimes(n,c.time)),n=null);return an.merge(i)}difference(...e){return an.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:pc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=vv,n={}){return this.isValid?Ir.create(this.s.loc.clone(n),e).formatInterval(this):pc}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:pc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pc}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:pc}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:pc}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):dt.invali
vendor: 2,793 bytes, line 206
206d(this.invalidReason)}mapEndpoints(e){return an.fromDateTimes(e(this.s),e(this.e))}}let fy=class{static hasDST(e=ln.defaultZone){const n=Ae.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return ko.isValidZone(e)}static normalizeZone(e){return _a(e,ln.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||St.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||St.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||St.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||St.create(n,r,s)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||St.create(n,r,s)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||St.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||St.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return St.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return St.create(n,null,"gregory").eras(e)}static features(){return{relative:tF(),localeWeek:nF()}}};function jO(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(dt.fromMillis(r).as("days"))}function Wre(t,e,n){const r=[["years",(c,d)=>d.year-c.year],["quarters",(c,d)=>d.quarter-c.quarter+(d.year-c.year)*4],["months",(c,d)=>d.month-c.month+(d.year-c.year)*12],["weeks",(c,d)=>{const h=jO(c,d);return(h-h%7)/7}],["days",jO]],i={},s=t;let o,l;for(const[c,d]of r)n.indexOf(c)>=0&&(o=c,i[c]=d(t,e),l=s.plus(i),l>e?(i[c]--,t=s.plus(i),t>e&&(l=t,i[c]--,t=s.plus(i))):t=l);return[t,i,l,o]}function qre(t,e,n,r){let[i,s,o,l]=Wre(t,e,n);const c=e-i,d=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);d.length===0&&(o<e&&(o=i.plus({[l]:1})),o!==i&&(s[l]=(s[l]||0)+c/(o-i)));const h=dt.fromObject(s,r);return d.length>0?dt.fromMillis(c,r).shiftTo(...d).plus(h):h}const Hre="missing Intl.DateTimeFormat.formatToParts support";function gt(t,e=n=>n){return{regex:t,deser:([n])=>e(Mne(n))}}const Gre=" ",wF=`[ ${Gre}]`,EF=new RegExp(wF,"g");function Kre(t){return t.replace(/\./g,"\\.?").replace(EF,wF)}function BO(t){return t.replace(/\./g,"").replace(EF," ").toLowerCase()}function ls(t,e){return t===null?null:{regex:RegExp(t.map(Kre).join("|")),deser:([n])=>t.findIndex(r=>BO(n)===BO(r))+e}}function zO(t,e){return{regex:t,deser:([,n,r])=>U_(n,r),groups:e}}function hy(t){return{regex:t,deser:([e])=>e}}
vendor: 4,683 bytes, line 206
206function Qre(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Yre(t,e){const n=as(e),r=as(e,"{2}"),i=as(e,"{3}"),s=as(e,"{4}"),o=as(e,"{6}"),l=as(e,"{1,2}"),c=as(e,"{1,3}"),d=as(e,"{1,6}"),h=as(e,"{1,9}"),m=as(e,"{2,4}"),g=as(e,"{4,6}"),v=w=>({regex:RegExp(Qre(w.val)),deser:([b])=>b,literal:!0}),S=(w=>{if(t.literal)return v(w);switch(w.val){case"G":return ls(e.eras("short"),0);case"GG":return ls(e.eras("long"),0);case"y":return gt(d);case"yy":return gt(m,XT);case"yyyy":return gt(s);case"yyyyy":return gt(g);case"yyyyyy":return gt(o);case"M":return gt(l);case"MM":return gt(r);case"MMM":return ls(e.months("short",!0),1);case"MMMM":return ls(e.months("long",!0),1);case"L":return gt(l);case"LL":return gt(r);case"LLL":return ls(e.months("short",!1),1);case"LLLL":return ls(e.months("long",!1),1);case"d":return gt(l);case"dd":return gt(r);case"o":return gt(c);case"ooo":return gt(i);case"HH":return gt(r);case"H":return gt(l);case"hh":return gt(r);case"h":return gt(l);case"mm":return gt(r);case"m":return gt(l);case"q":return gt(l);case"qq":return gt(r);case"s":return gt(l);case"ss":return gt(r);case"S":return gt(c);case"SSS":return gt(i);case"u":return hy(h);case"uu":return hy(l);case"uuu":return gt(n);case"a":return ls(e.meridiems(),0);case"kkkk":return gt(s);case"kk":return gt(m,XT);case"W":return gt(l);case"WW":return gt(r);case"E":case"c":return gt(n);case"EEE":return ls(e.weekdays("short",!1),1);case"EEEE":return ls(e.weekdays("long",!1),1);case"ccc":return ls(e.weekdays("short",!0),1);case"cccc":return ls(e.weekdays("long",!0),1);case"Z":case"ZZ":return zO(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return zO(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return hy(/[a-z_+-/]{1,256}?/i);case" ":return hy(/[^\S\n\r]/);default:return v(w)}})(t)||{invalidReason:Hre};return S.token=t,S}const Jre={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Xre(t,e,n){const{type:r,value:i}=t;if(r==="literal"){const c=/^\s+$/.test(i);return{literal:!c,val:c?" ":i}}const s=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let l=Jre[o];if(typeof l=="object"&&(l=l[s]),l)return{literal:!1,val:l}}function Zre(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function eie(t,e,n){const r=t.match(e);if(r){const i={};let s=1;for(const o in n)if(ad(n,o)){const l=n[o],c=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(r.slice(s,s+c))),s+=c}return[r,i]}else return[r,{}]}function tie(t){const e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Be(t.z)||(n=ko.create(t.z)),Be(t.Z)||(n||(n=new Wr(t.Z)),r=t.Z),Be(t.q)||(t.M=(t.q-1)*3+1),Be(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Be(t.u)||(t.S=ZI(t.u)),[Object.keys(t).reduce((s,o)=>{const l=e(o);return l&&(s[l]=t[o]),s},{}),n,r]}let PS=null;function nie(){return PS||(PS=Ae.fromMillis(1555555555555)),PS}function rie(t,e){if(t.literal)return t;const n=Ir.macroTokenToFormatOpts(t.val),r=IF(n,e);return r==null||r.includes(void 0)?t:r}function SF(t,e){return Array.prototype.concat(...t.map(n=>rie(n,e)))}class TF{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=SF(Ir.parseFormat(n),e),this.units=this.tokens.map(r=>Yre(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=Zre(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[n,r]=eie(e,this.regex,this.handlers),[i,s,o]=r?tie(r):[null,null,void 0];if(ad(r,"a")&&ad(r,"H"))throw new Dc("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:s,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invali
206dReason:null}}function bF(t,e,n){return new TF(t,n).explainFromTokens(e)}function iie(t,e,n){const{result:r,zone:i,specificOffset:s,invalidReason:o}=bF(t,e,n);return[r,i,s,o]}function IF(t,e){if(!t)return null;const r=Ir.create(e,t).dtFormatter(nie()),i=r.formatToParts(),s=r.resolvedOptions();return i.map(o=>Xre(o,t,s))}const OS="Invalid DateTime",WO=864e13;function Ch(t){return new ds("unsupported zone",`the zone "${t.name}" is not supported`)}function NS(t){return t.weekData===null&&(t.weekData=_v(t.c)),t.weekData}function DS(t){return t.localWeekData===null&&(t.localWeekData=_v(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Rl(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ae({...n,...e,old:n})}function RF(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const s=n.offset(r);return i===s?[r,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function py(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Uy(t,e,n){return RF($_(t),e,n)}function qO(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:r,month:i,day:Math.min(t.c.day,wv(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=dt.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=$_(s);let[c,d]=RF(l,n,t.zone);return o!==0&&(c+=o,d=t.zone.offset(c)),{ts:c,o:d}}function mc(t,e,n,r,i,s){const{setZone:o,zone:l}=n;if(t&&Object.keys(t).length!==0||e){const c=e||l,d=Ae.fromObject(t,{...n,zone:c,specificOffset:s});return o?d:d.setZone(l)}else return Ae.invalid(new ds("unparsable",`the input "${i}" can't be parsed as ${r}`))}function my(t,e,n=!0){return t.isValid?Ir.create(St.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function MS(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=xn(t.c.year,n?6:4),e?(r+="-",r+=xn(t.c.month),r+="-",r+=xn(t.c.day)):(r+=xn(t.c.month),r+=xn(t.c.day)),r}function HO(t,e,n,r,i,s){let o=xn(t.c.hour);return e?(o+=":",o+=xn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=xn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=xn(t.c.second),(t.c.millisecond!==0||!r)&&(o+=".",o+=xn(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!s?o+="Z":t.o<0?(o+="-",o+=xn(Math.trunc(-t.o/60)),o+=":",o+=xn(Math.trunc(-t.o%60))):(o+="+",o+=xn(Math.trunc(t.o/60)),o+=":",o+=xn(Math.trunc(t.o%60)))),s&&(o+="["+t.zone.ianaName+"]"),o}const xF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},sie={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},oie={ordinal:1,hour:0,minute:0,second:0,millisecond:0},kF=["year","month","day","hour","minute","second","millisecond"],aie=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lie=["year","ordinal","hour","minute","second","millisecond"];function uie(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new CV(t);return e}function GO(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return uie(t)}}function cie(t){return By[t]||(jy===void 0&&(jy=ln.now()),By[t]=t.offset(jy)),By[t]}function KO(t,e){const n=_a(e.zone,ln.defaultZone);
vendor: 9,750 bytes, line 206
206if(!n.isValid)return Ae.invalid(Ch(n));const r=St.fromObject(e);let i,s;if(Be(t.year))i=ln.now();else{for(const c of kF)Be(t[c])&&(t[c]=xF[c]);const o=ZV(t)||eF(t);if(o)return Ae.invalid(o);const l=cie(n);[i,s]=Uy(t,l,n)}return new Ae({ts:i,zone:n,loc:r,o:s})}function QO(t,e,n){const r=Be(n.round)?!0:n.round,i=(o,l)=>(o=eR(o,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,l)),s=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(s(n.unit),n.unit);for(const o of n.units){const l=s(o);if(Math.abs(l)>=1)return i(l,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function YO(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let jy,By={};class Ae{constructor(e){const n=e.zone||ln.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new ds("invalid input"):null)||(n.isValid?null:Ch(n));this.ts=Be(e.ts)?ln.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,s]=[e.old.c,e.old.o];else{const l=Ca(e.o)&&!e.old?e.o:n.offset(this.ts);i=py(this.ts,l),r=Number.isNaN(i.year)?new ds("invalid input"):null,i=r?null:i,s=r?null:l}this._zone=n,this.loc=e.loc||St.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new Ae({})}static local(){const[e,n]=YO(arguments),[r,i,s,o,l,c,d]=n;return KO({year:r,month:i,day:s,hour:o,minute:l,second:c,millisecond:d},e)}static utc(){const[e,n]=YO(arguments),[r,i,s,o,l,c,d]=n;return e.zone=Wr.utcInstance,KO({year:r,month:i,day:s,hour:o,minute:l,second:c,millisecond:d},e)}static fromJSDate(e,n={}){const r=Une(e)?e.valueOf():NaN;if(Number.isNaN(r))return Ae.invalid("invalid input");const i=_a(n.zone,ln.defaultZone);return i.isValid?new Ae({ts:r,zone:i,loc:St.fromObject(n)}):Ae.invalid(Ch(i))}static fromMillis(e,n={}){if(Ca(e))return e<-WO||e>WO?Ae.invalid("Timestamp out of range"):new Ae({ts:e,zone:_a(n.zone,ln.defaultZone),loc:St.fromObject(n)});throw new Sr(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Ca(e))return new Ae({ts:e*1e3,zone:_a(n.zone,ln.defaultZone),loc:St.fromObject(n)});throw new Sr("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=_a(n.zone,ln.defaultZone);if(!r.isValid)return Ae.invalid(Ch(r));const i=St.fromObject(n),s=Ev(e,GO),{minDaysInFirstWeek:o,startOfWeek:l}=DO(s,i),c=ln.now(),d=Be(n.specificOffset)?r.offset(c):n.specificOffset,h=!Be(s.ordinal),m=!Be(s.year),g=!Be(s.month)||!Be(s.day),v=m||g,E=s.weekYear||s.weekNumber;if((v||h)&&E)throw new Dc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&h)throw new Dc("Can't mix ordinal dates with month/day");const S=E||s.weekday&&!v;let w,b,C=py(c,d);S?(w=aie,b=sie,C=_v(C,o,l)):h?(w=lie,b=oie,C=AS(C)):(w=kF,b=xF);let I=!1;for(const F of w){const K=s[F];Be(K)?I?s[F]=b[F]:s[F]=C[F]:I=!0}const P=S?Vne(s,o,l):h?Fne(s):ZV(s),x=P||eF(s);if(x)return Ae.invalid(x);const N=S?OO(s,o,l):h?NO(s):s,[k,V]=Uy(N,d,r),L=new Ae({ts:k,zone:r,o:V,loc:i});return s.weekday&&v&&e.weekday!==L.weekday?Ae.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${L.toISO()}`):L.isValid?L:Ae.invalid(L.invalid)}static fromISO(e,n={}){const[r,i]=Cre(e);return mc(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=Are(e);return mc(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=Pre(e);return mc(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(Be(e)||Be(n))throw new Sr("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=r,o=St.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[l,c,d,h]=iie(o,e,n);return h?Ae.invalid(h):mc(l,c,r,`format ${n}`,e,d)}static fromString(e,n,r={}){return Ae.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=Fre(e);return mc(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Sr("need to specify a reason the DateTime is invalid");const r=e instanceof ds?e:new ds(e,n);if(ln.throwOnInvalid)throw new cne(r);return new Ae({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=IF(e,St.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return SF(Ir.parseFormat(e),St.fromObject(n)).map(i=>i.val).join("")}static resetCache(){jy=void 0,By={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?NS(this).weekYear:NaN}get weekNumber(){return this.isValid?NS(this).weekNumber:NaN}get weekday(){return this.isValid?NS(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?DS(this).weekday:NaN}get localWeekNumber(){return this.isValid?DS(this).weekNumber:NaN}get localWeekYear(){return this.isValid?DS(this).weekYear:NaN}get ordinal(){return this.isValid?AS(this.c).ordinal:NaN}get monthShort(){return this.isValid?fy.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?fy.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?fy.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?fy.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=$_(this.c),i=this.zone.offset(r-e),s=this.zone.offset(r+e),o=this.zone.offset(r-i*n),l=this.zone.offset(r-s*n);if(o===l)return[this];const c=r-o*n,d=r-l*n,h=py(c,o),m=py(d,l);return h.hour===m.hour&&h.minute===m.minute&&h.second===m.second&&h.millisecond===m.millisecond?[Rl(this,{ts:c}),Rl(this,{ts:d})]:[this]}get isInLeapYear(){return om(this.year)}get daysInMonth(){return wv(this.year,this.month)}get daysInYear(){return this.isValid?Uc(this.year):NaN}get weeksInWeekYear(){return this.isValid?gp(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?gp(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Ir.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(Wr.instance(e),n)}toLocal(){return this.setZone(ln.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=_a(e,ln.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const s=e.offset(this.ts),o=this.toObject();[i]=Uy(o,s,e)}return Rl(this,{ts:i,zone:e})}else return Ae.invalid(Ch(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Rl(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Ev(e,GO),{minDaysInFirstWeek:r,startOfWeek:i}=DO(n,this.loc),s=!Be(n.weekYear)||!Be(n.weekNumber)||!Be(n.weekday),o=!Be(n.ordinal),l=!Be(n.year),c=!Be(n.month)||!Be(n.day),d=l||c,h=n.weekYear||n.weekNumber;if((d||o)&&h)throw new Dc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new Dc("Can't mix ordinal dates with month/day");let m;s?m=OO({..._v(this.c,r,i),...n},r,i):Be(n.ordinal)?(m={...this.toObject(),...n},Be(n.day)&&(m.day=Math.min(wv(m.year,m.month),m.day))):m=NO({...AS(this.c),...n});const[g,v]=Uy(m,this.o,this.zone);return Rl(this,{ts:g,o:v})}plus(e){if(!this.isValid)return this;const n=dt.fromDurationLike(e);return Rl(this,qO(this,n))}minus(e){if(!this.isValid)return this;const n=dt.fromDurationLike(e).negate();return Rl(this,qO(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},i=dt.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(r.weekNumber=this.weekNumber-1),r.weekday=s}else r.weekday=1;if(i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Ir.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):OS}
vendor: 1,957 bytes, line 206
206toLocaleString(e=vv,n={}){return this.isValid?Ir.create(this.loc.clone(n),e).formatDateTime(this):OS}toLocaleParts(e={}){return this.isValid?Ir.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const o=e==="extended";let l=MS(this,o);return l+="T",l+=HO(this,o,n,r,i,s),l}toISODate({format:e="extended"}={}){return this.isValid?MS(this,e==="extended"):null}toISOWeekDate(){return my(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+HO(this,o==="extended",n,e,r,s):null}toRFC2822(){return my(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return my(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?MS(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),my(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():OS}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}
206){if(!this.isValid||!e.isValid)return dt.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=jne(n).map(dt.normalizeUnit),o=e.valueOf()>this.valueOf(),l=o?this:e,c=o?e:this,d=qre(l,c,s,i);return o?d.negate():d}diffNow(e="milliseconds",n={}){return this.diff(Ae.now(),e,n)}until(e){return this.isValid?an.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(n,r)<=i&&i<=s.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||Ae.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),QO(n,this.plus(r),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?QO(e.base||Ae.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Ae.isDateTime))throw new Sr("min requires all arguments be DateTimes");return MO(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(Ae.isDateTime))throw new Sr("max requires all arguments be DateTimes");return MO(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:s=null}=r,o=St.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return bF(o,e,n)}static fromStringExplain(e,n,r={}){return Ae.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:i=null}=n,s=St.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new TF(s,e)}static fromFormatParser(e,n,r={}){if(Be(e)||Be(n))throw new Sr("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=r,o=St.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!o.equals(n.locale))throw new Sr(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:l,zone:c,specificOffset:d,invalidReason:h}=n.explainFromTokens(e);return h?Ae.invalid(h):mc(l,c,r,`format ${n.format}`,e,d)}static get DATE_SHORT(){return vv}static get DATE_MED(){return AV}static get DATE_MED_WITH_WEEKDAY(){return hne}static get DATE_FULL(){return PV}static get DATE_HUGE(){return OV}static get TIME_SIMPLE(){return NV}static get TIME_WITH_SECONDS(){return DV}static get TIME_WITH_SHORT_OFFSET(){return MV}static get TIME_WITH_LONG_OFFSET(){return LV}static get TIME_24_SIMPLE(){return VV}static get TIME_24_WITH_SECONDS(){return FV}static get TIME_24_WITH_SHORT_OFFSET(){return $V}static get TIME_24_WITH_LONG_OFFSET(){return UV}static get DATETIME_SHORT(){return jV}static get DATETIME_SHORT_WITH_SECONDS(){return BV}static get DATETIME_MED(){return zV}static get DATETIME_MED_WITH_SECONDS(){return WV}static get DATETIME_MED_WITH_WEEKDAY(){return pne}static get DATETIME_FULL(){return qV}static get DATETIME_FULL_WITH_SECONDS(){return HV}static get DATETIME_HUGE(){return GV}static get DATETIME_HUGE_WITH_SECONDS(){return KV}}function th(t){if(Ae.isDateTime(t))return t;if(t&&t.valueOf&&Ca(t.valueOf()))return Ae.fromJSDate(t);if(t&&typeof t=="object")return Ae.fromObject(t);throw new Sr(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const JO=(t,e)=>{const n={};return e.forEach(r=>{const i=r.tracks;r.timeslots.forEach(s=>{const o=Ae.fromISO(r.date+"T"+s.startTime).toISO(),l=Ae.fromISO(r.date+"T"+s.endTime).toISO();s.sessions.forEach((c,d)=>{c.items.forEach(h=>{t[h]&&(n[h]={...t[h],startTime:o,endTime:l,trackTitle:i[d].title})})})})}),n},B_=t=>{const e=Ae.fromISO(t);return e.isValid?e.toFormat("yyyy-MM-dd"):ld},ld="0",XO=t=>t&&t.normalize("NFD").replace(/[\u0300-\u036f]/g,""),lRe=()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let e="";for(let n=0;n<20;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},uRe=(t,...e)=>t.replace(/%s/g,()=>e.shift()),iR=t=>{if(!t)return 0;let e=0,n,r;if(t.length===0)return e;for(n=0;n<t.length;n++)r=t.charCodeAt(n),e=(e<<5)-e+r,e|=0;return e},cRe=(t,e,{side:n="end",ellipsis:r="..."}={})=>
206{if(!t)return["",!1];if(t.length>e)switch(n){case"start":return[r+t.slice(-(e-r.length)),!0];case"end":default:return[t.slice(0,e-r.length)+r,!0]}return[t,!1]},dRe=t=>/^\S+@\S+$/.test(String(t).toLowerCase()),ZO=t=>typeof t=="string"||t instanceof String,CF=t=>t.speakers,z_=t=>CF(t).list||{},die=t=>CF(t).filter,fie=Xn(z_,t=>Object.keys(t).reduce((e,n)=>(e.push(t[n]),e),[])),fRe=Xn(fie,die,(t,e)=>{if(!e)return t;const n=XO(e.trim().toLowerCase());return t.filter(r=>XO(r.name.toLowerCase()).includes(n))}),um=t=>t.talks,AF=t=>um(t).list||{},PF=t=>um(t).filter||"",hie=t=>um(t).errorTalksLoad,pie=t=>um(t).loading,hRe=t=>um(t).loaded,cm=Xn(AF,t=>Object.keys(t).reduce((e,n)=>(t[n].hideInFeedback||e.push(t[n]),e),[])),OF=Xn(cm,t=>t.reduce((e,n)=>{const r=B_(n.startTime);return e.includes(r)||e.push(r),e},[]).sort()),sR=Xn(cm,PF,z_,(t,e,n)=>{const r=e.toLowerCase().trim();return t.filter(i=>{const s=i.title.toLowerCase().includes(r);let o=0;i.speakers?i.speakers.filter(c=>c.length>0).map(c=>n[c]).filter(c=>c&&c.name).map(c=>c.name).filter(c=>c.toLowerCase().replace("_"," ").includes(r)).length>0&&(o=1):o=-1;const l=i.tags&&i.tags.filter(c=>c.toLowerCase().includes(r)).length>0;return s||o>0||l})}),pRe=Xn(sR,t=>{const e={};return t.forEach(n=>{e[n.id]=n}),e}),mie=Xn(sR,Gp,(t,e)=>{const n=t.filter(i=>e===B_(i.startTime));if(n.length===0)return[];const r=n.reduce((i,s)=>(i[s.trackTitle]||(i[s.trackTitle]=[]),i[s.trackTitle].push({...s,startTimeLuxon:s.startTime?Ae.fromISO(s.startTime,{setZone:!0}):null,endTimeLuxon:s.endTime?Ae.fromISO(s.endTime,{setZone:!0}):null}),i),{});return Object.keys(r).sort().reduce((i,s)=>(i.push({track:s,talks:r[s].sort((o,l)=>!o.startTimeLuxon||!l.startTimeLuxon?0:o.startTimeLuxon-l.startTimeLuxon)}),i),[])}),gie=Xn(sR,Gp,(t,e)=>t.filter(n=>e!==B_(n.startTime))),mRe=Xn(cm,t=>[...new Set(t.map(e=>e.trackTitle).filter(e=>!!e))].sort()),gRe=Xn(cm,t=>[...new Set(t.reduce((e,n)=>
206(n.tags&&n.tags.forEach(r=>{e.includes(r)||e.push(r)}),e),[]))].sort()),yie=({to:t})=>(T.useEffect(()=>{t&&window.location.replace(t)},[t]),""),NF="project/get/success",ZT="project/get/error",vie="project/get/notFound",DF="project/getVoteResult/success",MF="project/getVoteResult/error",Qs="project/incrementVoteLocally",LF="project/setSelectedDate";function Sv(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:const n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(const n in e)!e.hasOwnProperty(n)||!_ie(n)||(t[n]=Sv(t[n],e[n]));return t}function _ie(t){return t!=="__proto__"}function wie(){return typeof self=="object"&&self.self===self}/**
207 * @license
208 * Copyright 2017 Google LLC
209 *
210 * Licensed under the Apache License, Version 2.0 (the "License");
211 * you may not use this file except in compliance with the License.
212 * You may obtain a copy of the License at
213 *
214 *   http://www.apache.org/licenses/LICENSE-2.0
215 *
216 * Unless required by applicable law or agreed to in writing, software
217 * distributed under the License is distributed on an "AS IS" BASIS,
218 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
219 * See the License for the specific language governing permissions and
220 * limitations under the License.
221 */const Eie="FirebaseError";let Sie=class VF extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Eie,Object.setPrototypeOf(this,VF.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,oR.prototype.create)}},oR=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Tie(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Sie(i,l,r)}};function Tie(t,e){return t.replace(bie,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const bie=/\{\$([^}]+)}/g;/**
222 * @license
223 * Copyright 2017 Google LLC
224 *
225 * Licensed under the Apache License, Version 2.0 (the "License");
226 * you may not use this file except in compliance with the License.
227 * You may obtain a copy of the License at
228 *
229 *   http://www.apache.org/licenses/LICENSE-2.0
230 *
231 * Unless required by applicable law or agreed to in writing, software
232 * distributed under the License is distributed on an "AS IS" BASIS,
233 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
234 * See the License for the specific language governing permissions and
235 * limitations under the License.
236 */function eN(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Iie(t,e){const n=new Rie(t,e);return n.subscribe.bind(n)}let Rie=class{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.");xie(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=LS),i.error===void 0&&(i.error=LS),i.complete===void 0&&(i.complete=LS);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function xie(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 LS(){}/**
237 * @license
238 * Copyright 2017 Google LLC
239 *
240 * Licensed under the Apache License, Version 2.0 (the "License");
241 * you may not use this file except in compliance with the License.
242 * You may obtain a copy of the License at
243 *
244 *   http://www.apache.org/licenses/LICENSE-2.0
245 *
246 * Unless required by applicable law or agreed to in writing, software
247 * distributed under the License is distributed on an "AS IS" BASIS,
248 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
249 * See the License for the specific language governing permissions and
250 * limitations under the License.
251 */class kie{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))}}}class En{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}}/**
252 * @license
253 * Copyright 2019 Google LLC
254 *
255 * Licensed under the Apache License, Version 2.0 (the "License");
256 * you may not use this file except in compliance with the License.
257 * You may obtain a copy of the License at
258 *
259 *   http://www.apache.org/licenses/LICENSE-2.0
260 *
261 * Unless required by applicable law or agreed to in writing, software
262 * distributed under the License is distributed on an "AS IS" BASIS,
263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
264 * See the License for the specific language governing permissions and
265 * limitations under the License.
266 */const Al="[DEFAULT]";/**
267 * @license
268 * Copyright 2019 Google LLC
269 *
270 * Licensed under the Apache License, Version 2.0 (the "License");
271 * you may not use this file except in compliance with the License.
272 * You may obtain a copy of the License at
273 *
274 *   http://www.apache.org/licenses/LICENSE-2.0
275 *
276 * Unless required by applicable law or agreed to in writing, software
277 * distributed under the License is distributed on an "AS IS" BASIS,
278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
279 * See the License for the specific language governing permissions and
280 * limitations under the License.
281 */class Cie{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 kie;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?.identifier),i=(n=e?.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Pie(e))try{this.getOrInitializeService({instanceIdentifier:Al})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Al){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=Al){return this.instances.has(e)}getOptions(e=Al){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Aie(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=Al){return this.component?this.component.multipleInstances?e:Al:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Aie(t){return t===Al?void 0:t}function Pie(t){return t.instantiationMode==="EAGER"}/**
282 * @license
283 * Copyright 2019 Google LLC
284 *
285 * Licensed under the Apache License, Version 2.0 (the "License");
286 * you may not use this file except in compliance with the License.
287 * You may obtain a copy of the License at
288 *
289 *   http://www.apache.org/licenses/LICENSE-2.0
290 *
291 * Unless required by applicable law or agreed to in writing, software
292 * distributed under the License is distributed on an "AS IS" BASIS,
293 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
294 * See the License for the specific language governing permissions and
295 * limitations under the License.
296 */class Oie{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 Cie(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
297 * @license
298 * Copyright 2017 Google LLC
299 *
300 * Licensed under the Apache License, Version 2.0 (the "License");
301 * you may not use this file except in compliance with the License.
302 * You may obtain a copy of the License at
303 *
304 *   http://www.apache.org/licenses/LICENSE-2.0
305 *
306 * Unless required by applicable law or agreed to in writing, software
307 * distributed under the License is distributed on an "AS IS" BASIS,
308 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
309 * See the License for the specific language governing permissions and
310 * limitations under the License.
311 */const aR=[];var At;(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"})(At||(At={}));const FF={debug:At.DEBUG,verbose:At.VERBOSE,info:At.INFO,warn:At.WARN,error:At.ERROR,silent:At.SILENT},Nie=At.INFO,Die={[At.DEBUG]:"log",[At.VERBOSE]:"log",[At.INFO]:"info",[At.WARN]:"warn",[At.ERROR]:"error"},Mie=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=Die[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let Lie=class{constructor(e){this.name=e,this._logLevel=Nie,this._logHandler=Mie,this._userLogHandler=null,aR.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in At))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?FF[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,At.DEBUG,...e),this._logHandler(this,At.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,At.VERBOSE,...e),this._logHandler(this,At.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,At.INFO,...e),this._logHandler(this,At.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,At.WARN,...e),this._logHandler(this,At.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,At.ERROR,...e),this._logHandler(this,At.ERROR,...e)}};function Vie(t){aR.forEach(e=>{e.setLogLevel(t)})}function Fie(t,e){for(const n of aR){let r=null;e&&e.level&&(r=FF[e.level]),t===null?n.userLogHandler=null:n.userLogHandler=(i,s,...o)=>{const l=o.map(c=>{if(c==null)return null;if(typeof c=="string")return c;if(typeof c=="number"||typeof c=="boolean")return c.toString();if(c instanceof Error)return c.message;try{return JSON.stringify(c)}catch{return null}}).filter(c=>c).join(" ");s>=(r??i.logLevel)&&t({level:At[s].toLowerCase(),message:l,args:o,type:i.name})}}}var tN={};/**
312 * @license
313 * Copyright 2017 Google LLC
314 *
315 * Licensed under the Apache License, Version 2.0 (the "License");
316 * you may not use this file except in compliance with the License.
317 * You may obtain a copy of the License at
318 *
319 *   http://www.apache.org/licenses/LICENSE-2.0
320 *
321 * Unless required by applicable law or agreed to in writing, softw
321are
322 * distributed under the License is distributed on an "AS IS" BASIS,
323 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
324 * See the License for the specific language governing permissions and
325 * limitations under the License.
326 */const $F=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},$ie=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},UF={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,c=i+2<t.length,d=c?t[i+2]:0,h=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,v=d&63;c||(v=64,o||(g=64)),r.push(n[h],n[m],n[g],n[v])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray($F(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):$ie(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||m==null)throw new Uie;const g=s<<2|l>>4;if(r.push(g),d!==64){const v=l<<4&240|d>>2;if(r.push(v),m!==64){const E=d<<6&192|m;r.push(E)}}}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)}}};let Uie=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}};const jie=function(t){const e=$F(t);return UF.encodeByteArray(e,!0)},jF=function(t){return jie(t).replace(/\./g,"")},Bie=function(t){try{return UF.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
327 * @license
328 * Copyright 2022 Google LLC
329 *
330 * Licensed under the Apache License, Version 2.0 (the "License");
331 * you may not use this file except in compliance with the License.
332 * You may obtain a copy of the License at
333 *
334 *   http://www.apache.org/licenses/LICENSE-2.0
335 *
336 * Unless required by applicable law or agreed to in writing, software
337 * distributed under the License is distributed on an "AS IS" BASIS,
338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
339 * See the License for the specific language governing permissions and
340 * limitations under the License.
341 */function zie(){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.")}/**
342 * @license
343 * Copyright 2022 Google LLC
344 *
345 * Licensed under the Apache License, Version 2.0 (the "License");
346 * you may not use this file except in compliance with the License.
347 * You may obtain a copy of the License at
348 *
349 *   http://www.apache.org/licenses/LICENSE-2.0
350 *
351 * Unless required by applicable law or agreed to in writing, software
352 * distributed under the License is distributed on an "AS IS" BASIS,
353 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
354 * See the License for the specific language governing permissions and
355 * limitations under the License.
356 */const Wie=()=>zie().__FIREBASE_DEFAULTS__,qie=()=>{if(typeof process>"u"||typeof tN>"u")return;const t=tN.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Hie=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Bie(t[1]);return e&&JSON.parse(e)},Gie=()=>{try{return Wie()||qie()||Hie()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},BF=()=>{var t;return(t=Gie())===null||t===void 0?void 0:t.config};function Kie(){try{return typeof indexedDB=="object"}catch{return!1}}function Qie(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/**
357 * @license
358 * Copyright 2017 Google LLC
359 *
360 * Licensed under the Apache License, Version 2.0 (the "License");
361 * you may not use this file except in compliance with the License.
362 * You may obtain a copy of the License at
363 *
364 *   http://www.apache.org/licenses/LICENSE-2.0
365 *
366 * Unless required by applicable law or agreed to in writing, software
367 * distributed under the License is distributed on an "AS IS" BASIS,
368 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
369 * See the License for the specific language governing permissions and
370 * limitations under the License.
371 */const Yie="FirebaseError";let W_=class zF extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Yie,Object.setPrototypeOf(this,zF.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,WF.prototype.create)}},WF=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Jie(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new W_(i,l,r)}};function Jie(t,e){return t.replace(Xie,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const Xie=/\{\$([^}]+)}/g;function eb(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(nN(s)&&nN(o)){if(!eb(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function nN(t){return t!==null&&typeof t=="object"}const Zie=(t,e)=>e.some(n=>t instanceof n);let rN,iN;function ese(){return rN||(rN=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function tse(){return iN||(iN=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const qF=new WeakMap,tb=new WeakMap,HF=new WeakMap,VS=new WeakMap,lR=new WeakMap;function nse(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(Aa(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&qF.set(n,t)}).catch(()=>{}),lR.set(e,t),e}function rse(t){if(tb.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});tb.set(t,e)}let nb={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return tb.get(t);if(e==="objectStoreNames")return t.objectStoreNames||HF.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Aa(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 ise(t){nb=t(nb)}function sse(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(FS(this),e,...n);return HF.set(r,e.sort?e.sort():[e]),Aa(r)}:tse().includes(t)?function(...e){return t.apply(FS(this),e),Aa(qF.get(this))}:function(...e){return Aa(t.apply(FS(this),e))}}function ose(t){return typeof t=="function"?sse(t):(t instanceof IDBTransaction&&rse(t),Zie(t,ese())?new Proxy(t,nb):t)}function Aa(t){if(t instanceof IDBRequest)return nse(t);if(VS.has(t))return VS.get(t);const e=ose(t);return e!==t&&(VS.set(t,e),lR.set(e,t)),e}const FS=t=>lR.get(t);function GF(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),l=Aa(o);return r&&o.addEventListener("upgradeneeded",c=>{r(Aa(o.result),c.oldVersion,c.newVersion,Aa(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",d=>i(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const ase=["get","getKey","getAll","getAllKeys","count"],lse=["put","add","delete","clear"],$S=new Map;function sN(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if($S.get(e))return $S.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=lse.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ase.includes(n)))return;const s=async function(o,...l){const c=this.transaction(o,i?"readwrite":"readonly");let d=c.store;
371return r&&(d=d.index(l.shift())),(await Promise.all([d[n](...l),i&&c.done]))[0]};return $S.set(e,s),s}ise(t=>({...t,get:(e,n,r)=>sN(e,n)||t.get(e,n,r),has:(e,n)=>!!sN(e,n)||t.has(e,n)}));/**
372 * @license
373 * Copyright 2019 Google LLC
374 *
375 * Licensed under the Apache License, Version 2.0 (the "License");
376 * you may not use this file except in compliance with the License.
377 * You may obtain a copy of the License at
378 *
379 *   http://www.apache.org/licenses/LICENSE-2.0
380 *
381 * Unless required by applicable law or agreed to in writing, software
382 * distributed under the License is distributed on an "AS IS" BASIS,
383 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
384 * See the License for the specific language governing permissions and
385 * limitations under the License.
386 */class use{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(cse(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function cse(t){const e=t.getComponent();return e?.type==="VERSION"}const rb="@firebase/app",oN="0.9.29";/**
387 * @license
388 * Copyright 2019 Google LLC
389 *
390 * Licensed under the Apache License, Version 2.0 (the "License");
391 * you may not use this file except in compliance with the License.
392 * You may obtain a copy of the License at
393 *
394 *   http://www.apache.org/licenses/LICENSE-2.0
395 *
396 * Unless required by applicable law or agreed to in writing, software
397 * distributed under the License is distributed on an "AS IS" BASIS,
398 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
399 * See the License for the specific language governing permissions and
400 * limitations under the License.
401 */const su=new Lie("@firebase/app"),dse="@firebase/app-compat",fse="@firebase/analytics-compat",hse="@firebase/analytics",pse="@firebase/app-check-compat",mse="@firebase/app-check",gse="@firebase/auth",yse="@firebase/auth-compat",vse="@firebase/database",_se="@firebase/database-compat",wse="@firebase/functions",Ese="@firebase/functions-compat",Sse="@firebase/installations",Tse="@firebase/installations-compat",bse="@firebase/messaging",Ise="@firebase/messaging-compat",Rse="@firebase/performance",xse="@firebase/performance-compat",kse="@firebase/remote-config",Cse="@firebase/remote-config-compat",Ase="@firebase/storage",Pse="@firebase/storage-compat",Ose="@firebase/firestore",Nse="@firebase/firestore-compat",Dse="firebase",Mse="10.9.0";/**
402 * @license
403 * Copyright 2019 Google LLC
404 *
405 * Licensed under the Apache License, Version 2.0 (the "License");
406 * you may not use this file except in compliance with the License.
407 * You may obtain a copy of the License at
408 *
409 *   http://www.apache.org/licenses/LICENSE-2.0
410 *
411 * Unless required by applicable law or agreed to in writing, software
412 * distributed under the License is distributed on an "AS IS" BASIS,
413 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
414 * See the License for the specific language governing permissions and
415 * limitations under the License.
416 */const Fa="[DEFAULT]",Lse={[rb]:"fire-core",[dse]:"fire-core-compat",[hse]:"fire-analytics",[fse]:"fire-analytics-compat",[mse]:"fire-app-check",[pse]:"fire-app-check-compat",[gse]:"fire-auth",[yse]:"fire-auth-compat",[vse]:"fire-rtdb",[_se]:"fire-rtdb-compat",[wse]:"fire-fn",[Ese]:"fire-fn-compat",[Sse]:"fire-iid",[Tse]:"fire-iid-compat",[bse]:"fire-fcm",[Ise]:"fire-fcm-compat",[Rse]:"fire-perf",[xse]:"fire-perf-compat",[kse]:"fire-rc",[Cse]:"fire-rc-compat",[Ase]:"fire-gcs",[Pse]:"fire-gcs-compat",[Ose]:"fire-fst",[Nse]:"fire-fst-compat","fire-js":"fire-js",[Dse]:"fire-js-all"};/**
417 * @license
418 * Copyright 2019 Google LLC
419 *
420 * Licensed under the Apache License, Version 2.0 (the "License");
421 * you may not use this file except in compliance with the License.
422 * You may obtain a copy of the License at
423 *
424 *   http://www.apache.org/licenses/LICENSE-2.0
425 *
426 * Unless required by applicable law or agreed to in writing, software
427 * distributed under the License is distributed on an "AS IS" BASIS,
428 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
429 * See the License for the specific language governing permissions and
430 * limitations under the License.
431 */const $a=new Map,yp=new Map;function Tv(t,e){try{t.container.addComponent(e)}catch(n){su.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function KF(t,e){t.container.addOrOverwriteComponent(e)}function Kr(t){const e=t.name;if(yp.has(e))return su.debug(`There were multiple attempts to register component ${e}.`),!1;yp.set(e,t);for(const n of $a.values())Tv(n,t);return!0}function q_(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function Vse(t,e,n=Fa){q_(t,e).clearInstance(n)}function Fse(){yp.clear()}/**
432 * @license
433 * Copyright 2019 Google LLC
434 *
435 * Licensed under the Apache License, Version 2.0 (the "License");
436 * you may not use this file except in compliance with the License.
437 * You may obtain a copy of the License at
438 *
439 *   http://www.apache.org/licenses/LICENSE-2.0
440 *
441 * Unless required by applicable law or agreed to in writing, software
442 * distributed under the License is distributed on an "AS IS" BASIS,
443 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
444 * See the License for the specific language governing permissions and
445 * limitations under the License.
446 */const $se={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},To=new WF("app","Firebase",$se);/**
447 * @license
448 * Copyright 2019 Google LLC
449 *
450 * Licensed under the Apache License, Version 2.0 (the "License");
451 * you may not use this file except in compliance with the License.
452 * You may obtain a copy of the License at
453 *
454 *   http://www.apache.org/licenses/LICENSE-2.0
455 *
456 * Unless required by applicable law or agreed to in writing, software
457 * distributed under the License is distributed on an "AS IS" BASIS,
458 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
459 * See the License for the specific language governing permissions and
460 * limitations under the License.
461 */let Use=class{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 En("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 To.create("app-deleted",{appName:this._name})}};/**
462 * @license
463 * Copyright 2019 Google LLC
464 *
465 * Licensed under the Apache License, Version 2.0 (the "License");
466 * you may not use this file except in compliance with the License.
467 * You may obtain a copy of the License at
468 *
469 *   http://www.apache.org/licenses/LICENSE-2.0
470 *
471 * Unless required by applicable law or agreed to in writing, software
472 * distributed under the License is distributed on an "AS IS" BASIS,
473 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
474 * See the License for the specific language governing permissions and
475 * limitations under the License.
476 */const Mo=Mse;function uR(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:Fa,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw To.create("bad-app-name",{appName:String(i)});if(n||(n=BF()),!n)throw To.create("no-options");const s=$a.get(i);if(s){if(eb(n,s.options)&&eb(r,s.config))return s;throw To.create("duplicate-app",{appName:i})}const o=new Oie(i);for(const c of yp.values())o.addComponent(c);const l=new Use(n,r,o);return $a.set(i,l),l}function jse(t=Fa){const e=$a.get(t);if(!e&&t===Fa&&BF())return uR();if(!e)throw To.create("no-app",{appName:t});return e}function Bse(){return Array.from($a.values())}async function QF(t){const e=t.name;$a.has(e)&&($a.delete(e),await Promise.all(t.container.getProviders().map(n=>n.delete())),t.isDeleted=!0)}function Pn(t,e,n){var r;let i=(r=Lse[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),su.warn(l.join(" "));return}Kr(new En(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}function YF(t,e){if(t!==null&&typeof t!="function")throw To.create("invalid-log-argument");Fie(t,e)}function JF(t){Vie(t)}/**
477 * @license
478 * Copyright 2021 Google LLC
479 *
480 * Licensed under the Apache License, Version 2.0 (the "License");
481 * you may not use this file except in compliance with the License.
482 * You may obtain a copy of the License at
483 *
484 *   http://www.apache.org/licenses/LICENSE-2.0
485 *
486 * Unless required by applicable law or agreed to in writing, software
487 * distributed under the License is distributed on an "AS IS" BASIS,
488 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
489 * See the License for the specific language governing permissions and
490 * limitations under the License.
491 */const zse="firebase-heartbeat-database",Wse=1,vp="firebase-heartbeat-store";let US=null;function XF(){return US||(US=GF(zse,Wse,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(vp)}catch(n){console.warn(n)}}}}).catch(t=>{throw To.create("idb-open",{originalErrorMessage:t.message})})),US}async function qse(t){try{const n=(await XF()).transaction(vp),r=await n.objectStore(vp).get(ZF(t));return await n.done,r}catch(e){if(e instanceof W_)su.warn(e.message);else{const n=To.create("idb-get",{originalErrorMessage:e?.message});su.warn(n.message)}}}async function aN(t,e){try{const r=(await XF()).transaction(vp,"readwrite");await r.objectStore(vp).put(e,ZF(t)),await r.done}catch(n){if(n instanceof W_)su.warn(n.message);else{const r=To.create("idb-set",{originalErrorMessage:n?.message});su.warn(r.message)}}}function ZF(t){return`${t.name}!${t.options.appId}`}/**
492 * @license
493 * Copyright 2021 Google LLC
494 *
495 * Licensed under the Apache License, Version 2.0 (the "License");
496 * you may not use this file except in compliance with the License.
497 * You may obtain a copy of the License at
498 *
499 *   http://www.apache.org/licenses/LICENSE-2.0
500 *
501 * Unless required by applicable law or agreed to in writing, software
502 * distributed under the License is distributed on an "AS IS" BASIS,
503 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
504 * See the License for the specific language governing permissions and
505 * limitations under the License.
506 */const Hse=1024,Gse=720*60*60*1e3;class Kse{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Yse(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=lN();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const l=new Date(o.date).valueOf();return Date.now()-l<=Gse}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=lN(),{heartbeatsToSend:r,unsentEntries:i}=Qse(this._heartbeatsCache.heartbeats),s=jF(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function lN(){return new Date().toISOString().substring(0,10)}function Qse(t,e=Hse){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),uN(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),uN(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class Yse{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Kie()?Qie().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await qse(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return aN(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 aN(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function uN(t){return jF(JSON.stringify({version:2,heartbeats:t})).length}/**
507 * @license
508 * Copyright 2019 Google LLC
509 *
510 * Licensed under the Apache License, Version 2.0 (the "License");
511 * you may not use this file except in compliance with the License.
512 * You may obtain a copy of the License at
513 *
514 *   http://www.apache.org/licenses/LICENSE-2.0
515 *
516 * Unless required by applicable law or agreed to in writing, software
517 * distributed under the License is distributed on an "AS IS" BASIS,
518 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
519 * See the License for the specific language governing permissions and
520 * limitations under the License.
521 */function Jse(t){Kr(new En("platform-logger",e=>new use(e),"PRIVATE")),Kr(new En("heartbeat",e=>new Kse(e),"PRIVATE")),Pn(rb,oN,t),Pn(rb,oN,"esm2017"),Pn("fire-js","")}Jse("");const Xse=Object.freeze(Object.defineProperty({__proto__:null,FirebaseError:W_,SDK_VERSION:Mo,_DEFAULT_ENTRY_NAME:Fa,_addComponent:Tv,_addOrOverwriteComponent:KF,_apps:$a,_clearComponents:Fse,_components:yp,_getProvider:q_,_registerComponent:Kr,_removeServiceInstance:Vse,deleteApp:QF,getApp:jse,getApps:Bse,initializeApp:uR,onLog:YF,registerVersion:Pn,setLogLevel:JF},Symbol.toStringTag,{value:"Module"}));/**
522 * @license
523 * Copyright 2017 Google LLC
524 *
525 * Licensed under the Apache License, Version 2.0 (the "License");
526 * you may not use this file except in compliance with the License.
527 * You may obtain a copy of the License at
528 *
529 *   http://www.apache.org/licenses/LICENSE-2.0
530 *
531 * Unless required by applicable law or agreed to in writing, software
532 * distributed under the License is distributed on an "AS IS" BASIS,
533 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
534 * See the License for the specific language governing permissions and
535 * limitations under the License.
536 */var Lt;(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"})(Lt||(Lt={}));const Zse={debug:Lt.DEBUG,verbose:Lt.VERBOSE,info:Lt.INFO,warn:Lt.WARN,error:Lt.ERROR,silent:Lt.SILENT},eoe=Lt.INFO,toe={[Lt.DEBUG]:"log",[Lt.VERBOSE]:"log",[Lt.INFO]:"info",[Lt.WARN]:"warn",[Lt.ERROR]:"error"},noe=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=toe[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let roe=class{constructor(e){this.name=e,this._logLevel=eoe,this._logHandler=noe,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Lt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?Zse[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,Lt.DEBUG,...e),this._logHandler(this,Lt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Lt.VERBOSE,...e),this._logHandler(this,Lt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Lt.INFO,...e),this._logHandler(this,Lt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Lt.WARN,...e),this._logHandler(this,Lt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Lt.ERROR,...e),this._logHandler(this,Lt.ERROR,...e)}};/**
537 * @license
538 * Copyright 2020 Google LLC
539 *
540 * Licensed under the Apache License, Version 2.0 (the "License");
541 * you may not use this file except in compliance with the License.
542 * You may obtain a copy of the License at
543 *
544 *   http://www.apache.org/licenses/LICENSE-2.0
545 *
546 * Unless required by applicable law or agreed to in writing, software
547 * distributed under the License is distributed on an "AS IS" BASIS,
548 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
549 * See the License for the specific language governing permissions and
550 * limitations under the License.
551 */class ioe{constructor(e,n){this._delegate=e,this.firebase=n,Tv(e,new En("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),QF(this._delegate)))}_getService(e,n=Fa){var r;this._delegate.checkDestroyed();const i=this._delegate.container.getProvider(e);return!i.isInitialized()&&((r=i.getComponent())===null||r===void 0?void 0:r.instantiationMode)==="EXPLICIT"&&i.initialize(),i.getImmediate({identifier:n})}_removeServiceInstance(e,n=Fa){this._delegate.container.getProvider(e).
551clearInstance(n)}_addComponent(e){Tv(this._delegate,e)}_addOrOverwriteComponent(e){KF(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}/**
552 * @license
553 * Copyright 2019 Google LLC
554 *
555 * Licensed under the Apache License, Version 2.0 (the "License");
556 * you may not use this file except in compliance with the License.
557 * You may obtain a copy of the License at
558 *
559 *   http://www.apache.org/licenses/LICENSE-2.0
560 *
561 * Unless required by applicable law or agreed to in writing, software
562 * distributed under the License is distributed on an "AS IS" BASIS,
563 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
564 * See the License for the specific language governing permissions and
565 * limitations under the License.
566 */const soe={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},cN=new oR("app-compat","Firebase",soe);/**
567 * @license
568 * Copyright 2019 Google LLC
569 *
570 * Licensed under the Apache License, Version 2.0 (the "License");
571 * you may not use this file except in compliance with the License.
572 * You may obtain a copy of the License at
573 *
574 *   http://www.apache.org/licenses/LICENSE-2.0
575 *
576 * Unless required by applicable law or agreed to in writing, software
577 * distributed under the License is distributed on an "AS IS" BASIS,
578 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
579 * See the License for the specific language governing permissions and
580 * limitations under the License.
581 */function ooe(t){const e={},n={__esModule:!0,initializeApp:s,app:i,registerVersion:Pn,setLogLevel:JF,onLog:YF,apps:null,SDK_VERSION:Mo,INTERNAL:{registerComponent:l,removeApp:r,useAsService:c,modularAPIs:Xse}};n.default=n,Object.defineProperty(n,"apps",{get:o});function r(d){delete e[d]}function i(d){if(d=d||Fa,!eN(e,d))throw cN.create("no-app",{appName:d});return e[d]}i.App=t;function s(d,h={}){const m=uR(d,h);if(eN(e,m.name))return e[m.name];const g=new t(m,n);return e[m.name]=g,g}function o(){return Object.keys(e).map(d=>e[d])}function l(d){const h=d.name,m=h.replace("-compat","");if(Kr(d)&&d.type==="PUBLIC"){const g=(v=i())=>{if(typeof v[m]!="function")throw cN.create("invalid-app-argument",{appName:h});return v[m]()};d.serviceProps!==void 0&&Sv(g,d.serviceProps),n[m]=g,t.prototype[m]=function(...v){return this._getService.bind(this,h).apply(this,d.multipleInstances?v:[])}}return d.type==="PUBLIC"?n[m]:null}function c(d,h){return h==="serverAuth"?null:h}return n}/**
582 * @license
583 * Copyright 2019 Google LLC
584 *
585 * Licensed under the Apache License, Version 2.0 (the "License");
586 * you may not use this file except in compliance with the License.
587 * You may obtain a copy of the License at
588 *
589 *   http://www.apache.org/licenses/LICENSE-2.0
590 *
591 * Unless required by applicable law or agreed to in writing, software
592 * distributed under the License is distributed on an "AS IS" BASIS,
593 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594 * See the License for the specific language governing permissions and
595 * limitations under the License.
596 */function e$(){const t=ooe(ioe);t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e$,extendNamespace:e,createSubscribe:Iie,ErrorFactory:oR,deepExtend:Sv});function e(n){Sv(t,n)}return t}const aoe=e$();/**
597 * @license
598 * Copyright 2019 Google LLC
599 *
600 * Licensed under the Apache License, Version 2.0 (the "License");
601 * you may not use this file except in compliance with the License.
602 * You may obtain a copy of the License at
603 *
604 *   http://www.apache.org/licenses/LICENSE-2.0
605 *
606 * Unless required by applicable law or agreed to in writing, software
607 * distributed under the License is distributed on an "AS IS" BASIS,
608 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
609 * See the License for the specific language governing permissions and
610 * limitations under the License.
611 */const dN=new roe("@firebase/app-compat"),loe="@firebase/app-compat",uoe="0.2.29";/**
612 * @license
613 * Copyright 2019 Google LLC
614 *
615 * Licensed under the Apache License, Version 2.0 (the "License");
616 * you may not use this file except in compliance with the License.
617 * You may obtain a copy of the License at
618 *
619 *   http://www.apache.org/licenses/LICENSE-2.0
620 *
621 * Unless required by applicable law or agreed to in writing, software
622 * distributed under the License is distributed on an "AS IS" BASIS,
623 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
624 * See the License for the specific language governing permissions and
625 * limitations under the License.
626 */function coe(t){Pn(loe,uoe,t)}/**
627 * @license
628 * Copyright 2020 Google LLC
629 *
630 * Licensed under the Apache License, Version 2.0 (the "License");
631 * you may not use this file except in compliance with the License.
632 * You may obtain a copy of the License at
633 *
634 *   http://www.apache.org/licenses/LICENSE-2.0
635 *
636 * Unless required by applicable law or agreed to in writing, software
637 * distributed under the License is distributed on an "AS IS" BASIS,
638 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
639 * See the License for the specific language governing permissions and
640 * limitations under the License.
641 */if(wie()&&self.firebase!==void 0){dN.warn(`
642    Warning: Firebase is already defined in the global scope. Please make sure
643    Firebase library is only loaded once.
644  `);const t=self.firebase.SDK_VERSION;t&&t.indexOf("LITE")>=0&&dN.warn(`
645    Warning: You are trying to load Firebase while using Firebase Performance standalone script.
646    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.
647    `)}const Kt=aoe;coe();var doe="firebase",foe="10.9.0";/**
648 * @license
649 * Copyright 2020 Google LLC
650 *
651 * Licensed under the Apache License, Version 2.0 (the "License");
652 * you may not use this file except in compliance with the License.
653 * You may obtain a copy of the License at
654 *
655 *   http://www.apache.org/licenses/LICENSE-2.0
656 *
657 * Unless required by applicable law or agreed to in writing, software
658 * distributed under the License is distributed on an "AS IS" BASIS,
659 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
660 * See the License for the specific language governing permissions and
661 * limitations under the License.
662 */Kt.registerVersion(doe,foe,"app-compat");/**
663 * @license
664 * Copyright 2017 Google LLC
665 *
666 * Licensed under the Apache License, Version 2.0 (the "License");
667 * you may not use this file except in compliance with the License.
668 * You may obtain a copy of the License at
669 *
670 *   http://www.apache.org/licenses/LICENSE-2.0
671 *
672 * Unless required by applicable law or agreed to in writing, software
673 * distributed under the License is distributed on an "AS IS" BASIS,
674 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675 * See the License for the specific language governing permissions and
676 * limitations under the License.
677 */var ut;(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"})(ut||(ut={}));const hoe={debug:ut.DEBUG,verbose:ut.VERBOSE,info:ut.INFO,warn:ut.WARN,error:ut.ERROR,silent:ut.SILENT},poe=ut.INFO,moe={[ut.DEBUG]:"log",[ut.VERBOSE]:"log",[ut.INFO]:"info",[ut.WARN]:"warn",[ut.ERROR]:"error"},goe=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=moe[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let yoe=class{constructor(e){this.name=e,this._logLevel=poe,this._logHandler=goe,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in ut))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?hoe[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,ut.DEBUG,...e),this._logHandler(this,ut.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,ut.VERBOSE,...e),this._logHandler(this,ut.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,ut.INFO,...e),this._logHandler(this,ut.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,ut.WARN,...e),this._logHandler(this,ut.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,ut.ERROR,...e),this._logHandler(this,ut.ERROR,...e)}};var fN={};/**
678 * @license
679 * Copyright 2017 Google LLC
680 *
681 * Licensed under the Apache License, Version 2.0 (the "License");
682 * you may not use this file except in compliance with the License.
683 * You may obtain a copy of the License at
684 *
685 *   http://www.apache.org/licenses/LICENSE-2.0
686 *
687 * Unless required by applicable law or agreed to in writing, software
688 * distributed under the License is distributed on an "AS IS" BASIS,
689 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
690 * See the License for the specific language governing permissions and
691 * limitations under the License.
692 */const t$=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},voe=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},n$={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,c=i+2<t.length,d=c?t[i+2]:0,h=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,v=d&63;c||(v=64,o||(g=64)),r.push(n[h],n[m],n[g],n[v])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(t$(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):voe(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||m==null)throw new _oe;const g=s<<2|l>>4;if(r.push(g),d!==64){const v=l<<4&240|d>>2;if(r.push(v),m!==64){const E=d<<6&192|m;r.push(E)}}}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)}}};let _oe=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}};const woe=function(t){const e=t$(t);return n$.encodeByteArray(e,!0)},hN=function(t){return woe(t).replace(/\./g,"")},Eoe=function(t){try{return n$.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
693 * @license
694 * Copyright 2022 Google LLC
695 *
696 * Licensed under the Apache License, Version 2.0 (the "License");
697 * you may not use this file except in compliance with the License.
698 * You may obtain a copy of the License at
699 *
700 *   http://www.apache.org/licenses/LICENSE-2.0
701 *
702 * Unless required by applicable law or agreed to in writing, software
703 * distributed under the License is distributed on an "AS IS" BASIS,
704 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
705 * See the License for the specific language governing permissions and
706 * limitations under the License.
707 */function Soe(){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.")}/**
708 * @license
709 * Copyright 2022 Google LLC
710 *
711 * Licensed under the Apache License, Version 2.0 (the "License");
712 * you may not use this file except in compliance with the License.
713 * You may obtain a copy of the License at
714 *
715 *   http://www.apache.org/licenses/LICENSE-2.0
716 *
717 * Unless required by applicable law or agreed to in writing, software
718 * distributed under the License is distributed on an "AS IS" BASIS,
719 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
720 * See the License for the specific language governing permissions and
721 * limitations under the License.
722 */const Toe=()=>Soe().__FIREBASE_DEFAULTS__,boe=()=>{if(typeof process>"u"||typeof fN>"u")return;const t=fN.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Ioe=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Eoe(t[1]);return e&&JSON.parse(e)},Roe=()=>{try{return Toe()||boe()||Ioe()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}};/**
723 * @license
724 * Copyright 2021 Google LLC
725 *
726 * Licensed under the Apache License, Version 2.0 (the "License");
727 * you may not use this file except in compliance with the License.
728 * You may obtain a copy of the License at
729 *
730 *   http://www.apache.org/licenses/LICENSE-2.0
731 *
732 * Unless required by applicable law or agreed to in writing, software
733 * distributed under the License is distributed on an "AS IS" BASIS,
734 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
735 * See the License for the specific language governing permissions and
736 * limitations under the License.
737 */function xoe(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[hN(JSON.stringify(n)),hN(JSON.stringify(o)),""].join(".")}/**
738 * @license
739 * Copyright 2017 Google LLC
740 *
741 * Licensed under the Apache License, Version 2.0 (the "License");
742 * you may not use this file except in compliance with the License.
743 * You may obtain a copy of the License at
744 *
745 *   http://www.apache.org/licenses/LICENSE-2.0
746 *
747 * Unless required by applicable law or agreed to in writing, software
748 * distributed under the License is distributed on an "AS IS" BASIS,
749 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
750 * See the License for the specific language governing permissions and
751 * limitations under the License.
752 */function bv(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function koe(){var t;const e=(t=Roe())===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 r$(){return!koe()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Coe(){try{return typeof indexedDB=="object"}catch{return!1}}/**
753 * @license
754 * Copyright 2017 Google LLC
755 *
756 * Licensed under the Apache License, Version 2.0 (the "License");
757 * you may not use this file except in compliance with the License.
758 * You may obtain a copy of the License at
759 *
760 *   http://www.apache.org/licenses/LICENSE-2.0
761 *
762 * Unless required by applicable law or agreed to in writing, software
763 * distributed under the License is distributed on an "AS IS" BASIS,
764 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
765 * See the License for the specific language governing permissions and
766 * limitations under the License.
767 */const Aoe="FirebaseError";let i$=class s$ extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Aoe,Object.setPrototypeOf(this,s$.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Poe.prototype.create)}},Poe=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Ooe(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new i$(i,l,r)}};function Ooe(t,e){return t.replace(Noe,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const Noe=/\{\$([^}]+)}/g;function cR(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(pN(s)&&pN(o)){if(!cR(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function pN(t){return t!==null&&typeof t=="object"}/**
768 * @license
769 * Copyright 2021 Google LLC
770 *
771 * Licensed under the Apache License, Version 2.0 (the "License");
772 * you may not use this file except in compliance with the License.
773 * You may obtain a copy of the License at
774 *
775 *   http://www.apache.org/licenses/LICENSE-2.0
776 *
777 * Unless required by applicable law or agreed to in writing, software
778 * distributed under the License is distributed on an "AS IS" BASIS,
779 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
780 * See the License for the specific language governing permissions and
781 * limitations under the License.
782 */function Yn(t){return t&&t._delegate?t._delegate:t}var Doe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ye,dR=dR||{},ze=Doe||self;function H_(t){var e=typeof t;return e=e!="object"?e:t?Array.isArray(t)?"array":e:"null",e=="array"||e=="object"&&typeof t.length=="number"}function G_(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function Moe(t,e,n){return t.call.apply(t.bind,arguments)}function Loe(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,r),t.apply(e,i)}}return function(){return t.apply(e,arguments)}}function Cr(t,e,n){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?Cr=Moe:Cr=Loe,Cr.apply(null,arguments)}function gy(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(this,r)}}function Zn(t,e){function n(){}n.prototype=e.prototype,t.$=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.ac=function(r,i,s){for(var o=Array(arguments.length-2),l=2;l<arguments.length;l++)o[l-2]=arguments[l];return e.prototype[i].apply(r,o)}}function Za(){this.s=this.s,this.o=this.o}var Voe=0;Za.prototype.s=!1;Za.prototype.sa=function(){!this.s&&(this.s=!0,this.N(),Voe!=0)};Za.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const o$=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(typeof t=="string")return typeof e!="string"||e.length!=1?-1:t.indexOf(e,0);for(let n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1};function fR(t){const e=t.length;if(0<e){const n=Array(e);for(let r=0;r<e;r++)n[r]=t[r];return n}return[]}function mN(t,e){for(let n=1;n<arguments.length;n++){const r=arguments[n];if(H_(r)){const i=t.length||0,s=r.length||0;t.length=i+s;for(let o=0;o<s;o++)t[i+o]=r[o]}else t.push(r)}}function Ar(t,e){this.type=t,this.g=this.target=e,this.defaultPrevented=!1}Ar.prototype.h=function(){this.defaultPrevented=!0};var Foe=(function(){if(!ze.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{const n=()=>{};ze.addEventListener("test",n,e),ze.removeEventListener("test",n,e)}catch{}return t})();function _p(t){return/^[\s\xa0]*$/.test(t)}function K_(){var t=ze.navigator;return t&&(t=t.userAgent)?t:""}function Ps(t){return K_().indexOf(t)!=-1}function hR(t){return hR[" "](t),t}hR[" "]=function(){};function $oe(t,e){var n=Oae;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}var Uoe=Ps("Opera"),ud=Ps("Trident")||Ps("MSIE"),a$=Ps("Edge"),ib=a$||ud,l$=Ps("Gecko")&&!(K_().toLowerCase().indexOf("webkit")!=-1&&!Ps("Edge"))&&!(Ps("Trident")||Ps("MSIE"))&&!Ps("Edge"),joe=K_().toLowerCase().indexOf("webkit")!=-1&&!Ps("Edge");function u$(){var t=ze.document;return t?t.documentMode:void 0}var sb;e:{var jS="",BS=(function(){var t=K_();if(l$)return/rv:([^\);]+)(\)|;)/.exec(t);if(a$)return/Edge\/([\d\.]+)/.exec(t);if(ud)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(joe)return/WebKit\/(\S+)/.exec(t);if(Uoe)return/(?:Version)[ \/]?(\S+)/.exec(t)})();if(BS&&(jS=BS?BS[1]:""),ud){var zS=u$();if(zS!=null&&zS>parseFloat(jS)){sb=String(zS);break e}}sb=jS}var ob;if(ze.document&&ud){var gN=u$();ob=gN||parseInt(sb,10)||void 0}else ob=void 0;var Boe=ob;function wp(t,e){if(Ar.call(this,t?t.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(l$){e:{try{hR(e.nodeName);var i=!0;break e}catch{}i=!1}i||(e=null)}}else n=="mouseover"?e=t.fromElement:n=="mouseout"&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=r.clientX!==void 0?r.clientX:r.pageX,this.clientY=r.clientY!==void 0?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=t.clientX!==void 0?t.clientX:t.pageX,this.clientY=t.clientY!==void 0?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=typeof t.pointerType=="string"?t.pointerType:zoe[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&wp.$.h.call(this)}}Zn(wp,Ar);var zoe={2:"touch",3:"pen",4:"mouse"};wp.prototype.h=function(){wp.$.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var Q_="closure_listenable_"+(1e6*Math.random()|0),Woe=0;function qoe(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.la=i,this.key=++Woe,this.fa=this.ia=!1}function Y_(t){t.fa=!0,t.listener=null,t.proxy=null,t.src=null,t.la=null}function pR(t,e,n){for(const r in t)e.call(n,t[r],r,t)}function Hoe(t,e){for(const n in t)e.call(void 0,t[n],n,t)}function c$(t){const e={};for(const n in t)e[n]=t[n];return e}const yN="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
782ing toString valueOf".split(" ");function d$(t,e){let n,r;for(let i=1;i<arguments.length;i++){r=arguments[i];for(n in r)t[n]=r[n];for(let s=0;s<yN.length;s++)n=yN[s],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function J_(t){this.src=t,this.g={},this.h=0}J_.prototype.add=function(t,e,n,r,i){var s=t.toString();t=this.g[s],t||(t=this.g[s]=[],this.h++);var o=lb(t,e,r,i);return-1<o?(e=t[o],n||(e.ia=!1)):(e=new qoe(e,this.src,s,!!r,i),e.ia=n,t.push(e)),e};function ab(t,e){var n=e.type;if(n in t.g){var r=t.g[n],i=o$(r,e),s;(s=0<=i)&&Array.prototype.splice.call(r,i,1),s&&(Y_(e),t.g[n].length==0&&(delete t.g[n],t.h--))}}function lb(t,e,n,r){for(var i=0;i<t.length;++i){var s=t[i];if(!s.fa&&s.listener==e&&s.capture==!!n&&s.la==r)return i}return-1}var mR="closure_lm_"+(1e6*Math.random()|0),WS={};function f$(t,e,n,r,i){if(Array.isArray(e)){for(var s=0;s<e.length;s++)f$(t,e[s],n,r,i);return null}return n=m$(n),t&&t[Q_]?t.O(e,n,G_(r)?!!r.capture:!1,i):Goe(t,e,n,!1,r,i)}function Goe(t,e,n,r,i,s){if(!e)throw Error("Invalid event type");var o=G_(i)?!!i.capture:!!i,l=yR(t);if(l||(t[mR]=l=new J_(t)),n=l.add(e,n,r,o,s),n.proxy)return n;if(r=Koe(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)Foe||(i=o),i===void 0&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(p$(e.toString()),r);else if(t.addListener&&t.removeListener)t.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function Koe(){function t(n){return e.call(t.src,t.listener,n)}const e=Qoe;return t}function h$(t,e,n,r,i){if(Array.isArray(e))for(var s=0;s<e.length;s++)h$(t,e[s],n,r,i);else r=G_(r)?!!r.capture:!!r,n=m$(n),t&&t[Q_]?(t=t.i,e=String(e).toString(),e in t.g&&(s=t.g[e],n=lb(s,n,r,i),-1<n&&(Y_(s[n]),Array.prototype.splice.call(s,n,1),s.length==0&&(delete t.g[e],t.h--)))):t&&(t=yR(t))&&(e=t.g[e.toString()],t=-1,e&&(t=lb(e,n,r,i)),(n=-1<t?e[t]:null)&&gR(n))}function gR(t){if(typeof t!="number"&&t&&!t.fa){var e=t.src;if(e&&e[Q_])ab(e.i,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(p$(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=yR(e))?(ab(n,t),n.h==0&&(n.src=null,e[mR]=null)):Y_(t)}}}function p$(t){return t in WS?WS[t]:WS[t]="on"+t}function Qoe(t,e){if(t.fa)t=!0;else{e=new wp(e,this);var n=t.listener,r=t.la||t.src;t.ia&&gR(t),t=n.call(r,e)}return t}function yR(t){return t=t[mR],t instanceof J_?t:null}var qS="__closure_events_fn_"+(1e9*Math.random()>>>0);function m$(t){return typeof t=="function"?t:(t[qS]||(t[qS]=function(e){return t.handleEvent(e)}),t[qS])}function Jn(){Za.call(this),this.i=new J_(this),this.S=this,this.J=null}Zn(Jn,Za);Jn.prototype[Q_]=!0;Jn.prototype.removeEventListener=function(t,e,n,r){h$(this,t,e,n,r)};function cr(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,typeof e=="string")e=new Ar(e,t);else if(e instanceof Ar)e.target=e.target||t;else{var i=e;e=new Ar(r,t),d$(e,i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=e.g=n[s];i=yy(o,r,!0,e)&&i}if(o=e.g=t,i=yy(o,r,!0,e)&&i,i=yy(o,r,!1,e)&&i,n)for(s=0;s<n.length;s++)o=e.g=n[s],i=yy(o,r,!1,e)&&i}Jn.prototype.N=function(){if(Jn.$.N.call(this),this.i){var t=this.i,e;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Y_(n[r]);delete t.g[e],t.h--}}this.J=null};Jn.prototype.O=function(t,e,n,r){return this.i.add(String(t),e,!1,n,r)};Jn.prototype.P=function(t,e,n,r){return this.i.add(String(t),e,!0,n,r)};function yy(t,e,n,r){if(e=t.i.g[String(e)],!e)return!0;e=e.concat();for(var i=!0,s=0;s<e.length;++s){var o=e[s];if(o&&!o.fa&&o.capture==n){var l=o.listener,c=o.la||o.src;o.ia&&ab(t.i,o),i=l.call(c,r)!==!1&&i}}return i&&!r.defaultPrevented}var vR=ze.JSON.stringify;class Yoe{constructor(e,n){this.i=e,this.j=n,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}function Joe(){var t=_R;let e=null;return t.g&&(e=t.g,t.g=t.g.next,t.g||(t.h=null),e.next=null),e}class Xoe{constructor(){this.h=this.g=null}add(e,n){const r=g$.get();r.set(e,n),this.h?this.h.next=r:this.g=r,this.h=r}}var g$=new Yoe(()=>new Zoe,t=>t.reset());class Zoe{constructor(){this.next=this.g=this.h=null}set(e,n){this.h=e,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function eae(t){var e=1;t=t.split(":");const n=[];for(;0<e&&t.length;)n.push(t.shift()),e--;return t.length&&n.push(t.join(":")),n}function tae(t){ze.setTimeout(()=>{throw t},0)}let Ep,Sp=!1,_R=new Xoe,y$=()=>{const t=ze.Promise.resolve(void 0);Ep=()=>{t.then(nae)}};var nae=()=>{for(var t;t=Joe();){try{t.h.call(t.g)}catch(n){tae(n)}var e=g$;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}Sp=!1};function X_(t,e){Jn.call(this),this.h=t||1,this.g=e||ze,this.j=Cr(this.qb,this),this.l=Date.now()}Zn(X_,Jn);ye=X_.prototype;ye.ga=!1;ye.T=null;ye.qb=function(){if(this.ga){var t=Date.now()-this.l;0<t&&t<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-t):(this.T&&(this.g.clearTimeout(this.T),this.T=null),cr(this,"tick"),this.ga&&(wR(this),this.start()))}};ye.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())};function wR(t){t.ga=!1,t.T&&(t.g.clearTimeout(t.T),t.T=null)}ye.N=function(){X_.$.N.call(this),wR(this),delete this.g};function ER(t,e,n){if(typeof t=="function")n&&(t=Cr(t,n));else if(t&&typeof t.handleEvent=="function")t=Cr(t.handleEvent,t);else throw Error("Invalid listener argument");return 2147483647<Number(e)?-1:ze.setTimeout(t,e||0)}function v$(t){t.g=ER(()=>{t.g=null,t.i&&(t.i=!1,v$(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class rae extends Za{constructor(e,n){super(),this.m=e,this.j=n,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:v$(this)}N(){super.N(),this.g&&(ze.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Tp(t){Za.call(this),this.h=t,this.g={}}Zn(Tp,Za);var vN=[];function _$(t,e,n,r){Array.isArray(n)||(n&&(vN[0]=n.toString()),n=vN);for(var i=0;i<n.length;i++){var s=f$(e,n[i],r||t.handleEvent,!1,t.h||t);if(!s)break;t.g[s.key]=s}}function w$(t){pR(t.g,function(e,n){this.g.hasOwnProperty(n)&&gR(e)},t),t.g={}}Tp.prototype.N=function(){Tp.$.N.call(this),w$(this)};Tp.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};function Z_(){this.g=!0}Z_.prototype.Ea=function(){this.g=!1};function iae(t,e,n,r,i,s){t.info(function(){if(t.g)if(s)for(var o="",l=s.split("&"),c=0;c<l.length;c++){var d=l[c].split("=");if(1<d.length){var h=d[0];d=d[1];var m=h.split("_");o=2<=m.length&&m[1]=="type"?o+(h+"="+d+"&"):o+(h+"=redacted&")}}else o=null;else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+`
783`+n+`
784`+o})}function sae(t,e,n,r,i,s,o){t.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+`
785`+n+`
786`+s+" "+o})}function Mc(t,e,n,r){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+aae(t,n)+(r?" "+r:"")})}function oae(t,e){t.info(function(){return"TIMEOUT: "+e})}Z_.prototype.info=function(){};function aae(t,e){if(!t.g)return e;if(!e)return null;try{var n=JSON.parse(e);if(n){for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if(s!="noop"&&s!="stop"&&s!="close")for(var o=1;o<i.length;o++)i[o]=""}}}}return vR(n)}catch{return e}}var Ru={},_N=null;function ew(){return _N=_N||new Jn}Ru.Ta="serverreachability";function E$(t){Ar.call(this,Ru.Ta,t)}Zn(E$,Ar);function bp(t){const e=ew();cr(e,new E$(e))}Ru.STAT_EVENT="statevent";function S$(t,e){Ar.call(this,Ru.STAT_EVENT,t),this.stat=e}Zn(S$,Ar);function qr(t){const e=ew();cr(e,new S$(e,t))}Ru.Ua="timingevent";function T$(t,e){Ar.call(this,Ru.Ua,t),this.size=e}Zn(T$,Ar);function dm(t,e){if(typeof t!="function")throw Error("Fn must not be null and must be a function");return ze.setTimeout(function(){t()},e)}var tw={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9}
786,b$={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function SR(){}SR.prototype.h=null;function wN(t){return t.h||(t.h=t.i())}function I$(){}var fm={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function TR(){Ar.call(this,"d")}Zn(TR,Ar);function bR(){Ar.call(this,"c")}Zn(bR,Ar);var ub;function nw(){}Zn(nw,SR);nw.prototype.g=function(){return new XMLHttpRequest};nw.prototype.i=function(){return{}};ub=new nw;function hm(t,e,n,r){this.l=t,this.j=e,this.m=n,this.W=r||1,this.U=new Tp(this),this.P=lae,t=ib?125:void 0,this.V=new X_(t),this.I=null,this.i=!1,this.u=this.B=this.A=this.L=this.G=this.Y=this.C=null,this.F=[],this.g=null,this.o=0,this.s=this.v=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new R$}function R$(){this.i=null,this.g="",this.h=!1}var lae=45e3,x$={},cb={};ye=hm.prototype;ye.setTimeout=function(t){this.P=t};function db(t,e,n){t.L=1,t.A=iw(Co(e)),t.u=n,t.S=!0,k$(t,null)}function k$(t,e){t.G=Date.now(),pm(t),t.B=Co(t.A);var n=t.B,r=t.W;Array.isArray(r)||(r=[String(r)]),L$(n.i,"t",r),t.o=0,n=t.l.J,t.h=new R$,t.g=rU(t.l,n?e:null,!t.u),0<t.O&&(t.M=new rae(Cr(t.Pa,t,t.g),t.O)),_$(t.U,t.g,"readystatechange",t.nb),e=t.I?c$(t.I):{},t.u?(t.v||(t.v="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.g.ha(t.B,t.v,t.u,e)):(t.v="GET",t.g.ha(t.B,t.v,null,e)),bp(),iae(t.j,t.v,t.B,t.m,t.W,t.u)}ye.nb=function(t){t=t.target;const e=this.M;e&&Vs(t)==3?e.l():this.Pa(t)};ye.Pa=function(t){try{if(t==this.g)e:{const h=Vs(this.g);var e=this.g.Ia();const m=this.g.da();if(!(3>h)&&(h!=3||ib||this.g&&(this.h.h||this.g.ja()||bN(this.g)))){this.J||h!=4||e==7||(e==8||0>=m?bp(3):bp(2)),rw(this);var n=this.g.da();this.ca=n;t:if(C$(this)){var r=bN(this.g);t="";var i=r.length,s=Vs(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){jl(this),Gh(this);var o="";break t}this.h.i=new ze.TextDecoder}for(e=0;e<i;e++)this.h.h=!0,t+=this.h.i.decode(r[e],{stream:s&&e==i-1});r.length=0,this.h.g+=t,this.o=0,o=this.h.g}else o=this.g.ja();if(this.i=n==200,sae(this.j,this.v,this.B,this.m,this.W,h,n),this.i){if(this.aa&&
786!this.K){t:{if(this.g){var l,c=this.g;if((l=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!_p(l)){var d=l;break t}}d=null}if(n=d)Mc(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,fb(this,n);else{this.i=!1,this.s=3,qr(12),jl(this),Gh(this);break e}}this.S?(A$(this,h,o),ib&&this.i&&h==3&&(_$(this.U,this.V,"tick",this.mb),this.V.start())):(Mc(this.j,this.m,o,null),fb(this,o)),h==4&&jl(this),this.i&&!this.J&&(h==4?Z$(this.l,this):(this.i=!1,pm(this)))}else Cae(this.g),n==400&&0<o.indexOf("Unknown SID")?(this.s=3,qr(12)):(this.s=0,qr(13)),jl(this),Gh(this)}}}catch{}finally{}};function C$(t){return t.g?t.v=="GET"&&t.L!=2&&t.l.Ha:!1}function A$(t,e,n){let r=!0,i;for(;!t.J&&t.o<n.length;)if(i=uae(t,n),i==cb){e==4&&(t.s=4,qr(14),r=!1),Mc(t.j,t.m,null,"[Incomplete Response]");break}else if(i==x$){t.s=4,qr(15),Mc(t.j,t.m,n,"[Invalid Chunk]"),r=!1;break}else Mc(t.j,t.m,i,null),fb(t,i);C$(t)&&t.o!=0&&(t.h.g=t.h.g.slice(t.o),t.o=0),e!=4||n.length!=0||t.h.h||(t.s=1,qr(16),r=!1),t.i=t.i&&r,r?0<n.length&&!t.ba&&(t.ba=!0,e=t.l,e.g==t&&e.ca&&!e.M&&(e.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),AR(e),e.M=!0,qr(11))):(Mc(t.j,t.m,n,"[Invalid Chunked Response]"),jl(t),Gh(t))}ye.mb=function(){if(this.g){var t=Vs(this.g),e=this.g.ja();this.o<e.length&&(rw(this),A$(this,t,e),this.i&&t!=4&&pm(this))}};function uae(t,e){var n=t.o,r=e.indexOf(`
787`,n);return r==-1?cb:(n=Number(e.substring(n,r)),isNaN(n)?x$:(r+=1,r+n>e.length?cb:(e=e.slice(r,r+n),t.o=r+n,e)))}ye.cancel=function(){this.J=!0,jl(this)};function pm(t){t.Y=Date.now()+t.P,P$(t,t.P)}function P$(t,e){if(t.C!=null)throw Error("WatchDog timer not null");t.C=dm(Cr(t.lb,t),e)}function rw(t){t.C&&(ze.clearTimeout(t.C),t.C=null)}ye.lb=function(){this.C=null;const t=Date.now();0<=t-this.Y?(oae(this.j,this.B),this.L!=2&&(bp(),qr(17)),jl(this),this.s=2,Gh(this)):P$(this,this.Y-t)};function Gh(t){t.l.H==0||t.J||Z$(t.l,t)}function jl(t){rw(t);var e=t.M;e&&typeof e.sa=="function"&&e.sa(),t.M=null,wR(t.V),w$(t.U),t.g&&(e=t.g,t.g=null,e.abort(),e.sa())}function fb(t,e){try{var n=t.l;if(n.H!=0&&(n.g==t||hb(n.i,t))){if(!t.K&&hb(n.i,t)&&n.H==3){try{var r=n.Ja.g.parse(e)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3<t.G)xv(n),lw(n);else break e;CR(n),qr(18)}}else n.Fa=i[1],0<n.Fa-n.V&&37500>i[2]&&n.G&&n.A==0&&!n.v&&(n.v=dm(Cr(n.ib,n),6e3));if(1>=$$(n.i)&&n.oa){try{n.oa()}catch{}n.oa=void 0}}else Bl(n,11)}else if((t.K||n.g==t)&&xv(n),!_p(e))for(i=n.Ja.g.parse(e),e=0;e<i.length;e++){let d=i[e];if(n.V=d[0],d=d[1],n.H==2)if(d[0]=="c"){n.K=d[1],n.pa=d[2];const h=d[3];h!=null&&(n.ra=h,n.l.info("VER="+n.ra));const m=d[4];m!=null&&(n.Ga=m,n.l.info("SVER="+n.Ga));const g=d[5];g!=null&&typeof g=="number"&&0<g&&(r=1.5*g,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;const v=t.g;if(v){const E=v.g?v.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(E){var s=r.i;s.g||E.indexOf("spdy")==-1&&E.indexOf("quic")==-1&&E.indexOf("h2")==-1||(s.j=s.l,s.g=new Set,s.h&&(IR(s,s.h),s.h=null))}if(r.F){const S=v.g?v.g.getResponseHeader("X-HTTP-Session-Id"):null;S&&(r.Da=S,Ft(r.I,r.F,S))}}n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-t.G,n.l.info("Handshake RTT: "+n.S+"ms")),r=n;var o=t;if(r.wa=nU(r,r.J?r.pa:null,r.Y),o.K){U$(r.i,o);var l=o,c=r.L;c&&l.setTimeout(c),l.C&&(rw(l),pm(l)),r.g=o}else J$(r);0<n.j.length&&uw(n)}else d[0]!="stop"&&d[0]!="close"||Bl(n,7);else n.H==3&&(d[0]=="stop"||d[0]=="close"?d[0]=="stop"?Bl(n,7):kR(n):d[0]!="noop"&&n.h&&n.h.Aa(d),n.A=0)}}bp(4)}catch{}}function cae(t){if(t.Z&&typeof t.Z=="function")return t.Z();if(typeof Map<"u"&&t instanceof Map||typeof Set<"u"&&t instanceof Set)return Array.from(t.values());if(typeof t=="string")return t.split("");if(H_(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}e=[],n=0;for(r in t)e[n++]=t[r];return e}function dae(t){if(t.ta&&typeof t.ta=="function")return t.ta();if(!t.Z||typeof t.Z!="function"){if(typeof Map<"u"&&t instanceof Map)return Array.from(t.keys());if(!(typeof Set<"u"&&t instanceof Set)){if(H_(t)||typeof t=="string"){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}e=[],n=0;for(const r in t)e[n++]=r;return e}}}function O$(t,e){if(t.forEach&&typeof t.forEach=="function")t.forEach(e,void 0);else if(H_(t)||typeof t=="string")Array.prototype.forEach.call(t,e,void 0);else for(var n=dae(t),r=cae(t),i=r.length,s=0;s<i;s++)e.call(void 0,r[s],n&&n[s],t)}var N$=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function fae(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var s=t[n].substring(0,r);i=t[n].substring(r+1)}else s=t[n];e(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Yl(t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,t instanceof Yl){this.h=t.h,Iv(this,t.j),this.s=t.s,this.g=t.g,Rv(this,t.m),this.l=t.l;var e=t.i,n=new Ip;n.i=e.i,e.g&&(n.g=new Map(e.g),n.h=e.h),EN(this,n),this.o=t.o}else t&&(e=String(t).match(N$))?(this.h=!1,Iv(this,e[1]||"",!0),this.s=Ah(e[2]||""),this.g=Ah(e[3]||"",!0),Rv(this,e[4]),this.l=Ah(e[5]||"",!0),EN(this,e[6]||"",!0),this.o=Ah(e[7]||"")):(this.h=!1,this.i=new Ip(null,this.h))}Yl.prototype.toString=function(){var t=[],e=this.j;e&&t.push(Ph(e,SN,!0),":");var n=this.g;
vendor: 31,868 bytes, lines 787-794
787return(n||e=="file")&&(t.push("//"),(e=this.s)&&t.push(Ph(e,SN,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n=this.m,n!=null&&t.push(":",String(n))),(n=this.l)&&(this.g&&n.charAt(0)!="/"&&t.push("/"),t.push(Ph(n,n.charAt(0)=="/"?mae:pae,!0))),(n=this.i.toString())&&t.push("?",n),(n=this.o)&&t.push("#",Ph(n,yae)),t.join("")};function Co(t){return new Yl(t)}function Iv(t,e,n){t.j=n?Ah(e,!0):e,t.j&&(t.j=t.j.replace(/:$/,""))}function Rv(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.m=e}else t.m=null}function EN(t,e,n){e instanceof Ip?(t.i=e,vae(t.i,t.h)):(n||(e=Ph(e,gae)),t.i=new Ip(e,t.h))}function Ft(t,e,n){t.i.set(e,n)}function iw(t){return Ft(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function Ah(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Ph(t,e,n){return typeof t=="string"?(t=encodeURI(t).replace(e,hae),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function hae(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var SN=/[#\/\?@]/g,pae=/[#\?:]/g,mae=/[#\?]/g,gae=/[#\?@]/g,yae=/#/g;function Ip(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function el(t){t.g||(t.g=new Map,t.h=0,t.i&&fae(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}ye=Ip.prototype;ye.add=function(t,e){el(this),this.i=null,t=$d(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this};function D$(t,e){el(t),e=$d(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function M$(t,e){return el(t),e=$d(t,e),t.g.has(e)}ye.forEach=function(t,e){el(this),this.g.forEach(function(n,r){n.forEach(function(i){t.call(e,i,r,this)},this)},this)};ye.ta=function(){el(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r<e.length;r++){const i=t[r];for(let s=0;s<i.length;s++)n.push(e[r])}return n};ye.Z=function(t){el(this);let e=[];if(typeof t=="string")M$(this,t)&&(e=e.concat(this.g.get($d(this,t))));else{t=Array.from(this.g.values());for(let n=0;n<t.length;n++)e=e.concat(t[n])}return e};ye.set=function(t,e){return el(this),this.i=null,t=$d(this,t),M$(this,t)&&(this.h-=this.g.get(t).length),this.g.set(t,[e]),this.h+=1,this};ye.get=function(t,e){return t?(t=this.Z(t),0<t.length?String(t[0]):e):e};function L$(t,e,n){D$(t,e),0<n.length&&(t.i=null,t.g.set($d(t,e),fR(n)),t.h+=n.length)}ye.toString=function(){if(this.i)return this.i;if(!this.g)return"";const t=[],e=Array.from(this.g.keys());for(var n=0;n<e.length;n++){var r=e[n];const s=encodeURIComponent(String(r)),o=this.Z(r);for(r=0;r<o.length;r++){var i=s;o[r]!==""&&(i+="="+encodeURIComponent(String(o[r]))),t.push(i)}}return this.i=t.join("&")};function $d(t,e){return e=String(e),t.j&&(e=e.toLowerCase()),e}function vae(t,e){e&&!t.j&&(el(t),t.i=null,t.g.forEach(function(n,r){var i=r.toLowerCase();r!=i&&(D$(this,r),L$(this,i,n))},t)),t.j=e}var _ae=class{constructor(t,e){this.g=t,this.map=e}};function V$(t){this.l=t||wae,ze.PerformanceNavigationTiming?(t=ze.performance.getEntriesByType("navigation"),t=0<t.length&&(t[0].nextHopProtocol=="hq"||t[0].nextHopProtocol=="h2")):t=!!(ze.g&&ze.g.Ka&&ze.g.Ka()&&ze.g.Ka().dc),this.j=t?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var wae=10;function F$(t){return t.h?!0:t.g?t.g.size>=t.j:!1}function $$(t){return t.h?1:t.g?t.g.size:0}function hb(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function IR(t,e){t.g?t.g.add(e):t.h=e}function U$(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}V$.prototype.cancel=function(){if(this.i=j$(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const t of this.g.values())t.cancel();this.g.clear()}};function j$(t){if(t.h!=null)return t.i.concat(t.h.F);if(t.g!=null&&t.g.size!==0){let e=t.i;for(const n of t.g.values())e=e.concat(n.F);return e}return fR(t.i)}var Eae=class{stringify(t){return ze.JSON.stringify(t,void 0)}parse(t){return ze.JSON.parse(t,void 0)}};function Sae(){this.g=new Eae}function Tae(t,e,n){const r=n||"";try{O$(t,function(i,s){let o=i;G_(i)&&(o=vR(i)),e.push(r+s+"="+encodeURIComponent(o))})}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function bae(t,e){const n=new Z_;if(ze.Image){const r=new Image;r.onload=gy(vy,n,r,"TestLoadImage: loaded",!0,e),r.onerror=gy(vy,n,r,"TestLoadImage: error",!1,e),r.onabort=gy(vy,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=gy(vy,n,r,"TestLoadImage: timeout",!1,e),ze.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}function vy(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch{}}function sw(t){this.l=t.ec||null,this.j=t.ob||!1}Zn(sw,SR);sw.prototype.g=function(){return new ow(this.l,this.j)};sw.prototype.i=(function(t){return function(){return t}})({});function ow(t,e){Jn.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=RR,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Zn(ow,Jn);var RR=0;ye=ow.prototype;ye.open=function(t,e){if(this.readyState!=RR)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Rp(this)};ye.send=function(t){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||ze).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))};ye.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,mm(this)),this.readyState=RR};ye.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Rp(this)),this.g&&(this.readyState=3,Rp(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof ze.ReadableStream<"u"&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;B$(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))};function B$(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}ye.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?mm(this):Rp(this),this.readyState==3&&B$(this)}};ye.Za=function(t){this.g&&(this.response=this.responseText=t,mm(this))};ye.Ya=function(t){this.g&&(this.response=t,mm(this))};ye.ka=function(){this.g&&mm(this)};function mm(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Rp(t)}ye.setRequestHeader=function(t,e){this.v.append(t,e)};ye.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};ye.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join(`\r
788`)};function Rp(t){t.onreadystatechange&&t.onreadystatechange.call(t)}Object.defineProperty(ow.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(t){this.m=t?"include":"same-origin"}});var Iae=ze.JSON.parse;function cn(t){Jn.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=z$,this.L=this.M=!1}Zn(cn,Jn);var z$="",Rae=/^https?$/i,xae=["POST","PUT"];ye=cn.prototype;ye.Oa=function(t){this.M=t};ye.ha=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+t);e=e?e.toUpperCase():"GET",this.I=t,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():ub.g(),this.C=this.u?wN(this.u):wN(ub),this.g.onreadystatechange=Cr(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(s){TN(this,s);return}if(t=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if(typeof r.keys=="function"&&typeof r.get=="function")for(const s of r.keys())n.set(s,r.get(s));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(s=>s.toLowerCase()=="content-type"),i=ze.FormData&&t instanceof ze.FormData,!(0<=o$(xae,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[s,o]of n)this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{H$(this),0<this.B&&((this.L=kae(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Cr(this.ua,this)):this.A=ER(this.ua,this.B,this)),this.v=!0,this.g.send(t),this.v=!1}catch(s){TN(this,s)}};function kae(t){return ud&&typeof t.timeout=="number"&&t.ontimeout!==void 0}ye.ua=function(){typeof dR<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,cr(this,"timeout"),this.abort(8))};function TN(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,W$(t),aw(t)}function W$(t){t.F||(t.F=!0,cr(t,"complete"),cr(t,"error"))}ye.abort=function(t){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=t||7,cr(this,"complete"),cr(this,"abort"),aw(this))};ye.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),aw(this,!0)),cn.$.N.call(this)};ye.La=function(){this.s||(this.G||this.v||this.l?q$(this):this.kb())};ye.kb=function(){q$(this)};function q$(t){if(t.h&&typeof dR<"u"&&(!t.C[1]||Vs(t)!=4||t.da()!=2)){if(t.v&&Vs(t)==4)ER(t.La,0,t);else if(cr(t,"readystatechange"),Vs(t)==4){t.h=!1;try{const o=t.da();e:switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var n;if(!(n=e)){var r;if(r=o===0){var i=String(t.I).match(N$)[1]||null;!i&&ze.self&&ze.self.location&&(i=ze.self.location.protocol.slice(0,-1)),r=!Rae.test(i?i.toLowerCase():"")}n=r}if(n)cr(t,"complete"),cr(t,"success");else{t.m=6;try{var s=2<Vs(t)?t.g.statusText:""}catch{s=""}t.j=s+" ["+t.da()+"]",W$(t)}}finally{aw(t)}}}}function aw(t,e){if(t.g){H$(t);const n=t.g,r=t.C[0]?()=>{}:null;t.g=null,t.C=null,e||cr(t,"ready");try{n.onreadystatechange=r}catch{}}}function H$(t){t.g&&t.L&&(t.g.ontimeout=null),t.A&&(ze.clearTimeout(t.A),t.A=null)}ye.isActive=function(){return!!this.g};function Vs(t){return t.g?t.g.readyState:0}ye.da=function(){try{return 2<Vs(this)?this.g.status:-1}catch{return-1}};ye.ja=function(){try{return this.g?this.g.responseText:""}catch{return""}};ye.Wa=function(t){if(this.g){var e=this.g.responseText;return t&&e.indexOf(t)==0&&(e=e.substring(t.length)),Iae(e)}};function bN(t){try{if(!t.g)return null;if("response"in t.g)return t.g.response;switch(t.K){case z$:case"text":return t.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in t.g)return t.g.mozResponseArrayBuffer}return null}catch{return null}}function Cae(t){const e={};t=(t.g&&2<=Vs(t)&&t.g.getAllResponseHeaders()||"").split(`\r
789`);for(let r=0;r<t.length;r++){if(_p(t[r]))continue;var n=eae(t[r]);const i=n[0];if(n=n[1],typeof n!="string")continue;n=n.trim();const s=e[i]||[];e[i]=s,s.push(n)}Hoe(e,function(r){return r.join(", ")})}ye.Ia=function(){return this.m};ye.Sa=function(){return typeof this.j=="string"?this.j:String(this.j)};function G$(t){let e="";return pR(t,function(n,r){e+=r,e+=":",e+=n,e+=`\r
790`}),e}function xR(t,e,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=G$(n),typeof t=="string"?n!=null&&encodeURIComponent(String(n)):Ft(t,e,n))}function nh(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function K$(t){this.Ga=0,this.j=[],this.l=new Z_,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=nh("failFast",!1,t),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=nh("baseRetryDelayMs",5e3,t),this.hb=nh("retryDelaySeedMs",1e4,t),this.eb=nh("forwardChannelMaxRetries",2,t),this.xa=nh("forwardChannelRequestTimeoutMs",2e4,t),this.va=t&&t.xmlHttpFactory||void 0,this.Ha=t&&t.useFetchStreams||!1,this.L=void 0,this.J=t&&t.supportsCrossDomainXhr||!1,this.K="",this.i=new V$(t&&t.concurrentRequestLimit),this.Ja=new Sae,this.P=t&&t.fastHandshake||!1,this.O=t&&t.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=t&&t.bc||!1,t&&t.Ea&&this.l.Ea(),t&&t.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&t&&t.detectBufferingProxy||!1,this.qa=void 0,t&&t.longPollingTimeout&&0<t.longPollingTimeout&&(this.qa=t.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}ye=K$.prototype;ye.ra=8;ye.H=1;function kR(t){if(Q$(t),t.H==3){var e=t.W++,n=Co(t.I);if(Ft(n,"SID",t.K),Ft(n,"RID",e),Ft(n,"TYPE","terminate"),gm(t,n),e=new hm(t,t.l,e),e.L=2,e.A=iw(Co(n)),n=!1,ze.navigator&&ze.navigator.sendBeacon)try{n=ze.navigator.sendBeacon(e.A.toString(),"")}catch{}!n&&ze.Image&&(new Image().src=e.A,n=!0),n||(e.g=rU(e.l,null),e.g.ha(e.A)),e.G=Date.now(),pm(e)}tU(t)}function lw(t){t.g&&(AR(t),t.g.cancel(),t.g=null)}function Q$(t){lw(t),t.u&&(ze.clearTimeout(t.u),t.u=null),xv(t),t.i.cancel(),t.m&&(typeof t.m=="number"&&ze.clearTimeout(t.m),t.m=null)}function uw(t){if(!F$(t.i)&&!t.m){t.m=!0;var e=t.Na;Ep||y$(),Sp||(Ep(),Sp=!0),_R.add(e,t),t.C=0}}function Aae(t,e){return $$(t.i)>=t.i.j-(t.m?1:0)?!1:t.m?(t.j=e.F.concat(t.j),!0):t.H==1||t.H==2||t.C>=(t.cb?0:t.eb)?!1:(t.m=dm(Cr(t.Na,t,e),eU(t,t.C)),t.C++,!0)}ye.Na=function(t){if(this.m)if(this.m=null,this.H==1){if(!t){this.W=Math.floor(1e5*Math.random()),t=this.W++;const i=new hm(this,this.l,t);let s=this.s;if(this.U&&(s?(s=c$(s),d$(s,this.U)):s=this.U),this.o!==null||this.O||(i.I=s,s=null),this.P)e:{for(var e=0,n=0;n<this.j.length;n++){t:{var r=this.j[n];if("__data__"in r.map&&(r=r.map.__data__,typeof r=="string")){r=r.length;break t}r=void 0}if(r===void 0)break;if(e+=r,4096<e){e=n;break e}if(e===4096||n===this.j.length-1){e=n+1;break e}}e=1e3}else e=1e3;e=Y$(this,i,e),n=Co(this.I),Ft(n,"RID",t),Ft(n,"CVER",22),this.F&&Ft(n,"X-HTTP-Session-Id",this.F),gm(this,n),s&&(this.O?e="headers="+encodeURIComponent(String(G$(s)))+"&"+e:this.o&&xR(n,this.o,s)),IR(this.i,i),this.bb&&Ft(n,"TYPE","init"),this.P?(Ft(n,"$req",e),Ft(n,"SID","null"),i.aa=!0,db(i,n,null)):db(i,n,e),this.H=2}}else this.H==3&&(t?IN(this,t):this.j.length==0||F$(this.i)||IN(this))};function IN(t,e){var n;e?n=e.m:n=t.W++;const r=Co(t.I);Ft(r,"SID",t.K),Ft(r,"RID",n),Ft(r,"AID",t.V),gm(t,r),t.o&&t.s&&xR(r,t.o,t.s),n=new hm(t,t.l,n,t.C+1),t.o===null&&(n.I=t.s),e&&(t.j=e.F.concat(t.j)),e=Y$(t,n,1e3),n.setTimeout(Math.round(.5*t.xa)+Math.round(.5*t.xa*Math.random())),IR(t.i,n),db(n,r,e)}function gm(t,e){t.na&&pR(t.na,function(n,r){Ft(e,r,n)}),t.h&&O$({},function(n,r){Ft(e,r,n)})}function Y$(t,e,n){n=Math.min(t.j.length,n);var r=t.h?Cr(t.h.Va,t.h,t):null;e:{var i=t.j;let s=-1;for(;;){const o=["count="+n];s==-1?0<n?(s=i[0].g,o.push("ofs="+s)):s=0:o.push("ofs="+s);let l=!0;for(let c=0;c<n;c++){let d=i[c].g;const h=i[c].map;if(d-=s,0>d)s=Math.max(0,i[c].g-100),l=!1;else try{Tae(h,o,"req"+d+"_")}catch{r&&r(h)}}if(l){r=o.join("&");break e}}}return t=t.j.splice(0,n),e.F=t,r}function J$(t){if(!t.g&&!t.u){t.ba=1;var e=t.Ma;Ep||y$(),Sp||(Ep(),Sp=!0),_R.add(e,t),t.A=0}}function CR(t){return t.g||t.u||3<=t.A?!1:(t.ba++,t.u=dm(Cr(t.Ma,t),eU(t,t.A)),t.A++,!0)}ye.Ma=function(){if(this.u=null,X$(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var t=2*this.S;this.l.info("BP detection timer enabled: "+t),this.B=dm(Cr(this.jb,this),t)}};ye.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,qr(10),lw(this),X$(this))};function AR(t){t.B!=null&&(ze.clearTimeout(t.B),t.B=null)}function X$(t){t.g=new hm(t,t.l,"rpc",t.ba),t.o===null&&(t.g.I=t.s),t.g.O=0;var e=Co(t.wa);Ft(e,"RID","rpc"),Ft(e,"SID",t.K),Ft(e,"AID",t.V),Ft(e,"CI",t.G?"0":"1"),!t.G&&t.qa&&Ft(e,"TO",t.qa),Ft(e,"TYPE","xmlhttp"),gm(t,e),t.o&&t.s&&xR(e,t.o,t.s),t.L&&t.g.setTimeout(t.L);var n=t.g;t=t.pa,n.L=1,n.A=iw(Co(e)),n.u=null,n.S=!0,k$(n,t)}ye.ib=function(){this.v!=null&&(this.v=null,lw(this),CR(this),qr(19))};function xv(t){t.v!=null&&(ze.clearTimeout(t.v),t.v=null)}function Z$(t,e){var n=null;if(t.g==e){xv(t),AR(t),t.g=null;var r=2}else if(hb(t.i,e))n=e.F,U$(t.i,e),r=1;else return;if(t.H!=0){if(e.i)if(r==1){n=e.u?e.u.length:0,e=Date.now()-e.G;var i=t.C;r=ew(),cr(r,new T$(r,n)),uw(t)}else J$(t);else if(i=e.s,i==3||i==0&&0<e.ca||!(r==1&&Aae(t,e)||r==2&&CR(t)))switch(n&&0<n.length&&(e=t.i,e.i=e.i.concat(n)),i){case 1:Bl(t,5);break;case 4:Bl(t,10);break;case 3:Bl(t,6);break;default:Bl(t,2)}}}function eU(t,e){let n=t.ab+Math.floor(Math.random()*t.hb);return t.isActive()||(n*=2),n*e}function Bl(t,e){if(t.l.info("Error code "+e),e==2){var n=null;t.h&&(n=null);var r=Cr(t.pb,t);n||(n=new Yl("//www.google.com/images/cleardot.gif"),ze.location&&ze.location.protocol=="http"||Iv(n,"https"),iw(n)),bae(n.toString(),r)}else qr(2);t.H=0,t.h&&t.h.za(e),tU(t),Q$(t)}ye.pb=function(t){t?(this.l.info("Successfully pinged google.com"),qr(2)):(this.l.info("Failed to ping google.com"),qr(1))};function tU(t){if(t.H=0,t.ma=[],t.h){const e=j$(t.i);(e.length!=0||t.j.length!=0)&&(mN(t.ma,e),mN(t.ma,t.j),t.i.i.length=0,fR(t.j),t.j.length=0),t.h.ya()}}function nU(t,e,n){var r=n instanceof Yl?Co(n):new Yl(n);if(r.g!="")e&&(r.g=e+"."+r.g),Rv(r,r.m);else{var i=ze.location;r=i.protocol,e=e?e+"."+i.hostname:i.hostname,i=+i.port;var s=new Yl(null);r&&Iv(s,r),e&&(s.g=e),i&&Rv(s,i),n&&(s.l=n),r=s}return n=t.F,e=t.Da,n&&e&&Ft(r,n,e),Ft(r,"VER",t.ra),gm(t,r),r}function rU(t,e,n){if(e&&!t.J)throw Error("Can't create secondary domain capable XhrIo object.");return e=t.Ha&&!t.va?new cn(new sw({ob:n})):new cn(t.va),e.Oa(t.J),e}ye.isActive=function(){return!!this.h&&this.h.isActive(this)};function iU(){}ye=iU.prototype;ye.Ba=function(){};ye.Aa=function(){};ye.za=function(){};ye.ya=function(){};ye.isActive=function(){return!0};ye.Va=function(){};function kv(){if(ud&&!(10<=Number(Boe)))throw Error("Environmental error: no available transport.")}kv.prototype.g=function(t,e){return new xi(t,e)};function xi(t,e){Jn.call(this),this.g=new K$(e),this.l=t,this.h=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.g.s=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.Ca&&(t?t["X-WebChannel-Client-Profile"]=e.Ca:t={"X-WebChannel-Client-Profile":e.Ca}),this.g.U=t,(t=e&&e.cc)&&!_p(t)&&(this.g.o=t),this.A=e&&e.supportsCrossDomainXhr||!1,this.v=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!_p(e)&&(this.g.F=e,t=this.h,t!==null&&e in t&&(t=this.h,e in t&&delete t[e])),this.j=new Ud(this)}Zn(xi,Jn);xi.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var t=this.g,e=this.l,n=this.h||void 0;qr(0),t.Y=e,t.na=n||{},t.G=t.aa,t.I=nU(t,null,t.Y),uw(t)};xi.prototype.close=function(){kR(this.g)};xi.prototype.u=function(t){var e=this.g;if(typeof t=="string"){var n={};n.__data__=t,t=n}else this.v&&(n={},n.__data__=vR(t),t=n);e.j.push(new _ae(e.fb++,t)),e.H==3&&uw(e)};xi.prototype.N=function(){this.g.h=null,delete this.j,kR(this.g),delete this.g,xi.$.N.call(this)};function sU(t){TR.call(this),t.__headers__&&(this.headers=t.__headers__,this.statusCode=t.__status__,delete t.__headers__,delete t.__status__);var e=t.__sm__;if(e){e:{for(const n in e){t=n;break e}t=void 0}(this.i=t)&&(t=this.i,e=e!==null&&t in e?e[t]:void 0),this.data=e}else this.data=t}Zn(sU,TR);function oU(){bR.call(this),this.status=1}Zn(oU,bR);function Ud(t){this.g=t}Zn(Ud,iU);Ud.prototype.Ba=function(){cr(this.g,"a")};Ud.prototype.Aa=function(t){cr(this.g,new sU(t))};Ud.prototype.za=function(t){cr(this.g,new oU)};Ud.prototype.ya=function(){cr(this.g,"b")};function Pae(){this.blockSize=-1}function hs(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}Zn(hs,Pae);hs.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0};function HS(t,e,n){n||(n=0);var r=Array(16);if(typeof e=="string")for(var i=0;16>i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var s=t.g[3],o=e+(s^n&(i^s))+r[0]+3614090360&4294967295;e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[1]+3905402710&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[2]+606105819&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[3]+3250441966&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[4]+4118548399&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[5]+1200080426&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[6]+2821735955&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[7]+4249261313&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[8]+1770035416&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[9]+2336552879&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[10]+4294925233&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[11]+2304563134&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(s^n&(i^s))+r[12]+1804603682&4294967295,e=n+(o<<7&4294967295|o>>>25),o=s+(i^e&(n^i))+r[13]+4254626195&4294967295,s=e+(o<<12&4294967295|o>>>20),o=i+(n^s&(e^n))+r[14]+2792965006&4294967295,i=s+(o<<17&4294967295|o>>>15),o=n+(e^i&(s^e))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=e+(i^s&(n^i))+r[1]+4129170786&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[6]+3225465664&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[5]+3593408605&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[10]+38016083&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[9]+568446438&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[14]+3275163606&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(i^s&(n^i))+r[13]+2850285829&4294967295,e=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(e^n))+r[2]+4243563512&4294967295,s=e+(o<<9&4294967295|o>>>23),o=i+(e^n&(s^e))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^e&(i^s))+r[12]+2368359562&4294967295,n=i+(o<<20&4294967295|o>>>12),o=e+(n^i^s)+r[5]+4294588738&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[8]+2272392833&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[11]+1839030562&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[14]+4259657740&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[1]+2763975236&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[4]+1272893353&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[7]+4139469664&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[10]+3200236656&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[13]+681279174&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[0]+3936430074&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[3]+3572445317&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[6]+76029189&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(n^i^s)+r[9]+3654602809&4294967295,e=n+(o<<4&4294967295|o>>>28),o=s+(e^n^i)+r[12]+3873151461&4294967295,s=e+(o<<11&4294967295|o>>>21),o=i+(s^e^n)+r[15]+530742520&4294967295,i=s+(o<<16&4294967295|o>>>16),o=n+(i^s^e)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=e+(i^(n|~s))+r[0]+4096336452&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[7]+1126891415&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[12]+1700485571&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[3]+2399980690&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[8]+1873313359&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[15]+4264355552&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=e+(i^(n|~s))+r[4]+4149444226&4294967295,e=n+(o<<6&4294967295|o>>>26),o=s+(n^(e|~i))+r[11]+3174756917&4294967295,s=e+(o<<10&4294967295|o>>>22),o=i+(e^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+s&4294967295}hs.prototype.j=function(t,e){e===void 0&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,s=0;s<e;){if(i==0)for(;s<=n;)HS(this,t,s),s+=this.blockSize;if(typeof t=="string"){for(;s<e;)if(r[i++]=t.charCodeAt(s++),i==this.blockSize){HS(this,r),i=0;break}}else for(;s<e;)if(r[i++]=t[s++],i==this.blockSize){HS(this,r),i=0;break}}this.h=i,this.i+=e};hs.prototype.l=function(){var t=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;e<t.length-8;++e)t[e]=0;var n=8*this.i;for(e=t.length-8;e<t.length;++e)t[e]=n&255,n/=256;for(this.j(t),t=Array(16),e=n=0;4>e;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};function It(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var s=t[i]|0;r&&s==e||(n[i]=s,r=!1)}this.g=n}var Oae={};function PR(t){return-128<=t&&128>t?$oe(t,function(e){return new It([e|0],0>e?-1:0)}):new It([t|0],0>t?-1:0)}function Fs(t){if(isNaN(t)||!isFinite(t))return Bc;if(0>t)return lr(Fs(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=pb;return new It(e,0)}function aU(t,e){if(t.length==0)throw Error("number format error: empty string");if(e=e||10,2>e||36<e)throw Error("radix out of range: "+e);if(t.charAt(0)=="-")return lr(aU(t.substring(1),e));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var n=Fs(Math.pow(e,8)),r=Bc,i=0;i<t.length;i+=8){var s=Math.min(8,t.length-i),o=parseInt(t.substring(i,i+s),e);8>s?(s=Fs(Math.pow(e,s)),r=r.R(s).add(Fs(o))):(r=r.R(n),r=r.add(Fs(o)))}return r}var pb=4294967296,Bc=PR(0),mb=PR(1),RN=PR(16777216);ye=It.prototype;ye.ea=function(){if($i(this))return-lr(this).ea();for(var t=0,e=1,n=0;n<this.g.length;n++){var r=this.D(n);t+=(0<=r?r:pb+r)*e,e*=pb}return t};ye.toString=function(t){if(t=t||10,2>t||36<t)throw Error("radix out of range: "+t);if(vo(this))return"0";if($i(this))return"-"+lr(this).toString(t);for(var e=Fs(Math.pow(t,6)),n=this,r="";;){var i=Av(n,e).g;n=Cv(n,i.R(e));var s=((0<n.g.length?n.g[0]:n.h)>>>0).toString(t);if(n=i,vo(n))return s+r;for(;6>s.length;)s="0"+s;r=s+r}};ye.D=function(t){return 0>t?0:t<this.g.length?this.g[t]:this.h};function vo(t){if(t.h!=0)return!1;for(var e=0;e<t.g.length;e++)if(t.g[e]!=0)return!1;return!0}function $i(t){return t.h==-1}ye.X=function(t){return t=Cv(this,t),$i(t)?-1:vo(t)?0:1};function lr(t){for(var e=t.g.length,n=[],r=0;r<e;r++)n[r]=~t.g[r];return new It(n,~t.h).add(mb)}ye.abs=function(){return $i(this)?lr(this):this};ye.add=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0,i=0;i<=e;i++){var s=r+(this.D(i)&65535)+(t.D(i)&65535),o=(s>>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new It(n,n[n.length-1]&-2147483648?-1:0)};function Cv(t,e){return t.add(lr(e))}ye.R=function(t){if(vo(this)||vo(t))return Bc;if($i(this))return $i(t)?lr(this).R(lr(t)):lr(lr(this).R(t));if($i(t))return lr(this.R(lr(t)));if(0>this.X(RN)&&0>t.X(RN))return Fs(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var i=0;i<t.g.length;i++){var s=this.D(r)>>>16,o=this.D(r)&65535,l=t.D(i)>>>16,c=t.D(i)&65535;n[2*r+2*i]+=o*c,_y(n,2*r+2*i),n[2*r+2*i+1]+=s*c,_y(n,2*r+2*i+1),n[2*r+2*i+1]+=o*l,_y(n,2*r+2*i+1),n[2*r+2*i+2]+=s*l,_y(n,2*r+2*i+2)}for(r=0;r<e;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=e;r<2*e;r++)n[r]=0;return new It(n,0)};function _y(t,e){for(;(t[e]&65535)!=t[e];)t[e+1]+=t[e]>>>16,t[e]&=65535,e++}function rh(t,e){this.g=t,this.h=e}function Av(t,e){if(vo(e))throw Error("division by zero");if(vo(t))return new rh(Bc,Bc);if($i(t))return e=Av(lr(t),e),new rh(lr(e.g),lr(e.h));if($i(e))return e=Av(t,lr(e)),new rh(lr(e.g),e.h);if(30<t.g.length){if($i(t)||$i(e))throw Error("slowDivide_ only works with positive integers.");for(var n=mb,r=e;0>=r.X(t);)n=xN(n),r=xN(r);var i=gc(n,1),s=gc(r,1);for(r=gc(r,2),n=gc(n,2);!vo(r);){var o=s.add(r);0>=o.X(t)&&(i=i.add(n),s=o),r=gc(r,1),n=gc(n,1)}return e=Cv(t,i.R(e)),new rh(i,e)}for(i=Bc;0<=t.X(e);){for(n=Math.max(1,Math.floor(t.ea()/e.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),s=Fs(n),o=s.R(e);$i(o)||0<o.X(t);)n-=r,s=Fs(n),o=s.R(e);vo(s)&&(s=mb),i=i.add(s),t=Cv(t,o)}return new rh(i,t)}ye.gb=function(t){return Av(this,t).h};ye.and=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0;r<e;r++)n[r]=this.D(r)&t.D(r);return new It(n,this.h&t.h)};ye.or=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0;r<e;r++)n[r]=this.D(r)|t.D(r);return new It(n,this.h|t.h)};ye.xor=function(t){for(var e=Math.max(this.g.length,t.g.length),n=[],r=0;r<e;r++)n[r]=this.D(r)^t.D(r);return new It(n,this.h^t.h)};function xN(t){for(var e=t.g.length+1,n=[],r=0;r<e;r++)n[r]=t.D(r)<<1|t.D(r-1)>>>31;return new It(n,t.h)}function gc(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],s=0;s<r;s++)i[s]=0<e?t.D(s+n)>>>e|t.D(s+n+1)<<32-e:t.D(s+n);return new It(i,t.h)}kv.prototype.createWebChannel=kv.prototype.g;xi.prototype.send=xi.prototype.u;xi.prototype.open=xi.prototype.m;xi.prototype.close=xi.prototype.close;tw.NO_ERROR=0;tw.TIMEOUT=8;tw.HTTP_ERROR=6;b$.COMPLETE="complete";I$.EventType=fm;fm.OPEN="a";fm.CLOSE="b";fm.ERROR="c";fm.MESSAGE="d";Jn.prototype.listen=Jn.prototype.O;cn.prototype.listenOnce=cn.prototype.P;cn.prototype.getLastError=cn.prototype.Sa;cn.prototype.getLastErrorCode=cn.prototype.Ia;cn.prototype.getStatus=cn.prototype.da;cn.prototype.getResponseJson=cn.prototype.Wa;cn.prototype.getResponseText=cn.prototype.ja;cn.prototype.send=cn.prototype.ha;cn.prototype.setWithCredentials=cn.prototype.Oa;hs.prototype.digest=hs.prototype.l;hs.prototype.reset=hs.prototype.reset;hs.prototype.update=hs.prototype.j;It.prototype.add=It.prototype.add;It.prototype.multiply=It.prototype.R;It.prototype.modulo=It.prototype.gb;It.prototype.compare=It.prototype.X;It.prototype.toNumber=It.prototype.ea;It.prototype.toString=It.prototype.toString;It.prototype.getBits=It.prototype.D;It.fromNumber=Fs;It.fromString=aU;var Nae=function(){return new kv},Dae=function(){return ew()},GS=tw,Mae=b$,Lae=Ru,kN={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},wy=I$,Vae=cn,Fae=hs,zc=It;const CN="@firebase/firestore";/**
791 * @license
792 * Copyright 2017 Google LLC
793 *
794 * Licensed under the Apache License, Version 2.0 (the "License");
795 * you may not use this file except in compliance with the License.
796 * You may obtain a copy of the License at
797 *
798 *   http://www.apache.org/licenses/LICENSE-2.0
799 *
800 * Unless required by applicable law or agreed to in writing, software
801 * distributed under the License is distributed on an "AS IS" BASIS,
802 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
803 * See the License for the specific language governing permissions and
804 * limitations under the License.
805 */let Hn=class{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}};Hn.UNAUTHENTICATED=new Hn(null),Hn.GOOGLE_CREDENTIALS=new Hn("google-credentials-uid"),Hn.FIRST_PARTY=new Hn("first-party-uid"),Hn.MOCK_USER=new Hn("mock-user");/**
806 * @license
807 * Copyright 2017 Google LLC
808 *
809 * Licensed under the Apache License, Version 2.0 (the "License");
810 * you may not use this file except in compliance with the License.
811 * You may obtain a copy of the License at
812 *
813 *   http://www.apache.org/licenses/LICENSE-2.0
814 *
815 * Unless required by applicable law or agreed to in writing, software
816 * distributed under the License is distributed on an "AS IS" BASIS,
817 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
818 * See the License for the specific language governing permissions and
819 * limitations under the License.
820 */let jd="10.9.0";/**
821 * @license
822 * Copyright 2017 Google LLC
823 *
824 * Licensed under the Apache License, Version 2.0 (the "License");
825 * you may not use this file except in compliance with the License.
826 * You may obtain a copy of the License at
827 *
828 *   http://www.apache.org/licenses/LICENSE-2.0
829 *
830 * Unless required by applicable law or agreed to in writing, software
831 * distributed under the License is distributed on an "AS IS" BASIS,
832 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
833 * See the License for the specific language governing permissions and
834 * limitations under the License.
835 */const Ua=new yoe("@firebase/firestore");function Rc(){return Ua.logLevel}function $ae(t){Ua.setLogLevel(t)}function se(t,...e){if(Ua.logLevel<=ut.DEBUG){const n=e.map(OR);Ua.debug(`Firestore (${jd}): ${t}`,...n)}}function vn(t,...e){if(Ua.logLevel<=ut.ERROR){const n=e.map(OR);Ua.error(`Firestore (${jd}): ${t}`,...n)}}function ps(t,...e){if(Ua.logLevel<=ut.WARN){const n=e.map(OR);Ua.warn(`Firestore (${jd}): ${t}`,...n)}}function OR(t){if(typeof t=="string")return t;try{/**
836* @license
837* Copyright 2020 Google LLC
838*
839* Licensed under the Apache License, Version 2.0 (the "License");
840* you may not use this file except in compliance with the License.
841* You may obtain a copy of the License at
842*
843*   http://www.apache.org/licenses/LICENSE-2.0
844*
845* Unless required by applicable law or agreed to in writing, software
846* distributed under the License is distributed on an "AS IS" BASIS,
847* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
848* See the License for the specific language governing permissions and
849* limitations under the License.
850*/return(function(n){return JSON.stringify(n)})(t)}catch{return t}}/**
851 * @license
852 * Copyright 2017 Google LLC
853 *
854 * Licensed under the Apache License, Version 2.0 (the "License");
855 * you may not use this file except in compliance with the License.
856 * You may obtain a copy of the License at
857 *
858 *   http://www.apache.org/licenses/LICENSE-2.0
859 *
860 * Unless required by applicable law or agreed to in writing, software
861 * distributed under the License is distributed on an "AS IS" BASIS,
862 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
863 * See the License for the specific language governing permissions and
864 * limitations under the License.
865 */function Te(t="Unexpected state"){const e=`FIRESTORE (${jd}) INTERNAL ASSERTION FAILED: `+t;throw vn(e),new Error(e)}function Pe(t,e){t||Te()}function Uae(t,e){t||Te()}function me(t,e){return t}/**
866 * @license
867 * Copyright 2017 Google LLC
868 *
869 * Licensed under the Apache License, Version 2.0 (the "License");
870 * you may not use this file except in compliance with the License.
871 * You may obtain a copy of the License at
872 *
873 *   http://www.apache.org/licenses/LICENSE-2.0
874 *
875 * Unless required by applicable law or agreed to in writing, software
876 * distributed under the License is distributed on an "AS IS" BASIS,
877 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
878 * See the License for the specific language governing permissions and
879 * limitations under the License.
880 */const H={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 re extends i${constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
881 * @license
882 * Copyright 2017 Google LLC
883 *
884 * Licensed under the Apache License, Version 2.0 (the "License");
885 * you may not use this file except in compliance with the License.
886 * You may obtain a copy of the License at
887 *
888 *   http://www.apache.org/licenses/LICENSE-2.0
889 *
890 * Unless required by applicable law or agreed to in writing, software
891 * distributed under the License is distributed on an "AS IS" BASIS,
892 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
893 * See the License for the specific language governing permissions and
894 * limitations under the License.
895 */class Gn{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}}/**
896 * @license
897 * Copyright 2017 Google LLC
898 *
899 * Licensed under the Apache License, Version 2.0 (the "License");
900 * you may not use this file except in compliance with the License.
901 * You may obtain a copy of the License at
902 *
903 *   http://www.apache.org/licenses/LICENSE-2.0
904 *
905 * Unless required by applicable law or agreed to in writing, software
906 * distributed under the License is distributed on an "AS IS" BASIS,
907 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
908 * See the License for the specific language governing permissions and
909 * limitations under the License.
910 */class lU{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class jae{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable((()=>n(Hn.UNAUTHENTICATED)))}shutdown(){}}class Bae{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 zae{constructor(e){this.t=e,this.currentUser=Hn.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){let r=this.i;const i=c=>this.i!==r?(r=this.i,n(c)):Promise.resolve();let s=new Gn;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new Gn,e.enqueueRetryable((()=>i(this.currentUser)))};const o=()=>{const c=s;e.enqueueRetryable((async()=>{await c.promise,await i(this.currentUser)}))},l=c=>{se("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit((c=>l(c))),setTimeout((()=>{if(!this.auth){const c=this.t.getImmediate({optional:!0});c?l(c):(se("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Gn)}}),0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((r=>this.i!==e?(se("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Pe(typeof r.accessToken=="string"),new lU(r.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return Pe(e===null||typeof e=="string"),new Hn(e)}}class Wae{constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Hn.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class qae{constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new Wae(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable((()=>n(Hn.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class Hae{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 Gae{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){const r=s=>{s.error!=null&&se("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,se("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable((()=>r(s)))};const i=s=>{se("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit((s=>i(s))),setTimeout((()=>
910{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):se("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((n=>n?(Pe(typeof n.token=="string"),this.R=n.token,new Hae(n.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/**
911 * @license
912 * Copyright 2020 Google LLC
913 *
914 * Licensed under the Apache License, Version 2.0 (the "License");
915 * you may not use this file except in compliance with the License.
916 * You may obtain a copy of the License at
917 *
918 *   http://www.apache.org/licenses/LICENSE-2.0
919 *
920 * Unless required by applicable law or agreed to in writing, software
921 * distributed under the License is distributed on an "AS IS" BASIS,
922 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
923 * See the License for the specific language governing permissions and
924 * limitations under the License.
925 */function Kae(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}/**
926 * @license
927 * Copyright 2017 Google LLC
928 *
929 * Licensed under the Apache License, Version 2.0 (the "License");
930 * you may not use this file except in compliance with the License.
931 * You may obtain a copy of the License at
932 *
933 *   http://www.apache.org/licenses/LICENSE-2.0
934 *
935 * Unless required by applicable law or agreed to in writing, software
936 * distributed under the License is distributed on an "AS IS" BASIS,
937 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
938 * See the License for the specific language governing permissions and
939 * limitations under the License.
940 */class uU{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const i=Kae(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%e.length))}return r}}function He(t,e){return t<e?-1:t>e?1:0}function cd(t,e,n){return t.length===e.length&&t.every(((r,i)=>n(r,e[i])))}function cU(t){return t+"\0"}/**
941 * @license
942 * Copyright 2017 Google LLC
943 *
944 * Licensed under the Apache License, Version 2.0 (the "License");
945 * you may not use this file except in compliance with the License.
946 * You may obtain a copy of the License at
947 *
948 *   http://www.apache.org/licenses/LICENSE-2.0
949 *
950 * Unless required by applicable law or agreed to in writing, software
951 * distributed under the License is distributed on an "AS IS" BASIS,
952 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
953 * See the License for the specific language governing permissions and
954 * limitations under the License.
955 */class Qt{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new re(H.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new re(H.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new re(H.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new re(H.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Qt.fromMillis(Date.now())}static fromDate(e){return Qt.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new Qt(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?He(this.nanoseconds,e.nanoseconds):He(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")}}/**
956 * @license
957 * Copyright 2017 Google LLC
958 *
959 * Licensed under the Apache License, Version 2.0 (the "License");
960 * you may not use this file except in compliance with the License.
961 * You may obtain a copy of the License at
962 *
963 *   http://www.apache.org/licenses/LICENSE-2.0
964 *
965 * Unless required by applicable law or agreed to in writing, software
966 * distributed under the License is distributed on an "AS IS" BASIS,
967 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
968 * See the License for the specific language governing permissions and
969 * limitations under the License.
970 */class Oe{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Oe(e)}static min(){return new Oe(new Qt(0,0))}static max(){return new Oe(new Qt(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
971 * @license
972 * Copyright 2017 Google LLC
973 *
974 * Licensed under the Apache License, Version 2.0 (the "License");
975 * you may not use this file except in compliance with the License.
976 * You may obtain a copy of the License at
977 *
978 *   http://www.apache.org/licenses/LICENSE-2.0
979 *
980 * Unless required by applicable law or agreed to in writing, software
981 * distributed under the License is distributed on an "AS IS" BASIS,
982 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
983 * See the License for the specific language governing permissions and
984 * limitations under the License.
985 */class xp{constructor(e,n,r){n===void 0?n=0:n>e.length&&Te(),r===void 0?r=e.length-n:r>e.length-n&&Te(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return xp.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof xp?e.forEach((r=>{n.push(r)})):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=e.get(i),o=n.get(i);if(s<o)return-1;if(s>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class tt extends xp{construct(e,n,r){return new tt(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 re(H.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter((i=>i.length>0)))}return new tt(n)}static emptyPath(){return new tt([])}}const Qae=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class qt extends xp{construct(e,n,r){return new qt(e,n,r)}static isValidIdentifier(e){return Qae.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),qt.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new qt(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>
985{if(r.length===0)throw new re(H.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i<e.length;){const l=e[i];if(l==="\\"){if(i+1===e.length)throw new re(H.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const c=e[i+1];if(c!=="\\"&&c!=="."&&c!=="`")throw new re(H.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=c,i+=2}else l==="`"?(o=!o,i++):l!=="."||o?(r+=l,i++):(s(),i++)}if(s(),o)throw new re(H.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new qt(n)}static emptyPath(){return new qt([])}}/**
986 * @license
987 * Copyright 2017 Google LLC
988 *
989 * Licensed under the Apache License, Version 2.0 (the "License");
990 * you may not use this file except in compliance with the License.
991 * You may obtain a copy of the License at
992 *
993 *   http://www.apache.org/licenses/LICENSE-2.0
994 *
995 * Unless required by applicable law or agreed to in writing, software
996 * distributed under the License is distributed on an "AS IS" BASIS,
997 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
998 * See the License for the specific language governing permissions and
999 * limitations under the License.
1000 */class he{constructor(e){this.path=e}static fromPath(e){return new he(tt.fromString(e))}static fromName(e){return new he(tt.fromString(e).popFirst(5))}static empty(){return new he(tt.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&&tt.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return tt.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new he(new tt(e.slice()))}}/**
1001 * @license
1002 * Copyright 2021 Google LLC
1003 *
1004 * Licensed under the Apache License, Version 2.0 (the "License");
1005 * you may not use this file except in compliance with the License.
1006 * You may obtain a copy of the License at
1007 *
1008 *   http://www.apache.org/licenses/LICENSE-2.0
1009 *
1010 * Unless required by applicable law or agreed to in writing, software
1011 * distributed under the License is distributed on an "AS IS" BASIS,
1012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1013 * See the License for the specific language governing permissions and
1014 * limitations under the License.
1015 */class Pv{constructor(e,n,r,i){this.indexId=e,this.collectionGroup=n,this.fields=r,this.indexState=i}}function gb(t){return t.fields.find((e=>e.kind===2))}function Pl(t){return t.fields.filter((e=>e.kind!==2))}Pv.UNKNOWN_ID=-1;class zy{constructor(e,n){this.fieldPath=e,this.kind=n}}class kp{constructor(e,n){this.sequenceNumber=e,this.offset=n}static empty(){return new kp(0,ki.min())}}function dU(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=Oe.fromTimestamp(r===1e9?new Qt(n+1,0):new Qt(n,r));return new ki(i,he.empty(),e)}function fU(t){return new ki(t.readTime,t.key,-1)}class ki{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new ki(Oe.min(),he.empty(),-1)}static max(){return new ki(Oe.max(),he.empty(),-1)}}function NR(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=he.comparator(t.documentKey,e.documentKey),n!==0?n:He(t.largestBatchId,e.largestBatchId))}/**
1016 * @license
1017 * Copyright 2020 Google LLC
1018 *
1019 * Licensed under the Apache License, Version 2.0 (the "License");
1020 * you may not use this file except in compliance with the License.
1021 * You may obtain a copy of the License at
1022 *
1023 *   http://www.apache.org/licenses/LICENSE-2.0
1024 *
1025 * Unless required by applicable law or agreed to in writing, software
1026 * distributed under the License is distributed on an "AS IS" BASIS,
1027 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1028 * See the License for the specific language governing permissions and
1029 * limitations under the License.
1030 */const hU="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class pU{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}
vendor: 4,520 bytes, lines 1030-1075
1030raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}/**
1031 * @license
1032 * Copyright 2017 Google LLC
1033 *
1034 * Licensed under the Apache License, Version 2.0 (the "License");
1035 * you may not use this file except in compliance with the License.
1036 * You may obtain a copy of the License at
1037 *
1038 *   http://www.apache.org/licenses/LICENSE-2.0
1039 *
1040 * Unless required by applicable law or agreed to in writing, software
1041 * distributed under the License is distributed on an "AS IS" BASIS,
1042 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1043 * See the License for the specific language governing permissions and
1044 * limitations under the License.
1045 */async function tl(t){if(t.code!==H.FAILED_PRECONDITION||t.message!==hU)throw t;se("LocalStore","Unexpectedly lost primary lease")}/**
1046 * @license
1047 * Copyright 2017 Google LLC
1048 *
1049 * Licensed under the Apache License, Version 2.0 (the "License");
1050 * you may not use this file except in compliance with the License.
1051 * You may obtain a copy of the License at
1052 *
1053 *   http://www.apache.org/licenses/LICENSE-2.0
1054 *
1055 * Unless required by applicable law or agreed to in writing, software
1056 * distributed under the License is distributed on an "AS IS" BASIS,
1057 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1058 * See the License for the specific language governing permissions and
1059 * limitations under the License.
1060 */class W{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&&Te(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new W(((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}}))}toPromise(){return new Promise(((e,n)=>{this.next(e,n)}))}wrapUserFunction(e){try{const n=e();return n instanceof W?n:W.resolve(n)}catch(n){return W.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction((()=>e(n))):W.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction((()=>e(n))):W.reject(n)}static resolve(e){return new W(((n,r)=>{n(e)}))}static reject(e){return new W(((n,r)=>{r(e)}))}static waitFor(e){return new W(((n,r)=>{let i=0,s=0,o=!1;e.forEach((l=>{++i,l.next((()=>{++s,o&&s===i&&n()}),(c=>r(c)))})),o=!0,s===i&&n()}))}static or(e){let n=W.resolve(!1);for(const r of e)n=n.next((i=>i?W.resolve(i):r()));return n}static forEach(e,n){const r=[];return e.forEach(((i,s)=>{r.push(n.call(this,i,s))})),this.waitFor(r)}static mapArray(e,n){return new W(((r,i)=>{const s=e.length,o=new Array(s);let l=0;for(let c=0;c<s;c++){const d=c;n(e[d]).next((h=>{o[d]=h,++l,l===s&&r(o)}),(h=>i(h)))}}))}static doWhile(e,n){return new W(((r,i)=>{const s=()=>{e()===!0?n().next((()=>{s()}),i):r()};s()}))}}/**
1061 * @license
1062 * Copyright 2017 Google LLC
1063 *
1064 * Licensed under the Apache License, Version 2.0 (the "License");
1065 * you may not use this file except in compliance with the License.
1066 * You may obtain a copy of the License at
1067 *
1068 *   http://www.apache.org/licenses/LICENSE-2.0
1069 *
1070 * Unless required by applicable law or agreed to in writing, software
1071 * distributed under the License is distributed on an "AS IS" BASIS,
1072 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1073 * See the License for the specific language governing permissions and
1074 * limitations under the License.
1075 */class cw{constructor(e,n){this.action=e,this.transaction=n,this.aborted=!1,this.V=new Gn,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{n.error?this.V.reject(new Kh(e,n.error)):this.V.resolve()},this.transaction.onerror=r=>{const i=DR(r.target.error);this.V.reject(new Kh(e,i))}}static open(e,n,r,i){try{return new cw(n,e.transaction(i,r))}catch(s){throw new Kh(n,s)}}get m(){return this.V.promise}abort(e){e&&this.V.reject(e),this.aborted||(se("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){const e=this.transaction;this.aborted||typeof e.commit!="function"||e.commit()}store(e){const n=this.transaction.objectStore(e);return new Jae(n)}}class zi{constructor(e,n,r){this.name=e,this.version=n,this.p=r,zi.S(bv())===12.2&&vn("Firestore persistence suffers from a bug in 
1075iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return se("SimpleDb","Removing database:",e),Nl(window.indexedDB.deleteDatabase(e)).toPromise()}static D(){if(!Coe())return!1;if(zi.C())return!0;const e=bv(),n=zi.S(e),r=0<n&&n<10,i=zi.v(e),s=0<i&&i<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||r||s)}static C(){var e;return typeof process<"u"&&((e=process.__PRIVATE_env)===null||e===void 0?void 0:e.F)==="YES"}static M(e,n){return e.store(n)}static S(e){const n=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),r=n?n[1].split("_").slice(0,2).join("."):"-1";return Number(r)}static v(e){const n=e.match(/Android ([\d.]+)/i),r=n?n[1].split(".").slice(0,2).join("."):"-1";return Number(r)}async O(e){return this.db||(se("SimpleDb","Opening database:",this.name),this.db=await new Promise(((n,r)=>{const i=indexedDB.open(this.name,this.version);i.onsuccess=s=>{const o=s.target.result;n(o)},i.onblocked=()=>{r(new Kh(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=s=>{const o=s.target.error;o.name==="VersionError"?r(new re(H.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):o.name==="InvalidStateError"?r(new re(H.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+o)):r(new Kh(e,o))},i.onupgradeneeded=s=>{se("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',s.oldVersion);const o=s.target.result;this.p.N(o,i.transaction,s.oldVersion,this.version).next((()=>{se("SimpleDb","Database upgrade to version "+this.version+" complete")}))}}))),this.L&&(this.db.onversionchange=n=>this.L(n)),this.db}B(e){this.L=e,this.db&&(this.db.onversionchange=n=>e(n))}async runTransaction(e,n,r,i){const s=n==="readonly";let o=0;for(;;){++o;try{this.db=await this.O(e);const l=cw.open(this.db,e,s?"readonly":"readwrite",r),c=i(l).next((d=>(l.g(),d))).catch((d=>(l.abort(d),W.reject(d)))).toPromise();return c.catch((()=>{})),await l.m,c}catch(l){const c=l,d=c.name!=="FirebaseError"&&o<3;if(se("SimpleDb","Transaction failed with error:",c.message,"Retrying:",d),this.close(),!d)return Promise.reject(c)}}}close(){this.db&&this.db.close(),this.db=void 0}}class Yae{constructor(e){this.k=e,this.q=!1,this.K=null}get isDone(){return this.q}get $(){return this.K}set cursor(e){this.k=e}done(){this.q=!0}U(e){this.K=e}delete(){return Nl(this.k.delete())}}class Kh extends re{constructor(e,n){super(H.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${n}`),this.name="IndexedDbTransactionError"}}function nl(t){return t.name==="IndexedDbTransactionError"}class Jae{constructor(e){this.store=e}put(e,n){let r;return n!==void 0?(se("SimpleDb","PUT",this.store.name,e,n),r=this.store.put(n,e)):(se("SimpleDb","PUT",this.store.name,"<auto-key>",e),r=this.store.put(e)),Nl(r)}add(e){return se("SimpleDb","ADD",this.store.name,e,e),Nl(this.store.add(e))}get(e){return Nl(this.store.get(e)).next((n=>(n===void 0&&(n=null),se("SimpleDb","GET",this.store.name,e,n),n)))}delete(e){return se("SimpleDb","DELETE",this.store.name,e),Nl(this.store.delete(e))}count(){return se("SimpleDb","COUNT",this.store.name),Nl(this.store.count())}W(e,n){const r=this.options(e,n),i=r.index?this.store.index(r.index):this.store;if(typeof i.getAll=="function"){const s=i.getAll(r.range);return new W(((o,l)=>{s.onerror=c=>{l(c.target.error)},s.onsuccess=c=>{o(c.target.result)}}))}{const s=this.cursor(r),o=[];return this.G(s,((l,c)=>{o.push(c)})).next((()=>o))}}j(e,n){const r=this.store.getAll(e,n===null?void 0:n);return new W(((i,s)=>{r.onerror=o=>{s(o.target.error)},r.onsuccess=o=>{i(o.target.result)}}))}
1075H(e,n){se("SimpleDb","DELETE ALL",this.store.name);const r=this.options(e,n);r.J=!1;const i=this.cursor(r);return this.G(i,((s,o,l)=>l.delete()))}Y(e,n){let r;n?r=e:(r={},n=e);const i=this.cursor(r);return this.G(i,n)}Z(e){const n=this.cursor({});return new W(((r,i)=>{n.onerror=s=>{const o=DR(s.target.error);i(o)},n.onsuccess=s=>{const o=s.target.result;o?e(o.primaryKey,o.value).next((l=>{l?o.continue():r()})):r()}}))}G(e,n){const r=[];return new W(((i,s)=>{e.onerror=o=>{s(o.target.error)},e.onsuccess=o=>{const l=o.target.result;if(!l)return void i();const c=new Yae(l),d=n(l.primaryKey,l.value,c);if(d instanceof W){const h=d.catch((m=>(c.done(),W.reject(m))));r.push(h)}c.isDone?i():c.$===null?l.continue():l.continue(c.$)}})).next((()=>W.waitFor(r)))}options(e,n){let r;return e!==void 0&&(typeof e=="string"?r=e:n=e),{index:r,range:n}}cursor(e){let n="next";if(e.reverse&&(n="prev"),e.index){const r=this.store.index(e.index);return e.J?r.openKeyCursor(e.range,n):r.openCursor(e.range,n)}return this.store.openCursor(e.range,n)}}function Nl(t){return new W(((e,n)=>{t.onsuccess=r=>{const i=r.target.result;e(i)},t.onerror=r=>{const i=DR(r.target.error);n(i)}}))}let AN=!1;function DR(t){const e=zi.S(bv());if(e>=12.2&&e<13){const n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){const r=new re("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${n}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return AN||(AN=!0,setTimeout((()=>{throw r}),0)),r}}return t}class Xae{constructor(e,n){this.asyncQueue=e,this.X=n,this.task=null}start(){this.ee(15e3)}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return this.task!==null}ee(e){se("IndexBackfiller",`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,(async()=>{this.task=null;try{se("IndexBackfiller",`Documents written: ${await this.X.te()}`)}catch(n){nl(n)?se("IndexBackfiller","Ignoring IndexedDB error during index backfill: ",n):await tl(n)}await this.ee(6e4)}))}}class Zae{constructor(e,n){this.localStore=e,this.persistence=n}async te(e=50){return this.persistence.runTransaction("Backfill Indexes","readwrite-primary",(n=>this.ne(n,e)))}ne(e,n){const r=new Set;let i=n,s=!0;return W.doWhile((()=>s===!0&&i>0),(()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next((o=>{if(o!==null&&!r.has(o))return se("IndexBackfiller",`Processing collection: ${o}`),this.re(e,o,i).next((l=>{i-=l,r.add(o)}));s=!1})))).next((()=>n-i))}re(e,n,r){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,n).next((i=>this.localStore.localDocuments.getNextDocuments(e,n,i,r).next((s=>{const o=s.changes;return this.localStore.indexManager.updateIndexEntries(e,o).next((()=>this.ie(i,s))).next((l=>(se("IndexBackfiller",`Updating offset: ${l}`),this.localStore.indexManager.updateCollectionGroup(e,n,l)))).next((()=>o.size))}))))}ie(e,n){let r=e;
1075return n.changes.forEach(((i,s)=>{const o=fU(s);NR(o,r)>0&&(r=o)})),new ki(r.readTime,r.documentKey,Math.max(n.batchId,e.largestBatchId))}}/**
1076 * @license
1077 * Copyright 2018 Google LLC
1078 *
1079 * Licensed under the Apache License, Version 2.0 (the "License");
1080 * you may not use this file except in compliance with the License.
1081 * You may obtain a copy of the License at
1082 *
1083 *   http://www.apache.org/licenses/LICENSE-2.0
1084 *
1085 * Unless required by applicable law or agreed to in writing, software
1086 * distributed under the License is distributed on an "AS IS" BASIS,
1087 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1088 * See the License for the specific language governing permissions and
1089 * limitations under the License.
1090 */class si{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.se(r),this.oe=r=>n.writeSequenceNumber(r))}se(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.oe&&this.oe(e),e}}si._e=-1;function ym(t){return t==null}function Cp(t){return t===0&&1/t==-1/0}function mU(t){return typeof t=="number"&&Number.isInteger(t)&&!Cp(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/**
1091 * @license
1092 * Copyright 2017 Google LLC
1093 *
1094 * Licensed under the Apache License, Version 2.0 (the "License");
1095 * you may not use this file except in compliance with the License.
1096 * You may obtain a copy of the License at
1097 *
1098 *   http://www.apache.org/licenses/LICENSE-2.0
1099 *
1100 * Unless required by applicable law or agreed to in writing, software
1101 * distributed under the License is distributed on an "AS IS" BASIS,
1102 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1103 * See the License for the specific language governing permissions and
1104 * limitations under the License.
1105 */function Hr(t){let e="";for(let n=0;n<t.length;n++)e.length>0&&(e=PN(e)),e=ele(t.get(n),e);return PN(e)}function ele(t,e){let n=e;const r=t.length;for(let i=0;i<r;i++){const s=t.charAt(i);switch(s){case"\0":n+="��";break;case"�":n+="��";break;default:n+=s}}return n}function PN(t){return t+"��"}function $s(t){const e=t.length;if(Pe(e>=2),e===2)return Pe(t.charAt(0)==="�"&&t.charAt(1)==="�"),tt.emptyPath();const n=e-2,r=[];let i="";for(let s=0;s<e;){const o=t.indexOf("�",s);switch((o<0||o>n)&&Te(),t.charAt(o+1)){case"�":const l=t.substring(s,o);let c;i.length===0?c=l:(i+=l,c=i,i=""),r.push(c);break;case"�":i+=t.substring(s,o),i+="\0";break;case"�":i+=t.substring(s,o+1);break;default:Te()}s=o+2}return new tt(r)}/**
1106 * @license
1107 * Copyright 2022 Google LLC
1108 *
1109 * Licensed under the Apache License, Version 2.0 (the "License");
1110 * you may not use this file except in compliance with the License.
1111 * You may obtain a copy of the License at
1112 *
1113 *   http://www.apache.org/licenses/LICENSE-2.0
1114 *
1115 * Unless required by applicable law or agreed to in writing, software
1116 * distributed under the License is distributed on an "AS IS" BASIS,
1117 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1118 * See the License for the specific language governing permissions and
1119 * limitations under the License.
1120 */const ON=["userId","batchId"];/**
1121 * @license
1122 * Copyright 2022 Google LLC
1123 *
1124 * Licensed under the Apache License, Version 2.0 (the "License");
1125 * you may not use this file except in compliance with the License.
1126 * You may obtain a copy of the License at
1127 *
1128 *   http://www.apache.org/licenses/LICENSE-2.0
1129 *
1130 * Unless required by applicable law or agreed to in writing, software
1131 * distributed under the License is distributed on an "AS IS" BASIS,
1132 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1133 * See the License for the specific language governing permissions and
1134 * limitations under the License.
1135 */function Wy(t,e){return[t,Hr(e)]}function gU(t,e,n){return[t,Hr(e),n]}const tle={},nle=["prefixPath","collectionGroup","readTime","documentId"],rle=["prefixPath","collectionGroup","documentId"],ile=["collectionGroup","readTime","prefixPath","documentId"],sle=["canonicalId","targetId"],ole=["targetId","path"],ale=["path","targetId"],lle=["collectionId","parent"],ule=["indexId","uid"],cle=["uid","sequenceNumber"],dle=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],fle=["indexId","uid","orderedDocumentKey"],hle=["userId","collectionPath","documentId"],ple=["userId","collectionPath","largestBatchId"],mle=["userId","collectionGroup","largestBatchId"],yU=["mutation
1135Queues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],gle=[...yU,"documentOverlays"],vU=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],_U=vU,yle=[..._U,"indexConfiguration","indexState","indexEntries"];/**
1136 * @license
1137 * Copyright 2020 Google LLC
1138 *
1139 * Licensed under the Apache License, Version 2.0 (the "License");
1140 * you may not use this file except in compliance with the License.
1141 * You may obtain a copy of the License at
1142 *
1143 *   http://www.apache.org/licenses/LICENSE-2.0
1144 *
1145 * Unless required by applicable law or agreed to in writing, software
1146 * distributed under the License is distributed on an "AS IS" BASIS,
1147 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1148 * See the License for the specific language governing permissions and
1149 * limitations under the License.
1150 */class yb extends pU{constructor(e,n){super(),this.ae=e,this.currentSequenceNumber=n}}function er(t,e){const n=me(t);return zi.M(n.ae,e)}/**
1151 * @license
1152 * Copyright 2017 Google LLC
1153 *
1154 * Licensed under the Apache License, Version 2.0 (the "License");
1155 * you may not use this file except in compliance with the License.
1156 * You may obtain a copy of the License at
1157 *
1158 *   http://www.apache.org/licenses/LICENSE-2.0
1159 *
1160 * Unless required by applicable law or agreed to in writing, software
1161 * distributed under the License is distributed on an "AS IS" BASIS,
1162 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1163 * See the License for the specific language governing permissions and
1164 * limitations under the License.
1165 */function NN(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function xu(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function wU(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/**
1166 * @license
1167 * Copyright 2017 Google LLC
1168 *
1169 * Licensed under the Apache License, Version 2.0 (the "License");
1170 * you may not use this file except in compliance with the License.
1171 * You may obtain a copy of the License at
1172 *
1173 *   http://www.apache.org/licenses/LICENSE-2.0
1174 *
1175 * Unless required by applicable law or agreed to in writing, software
1176 * distributed under the License is distributed on an "AS IS" BASIS,
1177 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1178 * See the License for the specific language governing permissions and
1179 * limitations under the License.
1180 */class Ot{constructor(e,n){this.comparator=e,this.root=n||or.EMPTY}insert(e,n){return new Ot(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,or.BLACK,null,null))}remove(e){return new Ot(this.comparator,this.root.remove(e,this.comparator).copy(null,null,or.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 Ey(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Ey(this.root,e,this.comparator,!1)}getReverseIterator(){return new Ey(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Ey(this.root,e,this.comparator,!0)}}class Ey{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class or{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??or.RED,this.left=i??or.EMPTY,this.right=s??or.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new or(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return or.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 or.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,or.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,or.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 Te();const e=this.left.check();if(e!==this.right.check())throw Te();return e+(this.isRed()?0:1)}}or.EMPTY=null,or.RED=!0,or.BLACK=!1;
vendor: 4,260 bytes, lines 1180-1224
1180or.EMPTY=new class{constructor(){this.size=0}get key(){throw Te()}get value(){throw Te()}get color(){throw Te()}get left(){throw Te()}get right(){throw Te()}copy(e,n,r,i,s){return this}insert(e,n,r){return new or(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}};/**
1181 * @license
1182 * Copyright 2017 Google LLC
1183 *
1184 * Licensed under the Apache License, Version 2.0 (the "License");
1185 * you may not use this file except in compliance with the License.
1186 * You may obtain a copy of the License at
1187 *
1188 *   http://www.apache.org/licenses/LICENSE-2.0
1189 *
1190 * Unless required by applicable law or agreed to in writing, software
1191 * distributed under the License is distributed on an "AS IS" BASIS,
1192 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1193 * See the License for the specific language governing permissions and
1194 * limitations under the License.
1195 */class Rt{constructor(e){this.comparator=e,this.data=new Ot(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 DN(this.data.getIterator())}getIteratorFrom(e){return new DN(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 Rt)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach((n=>{e.push(n)})),e}toString(){const e=[];return this.forEach((n=>e.push(n))),"SortedSet("+e.toString()+")"}copy(e){const n=new Rt(this.comparator);return n.data=e,n}}class DN{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}function yc(t){return t.hasNext()?t.getNext():void 0}/**
1196 * @license
1197 * Copyright 2020 Google LLC
1198 *
1199 * Licensed under the Apache License, Version 2.0 (the "License");
1200 * you may not use this file except in compliance with the License.
1201 * You may obtain a copy of the License at
1202 *
1203 *   http://www.apache.org/licenses/LICENSE-2.0
1204 *
1205 * Unless required by applicable law or agreed to in writing, software
1206 * distributed under the License is distributed on an "AS IS" BASIS,
1207 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1208 * See the License for the specific language governing permissions and
1209 * limitations under the License.
1210 */class oi{constructor(e){this.fields=e,e.sort(qt.comparator)}static empty(){return new oi([])}unionWith(e){let n=new Rt(qt.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new oi(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return cd(this.fields,e.fields,((n,r)=>n.isEqual(r)))}}/**
1211 * @license
1212 * Copyright 2023 Google LLC
1213 *
1214 * Licensed under the Apache License, Version 2.0 (the "License");
1215 * you may not use this file except in compliance with the License.
1216 * You may obtain a copy of the License at
1217 *
1218 *   http://www.apache.org/licenses/LICENSE-2.0
1219 *
1220 * Unless required by applicable law or agreed to in writing, software
1221 * distributed under the License is distributed on an "AS IS" BASIS,
1222 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1223 * See the License for the specific language governing permissions and
1224 * limitations under the License.
1225 */class EU extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
1226 * @license
1227 * Copyright 2020 Google LLC
1228 *
1229 * Licensed under the Apache License, Version 2.0 (the "License");
1230 * you may not use this file except in compliance with the License.
1231 * You may obtain a copy of the License at
1232 *
1233 *   http://www.apache.org/licenses/LICENSE-2.0
1234 *
1235 * Unless required by applicable law or agreed to in writing, software
1236 * distributed under the License is distributed on an "AS IS" BASIS,
1237 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1238 * See the License for the specific language governing permissions and
1239 * limitations under the License.
1240 */function vle(){return typeof atob<"u"}/**
1241 * @license
1242 * Copyright 2020 Google LLC
1243 *
1244 * Licensed under the Apache License, Version 2.0 (the "License");
1245 * you may not use this file except in compliance with the License.
1246 * You may obtain a copy of the License at
1247 *
1248 *   http://www.apache.org/licenses/LICENSE-2.0
1249 *
1250 * Unless required by applicable law or agreed to in writing, software
1251 * distributed under the License is distributed on an "AS IS" BASIS,
1252 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1253 * See the License for the specific language governing permissions and
1254 * limitations under the License.
1255 */class Un{constructor(e){this.binaryString=e}static fromBase64String(e){const n=(function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new EU("Invalid base64 string: "+s):s}})(e);return new Un(n)}static fromUint8Array(e){const n=(function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s})(e);return new Un(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 He(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Un.EMPTY_BYTE_STRING=new Un("");const _le=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function ja(t){if(Pe(!!t),typeof t=="string"){let e=0;const n=_le.exec(t);if(Pe(!!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:un(t.seconds),nanos:un(t.nanos)}}function un(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function Ba(t){return typeof t=="string"?Un.fromBase64String(t):Un.fromUint8Array(t)}/**
1256 * @license
1257 * Copyright 2020 Google LLC
1258 *
1259 * Licensed under the Apache License, Version 2.0 (the "License");
1260 * you may not use this file except in compliance with the License.
1261 * You may obtain a copy of the License at
1262 *
1263 *   http://www.apache.org/licenses/LICENSE-2.0
1264 *
1265 * Unless required by applicable law or agreed to in writing, software
1266 * distributed under the License is distributed on an "AS IS" BASIS,
1267 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1268 * See the License for the specific language governing permissions and
1269 * limitations under the License.
1270 */function dw(t){var e,n;return((n=(((e=t?.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function MR(t){const e=t.mapValue.fields.__previous_value__;return dw(e)?MR(e):e}function Ap(t){const e=ja(t.mapValue.fields.__local_write_time__.timestampValue);return new Qt(e.seconds,e.nanos)}/**
1271 * @license
1272 * Copyright 2017 Google LLC
1273 *
1274 * Licensed under the Apache License, Version 2.0 (the "License");
1275 * you may not use this file except in compliance with the License.
1276 * You may obtain a copy of the License at
1277 *
1278 *   http://www.apache.org/licenses/LICENSE-2.0
1279 *
1280 * Unless required by applicable law or agreed to in writing, software
1281 * distributed under the License is distributed on an "AS IS" BASIS,
1282 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1283 * See the License for the specific language governing permissions and
1284 * limitations under the License.
1285 */class wle{constructor(e,n,r,i,s,o,l,c,d){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=l,this.longPollingOptions=c,this.useFetchStreams=d}}class za{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new za("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof za&&e.projectId===this.projectId&&e.database===this.database}}/**
1286 * @license
1287 * Copyright 2020 Google LLC
1288 *
1289 * Licensed under the Apache License, Version 2.0 (the "License");
1290 * you may not use this file except in compliance with the License.
1291 * You may obtain a copy of the License at
1292 *
1293 *   http://www.apache.org/licenses/LICENSE-2.0
1294 *
1295 * Unless required by applicable law or agreed to in writing, software
1296 * distributed under the License is distributed on an "AS IS" BASIS,
1297 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1298 * See the License for the specific language governing permissions and
1299 * limitations under the License.
1300 */const Ia={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},qy={nullValue:"NULL_VALUE"};function ou(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?dw(t)?4:SU(t)?9007199254740991:10:Te()}function Ys(t,e){if(t===e)return!0;const n=ou(t);if(n!==ou(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Ap(t).isEqual(Ap(e));case 3:return(function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=ja(i.timestampValue),l=ja(s.timestampValue);return o.seconds===l.seconds&&o.nanos===l.nanos})(t,e);case 5:return t.stringValue===e.stringValue;case 6:return(function(i,s){return Ba(i.bytesValue).isEqual(Ba(s.bytesValue))})(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return(function(i,s){return un(i.geoPointValue.latitude)===un(s.geoPointValue.latitude)&&un(i.geoPointValue.longitude)===un(s.geoPointValue.longitude)})(t,e);case 2:return(function(i,s){if("integerValue"in i&&"integerValue"in s)return un(i.integerValue)===un(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=un(i.doubleValue),l=un(s.doubleValue);return o===l?Cp(o)===Cp(l):isNaN(o)&&isNaN(l)}return!1})(t,e);case 9:return cd(t.arrayValue.values||[],e.arrayValue.values||[],Ys);case 10:return(function(i,s){const o=i.mapValue.fields||{},l=s.mapValue.fields||{};if(NN(o)!==NN(l))return!1;for(const c in o)if(o.hasOwnProperty(c)&&(l[c]===void 0||!Ys(o[c],l[c])))return!1;return!0})(t,e);default:return Te()}}function Pp(t,e){return(t.values||[]).find((n=>Ys(n,e)))!==void 0}function Wa(t,e){if(t===e)return 0;const n=ou(t),r=ou(e);if(n!==r)return He(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return He(t.booleanValue,e.booleanValue);case 2:return(function(s,o){const l=un(s.integerValue||s.doubleValue),c=un(o.integerValue||o.doubleValue);return l<c?-1:l>c?1:l===c?0:isNaN(l)?isNaN(c)?0:-1:1})(t,e);case 3:return MN(t.timestampValue,e.timestampValue);case 4:return MN(Ap(t),Ap(e));case 5:return He(t.stringValue,e.stringValue);case 6:return(function(s,o){const l=Ba(s),c=Ba(o);return l.compareTo(c)})(t.bytesValue,e.bytesValue);case 7:return(function(s,o){const l=s.split("/"),c=o.split("/");for(let d=0;d<l.length&&d<c.length;d++){const h=He(l[d],c[d]);if(h!==0)return h}return He(l.length,c.length)})(t.referenceValue,e.referenceValue);case 8:return(function(s,o){const l=He(un(s.latitude),un(o.latitude));return l!==0?l:He(un(s.longitude),un(o.longitude))})(t.geoPointValue,e.geoPointValue);case 9:return(function(s,o){const l=s.values||[],c=o.values||[];for(let d=0;d<l.length&&d<c.length;++d){const h=Wa(l[d],c[d]);if(h)return h}return He(l.length,c.length)})(t.arrayValue,e.arrayValue);case 10:return(function(s,o){if(s===Ia.mapValue&&o===Ia.mapValue)return 0;if(s===Ia.mapValue)return 1;if(o===Ia.mapValue)return-1;const l=s.fields||{},c=Object.keys(l),d=o.fields||{},h=Object.keys(d);c.sort(),h.sort();for(let m=0;m<c.length&&m<h.length;++m){const g=He(c[m],h[m]);if(g!==0)return g;const v=Wa(l[c[m]],d[h[m]]);if(v!==0)return v}return He(c.length,h.length)})(t.mapValue,e.mapValue);default:throw Te()}}function MN(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return He(t,e);const n=ja(t),r=ja(e),i=He(n.seconds,r.seconds);return i!==0?i:He(n.nanos,r.nanos)}function dd(t){return vb(t)}function vb(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=ja(n);return`time(${r.seconds},${r.nanos})`})(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?(function(n){return Ba(n).toBase64()})(t.bytesValue):"referenceValue"in t?(function(n){return he.fromName(n).toString()})(t.referenceValue):"geoPointValue"in t?(function(n){return`geo(${n.latitude},${n.longitude})`})(t.geoPointValue):"arrayValue"in t?(function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=vb(s);return r+"]"})(t.arrayValue):"mapValue"in t?(function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${vb(n.fields[o])}`;return i+"}"})(t.mapValue):Te()}function au(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function _b(t){return!!t&&"integerValue"in t}function Op(t){return!!t&&"arrayValue"in t}function LN(t){return!!t&&"nullValue"in t}function VN(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function Hy(t){return!!t&&"mapValue"in t}function Qh(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 xu(t.mapValue.fields,((n,r)=>e.mapValue.fields[n]=Qh(r))),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Qh(t.arrayValue.values[n]);return e}return Object.assign({},t)}function SU(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}function Ele(t){return"nullValue"in t?qy:"booleanValue"in t?{booleanValue:!1}:"integerValue"in t||"doubleValue"in t?{doubleValue:NaN}:"timestampValue"in t?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in t?{stringValue:""}
vendor: 2,762 bytes, lines 1300-1315
1300:"bytesValue"in t?{bytesValue:""}:"referenceValue"in t?au(za.empty(),he.empty()):"geoPointValue"in t?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in t?{arrayValue:{}}:"mapValue"in t?{mapValue:{}}:Te()}function Sle(t){return"nullValue"in t?{booleanValue:!1}:"booleanValue"in t?{doubleValue:NaN}:"integerValue"in t||"doubleValue"in t?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in t?{stringValue:""}:"stringValue"in t?{bytesValue:""}:"bytesValue"in t?au(za.empty(),he.empty()):"referenceValue"in t?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in t?{arrayValue:{}}:"arrayValue"in t?{mapValue:{}}:"mapValue"in t?Ia:Te()}function FN(t,e){const n=Wa(t.value,e.value);return n!==0?n:t.inclusive&&!e.inclusive?-1:!t.inclusive&&e.inclusive?1:0}function $N(t,e){const n=Wa(t.value,e.value);return n!==0?n:t.inclusive&&!e.inclusive?1:!t.inclusive&&e.inclusive?-1:0}/**
1301 * @license
1302 * Copyright 2017 Google LLC
1303 *
1304 * Licensed under the Apache License, Version 2.0 (the "License");
1305 * you may not use this file except in compliance with the License.
1306 * You may obtain a copy of the License at
1307 *
1308 *   http://www.apache.org/licenses/LICENSE-2.0
1309 *
1310 * Unless required by applicable law or agreed to in writing, software
1311 * distributed under the License is distributed on an "AS IS" BASIS,
1312 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313 * See the License for the specific language governing permissions and
1314 * limitations under the License.
1315 */class ur{constructor(e){this.value=e}static empty(){return new ur({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)],!Hy(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=Qh(n)}setAll(e){let n=qt.emptyPath(),r={},i=[];e.forEach(((o,l)=>{if(!n.isImmediateParentOf(l)){const c=this.getFieldsMap(n);this.applyChanges(c,r,i),r={},i=[],n=l.popLast()}o?r[l.lastSegment()]=Qh(o):i.push(l.lastSegment())}));const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());Hy(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return Ys(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)];Hy(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){xu(n,((i,s)=>e[i]=s));for(const i of r)delete e[i]}clone(){return new ur(Qh(this.value))}}function TU(t){const e=[];return xu(t.fields,((n,r)=>{const i=new qt([n]);if(Hy(r)){const s=TU(r.mapValue).fields;
vendor: 4,181 bytes, lines 1315-1355
1315if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)})),new oi(e)}/**
1316 * @license
1317 * Copyright 2017 Google LLC
1318 *
1319 * Licensed under the Apache License, Version 2.0 (the "License");
1320 * you may not use this file except in compliance with the License.
1321 * You may obtain a copy of the License at
1322 *
1323 *   http://www.apache.org/licenses/LICENSE-2.0
1324 *
1325 * Unless required by applicable law or agreed to in writing, software
1326 * distributed under the License is distributed on an "AS IS" BASIS,
1327 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1328 * See the License for the specific language governing permissions and
1329 * limitations under the License.
1330 */class $t{constructor(e,n,r,i,s,o,l){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=l}static newInvalidDocument(e){return new $t(e,0,Oe.min(),Oe.min(),Oe.min(),ur.empty(),0)}static newFoundDocument(e,n,r,i){return new $t(e,1,n,Oe.min(),r,i,0)}static newNoDocument(e,n){return new $t(e,2,n,Oe.min(),Oe.min(),ur.empty(),0)}static newUnknownDocument(e,n){return new $t(e,3,n,Oe.min(),Oe.min(),ur.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(Oe.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=ur.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=ur.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Oe.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 $t&&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 $t(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}})`}}/**
1331 * @license
1332 * Copyright 2022 Google LLC
1333 *
1334 * Licensed under the Apache License, Version 2.0 (the "License");
1335 * you may not use this file except in compliance with the License.
1336 * You may obtain a copy of the License at
1337 *
1338 *   http://www.apache.org/licenses/LICENSE-2.0
1339 *
1340 * Unless required by applicable law or agreed to in writing, software
1341 * distributed under the License is distributed on an "AS IS" BASIS,
1342 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1343 * See the License for the specific language governing permissions and
1344 * limitations under the License.
1345 */class qa{constructor(e,n){this.position=e,this.inclusive=n}}function UN(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const s=e[i],o=t.position[i];if(s.field.isKeyField()?r=he.comparator(he.fromName(o.referenceValue),n.key):r=Wa(o,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function jN(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(!Ys(t.position[n],e.position[n]))return!1;return!0}/**
1346 * @license
1347 * Copyright 2022 Google LLC
1348 *
1349 * Licensed under the Apache License, Version 2.0 (the "License");
1350 * you may not use this file except in compliance with the License.
1351 * You may obtain a copy of the License at
1352 *
1353 *   http://www.apache.org/licenses/LICENSE-2.0
1354 *
1355 * Unless required by applicable law or agreed to in writing, softw
1355are
1356 * distributed under the License is distributed on an "AS IS" BASIS,
1357 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1358 * See the License for the specific language governing permissions and
1359 * limitations under the License.
1360 */class Np{constructor(e,n="asc"){this.field=e,this.dir=n}}function Tle(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/**
1361 * @license
1362 * Copyright 2022 Google LLC
1363 *
1364 * Licensed under the Apache License, Version 2.0 (the "License");
1365 * you may not use this file except in compliance with the License.
1366 * You may obtain a copy of the License at
1367 *
1368 *   http://www.apache.org/licenses/LICENSE-2.0
1369 *
1370 * Unless required by applicable law or agreed to in writing, software
1371 * distributed under the License is distributed on an "AS IS" BASIS,
1372 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1373 * See the License for the specific language governing permissions and
1374 * limitations under the License.
1375 */class bU{}class nt extends bU{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 ble(e,n,r):n==="array-contains"?new xle(e,r):n==="in"?new AU(e,r):n==="not-in"?new kle(e,r):n==="array-contains-any"?new Cle(e,r):new nt(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new Ile(e,r):new Rle(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(Wa(n,this.value)):n!==null&&ou(this.value)===ou(n)&&this.matchesComparison(Wa(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 Te()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class bt extends bU{constructor(e,n){super(),this.filters=e,this.op=n,this.ue=null}static create(e,n){return new bt(e,n)}matches(e){return fd(this)?this.filters.find((n=>!n.matches(e)))===void 0:this.filters.find((n=>n.matches(e)))!==void 0}getFlattenedFilters(){return this.ue!==null||(this.ue=this.filters.reduce(((e,n)=>e.concat(n.getFlattenedFilters())),[])),this.ue}getFilters(){return Object.assign([],this.filters)}}function fd(t){return t.op==="and"}function wb(t){return t.op==="or"}function LR(t){return IU(t)&&fd(t)}function IU(t){for(const e of t.filters)if(e instanceof bt)return!1;return!0}function Eb(t){if(t instanceof nt)return t.field.canonicalString()+t.op.toString()+dd(t.value);if(LR(t))return t.filters.map((e=>Eb(e))).join(",");{const e=t.filters.map((n=>Eb(n))).join(",");return`${t.op}(${e})`}}function RU(t,e){return t instanceof nt?(function(r,i){return i instanceof nt&&r.op===i.op&&r.field.isEqual(i.field)&&Ys(r.value,i.value)})(t,e):t instanceof bt?(function(r,i){return i instanceof bt&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce(((s,o,l)=>s&&RU(o,i.filters[l])),!0):!1})(t,e):void Te()}function xU(t,e){const n=t.filters.concat(e);return bt.create(n,t.op)}function kU(t){return t instanceof nt?(function(n){return`${n.field.canonicalString()} ${n.op} ${dd(n.value)}`})(t):t instanceof bt?(function(n){return n.op.toString()+" {"+n.getFilters().map(kU).join(" ,")+"}"})(t):"Filter"}class ble extends nt{constructor(e,n,r){super(e,n,r),this.key=he.fromName(r.referenceValue)}matches(e){const n=he.comparator(e.key,this.key);return this.matchesComparison(n)}}class Ile extends nt{constructor(e,n){super(e,"in",n),this.keys=CU("in",n)}matches(e){return this.keys.some((n=>n.isEqual(e.key)))}}class Rle extends nt{constructor(e,n){super(e,"not-in",n),this.keys=CU("not-in",n)}matches(e){return!this.keys.some((n=>n.isEqual(e.key)))}}function CU(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map((r=>he.fromName(r.referenceValue)))}class xle extends nt{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return Op(n)&&Pp(n.arrayValue,this.value)}}class AU extends nt{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Pp(this.value.arrayValue,n)}}class kle extends nt{constructor(e,n){super(e,"not-in",n)}matches(e){if(Pp(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!Pp(this.value.arrayValue,n)}}class Cle extends nt{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);
1375return!(!Op(n)||!n.arrayValue.values)&&n.arrayValue.values.some((r=>Pp(this.value.arrayValue,r)))}}/**
1376 * @license
1377 * Copyright 2019 Google LLC
1378 *
1379 * Licensed under the Apache License, Version 2.0 (the "License");
1380 * you may not use this file except in compliance with the License.
1381 * You may obtain a copy of the License at
1382 *
1383 *   http://www.apache.org/licenses/LICENSE-2.0
1384 *
1385 * Unless required by applicable law or agreed to in writing, software
1386 * distributed under the License is distributed on an "AS IS" BASIS,
1387 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1388 * See the License for the specific language governing permissions and
1389 * limitations under the License.
1390 */class Ale{constructor(e,n=null,r=[],i=[],s=null,o=null,l=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=l,this.ce=null}}function Sb(t,e=null,n=[],r=[],i=null,s=null,o=null){return new Ale(t,e,n,r,i,s,o)}function lu(t){const e=me(t);if(e.ce===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((r=>Eb(r))).join(","),n+="|ob:",n+=e.orderBy.map((r=>(function(s){return s.field.canonicalString()+s.dir})(r))).join(","),ym(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map((r=>dd(r))).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map((r=>dd(r))).join(",")),e.ce=n}return e.ce}function vm(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(!Tle(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(!RU(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!jN(t.startAt,e.startAt)&&jN(t.endAt,e.endAt)}function Ov(t){return he.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}function Nv(t,e){return t.filters.filter((n=>n instanceof nt&&n.field.isEqual(e)))}function BN(t,e,n){let r=qy,i=!0;for(const s of Nv(t,e)){let o=qy,l=!0;switch(s.op){case"<":case"<=":o=Ele(s.value);break;case"==":case"in":case">=":o=s.value;break;case">":o=s.value,l=!1;break;case"!=":case"not-in":o=qy}FN({value:r,inclusive:i},{value:o,inclusive:l})<0&&(r=o,i=l)}if(n!==null){for(let s=0;s<t.orderBy.length;++s)if(t.orderBy[s].field.isEqual(e)){const o=n.position[s];FN({value:r,inclusive:i},{value:o,inclusive:n.inclusive})<0&&(r=o,i=n.inclusive);break}}return{value:r,inclusive:i}}function zN(t,e,n){let r=Ia,i=!0;for(const s of Nv(t,e)){let o=Ia,l=!0;switch(s.op){case">=":case">":o=Sle(s.value),l=!1;break;case"==":case"in":case"<=":o=s.value;break;case"<":o=s.value,l=!1;break;case"!=":case"not-in":o=Ia}$N({value:r,inclusive:i},{value:o,inclusive:l})>0&&(r=o,i=l)}if(n!==null){for(let s=0;s<t.orderBy.length;++s)if(t.orderBy[s].field.isEqual(e)){const o=n.position[s];$N({value:r,inclusive:i},{value:o,inclusive:n.inclusive})>0&&(r=o,i=n.inclusive);break}}return{value:r,inclusive:i}}/**
1391 * @license
1392 * Copyright 2017 Google LLC
1393 *
1394 * Licensed under the Apache License, Version 2.0 (the "License");
1395 * you may not use this file except in compliance with the License.
1396 * You may obtain a copy of the License at
1397 *
1398 *   http://www.apache.org/licenses/LICENSE-2.0
1399 *
1400 * Unless required by applicable law or agreed to in writing, software
1401 * distributed under the License is distributed on an "AS IS" BASIS,
1402 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1403 * See the License for the specific language governing permissions and
1404 * limitations under the License.
1405 */class Lo{constructor(e,n=null,r=[],i=[],s=null,o="F",l=null,c=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=l,this.endAt=c,this.le=null,this.he=null,this.Pe=null,this.startAt,this.endAt}}function PU(t,e,n,r,i,s,o,l){return new Lo(t,e,n,r,i,s,o,l)}function Bd(t){return new Lo(t)}function WN(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 VR(t){return t.collectionGroup!==null}function Wc(t){const e=me(t);if(e.le===null){e.le=[];const n=new Set;for(const s of e.explicitOrderBy)e.le.push(s),n.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let l=new Rt(qt.comparator);
1405return o.filters.forEach((c=>{c.getFlattenedFilters().forEach((d=>{d.isInequality()&&(l=l.add(d.field))}))})),l})(e).forEach((s=>{n.has(s.canonicalString())||s.isKeyField()||e.le.push(new Np(s,r))})),n.has(qt.keyField().canonicalString())||e.le.push(new Np(qt.keyField(),r))}return e.le}function Gr(t){const e=me(t);return e.he||(e.he=Ple(e,Wc(t))),e.he}function Ple(t,e){if(t.limitType==="F")return Sb(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map((i=>{const s=i.dir==="desc"?"asc":"desc";return new Np(i.field,s)}));const n=t.endAt?new qa(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new qa(t.startAt.position,t.startAt.inclusive):null;return Sb(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function Tb(t,e){const n=t.filters.concat([e]);return new Lo(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function Dv(t,e,n){return new Lo(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function _m(t,e){return vm(Gr(t),Gr(e))&&t.limitType===e.limitType}function OU(t){return`${lu(Gr(t))}|lt:${t.limitType}`}function xc(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=>kU(i))).join(", ")}]`),ym(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map((i=>(function(o){return`${o.field.canonicalString()} (${o.dir})`})(i))).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map((i=>dd(i))).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map((i=>dd(i))).join(",")),`Target(${r})`})(Gr(t))}; limitType=${t.limitType})`}function wm(t,e){return e.isFoundDocument()&&(function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):he.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)})(t,e)&&(function(r,i){for(const s of Wc(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0})(t,e)&&(function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0})(t,e)&&(function(r,i){return!(r.startAt&&!(function(o,l,c){const d=UN(o,l,c);return o.inclusive?d<=0:d<0})(r.startAt,Wc(r),i)||r.endAt&&!(function(o,l,c){const d=UN(o,l,c);return o.inclusive?d>=0:d>0})(r.endAt,Wc(r),i))})(t,e)}function NU(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function DU(t){return(e,n)=>{let r=!1;for(const i of Wc(t)){const s=Ole(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function Ole(t,e,n){const r=t.field.isKeyField()?he.comparator(e.key,n.key):(function(s,o,l){const c=o.data.field(s),d=l.data.field(s);return c!==null&&d!==null?Wa(c,d):Te()})(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return Te()}}/**
1406 * @license
1407 * Copyright 2017 Google LLC
1408 *
1409 * Licensed under the Apache License, Version 2.0 (the "License");
1410 * you may not use this file except in compliance with the License.
1411 * You may obtain a copy of the License at
1412 *
1413 *   http://www.apache.org/licenses/LICENSE-2.0
1414 *
1415 * Unless required by applicable law or agreed to in writing, software
1416 * distributed under the License is distributed on an "AS IS" BASIS,
1417 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1418 * See the License for the specific language governing permissions and
1419 * limitations under the License.
1420 */class rl{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,n]);i.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){xu(this.inner,((n,r)=>{for(const[i,s]of r)e(i,s)}))}isEmpty(){return wU(this.inner)}size(){return this.innerSize}}/**
1421 * @license
1422 * Copyright 2017 Google LLC
1423 *
1424 * Licensed under the Apache License, Version 2.0 (the "License");
1425 * you may not use this file except in compliance with the License.
1426 * You may obtain a copy of the License at
1427 *
1428 *   http://www.apache.org/licenses/LICENSE-2.0
1429 *
1430 * Unless required by applicable law or agreed to in writing, software
1431 * distributed under the License is distributed on an "AS IS" BASIS,
1432 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1433 * See the License for the specific language governing permissions and
1434 * limitations under the License.
1435 */const Nle=new Ot(he.comparator);function ai(){return Nle}const MU=new Ot(he.comparator);function Oh(...t){let e=MU;for(const n of t)e=e.insert(n.key,n);return e}function LU(t){let e=MU;return t.forEach(((n,r)=>e=e.insert(n,r.overlayedDocument))),e}function Us(){return Yh()}function VU(){return Yh()}function Yh(){return new rl((t=>t.toString()),((t,e)=>t.isEqual(e)))}const Dle=new Ot(he.comparator),Mle=new Rt(he.comparator);function Ge(...t){let e=Mle;for(const n of t)e=e.add(n);return e}const Lle=new Rt(He);function FR(){return Lle}/**
1436 * @license
1437 * Copyright 2020 Google LLC
1438 *
1439 * Licensed under the Apache License, Version 2.0 (the "License");
1440 * you may not use this file except in compliance with the License.
1441 * You may obtain a copy of the License at
1442 *
1443 *   http://www.apache.org/licenses/LICENSE-2.0
1444 *
1445 * Unless required by applicable law or agreed to in writing, software
1446 * distributed under the License is distributed on an "AS IS" BASIS,
1447 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1448 * See the License for the specific language governing permissions and
1449 * limitations under the License.
1450 */function FU(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:Cp(e)?"-0":e}}function $U(t){return{integerValue:""+t}}function UU(t,e){return mU(e)?$U(e):FU(t,e)}/**
1451 * @license
1452 * Copyright 2018 Google LLC
1453 *
1454 * Licensed under the Apache License, Version 2.0 (the "License");
1455 * you may not use this file except in compliance with the License.
1456 * You may obtain a copy of the License at
1457 *
1458 *   http://www.apache.org/licenses/LICENSE-2.0
1459 *
1460 * Unless required by applicable law or agreed to in writing, software
1461 * distributed under the License is distributed on an "AS IS" BASIS,
1462 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1463 * See the License for the specific language governing permissions and
1464 * limitations under the License.
1465 */class fw{constructor(){this._=void 0}}function Vle(t,e,n){return t instanceof hd?(function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&dw(s)&&(s=MR(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}})(n,e):t instanceof uu?BU(t,e):t instanceof cu?zU(t,e):(function(i,s){const o=jU(i,s),l=qN(o)+qN(i.Ie);return _b(o)&&_b(i.Ie)?$U(l):FU(i.serializer,l)})(t,e)}function Fle(t,e,n){return t instanceof uu?BU(t,e):t instanceof cu?zU(t,e):n}function jU(t,e){return t instanceof pd?(function(r){return _b(r)||(function(s){return!!s&&"doubleValue"in s})(r)})(e)?e:{integerValue:0}:null}class hd extends fw{}class uu extends fw{constructor(e){super(),this.elements=e}}function BU(t,e){const n=WU(e);for(const r of t.elements)n.some((i=>Ys(i,r)))||n.push(r);return{arrayValue:{values:n}}}class cu extends fw{constructor(e){super(),this.elements=e}}function zU(t,e){let n=WU(e);for(const r of t.elements)n=n.filter((i=>!Ys(i,r)));return{arrayValue:{values:n}}}class pd extends fw{constructor(e,n){super(),this.serializer=e,this.Ie=n}}function qN(t){return un(t.integerValue||t.doubleValue)}function WU(t){return Op(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/**
1466 * @license
1467 * Copyright 2017 Google LLC
1468 *
1469 * Licensed under the Apache License, Version 2.0 (the "License");
1470 * you may not use this file except in compliance with the License.
1471 * You may obtain a copy of the License at
1472 *
1473 *   http://www.apache.org/licenses/LICENSE-2.0
1474 *
1475 * Unless required by applicable law or agreed to in writing, softw
1475are
1476 * distributed under the License is distributed on an "AS IS" BASIS,
1477 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1478 * See the License for the specific language governing permissions and
1479 * limitations under the License.
1480 */class Em{constructor(e,n){this.field=e,this.transform=n}}function $le(t,e){return t.field.isEqual(e.field)&&(function(r,i){return r instanceof uu&&i instanceof uu||r instanceof cu&&i instanceof cu?cd(r.elements,i.elements,Ys):r instanceof pd&&i instanceof pd?Ys(r.Ie,i.Ie):r instanceof hd&&i instanceof hd})(t.transform,e.transform)}class Ule{constructor(e,n){this.version=e,this.transformResults=n}}class Ht{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new Ht}static exists(e){return new Ht(void 0,e)}static updateTime(e){return new Ht(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 Gy(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class hw{}function qU(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new Wd(t.key,Ht.none()):new zd(t.key,t.data,Ht.none());{const n=t.data,r=ur.empty();let i=new Rt(qt.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new Vo(t.key,r,new oi(i.toArray()),Ht.none())}}function jle(t,e,n){t instanceof zd?(function(i,s,o){const l=i.value.clone(),c=GN(i.fieldTransforms,s,o.transformResults);l.setAll(c),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()})(t,e,n):t instanceof Vo?(function(i,s,o){if(!Gy(i.precondition,s))return void s.convertToUnknownDocument(o.version);const l=GN(i.fieldTransforms,s,o.transformResults),c=s.data;c.setAll(HU(i)),c.setAll(l),s.convertToFoundDocument(o.version,c).setHasCommittedMutations()})(t,e,n):(function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()})(0,e,n)}function Jh(t,e,n,r){return t instanceof zd?(function(s,o,l,c){if(!Gy(s.precondition,o))return l;const d=s.value.clone(),h=KN(s.fieldTransforms,c,o);return d.setAll(h),o.convertToFoundDocument(o.version,d).setHasLocalMutations(),null})(t,e,n,r):t instanceof Vo?(function(s,o,l,c){if(!Gy(s.precondition,o))return l;const d=KN(s.fieldTransforms,c,o),h=o.data;return h.setAll(HU(s)),h.setAll(d),o.convertToFoundDocument(o.version,h).setHasLocalMutations(),l===null?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map((m=>m.field)))})(t,e,n,r):(function(s,o,l){return Gy(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):l})(t,e,n)}function Ble(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),s=jU(r.transform,i||null);s!=null&&(n===null&&(n=ur.empty()),n.set(r.field,s))}return n||null}function HN(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)&&cd(r,i,((s,o)=>$le(s,o)))})(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class zd extends hw{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 Vo extends hw{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function HU(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 GN(t,e,n){const r=new Map;Pe(t.length===n.length);for(let i=0;i<n.length;i++){const s=t[i],o=s.transform,l=e.data.field(s.field);r.set(s.field,Fle(o,l,n[i]))}return r}function KN(t,e,n){const r=new Map;for(const i of t){const s=i.transform,o=n.data.field(i.field);r.set(i.field,Vle(s,o,e))}return r}class Wd extends hw{constructor(e,n){super(),this.key=e,this.prec
1480ondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class $R extends hw{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
1481 * @license
1482 * Copyright 2017 Google LLC
1483 *
1484 * Licensed under the Apache License, Version 2.0 (the "License");
1485 * you may not use this file except in compliance with the License.
1486 * You may obtain a copy of the License at
1487 *
1488 *   http://www.apache.org/licenses/LICENSE-2.0
1489 *
1490 * Unless required by applicable law or agreed to in writing, software
1491 * distributed under the License is distributed on an "AS IS" BASIS,
1492 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1493 * See the License for the specific language governing permissions and
1494 * limitations under the License.
1495 */class UR{constructor(e,n,r,i){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&jle(s,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=Jh(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=Jh(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=VU();return this.mutations.forEach((i=>{const s=e.get(i.key),o=s.overlayedDocument;let l=this.applyToLocalView(o,s.mutatedFields);l=n.has(i.key)?null:l;const c=qU(o,l);c!==null&&r.set(i.key,c),o.isValidDocument()||o.convertToNoDocument(Oe.min())})),r}keys(){return this.mutations.reduce(((e,n)=>e.add(n.key)),Ge())}isEqual(e){return this.batchId===e.batchId&&cd(this.mutations,e.mutations,((n,r)=>HN(n,r)))&&cd(this.baseMutations,e.baseMutations,((n,r)=>HN(n,r)))}}class jR{constructor(e,n,r,i){this.batch=e,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(e,n,r){Pe(e.mutations.length===r.length);let i=(function(){return Dle})();const s=e.mutations;for(let o=0;o<s.length;o++)i=i.insert(s[o].key,r[o].version);return new jR(e,n,r,i)}}/**
1496 * @license
1497 * Copyright 2022 Google LLC
1498 *
1499 * Licensed under the Apache License, Version 2.0 (the "License");
1500 * you may not use this file except in compliance with the License.
1501 * You may obtain a copy of the License at
1502 *
1503 *   http://www.apache.org/licenses/LICENSE-2.0
1504 *
1505 * Unless required by applicable law or agreed to in writing, software
1506 * distributed under the License is distributed on an "AS IS" BASIS,
1507 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1508 * See the License for the specific language governing permissions and
1509 * limitations under the License.
1510 */class BR{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{
1511      largestBatchId: ${this.largestBatchId},
1512      mutation: ${this.mutation.toString()}
1513    }`}}/**
1514 * @license
1515 * Copyright 2017 Google LLC
1516 *
1517 * Licensed under the Apache License, Version 2.0 (the "License");
1518 * you may not use this file except in compliance with the License.
1519 * You may obtain a copy of the License at
1520 *
1521 *   http://www.apache.org/licenses/LICENSE-2.0
1522 *
1523 * Unless required by applicable law or agreed to in writing, software
1524 * distributed under the License is distributed on an "AS IS" BASIS,
1525 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1526 * See the License for the specific language governing permissions and
1527 * limitations under the License.
1528 */class zle{constructor(e,n){this.count=e,this.unchangedNames=n}}/**
1529 * @license
1530 * Copyright 2017 Google LLC
1531 *
1532 * Licensed under the Apache License, Version 2.0 (the "License");
1533 * you may not use this file except in compliance with the License.
1534 * You may obtain a copy of the License at
1535 *
1536 *   http://www.apache.org/licenses/LICENSE-2.0
1537 *
1538 * Unless required by applicable law or agreed to in writing, software
1539 * distributed under the License is distributed on an "AS IS" BASIS,
1540 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1541 * See the License for the specific language governing permissions and
1542 * limitations under the License.
1543 */var Rn,lt;function GU(t){switch(t){default:return Te();case H.CANCELLED:case H.UNKNOWN:case H.DEADLINE_EXCEEDED:case H.RESOURCE_EXHAUSTED:case H.INTERNAL:case H.UNAVAILABLE:case H.UNAUTHENTICATED:return!1;case H.INVALID_ARGUMENT:case H.NOT_FOUND:case H.ALREADY_EXISTS:case H.PERMISSION_DENIED:case H.FAILED_PRECONDITION:case H.ABORTED:case H.OUT_OF_RANGE:case H.UNIMPLEMENT
1543ED:case H.DATA_LOSS:return!0}}function KU(t){if(t===void 0)return vn("GRPC error has no .code"),H.UNKNOWN;switch(t){case Rn.OK:return H.OK;case Rn.CANCELLED:return H.CANCELLED;case Rn.UNKNOWN:return H.UNKNOWN;case Rn.DEADLINE_EXCEEDED:return H.DEADLINE_EXCEEDED;case Rn.RESOURCE_EXHAUSTED:return H.RESOURCE_EXHAUSTED;case Rn.INTERNAL:return H.INTERNAL;case Rn.UNAVAILABLE:return H.UNAVAILABLE;case Rn.UNAUTHENTICATED:return H.UNAUTHENTICATED;case Rn.INVALID_ARGUMENT:return H.INVALID_ARGUMENT;case Rn.NOT_FOUND:return H.NOT_FOUND;case Rn.ALREADY_EXISTS:return H.ALREADY_EXISTS;case Rn.PERMISSION_DENIED:return H.PERMISSION_DENIED;case Rn.FAILED_PRECONDITION:return H.FAILED_PRECONDITION;case Rn.ABORTED:return H.ABORTED;case Rn.OUT_OF_RANGE:return H.OUT_OF_RANGE;case Rn.UNIMPLEMENTED:return H.UNIMPLEMENTED;case Rn.DATA_LOSS:return H.DATA_LOSS;default:return Te()}}(lt=Rn||(Rn={}))[lt.OK=0]="OK",lt[lt.CANCELLED=1]="CANCELLED",lt[lt.UNKNOWN=2]="UNKNOWN",lt[lt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",lt[lt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",lt[lt.NOT_FOUND=5]="NOT_FOUND",lt[lt.ALREADY_EXISTS=6]="ALREADY_EXISTS",lt[lt.PERMISSION_DENIED=7]="PERMISSION_DENIED",lt[lt.UNAUTHENTICATED=16]="UNAUTHENTICATED",lt[lt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",lt[lt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",lt[lt.ABORTED=10]="ABORTED",lt[lt.OUT_OF_RANGE=11]="OUT_OF_RANGE",lt[lt.UNIMPLEMENTED=12]="UNIMPLEMENTED",lt[lt.INTERNAL=13]="INTERNAL",lt[lt.UNAVAILABLE=14]="UNAVAILABLE",lt[lt.DATA_LOSS=15]="DATA_LOSS";/**
1544 * @license
1545 * Copyright 2023 Google LLC
1546 *
1547 * Licensed under the Apache License, Version 2.0 (the "License");
1548 * you may not use this file except in compliance with the License.
1549 * You may obtain a copy of the License at
1550 *
1551 *   http://www.apache.org/licenses/LICENSE-2.0
1552 *
1553 * Unless required by applicable law or agreed to in writing, software
1554 * distributed under the License is distributed on an "AS IS" BASIS,
1555 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1556 * See the License for the specific language governing permissions and
1557 * limitations under the License.
1558 */function QU(){return new TextEncoder}/**
1559 * @license
1560 * Copyright 2022 Google LLC
1561 *
1562 * Licensed under the Apache License, Version 2.0 (the "License");
1563 * you may not use this file except in compliance with the License.
1564 * You may obtain a copy of the License at
1565 *
1566 *   http://www.apache.org/licenses/LICENSE-2.0
1567 *
1568 * Unless required by applicable law or agreed to in writing, software
1569 * distributed under the License is distributed on an "AS IS" BASIS,
1570 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1571 * See the License for the specific language governing permissions and
1572 * limitations under the License.
1573 */const Wle=new zc([4294967295,4294967295],0);function QN(t){const e=QU().encode(t),n=new Fae;return n.update(e),new Uint8Array(n.digest())}function YN(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new zc([n,r],0),new zc([i,s],0)]}class zR{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Nh(`Invalid padding: ${n}`);if(r<0)throw new Nh(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new Nh(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new Nh(`Invalid padding when bitmap length is 0: ${n}`);this.Te=8*e.length-n,this.Ee=zc.fromNumber(this.Te)}de(e,n,r){let i=e.add(n.multiply(zc.fromNumber(r)));return i.compare(Wle)===1&&(i=new zc([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Ee).toNumber()}Ae(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Te===0)return!1;const n=QN(e),[r,i]=YN(n);for(let s=0;s<this.hashCount;s++){const o=this.de(r,i,s);if(!this.Ae(o))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new zR(s,i,n);return r.forEach((l=>o.insert(l))),o}insert(e){if(this.Te===0)return;const n=QN(e),[r,i]=YN(n);for(let s=0;s<this.hashCount;s++){const o=this.de(r,i,s);this.Re(o)}}Re(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}
vendor: 4,715 bytes, lines 1573-1603
1573class Nh extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
1574 * @license
1575 * Copyright 2017 Google LLC
1576 *
1577 * Licensed under the Apache License, Version 2.0 (the "License");
1578 * you may not use this file except in compliance with the License.
1579 * You may obtain a copy of the License at
1580 *
1581 *   http://www.apache.org/licenses/LICENSE-2.0
1582 *
1583 * Unless required by applicable law or agreed to in writing, software
1584 * distributed under the License is distributed on an "AS IS" BASIS,
1585 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1586 * See the License for the specific language governing permissions and
1587 * limitations under the License.
1588 */class Sm{constructor(e,n,r,i,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,Tm.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new Sm(Oe.min(),i,new Ot(He),ai(),Ge())}}class Tm{constructor(e,n,r,i,s){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new Tm(r,n,Ge(),Ge(),Ge())}}/**
1589 * @license
1590 * Copyright 2017 Google LLC
1591 *
1592 * Licensed under the Apache License, Version 2.0 (the "License");
1593 * you may not use this file except in compliance with the License.
1594 * You may obtain a copy of the License at
1595 *
1596 *   http://www.apache.org/licenses/LICENSE-2.0
1597 *
1598 * Unless required by applicable law or agreed to in writing, software
1599 * distributed under the License is distributed on an "AS IS" BASIS,
1600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1601 * See the License for the specific language governing permissions and
1602 * limitations under the License.
1603 */class Ky{constructor(e,n,r,i){this.Ve=e,this.removedTargetIds=n,this.key=r,this.me=i}}class YU{constructor(e,n){this.targetId=e,this.fe=n}}class JU{constructor(e,n,r=Un.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class JN{constructor(){this.ge=0,this.pe=ZN(),this.ye=Un.EMPTY_BYTE_STRING,this.we=!1,this.Se=!0}get current(){return this.we}get resumeToken(){return this.ye}get be(){return this.ge!==0}get De(){return this.Se}Ce(e){e.approximateByteSize()>0&&(this.Se=!0,this.ye=e)}ve(){let e=Ge(),n=Ge(),r=Ge();return this.pe.forEach(((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:Te()}})),new Tm(this.ye,this.we,e,n,r)}Fe(){this.Se=!1,this.pe=ZN()}Me(e,n){this.Se=!0,this.pe=this.pe.insert(e,n)}xe(e){this.Se=!0,this.pe=this.pe.remove(e)}Oe(){this.ge+=1}Ne(){this.ge-=1,Pe(this.ge>=0)}Le(){this.Se=!0,this.we=!0}}class qle{constructor(e){this.Be=e,this.ke=new Map,this.qe=ai(),this.Qe=XN(),this.Ke=new Ot(He)}$e(e){for(const n of e.Ve)e.me&&e.me.isFoundDocument()?this.Ue(n,e.me):this.We(n,e.key,e.me);for(const n of e.removedTargetIds)this.We(n,e.key,e.me)}Ge(e){this.forEachTarget(e,(n=>{const r=this.ze(n);switch(e.state){case 0:this.je(n)&&r.Ce(e.resumeToken);break;case 1:r.Ne(),r.be||r.Fe(),r.Ce(e.resumeToken);break;case 2:r.Ne(),r.be||this.removeTarget(n);break;case 3:this.je(n)&&(r.Le(),r.Ce(e.resumeToken));break;case 4:this.je(n)&&(this.He(n),r.Ce(e.resumeToken));break;default:Te()}}))}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.ke.forEach(((r,i)=>{this.je(i)&&n(i)}))}Je(e){const n=e.targetId,r=e.fe.count,i=this.Ye(n);if(i){const s=i.target;if(Ov(s))if(r===0){const o=new he(s.path);this.We(n,o,$t.newNoDocument(o,Oe.min()))}else Pe(r===1);else{const o=this.Ze(n);if(o!==r){const l=this.Xe(e),c=l?this.et(l,e,o):1;if(c!==0){this.He(n);const d=c===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(n,d)}}}}}Xe(e){const n=e.fe.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,l;try{o=Ba(r).toUint8Array()}catch(c){if(c instanceof EU)return ps("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw c}try{l=new zR(o,i,s)}catch(c){return ps(c instanceof Nh?"BloomFilter error: ":"Applying bloom filter failed: ",c),null}return l.Te===0?null:l}et(e,n,r){return n.fe.count===r-this.rt(e,n.targetId)?0:2}rt(e,n){const r=this.Be.getRemoteKeysForTarget(n);let i=0;return r.forEach((s=>{const o=this.Be.nt(),l=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(l)||(this.We(n,s,null),i++)})),i}it(e){const n=new Map;this.ke.forEach(((s,o)=>{const l=this.Ye(o);
1603if(l){if(s.current&&Ov(l.target)){const c=new he(l.target.path);this.qe.get(c)!==null||this.st(o,c)||this.We(o,c,$t.newNoDocument(c,e))}s.De&&(n.set(o,s.ve()),s.Fe())}}));let r=Ge();this.Qe.forEach(((s,o)=>{let l=!0;o.forEachWhile((c=>{const d=this.Ye(c);return!d||d.purpose==="TargetPurposeLimboResolution"||(l=!1,!1)})),l&&(r=r.add(s))})),this.qe.forEach(((s,o)=>o.setReadTime(e)));const i=new Sm(e,n,this.Ke,this.qe,r);return this.qe=ai(),this.Qe=XN(),this.Ke=new Ot(He),i}Ue(e,n){if(!this.je(e))return;const r=this.st(e,n.key)?2:0;this.ze(e).Me(n.key,r),this.qe=this.qe.insert(n.key,n),this.Qe=this.Qe.insert(n.key,this.ot(n.key).add(e))}We(e,n,r){if(!this.je(e))return;const i=this.ze(e);this.st(e,n)?i.Me(n,1):i.xe(n),this.Qe=this.Qe.insert(n,this.ot(n).delete(e)),r&&(this.qe=this.qe.insert(n,r))}removeTarget(e){this.ke.delete(e)}Ze(e){const n=this.ze(e).ve();return this.Be.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Oe(e){this.ze(e).Oe()}ze(e){let n=this.ke.get(e);return n||(n=new JN,this.ke.set(e,n)),n}ot(e){let n=this.Qe.get(e);return n||(n=new Rt(He),this.Qe=this.Qe.insert(e,n)),n}je(e){const n=this.Ye(e)!==null;return n||se("WatchChangeAggregator","Detected inactive target",e),n}Ye(e){const n=this.ke.get(e);return n&&n.be?null:this.Be._t(e)}He(e){this.ke.set(e,new JN),this.Be.getRemoteKeysForTarget(e).forEach((n=>{this.We(e,n,null)}))}st(e,n){return this.Be.getRemoteKeysForTarget(e).has(n)}}function XN(){return new Ot(he.comparator)}function ZN(){return new Ot(he.comparator)}const Hle={asc:"ASCENDING",desc:"DESCENDING"},Gle={"<":"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"},Kle={and:"AND",or:"OR"};class Qle{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function bb(t,e){return t.useProto3Json||ym(e)?e:{value:e}}function md(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 XU(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function Yle(t,e){return md(t,e.toTimestamp())}function _n(t){return Pe(!!t),Oe.fromTimestamp((function(n){const r=ja(n);return new Qt(r.seconds,r.nanos)})(t))}function WR(t,e){return Ib(t,e).canonicalString()}function Ib(t,e){const n=(function(i){return new tt(["projects",i.projectId,"databases",i.database])})(t).child("documents");return e===void 0?n:n.child(e)}function ZU(t){const e=tt.fromString(t);return Pe(uj(e)),e}function Dp(t,e){return WR(t.databaseId,e.path)}function Ws(t,e){const n=ZU(e);if(n.get(1)!==t.databaseId.projectId)throw new re(H.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 re(H.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new he(nj(n))}function ej(t,e){return WR(t.databaseId,e)}function tj(t){const e=ZU(t);return e.length===4?tt.emptyPath():nj(e)}function Rb(t){return new tt(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function nj(t){return Pe(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function eD(t,e,n){return{name:Dp(t,e),fields:n.value.mapValue.fields}}function rj(t,e,n){const r=Ws(t,e.name),i=_n(e.updateTime),s=e.createTime?_n(e.createTime):Oe.min(),o=new ur({mapValue:{fields:e.fields}}),l=$t.newFoundDocument(r,i,s,o);return n&&l.setHasCommittedMutations(),n?l.setHasCommittedMutations():l}function Jle(t,e){return"found"in e?(function(r,i){Pe(!!i.found),i.found.name,i.found.updateTime;const s=Ws(r,i.found.name),o=_n(i.found.updateTime),l=i.found.createTime?_n(i.found.createTime):Oe.min(),c=new ur({mapValue:{fields:i.found.fields}});return $t.newFoundDocument(s,o,l,c)})(t,e):"missing"in e?(function(r,i){Pe(!!i.missing),Pe(!!i.readTime);const s=Ws(r,i.missing),o=_n(i.readTime);return $t.newNoDocument(s,o)})(t,e):Te()}function Xle(t,e){let n;if("targetChange"in e){e.targetChange;const r=(function(d){return d==="NO_CHANGE"?0:d==="ADD"?1:d==="REMOVE"?2:d==="CURRENT"?3:d==="RESET"?4:Te()})(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=(function(d,h){return d.useProto3Json?(Pe(h===void 0||typeof h=="string"),Un.fromBase64String(h||"")):(Pe(h===void 0||h instanceof Uint8Array),Un.fromUint8Array(h||new Uint8Array))})(t,e.targetChange.resumeToken),o=e.targetChange.cause,l=o&&(function(d){const h=d.code===void 0?H.UNKNOWN:KU(d.code);return new re(h,d.message||"")})(o);n=new JU(r,i,s,l||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=Ws(t,r.document.name),s=_n(r.document.updateTime),o=r.document.createTime?_n(r.document.createTime):Oe.min(),l=new ur({mapValue:{fields:r.document.fields}}),c=$t.newFoundDocument(i,s,o,l),d=r.targetIds||[],h=r.removedTargetIds||[];n=new Ky(d,h,c.key,c)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=Ws(t,r.document),s=r.readTime?_n(r.readTime):Oe.min(),o=$t.newNoDocument(i,s),l=r.removedTargetIds||[];n=new Ky([],l,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=Ws(t,r.document),s=r.removedTargetIds||[];n=new Ky([],s,i,null)}else{if(!("filter"in e))return Te();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new zle(i,s),l=r.targetId;n=new YU(l,o)}}return n}function Mp(t,e){let n;if(e instanceof zd)n={update:eD(t,e.key,e.value)};
1603else if(e instanceof Wd)n={delete:Dp(t,e.key)};else if(e instanceof Vo)n={update:eD(t,e.key,e.data),updateMask:iue(e.fieldMask)};else{if(!(e instanceof $R))return Te();n={verify:Dp(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((r=>(function(s,o){const l=o.transform;if(l instanceof hd)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof uu)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof cu)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof pd)return{fieldPath:o.field.canonicalString(),increment:l.Ie};throw Te()})(0,r)))),e.precondition.isNone||(n.currentDocument=(function(i,s){return s.updateTime!==void 0?{updateTime:Yle(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:Te()})(t,e.precondition)),n}function xb(t,e){const n=e.currentDocument?(function(s){return s.updateTime!==void 0?Ht.updateTime(_n(s.updateTime)):s.exists!==void 0?Ht.exists(s.exists):Ht.none()})(e.currentDocument):Ht.none(),r=e.updateTransforms?e.updateTransforms.map((i=>(function(o,l){let c=null;if("setToServerValue"in l)Pe(l.setToServerValue==="REQUEST_TIME"),c=new hd;else if("appendMissingElements"in l){const h=l.appendMissingElements.values||[];c=new uu(h)}else if("removeAllFromArray"in l){const h=l.removeAllFromArray.values||[];c=new cu(h)}else"increment"in l?c=new pd(o,l.increment):Te();const d=qt.fromServerFormat(l.fieldPath);return new Em(d,c)})(t,i))):[];if(e.update){e.update.name;const i=Ws(t,e.update.name),s=new ur({mapValue:{fields:e.update.fields}});if(e.updateMask){const o=(function(c){const d=c.fieldPaths||[];return new oi(d.map((h=>qt.fromServerFormat(h))))})(e.updateMask);return new Vo(i,s,o,n,r)}return new zd(i,s,n,r)}if(e.delete){const i=Ws(t,e.delete);return new Wd(i,n)}if(e.verify){const i=Ws(t,e.verify);return new $R(i,n)}return Te()}function Zle(t,e){return t&&t.length>0?(Pe(e!==void 0),t.map((n=>(function(i,s){let o=i.updateTime?_n(i.updateTime):_n(s);return o.isEqual(Oe.min())&&(o=_n(s)),new Ule(o,i.transformResults||[])})(n,e)))):[]}function ij(t,e){return{documents:[ej(t,e.path)]}}function sj(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=ej(t,i);const s=(function(d){if(d.length!==0)return lj(bt.create(d,"and"))})(e.filters);s&&(n.structuredQuery.where=s);const o=(function(d){if(d.length!==0)return d.map((h=>(function(g){return{field:kc(g.field),direction:tue(g.dir)}})(h)))})(e.orderBy);o&&(n.structuredQuery.orderBy=o);const l=bb(t,e.limit);return l!==null&&(n.structuredQuery.limit=l),e.startAt&&(n.structuredQuery.startAt=(function(d){return{before:d.inclusive,values:d.position}})(e.startAt)),e.endAt&&(n.structuredQuery.endAt=(function(d){return{before:!d.inclusive,values:d.position}})(e.endAt)),{ut:n,parent:i}}function oj(t){let e=tj(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Pe(r===1);const h=n.from[0];h.allDescendants?i=h.collectionId:e=e.child(h.collectionId)}let s=[];n.where&&(s=(function(m){const g=aj(m);return g instanceof bt&&LR(g)?g.getFilters():[g]})(n.where));let o=[];n.orderBy&&(o=(function(m){return m.map((g=>(function(E){return new Np(Cc(E.field),(function(w){switch(w){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}})(E.direction))})(g)))})(n.orderBy));let l=null;n.limit&&(l=(function(m){let g;return g=typeof m=="object"?m.value:m,ym(g)?null:g})(n.limit));let c=null;n.startAt&&(c=(function(m){const g=!!m.before,v=m.values||[];return new qa(v,g)})(n.startAt));let d=null;return n.endAt&&(d=(function(m){const g=!m.before,v=m.values||[];return new qa(v,g)})(n.endAt)),PU(e,i,o,s,l,"F",c,d)}function eue(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 Te()}})(e.purpose);return n==null?null:{"goog-listen-tags":n}}function aj(t){return t.unaryFilter!==void 0?(function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=Cc(n.unaryFilter.field);return nt.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=Cc(n.unaryFilter.field);return nt.create(i,"==",{nullValue:"NULL_VALUE"});
1603case"IS_NOT_NAN":const s=Cc(n.unaryFilter.field);return nt.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Cc(n.unaryFilter.field);return nt.create(o,"!=",{nullValue:"NULL_VALUE"});default:return Te()}})(t):t.fieldFilter!==void 0?(function(n){return nt.create(Cc(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 Te()}})(n.fieldFilter.op),n.fieldFilter.value)})(t):t.compositeFilter!==void 0?(function(n){return bt.create(n.compositeFilter.filters.map((r=>aj(r))),(function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return Te()}})(n.compositeFilter.op))})(t):Te()}function tue(t){return Hle[t]}function nue(t){return Gle[t]}function rue(t){return Kle[t]}function kc(t){return{fieldPath:t.canonicalString()}}function Cc(t){return qt.fromServerFormat(t.fieldPath)}function lj(t){return t instanceof nt?(function(n){if(n.op==="=="){if(VN(n.value))return{unaryFilter:{field:kc(n.field),op:"IS_NAN"}};if(LN(n.value))return{unaryFilter:{field:kc(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(VN(n.value))return{unaryFilter:{field:kc(n.field),op:"IS_NOT_NAN"}};if(LN(n.value))return{unaryFilter:{field:kc(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:kc(n.field),op:nue(n.op),value:n.value}}})(t):t instanceof bt?(function(n){const r=n.getFilters().map((i=>lj(i)));return r.length===1?r[0]:{compositeFilter:{op:rue(n.op),filters:r}}})(t):Te()}function iue(t){const e=[];return t.fields.forEach((n=>e.push(n.canonicalString()))),{fieldPaths:e}}function uj(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/**
1604 * @license
1605 * Copyright 2017 Google LLC
1606 *
1607 * Licensed under the Apache License, Version 2.0 (the "License");
1608 * you may not use this file except in compliance with the License.
1609 * You may obtain a copy of the License at
1610 *
1611 *   http://www.apache.org/licenses/LICENSE-2.0
1612 *
1613 * Unless required by applicable law or agreed to in writing, software
1614 * distributed under the License is distributed on an "AS IS" BASIS,
1615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1616 * See the License for the specific language governing permissions and
1617 * limitations under the License.
1618 */class _o{constructor(e,n,r,i,s=Oe.min(),o=Oe.min(),l=Un.EMPTY_BYTE_STRING,c=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=l,this.expectedCount=c}withSequenceNumber(e){return new _o(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new _o(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new _o(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new _o(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
1619 * @license
1620 * Copyright 2017 Google LLC
1621 *
1622 * Licensed under the Apache License, Version 2.0 (the "License");
1623 * you may not use this file except in compliance with the License.
1624 * You may obtain a copy of the License at
1625 *
1626 *   http://www.apache.org/licenses/LICENSE-2.0
1627 *
1628 * Unless required by applicable law or agreed to in writing, software
1629 * distributed under the License is distributed on an "AS IS" BASIS,
1630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1631 * See the License for the specific language governing permissions and
1632 * limitations under the License.
1633 */class cj{constructor(e){this.ct=e}}function sue(t,e){let n;if(e.document)n=rj(t.ct,e.document,!!e.hasCommittedMutations);else if(e.noDocument){const r=he.fromSegments(e.noDocument.path),i=fu(e.noDocument.readTime);n=$t.newNoDocument(r,i),e.hasCommittedMutations&&n.setHasCommittedMutations()}else{if(!e.unknownDocument)return Te();{const r=he.fromSegments(e.unknownDocument.path),i=fu(e.unknownDocument.version);n=$t.newUnknownDocument(r,i)}}return e.readTime&&n.setReadTime((function(i){const s=new Qt(i[0],i[1]);return Oe.fromTimestamp(s)})(e.readTime)),n}function tD(t,e){const n=e.key,r={prefixPath:n.getCollectionPath().popLast().toArray(),collectionGroup:n.collectionGroup,documentId:n.path.lastSegment(),readTime:Mv(e.readTime),hasCommittedMutations:e.hasCommittedMutations};if(e.isFoundDocument())r.document=(function(s,o){return{name:Dp(s,o.key),fields:o.data.value.mapValue.fields,updateTime:md(s,o.version.toTimestamp()),createTime:md(s,o.createTime.toTimestamp())}})(t.ct,e);else if(e.isNoDocument())r.noDocument={path:n.path.toArray(),readTime:du(e.version)};else{if(!e.isUnknownDocument())return Te();r.unknownDocument={path:n.path.toArray(),version:du(e.version)}}return r}function Mv(t){const e=t.toTimestamp();return[e.seconds,e.nanoseconds]}function du(t){const e=t.toTimestamp();return{seconds:e.seconds,nanoseconds:e.nanoseconds}}function fu(t){const e=new Qt(t.seconds,t.nanoseconds);return Oe.fromTimestamp(e)}function Dl(t,e){const n=(e.baseMutations||[]).map((s=>xb(t.ct,s)));for(let s=0;s<e.mutations.length-1;++s){const o=e.mutations[s];if(s+1<e.mutations.length&&e.mutations[s+1].transform!==void 0){const l=e.mutations[s+1];o.updateTransforms=l.transform.fieldTransforms,e.mutations.splice(s+1,1),++s}}const r=e.mutations.map((s=>xb(t.ct,s))),i=Qt.fromMillis(e.localWriteTimeMs);return new UR(e.batchId,i,n,r)}function Dh(t){const e=fu(t.readTime),n=t.lastLimboFreeSnapshotVersion!==void 0?fu(t.lastLimboFreeSnapshotVersion):Oe.min();let r;return r=(function(s){return s.documents!==void 0})(t.query)?(function(s){return Pe(s.documents.length===1),Gr(Bd(tj(s.documents[0])))})(t.query):(function(s){return Gr(oj(s))})(t.query),new _o(r,t.targetId,"TargetPurposeListen",t.lastListenSequenceNumber,e,n,Un.fromBase64String(t.resumeToken))}function dj(t,e){const n=du(e.snapshotVersion),r=du(e.lastLimboFreeSnapshotVersion);let i;i=Ov(e.target)?ij(t.ct,e.target):sj(t.ct,e.target).ut;const s=e.resumeToken.toBase64();return{targetId:e.targetId,canonicalId:lu(e.target),readTime:n,resumeToken:s,lastListenSequenceNumber:e.sequenceNumber,lastLimboFreeSnapshotVersion:r,query:i}}function qR(t){const e=oj({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?Dv(e,e.limit,"L"):e}function KS(t,e){return new BR(e.largestBatchId,xb(t.ct,e.overlayMutation))}function nD(t,e){const n=e.path.lastSegment();return[t,Hr(e.path.popLast()),n]}function rD(t,e,n,r){return{indexId:t,uid:e,sequenceNumber:n,readTime:du(r.readTime),documentKey:Hr(r.documentKey.path),largestBatchId:r.largestBatchId}}/**
1634 * @license
1635 * Copyright 2020 Google LLC
1636 *
1637 * Licensed under the Apache License, Version 2.0 (the "License");
1638 * you may not use this file except in compliance with the License.
1639 * You may obtain a copy of the License at
1640 *
1641 *   http://www.apache.org/licenses/LICENSE-2.0
1642 *
1643 * Unless required by applicable law or agreed to in writing, software
1644 * distributed under the License is distributed on an "AS IS" BASIS,
1645 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1646 * See the License for the specific language governing permissions and
1647 * limitations under the License.
1648 */class oue{getBundleMetadata(e,n){return iD(e).get(n).next((r=>{if(r)return(function(s){return{id:s.bundleId,createTime:fu(s.createTime),version:s.version}})(r)}))}saveBundleMetadata(e,n){return iD(e).put((function(i){return{bundleId:i.id,createTime:du(_n(i.createTime)),version:i.version}})(n))}getNamedQuery(e,n){return sD(e).get(n).next((r=>{if(r)return(function(s){return{name:s.name,query:qR(s.bundledQuery),readTime:fu(s.readTime)}})(r)}))}saveNamedQuery(e,n){return sD(e).put((function(i){return{name:i.name,readTime:du(_n(i.readTime)),bundledQuery:i.bundledQuery}})(n))}}function iD(t){return er(t,"bundles")}function sD(t){return er(t,"namedQueries")}/**
1649 * @license
1650 * Copyright 2022 Google LLC
1651 *
1652 * Licensed under the Apache License, Version 2.0 (the "License");
1653 * you may not use this file except in compliance with the License.
1654 * You may obtain a copy of the License at
1655 *
1656 *   http://www.apache.org/licenses/LICENSE-2.0
1657 *
1658 * Unless required by applicable law or agreed to in writing, software
1659 * distributed under the License is distributed on an "AS IS" BASIS,
1660 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1661 * See the License for the specific language governing permissions and
1662 * limitations under the License.
1663 */class pw{constructor(e,n){this.serializer=e,this.userId=n}static lt(e,n){const r=n.uid||"";return new pw(e,r)}getOverlay(e,n){return ih(e).get(nD(this.userId,n)).next((r=>r?KS(this.serializer,r):null))}getOverlays(e,n){const r=Us();return W.forEach(n,(i=>this.getOverlay(e,i).next((s=>{s!==null&&r.set(i,s)})))).next((()=>r))}saveOverlays(e,n,r){const i=[];return r.forEach(((s,o)=>{const l=new BR(n,o);i.push(this.ht(e,l))})),W.waitFor(i)}removeOverlaysForBatchId(e,n,r){const i=new Set;n.forEach((o=>i.add(Hr(o.getCollectionPath()))));const s=[];return i.forEach((o=>{const l=IDBKeyRange.bound([this.userId,o,r],[this.userId,o,r+1],!1,!0);s.push(ih(e).H("collectionPathOverlayIndex",l))})),W.waitFor(s)}getOverlaysForCollection(e,n,r){const i=Us(),s=Hr(n),o=IDBKeyRange.bound([this.userId,s,r],[this.userId,s,Number.POSITIVE_INFINITY],!0);return ih(e).W("collectionPathOverlayIndex",o).next((l=>{for(const c of l){const d=KS(this.serializer,c);i.set(d.getKey(),d)}return i}))}getOverlaysForCollectionGroup(e,n,r,i){const s=Us();let o;const l=IDBKeyRange.bound([this.userId,n,r],[this.userId,n,Number.POSITIVE_INFINITY],!0);return ih(e).Y({index:"collectionGroupOverlayIndex",range:l},((c,d,h)=>{const m=KS(this.serializer,d);s.size()<i||m.largestBatchId===o?(s.set(m.getKey(),m),o=m.largestBatchId):h.done()})).next((()=>s))}ht(e,n){return ih(e).put((function(i,s,o){const[l,c,d]=nD(s,o.mutation.key);return{userId:s,collectionPath:c,documentId:d,collectionGroup:o.mutation.key.getCollectionGroup(),largestBatchId:o.largestBatchId,overlayMutation:Mp(i.ct,o.mutation)}})(this.serializer,this.userId,n))}}function ih(t){return er(t,"documentOverlays")}/**
1664 * @license
1665 * Copyright 2021 Google LLC
1666 *
1667 * Licensed under the Apache License, Version 2.0 (the "License");
1668 * you may not use this file except in compliance with the License.
1669 * You may obtain a copy of the License at
1670 *
1671 *   http://www.apache.org/licenses/LICENSE-2.0
1672 *
1673 * Unless required by applicable law or agreed to in writing, software
1674 * distributed under the License is distributed on an "AS IS" BASIS,
1675 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1676 * See the License for the specific language governing permissions and
1677 * limitations under the License.
1678 */class Ml{constructor(){}Pt(e,n){this.It(e,n),n.Tt()}It(e,n){if("nullValue"in e)this.Et(n,5);else if("booleanValue"in e)this.Et(n,10),n.dt(e.booleanValue?1:0);else if("integerValue"in e)this.Et(n,15),n.dt(un(e.integerValue));else if("doubleValue"in e){const r=un(e.doubleValue);isNaN(r)?this.Et(n,13):(this.Et(n,15),Cp(r)?n.dt(0):n.dt(r))}else if("timestampValue"in e){const r=e.timestampValue;this.Et(n,20),typeof r=="string"?n.At(r):(n.At(`${r.seconds||""}`),n.dt(r.nanos||0))}else if("stringValue"in e)this.Rt(e.stringValue,n),this.Vt(n);else if("bytesValue"in e)this.Et(n,30),n.ft(Ba(e.bytesValue)),this.Vt(n);else if("referenceValue"in e)this.gt(e.referenceValue,n);else if("geoPointValue"in e){const r=e.geoPointValue;this.Et(n,45),n.dt(r.latitude||0),n.dt(r.longitude||0)}else"mapValue"in e?SU(e)?this.Et(n,Number.MAX_SAFE_INTEGER):(this.yt(e.mapValue,n),this.Vt(n)):"arrayValue"in e?(this.wt(e.arrayValue,n),this.Vt(n)):Te()}Rt(e,n){this.Et(n,25),this.St(e,n)}St(e,n){n.At(e)}yt(e,n){const r=e.fields||{};this.Et(n,55);for(const i of Object.keys(r))this.Rt(i,n),this.It(r[i],n)}wt(e,n){const r=e.values||[];this.Et(n,50);for(const i of r)this.It(i,n)}gt(e,n){this.Et(n,37),he.fromName(e).path.forEach((r=>
1678{this.Et(n,60),this.St(r,n)}))}Et(e,n){e.dt(n)}Vt(e){e.dt(2)}}Ml.bt=new Ml;function aue(t){if(t===0)return 8;let e=0;return t>>4==0&&(e+=4,t<<=4),t>>6==0&&(e+=2,t<<=2),t>>7==0&&(e+=1),e}function oD(t){const e=64-(function(r){let i=0;for(let s=0;s<8;++s){const o=aue(255&r[s]);if(i+=o,o!==8)break}return i})(t);return Math.ceil(e/8)}class lue{constructor(){this.buffer=new Uint8Array(1024),this.position=0}Dt(e){const n=e[Symbol.iterator]();let r=n.next();for(;!r.done;)this.Ct(r.value),r=n.next();this.vt()}Ft(e){const n=e[Symbol.iterator]();let r=n.next();for(;!r.done;)this.Mt(r.value),r=n.next();this.xt()}Ot(e){for(const n of e){const r=n.charCodeAt(0);if(r<128)this.Ct(r);else if(r<2048)this.Ct(960|r>>>6),this.Ct(128|63&r);else if(n<"\uD800"||"\uDBFF"<n)this.Ct(480|r>>>12),this.Ct(128|63&r>>>6),this.Ct(128|63&r);else{const i=n.codePointAt(0);this.Ct(240|i>>>18),this.Ct(128|63&i>>>12),this.Ct(128|63&i>>>6),this.Ct(128|63&i)}}this.vt()}Nt(e){for(const n of e){const r=n.charCodeAt(0);if(r<128)this.Mt(r);else if(r<2048)this.Mt(960|r>>>6),this.Mt(128|63&r);else if(n<"\uD800"||"\uDBFF"<n)this.Mt(480|r>>>12),this.Mt(128|63&r>>>6),this.Mt(128|63&r);else{const i=n.codePointAt(0);this.Mt(240|i>>>18),this.Mt(128|63&i>>>12),this.Mt(128|63&i>>>6),this.Mt(128|63&i)}}this.xt()}Lt(e){const n=this.Bt(e),r=oD(n);this.kt(1+r),this.buffer[this.position++]=255&r;for(let i=n.length-r;i<n.length;++i)this.buffer[this.position++]=255&n[i]}qt(e){const n=this.Bt(e),r=oD(n);this.kt(1+r),this.buffer[this.position++]=~(255&r);for(let i=n.length-r;i<n.length;++i)this.buffer[this.position++]=~(255&n[i])}Qt(){this.Kt(255),this.Kt(255)}$t(){this.Ut(255),this.Ut(255)}reset(){this.position=0}seed(e){this.kt(e.length),this.buffer.set(e,this.position),this.position+=e.length}Wt(){return this.buffer.slice(0,this.position)}Bt(e){const n=(function(s){const o=new DataView(new ArrayBuffer(8));return o.setFloat64(0,s,!1),new Uint8Array(o.buffer)})(e),r=(128&n[0])!=0;n[0]^=r?255:128;for(let i=1;i<n.length;++i)n[i]^=r?255:0;return n}Ct(e){const n=255&e;n===0?(this.Kt(0),this.Kt(255)):n===255?(this.Kt(255),this.Kt(0)):this.Kt(n)}Mt(e){const n=255&e;n===0?(this.Ut(0),this.Ut(255)):n===255?(this.Ut(255),this.Ut(0)):this.Ut(e)}vt(){this.Kt(0),this.Kt(1)}xt(){this.Ut(0),this.Ut(1)}Kt(e){this.kt(1),this.buffer[this.position++]=e}Ut(e){this.kt(1),this.buffer[this.position++]=~e}kt(e){const n=e+this.position;if(n<=this.buffer.length)return;let r=2*this.buffer.length;r<n&&(r=n);const i=new Uint8Array(r);i.set(this.buffer),this.buffer=i}}class uue{constructor(e){this.Gt=e}ft(e){this.Gt.Dt(e)}At(e){this.Gt.Ot(e)}dt(e){this.Gt.Lt(e)}Tt(){this.Gt.Qt()}}class cue{constructor(e){this.Gt=e}ft(e){this.Gt.Ft(e)}At(e){this.Gt.Nt(e)}dt(e){this.Gt.qt(e)}Tt(){this.Gt.$t()}}class sh{constructor(){this.Gt=new lue,this.zt=new uue(this.Gt),this.jt=new cue(this.Gt)}seed(e){this.Gt.seed(e)}Ht(e){return e===0?this.zt:this.jt}Wt(){return this.Gt.Wt()}reset(){this.Gt.reset()}}/**
1679 * @license
1680 * Copyright 2022 Google LLC
1681 *
1682 * Licensed under the Apache License, Version 2.0 (the "License");
1683 * you may not use this file except in compliance with the License.
1684 * You may obtain a copy of the License at
1685 *
1686 *   http://www.apache.org/licenses/LICENSE-2.0
1687 *
1688 * Unless required by applicable law or agreed to in writing, software
1689 * distributed under the License is distributed on an "AS IS" BASIS,
1690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1691 * See the License for the specific language governing permissions and
1692 * limitations under the License.
1693 */class Ll{constructor(e,n,r,i){this.indexId=e,this.documentKey=n,this.arrayValue=r,this.directionalValue=i}Jt(){const e=this.directionalValue.length,n=e===0||this.directionalValue[e-1]===255?e+1:e,r=new Uint8Array(n);return r.set(this.directionalValue,0),n!==e?r.set([0],this.directionalValue.length):++r[r.length-1],new Ll(this.indexId,this.documentKey,this.arrayValue,r)}}function fa(t,e){let n=t.indexId-e.indexId;return n!==0?n:(n=aD(t.arrayValue,e.arrayValue),n!==0?n:(n=aD(t.directionalValue,e.directionalValue),n!==0?n:he.comparator(t.documentKey,e.documentKey)))}function aD(t,e){for(let n=0;n<t.length&&n<e.length;++n){const r=t[n]-e[n];if(r!==0)return r}return t.length-e.length}/**
1694 * @license
1695 * Copyright 2022 Google LLC
1696 *
1697 * Licensed under the Apache License, Version 2.0 (the "License");
1698 * you may not use this file except in compliance with the License.
1699 * You may obtain a copy of the License at
1700 *
1701 *   http://www.apache.org/licenses/LICENSE-2.0
1702 *
1703 * Unless required by applicable law or agreed to in writing, software
1704 * distributed under the License is distributed on an "AS IS" BASIS,
1705 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1706 * See the License for the specific language governing permissions and
1707 * limitations under the License.
1708 */class lD{constructor(e){this.Yt=new Rt(((n,r)=>qt.comparator(n.field,r.field))),this.collectionId=e.collectionGroup!=null?e.collectionGroup:e.path.lastSegment(),this.Zt=e.orderBy,this.Xt=[];for(const n of e.filters){const r=n;r.isInequality()?this.Yt=this.Yt.add(r):this.Xt.push(r)}}get en(){return this.Yt.size>1}tn(e){if(Pe(e.collectionGroup===this.collectionId),this.en)return!1;const n=gb(e);if(n!==void 0&&!this.nn(n))return!1;const r=Pl(e);let i=new Set,s=0,o=0;for(;s<r.length&&this.nn(r[s]);++s)i=i.add(r[s].fieldPath.canonicalString());if(s===r.length)return!0;if(this.Yt.size>0){const l=this.Yt.getIterator().getNext();if(!i.has(l.field.canonicalString())){const c=r[s];if(!this.rn(l,c)||!this.sn(this.Zt[o++],c))return!1}++s}for(;s<r.length;++s){const l=r[s];if(o>=this.Zt.length||!this.sn(this.Zt[o++],l))return!1}return!0}on(){if(this.en)return null;let e=new Rt(qt.comparator);const n=[];for(const r of this.Xt)if(!r.field.isKeyField())if(r.op==="array-contains"||r.op==="array-contains-any")n.push(new zy(r.field,2));else{if(e.has(r.field))continue;e=e.add(r.field),n.push(new zy(r.field,0))}for(const r of this.Zt)r.field.isKeyField()||e.has(r.field)||(e=e.add(r.field),n.push(new zy(r.field,r.dir==="asc"?0:1)));return new Pv(Pv.UNKNOWN_ID,this.collectionId,n,kp.empty())}nn(e){for(const n of this.Xt)if(this.rn(n,e))return!0;return!1}rn(e,n){if(e===void 0||!e.field.isEqual(n.fieldPath))return!1;const r=e.op==="array-contains"||e.op==="array-contains-any";return n.kind===2===r}sn(e,n){return!!e.field.isEqual(n.fieldPath)&&(n.kind===0&&e.dir==="asc"||n.kind===1&&e.dir==="desc")}}/**
1709 * @license
1710 * Copyright 2022 Google LLC
1711 *
1712 * Licensed under the Apache License, Version 2.0 (the "License");
1713 * you may not use this file except in compliance with the License.
1714 * You may obtain a copy of the License at
1715 *
1716 *   http://www.apache.org/licenses/LICENSE-2.0
1717 *
1718 * Unless required by applicable law or agreed to in writing, software
1719 * distributed under the License is distributed on an "AS IS" BASIS,
1720 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1721 * See the License for the specific language governing permissions and
1722 * limitations under the License.
1723 */function fj(t){var e,n;if(Pe(t instanceof nt||t instanceof bt),t instanceof nt){if(t instanceof AU){const i=((n=(e=t.value.arrayValue)===null||e===void 0?void 0:e.values)===null||n===void 0?void 0:n.map((s=>nt.create(t.field,"==",s))))||[];return bt.create(i,"or")}return t}const r=t.filters.map((i=>fj(i)));return bt.create(r,t.op)}function due(t){if(t.getFilters().length===0)return[];const e=Ab(fj(t));return Pe(hj(e)),kb(e)||Cb(e)?[e]:e.getFilters()}function kb(t){return t instanceof nt}function Cb(t){return t instanceof bt&&LR(t)}function hj(t){return kb(t)||Cb(t)||(function(n){if(n instanceof bt&&wb(n)){for(const r of n.getFilters())if(!kb(r)&&!Cb(r))return!1;return!0}return!1})(t)}function Ab(t){if(Pe(t instanceof nt||t instanceof bt),t instanceof nt)return t;if(t.filters.length===1)return Ab(t.filters[0]);const e=t.filters.map((r=>Ab(r)));let n=bt.create(e,t.op);return n=Lv(n),hj(n)?n:(Pe(n instanceof bt),Pe(fd(n)),Pe(n.filters.length>1),n.filters.reduce(((r,i)=>HR(r,i))))}function HR(t,e){let n;return Pe(t instanceof nt||t instanceof bt),Pe(e instanceof nt||e instanceof bt),n=t instanceof nt?e instanceof nt?(function(i,s){return bt.create([i,s],"and")})(t,e):uD(t,e):e instanceof nt?uD(e,t):(function(i,s){if(Pe(i.filters.length>0&&s.filters.length>0),fd(i)&&fd(s))return xU(i,s.getFilters());const o=wb(i)?i:s,l=wb(i)?s:i,c=o.filters.map((d=>HR(d,l)));return bt.create(c,"or")})(t,e),Lv(n)}function uD(t,e){if(fd(e))return xU(e,t.getFilters());{const n=e.filters.map((r=>HR(t,r)));return bt.create(n,"or")}}function Lv(t){if(Pe(t instanceof nt||t instanceof bt),t instanceof nt)return t;const e=t.getFilters();if(e.length===1)return Lv(e[0]);if(IU(t))return t;const n=e.map((i=>Lv(i))),r=[];
vendor: 5,044 bytes, lines 1723-1753
1723return n.forEach((i=>{i instanceof nt?r.push(i):i instanceof bt&&(i.op===t.op?r.push(...i.filters):r.push(i))})),r.length===1?r[0]:bt.create(r,t.op)}/**
1724 * @license
1725 * Copyright 2019 Google LLC
1726 *
1727 * Licensed under the Apache License, Version 2.0 (the "License");
1728 * you may not use this file except in compliance with the License.
1729 * You may obtain a copy of the License at
1730 *
1731 *   http://www.apache.org/licenses/LICENSE-2.0
1732 *
1733 * Unless required by applicable law or agreed to in writing, software
1734 * distributed under the License is distributed on an "AS IS" BASIS,
1735 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1736 * See the License for the specific language governing permissions and
1737 * limitations under the License.
1738 */class fue{constructor(){this._n=new GR}addToCollectionParentIndex(e,n){return this._n.add(n),W.resolve()}getCollectionParents(e,n){return W.resolve(this._n.getEntries(n))}addFieldIndex(e,n){return W.resolve()}deleteFieldIndex(e,n){return W.resolve()}deleteAllFieldIndexes(e){return W.resolve()}createTargetIndexes(e,n){return W.resolve()}getDocumentsMatchingTarget(e,n){return W.resolve(null)}getIndexType(e,n){return W.resolve(0)}getFieldIndexes(e,n){return W.resolve([])}getNextCollectionGroupToUpdate(e){return W.resolve(null)}getMinOffset(e,n){return W.resolve(ki.min())}getMinOffsetFromCollectionGroup(e,n){return W.resolve(ki.min())}updateCollectionGroup(e,n,r){return W.resolve()}updateIndexEntries(e,n){return W.resolve()}}class GR{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new Rt(tt.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new Rt(tt.comparator)).toArray()}}/**
1739 * @license
1740 * Copyright 2019 Google LLC
1741 *
1742 * Licensed under the Apache License, Version 2.0 (the "License");
1743 * you may not use this file except in compliance with the License.
1744 * You may obtain a copy of the License at
1745 *
1746 *   http://www.apache.org/licenses/LICENSE-2.0
1747 *
1748 * Unless required by applicable law or agreed to in writing, software
1749 * distributed under the License is distributed on an "AS IS" BASIS,
1750 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1751 * See the License for the specific language governing permissions and
1752 * limitations under the License.
1753 */const Sy=new Uint8Array(0);class hue{constructor(e,n){this.databaseId=n,this.an=new GR,this.un=new rl((r=>lu(r)),((r,i)=>vm(r,i))),this.uid=e.uid||""}addToCollectionParentIndex(e,n){if(!this.an.has(n)){const r=n.lastSegment(),i=n.popLast();e.addOnCommittedListener((()=>{this.an.add(n)}));const s={collectionId:r,parent:Hr(i)};return cD(e).put(s)}return W.resolve()}getCollectionParents(e,n){const r=[],i=IDBKeyRange.bound([n,""],[cU(n),""],!1,!0);return cD(e).W(i).next((s=>{for(const o of s){if(o.collectionId!==n)break;r.push($s(o.parent))}return r}))}addFieldIndex(e,n){const r=oh(e),i=(function(l){return{indexId:l.indexId,collectionGroup:l.collectionGroup,fields:l.fields.map((c=>[c.fieldPath.canonicalString(),c.kind]))}})(n);delete i.indexId;const s=r.add(i);if(n.indexState){const o=_c(e);return s.next((l=>{o.put(rD(l,this.uid,n.indexState.sequenceNumber,n.indexState.offset))}))}return s.next()}deleteFieldIndex(e,n){const r=oh(e),i=_c(e),s=vc(e);return r.delete(n.indexId).next((()=>i.delete(IDBKeyRange.bound([n.indexId],[n.indexId+1],!1,!0)))).next((()=>s.delete(IDBKeyRange.bound([n.indexId],[n.indexId+1],!1,!0))))}deleteAllFieldIndexes(e){const n=oh(e),r=vc(e),i=_c(e);return n.H().next((()=>r.H())).next((()=>i.H()))}createTargetIndexes(e,n){return W.forEach(this.cn(n),(r=>this.getIndexType(e,r).next((i=>{if(i===0||i===1){const s=new lD(r).on();if(s!=null)return this.addFieldIndex(e,s)}}))))}getDocumentsMatchingTarget(e,n){const r=vc(e);let i=!0;const s=new Map;return W.forEach(this.cn(n),(o=>this.ln(e,o).next((l=>{i&&(i=!!l),s.set(o,l)})))).next((()=>{if(i){let o=Ge();const l=[];return W.forEach(s,((c,d)=>{se("IndexedDbIndexManager",`Using index ${(function(I){return`id=${I.indexId}|cg=${I.collectionGroup}|f=${I.fields.map((P=>`${P.fieldPath}:${P.kind}`)).join(",")}`})(c)} to execute ${lu(n)}`);const h=(function(I,P){const x=gb(P);if(x===void 0)return null;for(const N of Nv(I,x.fieldPath))switch(N.op){case"array-contains-any":return N.value.arrayValue.values||[];case"array-contains":return[N.value]}return null})(d,c),m=(function(I,P){const x=new Map;for(const N of Pl(P))for(const k of Nv(I,N.fieldPath))switch(k.op){case"==":case"in":x.set(N.fieldPath.canonicalString(),k.value);break;case"not-in":case"!=":return x.set(N.fieldPath.canonicalString(),k.value),Array.from(x.values())}return null})(d,c),g=(function(I,P){const x=[];let N=!0;for(const k of Pl(P)){const V=k.kind===0?BN(I,k.fieldPath,I.startAt):zN(I,k.fieldPath,I.startAt);x.push(V.value),N&&(N=V.inclusive)}return new qa(x,N)})(d,c),v=(function(I,P){const x=[];let N=!0;for(const k of Pl(P)){const V=k.kind===0?zN(I,k.fieldPath,I.endAt):BN(I,
1753k.fieldPath,I.endAt);x.push(V.value),N&&(N=V.inclusive)}return new qa(x,N)})(d,c),E=this.hn(c,d,g),S=this.hn(c,d,v),w=this.Pn(c,d,m),b=this.In(c.indexId,h,E,g.inclusive,S,v.inclusive,w);return W.forEach(b,(C=>r.j(C,n.limit).next((I=>{I.forEach((P=>{const x=he.fromSegments(P.documentKey);o.has(x)||(o=o.add(x),l.push(x))}))}))))})).next((()=>l))}return W.resolve(null)}))}cn(e){let n=this.un.get(e);return n||(e.filters.length===0?n=[e]:n=due(bt.create(e.filters,"and")).map((r=>Sb(e.path,e.collectionGroup,e.orderBy,r.getFilters(),e.limit,e.startAt,e.endAt))),this.un.set(e,n),n)}In(e,n,r,i,s,o,l){const c=(n!=null?n.length:1)*Math.max(r.length,s.length),d=c/(n!=null?n.length:1),h=[];for(let m=0;m<c;++m){const g=n?this.Tn(n[m/d]):Sy,v=this.En(e,g,r[m%d],i),E=this.dn(e,g,s[m%d],o),S=l.map((w=>this.En(e,g,w,!0)));h.push(...this.createRange(v,E,S))}return h}En(e,n,r,i){const s=new Ll(e,he.empty(),n,r);return i?s:s.Jt()}dn(e,n,r,i){const s=new Ll(e,he.empty(),n,r);return i?s.Jt():s}ln(e,n){const r=new lD(n),i=n.collectionGroup!=null?n.collectionGroup:n.path.lastSegment();return this.getFieldIndexes(e,i).next((s=>{let o=null;for(const l of s)r.tn(l)&&(!o||l.fields.length>o.fields.length)&&(o=l);return o}))}getIndexType(e,n){let r=2;const i=this.cn(n);return W.forEach(i,(s=>this.ln(e,s).next((o=>{o?r!==0&&o.fields.length<(function(c){let d=new Rt(qt.comparator),h=!1;for(const m of c.filters)for(const g of m.getFlattenedFilters())g.field.isKeyField()||(g.op==="array-contains"||g.op==="array-contains-any"?h=!0:d=d.add(g.field));for(const m of c.orderBy)m.field.isKeyField()||(d=d.add(m.field));return d.size+(h?1:0)})(s)&&(r=1):r=0})))).next((()=>(function(o){return o.limit!==null})(n)&&i.length>1&&r===2?1:r))}An(e,n){const r=new sh;for(const i of Pl(e)){const s=n.data.field(i.fieldPath);if(s==null)return null;const o=r.Ht(i.kind);Ml.bt.Pt(s,o)}return r.Wt()}Tn(e){const n=new sh;return Ml.bt.Pt(e,n.Ht(0)),n.Wt()}Rn(e,n){const r=new sh;return Ml.bt.Pt(au(this.databaseId,n),r.Ht((function(s){const o=Pl(s);return o.length===0?0:o[o.length-1].kind})(e))),r.Wt()}Pn(e,n,r){if(r===null)return[];let i=[];i.push(new sh);let s=0;for(const o of Pl(e)){const l=r[s++];for(const c of i)if(this.Vn(n,o.fieldPath)&&Op(l))i=this.mn(i,o,l);else{const d=c.Ht(o.kind);Ml.bt.Pt(l,d)}}return this.fn(i)}hn(e,n,r){return this.Pn(e,n,r.position)}fn(e){const n=[];for(let r=0;r<e.length;++r)n[r]=e[r].Wt();return n}mn(e,n,r){const i=[...e],s=[];for(const o of r.arrayValue.values||[])for(const l of i){const c=new sh;c.seed(l.Wt()),Ml.bt.Pt(o,c.Ht(n.kind)),s.push(c)}return s}Vn(e,n){return!!e.filters.find((r=>r instanceof nt&&r.field.isEqual(n)&&(r.op==="in"||r.op==="not-in")))}getFieldIndexes(e,n){const r=oh(e),i=_c(e);return(n?r.W("collectionGroupIndex",IDBKeyRange.bound(n,n)):r.W()).next((s=>{const o=[];return W.forEach(s,(l=>i.get([l.indexId,this.uid]).next((c=>{o.push((function(h,m){const g=m?new kp(m.sequenceNumber,new ki(fu(m.readTime),new he($s(m.documentKey)),m.largestBatchId)):kp.empty(),v=h.fields.map((([E,S])=>new zy(qt.fromServerFormat(E),S)));return new Pv(h.indexId,h.collectionGroup,v,g)})(l,c))})))).next((()=>o))}))}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next((n=>n.length===0?null:(n.sort(((r,i)=>{const s=r.indexState.sequenceNumber-i.indexState.sequenceNumber;return s!==0?s:He(r.collectionGroup,i.collectionGroup)})),n[0].collectionGroup)))}updateCollectionGroup(e,n,r){const i=oh(e),s=_c(e);return this.gn(e).next((o=>i.W("collectionGroupIndex",IDBKeyRange.bound(n,n)).next((l=>W.forEach(l,(c=>s.put(rD(c.indexId,this.uid,o,r))))))))}updateIndexEntries(e,n){const r=new Map;return W.forEach(n,((i,s)=>{const o=r.get(i.collectionGroup);return(o?W.resolve(o):this.getFieldIndexes(e,i.collectionGroup)).next((l=>(r.set(i.collectionGroup,l),W.forEach(l,(c=>this.pn(e,i,c).next((d=>{const h=this.yn(s,c);return d.isEqual(h)?W.resolve():this.wn(e,s,c,d,h)})))))))}))}Sn(e,n,r,i){return vc(e).put({indexId:i.indexId,uid:this.uid,arrayValue:i.arrayValue,directionalValue:i.directionalValue,orderedDocumentKey:this.Rn(r,n.key),documentKey:n.key.path.toArray()})}
1753bn(e,n,r,i){return vc(e).delete([i.indexId,this.uid,i.arrayValue,i.directionalValue,this.Rn(r,n.key),n.key.path.toArray()])}pn(e,n,r){const i=vc(e);let s=new Rt(fa);return i.Y({index:"documentKeyIndex",range:IDBKeyRange.only([r.indexId,this.uid,this.Rn(r,n)])},((o,l)=>{s=s.add(new Ll(r.indexId,n,l.arrayValue,l.directionalValue))})).next((()=>s))}yn(e,n){let r=new Rt(fa);const i=this.An(n,e);if(i==null)return r;const s=gb(n);if(s!=null){const o=e.data.field(s.fieldPath);if(Op(o))for(const l of o.arrayValue.values||[])r=r.add(new Ll(n.indexId,e.key,this.Tn(l),i))}else r=r.add(new Ll(n.indexId,e.key,Sy,i));return r}wn(e,n,r,i,s){se("IndexedDbIndexManager","Updating index entries for document '%s'",n.key);const o=[];return(function(c,d,h,m,g){const v=c.getIterator(),E=d.getIterator();let S=yc(v),w=yc(E);for(;S||w;){let b=!1,C=!1;if(S&&w){const I=h(S,w);I<0?C=!0:I>0&&(b=!0)}else S!=null?C=!0:b=!0;b?(m(w),w=yc(E)):C?(g(S),S=yc(v)):(S=yc(v),w=yc(E))}})(i,s,fa,(l=>{o.push(this.Sn(e,n,r,l))}),(l=>{o.push(this.bn(e,n,r,l))})),W.waitFor(o)}gn(e){let n=1;return _c(e).Y({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},((r,i,s)=>{s.done(),n=i.sequenceNumber+1})).next((()=>n))}createRange(e,n,r){r=r.sort(((o,l)=>fa(o,l))).filter(((o,l,c)=>!l||fa(o,c[l-1])!==0));const i=[];i.push(e);for(const o of r){const l=fa(o,e),c=fa(o,n);if(l===0)i[0]=e.Jt();else if(l>0&&c<0)i.push(o),i.push(o.Jt());else if(c>0)break}i.push(n);const s=[];for(let o=0;o<i.length;o+=2){if(this.Dn(i[o],i[o+1]))return[];const l=[i[o].indexId,this.uid,i[o].arrayValue,i[o].directionalValue,Sy,[]],c=[i[o+1].indexId,this.uid,i[o+1].arrayValue,i[o+1].directionalValue,Sy,[]];s.push(IDBKeyRange.bound(l,c))}return s}Dn(e,n){return fa(e,n)>0}getMinOffsetFromCollectionGroup(e,n){return this.getFieldIndexes(e,n).next(dD)}getMinOffset(e,n){return W.mapArray(this.cn(n),(r=>this.ln(e,r).next((i=>i||Te())))).next(dD)}}function cD(t){return er(t,"collectionParents")}function vc(t){return er(t,"indexEntries")}function oh(t){return er(t,"indexConfiguration")}function _c(t){return er(t,"indexState")}function dD(t){Pe(t.length!==0);let e=t[0].indexState.offset,n=e.largestBatchId;for(let r=1;r<t.length;r++){const i=t[r].indexState.offset;NR(i,e)<0&&(e=i),n<i.largestBatchId&&(n=i.largestBatchId)}return new ki(e.readTime,e.documentKey,n)}/**
1754 * @license
1755 * Copyright 2018 Google LLC
1756 *
1757 * Licensed under the Apache License, Version 2.0 (the "License");
1758 * you may not use this file except in compliance with the License.
1759 * You may obtain a copy of the License at
1760 *
1761 *   http://www.apache.org/licenses/LICENSE-2.0
1762 *
1763 * Unless required by applicable law or agreed to in writing, software
1764 * distributed under the License is distributed on an "AS IS" BASIS,
1765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1766 * See the License for the specific language governing permissions and
1767 * limitations under the License.
1768 */const fD={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class ni{constructor(e,n,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}static withCacheSize(e){return new ni(e,ni.DEFAULT_COLLECTION_PERCENTILE,ni.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}/**
1769 * @license
1770 * Copyright 2020 Google LLC
1771 *
1772 * Licensed under the Apache License, Version 2.0 (the "License");
1773 * you may not use this file except in compliance with the License.
1774 * You may obtain a copy of the License at
1775 *
1776 *   http://www.apache.org/licenses/LICENSE-2.0
1777 *
1778 * Unless required by applicable law or agreed to in writing, software
1779 * distributed under the License is distributed on an "AS IS" BASIS,
1780 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1781 * See the License for the specific language governing permissions and
1782 * limitations under the License.
1783 */function pj(t,e,n){const r=t.store("mutations"),i=t.store("documentMutations"),s=[],o=IDBKeyRange.only(n.batchId);let l=0;const c=r.Y({range:o},((h,m,g)=>(l++,g.delete())));s.push(c.next((()=>{Pe(l===1)})));const d=[];for(const h of n.mutations){const m=gU(e,h.key.path,n.batchId);s.push(i.delete(m)),d.push(h.key)}return W.waitFor(s).next((()=>d))}function Vv(t){if(!t)return 0;let e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw Te();e=t.noDocument}return JSON.stringify(e).length}/**
1784 * @license
1785 * Copyright 2017 Google LLC
1786 *
1787 * Licensed under the Apache License, Version 2.0 (the "License");
1788 * you may not use this file except in compliance with the License.
1789 * You may obtain a copy of the License at
1790 *
1791 *   http://www.apache.org/licenses/LICENSE-2.0
1792 *
1793 * Unless required by applicable law or agreed to in writing, software
1794 * distributed under the License is distributed on an "AS IS" BASIS,
1795 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1796 * See the License for the specific language governing permissions and
1797 * limitations under the License.
1798 */ni.DEFAULT_COLLECTION_PERCENTILE=10,ni.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ni.DEFAULT=new ni(41943040,ni.DEFAULT_COLLECTION_PERCENTILE,ni.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ni.DISABLED=new ni(-1,0,0);class mw{constructor(e,n,r,i){this.userId=e,this.serializer=n,this.indexManager=r,this.referenceDelegate=i,this.Cn={}}static lt(e,n,r,i){Pe(e.uid!=="");const s=e.isAuthenticated()?e.uid:"";return new mw(s,n,r,i)}checkEmpty(e){let n=!0;const r=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return ha(e).Y({index:"userMutationsIndex",range:r},((i,s,o)=>{n=!1,o.done()})).next((()=>n))}addMutationBatch(e,n,r,i){const s=Ac(e),o=ha(e);return o.add({}).next((l=>{Pe(typeof l=="number");const c=new UR(l,n,r,i),d=(function(v,E,S){const w=S.baseMutations.map((C=>Mp(v.ct,C))),b=S.mutations.map((C=>Mp(v.ct,C)));return{userId:E,batchId:S.batchId,localWriteTimeMs:S.localWriteTime.toMillis(),baseMutations:w,mutations:b}})(this.serializer,this.userId,c),h=[];let m=new Rt(((g,v)=>He(g.canonicalString(),v.canonicalString())));for(const g of i){const v=gU(this.userId,g.key.path,l);m=m.add(g.key.path.popLast()),h.push(o.put(d)),h.push(s.put(v,tle))}return m.forEach((g=>{h.push(this.indexManager.addToCollectionParentIndex(e,g))})),e.addOnCommittedListener((()=>{this.Cn[l]=c.keys()})),W.waitFor(h).next((()=>c))}))}lookupMutationBatch(e,n){return ha(e).get(n).next((r=>r?(Pe(r.userId===this.userId),Dl(this.serializer,r)):null))}vn(e,n){return this.Cn[n]?W.resolve(this.Cn[n]):this.lookupMutationBatch(e,n).next((r=>{if(r){const i=r.keys();return this.Cn[n]=i,i}return null}))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=IDBKeyRange.lowerBound([this.userId,r]);let s=null;return ha(e).Y({index:"userMutationsIndex",range:i},((o,l,c)=>{l.userId===this.userId&&(Pe(l.batchId>=r),s=Dl(this.serializer,l)),c.done()})).next((()=>s))}getHighestUnacknowledgedBatchId(e){const n=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let r=-1;return ha(e).Y({index:"userMutationsIndex",range:n,reverse:!0},((i,s,o)=>{r=s.batchId,o.done()})).next((()=>r))}getAllMutationBatches(e){const n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return ha(e).W("userMutationsIndex",n).next((r=>r.map((i=>Dl(this.serializer,i)))))}getAllMutationBatchesAffectingDocumentKey(e,n){const r=Wy(this.userId,n.path),i=IDBKeyRange.lowerBound(r),s=[];return Ac(e).Y({range:i},((o,l,c)=>{const[d,h,m]=o,g=$s(h);if(d===this.userId&&n.path.isEqual(g))return ha(e).get(m).next((v=>{if(!v)throw Te();Pe(v.userId===this.userId),s.push(Dl(this.serializer,v))}));c.done()})).next((()=>s))}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new Rt(He);const i=[];return n.forEach((s=>{const o=Wy(this.userId,s.path),l=IDBKeyRange.lowerBound(o),c=Ac(e).Y({range:l},((d,h,m)=>{const[g,v,E]=d,S=$s(v);g===this.userId&&s.path.isEqual(S)?r=r.add(E):m.done()}));i.push(c)})),W.waitFor(i).next((()=>this.Fn(e,r)))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1,s=Wy(this.userId,r),o=IDBKeyRange.lowerBound(s);let l=new Rt(He);return Ac(e).Y({range:o},((c,d,h)=>{const[m,g,v]=c,E=$s(g);m===this.userId&&r.isPrefixOf(E)?E.length===i&&(l=l.add(v)):h.done()})).next((()=>this.Fn(e,l)))}Fn(e,n){const r=[],i=[];return n.forEach((s=>{i.push(ha(e).get(s).next((o=>{if(o===null)throw Te();Pe(o.userId===this.userId),r.push(Dl(this.serializer,o))})))})),W.waitFor(i).next((()=>r))}removeMutationBatch(e,n){return pj(e.ae,this.userId,n).next((r=>(e.addOnCommittedListener((()=>{this.Mn(n.batchId)})),W.forEach(r,(i=>this.referenceDelegate.markPotentiallyOrphaned(e,i))))))}Mn(e){delete this.Cn[e]}performConsistencyCheck(e){return this.checkEmpty(e).next((n=>{if(!n)return W.resolve();const r=IDBKeyRange.lowerBound((function(o){return[o]})(this.userId)),i=[];return Ac(e).Y({range:r},((s,o,l)=>{if(s[0]===this.userId){const c=$s(s[1]);i.push(c)}else l.done()})).next((()=>{Pe(i.length===0)}))}))}containsKey(e,n){return mj(e,this.userId,n)}xn(e){return gj(e).get(this.userId).next((n=>n||{userId:this.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""}))}}function mj(t,e,n){const r=Wy(e,n.path),i=r[1],s=IDBKeyRange.lowerBound(r);let o=!1;return Ac(t).Y({range:s,J:!0},((l,c,d)=>{const[h,m,g]=l;h===e&&m===i&&(o=!0),d.done()})).next((()=>o))}function ha(t){return er(t,"mutations")}function Ac(t){return er(t,"documentMutations")}
vendor: 4,519 bytes, lines 1798-1832
1798function gj(t){return er(t,"mutationQueues")}/**
1799 * @license
1800 * Copyright 2017 Google LLC
1801 *
1802 * Licensed under the Apache License, Version 2.0 (the "License");
1803 * you may not use this file except in compliance with the License.
1804 * You may obtain a copy of the License at
1805 *
1806 *   http://www.apache.org/licenses/LICENSE-2.0
1807 *
1808 * Unless required by applicable law or agreed to in writing, software
1809 * distributed under the License is distributed on an "AS IS" BASIS,
1810 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1811 * See the License for the specific language governing permissions and
1812 * limitations under the License.
1813 */class hu{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new hu(0)}static Ln(){return new hu(-1)}}/**
1814 * @license
1815 * Copyright 2017 Google LLC
1816 *
1817 * Licensed under the Apache License, Version 2.0 (the "License");
1818 * you may not use this file except in compliance with the License.
1819 * You may obtain a copy of the License at
1820 *
1821 *   http://www.apache.org/licenses/LICENSE-2.0
1822 *
1823 * Unless required by applicable law or agreed to in writing, software
1824 * distributed under the License is distributed on an "AS IS" BASIS,
1825 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1826 * See the License for the specific language governing permissions and
1827 * limitations under the License.
1828 */class pue{constructor(e,n){this.referenceDelegate=e,this.serializer=n}allocateTargetId(e){return this.Bn(e).next((n=>{const r=new hu(n.highestTargetId);return n.highestTargetId=r.next(),this.kn(e,n).next((()=>n.highestTargetId))}))}getLastRemoteSnapshotVersion(e){return this.Bn(e).next((n=>Oe.fromTimestamp(new Qt(n.lastRemoteSnapshotVersion.seconds,n.lastRemoteSnapshotVersion.nanoseconds))))}getHighestSequenceNumber(e){return this.Bn(e).next((n=>n.highestListenSequenceNumber))}setTargetsMetadata(e,n,r){return this.Bn(e).next((i=>(i.highestListenSequenceNumber=n,r&&(i.lastRemoteSnapshotVersion=r.toTimestamp()),n>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=n),this.kn(e,i))))}addTargetData(e,n){return this.qn(e,n).next((()=>this.Bn(e).next((r=>(r.targetCount+=1,this.Qn(n,r),this.kn(e,r))))))}updateTargetData(e,n){return this.qn(e,n)}removeTargetData(e,n){return this.removeMatchingKeysForTargetId(e,n.targetId).next((()=>wc(e).delete(n.targetId))).next((()=>this.Bn(e))).next((r=>(Pe(r.targetCount>0),r.targetCount-=1,this.kn(e,r))))}removeTargets(e,n,r){let i=0;const s=[];return wc(e).Y(((o,l)=>{const c=Dh(l);c.sequenceNumber<=n&&r.get(c.targetId)===null&&(i++,s.push(this.removeTargetData(e,c)))})).next((()=>W.waitFor(s))).next((()=>i))}forEachTarget(e,n){return wc(e).Y(((r,i)=>{const s=Dh(i);n(s)}))}Bn(e){return hD(e).get("targetGlobalKey").next((n=>(Pe(n!==null),n)))}kn(e,n){return hD(e).put("targetGlobalKey",n)}qn(e,n){return wc(e).put(dj(this.serializer,n))}Qn(e,n){let r=!1;return e.targetId>n.highestTargetId&&(n.highestTargetId=e.targetId,r=!0),e.sequenceNumber>n.highestListenSequenceNumber&&(n.highestListenSequenceNumber=e.sequenceNumber,r=!0),r}getTargetCount(e){return this.Bn(e).next((n=>n.targetCount))}getTargetData(e,n){const r=lu(n),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]);let s=null;return wc(e).Y({range:i,index:"queryTargetsIndex"},((o,l,c)=>{const d=Dh(l);vm(n,d.target)&&(s=d,c.done())})).next((()=>s))}addMatchingKeys(e,n,r){const i=[],s=wa(e);return n.forEach((o=>{const l=Hr(o.path);i.push(s.put({targetId:r,path:l})),i.push(this.referenceDelegate.addReference(e,r,o))})),W.waitFor(i)}removeMatchingKeys(e,n,r){const i=wa(e);return W.forEach(n,(s=>{const o=Hr(s.path);return W.waitFor([i.delete([r,o]),this.referenceDelegate.removeReference(e,r,s)])}))}removeMatchingKeysForTargetId(e,n){const r=wa(e),i=IDBKeyRange.bound([n],[n+1],!1,!0);return r.delete(i)}getMatchingKeysForTargetId(e,n){const r=IDBKeyRange.bound([n],[n+1],!1,!0),i=wa(e);let s=Ge();return i.Y({range:r,J:!0},((o,l,c)=>{const d=$s(o[1]),h=new he(d);s=s.add(h)})).next((()=>s))}containsKey(e,n){const r=Hr(n.path),i=IDBKeyRange.bound([r],[cU(r)],!1,!0);let s=0;return wa(e).Y({index:"documentTargetsIndex",J:!0,range:i},(([o,l],c,d)=>{o!==0&&(s++,d.done())})).next((()=>s>0))}_t(e,n){return wc(e).get(n).next((r=>r?Dh(r):null))}}function wc(t){return er(t,"targets")}function hD(t){return er(t,"targetGlobal")}function wa(t){return er(t,"targetDocuments")}/**
1829 * @license
1830 * Copyright 2020 Google LLC
1831 *
1832 * Licensed under the Apache License, Version 2.0 (the "License");
1833 * you may not use this file except in compliance with the License.
1834 * You may obtain a copy of the License at
1835 *
1836 *   http://www.apache.org/licenses/LICENSE-2.0
1837 *
1838 * Unless required by applicable law or agreed to in writing, software
1839 * distributed under the License is distributed on an "AS IS" BASIS,
1840 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1841 * See the License for the specific language governing permissions and
1842 * limitations under the License.
1843 */function pD([t,e],[n,r]){const i=He(t,n);return i===0?He(e,r):i}class mue{constructor(e){this.Kn=e,this.buffer=new Rt(pD),this.$n=0}Un(){return++this.$n}Wn(e){const n=[e,this.Un()];if(this.buffer.size<this.Kn)this.buffer=this.buffer.add(n);else{const r=this.buffer.last();pD(n,r)<0&&(this.buffer=this.buffer.delete(r).add(n))}}get maxValue(){return this.buffer.last()[0]}}class gue{constructor(e,n,r){this.garbageCollector=e,this.asyncQueue=n,this.localStore=r,this.Gn=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.zn(6e4)}stop(){this.Gn&&(this.Gn.cancel(),this.Gn=null)}get started(){return this.Gn!==null}zn(e){se("LruGarbageCollector",`Garbage collection scheduled in ${e}ms`),this.Gn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(async()=>{this.Gn=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){nl(n)?se("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",n):await tl(n)}await this.zn(3e5)}))}}class yue{constructor(e,n){this.jn=e,this.params=n}calculateTargetCount(e,n){return this.jn.Hn(e).next((r=>Math.floor(n/100*r)))}nthSequenceNumber(e,n){if(n===0)return W.resolve(si._e);const r=new mue(n);return this.jn.forEachTarget(e,(i=>r.Wn(i.sequenceNumber))).next((()=>this.jn.Jn(e,(i=>r.Wn(i))))).next((()=>r.maxValue))}removeTargets(e,n,r){return this.jn.removeTargets(e,n,r)}removeOrphanedDocuments(e,n){return this.jn.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(se("LruGarbageCollector","Garbage collection skipped; disabled"),W.resolve(fD)):this.getCacheSize(e).next((r=>r<this.params.cacheSizeCollectionThreshold?(se("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),fD):this.Yn(e,n)))}getCacheSize(e){return this.jn.getCacheSize(e)}Yn(e,n){let r,i,s,o,l,c,d;const h=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((m=>(m>this.params.maximumSequenceNumbersToCollect?(se("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${m}`),i=this.params.maximumSequenceNumbersToCollect):i=m,o=Date.now(),this.nthSequenceNumber(e,i)))).next((m=>(r=m,l=Date.now(),this.removeTargets(e,r,n)))).next((m=>(s=m,c=Date.now(),this.removeOrphanedDocuments(e,r)))).next((m=>(d=Date.now(),Rc()<=ut.DEBUG&&se("LruGarbageCollector",`LRU Garbage Collection
1844	Counted targets in ${o-h}ms
1845	Determined least recently used ${i} in `+(l-o)+`ms
1846	Removed ${s} targets in `+(c-l)+`ms
1847	Removed ${m} documents in `+(d-c)+`ms
1848Total Duration: ${d-h}ms`),W.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:m}))))}}function vue(t,e){return new yue(t,e)}/**
1849 * @license
1850 * Copyright 2020 Google LLC
1851 *
1852 * Licensed under the Apache License, Version 2.0 (the "License");
1853 * you may not use this file except in compliance with the License.
1854 * You may obtain a copy of the License at
1855 *
1856 *   http://www.apache.org/licenses/LICENSE-2.0
1857 *
1858 * Unless required by applicable law or agreed to in writing, software
1859 * distributed under the License is distributed on an "AS IS" BASIS,
1860 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1861 * See the License for the specific language governing permissions and
1862 * limitations under the License.
1863 */class _ue{constructor(e,n){this.db=e,this.garbageCollector=vue(this,n)}Hn(e){const n=this.Zn(e);return this.db.getTargetCache().getTargetCount(e).next((r=>n.next((i=>r+i))))}Zn(e){let n=0;return this.Jn(e,(r=>{n++})).next((()=>n))}
1863forEachTarget(e,n){return this.db.getTargetCache().forEachTarget(e,n)}Jn(e,n){return this.Xn(e,((r,i)=>n(i)))}addReference(e,n,r){return Ty(e,r)}removeReference(e,n,r){return Ty(e,r)}removeTargets(e,n,r){return this.db.getTargetCache().removeTargets(e,n,r)}markPotentiallyOrphaned(e,n){return Ty(e,n)}er(e,n){return(function(i,s){let o=!1;return gj(i).Z((l=>mj(i,l,s).next((c=>(c&&(o=!0),W.resolve(!c)))))).next((()=>o))})(e,n)}removeOrphanedDocuments(e,n){const r=this.db.getRemoteDocumentCache().newChangeBuffer(),i=[];let s=0;return this.Xn(e,((o,l)=>{if(l<=n){const c=this.er(e,o).next((d=>{if(!d)return s++,r.getEntry(e,o).next((()=>(r.removeEntry(o,Oe.min()),wa(e).delete((function(m){return[0,Hr(m.path)]})(o)))))}));i.push(c)}})).next((()=>W.waitFor(i))).next((()=>r.apply(e))).next((()=>s))}removeTarget(e,n){const r=n.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,r)}updateLimboDocument(e,n){return Ty(e,n)}Xn(e,n){const r=wa(e);let i,s=si._e;return r.Y({index:"documentTargetsIndex"},(([o,l],{path:c,sequenceNumber:d})=>{o===0?(s!==si._e&&n(new he($s(i)),s),s=d,i=c):s=si._e})).next((()=>{s!==si._e&&n(new he($s(i)),s)}))}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}function Ty(t,e){return wa(t).put((function(r,i){return{targetId:0,path:Hr(r.path),sequenceNumber:i}})(e,t.currentSequenceNumber))}/**
1864 * @license
1865 * Copyright 2017 Google LLC
1866 *
1867 * Licensed under the Apache License, Version 2.0 (the "License");
1868 * you may not use this file except in compliance with the License.
1869 * You may obtain a copy of the License at
1870 *
1871 *   http://www.apache.org/licenses/LICENSE-2.0
1872 *
1873 * Unless required by applicable law or agreed to in writing, software
1874 * distributed under the License is distributed on an "AS IS" BASIS,
1875 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1876 * See the License for the specific language governing permissions and
1877 * limitations under the License.
1878 */class yj{constructor(){this.changes=new rl((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,$t.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?W.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(){}}/**
1879 * @license
1880 * Copyright 2017 Google LLC
1881 *
1882 * Licensed under the Apache License, Version 2.0 (the "License");
1883 * you may not use this file except in compliance with the License.
1884 * You may obtain a copy of the License at
1885 *
1886 *   http://www.apache.org/licenses/LICENSE-2.0
1887 *
1888 * Unless required by applicable law or agreed to in writing, software
1889 * distributed under the License is distributed on an "AS IS" BASIS,
1890 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1891 * See the License for the specific language governing permissions and
1892 * limitations under the License.
1893 */class wue{constructor(e){this.serializer=e}setIndexManager(e){this.indexManager=e}addEntry(e,n,r){return xl(e).put(r)}removeEntry(e,n,r){return xl(e).delete((function(s,o){const l=s.path.toArray();return[l.slice(0,l.length-2),l[l.length-2],Mv(o),l[l.length-1]]})(n,r))}updateMetadata(e,n){return this.getMetadata(e).next((r=>(r.byteSize+=n,this.tr(e,r))))}getEntry(e,n){let r=$t.newInvalidDocument(n);return xl(e).Y({index:"documentKeyIndex",range:IDBKeyRange.only(ah(n))},((i,s)=>{r=this.nr(n,s)})).next((()=>r))}rr(e,n){let r={size:0,document:$t.newInvalidDocument(n)};return xl(e).Y({index:"documentKeyIndex",range:IDBKeyRange.only(ah(n))},((i,s)=>{r={document:this.nr(n,s),size:Vv(s)}})).next((()=>r))}getEntries(e,n){let r=ai();return this.ir(e,n,((i,s)=>{const o=this.nr(i,s);r=r.insert(i,o)})).next((()=>r))}sr(e,n){let r=ai(),i=new Ot(he.comparator);return this.ir(e,n,((s,o)=>{const l=this.nr(s,o);r=r.insert(s,l),i=i.insert(s,Vv(o))})).next((()=>({documents:r,_r:i})))}ir(e,n,r){if(n.isEmpty())return W.resolve();let i=new Rt(yD);
vendor: 6,131 bytes, lines 1893-1938
1893n.forEach((c=>i=i.add(c)));const s=IDBKeyRange.bound(ah(i.first()),ah(i.last())),o=i.getIterator();let l=o.getNext();return xl(e).Y({index:"documentKeyIndex",range:s},((c,d,h)=>{const m=he.fromSegments([...d.prefixPath,d.collectionGroup,d.documentId]);for(;l&&yD(l,m)<0;)r(l,null),l=o.getNext();l&&l.isEqual(m)&&(r(l,d),l=o.hasNext()?o.getNext():null),l?h.U(ah(l)):h.done()})).next((()=>{for(;l;)r(l,null),l=o.hasNext()?o.getNext():null}))}getDocumentsMatchingQuery(e,n,r,i,s){const o=n.path,l=[o.popLast().toArray(),o.lastSegment(),Mv(r.readTime),r.documentKey.path.isEmpty()?"":r.documentKey.path.lastSegment()],c=[o.popLast().toArray(),o.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return xl(e).W(IDBKeyRange.bound(l,c,!0)).next((d=>{s?.incrementDocumentReadCount(d.length);let h=ai();for(const m of d){const g=this.nr(he.fromSegments(m.prefixPath.concat(m.collectionGroup,m.documentId)),m);g.isFoundDocument()&&(wm(n,g)||i.has(g.key))&&(h=h.insert(g.key,g))}return h}))}getAllFromCollectionGroup(e,n,r,i){let s=ai();const o=gD(n,r),l=gD(n,ki.max());return xl(e).Y({index:"collectionGroupIndex",range:IDBKeyRange.bound(o,l,!0)},((c,d,h)=>{const m=this.nr(he.fromSegments(d.prefixPath.concat(d.collectionGroup,d.documentId)),d);s=s.insert(m.key,m),s.size===i&&h.done()})).next((()=>s))}newChangeBuffer(e){return new Eue(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next((n=>n.byteSize))}getMetadata(e){return mD(e).get("remoteDocumentGlobalKey").next((n=>(Pe(!!n),n)))}tr(e,n){return mD(e).put("remoteDocumentGlobalKey",n)}nr(e,n){if(n){const r=sue(this.serializer,n);if(!(r.isNoDocument()&&r.version.isEqual(Oe.min())))return r}return $t.newInvalidDocument(e)}}function vj(t){return new wue(t)}class Eue extends yj{constructor(e,n){super(),this.ar=e,this.trackRemovals=n,this.ur=new rl((r=>r.toString()),((r,i)=>r.isEqual(i)))}applyChanges(e){const n=[];let r=0,i=new Rt(((s,o)=>He(s.canonicalString(),o.canonicalString())));return this.changes.forEach(((s,o)=>{const l=this.ur.get(s);if(n.push(this.ar.removeEntry(e,s,l.readTime)),o.isValidDocument()){const c=tD(this.ar.serializer,o);i=i.add(s.path.popLast());const d=Vv(c);r+=d-l.size,n.push(this.ar.addEntry(e,s,c))}else if(r-=l.size,this.trackRemovals){const c=tD(this.ar.serializer,o.convertToNoDocument(Oe.min()));n.push(this.ar.addEntry(e,s,c))}})),i.forEach((s=>{n.push(this.ar.indexManager.addToCollectionParentIndex(e,s))})),n.push(this.ar.updateMetadata(e,r)),W.waitFor(n)}getFromCache(e,n){return this.ar.rr(e,n).next((r=>(this.ur.set(n,{size:r.size,readTime:r.document.readTime}),r.document)))}getAllFromCache(e,n){return this.ar.sr(e,n).next((({documents:r,_r:i})=>(i.forEach(((s,o)=>{this.ur.set(s,{size:o,readTime:r.get(s).readTime})})),r)))}}function mD(t){return er(t,"remoteDocumentGlobal")}function xl(t){return er(t,"remoteDocumentsV14")}function ah(t){const e=t.path.toArray();return[e.slice(0,e.length-2),e[e.length-2],e[e.length-1]]}function gD(t,e){const n=e.documentKey.path.toArray();return[t,Mv(e.readTime),n.slice(0,n.length-2),n.length>0?n[n.length-1]:""]}function yD(t,e){const n=t.path.toArray(),r=e.path.toArray();let i=0;for(let s=0;s<n.length-2&&s<r.length-2;++s)if(i=He(n[s],r[s]),i)return i;return i=He(n.length,r.length),i||(i=He(n[n.length-2],r[r.length-2]),i||He(n[n.length-1],r[r.length-1]))}/**
1894 * @license
1895 * Copyright 2017 Google LLC
1896 *
1897 * Licensed under the Apache License, Version 2.0 (the "License");
1898 * you may not use this file except in compliance with the License.
1899 * You may obtain a copy of the License at
1900 *
1901 *   http://www.apache.org/licenses/LICENSE-2.0
1902 *
1903 * Unless required by applicable law or agreed to in writing, software
1904 * distributed under the License is distributed on an "AS IS" BASIS,
1905 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1906 * See the License for the specific language governing permissions and
1907 * limitations under the License.
1908 *//**
1909 * @license
1910 * Copyright 2022 Google LLC
1911 *
1912 * Licensed under the Apache License, Version 2.0 (the "License");
1913 * you may not use this file except in compliance with the License.
1914 * You may obtain a copy of the License at
1915 *
1916 *   http://www.apache.org/licenses/LICENSE-2.0
1917 *
1918 * Unless required by applicable law or agreed to in writing, software
1919 * distributed under the License is distributed on an "AS IS" BASIS,
1920 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1921 * See the License for the specific language governing permissions and
1922 * limitations under the License.
1923 */class Sue{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/**
1924 * @license
1925 * Copyright 2017 Google LLC
1926 *
1927 * Licensed under the Apache License, Version 2.0 (the "License");
1928 * you may not use this file except in compliance with the License.
1929 * You may obtain a copy of the License at
1930 *
1931 *   http://www.apache.org/licenses/LICENSE-2.0
1932 *
1933 * Unless required by applicable law or agreed to in writing, software
1934 * distributed under the License is distributed on an "AS IS" BASIS,
1935 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1936 * See the License for the specific language governing permissions and
1937 * limitations under the License.
1938 */class _j{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&&Jh(r.mutation,i,oi.empty(),Qt.now()),i)))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next((r=>this.getLocalViewOfDocuments(e,r,Ge()).next((()=>r))))}getLocalViewOfDocuments(e,n,r=Ge()){const i=Us();return this.populateOverlays(e,i,n).next((()=>this.computeViews(e,n,i,r).next((s=>{let o=Oh();return s.forEach(((l,c)=>{o=o.insert(l,c.overlayedDocument)})),o}))))}getOverlayedDocuments(e,n){const r=Us();return this.populateOverlays(e,r,n).next((()=>this.computeViews(e,n,r,Ge())))}populateOverlays(e,n,r){const i=[];return r.forEach((s=>{n.has(s)||i.push(s)})),this.documentOverlayCache.getOverlays(e,i).next((s=>
1938{s.forEach(((o,l)=>{n.set(o,l)}))}))}computeViews(e,n,r,i){let s=ai();const o=Yh(),l=(function(){return Yh()})();return n.forEach(((c,d)=>{const h=r.get(d.key);i.has(d.key)&&(h===void 0||h.mutation instanceof Vo)?s=s.insert(d.key,d):h!==void 0?(o.set(d.key,h.mutation.getFieldMask()),Jh(h.mutation,d,h.mutation.getFieldMask(),Qt.now())):o.set(d.key,oi.empty())})),this.recalculateAndSaveOverlays(e,s).next((c=>(c.forEach(((d,h)=>o.set(d,h))),n.forEach(((d,h)=>{var m;return l.set(d,new Sue(h,(m=o.get(d))!==null&&m!==void 0?m:null))})),l)))}recalculateAndSaveOverlays(e,n){const r=Yh();let i=new Ot(((o,l)=>o-l)),s=Ge();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next((o=>{for(const l of o)l.keys().forEach((c=>{const d=n.get(c);if(d===null)return;let h=r.get(c)||oi.empty();h=l.applyToLocalView(d,h),r.set(c,h);const m=(i.get(l.batchId)||Ge()).add(c);i=i.insert(l.batchId,m)}))})).next((()=>{const o=[],l=i.getReverseIterator();for(;l.hasNext();){const c=l.getNext(),d=c.key,h=c.value,m=VU();h.forEach((g=>{if(!s.has(g)){const v=qU(n.get(g),r.get(g));v!==null&&m.set(g,v),s=s.add(g)}})),o.push(this.documentOverlayCache.saveOverlays(e,d,m))}return W.waitFor(o)})).next((()=>r))}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next((r=>this.recalculateAndSaveOverlays(e,r)))}getDocumentsMatchingQuery(e,n,r,i){return(function(o){return he.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0})(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):VR(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next((s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):W.resolve(Us());let l=-1,c=s;return o.next((d=>W.forEach(d,((h,m)=>(l<m.largestBatchId&&(l=m.largestBatchId),s.get(h)?W.resolve():this.remoteDocumentCache.getEntry(e,h).next((g=>{c=c.insert(h,g)}))))).next((()=>this.populateOverlays(e,d,s))).next((()=>this.computeViews(e,c,d,Ge()))).next((h=>({batchId:l,changes:LU(h)})))))}))}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new he(n)).next((r=>{let i=Oh();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i}))}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let o=Oh();return this.indexManager.getCollectionParents(e,s).next((l=>W.forEach(l,(c=>{const d=(function(m,g){return new Lo(g,null,m.explicitOrderBy.slice(),m.filters.slice(),m.limit,m.limitType,m.startAt,m.endAt)})(n,c.child(s));return this.getDocumentsMatchingCollectionQuery(e,d,r,i).next((h=>{h.forEach(((m,g)=>{o=o.insert(m,g)}))}))})).next((()=>o))))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next((o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i)))).next((o=>{s.forEach(((c,d)=>{const h=d.getKey();o.get(h)===null&&(o=o.insert(h,$t.newInvalidDocument(h)))}));let l=Oh();return o.forEach(((c,d)=>{const h=s.get(c);h!==void 0&&Jh(h.mutation,d,oi.empty(),Qt.now()),wm(n,d)&&(l=l.insert(c,d))})),l}))}}/**
1939 * @license
1940 * Copyright 2020 Google LLC
1941 *
1942 * Licensed under the Apache License, Version 2.0 (the "License");
1943 * you may not use this file except in compliance with the License.
1944 * You may obtain a copy of the License at
1945 *
1946 *   http://www.apache.org/licenses/LICENSE-2.0
1947 *
1948 * Unless required by applicable law or agreed to in writing, software
1949 * distributed under the License is distributed on an "AS IS" BASIS,
1950 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1951 * See the License for the specific language governing permissions and
1952 * limitations under the License.
1953 */class Tue{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,n){return W.resolve(this.cr.get(n))}saveBundleMetadata(e,n){return this.cr.set(n.id,(function(i){return{id:i.id,version:i.version,createTime:_n(i.createTime)}})(n)),W.resolve()}getNamedQuery(e,n){return W.resolve(this.lr.get(n))}saveNamedQuery(e,n){return this.lr.set(n.name,(function(i){return{name:i.name,query:qR(i.bundledQuery),readTime:_n(i.readTime)}})(n)),W.resolve()}}/**
1954 * @license
1955 * Copyright 2022 Google LLC
1956 *
1957 * Licensed under the Apache License, Version 2.0 (the "License");
1958 * you may not use this file except in compliance with the License.
1959 * You may obtain a copy of the License at
1960 *
1961 *   http://www.apache.org/licenses/LICENSE-2.0
1962 *
1963 * Unless required by applicable law or agreed to in writing, software
1964 * distributed under the License is distributed on an "AS IS" BASIS,
1965 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1966 * See the License for the specific language governing permissions and
1967 * limitations under the License.
1968 */class bue{constructor(){this.overlays=new Ot(he.comparator),this.hr=new Map}getOverlay(e,n){return W.resolve(this.overlays.get(n))}getOverlays(e,n){const r=Us();return W.forEach(n,(i=>this.getOverlay(e,i).next((s=>{s!==null&&r.set(i,s)})))).next((()=>r))}saveOverlays(e,n,r){return r.forEach(((i,s)=>{this.ht(e,n,s)})),W.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.hr.get(r);return i!==void 0&&(i.forEach((s=>this.overlays=this.overlays.remove(s))),this.hr.delete(r)),W.resolve()}getOverlaysForCollection(e,n,r){const i=Us(),s=n.length+1,o=new he(n.child("")),l=this.overlays.getIteratorFrom(o);for(;l.hasNext();){const c=l.getNext().value,d=c.getKey();if(!n.isPrefixOf(d.path))break;d.path.length===s&&c.largestBatchId>r&&i.set(c.getKey(),c)}return W.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Ot(((d,h)=>d-h));const o=this.overlays.getIterator();for(;o.hasNext();){const d=o.getNext().value;if(d.getKey().getCollectionGroup()===n&&d.largestBatchId>r){let h=s.get(d.largestBatchId);h===null&&(h=Us(),s=s.insert(d.largestBatchId,h)),h.set(d.getKey(),d)}}const l=Us(),c=s.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach(((d,h)=>l.set(d,h))),!(l.size()>=i)););return W.resolve(l)}ht(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.hr.get(i.largestBatchId).delete(r.key);this.hr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new BR(n,r));let s=this.hr.get(n);s===void 0&&(s=Ge(),this.hr.set(n,s)),this.hr.set(n,s.add(r.key))}}/**
1969 * @license
1970 * Copyright 2017 Google LLC
1971 *
1972 * Licensed under the Apache License, Version 2.0 (the "License");
1973 * you may not use this file except in compliance with the License.
1974 * You may obtain a copy of the License at
1975 *
1976 *   http://www.apache.org/licenses/LICENSE-2.0
1977 *
1978 * Unless required by applicable law or agreed to in writing, software
1979 * distributed under the License is distributed on an "AS IS" BASIS,
1980 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1981 * See the License for the specific language governing permissions and
1982 * limitations under the License.
1983 */class KR{constructor(){this.Pr=new Rt(qn.Ir),this.Tr=new Rt(qn.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,n){const r=new qn(e,n);this.Pr=this.Pr.add(r),this.Tr=this.Tr.add(r)}dr(e,n){e.forEach((r=>this.addReference(r,n)))}removeReference(e,n){this.Ar(new qn(e,n))}Rr(e,n){e.forEach((r=>this.removeReference(r,n)))}Vr(e){const n=new he(new tt([])),r=new qn(n,e),i=new qn(n,e+1),s=[];return this.Tr.forEachInRange([r,i],(o=>{this.Ar(o),s.push(o.key)})),s}mr(){this.Pr.forEach((e=>this.Ar(e)))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){const n=new he(new tt([])),r=new qn(n,e),i=new qn(n,e+1);let s=Ge();return this.Tr.forEachInRange([r,i],(o=>{s=s.add(o.key)})),s}containsKey(e){const n=new qn(e,0),r=this.Pr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class qn{constructor(e,n){this.key=e,this.pr=n}static Ir(e,n){return he.comparator(e.key,n.key)||He(e.pr,n.pr)}static Er(e,n){return He(e.pr,n.pr)||he.comparator(e.key,n.key)}}/**
1984 * @license
1985 * Copyright 2017 Google LLC
1986 *
1987 * Licensed under the Apache License, Version 2.0 (the "License");
1988 * you may not use this file except in compliance with the License.
1989 * You may obtain a copy of the License at
1990 *
1991 *   http://www.apache.org/licenses/LICENSE-2.0
1992 *
1993 * Unless required by applicable law or agreed to in writing, software
1994 * distributed under the License is distributed on an "AS IS" BASIS,
1995 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1996 * See the License for the specific language governing permissions and
1997 * limitations under the License.
1998 */class Iue{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutation
vendor: 9,057 bytes, lines 1998-2043
1998Queue=[],this.yr=1,this.wr=new Rt(qn.Ir)}checkEmpty(e){return W.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new UR(s,n,r,i);this.mutationQueue.push(o);for(const l of i)this.wr=this.wr.add(new qn(l.key,s)),this.indexManager.addToCollectionParentIndex(e,l.key.path.popLast());return W.resolve(o)}lookupMutationBatch(e,n){return W.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.br(r),s=i<0?0:i;return W.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return W.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(e){return W.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new qn(n,0),i=new qn(n,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([r,i],(o=>{const l=this.Sr(o.pr);s.push(l)})),W.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new Rt(He);return n.forEach((i=>{const s=new qn(i,0),o=new qn(i,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],(l=>{r=r.add(l.pr)}))})),W.resolve(this.Dr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;he.isDocumentKey(s)||(s=s.child(""));const o=new qn(new he(s),0);let l=new Rt(He);return this.wr.forEachWhile((c=>{const d=c.key.path;return!!r.isPrefixOf(d)&&(d.length===i&&(l=l.add(c.pr)),!0)}),o),W.resolve(this.Dr(l))}Dr(e){const n=[];return e.forEach((r=>{const i=this.Sr(r);i!==null&&n.push(i)})),n}removeMutationBatch(e,n){Pe(this.Cr(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.wr;return W.forEach(n.mutations,(i=>{const s=new qn(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((()=>{this.wr=r}))}Mn(e){}containsKey(e,n){const r=new qn(n,0),i=this.wr.firstAfterOrEqual(r);return W.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,W.resolve()}Cr(e,n){return this.br(e)}br(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Sr(e){const n=this.br(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/**
1999 * @license
2000 * Copyright 2017 Google LLC
2001 *
2002 * Licensed under the Apache License, Version 2.0 (the "License");
2003 * you may not use this file except in compliance with the License.
2004 * You may obtain a copy of the License at
2005 *
2006 *   http://www.apache.org/licenses/LICENSE-2.0
2007 *
2008 * Unless required by applicable law or agreed to in writing, software
2009 * distributed under the License is distributed on an "AS IS" BASIS,
2010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2011 * See the License for the specific language governing permissions and
2012 * limitations under the License.
2013 */class Rue{constructor(e){this.vr=e,this.docs=(function(){return new Ot(he.comparator)})(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.vr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return W.resolve(r?r.document.mutableCopy():$t.newInvalidDocument(n))}getEntries(e,n){let r=ai();return n.forEach((i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():$t.newInvalidDocument(i))})),W.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=ai();const o=n.path,l=new he(o.child("")),c=this.docs.getIteratorFrom(l);for(;c.hasNext();){const{key:d,value:{document:h}}=c.getNext();if(!o.isPrefixOf(d.path))break;d.path.length>o.length+1||NR(fU(h),r)<=0||(i.has(h.key)||wm(n,h))&&(s=s.insert(h.key,h.mutableCopy()))}return W.resolve(s)}getAllFromCollectionGroup(e,n,r,i){Te()}Fr(e,n){return W.forEach(this.docs,(r=>n(r)))}newChangeBuffer(e){return new xue(this)}getSize(e){return W.resolve(this.size)}}class xue extends yj{constructor(e){super(),this.ar=e}applyChanges(e){const n=[];return this.changes.forEach(((r,i)=>{i.isValidDocument()?n.push(this.ar.addEntry(e,i)):this.ar.removeEntry(r)})),W.waitFor(n)}getFromCache(e,n){return this.ar.getEntry(e,n)}getAllFromCache(e,n){return this.ar.getEntries(e,n)}}/**
2014 * @license
2015 * Copyright 2017 Google LLC
2016 *
2017 * Licensed under the Apache License, Version 2.0 (the "License");
2018 * you may not use this file except in compliance with the License.
2019 * You may obtain a copy of the License at
2020 *
2021 *   http://www.apache.org/licenses/LICENSE-2.0
2022 *
2023 * Unless required by applicable law or agreed to in writing, software
2024 * distributed under the License is distributed on an "AS IS" BASIS,
2025 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2026 * See the License for the specific language governing permissions and
2027 * limitations under the License.
2028 */class kue{constructor(e){this.persistence=e,this.Mr=new rl((n=>lu(n)),vm),this.lastRemoteSnapshotVersion=Oe.min(),this.highestTargetId=0,this.Or=0,this.Nr=new KR,this.targetCount=0,this.Lr=hu.Nn()}forEachTarget(e,n){return this.Mr.forEach(((r,i)=>n(i))),W.resolve()}getLastRemoteSnapshotVersion(e){return W.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return W.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Lr.next(),W.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Or&&(this.Or=n),W.resolve()}qn(e){this.Mr.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Lr=new hu(n),this.highestTargetId=n),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,n){return this.qn(n),this.targetCount+=1,W.resolve()}updateTargetData(e,n){return this.qn(n),W.resolve()}removeTargetData(e,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,W.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Mr.forEach(((o,l)=>{l.sequenceNumber<=n&&r.get(l.targetId)===null&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,l.targetId)),i++)})),W.waitFor(s).next((()=>i))}getTargetCount(e){return W.resolve(this.targetCount)}getTargetData(e,n){const r=this.Mr.get(n)||null;return W.resolve(r)}addMatchingKeys(e,n,r){return this.Nr.dr(n,r),W.resolve()}removeMatchingKeys(e,n,r){this.Nr.Rr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach((o=>{s.push(i.markPotentiallyOrphaned(e,o))})),W.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Nr.Vr(n),W.resolve()}getMatchingKeysForTargetId(e,n){const r=this.Nr.gr(n);return W.resolve(r)}containsKey(e,n){return W.resolve(this.Nr.containsKey(n))}}/**
2029 * @license
2030 * Copyright 2017 Google LLC
2031 *
2032 * Licensed under the Apache License, Version 2.0 (the "License");
2033 * you may not use this file except in compliance with the License.
2034 * You may obtain a copy of the License at
2035 *
2036 *   http://www.apache.org/licenses/LICENSE-2.0
2037 *
2038 * Unless required by applicable law or agreed to in writing, software
2039 * distributed under the License is distributed on an "AS IS" BASIS,
2040 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2041 * See the License for the specific language governing permissions and
2042 * limitations under the License.
2043 */class wj{constructor(e,n){this.Br={},this.overlays={},this.kr=new si(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new kue(this),this.indexManager=new fue,this.remoteDocumentCache=(function(i){return new Rue(i)})((r=>this.referenceDelegate.Kr(r))),this.serializer=new cj(n),this.$r=new Tue(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new bue,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Br[e.toKey()];return r||(r=new Iue(n,this.referenceDelegate),this.Br[e.toKey()]=r),r}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,n,r){se("MemoryPersistence","Starting transaction:",e);const i=new Cue(this.kr.next());return this.referenceDelegate.Ur(),r(i).next((s=>this.referenceDelegate.Wr(i).next((()=>s)))).toPromise().then((s=>(i.raiseOnCommittedEvent(),s)))}Gr(e,n){return W.or(Object.values(this.Br).map((r=>()=>r.containsKey(e,n))))}}class Cue extends pU{constructor(e){super(),this.currentSequenceNumber=e}}class gw{constructor(e){this.persistence=e,this.zr=new KR,this.jr=null}static Hr(e){return new gw(e)}get Jr(){if(this.jr)return this.jr;throw Te()}addReference(e,n,r){return this.zr.addReference(r,n),this.Jr.delete(r.toString()),W.resolve()}removeReference(e,n,r){return this.zr.removeReference(r,n),this.Jr.add(r.toString()),W.resolve()}markPotentiallyOrphaned(e,n){return this.Jr.add(n.toString()),W.resolve()}
2043removeTarget(e,n){this.zr.Vr(n.targetId).forEach((i=>this.Jr.add(i.toString())));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next((i=>{i.forEach((s=>this.Jr.add(s.toString())))})).next((()=>r.removeTargetData(e,n)))}Ur(){this.jr=new Set}Wr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return W.forEach(this.Jr,(r=>{const i=he.fromPath(r);return this.Yr(e,i).next((s=>{s||n.removeEntry(i,Oe.min())}))})).next((()=>(this.jr=null,n.apply(e))))}updateLimboDocument(e,n){return this.Yr(e,n).next((r=>{r?this.Jr.delete(n.toString()):this.Jr.add(n.toString())}))}Kr(e){return 0}Yr(e,n){return W.or([()=>W.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Gr(e,n)])}}/**
2044 * @license
2045 * Copyright 2020 Google LLC
2046 *
2047 * Licensed under the Apache License, Version 2.0 (the "License");
2048 * you may not use this file except in compliance with the License.
2049 * You may obtain a copy of the License at
2050 *
2051 *   http://www.apache.org/licenses/LICENSE-2.0
2052 *
2053 * Unless required by applicable law or agreed to in writing, software
2054 * distributed under the License is distributed on an "AS IS" BASIS,
2055 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2056 * See the License for the specific language governing permissions and
2057 * limitations under the License.
2058 */class Aue{constructor(e){this.serializer=e}N(e,n,r,i){const s=new cw("createOrUpgrade",n);r<1&&i>=1&&((function(c){c.createObjectStore("owner")})(e),(function(c){c.createObjectStore("mutationQueues",{keyPath:"userId"}),c.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",ON,{unique:!0}),c.createObjectStore("documentMutations")})(e),vD(e),(function(c){c.createObjectStore("remoteDocuments")})(e));let o=W.resolve();return r<3&&i>=3&&(r!==0&&((function(c){c.deleteObjectStore("targetDocuments"),c.deleteObjectStore("targets"),c.deleteObjectStore("targetGlobal")})(e),vD(e)),o=o.next((()=>(function(c){const d=c.store("targetGlobal"),h={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:Oe.min().toTimestamp(),targetCount:0};return d.put("targetGlobalKey",h)})(s)))),r<4&&i>=4&&(r!==0&&(o=o.next((()=>(function(c,d){return d.store("mutations").W().next((h=>{c.deleteObjectStore("mutations"),c.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",ON,{unique:!0});const m=d.store("mutations"),g=h.map((v=>m.put(v)));return W.waitFor(g)}))})(e,s)))),o=o.next((()=>{(function(c){c.createObjectStore("clientMetadata",{keyPath:"clientId"})})(e)}))),r<5&&i>=5&&(o=o.next((()=>this.Xr(s)))),r<6&&i>=6&&(o=o.next((()=>((function(c){c.createObjectStore("remoteDocumentGlobal")})(e),this.ei(s))))),r<7&&i>=7&&(o=o.next((()=>this.ti(s)))),r<8&&i>=8&&(o=o.next((()=>this.ni(e,s)))),r<9&&i>=9&&(o=o.next((()=>{(function(c){c.objectStoreNames.contains("remoteDocumentChanges")&&c.deleteObjectStore("remoteDocumentChanges")})(e)}))),r<10&&i>=10&&(o=o.next((()=>this.ri(s)))),r<11&&i>=11&&(o=o.next((()=>{(function(c){c.createObjectStore("bundles",{keyPath:"bundleId"})})(e),(function(c){c.createObjectStore("namedQueries",{keyPath:"name"})})(e)}))),r<12&&i>=12&&(o=o.next((()=>{(function(c){const d=c.createObjectStore("documentOverlays",{keyPath:hle});d.createIndex("collectionPathOverlayIndex",ple,{unique:!1}),d.createIndex("collectionGroupOverlayIndex",mle,{unique:!1})})(e)}))),r<13&&i>=13&&(o=o.next((()=>(function(c){const d=c.createObjectStore("remoteDocumentsV14",{keyPath:nle});d.createIndex("documentKeyIndex",rle),d.createIndex("collectionGroupIndex",ile)})(e))).next((()=>this.ii(e,s))).next((()=>e.deleteObjectStore("remoteDocuments")))),r<14&&i>=14&&(o=o.next((()=>this.si(e,s)))),r<15&&i>=15&&(o=o.next((()=>(function(c){c.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),c.createObjectStore("indexState",{keyPath:ule}).createIndex("sequenceNumberIndex",cle,{unique:!1}),c.createObjectStore("indexEntries",{keyPath:dle}).createIndex("documentKeyIndex",fle,{unique:!1})})(e)))),o}ei(e){let n=0;return e.store("remoteDocuments").Y(((r,i)=>{n+=Vv(i)})).next((()=>{const r={byteSize:n};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",r)}))}
2058Xr(e){const n=e.store("mutationQueues"),r=e.store("mutations");return n.W().next((i=>W.forEach(i,(s=>{const o=IDBKeyRange.bound([s.userId,-1],[s.userId,s.lastAcknowledgedBatchId]);return r.W("userMutationsIndex",o).next((l=>W.forEach(l,(c=>{Pe(c.userId===s.userId);const d=Dl(this.serializer,c);return pj(e,s.userId,d).next((()=>{}))}))))}))))}ti(e){const n=e.store("targetDocuments"),r=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next((i=>{const s=[];return r.Y(((o,l)=>{const c=new tt(o),d=(function(m){return[0,Hr(m)]})(c);s.push(n.get(d).next((h=>h?W.resolve():(m=>n.put({targetId:0,path:Hr(m),sequenceNumber:i.highestListenSequenceNumber}))(c))))})).next((()=>W.waitFor(s)))}))}ni(e,n){e.createObjectStore("collectionParents",{keyPath:lle});const r=n.store("collectionParents"),i=new GR,s=o=>{if(i.add(o)){const l=o.lastSegment(),c=o.popLast();return r.put({collectionId:l,parent:Hr(c)})}};return n.store("remoteDocuments").Y({J:!0},((o,l)=>{const c=new tt(o);return s(c.popLast())})).next((()=>n.store("documentMutations").Y({J:!0},(([o,l,c],d)=>{const h=$s(l);return s(h.popLast())}))))}ri(e){const n=e.store("targets");return n.Y(((r,i)=>{const s=Dh(i),o=dj(this.serializer,s);return n.put(o)}))}ii(e,n){const r=n.store("remoteDocuments"),i=[];return r.Y(((s,o)=>{const l=n.store("remoteDocumentsV14"),c=(function(m){return m.document?new he(tt.fromString(m.document.name).popFirst(5)):m.noDocument?he.fromSegments(m.noDocument.path):m.unknownDocument?he.fromSegments(m.unknownDocument.path):Te()})(o).path.toArray(),d={prefixPath:c.slice(0,c.length-2),collectionGroup:c[c.length-2],documentId:c[c.length-1],readTime:o.readTime||[0,0],unknownDocument:o.unknownDocument,noDocument:o.noDocument,document:o.document,hasCommittedMutations:!!o.hasCommittedMutations};i.push(l.put(d))})).next((()=>W.waitFor(i)))}si(e,n){const r=n.store("mutations"),i=vj(this.serializer),s=new wj(gw.Hr,this.serializer.ct);return r.W().next((o=>{const l=new Map;return o.forEach((c=>{var d;let h=(d=l.get(c.userId))!==null&&d!==void 0?d:Ge();Dl(this.serializer,c).keys().forEach((m=>h=h.add(m))),l.set(c.userId,h)})),W.forEach(l,((c,d)=>{const h=new Hn(d),m=pw.lt(this.serializer,h),g=s.getIndexManager(h),v=mw.lt(h,this.serializer,g,s.referenceDelegate);return new _j(i,v,m,g).recalculateAndSaveOverlaysForDocumentKeys(new yb(n,si._e),c).next()}))}))}}function vD(t){t.createObjectStore("targetDocuments",{keyPath:ole}).createIndex("documentTargetsIndex",ale,{unique:!0}),t.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",sle,{unique:!0}),t.createObjectStore("targetGlobal")}const QS="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class QR{constructor(e,n,r,i,s,o,l,c,d,h,m=15){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.oi=s,this.window=o,this.document=l,this._i=d,this.ai=h,this.ui=m,this.kr=null,this.qr=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ci=null,this.inForeground=!1,this.li=null,this.hi=null,this.Pi=Number.NEGATIVE_INFINITY,this.Ii=g=>Promise.resolve(),!QR.D())throw new re(H.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new _ue(this,i),this.Ti=n+"main",this.serializer=new cj(c),this.Ei=new zi(this.Ti,this.ui,new Aue(this.serializer)),this.Qr=new pue(this.referenceDelegate,this.serializer),this.remoteDocumentCache=vj(this.serializer),this.$r=new oue,this.window&&this.window.localStorage?this.di=this.window.localStorage:(this.di=null,h===!1&&vn("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.Ai().then((()=>
2058{if(!this.isPrimary&&!this.allowTabSynchronization)throw new re(H.FAILED_PRECONDITION,QS);return this.Ri(),this.Vi(),this.mi(),this.runTransaction("getHighestListenSequenceNumber","readonly",(e=>this.Qr.getHighestSequenceNumber(e)))})).then((e=>{this.kr=new si(e,this._i)})).then((()=>{this.qr=!0})).catch((e=>(this.Ei&&this.Ei.close(),Promise.reject(e))))}fi(e){return this.Ii=async n=>{if(this.started)return e(n)},e(this.isPrimary)}setDatabaseDeletedListener(e){this.Ei.B((async n=>{n.newVersion===null&&await e()}))}setNetworkEnabled(e){this.networkEnabled!==e&&(this.networkEnabled=e,this.oi.enqueueAndForget((async()=>{this.started&&await this.Ai()})))}Ai(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(e=>by(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next((()=>{if(this.isPrimary)return this.gi(e).next((n=>{n||(this.isPrimary=!1,this.oi.enqueueRetryable((()=>this.Ii(!1))))}))})).next((()=>this.pi(e))).next((n=>this.isPrimary&&!n?this.yi(e).next((()=>!1)):!!n&&this.wi(e).next((()=>!0)))))).catch((e=>{if(nl(e))return se("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return se("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((e=>{this.isPrimary!==e&&this.oi.enqueueRetryable((()=>this.Ii(e))),this.isPrimary=e}))}gi(e){return lh(e).get("owner").next((n=>W.resolve(this.Si(n))))}bi(e){return by(e).delete(this.clientId)}async Di(){if(this.isPrimary&&!this.Ci(this.Pi,18e5)){this.Pi=Date.now();const e=await this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(n=>{const r=er(n,"clientMetadata");return r.W().next((i=>{const s=this.vi(i,18e5),o=i.filter((l=>s.indexOf(l)===-1));return W.forEach(o,(l=>r.delete(l.clientId))).next((()=>o))}))})).catch((()=>[]));if(this.di)for(const n of e)this.di.removeItem(this.Fi(n.clientId))}}mi(){this.hi=this.oi.enqueueAfterDelay("client_metadata_refresh",4e3,(()=>this.Ai().then((()=>this.Di())).then((()=>this.mi()))))}Si(e){return!!e&&e.ownerId===this.clientId}pi(e){return this.ai?W.resolve(!0):lh(e).get("owner").next((n=>{if(n!==null&&this.Ci(n.leaseTimestampMs,5e3)&&!this.Mi(n.ownerId)){if(this.Si(n)&&this.networkEnabled)return!0;if(!this.Si(n)){if(!n.allowTabSynchronization)throw new re(H.FAILED_PRECONDITION,QS);return!1}}return!(!this.networkEnabled||!this.inForeground)||by(e).W().next((r=>this.vi(r,5e3).find((i=>{if(this.clientId!==i.clientId){const s=!this.networkEnabled&&i.networkEnabled,o=!this.inForeground&&i.inForeground,l=this.networkEnabled===i.networkEnabled;if(s||o&&l)return!0}return!1}))===void 0))})).next((n=>(this.isPrimary!==n&&se("IndexedDbPersistence",`Client ${n?"is":"is not"} eligible for a primary lease.`),n)))}async shutdown(){this.qr=!1,this.xi(),this.hi&&(this.hi.cancel(),this.hi=null),this.Oi(),this.Ni(),await this.Ei.runTransaction("shutdown","readwrite",["owner","clientMetadata"],(e=>
2058{const n=new yb(e,si._e);return this.yi(n).next((()=>this.bi(n)))})),this.Ei.close(),this.Li()}vi(e,n){return e.filter((r=>this.Ci(r.updateTimeMs,n)&&!this.Mi(r.clientId)))}Bi(){return this.runTransaction("getActiveClients","readonly",(e=>by(e).W().next((n=>this.vi(n,18e5).map((r=>r.clientId))))))}get started(){return this.qr}getMutationQueue(e,n){return mw.lt(e,this.serializer,n,this.referenceDelegate)}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new hue(e,this.serializer.ct.databaseId)}getDocumentOverlayCache(e){return pw.lt(this.serializer,e)}getBundleCache(){return this.$r}runTransaction(e,n,r){se("IndexedDbPersistence","Starting transaction:",e);const i=n==="readonly"?"readonly":"readwrite",s=(function(c){return c===15?yle:c===14?_U:c===13?vU:c===12?gle:c===11?yU:void Te()})(this.ui);let o;return this.Ei.runTransaction(e,i,s,(l=>(o=new yb(l,this.kr?this.kr.next():si._e),n==="readwrite-primary"?this.gi(o).next((c=>!!c||this.pi(o))).next((c=>{if(!c)throw vn(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.oi.enqueueRetryable((()=>this.Ii(!1))),new re(H.FAILED_PRECONDITION,hU);return r(o)})).next((c=>this.wi(o).next((()=>c)))):this.ki(o).next((()=>r(o)))))).then((l=>(o.raiseOnCommittedEvent(),l)))}ki(e){return lh(e).get("owner").next((n=>{if(n!==null&&this.Ci(n.leaseTimestampMs,5e3)&&!this.Mi(n.ownerId)&&!this.Si(n)&&!(this.ai||this.allowTabSynchronization&&n.allowTabSynchronization))throw new re(H.FAILED_PRECONDITION,QS)}))}wi(e){const n={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return lh(e).put("owner",n)}static D(){return zi.D()}yi(e){const n=lh(e);return n.get("owner").next((r=>this.Si(r)?(se("IndexedDbPersistence","Releasing primary lease."),n.delete("owner")):W.resolve()))}Ci(e,n){const r=Date.now();return!(e<r-n)&&(!(e>r)||(vn(`Detected an update time that is in the future: ${e} > ${r}`),!1))}Ri(){this.document!==null&&typeof this.document.addEventListener=="function"&&(this.li=()=>{this.oi.enqueueAndForget((()=>(this.inForeground=this.document.visibilityState==="visible",this.Ai())))},this.document.addEventListener("visibilitychange",this.li),this.inForeground=this.document.visibilityState==="visible")}Oi(){this.li&&(this.document.removeEventListener("visibilitychange",this.li),this.li=null)}Vi(){var e;typeof((e=this.window)===null||e===void 0?void 0:e.addEventListener)=="function"&&(this.ci=()=>{this.xi();const n=/(?:Version|Mobile)\/1[456]/;r$()&&(navigator.appVersion.match(n)||navigator.userAgent.match(n))&&this.oi.enterRestrictedMode(!0),this.oi.enqueueAndForget((()=>this.shutdown()))},this.window.addEventListener("pagehide",this.ci))}Ni(){this.ci&&(this.window.removeEventListener("pagehide",this.ci),this.ci=null)}Mi(e){var n;try{const r=((n=this.di)===null||n===void 0?void 0:n.getItem(this.Fi(e)))!==null;return se("IndexedDbPersistence",`Client '${e}' ${r?"is":"is not"} zombied in LocalStorage`),r}catch(r){return vn("IndexedDbPersistence","Failed to get zombied client id.",r),!1}}xi(){if(this.di)try{this.di.setItem(this.Fi(this.clientId),String(Date.now()))}catch(e){vn("Failed to set zombie client id.",e)}}Li(){if(this.di)try{this.di.removeItem(this.Fi(this.clientId))}catch{}}Fi(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function lh(t){return er(t,"owner")}function by(t){return er(t,"clientMetadata")}function YR(t,e){let n=t.projectId;return t.isDefaultDatabase||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}/**
2059 * @license
2060 * Copyright 2017 Google LLC
2061 *
2062 * Licensed under the Apache License, Version 2.0 (the "License");
2063 * you may not use this file except in compliance with the License.
2064 * You may obtain a copy of the License at
2065 *
2066 *   http://www.apache.org/licenses/LICENSE-2.0
2067 *
2068 * Unless required by applicable law or agreed to in writing, software
2069 * distributed under the License is distributed on an "AS IS" BASIS,
2070 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2071 * See the License for the specific language governing permissions and
2072 * limitations under the License.
2073 */class JR{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.qi=r,this.Qi=i}static Ki(e,n){let r=Ge(),i=Ge();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new JR(e,n.fromCache,r,i)}}/**
2074 * @license
2075 * Copyright 2023 Google LLC
2076 *
2077 * Licensed under the Apache License, Version 2.0 (the "License");
2078 * you may not use this file except in compliance with the License.
2079 * You may obtain a copy of the License at
2080 *
2081 *   http://www.apache.org/licenses/LICENSE-2.0
2082 *
2083 * Unless required by applicable law or agreed to in writing, software
2084 * distributed under the License is distributed on an "AS IS" BASIS,
2085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2086 * See the License for the specific language governing permissions and
2087 * limitations under the License.
2088 */class Pue{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/**
2089 * @license
2090 * Copyright 2019 Google LLC
2091 *
2092 * Licensed under the Apache License, Version 2.0 (the "License");
2093 * you may not use this file except in compliance with the License.
2094 * You may obtain a copy of the License at
2095 *
2096 *   http://www.apache.org/licenses/LICENSE-2.0
2097 *
2098 * Unless required by applicable law or agreed to in writing, software
2099 * distributed under the License is distributed on an "AS IS" BASIS,
2100 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2101 * See the License for the specific language governing permissions and
2102 * limitations under the License.
2103 */class Ej{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=(function(){return r$()?8:zi.v(bv())>0?6:4})()}initialize(e,n){this.zi=e,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.ji(e,n).next((o=>{s.result=o})).next((()=>{if(!s.result)return this.Hi(e,n,i,r).next((o=>{s.result=o}))})).next((()=>{if(s.result)return;const o=new Pue;return this.Ji(e,n,o).next((l=>{if(s.result=l,this.Ui)return this.Yi(e,n,o,l.size)}))})).next((()=>s.result))}Yi(e,n,r,i){return r.documentReadCount<this.Wi?(Rc()<=ut.DEBUG&&se("QueryEngine","SDK will not create cache indexes for query:",xc(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Wi,"documents"),W.resolve()):(Rc()<=ut.DEBUG&&se("QueryEngine","Query:",xc(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.Gi*i?(Rc()<=ut.DEBUG&&se("QueryEngine","The SDK decides to create cache indexes for query:",xc(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Gr(n))):W.resolve())}ji(e,n){if(WN(n))return W.resolve(null);let r=Gr(n);return this.indexManager.getIndexType(e,r).next((i=>i===0?null:(n.limit!==null&&i===1&&(n=Dv(n,null,"F"),r=Gr(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next((s=>{const o=Ge(...s);return this.zi.getDocuments(e,o).next((l=>this.indexManager.getMinOffset(e,r).next((c=>{const d=this.Zi(n,l);return this.Xi(n,d,o,c.readTime)?this.ji(e,Dv(n,null,"F")):this.es(e,d,n,c)}))))})))))}Hi(e,n,r,i){return WN(n)||i.isEqual(Oe.min())?W.resolve(null):this.zi.getDocuments(e,r).next((s=>{const o=this.Zi(n,s);return this.Xi(n,o,r,i)?W.resolve(null):(Rc()<=ut.DEBUG&&se("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),xc(n)),this.es(e,o,n,dU(i,-1)).next((l=>l)))}))}Zi(e,n){let r=new Rt(DU(e));return n.forEach(((i,s)=>{wm(e,s)&&(r=r.add(s))})),r}Xi(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Ji(e,n,r){return Rc()<=ut.DEBUG&&se("QueryEngine","Using full collection scan to execute query:",xc(n)),this.zi.getDocumentsMatchingQuery(e,n,ki.min(),r)}es(e,n,r,i){return this.zi.getDocumentsMatchingQuery(e,r,i).next((s=>(n.forEach((o=>{s=s.insert(o.key,o)})),s)))}}/**
2104 * @license
2105 * Copyright 2020 Google LLC
2106 *
2107 * Licensed under the Apache License, Version 2.0 (the "License");
2108 * you may not use this file except in compliance with the License.
2109 * You may obtain a copy of the License at
2110 *
2111 *   http://www.apache.org/licenses/LICENSE-2.0
2112 *
2113 * Unless required by applicable law or agreed to in writing, software
2114 * distributed under the License is distributed on an "AS IS" BASIS,
2115 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2116 * See the License for the specific language governing permissions and
2117 * limitations under the License.
2118 */class Oue{constructor(e,n,r,i){this.persistence=e,this.ts=n,this.serializer
2118=i,this.ns=new Ot(He),this.rs=new rl((s=>lu(s)),vm),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(r)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new _j(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(n=>e.collect(n,this.ns)))}}function Sj(t,e,n,r){return new Oue(t,e,n,r)}async function Tj(t,e){const n=me(t);return await n.persistence.runTransaction("Handle user change","readonly",(r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next((s=>(i=s,n._s(e),n.mutationQueue.getAllMutationBatches(r)))).next((s=>{const o=[],l=[];let c=Ge();for(const d of i){o.push(d.batchId);for(const h of d.mutations)c=c.add(h.key)}for(const d of s){l.push(d.batchId);for(const h of d.mutations)c=c.add(h.key)}return n.localDocuments.getDocuments(r,c).next((d=>({us:d,removedBatchIds:o,addedBatchIds:l})))}))}))}function Nue(t,e){const n=me(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(r=>{const i=e.batch.keys(),s=n.os.newChangeBuffer({trackRemovals:!0});return(function(l,c,d,h){const m=d.batch,g=m.keys();let v=W.resolve();return g.forEach((E=>{v=v.next((()=>h.getEntry(c,E))).next((S=>{const w=d.docVersions.get(E);Pe(w!==null),S.version.compareTo(w)<0&&(m.applyToRemoteDocument(S,d),S.isValidDocument()&&(S.setReadTime(d.commitVersion),h.addEntry(S)))}))})),v.next((()=>l.mutationQueue.removeMutationBatch(c,m)))})(n,r,e,s).next((()=>s.apply(r))).next((()=>n.mutationQueue.performConsistencyCheck(r))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,(function(l){let c=Ge();for(let d=0;d<l.mutationResults.length;++d)l.mutationResults[d].transformResults.length>0&&(c=c.add(l.batch.mutations[d].key));return c})(e)))).next((()=>n.localDocuments.getDocuments(r,i)))}))}function bj(t){const e=me(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(n=>e.Qr.getLastRemoteSnapshotVersion(n)))}function Due(t,e){const n=me(t),r=e.snapshotVersion;let i=n.ns;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(s=>{const o=n.os.newChangeBuffer({trackRemovals:!0});i=n.ns;const l=[];
2118e.targetChanges.forEach(((h,m)=>{const g=i.get(m);if(!g)return;l.push(n.Qr.removeMatchingKeys(s,h.removedDocuments,m).next((()=>n.Qr.addMatchingKeys(s,h.addedDocuments,m))));let v=g.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(m)!==null?v=v.withResumeToken(Un.EMPTY_BYTE_STRING,Oe.min()).withLastLimboFreeSnapshotVersion(Oe.min()):h.resumeToken.approximateByteSize()>0&&(v=v.withResumeToken(h.resumeToken,r)),i=i.insert(m,v),(function(S,w,b){return S.resumeToken.approximateByteSize()===0||w.snapshotVersion.toMicroseconds()-S.snapshotVersion.toMicroseconds()>=3e8?!0:b.addedDocuments.size+b.modifiedDocuments.size+b.removedDocuments.size>0})(g,v,h)&&l.push(n.Qr.updateTargetData(s,v))}));let c=ai(),d=Ge();if(e.documentUpdates.forEach((h=>{e.resolvedLimboDocuments.has(h)&&l.push(n.persistence.referenceDelegate.updateLimboDocument(s,h))})),l.push(Ij(s,o,e.documentUpdates).next((h=>{c=h.cs,d=h.ls}))),!r.isEqual(Oe.min())){const h=n.Qr.getLastRemoteSnapshotVersion(s).next((m=>n.Qr.setTargetsMetadata(s,s.currentSequenceNumber,r)));l.push(h)}return W.waitFor(l).next((()=>o.apply(s))).next((()=>n.localDocuments.getLocalViewOfDocuments(s,c,d))).next((()=>c))})).then((s=>(n.ns=i,s)))}function Ij(t,e,n){let r=Ge(),i=Ge();return n.forEach((s=>r=r.add(s))),e.getEntries(t,r).next((s=>{let o=ai();return n.forEach(((l,c)=>{const d=s.get(l);c.isFoundDocument()!==d.isFoundDocument()&&(i=i.add(l)),c.isNoDocument()&&c.version.isEqual(Oe.min())?(e.removeEntry(l,c.readTime),o=o.insert(l,c)):!d.isValidDocument()||c.version.compareTo(d.version)>0||c.version.compareTo(d.version)===0&&d.hasPendingWrites?(e.addEntry(c),o=o.insert(l,c)):se("LocalStore","Ignoring outdated watch update for ",l,". Current version:",d.version," Watch version:",c.version)})),{cs:o,ls:i}}))}function Mue(t,e){const n=me(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e))))}function gd(t,e){const n=me(t);return n.persistence.runTransaction("Allocate target","readwrite",(r=>{let i;return n.Qr.getTargetData(r,e).next((s=>s?(i=s,W.resolve(i)):n.Qr.allocateTargetId(r).next((o=>(i=new _o(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Qr.addTargetData(r,i).next((()=>i)))))))})).then((r=>{const i=n.ns.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.ns=n.ns.insert(r.targetId,r),n.rs.set(e,r.targetId)),r}))}async function yd(t,e,n){const r=me(t),i=r.ns.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,(o=>r.persistence.referenceDelegate.removeTarget(o,i)))}catch(o){if(!nl(o))throw o;se("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.ns=r.ns.remove(e),r.rs.delete(i.target)}function Fv(t,e,n){const r=me(t);let i=Oe.min(),s=Ge();return r.persistence.runTransaction("Execute query","readwrite",(o=>(function(c,d,h){const m=me(c),g=m.rs.get(h);return g!==void 0?W.resolve(m.ns.get(g)):m.Qr.getTargetData(d,h)})(r,o,Gr(e)).next((l=>{if(l)return i=l.lastLimboFreeSnapshotVersion,r.Qr.getMatchingKeysForTargetId(o,l.targetId).next((c=>{s=c}))})).next((()=>r.ts.getDocumentsMatchingQuery(o,e,n?i:Oe.min(),n?s:Ge()))).next((l=>(kj(r,NU(e),l),{documents:l,hs:s})))))}function Rj(t,e){const n=me(t),r=me(n.Qr),i=n.ns.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(s=>r._t(s,e).next((o=>o?o.target:null))))}function xj(t,e){const n=me(t),r=n.ss.get(e)||Oe.min();return n.persistence.runTransaction("Get new document changes","readonly",(i=>n.os.getAllFromCollectionGroup(i,e,dU(r,-1),Number.MAX_SAFE_INTEGER))).then((i=>(kj(n,e,i),i)))}function kj(t,e,n){let r=t.ss.get(e)||Oe.min();n.forEach(((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)})),t.ss.set(e,r)}async function Lue(t,e,n,r){const i=me(t);let s=Ge(),o=ai();for(const d of n){const h=e.Ps(d.metadata.name);d.document&&(s=s.add(h));const m=e.Is(d);m.setReadTime(e.Ts(d.metadata.readTime)),o=o.insert(h,m)}const l=i.os.newChangeBuffer({trackRemovals:!0}
2118),c=await gd(i,(function(h){return Gr(Bd(tt.fromString(`__bundle__/docs/${h}`)))})(r));return i.persistence.runTransaction("Apply bundle documents","readwrite",(d=>Ij(d,l,o).next((h=>(l.apply(d),h))).next((h=>i.Qr.removeMatchingKeysForTargetId(d,c.targetId).next((()=>i.Qr.addMatchingKeys(d,s,c.targetId))).next((()=>i.localDocuments.getLocalViewOfDocuments(d,h.cs,h.ls))).next((()=>h.cs))))))}async function Vue(t,e,n=Ge()){const r=await gd(t,Gr(qR(e.bundledQuery))),i=me(t);return i.persistence.runTransaction("Save named query","readwrite",(s=>{const o=_n(e.readTime);if(r.snapshotVersion.compareTo(o)>=0)return i.$r.saveNamedQuery(s,e);const l=r.withResumeToken(Un.EMPTY_BYTE_STRING,o);return i.ns=i.ns.insert(l.targetId,l),i.Qr.updateTargetData(s,l).next((()=>i.Qr.removeMatchingKeysForTargetId(s,r.targetId))).next((()=>i.Qr.addMatchingKeys(s,n,r.targetId))).next((()=>i.$r.saveNamedQuery(s,e)))}))}function _D(t,e){return`firestore_clients_${t}_${e}`}function wD(t,e,n){let r=`firestore_mutations_${t}_${n}`;return e.isAuthenticated()&&(r+=`_${e.uid}`),r}function YS(t,e){return`firestore_targets_${t}_${e}`}class $v{constructor(e,n,r,i){this.user=e,this.batchId=n,this.state=r,this.error=i}static Es(e,n,r){const i=JSON.parse(r);let s,o=typeof i=="object"&&["pending","acknowledged","rejected"].indexOf(i.state)!==-1&&(i.error===void 0||typeof i.error=="object");return o&&i.error&&(o=typeof i.error.message=="string"&&typeof i.error.code=="string",o&&(s=new re(i.error.code,i.error.message))),o?new $v(e,n,i.state,s):(vn("SharedClientState",`Failed to parse mutation state for ID '${n}': ${r}`),null)}ds(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class Xh{constructor(e,n,r){this.targetId=e,this.state=n,this.error=r}static Es(e,n){const r=JSON.parse(n);let i,s=typeof r=="object"&&["not-current","current","rejected"].indexOf(r.state)!==-1&&(r.error===void 0||typeof r.error=="object");return s&&r.error&&(s=typeof r.error.message=="string"&&typeof r.error.code=="string",s&&(i=new re(r.error.code,r.error.message))),s?new Xh(e,r.state,i):(vn("SharedClientState",`Failed to parse target state for ID '${e}': ${n}`),null)}ds(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class Uv{constructor(e,n){this.clientId=e,this.activeTargetIds=n}static Es(e,n){const r=JSON.parse(n);let i=typeof r=="object"&&r.activeTargetIds instanceof Array,s=FR();for(let o=0;i&&o<r.activeTargetIds.length;++o)i=mU(r.activeTargetIds[o]),s=s.add(r.activeTargetIds[o]);return i?new Uv(e,s):(vn("SharedClientState",`Failed to parse client data for instance '${e}': ${n}`),null)}}class XR{constructor(e,n){this.clientId=e,this.onlineState=n}static Es(e){const n=JSON.parse(e);return typeof n=="object"&&["Unknown","Online","Offline"].indexOf(n.onlineState)!==-1&&typeof n.clientId=="string"?new XR(n.clientId,n.onlineState):(vn("SharedClientState",`Failed to parse online state: ${e}`),null)}}class Pb{constructor(){this.activeTargetIds=FR()}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class JS{constructor(e,n,r,i,s){this.window=e,this.oi=n,this.persistenceKey=r,this.Vs=i,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.fs=this.gs.bind(this),this.ps=new Ot(He),this.started=!1,this.ys=[];const o=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=s,this.ws=_D(this.persistenceKey,this.Vs),this.Ss=(function(c){return`firestore_sequence_number_${c}`})(this.persistenceKey),this.ps=this.ps.insert(this.Vs,new Pb),this.bs=new RegExp(`^firestore_clients_${o}_([^_]*)$`),this.Ds=new RegExp(`^firestore_mutations_${o}_(\\d+)(?:_(.*))?$`),this.Cs=new RegExp(`^firestore_targets_${o}_(\\d+)$`),this.vs=(function(c){return`firestore_online_state_${c}`})(this.persistenceKey),this.Fs=(function(c){return`firestore_bundle_loaded_v2_${c}`})(this.persistenceKey),this.window.addEventListener("storage",this.fs)}static D(e){return!(!e||!e.localStorage)}async start(){const e=await this.syncEngine.Bi();for(const r of e){if(r===this.Vs)continue;const i=this.getItem(_D(this.persistenceKey,r));if(i){const s=Uv.Es(r,i);s&&(this.ps=this.ps.insert(s.clientId,s))}}this.Ms();const n=this.storage.getItem(this.vs);if(n){const r=this.xs(n);r&&this.Os(r)}for(const r of this.ys)this.gs(r);this.ys=[],this.window.addEventListener("pagehide",(()=>this.shutdown())),this.started=!0}writeSequenceNumber(e){this.setItem(this.Ss,JSON.stringify(e))}getAllActiveQueryTargets(){return this.Ns(this.ps)}isActiveQueryTarget(e){let n=!1;return this.ps.forEach(((r,i)=>{i.activeTargetIds.has(e)&&(n=!0)})),n}addPendingMutation(e){this.Ls(e,"pending")}updateMutationState(e,n,r){this.Ls(e,n,r),this.Bs(e)}addLocalQueryTarget(e){let n="not-current";if(this.isActiveQueryTarget(e)){const r=this.storage.getItem(YS(this.persistenceKey,e));if(r){const i=Xh.Es(e,r);i&&(n=i.state)}}return this.ks.As(e),this.Ms(),n}removeLocalQueryTarget(e){this.ks.Rs(e),this.Ms()}isLocalQueryTarget(e){return this.ks.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(YS(this.persistenceKey,e))}updateQueryState(e,n,r){this.qs(e,n,r)}
2118handleUserChange(e,n,r){n.forEach((i=>{this.Bs(i)})),this.currentUser=e,r.forEach((i=>{this.addPendingMutation(i)}))}setOnlineState(e){this.Qs(e)}notifyBundleLoaded(e){this.Ks(e)}shutdown(){this.started&&(this.window.removeEventListener("storage",this.fs),this.removeItem(this.ws),this.started=!1)}getItem(e){const n=this.storage.getItem(e);return se("SharedClientState","READ",e,n),n}setItem(e,n){se("SharedClientState","SET",e,n),this.storage.setItem(e,n)}removeItem(e){se("SharedClientState","REMOVE",e),this.storage.removeItem(e)}gs(e){const n=e;if(n.storageArea===this.storage){if(se("SharedClientState","EVENT",n.key,n.newValue),n.key===this.ws)return void vn("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.oi.enqueueRetryable((async()=>{if(this.started){if(n.key!==null){if(this.bs.test(n.key)){if(n.newValue==null){const r=this.$s(n.key);return this.Us(r,null)}{const r=this.Ws(n.key,n.newValue);if(r)return this.Us(r.clientId,r)}}else if(this.Ds.test(n.key)){if(n.newValue!==null){const r=this.Gs(n.key,n.newValue);if(r)return this.zs(r)}}else if(this.Cs.test(n.key)){if(n.newValue!==null){const r=this.js(n.key,n.newValue);if(r)return this.Hs(r)}}else if(n.key===this.vs){if(n.newValue!==null){const r=this.xs(n.newValue);if(r)return this.Os(r)}}else if(n.key===this.Ss){const r=(function(s){let o=si._e;if(s!=null)try{const l=JSON.parse(s);Pe(typeof l=="number"),o=l}catch(l){vn("SharedClientState","Failed to read sequence number from WebStorage",l)}return o})(n.newValue);r!==si._e&&this.sequenceNumberHandler(r)}else if(n.key===this.Fs){const r=this.Js(n.newValue);await Promise.all(r.map((i=>this.syncEngine.Ys(i))))}}}else this.ys.push(n)}))}}get ks(){return this.ps.get(this.Vs)}Ms(){this.setItem(this.ws,this.ks.ds())}Ls(e,n,r){const i=new $v(this.currentUser,e,n,r),s=wD(this.persistenceKey,this.currentUser,e);this.setItem(s,i.ds())}Bs(e){const n=wD(this.persistenceKey,this.currentUser,e);this.removeItem(n)}Qs(e){const n={clientId:this.Vs,onlineState:e};this.storage.setItem(this.vs,JSON.stringify(n))}qs(e,n,r){const i=YS(this.persistenceKey,e),s=new Xh(e,n,r);this.setItem(i,s.ds())}Ks(e){const n=JSON.stringify(Array.from(e));this.setItem(this.Fs,n)}$s(e){const n=this.bs.exec(e);return n?n[1]:null}Ws(e,n){const r=this.$s(e);return Uv.Es(r,n)}Gs(e,n){const r=this.Ds.exec(e),i=Number(r[1]),s=r[2]!==void 0?r[2]:null;return $v.Es(new Hn(s),i,n)}js(e,n){const r=this.Cs.exec(e),i=Number(r[1]);return Xh.Es(i,n)}xs(e){return XR.Es(e)}Js(e){return JSON.parse(e)}async zs(e){if(e.user.uid===this.currentUser.uid)return this.syncEngine.Zs(e.batchId,e.state,e.error);se("SharedClientState",`Ignoring mutation for non-active user ${e.user.uid}`)}Hs(e){return this.syncEngine.Xs(e.targetId,e.state,e.error)}Us(e,n){const r=n?this.ps.insert(e,n):this.ps.remove(e),i=this.Ns(this.ps),s=this.Ns(r),o=[],l=[];return s.forEach((c=>{i.has(c)||o.push(c)})),i.forEach((c=>{s.has(c)||l.push(c)})),this.syncEngine.eo(o,l).then((()=>{this.ps=r}))}Os(e){this.ps.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}Ns(e){let n=FR();return e.forEach(((r,i)=>{n=n.unionWith(i.activeTargetIds)})),n}}class Cj{constructor(){this.no=new Pb,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,n,r){this.ro[e]=n}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new Pb,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
2119 * @license
2120 * Copyright 2019 Google LLC
2121 *
2122 * Licensed under the Apache License, Version 2.0 (the "License");
2123 * you may not use this file except in compliance with the License.
2124 * You may obtain a copy of the License at
2125 *
2126 *   http://www.apache.org/licenses/LICENSE-2.0
2127 *
2128 * Unless required by applicable law or agreed to in writing, softw
2128are
2129 * distributed under the License is distributed on an "AS IS" BASIS,
2130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2131 * See the License for the specific language governing permissions and
2132 * limitations under the License.
2133 */class Fue{io(e){}shutdown(){}}/**
2134 * @license
2135 * Copyright 2019 Google LLC
2136 *
2137 * Licensed under the Apache License, Version 2.0 (the "License");
2138 * you may not use this file except in compliance with the License.
2139 * You may obtain a copy of the License at
2140 *
2141 *   http://www.apache.org/licenses/LICENSE-2.0
2142 *
2143 * Unless required by applicable law or agreed to in writing, software
2144 * distributed under the License is distributed on an "AS IS" BASIS,
2145 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2146 * See the License for the specific language governing permissions and
2147 * limitations under the License.
2148 */class ED{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){se("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.uo)e(0)}ao(){se("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.uo)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
2149 * @license
2150 * Copyright 2023 Google LLC
2151 *
2152 * Licensed under the Apache License, Version 2.0 (the "License");
2153 * you may not use this file except in compliance with the License.
2154 * You may obtain a copy of the License at
2155 *
2156 *   http://www.apache.org/licenses/LICENSE-2.0
2157 *
2158 * Unless required by applicable law or agreed to in writing, software
2159 * distributed under the License is distributed on an "AS IS" BASIS,
2160 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2161 * See the License for the specific language governing permissions and
2162 * limitations under the License.
2163 */let Iy=null;function XS(){return Iy===null?Iy=(function(){return 268435456+Math.round(2147483648*Math.random())})():Iy++,"0x"+Iy.toString(16)}/**
2164 * @license
2165 * Copyright 2020 Google LLC
2166 *
2167 * Licensed under the Apache License, Version 2.0 (the "License");
2168 * you may not use this file except in compliance with the License.
2169 * You may obtain a copy of the License at
2170 *
2171 *   http://www.apache.org/licenses/LICENSE-2.0
2172 *
2173 * Unless required by applicable law or agreed to in writing, software
2174 * distributed under the License is distributed on an "AS IS" BASIS,
2175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2176 * See the License for the specific language governing permissions and
2177 * limitations under the License.
2178 */const $ue={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
2179 * @license
2180 * Copyright 2017 Google LLC
2181 *
2182 * Licensed under the Apache License, Version 2.0 (the "License");
2183 * you may not use this file except in compliance with the License.
2184 * You may obtain a copy of the License at
2185 *
2186 *   http://www.apache.org/licenses/LICENSE-2.0
2187 *
2188 * Unless required by applicable law or agreed to in writing, software
2189 * distributed under the License is distributed on an "AS IS" BASIS,
2190 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2191 * See the License for the specific language governing permissions and
2192 * limitations under the License.
2193 */class Uue{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}onMessage(e){this.Ao=e}close(){this.ho()}send(e){this.lo(e)}Ro(){this.Io()}Vo(e){this.Eo(e)}mo(e){this.Ao(e)}}/**
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 */const wr="WebChannelConnection";class jue extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.fo=r+"://"+n.host,this.po=`projects/${i}/databases/${s}`,this.yo=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}get wo(){return!1}So(n,r,i,s,o){const l=XS(),c=this.bo(n,r.toUriEncodedString());se("RestConnection",`Sending RPC '${n}' ${l}:`,c,i);const d={"google-cloud-resource-prefix":this.po,"x-goog-request-params":this.yo};return this.Do(d,s,o),this.Co(n,c,d,i).then((h=>(se("RestConnection",`Received RPC '${n}' ${l}: `,h),h)),(h=>{throw ps("RestConnection",`RPC '${n}' ${l} failed with error: `,h,"url: ",c,"request:",i),h}))}vo(n,r,i,s,o,l){return this.So(n,r,i,s,o)}Do(n,r,i){n["X-Goog-Api-Client"]=(function(){return"gl-js/ fire/"+jd})(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach(((s,o)=>n[o]=s)),i&&i.headers.forEach(((s,o)=>n[o]=s))}bo(n,r){const i=$ue[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}Co(e,n,r,i){const s=XS();return new Promise(((o,l)=>{const c=new Vae;c.setWithCredentials(!0),c.listenOnce(Mae.COMPLETE,(()=>{try{switch(c.getLastErrorCode()){case GS.NO_ERROR:const h=c.getResponseJson();se(wr,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(h)),o(h);break;case GS.TIMEOUT:se(wr,`RPC '${e}' ${s} timed out`),l(new re(H.DEADLINE_EXCEEDED,"Request time out"));break;case GS.HTTP_ERROR:const m=c.getStatus();if(se(wr,`RPC '${e}' ${s} failed with status:`,m,"response text:",c.getResponseText()),m>0){let g=c.getResponseJson();Array.isArray(g)&&(g=g[0]);const v=g?.error;if(v&&v.status&&v.message){const E=(function(w){const b=w.toLowerCase().replace(/_/g,"-");return Object.values(H).indexOf(b)>=0?b:H.UNKNOWN})(v.status);l(new re(E,v.message))}else l(new re(H.UNKNOWN,"Server responded with status "+c.getStatus()))}else l(new re(H.UNAVAILABLE,"Connection failed."));break;default:Te()}}finally{se(wr,`RPC '${e}' ${s} completed.`)}}));const d=JSON.stringify(i);se(wr,`RPC '${e}' ${s} sending request:`,i),c.send(n,"POST",d,r,15)}))}Fo(e,n,r){const i=XS(),s=[this.fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=Nae(),l=Dae(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},d=this.longPollingOptions.timeoutSeconds;d!==void 0&&(c.longPollingTimeout=Math.round(1e3*d)),this.useFetchStreams&&(c.useFetchStreams=!0),this.Do(c.initMessageHeaders,n,r),c.encodeInitMessageHeaders=!0;const h=s.join("");se(wr,`Creating RPC '${e}' stream ${i}: ${h}`,c);const m=o.createWebChannel(h,c);let g=!1,v=!1;const E=new Uue({lo:w=>{v?se(wr,`Not sending because RPC '${e}' stream ${i} is closed:`,w):(g||(se(wr,`Opening RPC '${e}' stream ${i} transport.`),m.open(),g=!0),se(wr,`RPC '${e}' stream ${i} sending:`,w),m.send(w))},ho:()=>m.close()}),S=(w,b,C)=>{w.listen(b,(I=>{try{C(I)}catch(P){setTimeout((()=>{throw P}),0)}}))};return S(m,wy.EventType.OPEN,(()=>{v||se(wr,`RPC '${e}' stream ${i} transport opened.`)})),S(m,wy.EventType.CLOSE,(()=>{v||(v=!0,se(wr,`RPC '${e}' stream ${i} transport closed`),E.Vo())})),S(m,wy.EventType.ERROR,(w=>{v||(v=!0,ps(wr,`RPC '${e}' stream ${i} transport errored:`,w),E.Vo(new re(H.UNAVAILABLE,"The operation could not be completed")))})),S(m,wy.EventType.MESSAGE,(w=>{var b;if(!v){const C=w.data[0];Pe(!!C);const I=C,P=I.error||((b=I[0])===null||b===void 0?void 0:b.error);if(P){se(wr,`RPC '${e}' stream ${i} received error:`,P);const x=P.status;let N=(function(L){const F=Rn[L];if(F!==void 0)return KU(F)})(x),k=P.message;N===void 0&&(N=H.INTERNAL,k="Unknown error status: "+x+" with message "+P.message),v=!0,E.Vo(new re(N,k)),m.close()}else se(wr,`RPC '${e}' stream ${i} received:`,C),E.mo(C)}})),S(l,Lae.STAT_EVENT,(w=>{w.stat===kN.PROXY?se(wr,`RPC '${e}' stream ${i} detected buffering proxy`):w.stat===kN.NOPROXY&&se(wr,`RPC '${e}' stream ${i} detected no buffering proxy`)})),setTimeout((()=>{E.Ro()}),0),E}}/**
2209 * @license
2210 * Copyright 2020 Google LLC
2211 *
2212 * Licensed under the Apache License, Version 2.0 (the "License");
2213 * you may not use this file except in compliance with the License.
2214 * You may obtain a copy of the License at
2215 *
2216 *   http://www.apache.org/licenses/LICENSE-2.0
2217 *
2218 * Unless required by applicable law or agreed to in writing, software
2219 * distributed under the License is distributed on an "AS IS" BASIS,
2220 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2221 * See the License for the specific language governing permissions and
2222 * limitations under the License.
2223 *//**
2224 * @license
2225 * Copyright 2020 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 Aj(){return typeof window<"u"?window:null}function Qy(){return typeof document<"u"?document:null}/**
2239 * @license
2240 * Copyright 2020 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 */function bm(t){return new Qle(t,!0)}/**
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, software
2264 * distributed under the License is distributed on an "AS IS" BASIS,
2265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2266 * See the License for the specific language governing permissions and
2267 * limitations under the License.
2268 */class ZR{constructor(e,n,r=1e3,i=1.5,s=6e4){this.oi=e,this.timerId=n,this.Mo=r,this.xo=i,this.Oo=s,this.No=0,this.Lo=null,this.Bo=Date.now(),this.reset()}reset(){this.No=0}ko(){this.No=this.Oo}qo(e){this.cancel();const n=Math.floor(this.No+this.Qo()),r=Math.max(0,Date.now()-this.Bo),i=Math.max(0,n-r);i>0&&se("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.No} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Lo=this.oi.enqueueAfterDelay(this.timerId,i,(()=>(this.Bo=Date.now(),e()))),this.No*=this.xo,this.No<this.Mo&&(this.No=this.Mo),this.No>this.Oo&&(this.No=this.Oo)}Ko(){this.Lo!==null&&(this.Lo.skipDelay(),this.Lo=null)}cancel(){this.Lo!==null&&(this.Lo.cancel(),this.Lo=null)}Qo(){return(Math.random()-.5)*this.No}}/**
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 Pj{constructor(e,n,r,i,s,o,l,c){this.oi=e,this.$o=r,this.Uo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=l,this.listener=c,this.state=0,this.Wo=0,this.Go=null,this.zo=null,this.stream=null,this.jo=new ZR(e,n)}Ho(){return this.state===1||this.state===5||this.Jo()}Jo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Yo()}async stop(){this.Ho()&&await this.close(0)}Zo(){this.state=0,this.jo.reset()}Xo(){this.Jo()&&this.Go===null&&(this.Go=this.oi.enqueueAfterDelay(this.$o,6e4,(()=>this.e_())))}t_(e){this.n_(),this.stream.send(e)}async e_(){if(this.Jo())return this.close(0)}
2283n_(){this.Go&&(this.Go.cancel(),this.Go=null)}r_(){this.zo&&(this.zo.cancel(),this.zo=null)}async close(e,n){this.n_(),this.r_(),this.jo.cancel(),this.Wo++,e!==4?this.jo.reset():n&&n.code===H.RESOURCE_EXHAUSTED?(vn(n.toString()),vn("Using maximum backoff delay to prevent overloading the backend."),this.jo.ko()):n&&n.code===H.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.i_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.To(n)}i_(){}auth(){this.state=1;const e=this.s_(this.Wo),n=this.Wo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([r,i])=>{this.Wo===n&&this.o_(r,i)}),(r=>{e((()=>{const i=new re(H.UNKNOWN,"Fetching auth token failed: "+r.message);return this.__(i)}))}))}o_(e,n){const r=this.s_(this.Wo);this.stream=this.a_(e,n),this.stream.Po((()=>{r((()=>(this.state=2,this.zo=this.oi.enqueueAfterDelay(this.Uo,1e4,(()=>(this.Jo()&&(this.state=3),Promise.resolve()))),this.listener.Po())))})),this.stream.To((i=>{r((()=>this.__(i)))})),this.stream.onMessage((i=>{r((()=>this.onMessage(i)))}))}Yo(){this.state=5,this.jo.qo((async()=>{this.state=0,this.start()}))}__(e){return se("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}s_(e){return n=>{this.oi.enqueueAndForget((()=>this.Wo===e?n():(se("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Bue extends Pj{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}a_(e,n){return this.connection.Fo("Listen",e,n)}onMessage(e){this.jo.reset();const n=Xle(this.serializer,e),r=(function(s){if(!("targetChange"in s))return Oe.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Oe.min():o.readTime?_n(o.readTime):Oe.min()})(e);return this.listener.u_(n,r)}c_(e){const n={};n.database=Rb(this.serializer),n.addTarget=(function(s,o){let l;const c=o.target;if(l=Ov(c)?{documents:ij(s,c)}:{query:sj(s,c).ut},l.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){l.resumeToken=XU(s,o.resumeToken);const d=bb(s,o.expectedCount);d!==null&&(l.expectedCount=d)}else if(o.snapshotVersion.compareTo(Oe.min())>0){l.readTime=md(s,o.snapshotVersion.toTimestamp());const d=bb(s,o.expectedCount);d!==null&&(l.expectedCount=d)}return l})(this.serializer,e);const r=eue(this.serializer,e);r&&(n.labels=r),this.t_(n)}l_(e){const n={};n.database=Rb(this.serializer),n.removeTarget=e,this.t_(n)}}class zue extends Pj{constructor(e,n,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s,this.h_=!1}get P_(){return this.h_}start(){this.h_=!1,this.lastStreamToken=void 0,super.start()}i_(){this.h_&&this.I_([])}a_(e,n){return this.connection.Fo("Write",e,n)}onMessage(e){if(Pe(!!e.streamToken),this.lastStreamToken=e.streamToken,this.h_){this.jo.reset();const n=Zle(e.writeResults,e.commitTime),r=_n(e.commitTime);return this.listener.T_(r,n)}return Pe(!e.writeResults||e.writeResults.length===0),this.h_=!0,this.listener.E_()}d_(){const e={};e.database=Rb(this.serializer),this.t_(e)}I_(e){const n={streamToken:this.lastStreamToken,writes:e.map((r=>Mp(this.serializer,r)))};this.t_(n)}}/**
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 Wue extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer
2298=i,this.A_=!1}R_(){if(this.A_)throw new re(H.FAILED_PRECONDITION,"The client has already been terminated.")}So(e,n,r,i){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([s,o])=>this.connection.So(e,Ib(n,r),i,s,o))).catch((s=>{throw s.name==="FirebaseError"?(s.code===H.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new re(H.UNKNOWN,s.toString())}))}vo(e,n,r,i,s){return this.R_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([o,l])=>this.connection.vo(e,Ib(n,r),i,o,l,s))).catch((o=>{throw o.name==="FirebaseError"?(o.code===H.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new re(H.UNKNOWN,o.toString())}))}terminate(){this.A_=!0,this.connection.terminate()}}class que{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.m_=0,this.f_=null,this.g_=!0}p_(){this.m_===0&&(this.y_("Unknown"),this.f_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.f_=null,this.w_("Backend didn't respond within 10 seconds."),this.y_("Offline"),Promise.resolve()))))}S_(e){this.state==="Online"?this.y_("Unknown"):(this.m_++,this.m_>=1&&(this.b_(),this.w_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.y_("Offline")))}set(e){this.b_(),this.m_=0,e==="Online"&&(this.g_=!1),this.y_(e)}y_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}w_(e){const n=`Could not reach Cloud Firestore backend. ${e}
2299This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.g_?(vn(n),this.g_=!1):se("OnlineStateTracker",n)}b_(){this.f_!==null&&(this.f_.cancel(),this.f_=null)}}/**
2300 * @license
2301 * Copyright 2017 Google LLC
2302 *
2303 * Licensed under the Apache License, Version 2.0 (the "License");
2304 * you may not use this file except in compliance with the License.
2305 * You may obtain a copy of the License at
2306 *
2307 *   http://www.apache.org/licenses/LICENSE-2.0
2308 *
2309 * Unless required by applicable law or agreed to in writing, software
2310 * distributed under the License is distributed on an "AS IS" BASIS,
2311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2312 * See the License for the specific language governing permissions and
2313 * limitations under the License.
2314 */class Hue{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.D_=[],this.C_=new Map,this.v_=new Set,this.F_=[],this.M_=s,this.M_.io((o=>{r.enqueueAndForget((async()=>{il(this)&&(se("RemoteStore","Restarting streams for network reachability change."),await(async function(c){const d=me(c);d.v_.add(4),await qd(d),d.x_.set("Unknown"),d.v_.delete(4),await Im(d)})(this))}))})),this.x_=new que(r,i)}}async function Im(t){if(il(t))for(const e of t.F_)await e(!0)}async function qd(t){for(const e of t.F_)await e(!1)}function yw(t,e){const n=me(t);n.C_.has(e.targetId)||(n.C_.set(e.targetId,e),nx(n)?tx(n):Gd(n).Jo()&&ex(n,e))}function vd(t,e){const n=me(t),r=Gd(n);n.C_.delete(e),r.Jo()&&Oj(n,e),n.C_.size===0&&(r.Jo()?r.Xo():il(n)&&n.x_.set("Unknown"))}function ex(t,e){if(t.O_.Oe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Oe.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Gd(t).c_(e)}function Oj(t,e){t.O_.Oe(e),Gd(t).l_(e)}function tx(t){t.O_=new qle({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),_t:e=>t.C_.get(e)||null,nt:()=>t.datastore.serializer.databaseId}),Gd(t).start(),t.x_.p_()}function nx(t){return il(t)&&!Gd(t).Ho()&&t.C_.size>0}function il(t){return me(t).v_.size===0}function Nj(t){t.O_=void 0}async function Gue(t){t.C_.forEach(((e,n)=>{ex(t,e)}))}async function Kue(t,e){Nj(t),nx(t)?(t.x_.S_(e),tx(t)):t.x_.set("Unknown")}async function Que(t,e,n){if(t.x_.set("Online"),e instanceof JU&&e.state===2&&e.cause)try{await(async function(i,s){const o=s.cause;for(const l of s.targetIds)i.C_.has(l)&&(await i.remoteSyncer.rejectListen(l,o),i.C_.delete(l),i.O_.removeTarget(l))})(t,e)}catch(r){se("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await jv(t,r)}else if(e instanceof Ky?t.O_.$e(e):e instanceof YU?t.O_.Je(e):t.O_.Ge(e),!n.isEqual(Oe.min()))try{const r=await bj(t.localStore);n.compareTo(r)>=0&&await(function(s,o){const l=s.O_.it(o);
2314return l.targetChanges.forEach(((c,d)=>{if(c.resumeToken.approximateByteSize()>0){const h=s.C_.get(d);h&&s.C_.set(d,h.withResumeToken(c.resumeToken,o))}})),l.targetMismatches.forEach(((c,d)=>{const h=s.C_.get(c);if(!h)return;s.C_.set(c,h.withResumeToken(Un.EMPTY_BYTE_STRING,h.snapshotVersion)),Oj(s,c);const m=new _o(h.target,c,d,h.sequenceNumber);ex(s,m)})),s.remoteSyncer.applyRemoteEvent(l)})(t,n)}catch(r){se("RemoteStore","Failed to raise snapshot:",r),await jv(t,r)}}async function jv(t,e,n){if(!nl(e))throw e;t.v_.add(1),await qd(t),t.x_.set("Offline"),n||(n=()=>bj(t.localStore)),t.asyncQueue.enqueueRetryable((async()=>{se("RemoteStore","Retrying IndexedDB access"),await n(),t.v_.delete(1),await Im(t)}))}function Dj(t,e){return e().catch((n=>jv(t,n,e)))}async function Hd(t){const e=me(t),n=Ha(e);let r=e.D_.length>0?e.D_[e.D_.length-1].batchId:-1;for(;Yue(e);)try{const i=await Mue(e.localStore,r);if(i===null){e.D_.length===0&&n.Xo();break}r=i.batchId,Jue(e,i)}catch(i){await jv(e,i)}Mj(e)&&Lj(e)}function Yue(t){return il(t)&&t.D_.length<10}function Jue(t,e){t.D_.push(e);const n=Ha(t);n.Jo()&&n.P_&&n.I_(e.mutations)}function Mj(t){return il(t)&&!Ha(t).Ho()&&t.D_.length>0}function Lj(t){Ha(t).start()}async function Xue(t){Ha(t).d_()}async function Zue(t){const e=Ha(t);for(const n of t.D_)e.I_(n.mutations)}async function ece(t,e,n){const r=t.D_.shift(),i=jR.from(r,e,n);await Dj(t,(()=>t.remoteSyncer.applySuccessfulWrite(i))),await Hd(t)}async function tce(t,e){e&&Ha(t).P_&&await(async function(r,i){if((function(o){return GU(o)&&o!==H.ABORTED})(i.code)){const s=r.D_.shift();Ha(r).Zo(),await Dj(r,(()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i))),await Hd(r)}})(t,e),Mj(t)&&Lj(t)}async function SD(t,e){const n=me(t);n.asyncQueue.verifyOperationInProgress(),se("RemoteStore","RemoteStore received new credentials");const r=il(n);n.v_.add(3),await qd(n),r&&n.x_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.v_.delete(3),await Im(n)}async function Ob(t,e){const n=me(t);e?(n.v_.delete(2),await Im(n)):e||(n.v_.add(2),await qd(n),n.x_.set("Unknown"))}function Gd(t){return t.N_||(t.N_=(function(n,r,i){const s=me(n);return s.R_(),new Bue(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)})(t.datastore,t.asyncQueue,{Po:Gue.bind(null,t),To:Kue.bind(null,t),u_:Que.bind(null,t)}),t.F_.push((async e=>{e?(t.N_.Zo(),nx(t)?tx(t):t.x_.set("Unknown")):(await t.N_.stop(),Nj(t))}))),t.N_}function Ha(t){return t.L_||(t.L_=(function(n,r,i){const s=me(n);return s.R_(),new zue(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)})(t.datastore,t.asyncQueue,{Po:Xue.bind(null,t),To:tce.bind(null,t),E_:Zue.bind(null,t),T_:ece.bind(null,t)}),t.F_.push((async e=>{e?(t.L_.Zo(),await Hd(t)):(await t.L_.stop(),t.D_.length>0&&(se("RemoteStore",`Stopping write stream with ${t.D_.length} pending writes`),t.D_=[]))}))),t.L_}/**
2315 * @license
2316 * Copyright 2017 Google LLC
2317 *
2318 * Licensed under the Apache License, Version 2.0 (the "License");
2319 * you may not use this file except in compliance with the License.
2320 * You may obtain a copy of the License at
2321 *
2322 *   http://www.apache.org/licenses/LICENSE-2.0
2323 *
2324 * Unless required by applicable law or agreed to in writing, software
2325 * distributed under the License is distributed on an "AS IS" BASIS,
2326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2327 * See the License for the specific language governing permissions and
2328 * limitations under the License.
2329 */class rx{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Gn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((o=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,l=new rx(e,n,o,i,s);return l.start(r),l}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new re(H.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((e=>
2329this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Kd(t,e){if(vn("AsyncQueue",`${e}: ${t}`),nl(t))return new re(H.UNAVAILABLE,`${e}: ${t}`);throw t}/**
2330 * @license
2331 * Copyright 2017 Google LLC
2332 *
2333 * Licensed under the Apache License, Version 2.0 (the "License");
2334 * you may not use this file except in compliance with the License.
2335 * You may obtain a copy of the License at
2336 *
2337 *   http://www.apache.org/licenses/LICENSE-2.0
2338 *
2339 * Unless required by applicable law or agreed to in writing, software
2340 * distributed under the License is distributed on an "AS IS" BASIS,
2341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2342 * See the License for the specific language governing permissions and
2343 * limitations under the License.
2344 */class qc{constructor(e){this.comparator=e?(n,r)=>e(n,r)||he.comparator(n.key,r.key):(n,r)=>he.comparator(n.key,r.key),this.keyedMap=Oh(),this.sortedSet=new Ot(this.comparator)}static emptySet(e){return new qc(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((n,r)=>(e(n),!1)))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof qc)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach((n=>{e.push(n.toString())})),e.length===0?"DocumentSet ()":`DocumentSet (
2345  `+e.join(`  
2346`)+`
2347)`}copy(e,n){const r=new qc;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/**
2348 * @license
2349 * Copyright 2017 Google LLC
2350 *
2351 * Licensed under the Apache License, Version 2.0 (the "License");
2352 * you may not use this file except in compliance with the License.
2353 * You may obtain a copy of the License at
2354 *
2355 *   http://www.apache.org/licenses/LICENSE-2.0
2356 *
2357 * Unless required by applicable law or agreed to in writing, software
2358 * distributed under the License is distributed on an "AS IS" BASIS,
2359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2360 * See the License for the specific language governing permissions and
2361 * limitations under the License.
2362 */class TD{constructor(){this.B_=new Ot(he.comparator)}track(e){const n=e.doc.key,r=this.B_.get(n);r?e.type!==0&&r.type===3?this.B_=this.B_.insert(n,e):e.type===3&&r.type!==1?this.B_=this.B_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.B_=this.B_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.B_=this.B_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.B_=this.B_.remove(n):e.type===1&&r.type===2?this.B_=this.B_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.B_=this.B_.insert(n,{type:2,doc:e.doc}):Te():this.B_=this.B_.insert(n,e)}k_(){const e=[];return this.B_.inorderTraversal(((n,r)=>{e.push(r)})),e}}class _d{constructor(e,n,r,i,s,o,l,c,d){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=l,this.excludesMetadataChanges=c,this.hasCachedResults=d}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach((l=>{o.push({type:0,doc:l})})),new _d(e,n,qc.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&_m(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}}/**
2363 * @license
2364 * Copyright 2017 Google LLC
2365 *
2366 * Licensed under the Apache License, Version 2.0 (the "License");
2367 * you may not use this file except in compliance with the License.
2368 * You may obtain a copy of the License at
2369 *
2370 *   http://www.apache.org/licenses/LICENSE-2.0
2371 *
2372 * Unless required by applicable law or agreed to in writing, software
2373 * distributed under the License is distributed on an "AS IS" BASIS,
2374 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2375 * See the License for the specific language governing permissions and
2376 * limitations under the License.
2377 */class nce{constructor(){this.q_=void 0,this.Q_=[]}K_(){return this.Q_.some((e=>e.U_()))}}class rce{constructor(){this.queries=new rl((e=>OU(e)),_m),this.onlineState="Unknown",this.W_=new Set}}async function ix(t,e){const n=me(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.K_()&&e.U_()&&(r=2):(s=new nce,r=e.U_()?0:1);try{switch(r){case 0:s.q_=await n.onListen(i,!0);break;case 1:s.q_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(o){const l=Kd(o,`Initialization of query '${xc(e.query)}' failed`);return void e.onError(l)}n.queries.set(i,s),s.Q_.push(e),e.G_(n.onlineState),s.q_&&e.z_(s.q_)&&ox(n)}async function sx(t,e){const n=me(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const o=s.Q_.indexOf(e);o>=0&&(s.Q_.splice(o,1),s.Q_.length===0?i=e.U_()?0:1:!s.K_()&&e.U_()&&(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 ice(t,e){const n=me(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const l of o.Q_)l.z_(i)&&(r=!0);o.q_=i}}r&&ox(n)}function sce(t,e,n){const r=me(t),i=r.queries.get(e);if(i)for(const s of i.Q_)s.onError(n);r.queries.delete(e)}function ox(t){t.W_.forEach((e=>{e.next()}))}var Nb,bD;(bD=Nb||(Nb={})).j_="default",bD.Cache="cache";class ax{constructor(e,n,r){this.query=e,this.H_=n,this.J_=!1,this.Y_=null,this.onlineState="Unknown",this.options=r||{}}z_(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new _d(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.J_?this.Z_(e)&&(this.H_.next(e),n=!0):this.X_(e,this.onlineState)&&(this.ea(e),n=!0),this.Y_=e,n}onError(e){this.H_.error(e)}G_(e){this.onlineState=e;let n=!1;return this.Y_&&!this.J_&&this.X_(this.Y_,e)&&(this.ea(this.Y_),n=!0),n}X_(e,n){if(!e.fromCache||!this.U_())return!0;const r=n!=="Offline";return(!this.options.ta||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}Z_(e){if(e.docChanges.length>0)return!0;const n=this.Y_&&this.Y_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}ea(e){e=_d.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.J_=!0,this.H_.next(e)}U_(){return this.options.source!==Nb.Cache}}/**
2378 * @license
2379 * Copyright 2020 Google LLC
2380 *
2381 * Licensed under the Apache License, Version 2.0 (the "License");
2382 * you may not use this file except in compliance with the License.
2383 * You may obtain a copy of the License at
2384 *
2385 *   http://www.apache.org/licenses/LICENSE-2.0
2386 *
2387 * Unless required by applicable law or agreed to in writing, software
2388 * distributed under the License is distributed on an "AS IS" BASIS,
2389 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2390 * See the License for the specific language governing permissions and
2391 * limitations under the License.
2392 */class oce{constructor(e,n){this.na=e,this.byteLength=n}ra(){return"metadata"in this.na}}/**
2393 * @license
2394 * Copyright 2020 Google LLC
2395 *
2396 * Licensed under the Apache License, Version 2.0 (the "License");
2397 * you may not use this file except in compliance with the License.
2398 * You may obtain a copy of the License at
2399 *
2400 *   http://www.apache.org/licenses/LICENSE-2.0
2401 *
2402 * Unless required by applicable law or agreed to in writing, software
2403 * distributed under the License is distributed on an "AS IS" BASIS,
2404 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2405 * See the License for the specific language governing permissions and
2406 * limitations under the License.
2407 */class ID{constructor(e){this.serializer=e}Ps(e){return Ws(this.serializer,e)}Is(e){return e.metadata.exists?rj(this.serializer,e.document,!1):$t.newNoDocument(this.Ps(e.metadata.name),this.Ts(e.metadata.readTime))}Ts(e){return _n(e)}}class ace{constructor(e,n,r){this.ia=e,this.localStore=n,this.serializer=r,this.queries=[],this.documents=[],this.collectionGroups=new Set,this.progress=Vj(e)}sa(e){this.progress.bytesLoaded+=e.byteLength;let n=this.progress.documentsLoaded;if(e.na.namedQuery)this.queries.push(e.na.namedQuery);else if(e.na.documentMetadata){this.documents.push({metadata:e.na.documentMetadata}),e.na.documentMetadata.exists||++n;const r=tt.fromString(e.na.documentMetadata.name);this.collectionGroups.add(r.get(r.length-2))}else e.na.document&&(this.documents[this.documents.length-1].document=e.na.document,++n);return n!==this.progress.documentsLoaded?(this.progress.documentsLoaded=n,Object.assign({},this.progress)):null}oa(e){const n=new Map,r=new ID(this.serializer);for(const i of e)if(i.metadata.queries){const s=r.Ps(i.metadata.name);for(const o of i.metadata.queries){const l=(n.get(o)||Ge()).add(s);n.set(o,l)}}return n}async complete(){const e=await Lue(this.localStore,new ID(this.serializer),this.documents,this.ia.id),n=this.oa(this.documents);for(const r of this.queries)await Vue(this.localStore,r,n.get(r.name));return this.progress.taskState="Success",{progress:this.progress,_a:this.collectionGroups,aa:e}}}function Vj(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}/**
2408 * @license
2409 * Copyright 2017 Google LLC
2410 *
2411 * Licensed under the Apache License, Version 2.0 (the "License");
2412 * you may not use this file except in compliance with the License.
2413 * You may obtain a copy of the License at
2414 *
2415 *   http://www.apache.org/licenses/LICENSE-2.0
2416 *
2417 * Unless required by applicable law or agreed to in writing, software
2418 * distributed under the License is distributed on an "AS IS" BASIS,
2419 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2420 * See the License for the specific language governing permissions and
2421 * limitations under the License.
2422 */class Fj{constructor(e){this.key=e}}class $j{constructor(e){this.key=e}}class Uj{constructor(e,n){this.query=e,this.ua=n,this.ca=null,this.hasCachedResults=!1,this.current=!1,this.la=Ge(),this.mutatedKeys=Ge(),this.ha=DU(e),this.Pa=new qc(this.ha)}get Ia(){return this.ua}Ta(e,n){const r=n?n.Ea:new TD,i=n?n.Pa:this.Pa;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,l=!1;const c=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,d=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal(((h,m)=>{const g=i.get(h),v=wm(this.query,m)?m:null,E=!!g&&this.mutatedKeys.has(g.key),S=!!v&&(v.hasLocalMutations||this.mutatedKeys.has(v.key)&&v.hasCommittedMutations);let w=!1;g&&v?g.data.isEqual(v.data)?E!==S&&(r.track({type:3,doc:v}),w=!0):this.da(g,v)||(r.track({type:2,doc:v}),w=!0,(c&&this.ha(v,c)>0||d&&this.ha(v,d)<0)&&(l=!0)):!g&&v?(r.track({type:0,doc:v}),w=!0):g&&!v&&(r.track({type:1,doc:g}),w=!0,(c||d)&&(l=!0)),w&&(v?(o=o.add(v),s=S?s.add(h):s.delete(h)):(o=o.delete(h),s=s.delete(h)))})),this.query.limit!==null)for(;o.size>this.query.limit;){const h=this.query.limitType==="F"?o.last():o.first();o=o.delete(h.key),s=s.delete(h.key),r.track({type:1,doc:h})}return{Pa:o,Ea:r,Xi:l,mutatedKeys:s}}da(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r,i){const s=this.Pa;this.Pa=e.Pa,this.mutatedKeys=e.mutatedKeys;const o=e.Ea.k_();o.sort(((h,m)=>(function(v,E){const S=w=>{switch(w){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Te()}};return S(v)-S(E)})(h.type,m.type)||this.ha(h.doc,m.doc))),this.Aa(r),i=i!=null&&i;const l=n&&!i?this.Ra():[],c=this.la.size===0&&this.current&&!i?1:0,d=c!==this.ca;return this.ca=c,o.length!==0||d?{snapshot:new _d(this.query,e.Pa,s,o,e.mutatedKeys,c===0,d,!1,!!r&&r.resumeToken.approximateByteSize()>0),Va:l}:{Va:l}}G_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Pa:this.Pa,Ea:new TD,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{Va:[]}}ma(e){return!this.ua.has(e)&&!!this.Pa.has(e)&&!this.Pa.get(e).hasLocalMutations}
2422Aa(e){e&&(e.addedDocuments.forEach((n=>this.ua=this.ua.add(n))),e.modifiedDocuments.forEach((n=>{})),e.removedDocuments.forEach((n=>this.ua=this.ua.delete(n))),this.current=e.current)}Ra(){if(!this.current)return[];const e=this.la;this.la=Ge(),this.Pa.forEach((r=>{this.ma(r.key)&&(this.la=this.la.add(r.key))}));const n=[];return e.forEach((r=>{this.la.has(r)||n.push(new $j(r))})),this.la.forEach((r=>{e.has(r)||n.push(new Fj(r))})),n}fa(e){this.ua=e.hs,this.la=Ge();const n=this.Ta(e.documents);return this.applyChanges(n,!0)}ga(){return _d.fromInitialDocuments(this.query,this.Pa,this.mutatedKeys,this.ca===0,this.hasCachedResults)}}class lce{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class uce{constructor(e){this.key=e,this.pa=!1}}class cce{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.ya={},this.wa=new rl((l=>OU(l)),_m),this.Sa=new Map,this.ba=new Set,this.Da=new Ot(he.comparator),this.Ca=new Map,this.va=new KR,this.Fa={},this.Ma=new Map,this.xa=hu.Ln(),this.onlineState="Unknown",this.Oa=void 0}get isPrimaryClient(){return this.Oa===!0}}async function dce(t,e,n=!0){const r=vw(t);let i;const s=r.wa.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.ga()):i=await jj(r,e,n,!0),i}async function fce(t,e){const n=vw(t);await jj(n,e,!0,!1)}async function jj(t,e,n,r){const i=await gd(t.localStore,Gr(e)),s=i.targetId,o=n?t.sharedClientState.addLocalQueryTarget(s):"not-current";let l;return r&&(l=await lx(t,e,s,o==="current",i.resumeToken)),t.isPrimaryClient&&n&&yw(t.remoteStore,i),l}async function lx(t,e,n,r,i){t.Na=(m,g,v)=>(async function(S,w,b,C){let I=w.view.Ta(b);I.Xi&&(I=await Fv(S.localStore,w.query,!1).then((({documents:k})=>w.view.Ta(k,I))));const P=C&&C.targetChanges.get(w.targetId),x=C&&C.targetMismatches.get(w.targetId)!=null,N=w.view.applyChanges(I,S.isPrimaryClient,P,x);return Db(S,w.targetId,N.Va),N.snapshot})(t,m,g,v);const s=await Fv(t.localStore,e,!0),o=new Uj(e,s.hs),l=o.Ta(s.documents),c=Tm.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),d=o.applyChanges(l,t.isPrimaryClient,c);Db(t,n,d.Va);const h=new lce(e,n,o);return t.wa.set(e,h),t.Sa.has(n)?t.Sa.get(n).push(e):t.Sa.set(n,[e]),d.snapshot}async function hce(t,e,n){const r=me(t),i=r.wa.get(e),s=r.Sa.get(i.targetId);if(s.length>1)return r.Sa.set(i.targetId,s.filter((o=>!_m(o,e)))),void r.wa.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2422ientState.isActiveQueryTarget(i.targetId)||await yd(r.localStore,i.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(i.targetId),n&&vd(r.remoteStore,i.targetId),wd(r,i.targetId)})).catch(tl)):(wd(r,i.targetId),await yd(r.localStore,i.targetId,!0))}async function pce(t,e){const n=me(t),r=n.wa.get(e),i=n.Sa.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),vd(n.remoteStore,r.targetId))}async function mce(t,e,n){const r=fx(t);try{const i=await(function(o,l){const c=me(o),d=Qt.now(),h=l.reduce(((v,E)=>v.add(E.key)),Ge());let m,g;return c.persistence.runTransaction("Locally write mutations","readwrite",(v=>{let E=ai(),S=Ge();return c.os.getEntries(v,h).next((w=>{E=w,E.forEach(((b,C)=>{C.isValidDocument()||(S=S.add(b))}))})).next((()=>c.localDocuments.getOverlayedDocuments(v,E))).next((w=>{m=w;const b=[];for(const C of l){const I=Ble(C,m.get(C.key).overlayedDocument);I!=null&&b.push(new Vo(C.key,I,TU(I.value.mapValue),Ht.exists(!0)))}return c.mutationQueue.addMutationBatch(v,d,b,l)})).next((w=>{g=w;const b=w.applyToLocalDocumentSet(m,S);return c.documentOverlayCache.saveOverlays(v,w.batchId,b)}))})).then((()=>({batchId:g.batchId,changes:LU(m)})))})(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),(function(o,l,c){let d=o.Fa[o.currentUser.toKey()];d||(d=new Ot(He)),d=d.insert(l,c),o.Fa[o.currentUser.toKey()]=d})(r,i.batchId,n),await Fo(r,i.changes),await Hd(r.remoteStore)}catch(i){const s=Kd(i,"Failed to persist write");n.reject(s)}}async function Bj(t,e){const n=me(t);try{const r=await Due(n.localStore,e);
2422e.targetChanges.forEach(((i,s)=>{const o=n.Ca.get(s);o&&(Pe(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.pa=!0:i.modifiedDocuments.size>0?Pe(o.pa):i.removedDocuments.size>0&&(Pe(o.pa),o.pa=!1))})),await Fo(n,r,e)}catch(r){await tl(r)}}function RD(t,e,n){const r=me(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.wa.forEach(((s,o)=>{const l=o.view.G_(e);l.snapshot&&i.push(l.snapshot)})),(function(o,l){const c=me(o);c.onlineState=l;let d=!1;c.queries.forEach(((h,m)=>{for(const g of m.Q_)g.G_(l)&&(d=!0)})),d&&ox(c)})(r.eventManager,e),i.length&&r.ya.u_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function gce(t,e,n){const r=me(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Ca.get(e),s=i&&i.key;if(s){let o=new Ot(he.comparator);o=o.insert(s,$t.newNoDocument(s,Oe.min()));const l=Ge().add(s),c=new Sm(Oe.min(),new Map,new Ot(He),o,l);await Bj(r,c),r.Da=r.Da.remove(s),r.Ca.delete(e),dx(r)}else await yd(r.localStore,e,!1).then((()=>wd(r,e,n))).catch(tl)}async function yce(t,e){const n=me(t),r=e.batch.batchId;try{const i=await Nue(n.localStore,e);cx(n,r,null),ux(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Fo(n,i)}catch(i){await tl(i)}}async function vce(t,e,n){const r=me(t);try{const i=await(function(o,l){const c=me(o);return c.persistence.runTransaction("Reject batch","readwrite-primary",(d=>{let h;return c.mutationQueue.lookupMutationBatch(d,l).next((m=>
2422(Pe(m!==null),h=m.keys(),c.mutationQueue.removeMutationBatch(d,m)))).next((()=>c.mutationQueue.performConsistencyCheck(d))).next((()=>c.documentOverlayCache.removeOverlaysForBatchId(d,h,l))).next((()=>c.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(d,h))).next((()=>c.localDocuments.getDocuments(d,h)))}))})(r.localStore,e);cx(r,e,n),ux(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await Fo(r,i)}catch(i){await tl(i)}}async function _ce(t,e){const n=me(t);il(n.remoteStore)||se("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const r=await(function(o){const l=me(o);return l.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(c=>l.mutationQueue.getHighestUnacknowledgedBatchId(c)))})(n.localStore);if(r===-1)return void e.resolve();const i=n.Ma.get(r)||[];i.push(e),n.Ma.set(r,i)}catch(r){const i=Kd(r,"Initialization of waitForPendingWrites() operation failed");e.reject(i)}}function ux(t,e){(t.Ma.get(e)||[]).forEach((n=>{n.resolve()})),t.Ma.delete(e)}function cx(t,e,n){const r=me(t);let i=r.Fa[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(n?s.reject(n):s.resolve(),i=i.remove(e)),r.Fa[r.currentUser.toKey()]=i}}
vendor: 1,172 bytes, line 2422
2422function wd(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Sa.get(e))t.wa.delete(r),n&&t.ya.La(r,n);t.Sa.delete(e),t.isPrimaryClient&&t.va.Vr(e).forEach((r=>{t.va.containsKey(r)||zj(t,r)}))}function zj(t,e){t.ba.delete(e.path.canonicalString());const n=t.Da.get(e);n!==null&&(vd(t.remoteStore,n),t.Da=t.Da.remove(e),t.Ca.delete(n),dx(t))}function Db(t,e,n){for(const r of n)r instanceof Fj?(t.va.addReference(r.key,e),wce(t,r)):r instanceof $j?(se("SyncEngine","Document no longer in limbo: "+r.key),t.va.removeReference(r.key,e),t.va.containsKey(r.key)||zj(t,r.key)):Te()}function wce(t,e){const n=e.key,r=n.path.canonicalString();t.Da.get(n)||t.ba.has(r)||(se("SyncEngine","New document in limbo: "+n),t.ba.add(r),dx(t))}function dx(t){for(;t.ba.size>0&&t.Da.size<t.maxConcurrentLimboResolutions;){const e=t.ba.values().next().value;t.ba.delete(e);const n=new he(tt.fromString(e)),r=t.xa.next();t.Ca.set(r,new uce(n)),t.Da=t.Da.insert(n,r),yw(t.remoteStore,new _o(Gr(Bd(n.path)),r,"TargetPurposeLimboResolution",si._e))}}async function Fo(t,e,n){const r=me(t),i=[],s=[],o=[];r.wa.isEmpty()||(r.wa.forEach(((l,c)=>{o.push(r.Na(c,e,n).then((d=>
2422{if((d||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(c.targetId,d?.fromCache?"not-current":"current"),d){i.push(d);const h=JR.Ki(c.targetId,d);s.push(h)}})))})),await Promise.all(o),r.ya.u_(i),await(async function(c,d){const h=me(c);try{await h.persistence.runTransaction("notifyLocalViewChanges","readwrite",(m=>W.forEach(d,(g=>W.forEach(g.qi,(v=>h.persistence.referenceDelegate.addReference(m,g.targetId,v))).next((()=>W.forEach(g.Qi,(v=>h.persistence.referenceDelegate.removeReference(m,g.targetId,v)))))))))}catch(m){if(!nl(m))throw m;se("LocalStore","Failed to update sequence numbers: "+m)}for(const m of d){const g=m.targetId;if(!m.fromCache){const v=h.ns.get(g),E=v.snapshotVersion,S=v.withLastLimboFreeSnapshotVersion(E);h.ns=h.ns.insert(g,S)}}})(r.localStore,s))}async function Ece(t,e){const n=me(t);if(!n.currentUser.isEqual(e)){se("SyncEngine","User change. New user:",e.toKey());const r=await Tj(n.localStore,e);n.currentUser=e,(function(s,o){s.Ma.forEach((l=>{l.forEach((c=>{c.reject(new re(H.CANCELLED,o))}))})),s.Ma.clear()})(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Fo(n,r.us)}}function Sce(t,e){const n=me(t),r=n.Ca.get(e);if(r&&r.pa)return Ge().add(r.key);{let i=Ge();const s=n.Sa.get(e);if(!s)return i;for(const o of s){const l=n.wa.get(o);i=i.unionWith(l.view.Ia)}return i}}async function Tce(t,e){const n=me(t),r=await Fv(n.localStore,e.query,!0),i=e.view.fa(r);return n.isPrimaryClient&&Db(n,e.targetId,i.Va),i}async function bce(t,e){const n=me(t);return xj(n.localStore,e).then((r=>Fo(n,r)))}async function Ice(t,e,n,r){const i=me(t),s=await(function(l,c){const d=me(l),h=me(d.mutationQueue);return d.persistence.runTransaction("Lookup mutation documents","readonly",(m=>h.vn(m,c).next((g=>g?d.localDocuments.getDocuments(m,g):W.resolve(null)))))})(i.localStore,e);s!==null?(n==="pending"?await Hd(i.remoteStore):n==="acknowledged"||n==="rejected"?(cx(i,e,r||null),ux(i,e),(function(l,c){me(me(l).mutationQueue).Mn(c)})(i.localStore,e)):Te(),await Fo(i,s)):se("SyncEngine","Cannot apply mutation batch with id: "+e)}async function Rce(t,e){const n=me(t);if(vw(n),fx(n),e===!0&&n.Oa!==!0){const r=n.sharedClientState.getAllActiveQueryTargets(),i=await xD(n,r.toArray());n.Oa=!0,await Ob(n.remoteStore,!0);for(const s of i)yw(n.remoteStore,s)}else if(e===!1&&n.Oa!==!1){const r=[];let i=Promise.resolve();n.Sa.forEach(((s,o)=>{n.sharedClientState.isLocalQueryTarget(o)?r.push(o):i=i.then((()=>(wd(n,o),yd(n.localStore,o,!0)))),vd(n.remoteStore,o)})),await i,await xD(n,r),(function(o){const l=me(o);l.Ca.forEach(((c,d)=>{vd(l.remoteStore,d)})),l.va.mr(),l.Ca=new Map,l.Da=new Ot(he.comparator)})(n),n.Oa=!1,await Ob(n.remoteStore,!1)}}async function xD(t,e,n){const r=me(t),i=[],s=[];for(const o of e){let l;const c=r.Sa.get(o);if(c&&c.length!==0){l=await gd(r.localStore,Gr(c[0]));for(const d of c){const h=r.wa.get(d),m=await Tce(r,h);m.snapshot&&s.push(m.snapshot)}}else{const d=await Rj(r.localStore,o);l=await gd(r.localStore,d),await lx(r,Wj(d),o,!1,l.resumeToken)}i.push(l)}return r.ya.u_(s),i}function Wj(t){return PU(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function xce(t){return(function(n){return me(me(n).persistence).Bi()})(me(t).localStore)}async function kce(t,e,n,r){const i=me(t);if(i.Oa)return void se("SyncEngine","Ignoring unexpected query state notification.");const s=i.Sa.get(e);if(s&&s.length>0)switch(n){case"current":case"not-current":{const o=await xj(i.localStore,NU(s[0])),l=Sm.createSynthesizedRemoteEventForCurrentChange(e,n==="current",Un.EMPTY_BYTE_STRING);await Fo(i,o,l);break}case"rejected":await yd(i.localStore,e,!0),wd(i,e,r);break;default:Te()}}async function Cce(t,e,n){const r=vw(t);if(r.Oa){for(const i of e){if(r.Sa.has(i)&&r.sharedClientState.isActiveQueryTarget(i)){se("SyncEngine","Adding an already active target "+i);continue}const s=await Rj(r.localStore,i),o=await gd(r.localStore,s);await lx(r,Wj(s),o.targetId,!1,o.resumeToken),yw(r.remoteStore,o)}for(const i of n)r.Sa.has(i)&&await yd(r.localStore,i,!1).then((()=>{vd(r.remoteStore,i),wd(r,i)})).catch(tl)}}function vw(t){const e=me(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=Bj.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=Sce.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=gce.bind(null,e),e.ya.u_=ice.bind(null,e.eventManager),e.ya.La=sce.bind(null,e.eventManager),e}function fx(t){const e=me(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=yce.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=vce.bind(null,e),e}function Ace(t,e,n){const r=me(t);(async function(s,o,l){try{const c=await o.getMetadata();if(await(function(v,E){const S=me(v),w=_n(E.createTime);return S.persistence.runTransaction("hasNewerBundle","readonly",(b=>S.$r.getBundleMetadata(b,E.id))).then((b=>!!b&&b.createTime.compareTo(w)>=0))})(s.localStore,c))return await o.close(),l._completeWith((function(v){return{taskState:"Success",documentsLoaded:v.totalDocuments,bytesLoaded:v.totalBytes,totalDocuments:v.totalDocuments,totalBytes:v.totalBytes}})(c)),Promise.resolve(new Set);l._updateProgress(Vj(c));const d=new ace(c,s.localStore,o.serializer);let h=await o.Ba();for(;h;){const g=await d.sa(h);g&&l._updateProgress(g),h=await o.Ba()}const m=await d.complete();return await Fo(s,m.aa,void 0),await(function(v,E){const S=me(v);return S.persistence.runTransaction("Save bundle","readwrite",(w=>S.$r.saveBundleMetadata(w,E)))})(s.localStore,c),l._completeWith(m.progress),Promise.resolve(m._a)}catch(c){return ps("SyncEngine",`Loading bundle failed with ${c}`),l._failWith(c),Promise.resolve(new Set)}})(r,e,n).then((i=>
2422{r.sharedClientState.notifyBundleLoaded(i)}))}class Mb{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=bm(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return Sj(this.persistence,new Ej,e.initialUser,this.serializer)}createPersistence(e){return new wj(gw.Hr,this.serializer)}createSharedClientState(e){return new Cj}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class qj extends Mb{constructor(e,n,r){super(),this.ka=e,this.cacheSizeBytes=n,this.forceOwnership=r,this.synchronizeTabs=!1}async initialize(e){await super.initialize(e),await this.ka.initialize(this,e),await fx(this.ka.syncEngine),await Hd(this.ka.remoteStore),await this.persistence.fi((()=>(this.gcScheduler&&!this.gcScheduler.started&&this.gcScheduler.start(),this.indexBackfillerScheduler&&!this.indexBackfillerScheduler.started&&this.indexBackfillerScheduler.start(),Promise.resolve())))}createLocalStore(e){return Sj(this.persistence,new Ej,e.initialUser,this.serializer)}createGarbageCollectionScheduler(e,n){const r=this.persistence.referenceDelegate.garbageCollector;return new gue(r,e.asyncQueue,n)}createIndexBackfillerScheduler(e,n){const r=new Zae(n,this.persistence);return new Xae(e.asyncQueue,r)}createPersistence(e){const n=YR(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),r=this.cacheSizeBytes!==void 0?ni.withCacheSize(this.cacheSizeBytes):ni.DEFAULT;return new QR(this.synchronizeTabs,n,e.clientId,r,e.asyncQueue,Aj(),Qy(),this.serializer,this.sharedClientState,!!this.forceOwnership)}createSharedClientState(e){return new Cj}}class Pce extends qj{constructor(e,n){super(e,n,!1),this.ka=e,this.cacheSizeBytes=n,this.synchronizeTabs=!0}async initialize(e){await super.initialize(e);const n=this.ka.syncEngine;this.sharedClientState instanceof JS&&(this.sharedClientState.syncEngine={Zs:Ice.bind(null,n),Xs:kce.bind(null,n),eo:Cce.bind(null,n),Bi:xce.bind(null,n),Ys:bce.bind(null,n)},await this.sharedClientState.start()),await this.persistence.fi((async r=>{await Rce(this.ka.syncEngine,r),this.gcScheduler&&(r&&!this.gcScheduler.started?this.gcScheduler.start():r||this.gcScheduler.stop()),this.indexBackfillerScheduler&&(r&&!this.indexBackfillerScheduler.started?this.indexBackfillerScheduler.start():r||this.indexBackfillerScheduler.stop())}))}createSharedClientState(e){const n=Aj();if(!JS.D(n))throw new re(H.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const r=YR(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new JS(n,e.asyncQueue,r,e.clientId,e.initialUser)}}class hx{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=>RD(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=Ece.bind(null,this.syncEngine),await Ob(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return(function(){return new rce})()}createDatastore(e){const n=bm(e.databaseInfo.databaseId),r=(function(s){return new jue(s)})(e.databaseInfo);return(function(s,o,l,c){return new Wue(s,o,l,c)})(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return(function(r,i,s,o,l){return new Hue(r,i,s,o,l)})(this.localStore,this.datastore,e.asyncQueue,(n=>RD(this.syncEngine,n,0)),(function(){return ED.D()?new ED:new Fue})())}createSyncEngine(e,n){return(function(i,s,o,l,c,d,h){const m=new cce(i,s,o,l,c,d);return h&&(m.Oa=!0),m})(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
2422ientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e;await(async function(r){const i=me(r);se("RemoteStore","RemoteStore shutting down."),i.v_.add(5),await qd(i),i.M_.shutdown(),i.x_.set("Unknown")})(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate()}}/**
2423 * @license
2424 * Copyright 2020 Google LLC
2425 *
2426 * Licensed under the Apache License, Version 2.0 (the "License");
2427 * you may not use this file except in compliance with the License.
2428 * You may obtain a copy of the License at
2429 *
2430 *   http://www.apache.org/licenses/LICENSE-2.0
2431 *
2432 * Unless required by applicable law or agreed to in writing, software
2433 * distributed under the License is distributed on an "AS IS" BASIS,
2434 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2435 * See the License for the specific language governing permissions and
2436 * limitations under the License.
2437 */function kD(t,e=10240){let n=0;return{async read(){if(n<t.byteLength){const r={value:t.slice(n,n+e),done:!1};return n+=e,r}return{done:!0}},async cancel(){},releaseLock(){},closed:Promise.resolve()}}/**
2438 * @license
2439 * Copyright 2020 Google LLC
2440 *
2441 * Licensed under the Apache License, Version 2.0 (the "License");
2442 * you may not use this file except in compliance with the License.
2443 * You may obtain a copy of the License at
2444 *
2445 *   http://www.apache.org/licenses/LICENSE-2.0
2446 *
2447 * Unless required by applicable law or agreed to in writing, software
2448 * distributed under the License is distributed on an "AS IS" BASIS,
2449 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2450 * See the License for the specific language governing permissions and
2451 * limitations under the License.
2452 *//**
2453 * @license
2454 * Copyright 2017 Google LLC
2455 *
2456 * Licensed under the Apache License, Version 2.0 (the "License");
2457 * you may not use this file except in compliance with the License.
2458 * You may obtain a copy of the License at
2459 *
2460 *   http://www.apache.org/licenses/LICENSE-2.0
2461 *
2462 * Unless required by applicable law or agreed to in writing, software
2463 * distributed under the License is distributed on an "AS IS" BASIS,
2464 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2465 * See the License for the specific language governing permissions and
2466 * limitations under the License.
2467 */class _w{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.qa(this.observer.next,e)}error(e){this.observer.error?this.qa(this.observer.error,e):vn("Uncaught Error in snapshot listener:",e.toString())}Qa(){this.muted=!0}qa(e,n){this.muted||setTimeout((()=>{this.muted||e(n)}),0)}}/**
2468 * @license
2469 * Copyright 2020 Google LLC
2470 *
2471 * Licensed under the Apache License, Version 2.0 (the "License");
2472 * you may not use this file except in compliance with the License.
2473 * You may obtain a copy of the License at
2474 *
2475 *   http://www.apache.org/licenses/LICENSE-2.0
2476 *
2477 * Unless required by applicable law or agreed to in writing, software
2478 * distributed under the License is distributed on an "AS IS" BASIS,
2479 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2480 * See the License for the specific language governing permissions and
2481 * limitations under the License.
2482 */class Oce{constructor(e,n){this.Ka=e,this.serializer=n,this.metadata=new Gn,this.buffer=new Uint8Array,this.$a=(function(){return new TextDecoder("utf-8")})(),this.Ua().then((r=>{r&&r.ra()?this.metadata.resolve(r.na.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is
2483             ${JSON.stringify(r?.na)}`))}),(r=>this.metadata.reject(r)))}close(){return this.Ka.cancel()}async getMetadata(){return this.metadata.promise}async Ba(){return await this.getMetadata(),this.Ua()}async Ua(){const e=await this.Wa();if(e===null)return null;const n=this.$a.decode(e),r=Number(n);isNaN(r)&&this.Ga(`length string (${n}) is not valid number`);const i=await this.za(r);return new oce(JSON.parse(i),e.length+r)}ja(){return this.buffer.findIndex((e=>e===123))}async Wa(){for(;this.ja()<0&&!await this.Ha(););if(this.buffer.length===0)return null;const e=this.ja();e<0&&this.Ga("Reached the end of bundle when a length string is expected.");const n=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),n}async za(e){for(;this.buffer.length<e;)await this.Ha()&&this.Ga("Reached the end of bundle when more is expected.");const n=this.$a.decode(this.buffer.slice(0,e));return this.buffer=this.buffer.slice(e),n}Ga(e){throw this.Ka.cancel(),new Error(`Invalid bundle format: ${e}`)}async Ha(){const e=await this.Ka.read();if(!e.done){const n=new Uint8Array(this.buffer.length+e.value.length);n.set(this.buffer),n.set(e.value,this.buffer.length),this.buffer=n}return e.done}}/**
2484 * @license
2485 * Copyright 2017 Google LLC
2486 *
2487 * Licensed under the Apache License, Version 2.0 (the "License");
2488 * you may not use this file except in compliance with the License.
2489 * You may obtain a copy of the License at
2490 *
2491 *   http://www.apache.org/licenses/LICENSE-2.0
2492 *
2493 * Unless required by applicable law or agreed to in writing, software
2494 * distributed under the License is distributed on an "AS IS" BASIS,
2495 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2496 * See the License for the specific language governing permissions and
2497 * limitations under the License.
2498 */class Nce{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastTransactionError=null,this.writtenDocs=new Set}async lookup(e){if(this.ensureCommitNotCalled(),this.mutations.length>0)throw this.lastTransactionError=new re(H.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes."),this.lastTransactionError;const n=await(async function(i,s){const o=me(i),l={documents:s.map((m=>Dp(o.serializer,m)))},c=await o.vo("BatchGetDocuments",o.serializer.databaseId,tt.emptyPath(),l,s.length),d=new Map;c.forEach((m=>{const g=Jle(o.serializer,m);d.set(g.key.toString(),g)}));const h=[];return s.forEach((m=>{const g=d.get(m.toString());Pe(!!g),h.push(g)})),h})(this.datastore,e);return n.forEach((r=>this.recordVersion(r))),n}set(e,n){this.write(n.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,n){try{this.write(n.toMutation(e,this.preconditionForUpdate(e)))}catch(r){this.lastTransactionError=r}this.writtenDocs.add(e.toString())}delete(e){this.write(new Wd(e,this.precondition(e))),this.writtenDocs.add(e.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastTransactionError)throw this.lastTransactionError;const e=this.readVersions;this.mutations.forEach((n=>{e.delete(n.key.toString())})),e.forEach(((n,r)=>{const i=he.fromPath(r);this.mutations.push(new $R(i,this.precondition(i)))})),await(async function(r,i){const s=me(r),o={writes:i.map((l=>Mp(s.serializer,l)))};await s.So("Commit",s.serializer.databaseId,tt.emptyPath(),o)})(this.datastore,this.mutations),this.committed=!0}recordVersion(e){let n;if(e.isFoundDocument())n=e.version;else{if(!e.isNoDocument())throw Te();n=Oe.min()}const r=this.readVersions.get(e.key.toString());if(r){if(!n.isEqual(r))throw new re(H.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),n)}precondition(e){const n=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&n?n.isEqual(Oe.min())?Ht.exists(!1):Ht.updateTime(n):Ht.none()}preconditionForUpdate(e){const n=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&n){if(n.isEqual(Oe.min()))throw new re(H.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Ht.updateTime(n)}return Ht.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}}/**
2499 * @license
2500 * Copyright 2019 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 Dce{constructor(e,n,r,i,s){this.asyncQueue=e,this.datastore=n,this.options=r,this.updateFunction=i,this.deferred=s,this.Ja=r.maxAttempts,this.jo=new ZR(this.asyncQueue,"transaction_retry")}Ya(){this.Ja-=1,this.Za()}Za(){this.jo.qo((async()=>{const e=new Nce(this.datastore),n=this.Xa(e);n&&n.then((r=>{this.asyncQueue.enqueueAndForget((()=>e.commit().then((()=>{this.deferred.resolve(r)})).catch((i=>{this.eu(i)}))))})).catch((r=>{this.eu(r)}))}))}Xa(e){try{const n=this.updateFunction(e);return!ym(n)&&n.catch&&n.then?n:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(n){return this.deferred.reject(n),null}}eu(e){this.Ja>0&&this.tu(e)?(this.Ja-=1,this.asyncQueue.enqueueAndForget((()=>(this.Za(),Promise.resolve())))):this.deferred.reject(e)}tu(e){if(e.name==="FirebaseError"){const n=e.code;return n==="aborted"||n==="failed-precondition"||n==="already-exists"||!GU(n)}return!1}}/**
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 Mce{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Hn.UNAUTHENTICATED,this.clientId=uU.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,(async s=>{se("FirestoreClient","Received user=",s.uid),await this.authCredentialListener(s),this.user=s})),this.appCheckCredentials.start(r,(s=>(se("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new re(H.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Gn;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=Kd(n,"Failed to shutdown persistence");e.reject(r)}})),e.promise}}async function Yy(t,e){t.asyncQueue.verifyOperationInProgress(),se("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener((async i=>{r.isEqual(i)||(await Tj(e.localStore,i),r=i)})),e.persistence.setDatabaseDeletedListener((()=>t.terminate())),t._offlineComponents=e}
2528async function Lb(t,e){t.asyncQueue.verifyOperationInProgress();const n=await px(t);se("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener((r=>SD(e.remoteStore,r))),t.setAppCheckTokenChangeListener(((r,i)=>SD(e.remoteStore,i))),t._onlineComponents=e}function Hj(t){return t.name==="FirebaseError"?t.code===H.FAILED_PRECONDITION||t.code===H.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function px(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){se("FirestoreClient","Using user provided OfflineComponentProvider");try{await Yy(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!Hj(n))throw n;ps("Error using user provided cache. Falling back to memory cache: "+n),await Yy(t,new Mb)}}else se("FirestoreClient","Using default OfflineComponentProvider"),await Yy(t,new Mb);return t._offlineComponents}async function ww(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(se("FirestoreClient","Using user provided OnlineComponentProvider"),await Lb(t,t._uninitializedComponentsProvider._online)):(se("FirestoreClient","Using default OnlineComponentProvider"),await Lb(t,new hx))),t._onlineComponents}function Gj(t){return px(t).then((e=>e.persistence))}function mx(t){return px(t).then((e=>e.localStore))}function Kj(t){return ww(t).then((e=>e.remoteStore))}function gx(t){return ww(t).then((e=>e.syncEngine))}function Lce(t){return ww(t).then((e=>e.datastore))}async function Ed(t){const e=await ww(t),n=e.eventManager;return n.onListen=dce.bind(null,e.syncEngine),n.onUnlisten=hce.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=fce.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=pce.bind(null,e.syncEngine),n}function Vce(t){return t.asyncQueue.enqueue((async()=>{const e=await Gj(t),n=await Kj(t);return e.setNetworkEnabled(!0),(function(i){const s=me(i);return s.v_.delete(0),Im(s)})(n)}))}function Fce(t){return t.asyncQueue.enqueue((async()=>{const e=await Gj(t),n=await Kj(t);return e.setNetworkEnabled(!1),(async function(i){const s=me(i);s.v_.add(0),await qd(s),s.x_.set("Offline")})(n)}))}function $ce(t,e){const n=new Gn;return t.asyncQueue.enqueueAndForget((async()=>(async function(i,s,o){try{const l=await(function(d,h){const m=me(d);return m.persistence.runTransaction("read document","readonly",(g=>m.localDocuments.getDocument(g,h)))})(i,s);l.isFoundDocument()?o.resolve(l):l.isNoDocument()?o.resolve(null):o.reject(new re(H.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(l){const c=Kd(l,`Failed to get document '${s} from cache`);o.reject(c)}})(await mx(t),e,n))),n.promise}function Qj(t,e,n={}){const r=new Gn;return t.asyncQueue.enqueueAndForget((async()=>(function(s,o,l,c,d){const h=new _w({next:g=>{o.enqueueAndForget((()=>sx(s,m)));const v=g.docs.has(l);!v&&g.fromCache?d.reject(new re(H.UNAVAILABLE,"Failed to get document because the client is offline.")):v&&g.fromCache&&c&&c.source==="server"?d.reject(new re(H.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):d.resolve(g)},error:g=>d.reject(g)}),m=new ax(Bd(l.path),h,{includeMetadataChanges:!0,ta:!0});return ix(s,m)})(await Ed(t),t.asyncQueue,e,n,r))),r.promise}function Uce(t,e){const n=new Gn;return t.asyncQueue.enqueueAndForget((async()=>(async function(i,s,o){try{const l=await Fv(i,s,!0),c=new Uj(s,l.hs),d=c.Ta(l.documents),h=c.applyChanges(d,!1);o.resolve(h.snapshot)}catch(l){const c=Kd(l,`Failed to execute query '${s} against cache`);o.reject(c)}})(await mx(t),e,n))),n.promise}function Yj(t,e,n={}){const r=new Gn;return t.asyncQueue.enqueueAndForget((async()=>(function(s,o,l,c,d){const h=new _w({next:g=>{o.enqueueAndForget((()=>sx(s,m))),g.fromCache&&c.source==="server"?d.reject(new re(H.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):d.resolve(g)},error:g=>d.reject(g)}),m=new ax(l,h,{includeMetadataChanges:!0,ta:!0});return ix(s,m)})(await Ed(t),t.asyncQueue,e,n,r))),r.promise}function jce(t,e){const n=new _w(e);return t.asyncQueue.enqueueAndForget((async()=>(function(i,s){me(i).W_.add(s),s.next()})(await Ed(t),n))),()=>{n.Qa(),t.asyncQueue.enqueueAndForget((async()=>(function(i,s){me(i).W_.delete(s)})(await Ed(t),n)))}}function Bce(t,e,n,r){const i=(function(o,l){let c;
2528return c=typeof o=="string"?QU().encode(o):o,(function(h,m){return new Oce(h,m)})((function(h,m){if(h instanceof Uint8Array)return kD(h,m);if(h instanceof ArrayBuffer)return kD(new Uint8Array(h),m);if(h instanceof ReadableStream)return h.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")})(c),l)})(n,bm(e));t.asyncQueue.enqueueAndForget((async()=>{Ace(await gx(t),i,r)}))}function zce(t,e){return t.asyncQueue.enqueue((async()=>(function(r,i){const s=me(r);return s.persistence.runTransaction("Get named query","readonly",(o=>s.$r.getNamedQuery(o,i)))})(await mx(t),e)))}/**
2529 * @license
2530 * Copyright 2023 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 */function Jj(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/**
2544 * @license
2545 * Copyright 2020 Google LLC
2546 *
2547 * Licensed under the Apache License, Version 2.0 (the "License");
2548 * you may not use this file except in compliance with the License.
2549 * You may obtain a copy of the License at
2550 *
2551 *   http://www.apache.org/licenses/LICENSE-2.0
2552 *
2553 * Unless required by applicable law or agreed to in writing, software
2554 * distributed under the License is distributed on an "AS IS" BASIS,
2555 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2556 * See the License for the specific language governing permissions and
2557 * limitations under the License.
2558 */const CD=new Map;/**
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 */function yx(t,e,n){if(!n)throw new re(H.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function Xj(t,e,n,r){if(e===!0&&r===!0)throw new re(H.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function AD(t){if(!he.isDocumentKey(t))throw new re(H.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function PD(t){if(he.isDocumentKey(t))throw new re(H.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Ew(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":Te()}function ft(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new re(H.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Ew(t);throw new re(H.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}function Zj(t,e){if(e<=0)throw new re(H.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${e}.`)}/**
2574 * @license
2575 * Copyright 2020 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 OD{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new re(H.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 re(H.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}Xj("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=Jj((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),(function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new re(H.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new re(H.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new re(H.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(function(r,i){return r.timeoutSeconds===i.timeoutSeconds})(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Rm{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 OD({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new re(H.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(e){if(this._settingsFrozen)throw new re(H.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 OD(e),e.credentials!==void 0&&(this._authCredentials=(function(r){if(!r)return new jae;switch(r.type){case"firstParty":return new qae(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new re(H.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}})(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return(function(n){const r=CD.get(n);r&&(se("ComponentProvider","Removing Datastore"),CD.delete(n),r.terminate())})(this),Promise.resolve()}}function Wce(t,e,n,r={}){var i;const s=(t=ft(t,Rm))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&ps("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let l,c;if(typeof r.mockUserToken=="string")l=r.mockUserToken,c=Hn.MOCK_USER;else{l=xoe(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const d=r.mockUserToken.sub||r.mockUserToken.user_id;if(!d)throw new re(H.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");c=new Hn(d)}t._authCredentials=new Bae(new lU(l,c))}}/**
2589 * @license
2590 * Copyright 2020 Google LLC
2591 *
2592 * Licensed under the Apache License, Version 2.0 (the "License");
2593 * you may not use this file except in compliance with the License.
2594 * You may obtain a copy of the License at
2595 *
2596 *   http://www.apache.org/licenses/LICENSE-2.0
2597 *
2598 * Unless required by applicable law or agreed to in writing, software
2599 * distributed under the License is distributed on an "AS IS" BASIS,
2600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2601 * See the License for the specific language governing permissions and
2602 * limitations under the License.
2603 */let Qr=class eB{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new eB(this.firestore,e,this._query)}},tn=class tB{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 Pa(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new tB(this.firestore,e,this._key)}},Pa=class nB extends Qr{constructor(e,n,r){super(e,n,Bd(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new tn(this.firestore,null,new he(e))}withConverter(e){return new nB(this.firestore,e,this._path)}};function rB(t,e,...n){if(t=Yn(t),yx("collection","path",e),t instanceof Rm){const r=tt.fromString(e,...n);return PD(r),new Pa(t,null,r)}{if(!(t instanceof tn||t instanceof Pa))throw new re(H.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(tt.fromString(e,...n));return PD(r),new Pa(t.firestore,null,r)}}function qce(t,e){if(t=ft(t,Rm),yx("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new re(H.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new Qr(t,null,(function(r){return new Lo(tt.emptyPath(),r)})(e))}function Bv(t,e,...n){if(t=Yn(t),arguments.length===1&&(e=uU.newId()),yx("doc","path",e),t instanceof Rm){const r=tt.fromString(e,...n);return AD(r),new tn(t,null,new he(r))}{if(!(t instanceof tn||t instanceof Pa))throw new re(H.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(tt.fromString(e,...n));return AD(r),new tn(t.firestore,t instanceof Pa?t.converter:null,new he(r))}}function iB(t,e){return t=Yn(t),e=Yn(e),(t instanceof tn||t instanceof Pa)&&(e instanceof tn||e instanceof Pa)&&t.firestore===e.firestore&&t.path===e.path&&t.converter===e.converter}function sB(t,e){return t=Yn(t),e=Yn(e),t instanceof Qr&&e instanceof Qr&&t.firestore===e.firestore&&_m(t._query,e._query)&&t.converter===e.converter}/**
2604 * @license
2605 * Copyright 2020 Google LLC
2606 *
2607 * Licensed under the Apache License, Version 2.0 (the "License");
2608 * you may not use this file except in compliance with the License.
2609 * You may obtain a copy of the License at
2610 *
2611 *   http://www.apache.org/licenses/LICENSE-2.0
2612 *
2613 * Unless required by applicable law or agreed to in writing, software
2614 * distributed under the License is distributed on an "AS IS" BASIS,
2615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2616 * See the License for the specific language governing permissions and
2617 * limitations under the License.
2618 */class Hce{constructor(){this.nu=Promise.resolve(),this.ru=[],this.iu=!1,this.su=[],this.ou=null,this._u=!1,this.au=!1,this.uu=[],this.jo=new ZR(this,"async_queue_retry"),this.cu=()=>{const n=Qy();n&&se("AsyncQueue","Visibility state changed to "+n.visibilityState),this.jo.Ko()};const e=Qy();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.cu)}get isShuttingDown(){return this.iu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.lu(),this.hu(e)}enterRestrictedMode(e){if(!this.iu){this.iu=!0,this.au=e||!1;const n=Qy();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.cu)}}enqueue(e){if(this.lu(),this.iu)return new Promise((()=>{}));const n=new Gn;return this.hu((()=>this.iu&&this.au?Promise.resolve():(e().then(n.resolve,n.reject),n.promise))).then((()=>n.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>
2618(this.ru.push(e),this.Pu())))}async Pu(){if(this.ru.length!==0){try{await this.ru[0](),this.ru.shift(),this.jo.reset()}catch(e){if(!nl(e))throw e;se("AsyncQueue","Operation failed with retryable error: "+e)}this.ru.length>0&&this.jo.qo((()=>this.Pu()))}}hu(e){const n=this.nu.then((()=>(this._u=!0,e().catch((r=>{this.ou=r,this._u=!1;const i=(function(o){let l=o.message||"";return o.stack&&(l=o.stack.includes(o.message)?o.stack:o.message+`
2619`+o.stack),l})(r);throw vn("INTERNAL UNHANDLED ERROR: ",i),r})).then((r=>(this._u=!1,r))))));return this.nu=n,n}enqueueAfterDelay(e,n,r){this.lu(),this.uu.indexOf(e)>-1&&(n=0);const i=rx.createAndSchedule(this,e,n,r,(s=>this.Iu(s)));return this.su.push(i),i}lu(){this.ou&&Te()}verifyOperationInProgress(){}async Tu(){let e;do e=this.nu,await e;while(e!==this.nu)}Eu(e){for(const n of this.su)if(n.timerId===e)return!0;return!1}du(e){return this.Tu().then((()=>{this.su.sort(((n,r)=>n.targetTimeMs-r.targetTimeMs));for(const n of this.su)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.Tu()}))}Au(e){this.uu.push(e)}Iu(e){const n=this.su.indexOf(e);this.su.splice(n,1)}}function Vb(t){return(function(n,r){if(typeof n!="object"||n===null)return!1;const i=n;for(const s of r)if(s in i&&typeof i[s]=="function")return!0;return!1})(t,["next","error","complete"])}class Gce{constructor(){this._progressObserver={},this._taskCompletionResolver=new Gn,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,n,r){this._progressObserver={next:e,error:n,complete:r}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,n){return this._taskCompletionResolver.promise.then(e,n)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}/**
2620 * @license
2621 * Copyright 2020 Google LLC
2622 *
2623 * Licensed under the Apache License, Version 2.0 (the "License");
2624 * you may not use this file except in compliance with the License.
2625 * You may obtain a copy of the License at
2626 *
2627 *   http://www.apache.org/licenses/LICENSE-2.0
2628 *
2629 * Unless required by applicable law or agreed to in writing, software
2630 * distributed under the License is distributed on an "AS IS" BASIS,
2631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2632 * See the License for the specific language governing permissions and
2633 * limitations under the License.
2634 */const Kce=-1;let dn=class extends Rm{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=(function(){return new Hce})(),this._persistenceKey=i?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||oB(this),this._firestoreClient.terminate()}};function tr(t){return t._firestoreClient||oB(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function oB(t){var e,n,r;const i=t._freezeSettings(),s=(function(l,c,d,h){return new wle(l,c,d,h.host,h.ssl,h.experimentalForceLongPolling,h.experimentalAutoDetectLongPolling,Jj(h.experimentalLongPollingOptions),h.useFetchStreams)})(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._firestoreClient=new Mce(t._authCredentials,t._appCheckCredentials,t._queue,s),!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}function Qce(t,e){lB(t=ft(t,dn));const n=tr(t);if(n._uninitializedComponentsProvider)throw new re(H.FAILED_PRECONDITION,"SDK cache is already specified.");
2634ps("enableIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");const r=t._freezeSettings(),i=new hx;return aB(n,i,new qj(i,r.cacheSizeBytes,e?.forceOwnership))}function Yce(t){lB(t=ft(t,dn));const e=tr(t);if(e._uninitializedComponentsProvider)throw new re(H.FAILED_PRECONDITION,"SDK cache is already specified.");ps("enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");const n=t._freezeSettings(),r=new hx;return aB(e,r,new Pce(r,n.cacheSizeBytes))}function aB(t,e,n){const r=new Gn;return t.asyncQueue.enqueue((async()=>{try{await Yy(t,n),await Lb(t,e),r.resolve()}catch(i){const s=i;if(!Hj(s))throw s;ps("Error enabling indexeddb cache. Falling back to memory cache: "+s),r.reject(s)}})).then((()=>r.promise))}function Jce(t){if(t._initialized&&!t._terminated)throw new re(H.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const e=new Gn;return t._queue.enqueueAndForgetEvenWhileRestricted((async()=>{try{await(async function(r){if(!zi.D())return Promise.resolve();const i=r+"main";await zi.delete(i)})(YR(t._databaseId,t._persistenceKey)),e.resolve()}catch(n){e.reject(n)}})),e.promise}function Xce(t){return(function(n){const r=new Gn;return n.asyncQueue.enqueueAndForget((async()=>_ce(await gx(n),r))),r.promise})(tr(t=ft(t,dn)))}function Zce(t){return Vce(tr(t=ft(t,dn)))}function ede(t){return Fce(tr(t=ft(t,dn)))}function tde(t,e){const n=tr(t=ft(t,dn)),r=new Gce;return Bce(n,t._databaseId,e,r),r}function nde(t,e){return zce(tr(t=ft(t,dn)),e).then((n=>n?new Qr(t,null,n.query):null))}function lB(t){if(t._initialized||t._terminated)throw new re(H.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}/**
2635 * @license
2636 * Copyright 2020 Google LLC
2637 *
2638 * Licensed under the Apache License, Version 2.0 (the "License");
2639 * you may not use this file except in compliance with the License.
2640 * You may obtain a copy of the License at
2641 *
2642 *   http://www.apache.org/licenses/LICENSE-2.0
2643 *
2644 * Unless required by applicable law or agreed to in writing, software
2645 * distributed under the License is distributed on an "AS IS" BASIS,
2646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2647 * See the License for the specific language governing permissions and
2648 * limitations under the License.
2649 */class Js{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Js(Un.fromBase64String(e))}catch(n){throw new re(H.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new Js(Un.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)}}/**
2650 * @license
2651 * Copyright 2020 Google LLC
2652 *
2653 * Licensed under the Apache License, Version 2.0 (the "License");
2654 * you may not use this file except in compliance with the License.
2655 * You may obtain a copy of the License at
2656 *
2657 *   http://www.apache.org/licenses/LICENSE-2.0
2658 *
2659 * Unless required by applicable law or agreed to in writing, software
2660 * distributed under the License is distributed on an "AS IS" BASIS,
2661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2662 * See the License for the specific language governing permissions and
2663 * limitations under the License.
2664 */let Ga=class{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new re(H.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new qt(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}};/**
2665 * @license
2666 * Copyright 2020 Google LLC
2667 *
2668 * Licensed under the Apache License, Version 2.0 (the "License");
2669 * you may not use this file except in compliance with the License.
2670 * You may obtain a copy of the License at
2671 *
2672 *   http://www.apache.org/licenses/LICENSE-2.0
2673 *
2674 * Unless required by applicable law or agreed to in writing, softw
2674are
2675 * distributed under the License is distributed on an "AS IS" BASIS,
2676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2677 * See the License for the specific language governing permissions and
2678 * limitations under the License.
2679 */let ku=class{constructor(e){this._methodName=e}};/**
2680 * @license
2681 * Copyright 2017 Google LLC
2682 *
2683 * Licensed under the Apache License, Version 2.0 (the "License");
2684 * you may not use this file except in compliance with the License.
2685 * You may obtain a copy of the License at
2686 *
2687 *   http://www.apache.org/licenses/LICENSE-2.0
2688 *
2689 * Unless required by applicable law or agreed to in writing, software
2690 * distributed under the License is distributed on an "AS IS" BASIS,
2691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2692 * See the License for the specific language governing permissions and
2693 * limitations under the License.
2694 */class Sw{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new re(H.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new re(H.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 He(this._lat,e._lat)||He(this._long,e._long)}}/**
2695 * @license
2696 * Copyright 2017 Google LLC
2697 *
2698 * Licensed under the Apache License, Version 2.0 (the "License");
2699 * you may not use this file except in compliance with the License.
2700 * You may obtain a copy of the License at
2701 *
2702 *   http://www.apache.org/licenses/LICENSE-2.0
2703 *
2704 * Unless required by applicable law or agreed to in writing, software
2705 * distributed under the License is distributed on an "AS IS" BASIS,
2706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2707 * See the License for the specific language governing permissions and
2708 * limitations under the License.
2709 */const rde=/^__.*__$/;class ide{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new Vo(e,this.data,this.fieldMask,n,this.fieldTransforms):new zd(e,this.data,n,this.fieldTransforms)}}class uB{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new Vo(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function cB(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Te()}}class Tw{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Ru(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get Vu(){return this.settings.Vu}mu(e){return new Tw(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}fu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.mu({path:r,gu:!1});return i.pu(e),i}yu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.mu({path:r,gu:!1});return i.Ru(),i}wu(e){return this.mu({path:void 0,gu:!0})}Su(e){return zv(e,this.settings.methodName,this.settings.bu||!1,this.path,this.settings.Du)}contains(e){return this.fieldMask.find((n=>e.isPrefixOf(n)))!==void 0||this.fieldTransforms.find((n=>e.isPrefixOf(n.field)))!==void 0}Ru(){if(this.path)for(let e=0;e<this.path.length;e++)this.pu(this.path.get(e))}pu(e){if(e.length===0)throw this.Su("Document fields must not be empty");if(cB(this.Vu)&&rde.test(e))throw this.Su('Document fields cannot begin and end with "__"')}}class sde{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||bm(e)}Cu(e,n,r,i=!1){return new Tw({Vu:e,methodName:n,Du:r,path:qt.emptyPath(),gu:!1,bu:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Cu(t){const e=t._freezeSettings(),n=bm(t._databaseId);return new sde(t._databaseId,!!e.ignoreUndefinedProperties,n)}function bw(t,e,n,r,i,s={}){const o=t.Cu(s.merge||s.mergeFields?2:0,e,n,i);bx("Data must be an object, but it was:",o,r);const l=hB(r,o);let c,d;if(s.merge)c=new oi(o.fieldMask),d=o.fieldTransforms;else if(s.mergeFields){const h=[];for(const m of s.mergeFields){const g=Fb(e,m,n);if(!o.contains(g))throw new re(H.INVALID_ARGUMENT,`Field '${g}' is specified in your field mask but missing from your input data.`);mB(h,g)||h.push(g)}c=new oi(h),d=o.fieldTransforms.filter((m=>c.covers(m.field)))}else c=null,d=o.fieldTransforms;return new ide(new ur(l),c,d)}class xm extends ku{_toFieldTransform(e){if(e.Vu!==2)throw e.Vu===1?e.Su(`${this._methodName}() can only appear at the top level of your update data`):e.Su(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof xm}}function dB(t,e,n){return new Tw({Vu:3,Du:e.settings.Du,methodName:t._methodName,gu:n},e.databaseId,e.serializer,e.ignoreUndefinedProperties)}class vx extends ku{_toFieldTransform(e){return new Em(e.path,new hd)}isEqual(e){return e instanceof vx}}class _x extends ku{constructor(e,n){super(e),this.vu=n}_toFieldTransform(e){const n=dB(this,e,!0),r=this.vu.map((s=>Au(s,n))),i=new uu(r);return new Em(e.path,i)}isEqual(e){return e instanceof _x&&cR(this.vu,e.vu)}}class wx extends ku{constructor(e,n){super(e),this.vu=n}_toFieldTransform(e){const n=dB(this,e,!0),r=this.vu.map((s=>Au(s,n))),i=new cu(r);return new Em(e.path,i)}isEqual(e){return e instanceof wx&&cR(this.vu,e.vu)}}class Ex extends ku{constructor(e,n){super(e),this.Fu=n}_toFieldTransform(e){const n=new pd(e.serializer,UU(e.serializer,this.Fu));return new Em(e.path,n)}isEqual(e){return e instanceof Ex&&this.Fu===e.Fu}}function Sx(t,e,n,r){const i=t.Cu(1,e,n);bx("Data must be an object, but it was:",i,r);const s=[],o=ur.empty();xu(r,((c,d)=>{const h=Ix(e,c,n);d=Yn(d);const m=i.yu(h);if(d instanceof xm)s.push(h);else{const g=Au(d,m);g!=null&&(s.push(h),o.set(h,g))}}));const l=new oi(s);return new uB(o,l,i.fieldTransforms)}function Tx(t,e,n,r,i,s){const o=t.Cu(1,e,n),l=[Fb(e,r,n)],c=[i];if(s.length%2!=0)throw new re(H.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let g=0;g<s.length;g+=2)l.push(Fb(e,s[g])),c.push(s[g+1]);const d=[],h=ur.empty();for(let g=l.length-1;g>=0;--g)if(!mB(d,l[g])){const v=l[g];let E=c[g];E=Yn(E);const S=o.yu(v);if(E instanceof xm)d.push(v);else{const w=Au(E,S);w!=null&&(d.push(v),h.set(v,w))}}const m=new oi(d);return new uB(h,m,o.fieldTransforms)}function fB(t,e,n,r=!1){return Au(n,t.Cu(r?4:3,e))}function Au(t,e){if(pB(t=Yn(t)))return bx("Unsupported field value:",e,t),hB(t,e);if(t instanceof ku)return(function(r,i){if(!cB(i.Vu))throw i.Su(`${r._methodName}
2709() can only be used with update() and set()`);if(!i.path)throw i.Su(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)})(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.gu&&e.Vu!==4)throw e.Su("Nested arrays are not supported");return(function(r,i){const s=[];let o=0;for(const l of r){let c=Au(l,i.wu(o));c==null&&(c={nullValue:"NULL_VALUE"}),s.push(c),o++}return{arrayValue:{values:s}}})(t,e)}return(function(r,i){if((r=Yn(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return UU(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=Qt.fromDate(r);return{timestampValue:md(i.serializer,s)}}if(r instanceof Qt){const s=new Qt(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:md(i.serializer,s)}}if(r instanceof Sw)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof Js)return{bytesValue:XU(i.serializer,r._byteString)};if(r instanceof tn){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.Su(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:WR(r.firestore._databaseId||i.databaseId,r._key.path)}}throw i.Su(`Unsupported field value: ${Ew(r)}`)})(t,e)}function hB(t,e){const n={};return wU(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):xu(t,((r,i)=>{const s=Au(i,e.fu(r));s!=null&&(n[r]=s)})),{mapValue:{fields:n}}}function pB(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof Qt||t instanceof Sw||t instanceof Js||t instanceof tn||t instanceof ku)}function bx(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=Ew(n);throw r==="an object"?e.Su(t+" a custom object"):e.Su(t+" "+r)}}function Fb(t,e,n){if((e=Yn(e))instanceof Ga)return e._internalPath;if(typeof e=="string")return Ix(t,e);throw zv("Field path arguments must be of type string or ",t,!1,void 0,n)}const ode=new RegExp("[~\\*/\\[\\]]");function Ix(t,e,n){if(e.search(ode)>=0)throw zv(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Ga(...e.split("."))._internalPath}catch{throw zv(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function zv(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let l=`Function ${e}() called with invalid data`;n&&(l+=" (via `toFirestore()`)"),l+=". ";let c="";return(s||o)&&(c+=" (found",s&&(c+=` in field ${r}`),o&&(c+=` in document ${i}`),c+=")"),new re(H.INVALID_ARGUMENT,l+t+c)}function mB(t,e){return t.some((n=>n.isEqual(e)))}/**
2710 * @license
2711 * Copyright 2020 Google LLC
2712 *
2713 * Licensed under the Apache License, Version 2.0 (the "License");
2714 * you may not use this file except in compliance with the License.
2715 * You may obtain a copy of the License at
2716 *
2717 *   http://www.apache.org/licenses/LICENSE-2.0
2718 *
2719 * Unless required by applicable law or agreed to in writing, software
2720 * distributed under the License is distributed on an "AS IS" BASIS,
2721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2722 * See the License for the specific language governing permissions and
2723 * limitations under the License.
2724 */class Lp{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new tn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new ade(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(Iw("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class ade extends Lp{data(){return super.data()}}function Iw(t,e){return typeof e=="string"?Ix(t,e):e instanceof Ga?e._internalPath:e._delegate._internalPath}/**
2725 * @license
2726 * Copyright 2020 Google LLC
2727 *
2728 * Licensed under the Apache License, Version 2.0 (the "License");
2729 * you may not use this file except in compliance with the License.
2730 * You may obtain a copy of the License at
2731 *
2732 *   http://www.apache.org/licenses/LICENSE-2.0
2733 *
2734 * Unless required by applicable law or agreed to in writing, software
2735 * distributed under the License is distributed on an "AS IS" BASIS,
2736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2737 * See the License for the specific language governing permissions and
2738 * limitations under the License.
2739 */function gB(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new re(H.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Rx{}class km extends Rx{}function pa(t,e,...n){let r=[];e instanceof Rx&&r.push(e),r=r.concat(n),(function(s){const o=s.filter((c=>c instanceof xx)).length,l=s.filter((c=>c instanceof Rw)).length;if(o>1||o>0&&l>0)throw new re(H.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 Rw extends km{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new Rw(e,n,r)}_apply(e){const n=this._parse(e);return vB(e._query,n),new Qr(e.firestore,e.converter,Tb(e._query,n))}_parse(e){const n=Cu(e.firestore);return(function(s,o,l,c,d,h,m){let g;if(d.isKeyField()){if(h==="array-contains"||h==="array-contains-any")throw new re(H.INVALID_ARGUMENT,`Invalid Query. You can't perform '${h}' queries on documentId().`);if(h==="in"||h==="not-in"){DD(m,h);const v=[];for(const E of m)v.push(ND(c,s,E));g={arrayValue:{values:v}}}else g=ND(c,s,m)}else h!=="in"&&h!=="not-in"&&h!=="array-contains-any"||DD(m,h),g=fB(l,o,m,h==="in"||h==="not-in");return nt.create(d,h,g)})(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}function lde(t,e,n){const r=e,i=Iw("where",t);return Rw._create(i,r,n)}class xx extends Rx{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new xx(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]:bt.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:((function(i,s){let o=i;const l=s.getFlattenedFilters();for(const c of l)vB(o,c),o=Tb(o,c)})(e._query,n),new Qr(e.firestore,e.converter,Tb(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class kx extends km{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new kx(e,n)}_apply(e){const n=(function(i,s,o){if(i.startAt!==null)throw new re(H.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new re(H.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Np(s,o)})(e._query,this._field,this._direction);return new Qr(e.firestore,e.converter,(function(i,s){const o=i.explicitOrderBy.concat([s]);return new Lo(i.path,i.collectionGroup,o,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)})(e._query,n))}}function ude(t,e="asc"){const n=e,r=Iw("orderBy",t);return kx._create(r,n)}class xw extends km{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new xw(e,n,r)}_apply(e){return new Qr(e.firestore,e.converter,Dv(e._query,this._limit,this._limitType))}}function cde(t){return Zj("limit",t),xw._create("limit",t,"F")}function dde(t){return Zj("limitToLast",t),xw._create("limitToLast",t,"L")}class kw extends km{constructor(e,n,r){super(),this.type=e,this._docOrFields=n,this._inclusive=r}static _create(e,n,r){return new kw(e,n,r)}_apply(e){const n=yB(e,this.type,this._docOrFields,this._inclusive);return new Qr(e.firestore,e.converter,(function(i,s){return new Lo(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,s,i.endAt)})(e._query,n))}}function fde(...t){return kw._create("startAt",t,!0)}function hde(...t){return kw._create("startAfter",t,!1)}class Cw extends km{constructor(e,n,r){super(),this.type=e,this._docOrFields=n,this._inclusive=r}static _create(e,n,r){return new Cw(e,n,r)}_apply(e){const n=yB(e,this.type,this._docOrFields,this._inclusive);return new Qr(e.firestore,e.converter,(function(i,s){return new Lo(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,i.startAt,s)})(e._query,n))}}function pde(...t){return Cw._create("endBefore",t,!1)}function mde(...t){return Cw._create("endAt",t,!0)}function yB(t,e,n,r){if(n[0]=Yn(n[0]),n[0]instanceof Lp)return(function(s,o,l,c,d){if(!c)throw new re(H.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${l}().`);const h=[];for(const m of Wc(s))if(m.field.isKeyField())h.push(au(o,c.key));else{const g=c.data.field(m.field);if(dw(g))throw new re(H.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+m.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(g===null){const v=m.field.canonicalString();throw new re(H.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${v}' (used as the orderBy) does not exist.`)}h.push(g)}return new qa(h,d)})(t._query,t.firestore._databaseId,e,n[0]._document,r);{const i=Cu(t.firestore);return(function(o,l,c,d,h,m){const g=o.explicitOrderBy;if(h.length>g.length)throw new re(H.INVALID_ARGUMENT,`Too many arguments provided to ${d}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const v=[];for(let E=0;E<h.length;E++){const S=h[E];
2739if(g[E].field.isKeyField()){if(typeof S!="string")throw new re(H.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${d}(), but got a ${typeof S}`);if(!VR(o)&&S.indexOf("/")!==-1)throw new re(H.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${d}() must be a plain document ID, but '${S}' contains a slash.`);const w=o.path.child(tt.fromString(S));if(!he.isDocumentKey(w))throw new re(H.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${d}() must result in a valid document path, but '${w}' is not because it contains an odd number of segments.`);const b=new he(w);v.push(au(l,b))}else{const w=fB(c,d,S);v.push(w)}}return new qa(v,m)})(t._query,t.firestore._databaseId,i,e,n,r)}}function ND(t,e,n){if(typeof(n=Yn(n))=="string"){if(n==="")throw new re(H.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!VR(e)&&n.indexOf("/")!==-1)throw new re(H.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(tt.fromString(n));if(!he.isDocumentKey(r))throw new re(H.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 au(t,new he(r))}if(n instanceof tn)return au(t,n._key);throw new re(H.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Ew(n)}.`)}function DD(t,e){if(!Array.isArray(t)||t.length===0)throw new re(H.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function vB(t,e){const n=(function(i,s){for(const o of i)for(const l of o.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null})(t.filters,(function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}})(e.op));if(n!==null)throw n===e.op?new re(H.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new re(H.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class Cx{convertValue(e,n="none"){switch(ou(e)){case 0:return null;case 1:return e.booleanValue;case 2:return un(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(Ba(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw Te()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return xu(e,((i,s)=>{r[i]=this.convertValue(s,n)})),r}convertGeoPoint(e){return new Sw(un(e.latitude),un(e.longitude))}convertArray(e,n){return(e.values||[]).map((r=>this.convertValue(r,n)))}convertServerTimestamp(e,n){switch(n){case"previous":const r=MR(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Ap(e));default:return null}}convertTimestamp(e){const n=ja(e);return new Qt(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=tt.fromString(e);Pe(uj(r));const i=new za(r.get(1),r.get(3)),s=new he(r.popFirst(5));return i.isEqual(n)||vn(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/**
2740 * @license
2741 * Copyright 2020 Google LLC
2742 *
2743 * Licensed under the Apache License, Version 2.0 (the "License");
2744 * you may not use this file except in compliance with the License.
2745 * You may obtain a copy of the License at
2746 *
2747 *   http://www.apache.org/licenses/LICENSE-2.0
2748 *
2749 * Unless required by applicable law or agreed to in writing, softw
2749are
2750 * distributed under the License is distributed on an "AS IS" BASIS,
2751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2752 * See the License for the specific language governing permissions and
2753 * limitations under the License.
2754 */function Aw(t,e,n){let r;return r=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,r}class gde extends Cx{constructor(e){super(),this.firestore=e}convertBytes(e){return new Js(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new tn(this.firestore,null,n)}}/**
2755 * @license
2756 * Copyright 2020 Google LLC
2757 *
2758 * Licensed under the Apache License, Version 2.0 (the "License");
2759 * you may not use this file except in compliance with the License.
2760 * You may obtain a copy of the License at
2761 *
2762 *   http://www.apache.org/licenses/LICENSE-2.0
2763 *
2764 * Unless required by applicable law or agreed to in writing, software
2765 * distributed under the License is distributed on an "AS IS" BASIS,
2766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2767 * See the License for the specific language governing permissions and
2768 * limitations under the License.
2769 */class zl{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}let Ao=class extends Lp{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new Zh(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(Iw("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}},Zh=class extends Ao{data(e={}){return super.data(e)}},Ka=class{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new zl(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 Zh(this._firestore,this._userDataWriter,r.key,r,new zl(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 re(H.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=(function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map((l=>{const c=new Zh(i._firestore,i._userDataWriter,l.doc.key,l.doc,new zl(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);return l.doc,{type:"added",doc:c,oldIndex:-1,newIndex:o++}}))}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter((l=>s||l.type!==3)).map((l=>{const c=new Zh(i._firestore,i._userDataWriter,l.doc.key,l.doc,new zl(i._snapshot.mutatedKeys.has(l.doc.key),i._snapshot.fromCache),i.query.converter);let d=-1,h=-1;return l.type!==0&&(d=o.indexOf(l.doc.key),o=o.delete(l.doc.key)),l.type!==1&&(o=o.add(l.doc),h=o.indexOf(l.doc.key)),{type:yde(l.type),doc:c,oldIndex:d,newIndex:h}}))}})(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}};function yde(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Te()}}function _B(t,e){return t instanceof Ao&&e instanceof Ao?t._firestore===e._firestore&&t._key.isEqual(e._key)&&(t._document===null?e._document===null:t._document.isEqual(e._document))&&t._converter===e._converter:t instanceof Ka&&e instanceof Ka&&t._firestore===e._firestore&&sB(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._snapshot.isEqual(e._snapshot)}/**
2770 * @license
2771 * Copyright 2020 Google LLC
2772 *
2773 * Licensed under the Apache License, Version 2.0 (the "License");
2774 * you may not use this file except in compliance with the License.
2775 * You may obtain a copy of the License at
2776 *
2777 *   http://www.apache.org/licenses/LICENSE-2.0
2778 *
2779 * Unless required by applicable law or agreed to in writing, software
2780 * distributed under the License is distributed on an "AS IS" BASIS,
2781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2782 * See the License for the specific language governing permissions and
2783 * limitations under the License.
2784 */function vde(t){t=ft(t,tn);const e=ft(t.firestore,dn);return Qj(tr(e),t._key).then((n=>Ax(e,t,n)))}class Pu extends Cx{constructor(e){super(),this.firestore=e}convertBytes(e){return new Js(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new tn(this.firestore,null,n)}}function _de(t){t=ft(t,tn);const e=ft(t.firestore,dn),n=tr(e),r=new Pu(e);return $ce(n,t._key).then((i=>new Ao(e,r,t._key,i,new zl(i!==null&&i.hasLocalMutations,!0),t.converter)))}function wde(t){t=ft(t,tn);const e=ft(t.firestore,dn);return Qj(tr(e),t._key,{source:"server"}).then((n=>Ax(e,t,n)))}function Ede(t){t=ft(t,Qr);const e=ft(t.firestore,dn),n=tr(e),r=new Pu(e);return gB(t._query),Yj(n,t._query).then((i=>new Ka(e,r,t,i)))}function Sde(t){t=ft(t,Qr);const e=ft(t.firestore,dn),n=tr(e),r=new Pu(e);return Uce(n,t._query).then((i=>new Ka(e,r,t,i)))}function Tde(t){t=ft(t,Qr);const e=ft(t.firestore,dn),n=tr(e),r=new Pu(e);return Yj(n,t._query,{source:"server"}).then((i=>new Ka(e,r,t,i)))}function MD(t,e,n){t=ft(t,tn);const r=ft(t.firestore,dn),i=Aw(t.converter,e,n);return Cm(r,[bw(Cu(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,Ht.none())])}function LD(t,e,n,...r){t=ft(t,tn);const i=ft(t.firestore,dn),s=Cu(i);let o;return o=typeof(e=Yn(e))=="string"||e instanceof Ga?Tx(s,"updateDoc",t._key,e,n,r):Sx(s,"updateDoc",t._key,e),Cm(i,[o.toMutation(t._key,Ht.exists(!0))])}function bde(t){return Cm(ft(t.firestore,dn),[new Wd(t._key,Ht.none())])}function Ide(t,e){const n=ft(t.firestore,dn),r=Bv(t),i=Aw(t.converter,e);return Cm(n,[bw(Cu(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,Ht.exists(!1))]).then((()=>r))}function wB(t,...e){var n,r,i;t=Yn(t);let s={includeMetadataChanges:!1,source:"default"},o=0;typeof e[o]!="object"||Vb(e[o])||(s=e[o],o++);const l={includeMetadataChanges:s.includeMetadataChanges,source:s.source};if(Vb(e[o])){const m=e[o];e[o]=(n=m.next)===null||n===void 0?void 0:n.bind(m),e[o+1]=(r=m.error)===null||r===void 0?void 0:r.bind(m),e[o+2]=(i=m.complete)===null||i===void 0?void 0:i.bind(m)}let c,d,h;if(t instanceof tn)d=ft(t.firestore,dn),h=Bd(t._key.path),c={next:m=>{e[o]&&e[o](Ax(d,t,m))},error:e[o+1],complete:e[o+2]};else{const m=ft(t,Qr);d=ft(m.firestore,dn),h=m._query;const g=new Pu(d);c={next:v=>{e[o]&&e[o](new Ka(d,g,m,v))},error:e[o+1],complete:e[o+2]},gB(t._query)}return(function(g,v,E,S){const w=new _w(S),b=new ax(v,w,E);return g.asyncQueue.enqueueAndForget((async()=>ix(await Ed(g),b))),()=>{w.Qa(),g.asyncQueue.enqueueAndForget((async()=>sx(await Ed(g),b)))}})(tr(d),h,l,c)}function Rde(t,e){return jce(tr(t=ft(t,dn)),Vb(e)?e:{next:e})}function Cm(t,e){return(function(r,i){const s=new Gn;return r.asyncQueue.enqueueAndForget((async()=>mce(await gx(r),i,s))),s.promise})(tr(t),e)}function Ax(t,e,n){const r=n.docs.get(e._key),i=new Pu(t);return new Ao(t,i,e._key,r,new zl(n.hasPendingWrites,n.fromCache),e.converter)}/**
2785 * @license
2786 * Copyright 2022 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 */const xde={maxAttempts:5};/**
2800 * @license
2801 * Copyright 2020 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 */let kde=class{constructor(e,n){this._firestore=e,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=Cu(e)}set(e,n,r){this._verifyNotCommitted();const i=Ea(e,this._firestore),s=Aw(i.converter,n,r),o=bw(this._dataReader,"WriteBatch.set",i._key,s,i.converter!==null,r);return this._mutations.push(o.toMutation(i._key,Ht.none())),this}update(e,n,r,...i){this._verifyNotCommitted();const s=Ea(e,this._firestore);let o;return o=typeof(n=Yn(n))=="string"||n instanceof Ga?Tx(this._dataReader,"WriteBatch.update",s._key,n,r,i):Sx(this._dataReader,"WriteBatch.update",s._key,n),this._mutations.push(o.toMutation(s._key,Ht.exists(!0))),this}delete(e){this._verifyNotCommitted();const n=Ea(e,this._firestore);return this._mutations=this._mutations.concat(new Wd(n._key,Ht.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new re(H.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}};function Ea(t,e){if((t=Yn(t)).firestore!==e)throw new re(H.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}/**
2815 * @license
2816 * Copyright 2020 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 *//**
2830 * @license
2831 * Copyright 2020 Google LLC
2832 *
2833 * Licensed under the Apache License, Version 2.0 (the "License");
2834 * you may not use this file except in compliance with the License.
2835 * You may obtain a copy of the License at
2836 *
2837 *   http://www.apache.org/licenses/LICENSE-2.0
2838 *
2839 * Unless required by applicable law or agreed to in writing, software
2840 * distributed under the License is distributed on an "AS IS" BASIS,
2841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2842 * See the License for the specific language governing permissions and
2843 * limitations under the License.
2844 */let Cde=class extends class{constructor(n,r){this._firestore=n,this._transaction=r,this._dataReader=Cu(n)}get(n){const r=Ea(n,this._firestore),i=new gde(this._firestore);return this._transaction.lookup([r._key]).then((s=>{if(!s||s.length!==1)return Te();const o=s[0];if(o.isFoundDocument())return new Lp(this._firestore,i,o.key,o,r.converter);if(o.isNoDocument())return new Lp(this._firestore,i,r._key,null,r.converter);throw Te()}))}set(n,r,i){const s=Ea(n,this._firestore),o=Aw(s.converter,r,i),l=bw(this._dataReader,"Transaction.set",s._key,o,s.converter!==null,i);return this._transaction.set(s._key,l),this}update(n,r,i,...s){const o=Ea(n,this._firestore);let l;return l=typeof(r=Yn(r))=="string"||r instanceof Ga?Tx(this._dataReader,"Transaction.update",o._key,r,i,s):Sx(this._dataReader,"Transaction.update",o._key,r),this._transaction.update(o._key,l),this}delete(n){const r=Ea(n,this._firestore);return this._transaction.delete(r._key),this}}{constructor(e,n){super(e,n),this._firestore=e}get(e){const n=Ea(e,this._firestore),r=new Pu(this._firestore);return super.get(e).then((i=>new Ao(this._firestore,r,n._key,i._document,new zl(!1,!1),n.converter)))}};function Ade(t,e,n){t=ft(t,dn);const r=Object.assign(Object.assign({},xde),n);return(function(s){if(s.maxAttempts<1)throw new re(H.INVALID_ARGUMENT,"Max attempts must be at least 1")})(r),(function(s,o,l){const c=new Gn;return s.asyncQueue.enqueueAndForget((async()=>{const d=await Lce(s);new Dce(s.asyncQueue,d,l,o,c).Ya()})),c.promise})(tr(t),(i=>e(new Cde(t,i))),r)}/**
2845 * @license
2846 * Copyright 2020 Google LLC
2847 *
2848 * Licensed under the Apache License, Version 2.0 (the "License");
2849 * you may not use this file except in compliance with the License.
2850 * You may obtain a copy of the License at
2851 *
2852 *   http://www.apache.org/licenses/LICENSE-2.0
2853 *
2854 * Unless required by applicable law or agreed to in writing, software
2855 * distributed under the License is distributed on an "AS IS" BASIS,
2856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2857 * See the License for the specific language governing permissions and
2858 * limitations under the License.
2859 */function Pde(){return new xm("deleteField")}function Ode(){return new vx("serverTimestamp")}function Nde(...t){return new _x("arrayUnion",t)}function Dde(...t){return new wx("arrayRemove",t)}function Mde(t){return new Ex("increment",t)}(function(e,n=!0){(function(i){jd=i})(Mo),Kr(new En("firestore",((r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),l=new dn(new zae(r.getProvider("auth-internal")),new Gae(r.getProvider("app-check-internal")),(function(d,h){if(!Object.prototype.hasOwnProperty.apply(d.options,["projectId"]))throw new re(H.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new za(d.options.projectId,h)})(o,i),o);return s=Object.assign({useFetchStreams:n},s),l._setSettings(s),l}),"PUBLIC").setMultipleInstances(!0)),Pn(CN,"4.5.0",e),Pn(CN,"4.5.0","esm2017")})();/**
2860 * @license
2861 * Copyright 2021 Google LLC
2862 *
2863 * Licensed under the Apache License, Version 2.0 (the "License");
2864 * you may not use this file except in compliance with the License.
2865 * You may obtain a copy of the License at
2866 *
2867 *   http://www.apache.org/licenses/LICENSE-2.0
2868 *
2869 * Unless required by applicable law or agreed to in writing, software
2870 * distributed under the License is distributed on an "AS IS" BASIS,
2871 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2872 * See the License for the specific language governing permissions and
2873 * limitations under the License.
2874 */function EB(t){return t&&t._delegate?t._delegate:t}const Lde="@firebase/firestore-compat",Vde="0.3.27";/**
2875 * @license
2876 * Copyright 2021 Google LLC
2877 *
2878 * Licensed under the Apache License, Version 2.0 (the "License");
2879 * you may not use this file except in compliance with the License.
2880 * You may obtain a copy of the License at
2881 *
2882 *   http://www.apache.org/licenses/LICENSE-2.0
2883 *
2884 * Unless required by applicable law or agreed to in writing, software
2885 * distributed under the License is distributed on an "AS IS" BASIS,
2886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2887 * See the License for the specific language governing permissions and
2888 * limitations under the License.
2889 */function Px(t,e){if(e===void 0)return{merge:!1};if(e.mergeFields!==void 0&&e.merge!==void 0)throw new re("invalid-argument",`Invalid options passed to function ${t}(): You cannot specify both "merge" and "mergeFields".`);return e}/**
2890 * @license
2891 * Copyright 2017 Google LLC
2892 *
2893 * Licensed under the Apache License, Version 2.0 (the "License");
2894 * you may not use this file except in compliance with the License.
2895 * You may obtain a copy of the License at
2896 *
2897 *   http://www.apache.org/licenses/LICENSE-2.0
2898 *
2899 * Unless required by applicable law or agreed to in writing, software
2900 * distributed under the License is distributed on an "AS IS" BASIS,
2901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2902 * See the License for the specific language governing permissions and
2903 * limitations under the License.
2904 */function VD(){if(typeof Uint8Array>"u")throw new re("unimplemented","Uint8Arrays are not available in this environment.")}function FD(){if(!vle())throw new re("unimplemented","Blobs are unavailable in Firestore in this environment.")}let SB=class $b{constructor(e){this._delegate=e}static fromBase64String(e){return FD(),new $b(Js.fromBase64String(e))}static fromUint8Array(e){return VD(),new $b(Js.fromUint8Array(e))}toBase64(){return FD(),this._delegate.toBase64()}toUint8Array(){return VD(),this._delegate.toUint8Array()}isEqual(e){return this._delegate.isEqual(e._delegate)}toString(){return"Blob(base64: "+this.toBase64()+")"}};/**
2905 * @license
2906 * Copyright 2017 Google LLC
2907 *
2908 * Licensed under the Apache License, Version 2.0 (the "License");
2909 * you may not use this file except in compliance with the License.
2910 * You may obtain a copy of the License at
2911 *
2912 *   http://www.apache.org/licenses/LICENSE-2.0
2913 *
2914 * Unless required by applicable law or agreed to in writing, software
2915 * distributed under the License is distributed on an "AS IS" BASIS,
2916 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2917 * See the License for the specific language governing permissions and
2918 * limitations under the License.
2919 */function Ub(t){return Fde(t,["next","error","complete"])}function Fde(t,e){if(typeof t!="object"||t===null)return!1;const n=t;for(const r of e)if(r in n&&typeof n[r]=="function")return!0;return!1}/**
2920 * @license
2921 * Copyright 2017 Google LLC
2922 *
2923 * Licensed under the Apache License, Version 2.0 (the "License");
2924 * you may not use this file except in compliance with the License.
2925 * You may obtain a copy of the License at
2926 *
2927 *   http://www.apache.org/licenses/LICENSE-2.0
2928 *
2929 * Unless required by applicable law or agreed to in writing, software
2930 * distributed under the License is distributed on an "AS IS" BASIS,
2931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2932 * See the License for the specific language governing permissions and
2933 * limitations under the License.
2934 */class $de{enableIndexedDbPersistence(e,n){return Qce(e._delegate,{forceOwnership:n})}enableMultiTabIndexedDbPersistence(e){return Yce(e._delegate)}clearIndexedDbPersistence(e){return Jce(e._delegate)}}class TB{constructor(e,n,r){this._delegate=n,this._persistenceProvider=r,this.INTERNAL={delete:()=>this.terminate()},e instanceof za||(this._appCompat=e)}get _databaseId(){return this._delegate._databaseId}settings(e){const n=this._delegate._getSettings();!e.merge&&n.host!==e.host&&ps("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&(e=Object.assign(Object.assign({},n),e),delete e.merge),this._delegate._setSettings(e)}useEmulator(e,n,r={}){Wce(this._delegate,e,n,r)}enableNetwork(){return Zce(this._delegate)}disableNetwork(){return ede(this._delegate)}enablePersistence(e){let n=!1,r=!1;return e&&(n=!!e.synchronizeTabs,r=!!e.experimentalForceOwningTab,Xj("synchronizeTabs",n,"experimentalForceOwningTab",r)),n?this._persistenceProvider.enableMultiTabIndexedDbPersistence(this):this._persistenceProvider.enableIndexedDbPersistence(this,r)}clearPersistence(){return this._persistenceProvider.clearIndexedDbPersistence(this)}terminate(){return this._appCompat&&(this._appCompat._removeServiceInstance("firestore-compat"),this._appCompat._removeServiceInstance("firestore")),this._delegate._delete()}waitForPendingWrites(){return Xce(this._delegate)}onSnapshotsInSync(e){return Rde(this._delegate,e)}get app(){if(!this._appCompat)throw new re("failed-precondition","Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._appCompat}collection(e){try{return new Sd(this,rB(this._delegate,e))}catch(n){throw jr(n,"collection()","Firestore.collection()")}}doc(e){try{return new Wi(this,Bv(this._delegate,e))}catch(n){throw jr(n,"doc()","Firestore.doc()")}}collectionGroup(e){try{return new Ur(this,qce(this._delegate,e))}catch(n){throw jr(n,"collectionGroup()","Firestore.collectionGroup()")}}runTransaction(e){return Ade(this._delegate,n=>e(new bB(this,n)))}batch(){return tr(this._delegate),new IB(new kde(this._delegate,e=>Cm(this._delegate,e)))}loadBundle(e){return tde(this._delegate,e)}namedQuery(e){return nde(this._delegate,e).then(n=>n?new Ur(this,n):null)}}class Pw extends Cx{constructor(e){super(),this.firestore=e}convertBytes(e){return new SB(new Js(e))}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return Wi.forKey(n,this.firestore,null)}}function Ude(t){$ae(t)}class bB{constructor(e,n){this._firestore=e,this._delegate=n,this._userDataWriter=new Pw(e)}get(e){const n=Wl(e);return this._delegate.get(n).then(r=>new Vp(this._firestore,new Ao(this._firestore._delegate,this._userDataWriter,r._key,r._document,r.metadata,n.converter)))}set(e,n,r){const i=Wl(e);return r?(Px("Transaction.set",r),this._delegate.set(i,n,r)):this._delegate.set(i,n),this}update(e,n,r,...i){const s=Wl(e);return arguments.length===2?this._delegate.update(s,n):this._delegate.update(s,n,r,...i),this}delete(e){const n=Wl(e);return this._delegate.delete(n),this}}class IB{constructor(e){this._delegate=e}set(e,n,r){const i=Wl(e);return r?(Px("WriteBatch.set",r),this._delegate.set(i,n,r)):this._delegate.set(i,n),this}update(e,n,r,...i){const s=Wl(e);return arguments.length===2?this._delegate.update(s,n):this._delegate.update(s,n,r,...i),this}delete(e){const n=Wl(e);return this._delegate.delete(n),this}commit(){return this._delegate.commit()}}class pu{constructor(e,n,r){this._firestore=e,this._userDataWriter=n,this._delegate=r}fromFirestore(e,n){const r=new Zh(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new Fp(this._firestore,r),n??{})}toFirestore(e,n){return n?this._delegate.toFirestore(e,n):this._delegate.toFirestore(e)}static getInstance(e,n){const r=pu.INSTANCES;let i=r.get(e);i||(i=new WeakMap,r.set(e,i));let s=i.get(n);return s||(s=new pu(e,new Pw(e),n),i.set(n,s)),s}}pu.INSTANCES=new WeakMap;class Wi{constructor(e,n){this.firestore=e,this._delegate=n,this._userDataWriter=new Pw(e)}static forPath(e,n,r){if(e.length%2!==0)throw new re("invalid-argument",`Invalid document reference. Document references must have an even number of segments, but ${e.canonicalString()} has ${e.length}`);return new Wi(n,new tn(n._delegate,r,new he(e)))}static forKey(e,n,r){return new Wi(n,new tn(n._delegate,r,e))}get id(){return this._delegate.id}get parent(){return new Sd(this.firestore,this._delegate.parent)}get path(){return this._delegate.path}collection(e){try{return new Sd(this.firestore,rB(this._delegate,e))}catch(n){throw jr(n,"collection()","DocumentReference.collection()")}}isEqual(e){return e=EB(e),e instanceof tn?iB(this._delegate,e):!1}set(e,n){n=Px("DocumentReference.set",n);try{return n?MD(this._delegate,e,n):MD(this._delegate,e)}catch(r){throw jr(r,"setDoc()","DocumentReference.set()")}}update(e,n,...r){try{return arguments.length===1?LD(this._delegate,e):LD(this._delegate,e,n,...r)}
2934catch(i){throw jr(i,"updateDoc()","DocumentReference.update()")}}delete(){return bde(this._delegate)}onSnapshot(...e){const n=RB(e),r=xB(e,i=>new Vp(this.firestore,new Ao(this.firestore._delegate,this._userDataWriter,i._key,i._document,i.metadata,this._delegate.converter)));return wB(this._delegate,n,r)}get(e){let n;return e?.source==="cache"?n=_de(this._delegate):e?.source==="server"?n=wde(this._delegate):n=vde(this._delegate),n.then(r=>new Vp(this.firestore,new Ao(this.firestore._delegate,this._userDataWriter,r._key,r._document,r.metadata,this._delegate.converter)))}withConverter(e){return new Wi(this.firestore,e?this._delegate.withConverter(pu.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}function jr(t,e,n){return t.message=t.message.replace(e,n),t}function RB(t){for(const e of t)if(typeof e=="object"&&!Ub(e))return e;return{}}function xB(t,e){var n,r;let i;return Ub(t[0])?i=t[0]:Ub(t[1])?i=t[1]:typeof t[0]=="function"?i={next:t[0],error:t[1],complete:t[2]}:i={next:t[1],error:t[2],complete:t[3]},{next:s=>{i.next&&i.next(e(s))},error:(n=i.error)===null||n===void 0?void 0:n.bind(i),complete:(r=i.complete)===null||r===void 0?void 0:r.bind(i)}}class Vp{constructor(e,n){this._firestore=e,this._delegate=n}get ref(){return new Wi(this._firestore,this._delegate.ref)}get id(){return this._delegate.id}get metadata(){return this._delegate.metadata}get exists(){return this._delegate.exists()}data(e){return this._delegate.data(e)}get(e,n){return this._delegate.get(e,n)}isEqual(e){return _B(this._delegate,e._delegate)}}class Fp extends Vp{data(e){const n=this._delegate.data(e);return this._delegate._converter||Uae(n!==void 0),n}}class Ur{constructor(e,n){this.firestore=e,this._delegate=n,this._userDataWriter=new Pw(e)}where(e,n,r){try{return new Ur(this.firestore,pa(this._delegate,lde(e,n,r)))}catch(i){throw jr(i,/(orderBy|where)\(\)/,"Query.$1()")}}orderBy(e,n){try{return new Ur(this.firestore,pa(this._delegate,ude(e,n)))}catch(r){throw jr(r,/(orderBy|where)\(\)/,"Query.$1()")}}limit(e){try{return new Ur(this.firestore,pa(this._delegate,cde(e)))}catch(n){throw jr(n,"limit()","Query.limit()")}}limitToLast(e){try{return new Ur(this.firestore,pa(this._delegate,dde(e)))}catch(n){throw jr(n,"limitToLast()","Query.limitToLast()")}}startAt(...e){try{return new Ur(this.firestore,pa(this._delegate,fde(...e)))}catch(n){throw jr(n,"startAt()","Query.startAt()")}}startAfter(...e){try{return new Ur(this.firestore,pa(this._delegate,hde(...e)))}catch(n){throw jr(n,"startAfter()","Query.startAfter()")}}endBefore(...e){try{return new Ur(this.firestore,pa(this._delegate,pde(...e)))}catch(n){throw jr(n,"endBefore()","Query.endBefore()")}}endAt(...e){try{return new Ur(this.firestore,pa(this._delegate,mde(...e)))}catch(n){throw jr(n,"endAt()","Query.endAt()")}}isEqual(e){return sB(this._delegate,e._delegate)}get(e){let n;return e?.source==="cache"?n=Sde(this._delegate):e?.source==="server"?n=Tde(this._delegate):n=Ede(this._delegate),n.then(r=>new jb(this.firestore,new Ka(this.firestore._delegate,this._userDataWriter,this._delegate,r._snapshot)))}onSnapshot(...e){const n=RB(e),r=xB(e,i=>new jb(this.firestore,new Ka(this.firestore._delegate,this._userDataWriter,this._delegate,i._snapshot)));return wB(this._delegate,n,r)}withConverter(e){return new Ur(this.firestore,e?this._delegate.withConverter(pu.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}class jde{constructor(e,n){this._firestore=e,this._delegate=n}get type(){return this._delegate.type}get doc(){return new Fp(this._firestore,this._delegate.doc)}get oldIndex(){return this._delegate.oldIndex}get newIndex(){return this._delegate.newIndex}}class jb{constructor(e,n){this._firestore=e,this._delegate=n}get query(){return new Ur(this._firestore,this._delegate.query)}get metadata(){return this._delegate.metadata}get size(){return this._delegate.size}get empty(){return this._delegate.empty}get docs(){return this._delegate.docs.map(e=>new Fp(this._firestore,e))}docChanges(e){return this._delegate.docChanges(e).map(n=>new jde(this._firestore,n))}forEach(e,n){this._delegate.forEach(r=>{e.call(n,new Fp(this._firestore,r))})}isEqual(e){return _B(this._delegate,e._delegate)}}class Sd extends Ur{constructor(e,n){super(e,n),this.firestore=e,this._delegate=n}get id(){return this._delegate.id}get path(){return this._delegate.path}get parent(){const e=this._delegate.parent;return e?new Wi(this.firestore,e):null}doc(e){try{return e===void 0?new Wi(this.firestore,Bv(this._delegate)):new Wi(this.firestore,Bv(this._delegate,e))}catch(n){throw jr(n,"doc()","CollectionReference.doc()")}}add(e){return Ide(this._delegate,e).then(n=>
2934new Wi(this.firestore,n))}isEqual(e){return iB(this._delegate,e._delegate)}withConverter(e){return new Sd(this.firestore,e?this._delegate.withConverter(pu.getInstance(this.firestore,e)):this._delegate.withConverter(null))}}function Wl(t){return ft(t,tn)}/**
2935 * @license
2936 * Copyright 2017 Google LLC
2937 *
2938 * Licensed under the Apache License, Version 2.0 (the "License");
2939 * you may not use this file except in compliance with the License.
2940 * You may obtain a copy of the License at
2941 *
2942 *   http://www.apache.org/licenses/LICENSE-2.0
2943 *
2944 * Unless required by applicable law or agreed to in writing, software
2945 * distributed under the License is distributed on an "AS IS" BASIS,
2946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2947 * See the License for the specific language governing permissions and
2948 * limitations under the License.
2949 */class Ox{constructor(...e){this._delegate=new Ga(...e)}static documentId(){return new Ox(qt.keyField().canonicalString())}isEqual(e){return e=EB(e),e instanceof Ga?this._delegate._internalPath.isEqual(e._internalPath):!1}}/**
2950 * @license
2951 * Copyright 2017 Google LLC
2952 *
2953 * Licensed under the Apache License, Version 2.0 (the "License");
2954 * you may not use this file except in compliance with the License.
2955 * You may obtain a copy of the License at
2956 *
2957 *   http://www.apache.org/licenses/LICENSE-2.0
2958 *
2959 * Unless required by applicable law or agreed to in writing, software
2960 * distributed under the License is distributed on an "AS IS" BASIS,
2961 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2962 * See the License for the specific language governing permissions and
2963 * limitations under the License.
2964 */class Vl{constructor(e){this._delegate=e}static serverTimestamp(){const e=Ode();return e._methodName="FieldValue.serverTimestamp",new Vl(e)}static delete(){const e=Pde();return e._methodName="FieldValue.delete",new Vl(e)}static arrayUnion(...e){const n=Nde(...e);return n._methodName="FieldValue.arrayUnion",new Vl(n)}static arrayRemove(...e){const n=Dde(...e);return n._methodName="FieldValue.arrayRemove",new Vl(n)}static increment(e){const n=Mde(e);return n._methodName="FieldValue.increment",new Vl(n)}isEqual(e){return this._delegate.isEqual(e._delegate)}}/**
2965 * @license
2966 * Copyright 2021 Google LLC
2967 *
2968 * Licensed under the Apache License, Version 2.0 (the "License");
2969 * you may not use this file except in compliance with the License.
2970 * You may obtain a copy of the License at
2971 *
2972 *   http://www.apache.org/licenses/LICENSE-2.0
2973 *
2974 * Unless required by applicable law or agreed to in writing, software
2975 * distributed under the License is distributed on an "AS IS" BASIS,
2976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2977 * See the License for the specific language governing permissions and
2978 * limitations under the License.
2979 */const Bde={Firestore:TB,GeoPoint:Sw,Timestamp:Qt,Blob:SB,Transaction:bB,WriteBatch:IB,DocumentReference:Wi,DocumentSnapshot:Vp,Query:Ur,QueryDocumentSnapshot:Fp,QuerySnapshot:jb,CollectionReference:Sd,FieldPath:Ox,FieldValue:Vl,setLogLevel:Ude,CACHE_SIZE_UNLIMITED:Kce};function zde(t,e){t.INTERNAL.registerComponent(new En("firestore-compat",n=>{const r=n.getProvider("app-compat").getImmediate(),i=n.getProvider("firestore").getImmediate();return e(r,i)},"PUBLIC").setServiceProps(Object.assign({},Bde)))}/**
2980 * @license
2981 * Copyright 2020 Google LLC
2982 *
2983 * Licensed under the Apache License, Version 2.0 (the "License");
2984 * you may not use this file except in compliance with the License.
2985 * You may obtain a copy of the License at
2986 *
2987 *   http://www.apache.org/licenses/LICENSE-2.0
2988 *
2989 * Unless required by applicable law or agreed to in writing, software
2990 * distributed under the License is distributed on an "AS IS" BASIS,
2991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2992 * See the License for the specific language governing permissions and
2993 * limitations under the License.
2994 */function Wde(t){zde(t,(e,n)=>new TB(e,n,new $de)),t.registerVersion(Lde,Vde)}Wde(Kt);var $D={};/**
2995 * @license
2996 * Copyright 2017 Google LLC
2997 *
2998 * Licensed under the Apache License, Version 2.0 (the "License");
2999 * you may not use this file except in compliance with the License.
3000 * You may obtain a copy of the License at
3001 *
3002 *   http://www.apache.org/licenses/LICENSE-2.0
3003 *
3004 * Unless required by applicable law or agreed to in writing, software
3005 * distributed under the License is distributed on an "AS IS" BASIS,
3006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3007 * See the License for the specific language governing permissions and
3008 * limitations under the License.
3009 */const qde=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},Hde=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Gde={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,c=i+2<t.length,d=c?t[i+2]:0,h=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,v=d&63;c||(v=64,o||(g=64)),r.push(n[h],n[m],n[g],n[v])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(qde(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Hde(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||m==null)throw new Kde;const g=s<<2|l>>4;if(r.push(g),d!==64){const v=l<<4&240|d>>2;if(r.push(v),m!==64){const E=d<<6&192|m;r.push(E)}}}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)}}};let Kde=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}};const kB=function(t){try{return Gde.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
3010 * @license
3011 * Copyright 2022 Google LLC
3012 *
3013 * Licensed under the Apache License, Version 2.0 (the "License");
3014 * you may not use this file except in compliance with the License.
3015 * You may obtain a copy of the License at
3016 *
3017 *   http://www.apache.org/licenses/LICENSE-2.0
3018 *
3019 * Unless required by applicable law or agreed to in writing, software
3020 * distributed under the License is distributed on an "AS IS" BASIS,
3021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3022 * See the License for the specific language governing permissions and
3023 * limitations under the License.
3024 */function Qde(){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.")}/**
3025 * @license
3026 * Copyright 2022 Google LLC
3027 *
3028 * Licensed under the Apache License, Version 2.0 (the "License");
3029 * you may not use this file except in compliance with the License.
3030 * You may obtain a copy of the License at
3031 *
3032 *   http://www.apache.org/licenses/LICENSE-2.0
3033 *
3034 * Unless required by applicable law or agreed to in writing, software
3035 * distributed under the License is distributed on an "AS IS" BASIS,
3036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3037 * See the License for the specific language governing permissions and
3038 * limitations under the License.
3039 */const Yde=()=>Qde().__FIREBASE_DEFAULTS__,Jde=()=>{if(typeof process>"u"||typeof $D>"u")return;const t=$D.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Xde=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&kB(t[1]);return e&&JSON.parse(e)},Zde=()=>{try{return Yde()||Jde()||Xde()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},efe=t=>{var e;return(e=Zde())===null||e===void 0?void 0:e[`_${t}`]};/**
3040 * @license
3041 * Copyright 2017 Google LLC
3042 *
3043 * Licensed under the Apache License, Version 2.0 (the "License");
3044 * you may not use this file except in compliance with the License.
3045 * You may obtain a copy of the License at
3046 *
3047 *   http://www.apache.org/licenses/LICENSE-2.0
3048 *
3049 * Unless required by applicable law or agreed to in writing, software
3050 * distributed under the License is distributed on an "AS IS" BASIS,
3051 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3052 * See the License for the specific language governing permissions and
3053 * limitations under the License.
3054 */function fr(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function tfe(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(fr())}function nfe(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function rfe(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function ife(){const t=fr();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}/**
3055 * @license
3056 * Copyright 2017 Google LLC
3057 *
3058 * Licensed under the Apache License, Version 2.0 (the "License");
3059 * you may not use this file except in compliance with the License.
3060 * You may obtain a copy of the License at
3061 *
3062 *   http://www.apache.org/licenses/LICENSE-2.0
3063 *
3064 * Unless required by applicable law or agreed to in writing, software
3065 * distributed under the License is distributed on an "AS IS" BASIS,
3066 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3067 * See the License for the specific language governing permissions and
3068 * limitations under the License.
3069 */const sfe="FirebaseError";let Ow=class CB extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=sfe,Object.setPrototypeOf(this,CB.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Nw.prototype.create)}},Nw=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?ofe(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Ow(i,l,r)}};function ofe(t,e){return t.replace(afe,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const afe=/\{\$([^}]+)}/g;function lfe(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/**
3070 * @license
3071 * Copyright 2017 Google LLC
3072 *
3073 * Licensed under the Apache License, Version 2.0 (the "License");
3074 * you may not use this file except in compliance with the License.
3075 * You may obtain a copy of the License at
3076 *
3077 *   http://www.apache.org/licenses/LICENSE-2.0
3078 *
3079 * Unless required by applicable law or agreed to in writing, softw
3079are
3080 * distributed under the License is distributed on an "AS IS" BASIS,
3081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3082 * See the License for the specific language governing permissions and
3083 * limitations under the License.
3084 */function Qd(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 Lc(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function Mh(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function ufe(t,e){const n=new cfe(t,e);return n.subscribe.bind(n)}class cfe{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.");
3084dfe(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=ZS),i.error===void 0&&(i.error=ZS),i.complete===void 0&&(i.complete=ZS);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function dfe(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 ZS(){}/**
3085 * @license
3086 * Copyright 2021 Google LLC
3087 *
3088 * Licensed under the Apache License, Version 2.0 (the "License");
3089 * you may not use this file except in compliance with the License.
3090 * You may obtain a copy of the License at
3091 *
3092 *   http://www.apache.org/licenses/LICENSE-2.0
3093 *
3094 * Unless required by applicable law or agreed to in writing, software
3095 * distributed under the License is distributed on an "AS IS" BASIS,
3096 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3097 * See the License for the specific language governing permissions and
3098 * limitations under the License.
3099 */function ht(t){return t&&t._delegate?t._delegate:t}/**
3100 * @license
3101 * Copyright 2017 Google LLC
3102 *
3103 * Licensed under the Apache License, Version 2.0 (the "License");
3104 * you may not use this file except in compliance with the License.
3105 * You may obtain a copy of the License at
3106 *
3107 *   http://www.apache.org/licenses/LICENSE-2.0
3108 *
3109 * Unless required by applicable law or agreed to in writing, software
3110 * distributed under the License is distributed on an "AS IS" BASIS,
3111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3112 * See the License for the specific language governing permissions and
3113 * limitations under the License.
3114 */var xt;(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"})(xt||(xt={}));const ffe={debug:xt.DEBUG,verbose:xt.VERBOSE,info:xt.INFO,warn:xt.WARN,error:xt.ERROR,silent:xt.SILENT},hfe=xt.INFO,pfe={[xt.DEBUG]:"log",[xt.VERBOSE]:"log",[xt.INFO]:"info",[xt.WARN]:"warn",[xt.ERROR]:"error"},mfe=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=pfe[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let gfe=class{constructor(e){this.name=e,this._logLevel=hfe,this._logHandler=mfe,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in xt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?ffe[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,xt.DEBUG,...e),this._logHandler(this,xt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,xt.VERBOSE,...e),this._logHandler(this,xt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,xt.INFO,...e),this._logHandler(this,xt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,xt.WARN,...e),this._logHandler(this,xt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,xt.ERROR,...e),this._logHandler(this,xt.ERROR,...e)}};function Nx(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}const uh={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",TWITTER:"twitter.com"},Ec={EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"};/**
3115 * @license
3116 * Copyright 2020 Google LLC
3117 *
3118 * Licensed under the Apache License, Version 2.0 (the "License");
3119 * you may not use this file except in compliance with the License.
3120 * You may obtain a copy of the License at
3121 *
3122 *   http://www.apache.org/licenses/LICENSE-2.0
3123 *
3124 * Unless required by applicable law or agreed to in writing, software
3125 * distributed under the License is distributed on an "AS IS" BASIS,
3126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3127 * See the License for the specific language governing permissions and
3128 * limitations under the License.
3129 */function yfe(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","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.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
3129ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not regist
vendor: 9,511 bytes, line 3129
3129ed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is incorrect, malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-password":"A non-empty password must be provided","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.","missing-recaptcha-token":"The reCAPTCHA token is missing when sending request to the backend.","invalid-recaptcha-token":"The reCAPTCHA token is invalid when sending request to the backend.","invalid-recaptcha-action":"The reCAPTCHA action is invalid when sending request to the backend.","recaptcha-not-enabled":"reCAPTCHA Enterprise integration is not enabled for this project.","missing-client-type":"The reCAPTCHA client type is missing when sending request to the backend.","missing-recaptcha-version":"The reCAPTCHA version is missing when sending request to the backend.","invalid-req-type":"Invalid request parameters.","invalid-recaptcha-version":"The reCAPTCHA version is invalid when sending request to the backend.","unsupported-password-policy-schema-version":"The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.","password-does-not-meet-requirements":"The password does not meet the requirements."
3129}}function AB(){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 vfe=yfe,_fe=AB,PB=new Nw("auth","Firebase",AB());/**
3130 * @license
3131 * Copyright 2020 Google LLC
3132 *
3133 * Licensed under the Apache License, Version 2.0 (the "License");
3134 * you may not use this file except in compliance with the License.
3135 * You may obtain a copy of the License at
3136 *
3137 *   http://www.apache.org/licenses/LICENSE-2.0
3138 *
3139 * Unless required by applicable law or agreed to in writing, software
3140 * distributed under the License is distributed on an "AS IS" BASIS,
3141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3142 * See the License for the specific language governing permissions and
3143 * limitations under the License.
3144 */const Wv=new gfe("@firebase/auth");function wfe(t,...e){Wv.logLevel<=xt.WARN&&Wv.warn(`Auth (${Mo}): ${t}`,...e)}function Jy(t,...e){Wv.logLevel<=xt.ERROR&&Wv.error(`Auth (${Mo}): ${t}`,...e)}/**
3145 * @license
3146 * Copyright 2020 Google LLC
3147 *
3148 * Licensed under the Apache License, Version 2.0 (the "License");
3149 * you may not use this file except in compliance with the License.
3150 * You may obtain a copy of the License at
3151 *
3152 *   http://www.apache.org/licenses/LICENSE-2.0
3153 *
3154 * Unless required by applicable law or agreed to in writing, software
3155 * distributed under the License is distributed on an "AS IS" BASIS,
3156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3157 * See the License for the specific language governing permissions and
3158 * limitations under the License.
3159 */function hr(t,...e){throw Dx(t,...e)}function dr(t,...e){return Dx(t,...e)}function OB(t,e,n){const r=Object.assign(Object.assign({},_fe()),{[e]:n});return new Nw("auth","Firebase",r).create(e,{appName:t.name})}function Yd(t,e,n){const r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&hr(t,"argument-error"),OB(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Dx(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 PB.create(t,...e)}function ce(t,e,...n){if(!t)throw Dx(e,...n)}function js(t){const e="INTERNAL ASSERTION FAILED: "+t;throw Jy(e),new Error(e)}function ms(t,e){t||js(e)}/**
3160 * @license
3161 * Copyright 2020 Google LLC
3162 *
3163 * Licensed under the Apache License, Version 2.0 (the "License");
3164 * you may not use this file except in compliance with the License.
3165 * You may obtain a copy of the License at
3166 *
3167 *   http://www.apache.org/licenses/LICENSE-2.0
3168 *
3169 * Unless required by applicable law or agreed to in writing, software
3170 * distributed under the License is distributed on an "AS IS" BASIS,
3171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3172 * See the License for the specific language governing permissions and
3173 * limitations under the License.
3174 */function $p(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function Mx(){return UD()==="http:"||UD()==="https:"}function UD(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/**
3175 * @license
3176 * Copyright 2020 Google LLC
3177 *
3178 * Licensed under the Apache License, Version 2.0 (the "License");
3179 * you may not use this file except in compliance with the License.
3180 * You may obtain a copy of the License at
3181 *
3182 *   http://www.apache.org/licenses/LICENSE-2.0
3183 *
3184 * Unless required by applicable law or agreed to in writing, software
3185 * distributed under the License is distributed on an "AS IS" BASIS,
3186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3187 * See the License for the specific language governing permissions and
3188 * limitations under the License.
3189 */function Efe(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Mx()||nfe()||"connection"in navigator)?navigator.onLine:!0}function Sfe(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/**
3190 * @license
3191 * Copyright 2020 Google LLC
3192 *
3193 * Licensed under the Apache License, Version 2.0 (the "License");
3194 * you may not use this file except in compliance with the License.
3195 * You may obtain a copy of the License at
3196 *
3197 *   http://www.apache.org/licenses/LICENSE-2.0
3198 *
3199 * Unless required by applicable law or agreed to in writing, software
3200 * distributed under the License is distributed on an "AS IS" BASIS,
3201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3202 * See the License for the specific language governing permissions and
3203 * limitations under the License.
3204 */class Am{constructor(e,n){this.shortDelay=e,this.longDelay=n,ms(n>e,"Short delay should be less than long delay!"),this.isMobile=tfe()||rfe()}get(){return Efe()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
3205 * @license
3206 * Copyright 2020 Google LLC
3207 *
3208 * Licensed under the Apache License, Version 2.0 (the "License");
3209 * you may not use this file except in compliance with the License.
3210 * You may obtain a copy of the License at
3211 *
3212 *   http://www.apache.org/licenses/LICENSE-2.0
3213 *
3214 * Unless required by applicable law or agreed to in writing, software
3215 * distributed under the License is distributed on an "AS IS" BASIS,
3216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3217 * See the License for the specific language governing permissions and
3218 * limitations under the License.
3219 */function Lx(t,e){ms(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/**
3220 * @license
3221 * Copyright 2020 Google LLC
3222 *
3223 * Licensed under the Apache License, Version 2.0 (the "License");
3224 * you may not use this file except in compliance with the License.
3225 * You may obtain a copy of the License at
3226 *
3227 *   http://www.apache.org/licenses/LICENSE-2.0
3228 *
3229 * Unless required by applicable law or agreed to in writing, software
3230 * distributed under the License is distributed on an "AS IS" BASIS,
3231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3232 * See the License for the specific language governing permissions and
3233 * limitations under the License.
3234 */class NB{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;js("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;js("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;js("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
3235 * @license
3236 * Copyright 2020 Google LLC
3237 *
3238 * Licensed under the Apache License, Version 2.0 (the "License");
3239 * you may not use this file except in compliance with the License.
3240 * You may obtain a copy of the License at
3241 *
3242 *   http://www.apache.org/licenses/LICENSE-2.0
3243 *
3244 * Unless required by applicable law or agreed to in writing, software
3245 * distributed under the License is distributed on an "AS IS" BASIS,
3246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3247 * See the License for the specific language governing permissions and
3248 * limitations under the License.
3249 */const Tfe={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"};/**
3250 * @license
3251 * Copyright 2020 Google LLC
3252 *
3253 * Licensed under the Apache License, Version 2.0 (the "License");
3254 * you may not use this file except in compliance with the License.
3255 * You may obtain a copy of the License at
3256 *
3257 *   http://www.apache.org/licenses/LICENSE-2.0
3258 *
3259 * Unless required by applicable law or agreed to in writing, software
3260 * distributed under the License is distributed on an "AS IS" BASIS,
3261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3262 * See the License for the specific language governing permissions and
3263 * limitations under the License.
3264 */const bfe=new Am(3e4,6e4);function hn(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function pn(t,e,n,r,i={}){return DB(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});const l=Qd(Object.assign({key:t.config.apiKey},o)).slice(1),c=await t._getAdditionalHeaders();return c["Content-Type"]="application/json",t.languageCode&&(c["X-Firebase-Locale"]=t.languageCode),NB.fetch()(MB(t,t.config.apiHost,n,l),Object.assign({method:e,headers:c,referrerPolicy:"no-referrer"},s))})}async function DB(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},Tfe),e);try{const i=new Rfe(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=await s.json();if("needConfirmation"in o)throw Lh(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const l=s.ok?o.errorMessage:o.error.message,[c,d]=l.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw Lh(t,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw Lh(t,"email-already-in-use",o);if(c==="USER_DISABLED")throw Lh(t,"user-disabled",o);const h=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(d)throw OB(t,h,d);hr(t,h)}}catch(i){if(i instanceof Ow)throw i;hr(t,"network-request-failed",{message:String(i)})}}async function $o(t,e,n,r,i={}){const s=await pn(t,e,n,r,i);return"mfaPendingCredential"in s&&hr(t,"multi-factor-auth-required",{_serverResponse:s}),s}function MB(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?Lx(t.config,i):`${t.config.apiScheme}://${i}`}function Ife(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class Rfe{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(dr(this.auth,"network-request-failed")),bfe.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Lh(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=dr(t,e,r);return i.customData._tokenResponse=n,i}/**
3265 * @license
3266 * Copyright 2020 Google LLC
3267 *
3268 * Licensed under the Apache License, Version 2.0 (the "License");
3269 * you may not use this file except in compliance with the License.
3270 * You may obtain a copy of the License at
3271 *
3272 *   http://www.apache.org/licenses/LICENSE-2.0
3273 *
3274 * Unless required by applicable law or agreed to in writing, software
3275 * distributed under the License is distributed on an "AS IS" BASIS,
3276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3277 * See the License for the specific language governing permissions and
3278 * limitations under the License.
3279 */function jD(t){return t!==void 0&&t.getResponse!==void 0}function BD(t){return t!==void 0&&t.enterprise!==void 0}class xfe{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 Ife(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}}/**
3280 * @license
3281 * Copyright 2020 Google LLC
3282 *
3283 * Licensed under the Apache License, Version 2.0 (the "License");
3284 * you may not use this file except in compliance with the License.
3285 * You may obtain a copy of the License at
3286 *
3287 *   http://www.apache.org/licenses/LICENSE-2.0
3288 *
3289 * Unless required by applicable law or agreed to in writing, software
3290 * distributed under the License is distributed on an "AS IS" BASIS,
3291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3292 * See the License for the specific language governing permissions and
3293 * limitations under the License.
3294 */async function kfe(t){return(await pn(t,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function Cfe(t,e){return pn(t,"GET","/v2/recaptchaConfig",hn(t,e))}/**
3295 * @license
3296 * Copyright 2020 Google LLC
3297 *
3298 * Licensed under the Apache License, Version 2.0 (the "License");
3299 * you may not use this file except in compliance with the License.
3300 * You may obtain a copy of the License at
3301 *
3302 *   http://www.apache.org/licenses/LICENSE-2.0
3303 *
3304 * Unless required by applicable law or agreed to in writing, software
3305 * distributed under the License is distributed on an "AS IS" BASIS,
3306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3307 * See the License for the specific language governing permissions and
3308 * limitations under the License.
3309 */async function Afe(t,e){return pn(t,"POST","/v1/accounts:delete",e)}async function Pfe(t,e){return pn(t,"POST","/v1/accounts:update",e)}async function Ofe(t,e){return pn(t,"POST","/v1/accounts:lookup",e)}/**
3310 * @license
3311 * Copyright 2020 Google LLC
3312 *
3313 * Licensed under the Apache License, Version 2.0 (the "License");
3314 * you may not use this file except in compliance with the License.
3315 * You may obtain a copy of the License at
3316 *
3317 *   http://www.apache.org/licenses/LICENSE-2.0
3318 *
3319 * Unless required by applicable law or agreed to in writing, software
3320 * distributed under the License is distributed on an "AS IS" BASIS,
3321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3322 * See the License for the specific language governing permissions and
3323 * limitations under the License.
3324 */function ep(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function Nfe(t,e=!1){const n=ht(t),r=await n.getIdToken(e),i=Dw(r);ce(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,o=s?.sign_in_provider;return{claims:i,token:r,authTime:ep(eT(i.auth_time)),issuedAtTime:ep(eT(i.iat)),expirationTime:ep(eT(i.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}}function eT(t){return Number(t)*1e3}function Dw(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return Jy("JWT malformed, contained fewer than 3 sections"),null;try{const i=kB(n);return i?JSON.parse(i):(Jy("Failed to decode base64 JWT payload"),null)}catch(i){return Jy("Caught error parsing JWT payload as JSON",i?.toString()),null}}function Dfe(t){const e=Dw(t);return ce(e,"internal-error"),ce(typeof e.exp<"u","internal-error"),ce(typeof e.iat
3324<"u","internal-error"),Number(e.exp)-Number(e.iat)}/**
3325 * @license
3326 * Copyright 2020 Google LLC
3327 *
3328 * Licensed under the Apache License, Version 2.0 (the "License");
3329 * you may not use this file except in compliance with the License.
3330 * You may obtain a copy of the License at
3331 *
3332 *   http://www.apache.org/licenses/LICENSE-2.0
3333 *
3334 * Unless required by applicable law or agreed to in writing, software
3335 * distributed under the License is distributed on an "AS IS" BASIS,
3336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3337 * See the License for the specific language governing permissions and
3338 * limitations under the License.
3339 */async function Po(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Ow&&Mfe(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function Mfe({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/**
3340 * @license
3341 * Copyright 2020 Google LLC
3342 *
3343 * Licensed under the Apache License, Version 2.0 (the "License");
3344 * you may not use this file except in compliance with the License.
3345 * You may obtain a copy of the License at
3346 *
3347 *   http://www.apache.org/licenses/LICENSE-2.0
3348 *
3349 * Unless required by applicable law or agreed to in writing, software
3350 * distributed under the License is distributed on an "AS IS" BASIS,
3351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3352 * See the License for the specific language governing permissions and
3353 * limitations under the License.
3354 */class Lfe{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?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
3355 * @license
3356 * Copyright 2020 Google LLC
3357 *
3358 * Licensed under the Apache License, Version 2.0 (the "License");
3359 * you may not use this file except in compliance with the License.
3360 * You may obtain a copy of the License at
3361 *
3362 *   http://www.apache.org/licenses/LICENSE-2.0
3363 *
3364 * Unless required by applicable law or agreed to in writing, software
3365 * distributed under the License is distributed on an "AS IS" BASIS,
3366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3367 * See the License for the specific language governing permissions and
3368 * limitations under the License.
3369 */class LB{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=ep(this.lastLoginAt),this.creationTime=ep(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
3370 * @license
3371 * Copyright 2019 Google LLC
3372 *
3373 * Licensed under the Apache License, Version 2.0 (the "License");
3374 * you may not use this file except in compliance with the License.
3375 * You may obtain a copy of the License at
3376 *
3377 *   http://www.apache.org/licenses/LICENSE-2.0
3378 *
3379 * Unless required by applicable law or agreed to in writing, software
3380 * distributed under the License is distributed on an "AS IS" BASIS,
3381 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3382 * See the License for the specific language governing permissions and
3383 * limitations under the License.
3384 */async function Up(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Po(t,Ofe(n,{idToken:r}));ce(i?.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?$fe(s.providerUserInfo):[],l=Ffe(t.providerData,o),c=t.isAnonymous,d=!(t.email&&s.passwordHash)&&!l?.length,h=c?d:!1,m={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new LB(s.createdAt,s.lastLoginAt),isAnonymous:h};Object.assign(t,m)}async function Vfe(t){const e=ht(t);await Up(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function Ffe(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function $fe(t){return t.map(e=>{var{providerId:n}=e,r=Nx(e,["providerId"]);
3384return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
3385 * @license
3386 * Copyright 2020 Google LLC
3387 *
3388 * Licensed under the Apache License, Version 2.0 (the "License");
3389 * you may not use this file except in compliance with the License.
3390 * You may obtain a copy of the License at
3391 *
3392 *   http://www.apache.org/licenses/LICENSE-2.0
3393 *
3394 * Unless required by applicable law or agreed to in writing, software
3395 * distributed under the License is distributed on an "AS IS" BASIS,
3396 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3397 * See the License for the specific language governing permissions and
3398 * limitations under the License.
3399 */async function Ufe(t,e){const n=await DB(t,{},async()=>{const r=Qd({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=MB(t,i,"/v1/token",`key=${s}`),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",NB.fetch()(o,{method:"POST",headers:l,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function jfe(t,e){return pn(t,"POST","/v2/accounts:revokeToken",hn(t,e))}/**
3400 * @license
3401 * Copyright 2020 Google LLC
3402 *
3403 * Licensed under the Apache License, Version 2.0 (the "License");
3404 * you may not use this file except in compliance with the License.
3405 * You may obtain a copy of the License at
3406 *
3407 *   http://www.apache.org/licenses/LICENSE-2.0
3408 *
3409 * Unless required by applicable law or agreed to in writing, software
3410 * distributed under the License is distributed on an "AS IS" BASIS,
3411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3412 * See the License for the specific language governing permissions and
3413 * limitations under the License.
3414 */class jp{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){ce(e.idToken,"internal-error"),ce(typeof e.idToken<"u","internal-error"),ce(typeof e.refreshToken<"u","internal-error");const n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Dfe(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}async getToken(e,n=!1){return ce(!this.accessToken||this.refreshToken,e,"user-token-expired"),!n&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:s}=await Ufe(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new jp;return r&&(ce(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(ce(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(ce(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new jp,this.toJSON())}_performRefresh(){return js("not implemented")}}/**
3415 * @license
3416 * Copyright 2020 Google LLC
3417 *
3418 * Licensed under the Apache License, Version 2.0 (the "License");
3419 * you may not use this file except in compliance with the License.
3420 * You may obtain a copy of the License at
3421 *
3422 *   http://www.apache.org/licenses/LICENSE-2.0
3423 *
3424 * Unless required by applicable law or agreed to in writing, software
3425 * distributed under the License is distributed on an "AS IS" BASIS,
3426 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3427 * See the License for the specific language governing permissions and
3428 * limitations under the License.
3429 */function ma(t,e){ce(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Jl{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=Nx(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Lfe(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new LB(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await Po(this,this.stsTokenManager.getToken(this.auth,e));return ce(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return Nfe(this,e)}reload(){return Vfe(this)}_assign(e){this!==e&&(ce(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
3429otoURL,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 Jl(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){ce(!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 Up(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Po(this,Afe(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,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,l,c,d,h;const m=(r=n.displayName)!==null&&r!==void 0?r:void 0,g=(i=n.email)!==null&&i!==void 0?i:void 0,v=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,E=(o=n.photoURL)!==null&&o!==void 0?o:void 0,S=(l=n.tenantId)!==null&&l!==void 0?l:void 0,w=(c=n._redirectEventId)!==null&&c!==void 0?c:void 0,b=(d=n.createdAt)!==null&&d!==void 0?d:void 0,C=(h=n.lastLoginAt)!==null&&h!==void 0?h:void 0,{uid:I,emailVerified:P,isAnonymous:x,providerData:N,stsTokenManager:k}=n;ce(I&&k,e,"internal-error");const V=jp.fromJSON(this.name,k);ce(typeof I=="string",e,"internal-error"),ma(m,e.name),ma(g,e.name),ce(typeof P=="boolean",e,"internal-error"),ce(typeof x=="boolean",e,"internal-error"),ma(v,e.name),ma(E,e.name),ma(S,e.name),ma(w,e.name),ma(b,e.name),ma(C,e.name);const L=new Jl({uid:I,auth:e,email:g,emailVerified:P,displayName:m,isAnonymous:x,photoURL:E,phoneNumber:v,tenantId:S,stsTokenManager:V,createdAt:b,lastLoginAt:C});return N&&Array.isArray(N)&&(L.providerData=N.map(F=>Object.assign({},F))),w&&(L._redirectEventId=w),L}static async _fromIdTokenResponse(e,n,r=!1){const i=new jp;i.updateFromServerResponse(n);const s=new Jl({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await Up(s),s}}/**
3430 * @license
3431 * Copyright 2020 Google LLC
3432 *
3433 * Licensed under the Apache License, Version 2.0 (the "License");
3434 * you may not use this file except in compliance with the License.
3435 * You may obtain a copy of the License at
3436 *
3437 *   http://www.apache.org/licenses/LICENSE-2.0
3438 *
3439 * Unless required by applicable law or agreed to in writing, software
3440 * distributed under the License is distributed on an "AS IS" BASIS,
3441 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3442 * See the License for the specific language governing permissions and
3443 * limitations under the License.
3444 */const zD=new Map;function Ei(t){ms(t instanceof Function,"Expected a class definition");let e=zD.get(t);return e?(ms(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,zD.set(t,e),e)}/**
3445 * @license
3446 * Copyright 2019 Google LLC
3447 *
3448 * Licensed under the Apache License, Version 2.0 (the "License");
3449 * you may not use this file except in compliance with the License.
3450 * You may obtain a copy of the License at
3451 *
3452 *   http://www.apache.org/licenses/LICENSE-2.0
3453 *
3454 * Unless required by applicable law or agreed to in writing, softw
3454are
3455 * distributed under the License is distributed on an "AS IS" BASIS,
3456 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3457 * See the License for the specific language governing permissions and
3458 * limitations under the License.
3459 */class VB{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){}}VB.type="NONE";const Td=VB;/**
3460 * @license
3461 * Copyright 2019 Google LLC
3462 *
3463 * Licensed under the Apache License, Version 2.0 (the "License");
3464 * you may not use this file except in compliance with the License.
3465 * You may obtain a copy of the License at
3466 *
3467 *   http://www.apache.org/licenses/LICENSE-2.0
3468 *
3469 * Unless required by applicable law or agreed to in writing, software
3470 * distributed under the License is distributed on an "AS IS" BASIS,
3471 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3472 * See the License for the specific language governing permissions and
3473 * limitations under the License.
3474 */function Xl(t,e,n){return`firebase:${t}:${e}:${n}`}class Hc{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=Xl(this.userKey,i.apiKey,s),this.fullPersistenceKey=Xl("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Jl._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 Hc(Ei(Td),e,r);const i=(await Promise.all(n.map(async d=>{if(await d._isAvailable())return d}))).filter(d=>d);let s=i[0]||Ei(Td);const o=Xl(r,e.config.apiKey,e.name);let l=null;for(const d of n)try{const h=await d._get(o);if(h){const m=Jl._fromJSON(e,h);d!==s&&(l=m),s=d;break}}catch{}const c=i.filter(d=>d._shouldAllowMigration);return!s._shouldAllowMigration||!c.length?new Hc(s,e,r):(s=c[0],l&&await s._set(o,l.toJSON()),await Promise.all(n.map(async d=>{if(d!==s)try{await d._remove(o)}catch{}})),new Hc(s,e,r))}}/**
3475 * @license
3476 * Copyright 2020 Google LLC
3477 *
3478 * Licensed under the Apache License, Version 2.0 (the "License");
3479 * you may not use this file except in compliance with the License.
3480 * You may obtain a copy of the License at
3481 *
3482 *   http://www.apache.org/licenses/LICENSE-2.0
3483 *
3484 * Unless required by applicable law or agreed to in writing, software
3485 * distributed under the License is distributed on an "AS IS" BASIS,
3486 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3487 * See the License for the specific language governing permissions and
3488 * limitations under the License.
3489 */function WD(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(UB(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(FB(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(jB(e))return"Blackberry";if(BB(e))return"Webos";if(Vx(e))return"Safari";if((e.includes("chrome/")||$B(e))&&!e.includes("edge/"))return"Chrome";if(Pm(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if(r?.length===2)return r[1]}return"Other"}function FB(t=fr()){return/firefox\//i.test(t)}function Vx(t=fr()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function $B(t=fr()){return/crios\//i.test(t)}function UB(t=fr()){return/iemobile/i.test(t)}function Pm(t=fr()){return/android/i.test(t)}function jB(t=fr()){return/blackberry/i.test(t)}function BB(t=fr()){return/webos/i.test(t)}function Jd(t=fr()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function Bfe(t=fr()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(t)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(t)}function zfe(t=fr()){var e;return Jd(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function Wfe(){return ife()&&document.documentMode===10}function zB(t=fr()){return Jd(t)||Pm(t)||BB(t)||jB(t)||/windows phone/i.test(t)||UB(t)}function qfe(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
3490 * @license
3491 * Copyright 2020 Google LLC
3492 *
3493 * Licensed under the Apache License, Version 2.0 (the "License");
3494 * you may not use this file except in compliance with the License.
3495 * You may obtain a copy of the License at
3496 *
3497 *   http://www.apache.org/licenses/LICENSE-2.0
3498 *
3499 * Unless required by applicable law or agreed to in writing, software
3500 * distributed under the License is distributed on an "AS IS" BASIS,
3501 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3502 * See the License for the specific language governing permissions and
3503 * limitations under the License.
3504 */function WB(t,e=[]){let n;switch(t){case"Browser":n=WD(fr());break;case"Worker":n=`${WD(fr())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Mo}/${r}`}/**
3505 * @license
3506 * Copyright 2022 Google LLC
3507 *
3508 * Licensed under the Apache License, Version 2.0 (the "License");
3509 * you may not use this file except in compliance with the License.
3510 * You may obtain a copy of the License at
3511 *
3512 *   http://www.apache.org/licenses/LICENSE-2.0
3513 *
3514 * Unless required by applicable law or agreed to in writing, software
3515 * distributed under the License is distributed on an "AS IS" BASIS,
3516 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3517 * See the License for the specific language governing permissions and
3518 * limitations under the License.
3519 */class Hfe{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){const r=s=>new Promise((o,l)=>{try{const c=e(s);o(c)}catch(c){l(c)}});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?.message})}}}/**
3520 * @license
3521 * Copyright 2023 Google LLC
3522 *
3523 * Licensed under the Apache License, Version 2.0 (the "License");
3524 * you may not use this file except in compliance with the License.
3525 * You may obtain a copy of the License at
3526 *
3527 *   http://www.apache.org/licenses/LICENSE-2.0
3528 *
3529 * Unless required by applicable law or agreed to in writing, software
3530 * distributed under the License is distributed on an "AS IS" BASIS,
3531 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3532 * See the License for the specific language governing permissions and
3533 * limitations under the License.
3534 */async function Gfe(t,e={}){return pn(t,"GET","/v2/passwordPolicy",hn(t,e))}/**
3535 * @license
3536 * Copyright 2023 Google LLC
3537 *
3538 * Licensed under the Apache License, Version 2.0 (the "License");
3539 * you may not use this file except in compliance with the License.
3540 * You may obtain a copy of the License at
3541 *
3542 *   http://www.apache.org/licenses/LICENSE-2.0
3543 *
3544 * Unless required by applicable law or agreed to in writing, software
3545 * distributed under the License is distributed on an "AS IS" BASIS,
3546 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3547 * See the License for the specific language governing permissions and
3548 * limitations under the License.
3549 */const Kfe=6;class Qfe{constructor(e){var n,r,i,s;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=o.minPasswordLength)!==null&&n!==void 0?n:Kfe,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=e.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var n,r,i,s,o,l;const c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,c),this.validatePasswordCharacterOptions(e,c),c.isValid&&
3549(c.isValid=(n=c.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(i=c.containsLowercaseLetter)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(s=c.containsUppercaseLetter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(o=c.containsNumericCharacter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(l=c.containsNonAlphanumericCharacter)!==null&&l!==void 0?l:!0),c}validatePasswordLengthOptions(e,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}}/**
3550 * @license
3551 * Copyright 2020 Google LLC
3552 *
3553 * Licensed under the Apache License, Version 2.0 (the "License");
3554 * you may not use this file except in compliance with the License.
3555 * You may obtain a copy of the License at
3556 *
3557 *   http://www.apache.org/licenses/LICENSE-2.0
3558 *
3559 * Unless required by applicable law or agreed to in writing, software
3560 * distributed under the License is distributed on an "AS IS" BASIS,
3561 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3562 * See the License for the specific language governing permissions and
3563 * limitations under the License.
3564 */class Yfe{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 qD(this),this.idTokenSubscription=new qD(this),this.beforeStateQueue=new Hfe(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=PB,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=Ei(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await Hc.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 initializeCurrentUser(e){var n;const r=await this.assertedPersistence.getCurrentUser();let i=r,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,l=i?._redirectEventId,c=await this.tryRedirectSignIn(e);(!o||o===l)&&c?.user&&(i=c.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);
3564if(!i._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return ce(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 Up(e)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=Sfe()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const n=e?ht(e):null;return n&&ce(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&&ce(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Ei(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 Gfe(this),n=new Qfe(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Nw("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 jfe(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&&Ei(e)||this._popupRedirectResolver;ce(n,this,"argument-error"),this.redirectPersistenceManager=await Hc.create(this,[Ei(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const s=typeof n=="function"?n:n.next.bind(n);let o=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(ce(l,this,"internal-error"),l.then(()=>{o||s(this.currentUser)}),typeof n=="function"){const c=e.addObserver(n,r,i);return()=>{o=!0,c()}}else{const c=e.addObserver(n);return()=>{o=!0,c()}}}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 ce(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=WB(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?.error&&wfe(`Error while retrieving App Check token: ${n.error}`),n?.token}}function fn(t){return ht(t)}class qD{constructor(e){this.auth=e,this.observer=null,this.addObserver=ufe(n=>this.observer=n)}get next(){return ce(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
3565 * @license
3566 * Copyright 2020 Google LLC
3567 *
3568 * Licensed under the Apache License, Version 2.0 (the "License");
3569 * you may not use this file except in compliance with the License.
3570 * You may obtain a copy of the License at
3571 *
3572 *   http://www.apache.org/licenses/LICENSE-2.0
3573 *
3574 * Unless required by applicable law or agreed to in writing, software
3575 * distributed under the License is distributed on an "AS IS" BASIS,
3576 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3577 * See the License for the specific language governing permissions and
3578 * limitations under the License.
3579 */let Om={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Jfe(t){Om=t}function Fx(t){return Om.loadJS(t)}function Xfe(){return Om.recaptchaV2Script}function Zfe(){return Om.recaptchaEnterpriseScript}function ehe(){return Om.gapiScript}function qB(t){return`__${t}${Math.floor(Math.random()*1e6)}`}const the="recaptcha-enterprise",nhe="NO_RECAPTCHA";class rhe{constructor(e){this.type=the,this.auth=fn(e)}async verify(e="verify",n=!1){async function r(s){if(!n){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,l)=>{Cfe(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)l(new Error("recaptcha Enterprise site key undefined"));else{const d=new xfe(c);return s.tenantId==null?s._agentRecaptchaConfig=d:s._tenantRecaptchaConfigs[s.tenantId]=d,o(d.siteKey)}}).catch(c=>{l(c)})})}function i(s,o,l){const c=window.grecaptcha;BD(c)?c.enterprise.ready(()=>{c.enterprise.execute(s,{action:e}).then(d=>{o(d)}).catch(()=>{o(nhe)})}):l(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((s,o)=>{r(this.auth).then(l=>{if(!n&&BD(window.grecaptcha))i(l,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let c=Zfe();c.length!==0&&(c+=l),Fx(c).then(()=>{i(l,s,o)}).catch(d=>{o(d)})}}).catch(l=>{o(l)})})}}async function HD(t,e,n,r=!1){const i=new rhe(t);let s;try{s=await i.verify(n)}catch{s=await i.verify(n,!0)}const o=Object.assign({},e);return r?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function Bp(t,e,n,r){var i;if(!((i=t._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const s=await HD(t,e,n,n==="getOobCode");return r(t,s)}else return r(t,e).catch(async s=>{if(s.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 o=await HD(t,e,n,n==="getOobCode");return r(t,o)}else return Promise.reject(s)})}function ihe(t,e){const n=e?.persistence||[],r=(Array.isArray(n)?n:[n]).map(Ei);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e?.popupRedirectResolver)}function she(t,e,n){const r=fn(t);ce(r._canInitEmulator,r,"emulator-config-failed"),ce(/^https?:\/\//.test(e),r,"invali
3579d-emulator-scheme");const i=!!n?.disableWarnings,s=HB(e),{host:o,port:l}=ohe(e),c=l===null?"":`:${l}`;r.config.emulator={url:`${s}//${o}${c}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:l,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||ahe()}function HB(t){const e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function ohe(t){const e=HB(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const s=i[1];return{host:s,port:GD(r.substr(s.length+1))}}else{const[s,o]=r.split(":");return{host:s,port:GD(o)}}}function GD(t){if(!t)return null;const e=Number(t);return isNaN(e)?null:e}function ahe(){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())}/**
3580 * @license
3581 * Copyright 2020 Google LLC
3582 *
3583 * Licensed under the Apache License, Version 2.0 (the "License");
3584 * you may not use this file except in compliance with the License.
3585 * You may obtain a copy of the License at
3586 *
3587 *   http://www.apache.org/licenses/LICENSE-2.0
3588 *
3589 * Unless required by applicable law or agreed to in writing, software
3590 * distributed under the License is distributed on an "AS IS" BASIS,
3591 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3592 * See the License for the specific language governing permissions and
3593 * limitations under the License.
3594 */class Xd{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return js("not implemented")}_getIdTokenResponse(e){return js("not implemented")}_linkToIdToken(e,n){return js("not implemented")}_getReauthenticationResolver(e){return js("not implemented")}}/**
3595 * @license
3596 * Copyright 2020 Google LLC
3597 *
3598 * Licensed under the Apache License, Version 2.0 (the "License");
3599 * you may not use this file except in compliance with the License.
3600 * You may obtain a copy of the License at
3601 *
3602 *   http://www.apache.org/licenses/LICENSE-2.0
3603 *
3604 * Unless required by applicable law or agreed to in writing, software
3605 * distributed under the License is distributed on an "AS IS" BASIS,
3606 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3607 * See the License for the specific language governing permissions and
3608 * limitations under the License.
3609 */async function GB(t,e){return pn(t,"POST","/v1/accounts:resetPassword",hn(t,e))}async function lhe(t,e){return pn(t,"POST","/v1/accounts:update",e)}async function uhe(t,e){return pn(t,"POST","/v1/accounts:signUp",e)}async function che(t,e){return pn(t,"POST","/v1/accounts:update",hn(t,e))}/**
3610 * @license
3611 * Copyright 2020 Google LLC
3612 *
3613 * Licensed under the Apache License, Version 2.0 (the "License");
3614 * you may not use this file except in compliance with the License.
3615 * You may obtain a copy of the License at
3616 *
3617 *   http://www.apache.org/licenses/LICENSE-2.0
3618 *
3619 * Unless required by applicable law or agreed to in writing, software
3620 * distributed under the License is distributed on an "AS IS" BASIS,
3621 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3622 * See the License for the specific language governing permissions and
3623 * limitations under the License.
3624 */async function dhe(t,e){return $o(t,"POST","/v1/accounts:signInWithPassword",hn(t,e))}async function Mw(t,e){return pn(t,"POST","/v1/accounts:sendOobCode",hn(t,e))}async function fhe(t,e){return Mw(t,e)}async function hhe(t,e){return Mw(t,e)}async function phe(t,e){return Mw(t,e)}async function mhe(t,e){return Mw(t,e)}/**
3625 * @license
3626 * Copyright 2020 Google LLC
3627 *
3628 * Licensed under the Apache License, Version 2.0 (the "License");
3629 * you may not use this file except in compliance with the License.
3630 * You may obtain a copy of the License at
3631 *
3632 *   http://www.apache.org/licenses/LICENSE-2.0
3633 *
3634 * Unless required by applicable law or agreed to in writing, software
3635 * distributed under the License is distributed on an "AS IS" BASIS,
3636 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3637 * See the License for the specific language governing permissions and
3638 * limitations under the License.
3639 */async function ghe(t,e){return $o(t,"POST","/v1/accounts:signInWithEmailLink",hn(t,e))}async function yhe(t,e){return $o(t,"POST","/v1/accounts:signInWithEmailLink",hn(t,e))}/**
3640 * @license
3641 * Copyright 2020 Google LLC
3642 *
3643 * Licensed under the Apache License, Version 2.0 (the "License");
3644 * you may not use this file except in compliance with the License.
3645 * You may obtain a copy of the License at
3646 *
3647 *   http://www.apache.org/licenses/LICENSE-2.0
3648 *
3649 * Unless required by applicable law or agreed to in writing, software
3650 * distributed under the License is distributed on an "AS IS" BASIS,
3651 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3652 * See the License for the specific language governing permissions and
3653 * limitations under the License.
3654 */class zp extends Xd{constructor(e,n,r,i=null){super("password",r),this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new zp(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new zp(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?.email&&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 Bp(e,n,"signInWithPassword",dhe);case"emailLink":return ghe(e,{email:this._email,oobCode:this._password});default:hr(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 Bp(e,r,"signUpPassword",uhe);case"emailLink":return yhe(e,{idToken:n,email:this._email,oobCode:this._password});default:hr(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
3655 * @license
3656 * Copyright 2020 Google LLC
3657 *
3658 * Licensed under the Apache License, Version 2.0 (the "License");
3659 * you may not use this file except in compliance with the License.
3660 * You may obtain a copy of the License at
3661 *
3662 *   http://www.apache.org/licenses/LICENSE-2.0
3663 *
3664 * Unless required by applicable law or agreed to in writing, software
3665 * distributed under the License is distributed on an "AS IS" BASIS,
3666 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3667 * See the License for the specific language governing permissions and
3668 * limitations under the License.
3669 */async function bo(t,e){return $o(t,"POST","/v1/accounts:signInWithIdp",hn(t,e))}/**
3670 * @license
3671 * Copyright 2020 Google LLC
3672 *
3673 * Licensed under the Apache License, Version 2.0 (the "License");
3674 * you may not use this file except in compliance with the License.
3675 * You may obtain a copy of the License at
3676 *
3677 *   http://www.apache.org/licenses/LICENSE-2.0
3678 *
3679 * Unless required by applicable law or agreed to in writing, software
3680 * distributed under the License is distributed on an "AS IS" BASIS,
3681 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3682 * See the License for the specific language governing permissions and
3683 * limitations under the License.
3684 */const vhe="http://localhost";class Xs extends Xd{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const n=new Xs(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&&
3684(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):hr("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=Nx(n,["providerId","signInMethod"]);if(!r||!i)return null;const o=new Xs(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return bo(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,bo(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,bo(e,n)}buildRequest(){const e={requestUri:vhe,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=Qd(n)}return e}}/**
3685 * @license
3686 * Copyright 2020 Google LLC
3687 *
3688 * Licensed under the Apache License, Version 2.0 (the "License");
3689 * you may not use this file except in compliance with the License.
3690 * You may obtain a copy of the License at
3691 *
3692 *   http://www.apache.org/licenses/LICENSE-2.0
3693 *
3694 * Unless required by applicable law or agreed to in writing, software
3695 * distributed under the License is distributed on an "AS IS" BASIS,
3696 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3697 * See the License for the specific language governing permissions and
3698 * limitations under the License.
3699 */async function _he(t,e){return pn(t,"POST","/v1/accounts:sendVerificationCode",hn(t,e))}async function whe(t,e){return $o(t,"POST","/v1/accounts:signInWithPhoneNumber",hn(t,e))}async function Ehe(t,e){const n=await $o(t,"POST","/v1/accounts:signInWithPhoneNumber",hn(t,e));if(n.temporaryProof)throw Lh(t,"account-exists-with-different-credential",n);return n}const She={USER_NOT_FOUND:"user-not-found"};async function The(t,e){const n=Object.assign(Object.assign({},e),{operation:"REAUTH"});return $o(t,"POST","/v1/accounts:signInWithPhoneNumber",hn(t,n),She)}/**
3700 * @license
3701 * Copyright 2020 Google LLC
3702 *
3703 * Licensed under the Apache License, Version 2.0 (the "License");
3704 * you may not use this file except in compliance with the License.
3705 * You may obtain a copy of the License at
3706 *
3707 *   http://www.apache.org/licenses/LICENSE-2.0
3708 *
3709 * Unless required by applicable law or agreed to in writing, software
3710 * distributed under the License is distributed on an "AS IS" BASIS,
3711 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3712 * See the License for the specific language governing permissions and
3713 * limitations under the License.
3714 */class Zl extends Xd{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,n){return new Zl({verificationId:e,verificationCode:n})}static _fromTokenResponse(e,n){return new Zl({phoneNumber:e,temporaryProof:n})}_getIdTokenResponse(e){return whe(e,this._makeVerificationRequest())}_linkToIdToken(e,n){return Ehe(e,Object.assign({idToken:n},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return The(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:n,verificationId:r,verificationCode:i}=this.params;return e&&n?{temporaryProof:e,phoneNumber:n}:{sessionInfo:r,code:i}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){typeof e=="string"&&(e=JSON.parse(e));const{verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:s}=e;return!r&&!n&&!i&&!s?null:new Zl({verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:s})}}/**
3715 * @license
3716 * Copyright 2020 Google LLC
3717 *
3718 * Licensed under the Apache License, Version 2.0 (the "License");
3719 * you may not use this file except in compliance with the License.
3720 * You may obtain a copy of the License at
3721 *
3722 *   http://www.apache.org/licenses/LICENSE-2.0
3723 *
3724 * Unless required by applicable law or agreed to in writing, software
3725 * distributed under the License is distributed on an "AS IS" BASIS,
3726 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3727 * See the License for the specific language governing permissions and
3728 * limitations under the License.
3729 */function bhe(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 Ihe(t){const e=Lc(Mh(t)).link,n=e?Lc(Mh(e)).deep_link_id:null,r=Lc(Mh(t)).deep_link_id;return(r?Lc(Mh(r)).link:null)||r||n||e||t}class Lw{constructor(e){var n,r,i,s,o,l;const c=Lc(Mh(e)),d=(n=c.apiKey)!==null&&n!==void 0?n:null,h=(r=c.oobCode)!==null&&r!==void 0?r:null,m=bhe((i=c.mode)!==null&&i!==void 0?i:null);ce(d&&h&&m,"argument-error"),this.apiKey=d,this.operation=m,this.code=h,this.continueUrl=(s=c.continueUrl)!==null&&s!==void 0?s:null,this.languageCode=(o=c.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(l=c.tenantId)!==null&&l!==void 0?l:null}static parseLink(e){const n=Ihe(e);try{return new Lw(n)}catch{return null}}}/**
3730 * @license
3731 * Copyright 2020 Google LLC
3732 *
3733 * Licensed under the Apache License, Version 2.0 (the "License");
3734 * you may not use this file except in compliance with the License.
3735 * You may obtain a copy of the License at
3736 *
3737 *   http://www.apache.org/licenses/LICENSE-2.0
3738 *
3739 * Unless required by applicable law or agreed to in writing, software
3740 * distributed under the License is distributed on an "AS IS" BASIS,
3741 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3742 * See the License for the specific language governing permissions and
3743 * limitations under the License.
3744 */class sl{constructor(){this.providerId=sl.PROVIDER_ID}static credential(e,n){return zp._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=Lw.parseLink(n);return ce(r,"argument-error"),zp._fromEmailAndCode(e,r.code,r.tenantId)}}sl.PROVIDER_ID="password";sl.EMAIL_PASSWORD_SIGN_IN_METHOD="password";sl.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
3745 * @license
3746 * Copyright 2020 Google LLC
3747 *
3748 * Licensed under the Apache License, Version 2.0 (the "License");
3749 * you may not use this file except in compliance with the License.
3750 * You may obtain a copy of the License at
3751 *
3752 *   http://www.apache.org/licenses/LICENSE-2.0
3753 *
3754 * Unless required by applicable law or agreed to in writing, software
3755 * distributed under the License is distributed on an "AS IS" BASIS,
3756 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3757 * See the License for the specific language governing permissions and
3758 * limitations under the License.
3759 */class Uo{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}}/**
3760 * @license
3761 * Copyright 2019 Google LLC
3762 *
3763 * Licensed under the Apache License, Version 2.0 (the "License");
3764 * you may not use this file except in compliance with the License.
3765 * You may obtain a copy of the License at
3766 *
3767 *   http://www.apache.org/licenses/LICENSE-2.0
3768 *
3769 * Unless required by applicable law or agreed to in writing, software
3770 * distributed under the License is distributed on an "AS IS" BASIS,
3771 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3772 * See the License for the specific language governing permissions and
3773 * limitations under the License.
3774 */class Zd extends Uo{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Gc extends Zd{static credentialFromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;return ce("providerId"in n&&"signInMethod"in n,"argument-error"),Xs._fromParams(n)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return ce(e.idToken||e.accessToken,"argument-error"),Xs._fromParams(Object.assign(Object.assign({}
3774,e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return Gc.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return Gc.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r,oauthTokenSecret:i,pendingToken:s,nonce:o,providerId:l}=e;if(!r&&!i&&!n&&!s||!l)return null;try{return new Gc(l)._credential({idToken:n,accessToken:r,nonce:o,pendingToken:s})}catch{return null}}}/**
3775 * @license
3776 * Copyright 2020 Google LLC
3777 *
3778 * Licensed under the Apache License, Version 2.0 (the "License");
3779 * you may not use this file except in compliance with the License.
3780 * You may obtain a copy of the License at
3781 *
3782 *   http://www.apache.org/licenses/LICENSE-2.0
3783 *
3784 * Unless required by applicable law or agreed to in writing, software
3785 * distributed under the License is distributed on an "AS IS" BASIS,
3786 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3787 * See the License for the specific language governing permissions and
3788 * limitations under the License.
3789 */class Os extends Zd{constructor(){super("facebook.com")}static credential(e){return Xs._fromParams({providerId:Os.PROVIDER_ID,signInMethod:Os.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Os.credentialFromTaggedObject(e)}static credentialFromError(e){return Os.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Os.credential(e.oauthAccessToken)}catch{return null}}}Os.FACEBOOK_SIGN_IN_METHOD="facebook.com";Os.PROVIDER_ID="facebook.com";/**
3790 * @license
3791 * Copyright 2020 Google LLC
3792 *
3793 * Licensed under the Apache License, Version 2.0 (the "License");
3794 * you may not use this file except in compliance with the License.
3795 * You may obtain a copy of the License at
3796 *
3797 *   http://www.apache.org/licenses/LICENSE-2.0
3798 *
3799 * Unless required by applicable law or agreed to in writing, software
3800 * distributed under the License is distributed on an "AS IS" BASIS,
3801 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3802 * See the License for the specific language governing permissions and
3803 * limitations under the License.
3804 */class Ns extends Zd{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return Xs._fromParams({providerId:Ns.PROVIDER_ID,signInMethod:Ns.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Ns.credentialFromTaggedObject(e)}static credentialFromError(e){return Ns.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Ns.credential(n,r)}catch{return null}}}Ns.GOOGLE_SIGN_IN_METHOD="google.com";Ns.PROVIDER_ID="google.com";/**
3805 * @license
3806 * Copyright 2020 Google LLC
3807 *
3808 * Licensed under the Apache License, Version 2.0 (the "License");
3809 * you may not use this file except in compliance with the License.
3810 * You may obtain a copy of the License at
3811 *
3812 *   http://www.apache.org/licenses/LICENSE-2.0
3813 *
3814 * Unless required by applicable law or agreed to in writing, software
3815 * distributed under the License is distributed on an "AS IS" BASIS,
3816 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3817 * See the License for the specific language governing permissions and
3818 * limitations under the License.
3819 */class Ds extends Zd{constructor(){super("github.com")}static credential(e){return Xs._fromParams({providerId:Ds.PROVIDER_ID,signInMethod:Ds.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ds.credentialFromTaggedObject(e)}static credentialFromError(e){return Ds.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Ds.credential(e.oauthAccessToken)}catch{return null}}}Ds.GITHUB_SIGN_IN_METHOD="github.com";Ds.PROVIDER_ID="github.com";/**
3820 * @license
3821 * Copyright 2020 Google LLC
3822 *
3823 * Licensed under the Apache License, Version 2.0 (the "License");
3824 * you may not use this file except in compliance with the License.
3825 * You may obtain a copy of the License at
3826 *
3827 *   http://www.apache.org/licenses/LICENSE-2.0
3828 *
3829 * Unless required by applicable law or agreed to in writing, software
3830 * distributed under the License is distributed on an "AS IS" BASIS,
3831 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3832 * See the License for the specific language governing permissions and
3833 * limitations under the License.
3834 */const Rhe="http://localhost";class bd extends Xd{constructor(e,n){super(e,e),this.pendingToken=n}_getIdTokenResponse(e){const n=this.buildRequest();return bo(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,bo(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,bo(e,n)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i,pendingToken:s}=n;return!r||!i||!s||r!==i?null:new bd(r,s)}static _create(e,n){return new bd(e,n)}buildRequest(){return{requestUri:Rhe,returnSecureToken:!0,pendingToken:this.pendingToken}}}/**
3835 * @license
3836 * Copyright 2020 Google LLC
3837 *
3838 * Licensed under the Apache License, Version 2.0 (the "License");
3839 * you may not use this file except in compliance with the License.
3840 * You may obtain a copy of the License at
3841 *
3842 *   http://www.apache.org/licenses/LICENSE-2.0
3843 *
3844 * Unless required by applicable law or agreed to in writing, software
3845 * distributed under the License is distributed on an "AS IS" BASIS,
3846 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3847 * See the License for the specific language governing permissions and
3848 * limitations under the License.
3849 */const xhe="saml.";class qv extends Uo{constructor(e){ce(e.startsWith(xhe),"argument-error"),super(e)}static credentialFromResult(e){return qv.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return qv.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){const n=bd.fromJSON(e);return ce(n,"argument-error"),n}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{pendingToken:n,providerId:r}=e;if(!n||!r)return null;try{return bd._create(r,n)}catch{return null}}}/**
3850 * @license
3851 * Copyright 2020 Google LLC
3852 *
3853 * Licensed under the Apache License, Version 2.0 (the "License");
3854 * you may not use this file except in compliance with the License.
3855 * You may obtain a copy of the License at
3856 *
3857 *   http://www.apache.org/licenses/LICENSE-2.0
3858 *
3859 * Unless required by applicable law or agreed to in writing, software
3860 * distributed under the License is distributed on an "AS IS" BASIS,
3861 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3862 * See the License for the specific language governing permissions and
3863 * limitations under the License.
3864 */class Ms extends Zd{constructor(){super("twitter.com")}static credential(e,n){return Xs._fromParams({providerId:Ms.PROVIDER_ID,signInMethod:Ms.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Ms.credentialFromTaggedObject(e)}static credentialFromError(e){return Ms.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Ms.credential(n,r)}catch{return null}}}Ms.TWITTER_SIGN_IN_METHOD="twitter.com";Ms.PROVIDER_ID="twitter.com";/**
3865 * @license
3866 * Copyright 2020 Google LLC
3867 *
3868 * Licensed under the Apache License, Version 2.0 (the "License");
3869 * you may not use this file except in compliance with the License.
3870 * You may obtain a copy of the License at
3871 *
3872 *   http://www.apache.org/licenses/LICENSE-2.0
3873 *
3874 * Unless required by applicable law or agreed to in writing, software
3875 * distributed under the License is distributed on an "AS IS" BASIS,
3876 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3877 * See the License for the specific language governing permissions and
3878 * limitations under the License.
3879 */async function KB(t,e){return $o(t,"POST","/v1/accounts:signUp",hn(t,e))}/**
3880 * @license
3881 * Copyright 2020 Google LLC
3882 *
3883 * Licensed under the Apache License, Version 2.0 (the "License");
3884 * you may not use this file except in compliance with the License.
3885 * You may obtain a copy of the License at
3886 *
3887 *   http://www.apache.org/licenses/LICENSE-2.0
3888 *
3889 * Unless required by applicable law or agreed to in writing, software
3890 * distributed under the License is distributed on an "AS IS" BASIS,
3891 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3892 * See the License for the specific language governing permissions and
3893 * limitations under the License.
3894 */class Ji{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const s=await Jl._fromIdTokenResponse(e,r,i),o=KD(r);return new Ji({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=KD(r);return new Ji({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function KD(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/**
3895 * @license
3896 * Copyright 2020 Google LLC
3897 *
3898 * Licensed under the Apache License, Version 2.0 (the "License");
3899 * you may not use this file except in compliance with the License.
3900 * You may obtain a copy of the License at
3901 *
3902 *   http://www.apache.org/licenses/LICENSE-2.0
3903 *
3904 * Unless required by applicable law or agreed to in writing, software
3905 * distributed under the License is distributed on an "AS IS" BASIS,
3906 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3907 * See the License for the specific language governing permissions and
3908 * limitations under the License.
3909 */async function khe(t){var e;const n=fn(t);if(await n._initializationPromise,!((e=n.currentUser)===null||e===void 0)&&e.isAnonymous)return new Ji({user:n.currentUser,providerId:null,operationType:"signIn"});const r=await KB(n,{returnSecureToken:!0}),i=await Ji._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}/**
3910 * @license
3911 * Copyright 2020 Google LLC
3912 *
3913 * Licensed under the Apache License, Version 2.0 (the "License");
3914 * you may not use this file except in compliance with the License.
3915 * You may obtain a copy of the License at
3916 *
3917 *   http://www.apache.org/licenses/LICENSE-2.0
3918 *
3919 * Unless required by applicable law or agreed to in writing, software
3920 * distributed under the License is distributed on an "AS IS" BASIS,
3921 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3922 * See the License for the specific language governing permissions and
3923 * limitations under the License.
3924 */class Hv extends Ow{constructor(e,n,r,i){var s;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,Hv.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new Hv(e,n,r,i)}}function QB(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?Hv._fromErrorAndOperation(t,s,e,r):s})}/**
3925 * @license
3926 * Copyright 2020 Google LLC
3927 *
3928 * Licensed under the Apache License, Version 2.0 (the "License");
3929 * you may not use this file except in compliance with the License.
3930 * You may obtain a copy of the License at
3931 *
3932 *   http://www.apache.org/licenses/LICENSE-2.0
3933 *
3934 * Unless required by applicable law or agreed to in writing, software
3935 * distributed under the License is distributed on an "AS IS" BASIS,
3936 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3937 * See the License for the specific language governing permissions and
3938 * limitations under the License.
3939 */function YB(t){return new Set(t.map(({providerId:e})=>e).filter(e=>!!e))}/**
3940 * @license
3941 * Copyright 2019 Google LLC
3942 *
3943 * Licensed under the Apache License, Version 2.0 (the "License");
3944 * you may not use this file except in compliance with the License.
3945 * You may obtain a copy of the License at
3946 *
3947 *   http://www.apache.org/licenses/LICENSE-2.0
3948 *
3949 * Unless required by applicable law or agreed to in writing, softw
3949are
3950 * distributed under the License is distributed on an "AS IS" BASIS,
3951 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3952 * See the License for the specific language governing permissions and
3953 * limitations under the License.
3954 */async function Che(t,e){const n=ht(t);await Vw(!0,n,e);const{providerUserInfo:r}=await Pfe(n.auth,{idToken:await n.getIdToken(),deleteProvider:[e]}),i=YB(r||[]);return n.providerData=n.providerData.filter(s=>i.has(s.providerId)),i.has("phone")||(n.phoneNumber=null),await n.auth._persistUserIfCurrent(n),n}async function $x(t,e,n=!1){const r=await Po(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return Ji._forOperation(t,"link",r)}async function Vw(t,e,n){await Up(e);const r=YB(e.providerData),i=t===!1?"provider-already-linked":"no-such-provider";ce(r.has(n)===t,e.auth,i)}/**
3955 * @license
3956 * Copyright 2019 Google LLC
3957 *
3958 * Licensed under the Apache License, Version 2.0 (the "License");
3959 * you may not use this file except in compliance with the License.
3960 * You may obtain a copy of the License at
3961 *
3962 *   http://www.apache.org/licenses/LICENSE-2.0
3963 *
3964 * Unless required by applicable law or agreed to in writing, software
3965 * distributed under the License is distributed on an "AS IS" BASIS,
3966 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3967 * See the License for the specific language governing permissions and
3968 * limitations under the License.
3969 */async function JB(t,e,n=!1){const{auth:r}=t,i="reauthenticate";try{const s=await Po(t,QB(r,i,e,t),n);ce(s.idToken,r,"internal-error");const o=Dw(s.idToken);ce(o,r,"internal-error");const{sub:l}=o;return ce(t.uid===l,r,"user-mismatch"),Ji._forOperation(t,i,s)}catch(s){throw s?.code==="auth/user-not-found"&&hr(r,"user-mismatch"),s}}/**
3970 * @license
3971 * Copyright 2020 Google LLC
3972 *
3973 * Licensed under the Apache License, Version 2.0 (the "License");
3974 * you may not use this file except in compliance with the License.
3975 * You may obtain a copy of the License at
3976 *
3977 *   http://www.apache.org/licenses/LICENSE-2.0
3978 *
3979 * Unless required by applicable law or agreed to in writing, software
3980 * distributed under the License is distributed on an "AS IS" BASIS,
3981 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3982 * See the License for the specific language governing permissions and
3983 * limitations under the License.
3984 */async function XB(t,e,n=!1){const r="signIn",i=await QB(t,r,e),s=await Ji._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}async function Fw(t,e){return XB(fn(t),e)}async function ZB(t,e){const n=ht(t);return await Vw(!1,n,e.providerId),$x(n,e)}async function e4(t,e){return JB(ht(t),e)}/**
3985 * @license
3986 * Copyright 2020 Google LLC
3987 *
3988 * Licensed under the Apache License, Version 2.0 (the "License");
3989 * you may not use this file except in compliance with the License.
3990 * You may obtain a copy of the License at
3991 *
3992 *   http://www.apache.org/licenses/LICENSE-2.0
3993 *
3994 * Unless required by applicable law or agreed to in writing, software
3995 * distributed under the License is distributed on an "AS IS" BASIS,
3996 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3997 * See the License for the specific language governing permissions and
3998 * limitations under the License.
3999 */async function Ahe(t,e){return $o(t,"POST","/v1/accounts:signInWithCustomToken",hn(t,e))}/**
4000 * @license
4001 * Copyright 2020 Google LLC
4002 *
4003 * Licensed under the Apache License, Version 2.0 (the "License");
4004 * you may not use this file except in compliance with the License.
4005 * You may obtain a copy of the License at
4006 *
4007 *   http://www.apache.org/licenses/LICENSE-2.0
4008 *
4009 * Unless required by applicable law or agreed to in writing, software
4010 * distributed under the License is distributed on an "AS IS" BASIS,
4011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4012 * See the License for the specific language governing permissions and
4013 * limitations under the License.
4014 */async function Phe(t,e){const n=fn(t),r=await Ahe(n,{token:e,returnSecureToken:!0}),i=await Ji._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(i.user),i}/**
4015 * @license
4016 * Copyright 2020 Google LLC
4017 *
4018 * Licensed under the Apache License, Version 2.0 (the "License");
4019 * you may not use this file except in compliance with the License.
4020 * You may obtain a copy of the License at
4021 *
4022 *   http://www.apache.org/licenses/LICENSE-2.0
4023 *
4024 * Unless required by applicable law or agreed to in writing, software
4025 * distributed under the License is distributed on an "AS IS" BASIS,
4026 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4027 * See the License for the specific language governing permissions and
4028 * limitations under the License.
4029 */class Nm{constructor(e,n){this.factorId=e,this.uid=n.mfaEnrollmentId,this.enrollmentTime=new Date(n.enrolledAt).toUTCString(),this.displayName=n.displayName}static _fromServerResponse(e,n){return"phoneInfo"in n?Ux._fromServerResponse(e,n):"totpInfo"in n?jx._fromServerResponse(e,n):hr(e,"internal-error")}}class Ux extends Nm{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,n){return new Ux(n)}}class jx extends Nm{constructor(e){super("totp",e)}static _fromServerResponse(e,n){return new jx(n)}}/**
4030 * @license
4031 * Copyright 2020 Google LLC
4032 *
4033 * Licensed under the Apache License, Version 2.0 (the "License");
4034 * you may not use this file except in compliance with the License.
4035 * You may obtain a copy of the License at
4036 *
4037 *   http://www.apache.org/licenses/LICENSE-2.0
4038 *
4039 * Unless required by applicable law or agreed to in writing, software
4040 * distributed under the License is distributed on an "AS IS" BASIS,
4041 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4042 * See the License for the specific language governing permissions and
4043 * limitations under the License.
4044 */function $w(t,e,n){var r;ce(((r=n.url)===null||r===void 0?void 0:r.length)>0,t,"invalid-continue-uri"),ce(typeof n.dynamicLinkDomain>"u"||n.dynamicLinkDomain.length>0,t,"invalid-dynamic-link-domain"),e.continueUrl=n.url,e.dynamicLinkDomain=n.dynamicLinkDomain,e.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(ce(n.iOS.bundleId.length>0,t,"missing-ios-bundle-id"),e.iOSBundleId=n.iOS.bundleId),n.android&&(ce(n.android.packageName.length>0,t,"missing-android-pkg-name"),e.androidInstallApp=n.android.installApp,e.androidMinimumVersionCode=n.android.minimumVersion,e.androidPackageName=n.android.packageName)}/**
4045 * @license
4046 * Copyright 2020 Google LLC
4047 *
4048 * Licensed under the Apache License, Version 2.0 (the "License");
4049 * you may not use this file except in compliance with the License.
4050 * You may obtain a copy of the License at
4051 *
4052 *   http://www.apache.org/licenses/LICENSE-2.0
4053 *
4054 * Unless required by applicable law or agreed to in writing, software
4055 * distributed under the License is distributed on an "AS IS" BASIS,
4056 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4057 * See the License for the specific language governing permissions and
4058 * limitations under the License.
4059 */async function Bx(t){const e=fn(t);e._getPasswordPolicyInternal()&&await e._updatePasswordPolicy()}async function Ohe(t,e,n){const r=fn(t),i={requestType:"PASSWORD_RESET",email:e,clientType:"CLIENT_TYPE_WEB"};n&&$w(r,i,n),await Bp(r,i,"getOobCode",hhe)}async function Nhe(t,e,n){await GB(ht(t),{oobCode:e,newPassword:n}).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&Bx(t),r})}async function Dhe(t,e){await che(ht(t),{oobCode:e})}async function t4(t,e){const n=ht(t),r=await GB(n,{oobCode:e}),i=r.requestType;switch(ce(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":ce(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":ce(r.mfaInfo,n,"internal-error");default:ce(r.email,n,"internal-error")}let s=null;return r.mfaInfo&&(s=Nm._fromServerResponse(fn(n),r.mfaInfo)),{data:{email:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.newEmail:r.email)||null,previousEmail:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.email:r.newEmail)||null,multiFactorInfo:s},operation:i}}async function Mhe(t,e){const{data:n}=await t4(ht(t),e);return n.email}async function Lhe(t,e,n){const r=fn(t),o=await Bp(r,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",KB).catch(c=>{throw c.code==="auth/password-does-not-meet-requirements"&&Bx(t),
4059c}),l=await Ji._fromIdTokenResponse(r,"signIn",o);return await r._updateCurrentUser(l.user),l}function Vhe(t,e,n){return Fw(ht(t),sl.credential(e,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&Bx(t),r})}/**
4060 * @license
4061 * Copyright 2020 Google LLC
4062 *
4063 * Licensed under the Apache License, Version 2.0 (the "License");
4064 * you may not use this file except in compliance with the License.
4065 * You may obtain a copy of the License at
4066 *
4067 *   http://www.apache.org/licenses/LICENSE-2.0
4068 *
4069 * Unless required by applicable law or agreed to in writing, software
4070 * distributed under the License is distributed on an "AS IS" BASIS,
4071 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4072 * See the License for the specific language governing permissions and
4073 * limitations under the License.
4074 */async function Fhe(t,e,n){const r=fn(t),i={requestType:"EMAIL_SIGNIN",email:e,clientType:"CLIENT_TYPE_WEB"};function s(o,l){ce(l.handleCodeInApp,r,"argument-error"),l&&$w(r,o,l)}s(i,n),await Bp(r,i,"getOobCode",phe)}function $he(t,e){const n=Lw.parseLink(e);return n?.operation==="EMAIL_SIGNIN"}async function Uhe(t,e,n){const r=ht(t),i=sl.credentialWithLink(e,n||$p());return ce(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),Fw(r,i)}/**
4075 * @license
4076 * Copyright 2020 Google LLC
4077 *
4078 * Licensed under the Apache License, Version 2.0 (the "License");
4079 * you may not use this file except in compliance with the License.
4080 * You may obtain a copy of the License at
4081 *
4082 *   http://www.apache.org/licenses/LICENSE-2.0
4083 *
4084 * Unless required by applicable law or agreed to in writing, software
4085 * distributed under the License is distributed on an "AS IS" BASIS,
4086 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4087 * See the License for the specific language governing permissions and
4088 * limitations under the License.
4089 */async function jhe(t,e){return pn(t,"POST","/v1/accounts:createAuthUri",hn(t,e))}/**
4090 * @license
4091 * Copyright 2020 Google LLC
4092 *
4093 * Licensed under the Apache License, Version 2.0 (the "License");
4094 * you may not use this file except in compliance with the License.
4095 * You may obtain a copy of the License at
4096 *
4097 *   http://www.apache.org/licenses/LICENSE-2.0
4098 *
4099 * Unless required by applicable law or agreed to in writing, software
4100 * distributed under the License is distributed on an "AS IS" BASIS,
4101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4102 * See the License for the specific language governing permissions and
4103 * limitations under the License.
4104 */async function Bhe(t,e){const n=Mx()?$p():"http://localhost",r={identifier:e,continueUri:n},{signinMethods:i}=await jhe(ht(t),r);return i||[]}async function zhe(t,e){const n=ht(t),i={requestType:"VERIFY_EMAIL",idToken:await t.getIdToken()};e&&$w(n.auth,i,e);const{email:s}=await fhe(n.auth,i);s!==t.email&&await t.reload()}async function Whe(t,e,n){const r=ht(t),s={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await t.getIdToken(),newEmail:e};n&&$w(r.auth,s,n);const{email:o}=await mhe(r.auth,s);o!==t.email&&await t.reload()}/**
4105 * @license
4106 * Copyright 2020 Google LLC
4107 *
4108 * Licensed under the Apache License, Version 2.0 (the "License");
4109 * you may not use this file except in compliance with the License.
4110 * You may obtain a copy of the License at
4111 *
4112 *   http://www.apache.org/licenses/LICENSE-2.0
4113 *
4114 * Unless required by applicable law or agreed to in writing, software
4115 * distributed under the License is distributed on an "AS IS" BASIS,
4116 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4117 * See the License for the specific language governing permissions and
4118 * limitations under the License.
4119 */async function qhe(t,e){return pn(t,"POST","/v1/accounts:update",e)}/**
4120 * @license
4121 * Copyright 2020 Google LLC
4122 *
4123 * Licensed under the Apache License, Version 2.0 (the "License");
4124 * you may not use this file except in compliance with the License.
4125 * You may obtain a copy of the License at
4126 *
4127 *   http://www.apache.org/licenses/LICENSE-2.0
4128 *
4129 * Unless required by applicable law or agreed to in writing, softw
4129are
4130 * distributed under the License is distributed on an "AS IS" BASIS,
4131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4132 * See the License for the specific language governing permissions and
4133 * limitations under the License.
4134 */async function Hhe(t,{displayName:e,photoURL:n}){if(e===void 0&&n===void 0)return;const r=ht(t),s={idToken:await r.getIdToken(),displayName:e,photoUrl:n,returnSecureToken:!0},o=await Po(r,qhe(r.auth,s));r.displayName=o.displayName||null,r.photoURL=o.photoUrl||null;const l=r.providerData.find(({providerId:c})=>c==="password");l&&(l.displayName=r.displayName,l.photoURL=r.photoURL),await r._updateTokensIfNecessary(o)}function Ghe(t,e){return n4(ht(t),e,null)}function Khe(t,e){return n4(ht(t),null,e)}async function n4(t,e,n){const{auth:r}=t,s={idToken:await t.getIdToken(),returnSecureToken:!0};e&&(s.email=e),n&&(s.password=n);const o=await Po(t,lhe(r,s));await t._updateTokensIfNecessary(o,!0)}/**
4135 * @license
4136 * Copyright 2019 Google LLC
4137 *
4138 * Licensed under the Apache License, Version 2.0 (the "License");
4139 * you may not use this file except in compliance with the License.
4140 * You may obtain a copy of the License at
4141 *
4142 *   http://www.apache.org/licenses/LICENSE-2.0
4143 *
4144 * Unless required by applicable law or agreed to in writing, software
4145 * distributed under the License is distributed on an "AS IS" BASIS,
4146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4147 * See the License for the specific language governing permissions and
4148 * limitations under the License.
4149 */function Qhe(t){var e,n;if(!t)return null;const{providerId:r}=t,i=t.rawUserInfo?JSON.parse(t.rawUserInfo):{},s=t.isNewUser||t.kind==="identitytoolkit#SignupNewUserResponse";if(!r&&t?.idToken){const o=(n=(e=Dw(t.idToken))===null||e===void 0?void 0:e.firebase)===null||n===void 0?void 0:n.sign_in_provider;if(o){const l=o!=="anonymous"&&o!=="custom"?o:null;return new Kc(s,l)}}if(!r)return null;switch(r){case"facebook.com":return new Yhe(s,i);case"github.com":return new Jhe(s,i);case"google.com":return new Xhe(s,i);case"twitter.com":return new Zhe(s,i,t.screenName||null);case"custom":case"anonymous":return new Kc(s,null);default:return new Kc(s,r,i)}}class Kc{constructor(e,n,r={}){this.isNewUser=e,this.providerId=n,this.profile=r}}class r4 extends Kc{constructor(e,n,r,i){super(e,n,r),this.username=i}}class Yhe extends Kc{constructor(e,n){super(e,"facebook.com",n)}}class Jhe extends r4{constructor(e,n){super(e,"github.com",n,typeof n?.login=="string"?n?.login:null)}}class Xhe extends Kc{constructor(e,n){super(e,"google.com",n)}}class Zhe extends r4{constructor(e,n,r){super(e,"twitter.com",n,r)}}function epe(t){const{user:e,_tokenResponse:n}=t;return e.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:Qhe(n)}function zRe(t,e,n,r){return ht(t).onAuthStateChanged(e,n,r)}/**
4150 * @license
4151 * Copyright 2020 Google LLC
4152 *
4153 * Licensed under the Apache License, Version 2.0 (the "License");
4154 * you may not use this file except in compliance with the License.
4155 * You may obtain a copy of the License at
4156 *
4157 *   http://www.apache.org/licenses/LICENSE-2.0
4158 *
4159 * Unless required by applicable law or agreed to in writing, software
4160 * distributed under the License is distributed on an "AS IS" BASIS,
4161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4162 * See the License for the specific language governing permissions and
4163 * limitations under the License.
4164 */class ql{constructor(e,n,r){this.type=e,this.credential=n,this.user=r}static _fromIdtoken(e,n){return new ql("enroll",e,n)}static _fromMfaPendingCredential(e){return new ql("signin",e)}toJSON(){return{multiFactorSession:{[this.type==="enroll"?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){var n,r;if(e?.multiFactorSession){if(!((n=e.multiFactorSession)===null||n===void 0)&&n.pendingCredential)return ql._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);if(!((r=e.multiFactorSession)===null||r===void 0)&&r.idToken)return ql._fromIdtoken(e.multiFactorSession.idToken)}return null}}/**
4165 * @license
4166 * Copyright 2020 Google LLC
4167 *
4168 * Licensed under the Apache License, Version 2.0 (the "License");
4169 * you may not use this file except in compliance with the License.
4170 * You may obtain a copy of the License at
4171 *
4172 *   http://www.apache.org/licenses/LICENSE-2.0
4173 *
4174 * Unless required by applicable law or agreed to in writing, software
4175 * distributed under the License is distributed on an "AS IS" BASIS,
4176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4177 * See the License for the specific language governing permissions and
4178 * limitations under the License.
4179 */class zx{constructor(e,n,r){this.session=e,this.hints=n,this.signInResolver=r}static _fromError(e,n){const r=fn(e),i=n.customData._serverResponse,s=(i.mfaInfo||[]).map(l=>Nm._fromServerResponse(r,l));ce(i.mfaPendingCredential,r,"internal-error");const o=ql._fromMfaPendingCredential(i.mfaPendingCredential);return new zx(o,s,async l=>{const c=await l._process(r,o);delete i.mfaInfo,delete i.mfaPendingCredential;const d=Object.assign(Object.assign({},i),{idToken:c.idToken,refreshToken:c.refreshToken});switch(n.operationType){case"signIn":const h=await Ji._fromIdTokenResponse(r,n.operationType,d);return await r._updateCurrentUser(h.user),h;case"reauthenticate":return ce(n.user,r,"internal-error"),Ji._forOperation(n.user,n.operationType,d);default:hr(r,"internal-error")}})}async resolveSignIn(e){const n=e;return this.signInResolver(n)}}function tpe(t,e){var n;const r=ht(t),i=e;return ce(e.customData.operationType,r,"argument-error"),ce((n=i.customData._serverResponse)===null||n===void 0?void 0:n.mfaPendingCredential,r,"argument-error"),zx._fromError(r,i)}/**
4180 * @license
4181 * Copyright 2020 Google LLC
4182 *
4183 * Licensed under the Apache License, Version 2.0 (the "License");
4184 * you may not use this file except in compliance with the License.
4185 * You may obtain a copy of the License at
4186 *
4187 *   http://www.apache.org/licenses/LICENSE-2.0
4188 *
4189 * Unless required by applicable law or agreed to in writing, software
4190 * distributed under the License is distributed on an "AS IS" BASIS,
4191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4192 * See the License for the specific language governing permissions and
4193 * limitations under the License.
4194 */function npe(t,e){return pn(t,"POST","/v2/accounts/mfaEnrollment:start",hn(t,e))}function rpe(t,e){return pn(t,"POST","/v2/accounts/mfaEnrollment:finalize",hn(t,e))}function ipe(t,e){return pn(t,"POST","/v2/accounts/mfaEnrollment:withdraw",hn(t,e))}class Wx{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>Nm._fromServerResponse(e.auth,r)))})}static _fromUser(e){return new Wx(e)}async getSession(){return ql._fromIdtoken(await this.user.getIdToken(),this.user)}
4194async enroll(e,n){const r=e,i=await this.getSession(),s=await Po(this.user,r._process(this.user.auth,i,n));return await this.user._updateTokensIfNecessary(s),this.user.reload()}async unenroll(e){const n=typeof e=="string"?e:e.uid,r=await this.user.getIdToken();try{const i=await Po(this.user,ipe(this.user.auth,{idToken:r,mfaEnrollmentId:n}));this.enrolledFactors=this.enrolledFactors.filter(({uid:s})=>s!==n),await this.user._updateTokensIfNecessary(i),await this.user.reload()}catch(i){throw i}}}const tT=new WeakMap;function spe(t){const e=ht(t);return tT.has(e)||tT.set(e,Wx._fromUser(e)),tT.get(e)}const Gv="__sak";/**
4195 * @license
4196 * Copyright 2019 Google LLC
4197 *
4198 * Licensed under the Apache License, Version 2.0 (the "License");
4199 * you may not use this file except in compliance with the License.
4200 * You may obtain a copy of the License at
4201 *
4202 *   http://www.apache.org/licenses/LICENSE-2.0
4203 *
4204 * Unless required by applicable law or agreed to in writing, software
4205 * distributed under the License is distributed on an "AS IS" BASIS,
4206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4207 * See the License for the specific language governing permissions and
4208 * limitations under the License.
4209 */class i4{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Gv,"1"),this.storage.removeItem(Gv),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()}}/**
4210 * @license
4211 * Copyright 2020 Google LLC
4212 *
4213 * Licensed under the Apache License, Version 2.0 (the "License");
4214 * you may not use this file except in compliance with the License.
4215 * You may obtain a copy of the License at
4216 *
4217 *   http://www.apache.org/licenses/LICENSE-2.0
4218 *
4219 * Unless required by applicable law or agreed to in writing, software
4220 * distributed under the License is distributed on an "AS IS" BASIS,
4221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4222 * See the License for the specific language governing permissions and
4223 * limitations under the License.
4224 */function ope(){const t=fr();return Vx(t)||Jd(t)}const ape=1e3,lpe=10;class s4 extends i4{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=ope()&&qfe(),this.fallbackToPolling=zB(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,l,c)=>{this.notifyListeners(o,c)});return}const r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(r);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}const i=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);Wfe()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,lpe):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)})},ape)}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
4224ject.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]}}s4.type="LOCAL";const qx=s4;/**
4225 * @license
4226 * Copyright 2020 Google LLC
4227 *
4228 * Licensed under the Apache License, Version 2.0 (the "License");
4229 * you may not use this file except in compliance with the License.
4230 * You may obtain a copy of the License at
4231 *
4232 *   http://www.apache.org/licenses/LICENSE-2.0
4233 *
4234 * Unless required by applicable law or agreed to in writing, software
4235 * distributed under the License is distributed on an "AS IS" BASIS,
4236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4237 * See the License for the specific language governing permissions and
4238 * limitations under the License.
4239 */class o4 extends i4{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}o4.type="SESSION";const mu=o4;/**
4240 * @license
4241 * Copyright 2019 Google LLC
4242 *
4243 * Licensed under the Apache License, Version 2.0 (the "License");
4244 * you may not use this file except in compliance with the License.
4245 * You may obtain a copy of the License at
4246 *
4247 *   http://www.apache.org/licenses/LICENSE-2.0
4248 *
4249 * Unless required by applicable law or agreed to in writing, software
4250 * distributed under the License is distributed on an "AS IS" BASIS,
4251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4252 * See the License for the specific language governing permissions and
4253 * limitations under the License.
4254 */function upe(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}/**
4255 * @license
4256 * Copyright 2019 Google LLC
4257 *
4258 * Licensed under the Apache License, Version 2.0 (the "License");
4259 * you may not use this file except in compliance with the License.
4260 * You may obtain a copy of the License at
4261 *
4262 *   http://www.apache.org/licenses/LICENSE-2.0
4263 *
4264 * Unless required by applicable law or agreed to in writing, software
4265 * distributed under the License is distributed on an "AS IS" BASIS,
4266 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4267 * See the License for the specific language governing permissions and
4268 * limitations under the License.
4269 */class Uw{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 Uw(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!o?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const l=Array.from(o).map(async d=>d(n.origin,s)),c=await upe(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:c})}_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)}}Uw.receivers=[];/**
4270 * @license
4271 * Copyright 2020 Google LLC
4272 *
4273 * Licensed under the Apache License, Version 2.0 (the "License");
4274 * you may not use this file except in compliance with the License.
4275 * You may obtain a copy of the License at
4276 *
4277 *   http://www.apache.org/licenses/LICENSE-2.0
4278 *
4279 * Unless required by applicable law or agreed to in writing, software
4280 * distributed under the License is distributed on an "AS IS" BASIS,
4281 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4282 * See the License for the specific language governing permissions and
4283 * limitations under the License.
4284 */function Dm(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}/**
4285 * @license
4286 * Copyright 2019 Google LLC
4287 *
4288 * Licensed under the Apache License, Version 2.0 (the "License");
4289 * you may not use this file except in compliance with the License.
4290 * You may obtain a copy of the License at
4291 *
4292 *   http://www.apache.org/licenses/LICENSE-2.0
4293 *
4294 * Unless required by applicable law or agreed to in writing, software
4295 * distributed under the License is distributed on an "AS IS" BASIS,
4296 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4297 * See the License for the specific language governing permissions and
4298 * limitations under the License.
4299 */class cpe{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((l,c)=>{const d=Dm("",20);i.port1.start();const h=setTimeout(()=>{c(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(m){const g=m;if(g.data.eventId===d)switch(g.data.status){case"ack":clearTimeout(h),s=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),l(g.data.response);break;default:clearTimeout(h),clearTimeout(s),c(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:d,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
4300 * @license
4301 * Copyright 2020 Google LLC
4302 *
4303 * Licensed under the Apache License, Version 2.0 (the "License");
4304 * you may not use this file except in compliance with the License.
4305 * You may obtain a copy of the License at
4306 *
4307 *   http://www.apache.org/licenses/LICENSE-2.0
4308 *
4309 * Unless required by applicable law or agreed to in writing, software
4310 * distributed under the License is distributed on an "AS IS" BASIS,
4311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4312 * See the License for the specific language governing permissions and
4313 * limitations under the License.
4314 */function kn(){return window}function dpe(t){kn().location.href=t}/**
4315 * @license
4316 * Copyright 2020 Google LLC.
4317 *
4318 * Licensed under the Apache License, Version 2.0 (the "License");
4319 * you may not use this file except in compliance with the License.
4320 * You may obtain a copy of the License at
4321 *
4322 *   http://www.apache.org/licenses/LICENSE-2.0
4323 *
4324 * Unless required by applicable law or agreed to in writing, software
4325 * distributed under the License is distributed on an "AS IS" BASIS,
4326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4327 * See the License for the specific language governing permissions and
4328 * limitations under the License.
4329 */function Hx(){return typeof kn().WorkerGlobalScope<"u"&&typeof kn().importScripts=="function"}async function fpe(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function hpe(){var t;return((t=navigator?.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function ppe(){return Hx()?self:null}/**
4330 * @license
4331 * Copyright 2019 Google LLC
4332 *
4333 * Licensed under the Apache License, Version 2.0 (the "License");
4334 * you may not use this file except in compliance with the License.
4335 * You may obtain a copy of the License at
4336 *
4337 *   http://www.apache.org/licenses/LICENSE-2.0
4338 *
4339 * Unless required by applicable law or agreed to in writing, software
4340 * distributed under the License is distributed on an "AS IS" BASIS,
4341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4342 * See the License for the specific language governing permissions and
4343 * limitations under the License.
4344 */const a4="firebaseLocalStorageDb",mpe=1,Kv="firebaseLocalStorage",l4="fbase_key";class Mm{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 jw(t,e){return t.transaction([Kv],e?"readwrite":"readonly").objectStore(Kv)}function gpe(){const t=indexedDB.deleteDatabase(a4);
4344return new Mm(t).toPromise()}function Bb(){const t=indexedDB.open(a4,mpe);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Kv,{keyPath:l4})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Kv)?e(r):(r.close(),await gpe(),e(await Bb()))})})}async function QD(t,e,n){const r=jw(t,!0).put({[l4]:e,value:n});return new Mm(r).toPromise()}async function ype(t,e){const n=jw(t,!1).get(e),r=await new Mm(n).toPromise();return r===void 0?null:r.value}function YD(t,e){const n=jw(t,!0).delete(e);return new Mm(n).toPromise()}const vpe=800,_pe=3;class u4{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 Bb(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>_pe)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Hx()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Uw._getInstance(ppe()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
4344)),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await fpe(),!this.activeServiceWorker)return;this.sender=new cpe(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||hpe()!==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 Bb();return await QD(e,Gv,"1"),await YD(e,Gv),!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=>QD(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>ype(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>YD(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=jw(i,!1).getAll();return new Mm(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),vpe)}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
4344ject.keys(this.listeners).length===0&&this.stopPolling()}}u4.type="LOCAL";const Wp=u4;/**
4345 * @license
4346 * Copyright 2020 Google LLC
4347 *
4348 * Licensed under the Apache License, Version 2.0 (the "License");
4349 * you may not use this file except in compliance with the License.
4350 * You may obtain a copy of the License at
4351 *
4352 *   http://www.apache.org/licenses/LICENSE-2.0
4353 *
4354 * Unless required by applicable law or agreed to in writing, software
4355 * distributed under the License is distributed on an "AS IS" BASIS,
4356 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4357 * See the License for the specific language governing permissions and
4358 * limitations under the License.
4359 */function wpe(t,e){return pn(t,"POST","/v2/accounts/mfaSignIn:start",hn(t,e))}function Epe(t,e){return pn(t,"POST","/v2/accounts/mfaSignIn:finalize",hn(t,e))}/**
4360 * @license
4361 * Copyright 2020 Google LLC
4362 *
4363 * Licensed under the Apache License, Version 2.0 (the "License");
4364 * you may not use this file except in compliance with the License.
4365 * You may obtain a copy of the License at
4366 *
4367 *   http://www.apache.org/licenses/LICENSE-2.0
4368 *
4369 * Unless required by applicable law or agreed to in writing, software
4370 * distributed under the License is distributed on an "AS IS" BASIS,
4371 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4372 * See the License for the specific language governing permissions and
4373 * limitations under the License.
4374 */const Spe=500,Tpe=6e4,Ry=1e12;class bpe{constructor(e){this.auth=e,this.counter=Ry,this._widgets=new Map}render(e,n){const r=this.counter;return this._widgets.set(r,new Ipe(e,this.auth.name,n||{})),this.counter++,r}reset(e){var n;const r=e||Ry;(n=this._widgets.get(r))===null||n===void 0||n.delete(),this._widgets.delete(r)}getResponse(e){var n;const r=e||Ry;return((n=this._widgets.get(r))===null||n===void 0?void 0:n.getResponse())||""}async execute(e){var n;const r=e||Ry;return(n=this._widgets.get(r))===null||n===void 0||n.execute(),""}}class Ipe{constructor(e,n,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const i=typeof e=="string"?document.getElementById(e):e;ce(i,"argument-error",{appName:n}),this.container=i,this.isVisible=this.params.size!=="invisible",this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=Rpe(50);const{callback:e,"expired-callback":n}=this.params;if(e)try{e(this.responseToken)}catch{}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,n)try{n()}catch{}this.isVisible&&this.execute()},Tpe)},Spe))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}function Rpe(t){const e=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<t;r++)e.push(n.charAt(Math.floor(Math.random()*n.length)));return e.join("")}/**
4375 * @license
4376 * Copyright 2020 Google LLC
4377 *
4378 * Licensed under the Apache License, Version 2.0 (the "License");
4379 * you may not use this file except in compliance with the License.
4380 * You may obtain a copy of the License at
4381 *
4382 *   http://www.apache.org/licenses/LICENSE-2.0
4383 *
4384 * Unless required by applicable law or agreed to in writing, software
4385 * distributed under the License is distributed on an "AS IS" BASIS,
4386 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4387 * See the License for the specific language governing permissions and
4388 * limitations under the License.
4389 */const nT=qB("rcb"),xpe=new Am(3e4,6e4);class kpe{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((e=kn().grecaptcha)===null||e===void 0)&&e.render)}load(e,n=""){return ce(Cpe(n),e,"argument-error"),this.shouldResolveImmediately(n)&&jD(kn().grecaptcha)?Promise.resolve(kn().grecaptcha):new Promise((r,i)=>{const s=kn().setTimeout(()=>{i(dr(e,"network-request-failed"))},xpe.get());kn()[nT]=()=>{kn().clearTimeout(s),delete kn()[nT];const l=kn().grecaptcha;
4389if(!l||!jD(l)){i(dr(e,"internal-error"));return}const c=l.render;l.render=(d,h)=>{const m=c(d,h);return this.counter++,m},this.hostLanguage=n,r(l)};const o=`${Xfe()}?${Qd({onload:nT,render:"explicit",hl:n})}`;Fx(o).catch(()=>{clearTimeout(s),i(dr(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var n;return!!(!((n=kn().grecaptcha)===null||n===void 0)&&n.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function Cpe(t){return t.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(t)}class Ape{async load(e){return new bpe(e)}clearedOneInstance(){}}/**
4390 * @license
4391 * Copyright 2020 Google LLC
4392 *
4393 * Licensed under the Apache License, Version 2.0 (the "License");
4394 * you may not use this file except in compliance with the License.
4395 * You may obtain a copy of the License at
4396 *
4397 *   http://www.apache.org/licenses/LICENSE-2.0
4398 *
4399 * Unless required by applicable law or agreed to in writing, software
4400 * distributed under the License is distributed on an "AS IS" BASIS,
4401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4402 * See the License for the specific language governing permissions and
4403 * limitations under the License.
4404 */const c4="recaptcha",Ppe={theme:"light",type:"image"};let Ope=class{constructor(e,n,r=Object.assign({},Ppe)){this.parameters=r,this.type=c4,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=fn(e),this.isInvisible=this.parameters.size==="invisible",ce(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;ce(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Ape:new kpe,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),n=this.getAssertedRecaptcha(),r=n.getResponse(e);return r||new Promise(i=>{const s=o=>{o&&(this.tokenChangeListeners.delete(s),i(o))};this.tokenChangeListeners.add(s),this.isInvisible&&n.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise?this.renderPromise:(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e}),this.renderPromise)}_reset(){this.assertNotDestroyed(),this.widgetId!==null&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){ce(!this.parameters.sitekey,this.auth,"argument-error"),ce(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),ce(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return n=>{if(this.tokenChangeListeners.forEach(r=>r(n)),typeof e=="function")e(n);else if(typeof e=="string"){const r=kn()[e];typeof r=="function"&&r(n)}}}assertNotDestroyed(){ce(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const n=document.createElement("div");e.appendChild(n),e=n}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}
4404async init(){ce(Mx()&&!Hx(),this.auth,"internal-error"),await Npe(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await kfe(this.auth);ce(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return ce(this.recaptcha,this.auth,"internal-error"),this.recaptcha}};function Npe(){let t=null;return new Promise(e=>{if(document.readyState==="complete"){e();return}t=()=>e(),window.addEventListener("load",t)}).catch(e=>{throw t&&window.removeEventListener("load",t),e})}/**
4405 * @license
4406 * Copyright 2020 Google LLC
4407 *
4408 * Licensed under the Apache License, Version 2.0 (the "License");
4409 * you may not use this file except in compliance with the License.
4410 * You may obtain a copy of the License at
4411 *
4412 *   http://www.apache.org/licenses/LICENSE-2.0
4413 *
4414 * Unless required by applicable law or agreed to in writing, software
4415 * distributed under the License is distributed on an "AS IS" BASIS,
4416 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4417 * See the License for the specific language governing permissions and
4418 * limitations under the License.
4419 */class Gx{constructor(e,n){this.verificationId=e,this.onConfirmation=n}confirm(e){const n=Zl._fromVerification(this.verificationId,e);return this.onConfirmation(n)}}async function Dpe(t,e,n){const r=fn(t),i=await Bw(r,e,ht(n));return new Gx(i,s=>Fw(r,s))}async function Mpe(t,e,n){const r=ht(t);await Vw(!1,r,"phone");const i=await Bw(r.auth,e,ht(n));return new Gx(i,s=>ZB(r,s))}async function Lpe(t,e,n){const r=ht(t),i=await Bw(r.auth,e,ht(n));return new Gx(i,s=>e4(r,s))}async function Bw(t,e,n){var r;const i=await n.verify();try{ce(typeof i=="string",t,"argument-error"),ce(n.type===c4,t,"argument-error");let s;if(typeof e=="string"?s={phoneNumber:e}:s=e,"session"in s){const o=s.session;if("phoneNumber"in s)return ce(o.type==="enroll",t,"internal-error"),(await npe(t,{idToken:o.credential,phoneEnrollmentInfo:{phoneNumber:s.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo;{ce(o.type==="signin",t,"internal-error");const l=((r=s.multiFactorHint)===null||r===void 0?void 0:r.uid)||s.multiFactorUid;return ce(l,t,"missing-multi-factor-info"),(await wpe(t,{mfaPendingCredential:o.credential,mfaEnrollmentId:l,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}else{const{sessionInfo:o}=await _he(t,{phoneNumber:s.phoneNumber,recaptchaToken:i});return o}}finally{n._reset()}}async function Vpe(t,e){await $x(ht(t),e)}/**
4420 * @license
4421 * Copyright 2020 Google LLC
4422 *
4423 * Licensed under the Apache License, Version 2.0 (the "License");
4424 * you may not use this file except in compliance with the License.
4425 * You may obtain a copy of the License at
4426 *
4427 *   http://www.apache.org/licenses/LICENSE-2.0
4428 *
4429 * Unless required by applicable law or agreed to in writing, software
4430 * distributed under the License is distributed on an "AS IS" BASIS,
4431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4432 * See the License for the specific language governing permissions and
4433 * limitations under the License.
4434 */let gu=class Xy{constructor(e){this.providerId=Xy.PROVIDER_ID,this.auth=fn(e)}verifyPhoneNumber(e,n){return Bw(this.auth,e,ht(n))}static credential(e,n){return Zl._fromVerification(e,n)}static credentialFromResult(e){const n=e;return Xy.credentialFromTaggedObject(n)}static credentialFromError(e){return Xy.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:n,temporaryProof:r}=e;return n&&r?Zl._fromTokenResponse(n,r):null}};gu.PROVIDER_ID="phone";gu.PHONE_SIGN_IN_METHOD="phone";/**
4435 * @license
4436 * Copyright 2021 Google LLC
4437 *
4438 * Licensed under the Apache License, Version 2.0 (the "License");
4439 * you may not use this file except in compliance with the License.
4440 * You may obtain a copy of the License at
4441 *
4442 *   http://www.apache.org/licenses/LICENSE-2.0
4443 *
4444 * Unless required by applicable law or agreed to in writing, software
4445 * distributed under the License is distributed on an "AS IS" BASIS,
4446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4447 * See the License for the specific language governing permissions and
4448 * limitations under the License.
4449 */function Ou(t,e){return e?Ei(e):(ce(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/**
4450 * @license
4451 * Copyright 2019 Google LLC
4452 *
4453 * Licensed under the Apache License, Version 2.0 (the "License");
4454 * you may not use this file except in compliance with the License.
4455 * You may obtain a copy of the License at
4456 *
4457 *   http://www.apache.org/licenses/LICENSE-2.0
4458 *
4459 * Unless required by applicable law or agreed to in writing, software
4460 * distributed under the License is distributed on an "AS IS" BASIS,
4461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4462 * See the License for the specific language governing permissions and
4463 * limitations under the License.
4464 */class Kx extends Xd{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return bo(e,this._buildIdpRequest())}_linkToIdToken(e,n){return bo(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return bo(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 Fpe(t){return XB(t.auth,new 
4464Kx(t),t.bypassAuthState)}function $pe(t){const{auth:e,user:n}=t;return ce(n,e,"internal-error"),JB(n,new Kx(t),t.bypassAuthState)}async function Upe(t){const{auth:e,user:n}=t;return ce(n,e,"internal-error"),$x(n,new Kx(t),t.bypassAuthState)}/**
4465 * @license
4466 * Copyright 2020 Google LLC
4467 *
4468 * Licensed under the Apache License, Version 2.0 (the "License");
4469 * you may not use this file except in compliance with the License.
4470 * You may obtain a copy of the License at
4471 *
4472 *   http://www.apache.org/licenses/LICENSE-2.0
4473 *
4474 * Unless required by applicable law or agreed to in writing, software
4475 * distributed under the License is distributed on an "AS IS" BASIS,
4476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4477 * See the License for the specific language governing permissions and
4478 * limitations under the License.
4479 */class d4{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:l}=e;if(o){this.reject(o);return}const c={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(c))}catch(d){this.reject(d)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Fpe;case"linkViaPopup":case"linkViaRedirect":return Upe;case"reauthViaPopup":case"reauthViaRedirect":return $pe;default:hr(this.auth,"internal-error")}}resolve(e){ms(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){ms(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()}}/**
4480 * @license
4481 * Copyright 2020 Google LLC
4482 *
4483 * Licensed under the Apache License, Version 2.0 (the "License");
4484 * you may not use this file except in compliance with the License.
4485 * You may obtain a copy of the License at
4486 *
4487 *   http://www.apache.org/licenses/LICENSE-2.0
4488 *
4489 * Unless required by applicable law or agreed to in writing, software
4490 * distributed under the License is distributed on an "AS IS" BASIS,
4491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4492 * See the License for the specific language governing permissions and
4493 * limitations under the License.
4494 */const jpe=new Am(2e3,1e4);async function Bpe(t,e,n){const r=fn(t);Yd(t,e,Uo);const i=Ou(r,n);return new wo(r,"signInViaPopup",e,i).executeNotNull()}async function zpe(t,e,n){const r=ht(t);Yd(r.auth,e,Uo);const i=Ou(r.auth,n);return new wo(r.auth,"reauthViaPopup",e,i,r).executeNotNull()}async function Wpe(t,e,n){const r=ht(t);Yd(r.auth,e,Uo);const i=Ou(r.auth,n);return new wo(r.auth,"linkViaPopup",e,i,r).executeNotNull()}class wo extends d4{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,wo.currentPopupAction&&wo.currentPopupAction.cancel(),wo.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return ce(e,this.auth,"internal-error"),e}async onExecution(){ms(this.filter.length===1,"Popup operations only handle one event");const e=Dm();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(dr(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(dr(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,wo.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(dr(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,jpe.get())};e()}}wo.currentPopupAction=null;/**
4495 * @license
4496 * Copyright 2020 Google LLC
4497 *
4498 * Licensed under the Apache License, Version 2.0 (the "License");
4499 * you may not use this file except in compliance with the License.
4500 * You may obtain a copy of the License at
4501 *
4502 *   http://www.apache.org/licenses/LICENSE-2.0
4503 *
4504 * Unless required by applicable law or agreed to in writing, software
4505 * distributed under the License is distributed on an "AS IS" BASIS,
4506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4507 * See the License for the specific language governing permissions and
4508 * limitations under the License.
4509 */const qpe="pendingRedirect",tp=new Map;class Hpe extends d4{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=tp.get(this.auth._key());if(!e){try{const r=await Gpe(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}tp.set(this.auth._key(),e)}return this.bypassAuthState||tp.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 Gpe(t,e){const n=h4(e),r=f4(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}async function Qx(t,e){return f4(t)._set(h4(e),"true")}function Kpe(){tp.clear()}function Yx(t,e){tp.set(t._key(),e)}function f4(t){return Ei(t._redirectPersistence)}function h4(t){return Xl(qpe,t.config.apiKey,t.name)}/**
4510 * @license
4511 * Copyright 2020 Google LLC
4512 *
4513 * Licensed under the Apache License, Version 2.0 (the "License");
4514 * you may not use this file except in compliance with the License.
4515 * You may obtain a copy of the License at
4516 *
4517 *   http://www.apache.org/licenses/LICENSE-2.0
4518 *
4519 * Unless required by applicable law or agreed to in writing, software
4520 * distributed under the License is distributed on an "AS IS" BASIS,
4521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4522 * See the License for the specific language governing permissions and
4523 * limitations under the License.
4524 */function Qpe(t,e,n){return Ype(t,e,n)}async function Ype(t,e,n){const r=fn(t);Yd(t,e,Uo),await r._initializationPromise;const i=Ou(r,n);return await Qx(i,r),i._openRedirect(r,e,"signInViaRedirect")}function Jpe(t,e,n){return Xpe(t,e,n)}async function Xpe(t,e,n){const r=ht(t);Yd(r.auth,e,Uo),await r.auth._initializationPromise;const i=Ou(r.auth,n);await Qx(i,r.auth);const s=await p4(r);return i._openRedirect(r.auth,e,"reauthViaRedirect",s)}function Zpe(t,e,n){return eme(t,e,n)}async function eme(t,e,n){const r=ht(t);Yd(r.auth,e,Uo),await r.auth._initializationPromise;const i=Ou(r.auth,n);await Vw(!1,r,e.providerId),await Qx(i,r.auth);const s=await p4(r);return i._openRedirect(r.auth,e,"linkViaRedirect",s)}async function tme(t,e){return await fn(t)._initializationPromise,zw(t,e,!1)}async function zw(t,e,n=!1){const r=fn(t),i=Ou(r,e),o=await new Hpe(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}async function p4(t){const e=Dm(`${t.uid}:::`);return t._redirectEventId=e,await t.auth._setRedirectUser(t),await t.auth._persistUserIfCurrent(t),e}/**
4525 * @license
4526 * Copyright 2020 Google LLC
4527 *
4528 * Licensed under the Apache License, Version 2.0 (the "License");
4529 * you may not use this file except in compliance with the License.
4530 * You may obtain a copy of the License at
4531 *
4532 *   http://www.apache.org/licenses/LICENSE-2.0
4533 *
4534 * Unless required by applicable law or agreed to in writing, software
4535 * distributed under the License is distributed on an "AS IS" BASIS,
4536 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4537 * See the License for the specific language governing permissions and
4538 * limitations under the License.
4539 */const nme=600*1e3;class m4{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=
4539Date.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||!rme(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!g4(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(dr(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>=nme&&this.cachedEventUids.clear(),this.cachedEventUids.has(JD(e))}saveEventToCache(e){this.cachedEventUids.add(JD(e)),this.lastProcessedEventTime=Date.now()}}function JD(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function g4({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function rme(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return g4(t);default:return!1}}/**
4540 * @license
4541 * Copyright 2020 Google LLC
4542 *
4543 * Licensed under the Apache License, Version 2.0 (the "License");
4544 * you may not use this file except in compliance with the License.
4545 * You may obtain a copy of the License at
4546 *
4547 *   http://www.apache.org/licenses/LICENSE-2.0
4548 *
4549 * Unless required by applicable law or agreed to in writing, software
4550 * distributed under the License is distributed on an "AS IS" BASIS,
4551 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4552 * See the License for the specific language governing permissions and
4553 * limitations under the License.
4554 */async function y4(t,e={}){return pn(t,"GET","/v1/projects",e)}/**
4555 * @license
4556 * Copyright 2020 Google LLC
4557 *
4558 * Licensed under the Apache License, Version 2.0 (the "License");
4559 * you may not use this file except in compliance with the License.
4560 * You may obtain a copy of the License at
4561 *
4562 *   http://www.apache.org/licenses/LICENSE-2.0
4563 *
4564 * Unless required by applicable law or agreed to in writing, software
4565 * distributed under the License is distributed on an "AS IS" BASIS,
4566 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4567 * See the License for the specific language governing permissions and
4568 * limitations under the License.
4569 */const ime=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,sme=/^https?/;async function ome(t){if(t.config.emulator)return;const{authorizedDomains:e}=await y4(t);for(const n of e)try{if(ame(n))return}catch{}hr(t,"unauthorized-domain")}function ame(t){const e=$p(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!sme.test(n))return!1;if(ime.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/**
4570 * @license
4571 * Copyright 2020 Google LLC.
4572 *
4573 * Licensed under the Apache License, Version 2.0 (the "License");
4574 * you may not use this file except in compliance with the License.
4575 * You may obtain a copy of the License at
4576 *
4577 *   http://www.apache.org/licenses/LICENSE-2.0
4578 *
4579 * Unless required by applicable law or agreed to in writing, software
4580 * distributed under the License is distributed on an "AS IS" BASIS,
4581 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4582 * See the License for the specific language governing permissions and
4583 * limitations under the License.
4584 */const lme=new Am(3e4,6e4);function XD(){const t=kn().___jsl;if(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}}
4584function ume(t){return new Promise((e,n)=>{var r,i,s;function o(){XD(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{XD(),n(dr(t,"network-request-failed"))},timeout:lme.get()})}if(!((i=(r=kn().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=kn().gapi)===null||s===void 0)&&s.load)o();else{const l=qB("iframefcb");return kn()[l]=()=>{gapi.load?o():n(dr(t,"network-request-failed"))},Fx(`${ehe()}?onload=${l}`).catch(c=>n(c))}}).catch(e=>{throw Zy=null,e})}let Zy=null;function cme(t){return Zy=Zy||ume(t),Zy}/**
4585 * @license
4586 * Copyright 2020 Google LLC.
4587 *
4588 * Licensed under the Apache License, Version 2.0 (the "License");
4589 * you may not use this file except in compliance with the License.
4590 * You may obtain a copy of the License at
4591 *
4592 *   http://www.apache.org/licenses/LICENSE-2.0
4593 *
4594 * Unless required by applicable law or agreed to in writing, software
4595 * distributed under the License is distributed on an "AS IS" BASIS,
4596 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4597 * See the License for the specific language governing permissions and
4598 * limitations under the License.
4599 */const dme=new Am(5e3,15e3),fme="__/auth/iframe",hme="emulator/auth/iframe",pme={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},mme=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function gme(t){const e=t.config;ce(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?Lx(e,hme):`https://${t.config.authDomain}/${fme}`,r={apiKey:e.apiKey,appName:t.name,v:Mo},i=mme.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${Qd(r).slice(1)}`}async function yme(t){const e=await cme(t),n=kn().gapi;return ce(n,t,"internal-error"),e.open({where:document.body,url:gme(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pme,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const o=dr(t,"network-request-failed"),l=kn().setTimeout(()=>{s(o)},dme.get());function c(){kn().clearTimeout(l),i(r)}r.ping(c).then(c,()=>{s(o)})}))}/**
4600 * @license
4601 * Copyright 2020 Google LLC.
4602 *
4603 * Licensed under the Apache License, Version 2.0 (the "License");
4604 * you may not use this file except in compliance with the License.
4605 * You may obtain a copy of the License at
4606 *
4607 *   http://www.apache.org/licenses/LICENSE-2.0
4608 *
4609 * Unless required by applicable law or agreed to in writing, software
4610 * distributed under the License is distributed on an "AS IS" BASIS,
4611 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4612 * See the License for the specific language governing permissions and
4613 * limitations under the License.
4614 */const vme={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},_me=500,wme=600,Eme="_blank",Sme="http://localhost";class ZD{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function Tme(t,e,n,r=_me,i=wme){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const c=Object.assign(Object.assign({},vme),{width:r.toString(),height:i.toString(),top:s,left:o}),d=fr().toLowerCase();n&&(l=$B(d)?Eme:n),FB(d)&&(e=e||Sme,c.scrollbars="yes");const h=Object.entries(c).reduce((g,[v,E])=>`${g}${v}=${E},`,"");if(zfe(d)&&l!=="_self")return bme(e||"",l),new ZD(null);const m=window.open(e||"",l,h);ce(m,t,"popup-blocked");try{m.focus()}catch{}return new ZD(m)}function bme(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
4615 * @license
4616 * Copyright 2021 Google LLC
4617 *
4618 * Licensed under the Apache License, Version 2.0 (the "License");
4619 * you may not use this file except in compliance with the License.
4620 * You may obtain a copy of the License at
4621 *
4622 *   http://www.apache.org/licenses/LICENSE-2.0
4623 *
4624 * Unless required by applicable law or agreed to in writing, softw
4624are
4625 * distributed under the License is distributed on an "AS IS" BASIS,
4626 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4627 * See the License for the specific language governing permissions and
4628 * limitations under the License.
4629 */const Ime="__/auth/handler",Rme="emulator/auth/handler",xme=encodeURIComponent("fac");async function zb(t,e,n,r,i,s){ce(t.config.authDomain,t,"auth-domain-config-required"),ce(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Mo,eventId:i};if(e instanceof Uo){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",lfe(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[h,m]of Object.entries(s||{}))o[h]=m}if(e instanceof Zd){const h=e.getScopes().filter(m=>m!=="");h.length>0&&(o.scopes=h.join(","))}t.tenantId&&(o.tid=t.tenantId);const l=o;for(const h of Object.keys(l))l[h]===void 0&&delete l[h];const c=await t._getAppCheckToken(),d=c?`#${xme}=${encodeURIComponent(c)}`:"";return`${kme(t)}?${Qd(l).slice(1)}${d}`}function kme({config:t}){return t.emulator?Lx(t,Rme):`https://${t.authDomain}/${Ime}`}/**
4630 * @license
4631 * Copyright 2020 Google LLC
4632 *
4633 * Licensed under the Apache License, Version 2.0 (the "License");
4634 * you may not use this file except in compliance with the License.
4635 * You may obtain a copy of the License at
4636 *
4637 *   http://www.apache.org/licenses/LICENSE-2.0
4638 *
4639 * Unless required by applicable law or agreed to in writing, software
4640 * distributed under the License is distributed on an "AS IS" BASIS,
4641 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4642 * See the License for the specific language governing permissions and
4643 * limitations under the License.
4644 */const rT="webStorageSupport";class Cme{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=mu,this._completeRedirectFn=zw,this._overrideRedirectResult=Yx}async _openPopup(e,n,r,i){var s;ms((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=await zb(e,n,r,$p(),i);return Tme(e,o,Dm())}async _openRedirect(e,n,r,i){await this._originValidation(e);const s=await zb(e,n,r,$p(),i);return dpe(s),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(ms(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await yme(e),r=new m4(e);return n.register("authEvent",i=>(ce(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(rT,{type:rT},i=>{var s;const o=(s=i?.[0])===null||s===void 0?void 0:s[rT];o!==void 0&&n(!!o),hr(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=ome(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return zB()||Vx()||Jd()}}const Ame=Cme;class Pme{constructor(e){this.factorId=e}_process(e,n,r){switch(n.type){case"enroll":return this._finalizeEnroll(e,n.credential,r);case"signin":return this._finalizeSignIn(e,n.credential);default:return js("unexpected MultiFactorSessionType")}}}class Jx extends Pme{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new Jx(e)}_finalizeEnroll(e,n,r){return rpe(e,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,n){return Epe(e,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class v4{constructor(){}static assertion(e){return Jx._fromCredential(e)}}v4.FACTOR_ID="phone";var e2="@firebase/auth",t2="1.6.2";/**
4645 * @license
4646 * Copyright 2020 Google LLC
4647 *
4648 * Licensed under the Apache License, Version 2.0 (the "License");
4649 * you may not use this file except in compliance with the License.
4650 * You may obtain a copy of the License at
4651 *
4652 *   http://www.apache.org/licenses/LICENSE-2.0
4653 *
4654 * Unless required by applicable law or agreed to in writing, software
4655 * distributed under the License is distributed on an "AS IS" BASIS,
4656 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4657 * See the License for the specific language governing permissions and
4658 * limitations under the License.
4659 */class Ome{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?.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(){ce(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
4660 * @license
4661 * Copyright 2020 Google LLC
4662 *
4663 * Licensed under the Apache License, Version 2.0 (the "License");
4664 * you may not use this file except in compliance with the License.
4665 * You may obtain a copy of the License at
4666 *
4667 *   http://www.apache.org/licenses/LICENSE-2.0
4668 *
4669 * Unless required by applicable law or agreed to in writing, software
4670 * distributed under the License is distributed on an "AS IS" BASIS,
4671 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4672 * See the License for the specific language governing permissions and
4673 * limitations under the License.
4674 */function Nme(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 Dme(t){Kr(new En("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:l}=r.options;ce(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:o,authDomain:l,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:WB(t)},d=new Yfe(r,i,s,c);return ihe(d,n),d},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),Kr(new En("auth-internal",e=>{const n=fn(e.getProvider("auth").getImmediate());return(r=>new Ome(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Pn(e2,t2,Nme(t)),Pn(e2,t2,"esm2017")}/**
4675 * @license
4676 * Copyright 2021 Google LLC
4677 *
4678 * Licensed under the Apache License, Version 2.0 (the "License");
4679 * you may not use this file except in compliance with the License.
4680 * You may obtain a copy of the License at
4681 *
4682 *   http://www.apache.org/licenses/LICENSE-2.0
4683 *
4684 * Unless required by applicable law or agreed to in writing, software
4685 * distributed under the License is distributed on an "AS IS" BASIS,
4686 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4687 * See the License for the specific language governing permissions and
4688 * limitations under the License.
4689 */const Mme=300;efe("authIdTokenMaxAge");function Lme(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Jfe({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=dr("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",Lme().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="});Dme("Browser");/**
4690 * @license
4691 * Copyright 2021 Google LLC
4692 *
4693 * Licensed under the Apache License, Version 2.0 (the "License");
4694 * you may not use this file except in compliance with the License.
4695 * You may obtain a copy of the License at
4696 *
4697 *   http://www.apache.org/licenses/LICENSE-2.0
4698 *
4699 * Unless required by applicable law or agreed to in writing, software
4700 * distributed under the License is distributed on an "AS IS" BASIS,
4701 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4702 * See the License for the specific language governing permissions and
4703 * limitations under the License.
4704 */function yu(){return window}/**
4705 * @license
4706 * Copyright 2020 Google LLC
4707 *
4708 * Licensed under the Apache License, Version 2.0 (the "License");
4709 * you may not use this file except in compliance with the License.
4710 * You may obtain a copy of the License at
4711 *
4712 *   http://www.apache.org/licenses/LICENSE-2.0
4713 *
4714 * Unless required by applicable law or agreed to in writing, software
4715 * distributed under the License is distributed on an "AS IS" BASIS,
4716 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4717 * See the License for the specific language governing permissions and
4718 * limitations under the License.
4719 */const Vme=2e3;async function Fme(t,e,n){var r;const{BuildInfo:i}=yu();ms(e.sessionId,"AuthEvent did not contain a session ID");const s=await zme(e.sessionId),o={};return Jd()?o.ibi=i.packageName:Pm()?o.apn=i.packageName:hr(t,"operation-not-supported-in-this-environment"),i.displayName&&(o.appDisplayName=i.displayName),o.sessionId=s,zb(t,n,e.type,void 0,(r=e.eventId)!==null&&r!==void 0?r:void 0,o)}async function $me(t){const{BuildInfo:e}=yu(),n={};Jd()?n.iosBundleId=e.packageName:Pm()?n.androidPackageName=e.packageName:hr(t,"operation-not-supported-in-this-environment"),await y4(t,n)}function Ume(t){const{cordova:e}=yu();return new Promise(n=>{e.plugins.browsertab.isAvailable(r=>{let i=null;r?e.plugins.browsertab.openUrl(t):i=e.InAppBrowser.open(t,Bfe()?"_blank":"_system","location=yes"),n(i)})})}async function jme(t,e,n){const{cordova:r}=yu();let i=()=>{};try{await new Promise((s,o)=>{let l=null;function c(){var m;s();const g=(m=r.plugins.browsertab)===null||m===void 0?void 0:m.close;typeof g=="function"&&g(),typeof n?.close=="function"&&n.close()}function d(){l||(l=window.setTimeout(()=>{o(dr(t,"redirect-cancelled-by-user"))},Vme))}function h(){document?.visibilityState==="visible"&&d()}e.addPassiveListener(c),document.addEventListener("resume",d,!1),Pm()&&document.addEventListener("visibilitychange",h,!1),i=()=>{e.removePassiveListener(c),document.removeEventListener("resume",d,!1),document.removeEventListener("visibilitychange",h,!1),l&&window.clearTimeout(l)}})}finally{i()}}function Bme(t){var e,n,r,i,s,o,l,c,d,h;const m=yu();ce(typeof((e=m?.universalLinks)===null||e===void 0?void 0:e.subscribe)=="function",t,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),ce(typeof((n=m?.BuildInfo)===null||n===void 0?void 0:n.packageName)<"u",t,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),ce(typeof((s=(i=(r=m?.cordova)===null||r===void 0?void 0:r.plugins)===null||i===void 0?void 0:i.browsertab)===null||s===void 0?void 0:s.openUrl)=="function",t,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),ce(typeof((c=(l=(o=m?.cordova)===null||o===void 0?void 0:o.plugins)===null||l===void 0?void 0:l.browsertab)===null||c===void 0?void 0:c.isAvailable)=="function",t,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),ce(typeof((h=(d=m?.cordova)===null||d===void 0?void 0:d.InAppBrowser)===null||h===void 0?void 0:h.open)=="function",t,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}async function zme(t){const e=Wme(t),n=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")}function Wme(t){if(ms(/[0-9a-zA-Z]+/.test(t),"Can only convert alpha-numeric strings"),typeof TextEncoder<"u")return new TextEncoder().encode(t);const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}/**
4720 * @license
4721 * Copyright 2020 Google LLC
4722 *
4723 * Licensed under the Apache License, Version 2.0 (the "License");
4724 * you may not use this file except in compliance with the License.
4725 * You may obtain a copy of the License at
4726 *
4727 *   http://www.apache.org/licenses/LICENSE-2.0
4728 *
4729 * Unless required by applicable law or agreed to in writing, software
4730 * distributed under the License is distributed on an "AS IS" BASIS,
4731 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4732 * See the License for the specific language governing permissions and
4733 * limitations under the License.
4734 */const qme=20;class Hme extends m4{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(e=>{this.resolveInialized=e})}addPassiveListener(e){this.passiveListeners.add(e)}removePassiveListener(e){this.passiveListeners.delete(e)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(e){return this.resolveInialized(),this.passiveListeners.forEach(n=>n(e)),super.onEvent(e)}async initialized(){await this.initPromise}}function Gme(t,e,n=null){return{type:e,eventId:n,urlResponse:null,sessionId:Yme(),postBody:null,tenantId:t.tenantId,error:dr(t,"no-auth-event")}}function Kme(t,e){return Wb()._set(qb(t),e)}async function n2(t){const e=await Wb()._get(qb(t));return e&&await Wb()._remove(qb(t)),e}function Qme(t,e){var n,r;const i=Xme(e);if(i.includes("/__/auth/callback")){const s=ev(i),o=s.firebaseError?Jme(decodeURIComponent(s.firebaseError)):null,l=(r=(n=o?.code)===null||n===void 0?void 0:n.split("auth/"))===null||r===void 0?void 0:r[1],c=l?dr(l):null;return c?{type:t.type,eventId:t.eventId,tenantId:t.tenantId,error:c,urlResponse:null,sessionId:null,postBody:null}:{type:t.type,eventId:t.eventId,tenantId:t.tenantId,sessionId:t.sessionId,urlResponse:i,postBody:null}}return null}function Yme(){const t=[],e="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<qme;n++){const r=Math.floor(Math.random()*e.length);t.push(e.charAt(r))}return t.join("")}function Wb(){return Ei(qx)}function qb(t){return Xl("authEvent",t.config.apiKey,t.name)}function Jme(t){try{return JSON.parse(t)}catch{return null}}function Xme(t){const e=ev(t),n=e.link?decodeURIComponent(e.link):void 0,r=ev(n).link,i=e.deep_link_id?decodeURIComponent(e.deep_link_id):void 0;return ev(i).link||i||r||n||t}function ev(t){if(!t?.includes("?"))return{};const[e,...n]=t.split("?");return Lc(n.join("?"))}/**
4735 * @license
4736 * Copyright 2021 Google LLC
4737 *
4738 * Licensed under the Apache License, Version 2.0 (the "License");
4739 * you may not use this file except in compliance with the License.
4740 * You may obtain a copy of the License at
4741 *
4742 *   http://www.apache.org/licenses/LICENSE-2.0
4743 *
4744 * Unless required by applicable law or agreed to in writing, software
4745 * distributed under the License is distributed on an "AS IS" BASIS,
4746 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4747 * See the License for the specific language governing permissions and
4748 * limitations under the License.
4749 */const Zme=500;class ege{constructor(){this._redirectPersistence=mu,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=zw,this._overrideRedirectResult=Yx}async _initialize(e){const n=e._key();let r=this.eventManagers.get(n);return r||(r=new Hme(e),this.eventManagers.set(n,r),this.attachCallbackListeners(e,r)),r}_openPopup(e){hr(e,"operation-not-supported-in-this-environment")}async _openRedirect(e,n,r,i){Bme(e);const s=await this._initialize(e);await s.initialized(),s.resetRedirect(),Kpe(),await this._originValidation(e);const o=Gme(e,r,i);await Kme(e,o);const l=await Fme(e,o,n),c=await Ume(l);return jme(e,s,c)}_isIframeWebStorageSupported(e,n){throw new Error("Method not implemented.")}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=$me(e)),this.originValidationPromises[n]}attachCallbackListeners(e,n){const{universalLinks:r,handleOpenURL:i,BuildInfo:s}=yu(),o=setTimeout(async()=>{await n2(e),n.onEvent(r2())},Zme),l=async h=>{clearTimeout(o);const m=await n2(e);let g=null;m&&h?.url&&(g=Qme(m,h.url)),n.onEvent(g||r2())};typeof r<"u"&&typeof r.subscribe=="function"&&r.subscribe(null,l);const c=i,d=`${s.packageName.toLowerCase()}://`;yu().handleOpenURL=async h=>{if(h.toLowerCase().startsWith(d)&&l({url:h}),typeof c=="function")try{c(h)}catch(m){console.error(m)}}}}const tge=ege;function r2(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:dr("no-auth-event")}}/**
4750 * @license
4751 * Copyright 2017 Google LLC
4752 *
4753 * Licensed under the Apache License, Version 2.0 (the "License");
4754 * you may not use this file except in compliance with the License.
4755 * You may obtain a copy of the License at
4756 *
4757 *   http://www.apache.org/licenses/LICENSE-2.0
4758 *
4759 * Unless required by applicable law or agreed to in writing, software
4760 * distributed under the License is distributed on an "AS IS" BASIS,
4761 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4762 * See the License for the specific language governing permissions and
4763 * limitations under the License.
4764 */function nge(t,e){fn(t)._logFramework(e)}var i2={};/**
4765 * @license
4766 * Copyright 2017 Google LLC
4767 *
4768 * Licensed under the Apache License, Version 2.0 (the "License");
4769 * you may not use this file except in compliance with the License.
4770 * You may obtain a copy of the License at
4771 *
4772 *   http://www.apache.org/licenses/LICENSE-2.0
4773 *
4774 * Unless required by applicable law or agreed to in writing, software
4775 * distributed under the License is distributed on an "AS IS" BASIS,
4776 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4777 * See the License for the specific language governing permissions and
4778 * limitations under the License.
4779 */const rge=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},ige=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},sge={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,c=i+2<t.length,d=c?t[i+2]:0,h=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,v=d&63;c||(v=64,o||(g=64)),r.push(n[h],n[m],n[g],n[v])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(rge(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):ige(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||m==null)throw new oge;const g=s<<2|l>>4;if(r.push(g),d!==64){const v=l<<4&240|d>>2;if(r.push(v),m!==64){const E=d<<6&192|m;r.push(E)}}}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)}}};let oge=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}};const age=function(t){try{return sge.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
4780 * @license
4781 * Copyright 2022 Google LLC
4782 *
4783 * Licensed under the Apache License, Version 2.0 (the "License");
4784 * you may not use this file except in compliance with the License.
4785 * You may obtain a copy of the License at
4786 *
4787 *   http://www.apache.org/licenses/LICENSE-2.0
4788 *
4789 * Unless required by applicable law or agreed to in writing, software
4790 * distributed under the License is distributed on an "AS IS" BASIS,
4791 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4792 * See the License for the specific language governing permissions and
4793 * limitations under the License.
4794 */function lge(){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.")}/**
4795 * @license
4796 * Copyright 2022 Google LLC
4797 *
4798 * Licensed under the Apache License, Version 2.0 (the "License");
4799 * you may not use this file except in compliance with the License.
4800 * You may obtain a copy of the License at
4801 *
4802 *   http://www.apache.org/licenses/LICENSE-2.0
4803 *
4804 * Unless required by applicable law or agreed to in writing, software
4805 * distributed under the License is distributed on an "AS IS" BASIS,
4806 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4807 * See the License for the specific language governing permissions and
4808 * limitations under the License.
4809 */const uge=()=>lge().__FIREBASE_DEFAULTS__,cge=()=>{if(typeof process>"u"||typeof i2>"u")return;const t=i2.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},dge=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&age(t[1]);return e&&JSON.parse(e)},fge=()=>{try{return uge()||cge()||dge()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}};/**
4810 * @license
4811 * Copyright 2017 Google LLC
4812 *
4813 * Licensed under the Apache License, Version 2.0 (the "License");
4814 * you may not use this file except in compliance with the License.
4815 * You may obtain a copy of the License at
4816 *
4817 *   http://www.apache.org/licenses/LICENSE-2.0
4818 *
4819 * Unless required by applicable law or agreed to in writing, software
4820 * distributed under the License is distributed on an "AS IS" BASIS,
4821 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4822 * See the License for the specific language governing permissions and
4823 * limitations under the License.
4824 */function Ww(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function _4(){var t;const e=(t=fge())===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 hge(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function w4(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function pge(){const t=Ww();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function Hb(){try{return typeof indexedDB=="object"}catch{return!1}}/**
4825 * @license
4826 * Copyright 2017 Google LLC
4827 *
4828 * Licensed under the Apache License, Version 2.0 (the "License");
4829 * you may not use this file except in compliance with the License.
4830 * You may obtain a copy of the License at
4831 *
4832 *   http://www.apache.org/licenses/LICENSE-2.0
4833 *
4834 * Unless required by applicable law or agreed to in writing, software
4835 * distributed under the License is distributed on an "AS IS" BASIS,
4836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4837 * See the License for the specific language governing permissions and
4838 * limitations under the License.
4839 */const mge="FirebaseError";let Qc=class E4 extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=mge,Object.setPrototypeOf(this,E4.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,gge.prototype.create)}},gge=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?yge(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Qc(i,l,r)}};function yge(t,e){return t.replace(vge,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const vge=/\{\$([^}]+)}/g;var _ge="@firebase/auth-compat",wge="0.5.4";/**
4840 * @license
4841 * Copyright 2020 Google LLC
4842 *
4843 * Licensed under the Apache License, Version 2.0 (the "License");
4844 * you may not use this file except in compliance with the License.
4845 * You may obtain a copy of the License at
4846 *
4847 *   http://www.apache.org/licenses/LICENSE-2.0
4848 *
4849 * Unless required by applicable law or agreed to in writing, software
4850 * distributed under the License is distributed on an "AS IS" BASIS,
4851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4852 * See the License for the specific language governing permissions and
4853 * limitations under the License.
4854 */const Ege=1e3;function np(){var t;return((t=self?.location)===null||t===void 0?void 0:t.protocol)||null}function Sge(){return np()==="http:"||np()==="https:"}function S4(t=Ww()){return!!((np()==="file:"||np()==="ionic:"||np()==="capacitor:")&&t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Tge(){return w4()||_4()}function bge(){return pge()&&document?.documentMode===11}function Ige(t=Ww()){return/Edge\/\d+/.test(t)}function Rge(t=Ww()){return bge()||Ige(t)}function T4(){try{const t=self.localStorage,e=Dm();if(t)return t.setItem(e,"1"),t.removeItem(e),Rge()?Hb():!0}catch{return Xx()&&Hb()}return!1}function Xx(){return typeof global<"u"&&"WorkerGlobalScope"in global&&"importScripts"in global}function iT(){return(Sge()||hge()||S4())&&!Tge()&&T4()&&!Xx()}function b4(){return S4()&&typeof document<"u"}async function xge(){return b4()?new Promise(t=>{const e=setTimeout(()=>{t(!1)},Ege);document.addEventListener("deviceready",()=>{clearTimeout(e),t(!0)})}):!1}function kge(){return typeof window<"u"?window:null}/**
4855 * @license
4856 * Copyright 2020 Google LLC
4857 *
4858 * Licensed under the Apache License, Version 2.0 (the "License");
4859 * you may not use this file except in compliance with the License.
4860 * You may obtain a copy of the License at
4861 *
4862 *   http://www.apache.org/licenses/LICENSE-2.0
4863 *
4864 * Unless required by applicable law or agreed to in writing, software
4865 * distributed under the License is distributed on an "AS IS" BASIS,
4866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4867 * See the License for the specific language governing permissions and
4868 * limitations under the License.
4869 */const yi={LOCAL:"local",NONE:"none",SESSION:"session"},ch=ce,I4="persistence";function Cge(t,e){if(ch(Object.values(yi).includes(e),t,"invalid-persistence-type"),w4()){ch(e!==yi.SESSION,t,"unsupported-persistence-type");return}if(_4()){ch(e===yi.NONE,t,"unsupported-persistence-type");return}if(Xx()){ch(e===yi.NONE||e===yi.LOCAL&&Hb(),t,"unsupported-persistence-type");return}ch(e===yi.NONE||T4(),t,"unsupported-persistence-type")}async function Gb(t){await t._initializationPromise;const e=R4(),n=Xl(I4,t.config.apiKey,t.name);e&&e.setItem(n,t._getPersistence())}function Age(t,e){const n=R4();if(!n)return[];const r=Xl(I4,t,e);switch(n.getItem(r)){case yi.NONE:return[Td];case yi.LOCAL:return[Wp,mu];case yi.SESSION:return[mu];default:return[]}}function R4(){var t;try{return((t=kge())===null||t===void 0?void 0:t.sessionStorage)||null}catch{return null}}/**
4870 * @license
4871 * Copyright 2020 Google LLC
4872 *
4873 * Licensed under the Apache License, Version 2.0 (the "License");
4874 * you may not use this file except in compliance with the License.
4875 * You may obtain a copy of the License at
4876 *
4877 *   http://www.apache.org/licenses/LICENSE-2.0
4878 *
4879 * Unless required by applicable law or agreed to in writing, software
4880 * distributed under the License is distributed on an "AS IS" BASIS,
4881 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4882 * See the License for the specific language governing permissions and
4883 * limitations under the License.
4884 */const Pge=ce;class Ra{constructor(){this.browserResolver=Ei(Ame),this.cordovaResolver=Ei(tge),this.underlyingResolver=null,this._redirectPersistence=mu,this._completeRedirectFn=zw,this._overrideRedirectResult=Yx}async _initialize(e){return await this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(e)}async _openPopup(e,n,r,i){return await this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(e,n,r,i)}async _openRedirect(e,n,r,i){return await this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openRedirect(e,n,r,i)}_isIframeWebStorageSupported(e,n){this.assertedUnderlyingResolver._isIframeWebStorageSupported(e,n)}_originValidation(e){return this.assertedUnderlyingResolver._originValidation(e)}get _shouldInitProactively(){return b4()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return Pge(this.underlyingResolver,"internal-error"),this.underlyingResolver}async selectUnderlyingResolver(){if(this.underlyingResolver)return;const e=await xge();this.underlyingResolver=e?this.cordovaResolver:this.browserResolver}}/**
4885 * @license
4886 * Copyright 2020 Google LLC
4887 *
4888 * Licensed under the Apache License, Version 2.0 (the "License");
4889 * you may not use this file except in compliance with the License.
4890 * You may obtain a copy of the License at
4891 *
4892 *   http://www.apache.org/licenses/LICENSE-2.0
4893 *
4894 * Unless required by applicable law or agreed to in writing, software
4895 * distributed under the License is distributed on an "AS IS" BASIS,
4896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4897 * See the License for the specific language governing permissions and
4898 * limitations under the License.
4899 */function x4(t){return t.unwrap()}function Oge(t){return t.wrapped()}/**
4900 * @license
4901 * Copyright 2020 Google LLC
4902 *
4903 * Licensed under the Apache License, Version 2.0 (the "License");
4904 * you may not use this file except in compliance with the License.
4905 * You may obtain a copy of the License at
4906 *
4907 *   http://www.apache.org/licenses/LICENSE-2.0
4908 *
4909 * Unless required by applicable law or agreed to in writing, software
4910 * distributed under the License is distributed on an "AS IS" BASIS,
4911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4912 * See the License for the specific language governing permissions and
4913 * limitations under the License.
4914 */function Nge(t){return k4(t)}function Dge(t,e){var n;const r=(n=e.customData)===null||n===void 0?void 0:n._tokenResponse;if(e?.code==="auth/multi-factor-auth-required"){const i=e;i.resolver=new Mge(t,tpe(t,e))}else if(r){const i=k4(e),s=e;i&&(s.credential=i,s.tenantId=r.tenantId||void 0,s.email=r.email||void 0,s.phoneNumber=r.phoneNumber||void 0)}}function k4(t){const{_tokenResponse:e}=t instanceof Qc?t.customData:t;if(!e)return null;if(!(t instanceof Qc)&&"temporaryProof"in e&&"phoneNumber"in e)return gu.credentialFromResult(t);const n=e.providerId;if(!n||n===uh.PASSWORD)return null;let r;switch(n){case uh.GOOGLE:r=Ns;break;case uh.FACEBOOK:r=Os;break;case uh.GITHUB:r=Ds;break;case uh.TWITTER:r=Ms;break;default:const{oauthIdToken:i,oauthAccessToken:s,oauthTokenSecret:o,pendingToken:l,nonce:c}=e;return!s&&!o&&!i&&!l?null:l?n.startsWith("saml.")?bd._create(n,l):Xs._fromParams({providerId:n,signInMethod:n,pendingToken:l,idToken:i,accessToken:s}):new Gc(n).credential({idToken:i,accessToken:s,rawNonce:c})}return t instanceof Qc?r.credentialFromError(t):r.credentialFromResult(t)}function ri(t,e){return e.catch(n=>{throw n instanceof Qc&&Dge(t,n),n}).then(n=>{const r=n.operationType,i=n.user;return{operationType:r,credential:Nge(n),additionalUserInfo:epe(n),user:Eo.getOrCreate(i)}})}async function Kb(t,e){const n=await e;return{verificationId:n.verificationId,confirm:r=>ri(t,n.confirm(r))}}class Mge{constructor(e,n){this.resolver=n,this.auth=Oge(e)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(e){return ri(x4(this.auth),this.resolver.resolveSignIn(e))}}/**
4915 * @license
4916 * Copyright 2020 Google LLC
4917 *
4918 * Licensed under the Apache License, Version 2.0 (the "License");
4919 * you may not use this file except in compliance with the License.
4920 * You may obtain a copy of the License at
4921 *
4922 *   http://www.apache.org/licenses/LICENSE-2.0
4923 *
4924 * Unless required by applicable law or agreed to in writing, software
4925 * distributed under the License is distributed on an "AS IS" BASIS,
4926 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4927 * See the License for the specific language governing permissions and
4928 * limitations under the License.
4929 */class Eo{constructor(e){this._delegate=e,this.multiFactor=spe(e)}static getOrCreate(e){return Eo.USER_MAP.has(e)||Eo.USER_MAP.set(e,new Eo(e)),Eo.USER_MAP.get(e)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(e){return this._delegate.getIdTokenResult(e)}getIdToken(e){return this._delegate.getIdToken(e)}linkAndRetrieveDataWithCredential(e){return this.linkWithCredential(e)}async linkWithCredential(e){return ri(this.auth,ZB(this._delegate,e))}async linkWithPhoneNumber(e,n){return Kb(this.auth,Mpe(this._delegate,e,n))}async linkWithPopup(e){return ri(this.auth,Wpe(this._delegate,e,Ra))}async linkWithRedirect(e){return await Gb(fn(this.auth)),Zpe(this._delegate,e,Ra)}reauthenticateAndRetrieveDataWithCredential(e){return this.reauthenticateWithCredential(e)}async reauthenticateWithCredential(e){return ri(this.auth,e4(this._delegate,e))}reauthenticateWithPhoneNumber(e,n){return Kb(this.auth,Lpe(this._delegate,e,n))}reauthenticateWithPopup(e){return ri(this.auth,zpe(this._delegate,e,Ra))}async reauthenticateWithRedirect(e){return await Gb(fn(this.auth)),Jpe(this._delegate,e,Ra)}sendEmailVerification(e){return zhe(this._delegate,e)}async unlink(e){return await Che(this._delegate,e),this}updateEmail(e){return Ghe(this._delegate,e)}updatePassword(e){return Khe(this._delegate,e)}updatePhoneNumber(e){return Vpe(this._delegate,e)}updateProfile(e){return Hhe(this._delegate,e)}verifyBeforeUpdateEmail(e,n){return Whe(this._delegate,e,n)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}Eo.USER_MAP=new WeakMap;/**
4930 * @license
4931 * Copyright 2020 Google LLC
4932 *
4933 * Licensed under the Apache License, Version 2.0 (the "License");
4934 * you may not use this file except in compliance with the License.
4935 * You may obtain a copy of the License at
4936 *
4937 *   http://www.apache.org/licenses/LICENSE-2.0
4938 *
4939 * Unless required by applicable law or agreed to in writing, software
4940 * distributed under the License is distributed on an "AS IS" BASIS,
4941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4942 * See the License for the specific language governing permissions and
4943 * limitations under the License.
4944 */const dh=ce;class Qb{constructor(e,n){if(this.app=e,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=e.options;dh(r,"invalid-api-key",{appName:e.name}),dh(r,"invalid-api-key",{appName:e.name});const i=typeof window<"u"?Ra:void 0;this._delegate=n.initialize({options:{persistence:Lge(r,e.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(vfe),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Eo.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(e){this._delegate.languageCode=e}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(e){this._delegate.tenantId=e}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(e,n){she(this._delegate,e,n)}applyActionCode(e){return Dhe(this._delegate,e)}checkActionCode(e){return t4(this._delegate,e)}confirmPasswordReset(e,n){return Nhe(this._delegate,e,n)}async createUserWithEmailAndPassword(e,n){return ri(this._delegate,Lhe(this._delegate,e,n))}fetchProvidersForEmail(e){return this.fetchSignInMethodsForEmail(e)}fetchSignInMethodsForEmail(e){return Bhe(this._delegate,e)}isSignInWithEmailLink(e){return $he(this._delegate,e)}async getRedirectResult(){dh(iT(),this._delegate,"operation-not-supported-in-this-environment");const e=await tme(this._delegate,Ra);return e?ri(this._delegate,Promise.resolve(e)):{credential:null,user:null}}addFrameworkForLogging(e){nge(this._delegate,e)}onAuthStateChanged(e,n,r){const{next:i,error:s,complete:o}=s2(e,n,r);return this._delegate.onAuthStateChanged(i,s,o)}onIdTokenChanged(e,n,r){const{next:i,error:s,complete:o}=s2(e,n,r);return this._delegate.onIdTokenChanged(i,s,o)}sendSignInLinkToEmail(e,n){return Fhe(this._delegate,e,n)}sendPasswordResetEmail(e,n){return Ohe(this._delegate,e,n||void 0)}async setPersistence(e){Cge(this._delegate,e);let n;switch(e){case yi.SESSION:n=mu;break;case yi.LOCAL:n=await Ei(Wp)._isAvailable()?Wp:qx;break;case yi.NONE:n=Td;break;default:return hr("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(n)}signInAndRetrieveDataWithCredential(e){return this.signInWithCredential(e)}signInAnonymously(){return ri(this._delegate,khe(this._delegate))}signInWithCredential(e){return ri(this._delegate,Fw(this._delegate,e))}signInWithCustomToken(e){return ri(this._delegate,Phe(this._delegate,e))}signInWithEmailAndPassword(e,n){return ri(this._delegate,Vhe(this._delegate,e,n))}signInWithEmailLink(e,n){return ri(this._delegate,Uhe(this._delegate,e,n))}signInWithPhoneNumber(e,n){return Kb(this._delegate,Dpe(this._delegate,e,n))}async signInWithPopup(e){return dh(iT(),this._delegate,"operation-not-supported-in-this-environment"),ri(this._delegate,Bpe(this._delegate,e,Ra))}async signInWithRedirect(e){return dh(iT(),this._delegate,"operation-not-supported-in-this-environment"),await Gb(this._delegate),Qpe(this._delegate,e,Ra)}updateCurrentUser(e){return this._delegate.updateCurrentUser(e)}verifyPasswordResetCode(e){return Mhe(this._delegate,e)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Qb.Persistence=yi;function s2(t,e,n){let r=t;typeof t!="function"&&({next:r,error:e,complete:n}=t);const i=r;return{next:o=>i(o&&Eo.getOrCreate(o)),error:e,complete:n}}function Lge(t,e){const n=Age(t,e);if(typeof self<"u"&&!n.includes(Wp)&&n.push(Wp),typeof window<"u")for(const r of[qx,mu])n.includes(r)||n.push(r);return n.includes(Td)||n.push(Td),n}/**
4945 * @license
4946 * Copyright 2020 Google LLC
4947 *
4948 * Licensed under the Apache License, Version 2.0 (the "License");
4949 * you may not use this file except in compliance with the License.
4950 * You may obtain a copy of the License at
4951 *
4952 *   http://www.apache.org/licenses/LICENSE-2.0
4953 *
4954 * Unless required by applicable law or agreed to in writing, software
4955 * distributed under the License is distributed on an "AS IS" BASIS,
4956 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4957 * See the License for the specific language governing permissions and
4958 * limitations under the License.
4959 */class Zx{constructor(){this.providerId="phone",this._delegate=new gu(x4(Kt.auth()))}static credential(e,n){return gu.credential(e,n)}verifyPhoneNumber(e,n){return this._delegate.verifyPhoneNumber(e,n)}unwrap(){return this._delegate}}Zx.PHONE_SIGN_IN_METHOD=gu.PHONE_SIGN_IN_METHOD;Zx.PROVIDER_ID=gu.PROVIDER_ID;/**
4960 * @license
4961 * Copyright 2020 Google LLC
4962 *
4963 * Licensed under the Apache License, Version 2.0 (the "License");
4964 * you may not use this file except in compliance with the License.
4965 * You may obtain a copy of the License at
4966 *
4967 *   http://www.apache.org/licenses/LICENSE-2.0
4968 *
4969 * Unless required by applicable law or agreed to in writing, software
4970 * distributed under the License is distributed on an "AS IS" BASIS,
4971 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4972 * See the License for the specific language governing permissions and
4973 * limitations under the License.
4974 */const Vge=ce;class Fge{constructor(e,n,r=Kt.app()){var i;Vge((i=r.options)===null||i===void 0?void 0:i.apiKey,"invalid-api-key",{appName:r.name}),this._delegate=new Ope(r.auth(),e,n),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}}/**
4975 * @license
4976 * Copyright 2020 Google LLC
4977 *
4978 * Licensed under the Apache License, Version 2.0 (the "License");
4979 * you may not use this file except in compliance with the License.
4980 * You may obtain a copy of the License at
4981 *
4982 *   http://www.apache.org/licenses/LICENSE-2.0
4983 *
4984 * Unless required by applicable law or agreed to in writing, software
4985 * distributed under the License is distributed on an "AS IS" BASIS,
4986 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4987 * See the License for the specific language governing permissions and
4988 * limitations under the License.
4989 */const $ge="auth-compat";function Uge(t){t.INTERNAL.registerComponent(new En($ge,e=>{const n=e.getProvider("app-compat").getImmediate(),r=e.getProvider("auth");return new Qb(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Ec.EMAIL_SIGNIN,PASSWORD_RESET:Ec.PASSWORD_RESET,RECOVER_EMAIL:Ec.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Ec.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Ec.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Ec.VERIFY_EMAIL}},EmailAuthProvider:sl,FacebookAuthProvider:Os,GithubAuthProvider:Ds,GoogleAuthProvider:Ns,OAuthProvider:Gc,SAMLAuthProvider:qv,PhoneAuthProvider:Zx,PhoneMultiFactorGenerator:v4,RecaptchaVerifier:Fge,TwitterAuthProvider:Ms,Auth:Qb,AuthCredential:Xd,Error:Qc}).setInstantiationMode("LAZY").setMultipleInstances(!1)),t.registerVersion(_ge,wge)}Uge(Kt);function jge(){try{return typeof indexedDB=="object"}catch{return!1}}function Bge(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}function zge(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
4990 * @license
4991 * Copyright 2017 Google LLC
4992 *
4993 * Licensed under the Apache License, Version 2.0 (the "License");
4994 * you may not use this file except in compliance with the License.
4995 * You may obtain a copy of the License at
4996 *
4997 *   http://www.apache.org/licenses/LICENSE-2.0
4998 *
4999 * Unless required by applicable law or agreed to in writing, software
5000 * distributed under the License is distributed on an "AS IS" BASIS,
5001 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5002 * See the License for the specific language governing permissions and
5003 * limitations under the License.
5004 */const Wge="FirebaseError";
5004let qge=class C4 extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Wge,Object.setPrototypeOf(this,C4.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,A4.prototype.create)}},A4=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Hge(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new qge(i,l,r)}};function Hge(t,e){return t.replace(Gge,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const Gge=/\{\$([^}]+)}/g;/**
5005 * @license
5006 * Copyright 2021 Google LLC
5007 *
5008 * Licensed under the Apache License, Version 2.0 (the "License");
5009 * you may not use this file except in compliance with the License.
5010 * You may obtain a copy of the License at
5011 *
5012 *   http://www.apache.org/licenses/LICENSE-2.0
5013 *
5014 * Unless required by applicable law or agreed to in writing, software
5015 * distributed under the License is distributed on an "AS IS" BASIS,
5016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5017 * See the License for the specific language governing permissions and
5018 * limitations under the License.
5019 */function Kge(t){return t&&t._delegate?t._delegate:t}/**
5020 * @license
5021 * Copyright 2017 Google LLC
5022 *
5023 * Licensed under the Apache License, Version 2.0 (the "License");
5024 * you may not use this file except in compliance with the License.
5025 * You may obtain a copy of the License at
5026 *
5027 *   http://www.apache.org/licenses/LICENSE-2.0
5028 *
5029 * Unless required by applicable law or agreed to in writing, software
5030 * distributed under the License is distributed on an "AS IS" BASIS,
5031 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5032 * See the License for the specific language governing permissions and
5033 * limitations under the License.
5034 */var Pt;(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"})(Pt||(Pt={}));const Qge={debug:Pt.DEBUG,verbose:Pt.VERBOSE,info:Pt.INFO,warn:Pt.WARN,error:Pt.ERROR,silent:Pt.SILENT},Yge=Pt.INFO,Jge={[Pt.DEBUG]:"log",[Pt.VERBOSE]:"log",[Pt.INFO]:"info",[Pt.WARN]:"warn",[Pt.ERROR]:"error"},Xge=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=Jge[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let Zge=class{constructor(e){this.name=e,this._logLevel=Yge,this._logHandler=Xge,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Pt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?Qge[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,Pt.DEBUG,...e),this._logHandler(this,Pt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Pt.VERBOSE,...e),this._logHandler(this,Pt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Pt.INFO,...e),this._logHandler(this,Pt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Pt.WARN,...e),this._logHandler(this,Pt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Pt.ERROR,...e),this._logHandler(this,Pt.ERROR,...e)}};/**
5035 * @license
5036 * Copyright 2017 Google LLC
5037 *
5038 * Licensed under the Apache License, Version 2.0 (the "License");
5039 * you may not use this file except in compliance with the License.
5040 * You may obtain a copy of the License at
5041 *
5042 *   http://www.apache.org/licenses/LICENSE-2.0
5043 *
5044 * Unless required by applicable law or agreed to in writing, software
5045 * distributed under the License is distributed on an "AS IS" BASIS,
5046 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5047 * See the License for the specific language governing permissions and
5048 * limitations under the License.
5049 */const eye="FirebaseError";
5049let P4=class O4 extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=eye,Object.setPrototypeOf(this,O4.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,N4.prototype.create)}},N4=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?tye(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new P4(i,l,r)}};function tye(t,e){return t.replace(nye,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const nye=/\{\$([^}]+)}/g,D4="@firebase/installations",ek="0.6.5";/**
5050 * @license
5051 * Copyright 2019 Google LLC
5052 *
5053 * Licensed under the Apache License, Version 2.0 (the "License");
5054 * you may not use this file except in compliance with the License.
5055 * You may obtain a copy of the License at
5056 *
5057 *   http://www.apache.org/licenses/LICENSE-2.0
5058 *
5059 * Unless required by applicable law or agreed to in writing, software
5060 * distributed under the License is distributed on an "AS IS" BASIS,
5061 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5062 * See the License for the specific language governing permissions and
5063 * limitations under the License.
5064 */const M4=1e4,L4=`w:${ek}`,V4="FIS_v2",rye="https://firebaseinstallations.googleapis.com/v1",iye=3600*1e3,sye="installations",oye="Installations";/**
5065 * @license
5066 * Copyright 2019 Google LLC
5067 *
5068 * Licensed under the Apache License, Version 2.0 (the "License");
5069 * you may not use this file except in compliance with the License.
5070 * You may obtain a copy of the License at
5071 *
5072 *   http://www.apache.org/licenses/LICENSE-2.0
5073 *
5074 * Unless required by applicable law or agreed to in writing, software
5075 * distributed under the License is distributed on an "AS IS" BASIS,
5076 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5077 * See the License for the specific language governing permissions and
5078 * limitations under the License.
5079 */const aye={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},vu=new N4(sye,oye,aye);function F4(t){return t instanceof P4&&t.code.includes("request-failed")}/**
5080 * @license
5081 * Copyright 2019 Google LLC
5082 *
5083 * Licensed under the Apache License, Version 2.0 (the "License");
5084 * you may not use this file except in compliance with the License.
5085 * You may obtain a copy of the License at
5086 *
5087 *   http://www.apache.org/licenses/LICENSE-2.0
5088 *
5089 * Unless required by applicable law or agreed to in writing, software
5090 * distributed under the License is distributed on an "AS IS" BASIS,
5091 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5092 * See the License for the specific language governing permissions and
5093 * limitations under the License.
5094 */function $4({projectId:t}){return`${rye}/projects/${t}/installations`}function U4(t){return{token:t.token,requestStatus:2,expiresIn:uye(t.expires
5094In),creationTime:Date.now()}}async function j4(t,e){const r=(await e.json()).error;return vu.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function B4({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function lye(t,{refreshToken:e}){const n=B4(t);return n.append("Authorization",cye(e)),n}async function z4(t){const e=await t();return e.status>=500&&e.status<600?t():e}function uye(t){return Number(t.replace("s","000"))}function cye(t){return`${V4} ${t}`}/**
5095 * @license
5096 * Copyright 2019 Google LLC
5097 *
5098 * Licensed under the Apache License, Version 2.0 (the "License");
5099 * you may not use this file except in compliance with the License.
5100 * You may obtain a copy of the License at
5101 *
5102 *   http://www.apache.org/licenses/LICENSE-2.0
5103 *
5104 * Unless required by applicable law or agreed to in writing, software
5105 * distributed under the License is distributed on an "AS IS" BASIS,
5106 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5107 * See the License for the specific language governing permissions and
5108 * limitations under the License.
5109 */async function dye({appConfig:t,heartbeatServiceProvider:e},{fid:n}){const r=$4(t),i=B4(t),s=e.getImmediate({optional:!0});if(s){const d=await s.getHeartbeatsHeader();d&&i.append("x-firebase-client",d)}const o={fid:n,authVersion:V4,appId:t.appId,sdkVersion:L4},l={method:"POST",headers:i,body:JSON.stringify(o)},c=await z4(()=>fetch(r,l));if(c.ok){const d=await c.json();return{fid:d.fid||n,registrationStatus:2,refreshToken:d.refreshToken,authToken:U4(d.authToken)}}else throw await j4("Create Installation",c)}/**
5110 * @license
5111 * Copyright 2019 Google LLC
5112 *
5113 * Licensed under the Apache License, Version 2.0 (the "License");
5114 * you may not use this file except in compliance with the License.
5115 * You may obtain a copy of the License at
5116 *
5117 *   http://www.apache.org/licenses/LICENSE-2.0
5118 *
5119 * Unless required by applicable law or agreed to in writing, software
5120 * distributed under the License is distributed on an "AS IS" BASIS,
5121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5122 * See the License for the specific language governing permissions and
5123 * limitations under the License.
5124 */function W4(t){return new Promise(e=>{setTimeout(e,t)})}/**
5125 * @license
5126 * Copyright 2019 Google LLC
5127 *
5128 * Licensed under the Apache License, Version 2.0 (the "License");
5129 * you may not use this file except in compliance with the License.
5130 * You may obtain a copy of the License at
5131 *
5132 *   http://www.apache.org/licenses/LICENSE-2.0
5133 *
5134 * Unless required by applicable law or agreed to in writing, software
5135 * distributed under the License is distributed on an "AS IS" BASIS,
5136 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5137 * See the License for the specific language governing permissions and
5138 * limitations under the License.
5139 */function fye(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}/**
5140 * @license
5141 * Copyright 2019 Google LLC
5142 *
5143 * Licensed under the Apache License, Version 2.0 (the "License");
5144 * you may not use this file except in compliance with the License.
5145 * You may obtain a copy of the License at
5146 *
5147 *   http://www.apache.org/licenses/LICENSE-2.0
5148 *
5149 * Unless required by applicable law or agreed to in writing, software
5150 * distributed under the License is distributed on an "AS IS" BASIS,
5151 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5152 * See the License for the specific language governing permissions and
5153 * limitations under the License.
5154 */const hye=/^[cdef][\w-]{21}$/,Yb="";function pye(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const n=mye(t);return hye.test(n)?n:Yb}catch{return Yb}}function mye(t){return fye(t).substr(0,22)}/**
5155 * @license
5156 * Copyright 2019 Google LLC
5157 *
5158 * Licensed under the Apache License, Version 2.0 (the "License");
5159 * you may not use this file except in compliance with the License.
5160 * You may obtain a copy of the License at
5161 *
5162 *   http://www.apache.org/licenses/LICENSE-2.0
5163 *
5164 * Unless required by applicable law or agreed to in writing, softw
5164are
5165 * distributed under the License is distributed on an "AS IS" BASIS,
5166 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5167 * See the License for the specific language governing permissions and
5168 * limitations under the License.
5169 */function qw(t){return`${t.appName}!${t.appId}`}/**
5170 * @license
5171 * Copyright 2019 Google LLC
5172 *
5173 * Licensed under the Apache License, Version 2.0 (the "License");
5174 * you may not use this file except in compliance with the License.
5175 * You may obtain a copy of the License at
5176 *
5177 *   http://www.apache.org/licenses/LICENSE-2.0
5178 *
5179 * Unless required by applicable law or agreed to in writing, software
5180 * distributed under the License is distributed on an "AS IS" BASIS,
5181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5182 * See the License for the specific language governing permissions and
5183 * limitations under the License.
5184 */const q4=new Map;function H4(t,e){const n=qw(t);G4(n,e),gye(n,e)}function G4(t,e){const n=q4.get(t);if(n)for(const r of n)r(e)}function gye(t,e){const n=yye();n&&n.postMessage({key:t,fid:e}),vye()}let Hl=null;function yye(){return!Hl&&"BroadcastChannel"in self&&(Hl=new BroadcastChannel("[Firebase] FID Change"),Hl.onmessage=t=>{G4(t.data.key,t.data.fid)}),Hl}function vye(){q4.size===0&&Hl&&(Hl.close(),Hl=null)}/**
5185 * @license
5186 * Copyright 2019 Google LLC
5187 *
5188 * Licensed under the Apache License, Version 2.0 (the "License");
5189 * you may not use this file except in compliance with the License.
5190 * You may obtain a copy of the License at
5191 *
5192 *   http://www.apache.org/licenses/LICENSE-2.0
5193 *
5194 * Unless required by applicable law or agreed to in writing, software
5195 * distributed under the License is distributed on an "AS IS" BASIS,
5196 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5197 * See the License for the specific language governing permissions and
5198 * limitations under the License.
5199 */const _ye="firebase-installations-database",wye=1,_u="firebase-installations-store";let sT=null;function tk(){return sT||(sT=GF(_ye,wye,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(_u)}}})),sT}async function Qv(t,e){const n=qw(t),i=(await tk()).transaction(_u,"readwrite"),s=i.objectStore(_u),o=await s.get(n);return await s.put(e,n),await i.done,(!o||o.fid!==e.fid)&&H4(t,e.fid),e}async function K4(t){const e=qw(t),r=(await tk()).transaction(_u,"readwrite");await r.objectStore(_u).delete(e),await r.done}async function Hw(t,e){const n=qw(t),i=(await tk()).transaction(_u,"readwrite"),s=i.objectStore(_u),o=await s.get(n),l=e(o);return l===void 0?await s.delete(n):await s.put(l,n),await i.done,l&&(!o||o.fid!==l.fid)&&H4(t,l.fid),l}/**
5200 * @license
5201 * Copyright 2019 Google LLC
5202 *
5203 * Licensed under the Apache License, Version 2.0 (the "License");
5204 * you may not use this file except in compliance with the License.
5205 * You may obtain a copy of the License at
5206 *
5207 *   http://www.apache.org/licenses/LICENSE-2.0
5208 *
5209 * Unless required by applicable law or agreed to in writing, software
5210 * distributed under the License is distributed on an "AS IS" BASIS,
5211 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5212 * See the License for the specific language governing permissions and
5213 * limitations under the License.
5214 */async function nk(t){let e;const n=await Hw(t.appConfig,r=>{const i=Eye(r),s=Sye(t,i);return e=s.registrationPromise,s.installationEntry});return n.fid===Yb?{installationEntry:await e}:{installationEntry:n,registrationPromise:e}}function Eye(t){const e=t||{fid:pye(),registrationStatus:0};return Q4(e)}function Sye(t,e){if(e.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(vu.create("app-offline"));return{installationEntry:e,registrationPromise:i}}const n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},r=Tye(t,n);return{installationEntry:n,registrationPromise:r}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:bye(t)}:{installationEntry:e}}async function Tye(t,e){try{const n=await dye(t,e);return Qv(t.appConfig,n)}catch(n){throw F4(n)&&n.customData.serverCode===409?await K4(t.appConfig):await Qv(t.appConfig,{fid:e.fid,registrationStatus:0}),n}}async function bye(t){let e=await o2(t.appConfig);for(;e.registrationStatus===1;)await W4(100),e=await o2(t.appConfig);if(e.registrationStatus===0){const{installationEntry:n,registrationPromise:r}=await nk(t);return r||n}return e}function o2(t){return Hw(t,e=>{if(!e)throw vu.create("installation-not-found");return Q4(e)})}function Q4(t){return Iye(t)?{fid:t.fid,registrationStatus:0}:t}function Iye(t){return t.registrationStatus===1&&t.registrationTime+M4<D
5214ate.now()}/**
5215 * @license
5216 * Copyright 2019 Google LLC
5217 *
5218 * Licensed under the Apache License, Version 2.0 (the "License");
5219 * you may not use this file except in compliance with the License.
5220 * You may obtain a copy of the License at
5221 *
5222 *   http://www.apache.org/licenses/LICENSE-2.0
5223 *
5224 * Unless required by applicable law or agreed to in writing, software
5225 * distributed under the License is distributed on an "AS IS" BASIS,
5226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5227 * See the License for the specific language governing permissions and
5228 * limitations under the License.
5229 */async function Rye({appConfig:t,heartbeatServiceProvider:e},n){const r=xye(t,n),i=lye(t,n),s=e.getImmediate({optional:!0});if(s){const d=await s.getHeartbeatsHeader();d&&i.append("x-firebase-client",d)}const o={installation:{sdkVersion:L4,appId:t.appId}},l={method:"POST",headers:i,body:JSON.stringify(o)},c=await z4(()=>fetch(r,l));if(c.ok){const d=await c.json();return U4(d)}else throw await j4("Generate Auth Token",c)}function xye(t,{fid:e}){return`${$4(t)}/${e}/authTokens:generate`}/**
5230 * @license
5231 * Copyright 2019 Google LLC
5232 *
5233 * Licensed under the Apache License, Version 2.0 (the "License");
5234 * you may not use this file except in compliance with the License.
5235 * You may obtain a copy of the License at
5236 *
5237 *   http://www.apache.org/licenses/LICENSE-2.0
5238 *
5239 * Unless required by applicable law or agreed to in writing, software
5240 * distributed under the License is distributed on an "AS IS" BASIS,
5241 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5242 * See the License for the specific language governing permissions and
5243 * limitations under the License.
5244 */async function rk(t,e=!1){let n;const r=await Hw(t.appConfig,s=>{if(!Y4(s))throw vu.create("not-registered");const o=s.authToken;if(!e&&Aye(o))return s;if(o.requestStatus===1)return n=kye(t,e),s;{if(!navigator.onLine)throw vu.create("app-offline");const l=Oye(s);return n=Cye(t,l),l}});return n?await n:r.authToken}async function kye(t,e){let n=await a2(t.appConfig);for(;n.authToken.requestStatus===1;)await W4(100),n=await a2(t.appConfig);const r=n.authToken;return r.requestStatus===0?rk(t,e):r}function a2(t){return Hw(t,e=>{if(!Y4(e))throw vu.create("not-registered");const n=e.authToken;return Nye(n)?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function Cye(t,e){try{const n=await Rye(t,e),r=Object.assign(Object.assign({},e),{authToken:n});return await Qv(t.appConfig,r),n}catch(n){if(F4(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await K4(t.appConfig);else{const r=Object.assign(Object.assign({},e),{authToken:{requestStatus:0}});await Qv(t.appConfig,r)}throw n}}function Y4(t){return t!==void 0&&t.registrationStatus===2}function Aye(t){return t.requestStatus===2&&!Pye(t)}function Pye(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+iye}function Oye(t){const e={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},t),{authToken:e})}function Nye(t){return t.requestStatus===1&&t.requestTime+M4<Date.now()}/**
5245 * @license
5246 * Copyright 2019 Google LLC
5247 *
5248 * Licensed under the Apache License, Version 2.0 (the "License");
5249 * you may not use this file except in compliance with the License.
5250 * You may obtain a copy of the License at
5251 *
5252 *   http://www.apache.org/licenses/LICENSE-2.0
5253 *
5254 * Unless required by applicable law or agreed to in writing, software
5255 * distributed under the License is distributed on an "AS IS" BASIS,
5256 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5257 * See the License for the specific language governing permissions and
5258 * limitations under the License.
5259 */async function Dye(t){const e=t,{installationEntry:n,registrationPromise:r}=await nk(e);return r?r.catch(console.error):rk(e).catch(console.error),n.fid}/**
5260 * @license
5261 * Copyright 2019 Google LLC
5262 *
5263 * Licensed under the Apache License, Version 2.0 (the "License");
5264 * you may not use this file except in compliance with the License.
5265 * You may obtain a copy of the License at
5266 *
5267 *   http://www.apache.org/licenses/LICENSE-2.0
5268 *
5269 * Unless required by applicable law or agreed to in writing, softw
5269are
5270 * distributed under the License is distributed on an "AS IS" BASIS,
5271 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5272 * See the License for the specific language governing permissions and
5273 * limitations under the License.
5274 */async function Mye(t,e=!1){const n=t;return await Lye(n),(await rk(n,e)).token}async function Lye(t){const{registrationPromise:e}=await nk(t);e&&await e}/**
5275 * @license
5276 * Copyright 2019 Google LLC
5277 *
5278 * Licensed under the Apache License, Version 2.0 (the "License");
5279 * you may not use this file except in compliance with the License.
5280 * You may obtain a copy of the License at
5281 *
5282 *   http://www.apache.org/licenses/LICENSE-2.0
5283 *
5284 * Unless required by applicable law or agreed to in writing, software
5285 * distributed under the License is distributed on an "AS IS" BASIS,
5286 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5287 * See the License for the specific language governing permissions and
5288 * limitations under the License.
5289 */function Vye(t){if(!t||!t.options)throw oT("App Configuration");if(!t.name)throw oT("App Name");const e=["projectId","apiKey","appId"];for(const n of e)if(!t.options[n])throw oT(n);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function oT(t){return vu.create("missing-app-config-values",{valueName:t})}/**
5290 * @license
5291 * Copyright 2020 Google LLC
5292 *
5293 * Licensed under the Apache License, Version 2.0 (the "License");
5294 * you may not use this file except in compliance with the License.
5295 * You may obtain a copy of the License at
5296 *
5297 *   http://www.apache.org/licenses/LICENSE-2.0
5298 *
5299 * Unless required by applicable law or agreed to in writing, software
5300 * distributed under the License is distributed on an "AS IS" BASIS,
5301 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5302 * See the License for the specific language governing permissions and
5303 * limitations under the License.
5304 */const J4="installations",Fye="installations-internal",$ye=t=>{const e=t.getProvider("app").getImmediate(),n=Vye(e),r=q_(e,"heartbeat");return{app:e,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},Uye=t=>{const e=t.getProvider("app").getImmediate(),n=q_(e,J4).getImmediate();return{getId:()=>Dye(n),getToken:i=>Mye(n,i)}};function jye(){Kr(new En(J4,$ye,"PUBLIC")),Kr(new En(Fye,Uye,"PRIVATE"))}jye();Pn(D4,ek);Pn(D4,ek,"esm2017");const l2="@firebase/performance",Jb="0.6.5";/**
5305 * @license
5306 * Copyright 2020 Google LLC
5307 *
5308 * Licensed under the Apache License, Version 2.0 (the "License");
5309 * you may not use this file except in compliance with the License.
5310 * You may obtain a copy of the License at
5311 *
5312 *   http://www.apache.org/licenses/LICENSE-2.0
5313 *
5314 * Unless required by applicable law or agreed to in writing, software
5315 * distributed under the License is distributed on an "AS IS" BASIS,
5316 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5317 * See the License for the specific language governing permissions and
5318 * limitations under the License.
5319 */const X4=Jb,Bye="FB-PERF-TRACE-START",zye="FB-PERF-TRACE-STOP",Xb="FB-PERF-TRACE-MEASURE",Z4="_wt_",e3="_fp",t3="_fcp",n3="_fid",r3="@firebase/performance/config",i3="@firebase/performance/configexpire",Wye="performance",s3="Performance";/**
5320 * @license
5321 * Copyright 2020 Google LLC
5322 *
5323 * Licensed under the Apache License, Version 2.0 (the "License");
5324 * you may not use this file except in compliance with the License.
5325 * You may obtain a copy of the License at
5326 *
5327 *   http://www.apache.org/licenses/LICENSE-2.0
5328 *
5329 * Unless required by applicable law or agreed to in writing, software
5330 * distributed under the License is distributed on an "AS IS" BASIS,
5331 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5332 * See the License for the specific language governing permissions and
5333 * limitations under the License.
5334 */const qye={"trace started":"Trace {$traceName} was started before.","trace stopped":"Trace {$traceName} is not running.","nonpositive trace startTime":"Trace {$traceName} startTime should be positive.","nonpositive trace duration":"Trace {$traceName} duration should be positive.","no window":"Window is not available.","no app id":"App id is not available.","no project id":"Project id is not available.","no api key":"Api key is not available.","invali
5334d cc log":"Attempted to queue invalid cc event","FB not default":"Performance can only start when Firebase app instance is the default one.","RC response not ok":"RC response is not ok","invalid attribute name":"Attribute name {$attributeName} is invalid.","invalid attribute value":"Attribute value {$attributeValue} is invalid.","invalid custom metric name":"Custom metric name {$customMetricName} is invalid","invalid String merger input":"Input for String merger is invalid, contact support team to resolve.","already initialized":"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."},Tr=new A4(Wye,s3,qye);/**
5335 * @license
5336 * Copyright 2020 Google LLC
5337 *
5338 * Licensed under the Apache License, Version 2.0 (the "License");
5339 * you may not use this file except in compliance with the License.
5340 * You may obtain a copy of the License at
5341 *
5342 *   http://www.apache.org/licenses/LICENSE-2.0
5343 *
5344 * Unless required by applicable law or agreed to in writing, software
5345 * distributed under the License is distributed on an "AS IS" BASIS,
5346 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5347 * See the License for the specific language governing permissions and
5348 * limitations under the License.
5349 */const Zs=new Zge(s3);Zs.logLevel=Pt.INFO;/**
5350 * @license
5351 * Copyright 2020 Google LLC
5352 *
5353 * Licensed under the Apache License, Version 2.0 (the "License");
5354 * you may not use this file except in compliance with the License.
5355 * You may obtain a copy of the License at
5356 *
5357 *   http://www.apache.org/licenses/LICENSE-2.0
5358 *
5359 * Unless required by applicable law or agreed to in writing, software
5360 * distributed under the License is distributed on an "AS IS" BASIS,
5361 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5362 * See the License for the specific language governing permissions and
5363 * limitations under the License.
5364 */let aT,o3;class Kn{constructor(e){if(this.window=e,!e)throw Tr.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay)}getUrl(){return this.windowLocation.href.split("?")[0]}mark(e){!this.performance||!this.performance.mark||this.performance.mark(e)}measure(e,n,r){!this.performance||!this.performance.measure||this.performance.measure(e,n,r)}getEntriesByType(e){return!this.performance||!this.performance.getEntriesByType?[]:this.performance.getEntriesByType(e)}getEntriesByName(e){return!this.performance||!this.performance.getEntriesByName?[]:this.performance.getEntriesByName(e)}getTimeOrigin(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)}requiredApisAvailable(){return!fetch||!Promise||!zge()?(Zs.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1):jge()?!0:(Zs.info("IndexedDB is not supported by current browser"),!1)}setupObserver(e,n){if(!this.PerformanceObserver)return;new this.PerformanceObserver(i=>{for(const s of i.getEntries())n(s)}).observe({entryTypes:[e]})}static getInstance(){return aT===void 0&&(aT=new Kn(o3)),aT}}function Hye(t){o3=t}/**
5365 * @license
5366 * Copyright 2020 Google LLC
5367 *
5368 * Licensed under the Apache License, Version 2.0 (the "License");
5369 * you may not use this file except in compliance with the License.
5370 * You may obtain a copy of the License at
5371 *
5372 *   http://www.apache.org/licenses/LICENSE-2.0
5373 *
5374 * Unless required by applicable law or agreed to in writing, software
5375 * distributed under the License is distributed on an "AS IS" BASIS,
5376 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5377 * See the License for the specific language governing permissions and
5378 * limitations under the License.
5379 */let a3;function Gye(t){const e=t.getId();return e.then(n=>{a3=n}),e}function ik(){return a3}function Kye(t){const e=t.getToken();return e.then(n=>{}),e}/**
5380 * @license
5381 * Copyright 2020 Google LLC
5382 *
5383 * Licensed under the Apache License, Version 2.0 (the "License");
5384 * you may not use this file except in compliance with the License.
5385 * You may obtain a copy of the License at
5386 *
5387 *   http://www.apache.org/licenses/LICENSE-2.0
5388 *
5389 * Unless required by applicable law or agreed to in writing, software
5390 * distributed under the License is distributed on an "AS IS" BASIS,
5391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5392 * See the License for the specific language governing permissions and
5393 * limitations under the License.
5394 */function u2(t,e){const n=t.length-e.length;if(n<0||n>1)throw Tr.create("invalid String merger input");const r=[];for(let i=0;i<t.length;i++)r.push(t.charAt(i)),e.length>i&&r.push(e.charAt(i));return r.join("")}/**
5395 * @license
5396 * Copyright 2019 Google LLC
5397 *
5398 * Licensed under the Apache License, Version 2.0 (the "License");
5399 * you may not use this file except in compliance with the License.
5400 * You may obtain a copy of the License at
5401 *
5402 *   http://www.apache.org/licenses/LICENSE-2.0
5403 *
5404 * Unless required by applicable law or agreed to in writing, software
5405 * distributed under the License is distributed on an "AS IS" BASIS,
5406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5407 * See the License for the specific language governing permissions and
5408 * limitations under the License.
5409 */let lT;class Si{constructor(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=u2("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=u2("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}getFlTransportFullUrl(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)}
5409static getInstance(){return lT===void 0&&(lT=new Si),lT}}/**
5410 * @license
5411 * Copyright 2020 Google LLC
5412 *
5413 * Licensed under the Apache License, Version 2.0 (the "License");
5414 * you may not use this file except in compliance with the License.
5415 * You may obtain a copy of the License at
5416 *
5417 *   http://www.apache.org/licenses/LICENSE-2.0
5418 *
5419 * Unless required by applicable law or agreed to in writing, software
5420 * distributed under the License is distributed on an "AS IS" BASIS,
5421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5422 * See the License for the specific language governing permissions and
5423 * limitations under the License.
5424 */var Yc;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"})(Yc||(Yc={}));const Qye=["firebase_","google_","ga_"],Yye=new RegExp("^[a-zA-Z]\\w*$"),Jye=40,Xye=100;function Zye(){const t=Kn.getInstance().navigator;return t?.serviceWorker?t.serviceWorker.controller?2:3:1}function l3(){switch(Kn.getInstance().document.visibilityState){case"visible":return Yc.VISIBLE;case"hidden":return Yc.HIDDEN;default:return Yc.UNKNOWN}}function eve(){const e=Kn.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}function tve(t){return t.length===0||t.length>Jye?!1:!Qye.some(n=>t.startsWith(n))&&!!t.match(Yye)}function nve(t){return t.length!==0&&t.length<=Xye}/**
5425 * @license
5426 * Copyright 2020 Google LLC
5427 *
5428 * Licensed under the Apache License, Version 2.0 (the "License");
5429 * you may not use this file except in compliance with the License.
5430 * You may obtain a copy of the License at
5431 *
5432 *   http://www.apache.org/licenses/LICENSE-2.0
5433 *
5434 * Unless required by applicable law or agreed to in writing, software
5435 * distributed under the License is distributed on an "AS IS" BASIS,
5436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5437 * See the License for the specific language governing permissions and
5438 * limitations under the License.
5439 */function u3(t){var e;const n=(e=t.options)===null||e===void 0?void 0:e.appId;if(!n)throw Tr.create("no app id");return n}function rve(t){var e;const n=(e=t.options)===null||e===void 0?void 0:e.projectId;if(!n)throw Tr.create("no project id");return n}function ive(t){var e;const n=(e=t.options)===null||e===void 0?void 0:e.apiKey;if(!n)throw Tr.create("no api key");return n}/**
5440 * @license
5441 * Copyright 2020 Google LLC
5442 *
5443 * Licensed under the Apache License, Version 2.0 (the "License");
5444 * you may not use this file except in compliance with the License.
5445 * You may obtain a copy of the License at
5446 *
5447 *   http://www.apache.org/licenses/LICENSE-2.0
5448 *
5449 * Unless required by applicable law or agreed to in writing, software
5450 * distributed under the License is distributed on an "AS IS" BASIS,
5451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5452 * See the License for the specific language governing permissions and
5453 * limitations under the License.
5454 */const sve="0.0.1",us={loggingEnabled:!0},ove="FIREBASE_INSTALLATIONS_AUTH";function ave(t,e){const n=lve();return n?(c2(n),Promise.resolve()):dve(t,e).then(c2).then(r=>uve(r),()=>{})}function lve(){const t=Kn.getInstance().localStorage;if(!t)return;const e=t.getItem(i3);if(!e||!fve(e))return;const n=t.getItem(r3);if(n)try{return JSON.parse(n)}catch{return}}function uve(t){const e=Kn.getInstance().localStorage;!t||!e||(e.setItem(r3,JSON.stringify(t)),e.setItem(i3,String(Date.now()+Si.getInstance().configTimeToLive*60*60*1e3)))}const cve="Could not fetch config, will use default configs";function dve(t,e){return Kye(t.installations).then(n=>{const r=rve(t.app),i=ive(t.app),s=`https://firebaseremoteconfig.googleapis.com/v1/projects/${r}/namespaces/fireperf:fetch?key=${i}`,o=new Request(s,{method:"POST",headers:{Authorization:`${ove} ${n}`},body:JSON.stringify({app_instance_id:e,app_instance_id_token:n,app_id:u3(t.app),app_version:X4,sdk_version:sve})});return fetch(o).then(l=>{if(l.ok)return l.json();throw Tr.create("RC response not ok")})}).catch(()=>{Zs.info(cve)})}function c2(t){if(!t)return t;const e=Si.getInstance(),n=t.entries||{};return n.fpr_enabled!==void 0?e.loggingEnabled=String(n.fpr_enabled)==="true":e.loggingEnabled=us.loggingEnabled,n.fpr_log_source?e.logSource=Number(n.fpr_log_source):us.logSource&&(e.logSource=us.logSource),n.fpr_log_endpoint_url?e.logEndPointUrl=n.fpr_log_endpoint_url:us.logEndPointUrl&&(e.logEndPointUrl=us.logEndPointUrl),n.fpr_log_transport_key?e.transportKey=n.fpr_log_transport_key:us.transportKey&&(e.transportKey=us.transportKey),n.fpr_vc_network_request_sampling_rate!==void 0?e.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate):us.networkRequestsSamplingRate!==void 0&&(e.networkRequestsSamplingRate=us.networkRequestsSamplingRate),n.fpr_vc_trace_sampling_rate!==void 0?e.tracesSampl
5454ingRate=Number(n.fpr_vc_trace_sampling_rate):us.tracesSamplingRate!==void 0&&(e.tracesSamplingRate=us.tracesSamplingRate),e.logTraceAfterSampling=d2(e.tracesSamplingRate),e.logNetworkAfterSampling=d2(e.networkRequestsSamplingRate),t}function fve(t){return Number(t)>Date.now()}function d2(t){return Math.random()<=t}/**
5455 * @license
5456 * Copyright 2020 Google LLC
5457 *
5458 * Licensed under the Apache License, Version 2.0 (the "License");
5459 * you may not use this file except in compliance with the License.
5460 * You may obtain a copy of the License at
5461 *
5462 *   http://www.apache.org/licenses/LICENSE-2.0
5463 *
5464 * Unless required by applicable law or agreed to in writing, software
5465 * distributed under the License is distributed on an "AS IS" BASIS,
5466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5467 * See the License for the specific language governing permissions and
5468 * limitations under the License.
5469 */let sk=1,uT;function c3(t){return sk=2,uT=uT||pve(t),uT}function hve(){return sk===3}function pve(t){return mve().then(()=>Gye(t.installations)).then(e=>ave(t,e)).then(()=>f2(),()=>f2())}function mve(){const t=Kn.getInstance().document;return new Promise(e=>{if(t&&t.readyState!=="complete"){const n=()=>{t.readyState==="complete"&&(t.removeEventListener("readystatechange",n),e())};t.addEventListener("readystatechange",n)}else e()})}function f2(){sk=3}/**
5470 * @license
5471 * Copyright 2020 Google LLC
5472 *
5473 * Licensed under the Apache License, Version 2.0 (the "License");
5474 * you may not use this file except in compliance with the License.
5475 * You may obtain a copy of the License at
5476 *
5477 *   http://www.apache.org/licenses/LICENSE-2.0
5478 *
5479 * Unless required by applicable law or agreed to in writing, software
5480 * distributed under the License is distributed on an "AS IS" BASIS,
5481 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5482 * See the License for the specific language governing permissions and
5483 * limitations under the License.
5484 */const ok=10*1e3,gve=5.5*1e3,d3=3,yve=1e3;let Yv=d3,Oa=[],h2=!1;function vve(){h2||(Gw(gve),h2=!0)}function Gw(t){setTimeout(()=>{if(Yv!==0){if(!Oa.length)return Gw(ok);_ve()}},t)}function _ve(){const t=Oa.splice(0,yve),e=t.map(r=>({source_extension_json_proto3:r.message,event_time_ms:String(r.eventTime)})),n={request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:Si.getInstance().logSource,log_event:e};wve(n,t).catch(()=>{Oa=[...t,...Oa],Yv--,Zs.info(`Tries left: ${Yv}.`),Gw(ok)})}function wve(t,e){return Eve(t).then(n=>(n.ok||Zs.info("Call to Firebase backend failed."),n.json())).then(n=>{const r=Number(n.nextRequestWaitMillis);let i=ok;isNaN(r)||(i=Math.max(r,i));const s=n.logResponseDetails;Array.isArray(s)&&s.length>0&&s[0].responseAction==="RETRY_REQUEST_LATER"&&(Oa=[...e,...Oa],Zs.info("Retry transport request later.")),Yv=d3,Gw(i)})}function Eve(t){const e=Si.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}function Sve(t){if(!t.eventTime||!t.message)throw Tr.create("invalid cc log");Oa=[...Oa,t]}function Tve(t){return(...e)=>{const n=t(...e);Sve({message:n,eventTime:Date.now()})}}/**
5485 * @license
5486 * Copyright 2020 Google LLC
5487 *
5488 * Licensed under the Apache License, Version 2.0 (the "License");
5489 * you may not use this file except in compliance with the License.
5490 * You may obtain a copy of the License at
5491 *
5492 *   http://www.apache.org/licenses/LICENSE-2.0
5493 *
5494 * Unless required by applicable law or agreed to in writing, software
5495 * distributed under the License is distributed on an "AS IS" BASIS,
5496 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5497 * See the License for the specific language governing permissions and
5498 * limitations under the License.
5499 */let cT;function f3(t,e){cT||(cT=Tve(Ive)),cT(t,e)}function xy(t){const e=Si.getInstance();!e.instrumentationEnabled&&t.isAuto||!e.dataCollectionEnabled&&!t.isAuto||Kn.getInstance().requiredApisAvailable()&&(t.isAuto&&l3()!==Yc.VISIBLE||(hve()?dT(t):c3(t.performanceController).then(()=>dT(t),()=>dT(t))))}function dT(t){if(!ik())return;const e=Si.getInstance();!e.loggingEnabled||!e.logTraceAfterSampling||setTimeout(()=>f3(t,1),0)}function bve(t){const e=Si.getInstance();if(!e.instrumentationEnabled)return;const n=t.url,r=e.logEndPointUrl.split("?")[0],i=e.flTransportEndpointUrl.split("?")[0];n===r||n===i||!e.loggingEnabled||!e.logNetworkAfterSampling||setTimeout(()=>f3(t,0),0)}function Ive(t,e){return e===0?Rve(t):xve(t)}function Rve(t){const e={url:t.url,http_method:t.httpMethod||0,http_response_code:200,response_payload_bytes:t.responsePayloadBytes,client_start_time_us:t.startTimeUs,time_to_response_initiated_us:t.timeToResponseInitiatedUs,time_to_response_completed_us:t.timeToResponseCompletedUs},n={application_info:h3(t.performanceController.app),network_request_metric:e};return JSON.stringify(n)}function xve(t){const e={name:t.name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs};Object.keys(t.counters).length!==0&&(e.counters=t.counters);const n=t.getAttributes();Object.keys(n).length!==0&&(e.custom_attributes=n);const r={application_info:h3(t.performanceController.app),trace_metric:e};return JSON.stringify(r)}function h3(t){return{google_app_id:u3(t),app_instance_id:ik(),web_app_info:{sdk_version:X4,page_url:Kn.getInstance().getUrl(),service_worker_status:Zye(),visibility_state:l3(),effective_connection_type:eve()},application_process_state:0}}/**
5500 * @license
5501 * Copyright 2020 Google LLC
5502 *
5503 * Licensed under the Apache License, Version 2.0 (the "License");
5504 * you may not use this file except in compliance with the License.
5505 * You may obtain a copy of the License at
5506 *
5507 *   http://www.apache.org/licenses/LICENSE-2.0
5508 *
5509 * Unless required by applicable law or agreed to in writing, software
5510 * distributed under the License is distributed on an "AS IS" BASIS,
5511 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5512 * See the License for the specific language governing permissions and
5513 * limitations under the License.
5514 */const kve=100,Cve="_",Ave=[e3,t3,n3];function Pve(t,e){return t.length===0||t.length>kve?!1:e&&e.startsWith(Z4)&&Ave.indexOf(t)>-1||!t.startsWith(Cve)}function Ove(t){const e=Math.floor(t);return e<t&&Zs.info(`Metric value should be an Integer, setting the value as : ${e}.`),e}/**
5515 * @license
5516 * Copyright 2020 Google LLC
5517 *
5518 * Licensed under the Apache License, Version 2.0 (the "License");
5519 * you may not use this file except in compliance with the License.
5520 * You may obtain a copy of the License at
5521 *
5522 *   http://www.apache.org/licenses/LICENSE-2.0
5523 *
5524 * Unless required by applicable law or agreed to in writing, software
5525 * distributed under the License is distributed on an "AS IS" BASIS,
5526 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5527 * See the License for the specific language governing permissions and
5528 * limitations under the License.
5529 */class Na{constructor(e,n,r=!1,i){this.performanceController=e,this.name=n,this.isAuto=r,this.state=1,this.customAttributes={},this.counters={},this.api=Kn.getInstance(),this.randomId=Math.floor(Math.random()*1e6),this.isAuto||(this.traceStartMark=`${Bye}-${this.randomId}-${this.name}`,this.traceStopMark=`${zye}-${this.randomId}-${this.name}`,this.traceMeasure=i||`${Xb}-${this.randomId}-${this.name}`,i&&this.calculateTraceMetrics())}start(){if(this.state!==1)throw Tr.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(this.state!==2)throw Tr.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),xy(this)}record(e,n,r){if(e<=0)throw Tr.create("nonpositive trace startTime",{traceName:this.name});if(n<=0)throw Tr.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(n*1e3),this.startTimeUs=Math.floor(e*1e3),r&&r.attributes&&(this.customAttributes=Object.assign({},r.attributes)),r&&r.metrics)for(const i of Object.keys(r.metrics))isNaN(Number(r.metrics[i]))||(this.counters[i]=Math.floor(Number(r.metrics[i])));xy(this)}incrementMetric(e,n=1){this.counters[e]===void 0?this.putMetric(e,n):this.putMetric(e,this.counters[e]+n)}putMetric(e,n){if(Pve(e,this.name))this.counters[e]=Ove(n??0);else throw Tr.create("invalid custom metric name",{customMetricName:e})}getMetric(e){return this.counters[e]||0}putAttribute(e,n){const r=tve(e),i=nve(n);if(r&&i){this.customAttributes[e]=n;return}if(!r)throw Tr.create("invalid attribute name",{attributeName:e});if(!i)throw Tr.create("invalid attribute value",{attributeValue:n})}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){this.customAttributes[e]!==void 0&&delete this.customAttributes[e]}getAttributes(){return Object.assign({},this.customAttributes)}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){const e=this.api.getEntriesByName(this.traceMeasure),n=e&&e[0];n&&(this.durationUs=Math.floor(n.duration*1e3),this.startTimeUs=Math.floor((n.startTime+this.api.getTimeOrigin())*1e3))}static createOobTrace(e,n,r,i){const s=Kn.getInstance().getUrl();if(!s)return;const o=new Na(e,Z4+s,!0),l=Math.floor(Kn.getInstance().getTimeOrigin()*1e3);o.setStartTime(l),n&&n[0]&&(o.setDuration(Math.floor(n[0].duration*1e3)),o.putMetric("domInteractive",Math.floor(n[0].domInteractive*1e3)),o.putMetric("domContentLoadedEventEnd",Math.floor(n[0].domContentLoadedEventEnd*1e3)),o.putMetric("loadEventEnd",Math.floor(n[0].loadEventEnd*1e3)));const c="first-paint",d="first-contentful-paint";if(r){const h=r.find(g=>g.name===c);h&&h.startTime&&o.putMetric(e3,Math.floor(h.startTime*1e3));const m=r.find(g=>g.name===d);m&&m.startTime&&o.putMetric(t3,Math.floor(m.startTime*1e3)),i&&o.putMetric(n3,Math.floor(i*1e3))}xy(o)}static createUserTimingTrace(e,n){const r=new Na(e,n,!1,n);xy(r)}}/**
5530 * @license
5531 * Copyright 2020 Google LLC
5532 *
5533 * Licensed under the Apache License, Version 2.0 (the "License");
5534 * you may not use this file except in compliance with the License.
5535 * You may obtain a copy of the License at
5536 *
5537 *   http://www.apache.org/licenses/LICENSE-2.0
5538 *
5539 * Unless required by applicable law or agreed to in writing, software
5540 * distributed under the License is distributed on an "AS IS" BASIS,
5541 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5542 * See the License for the specific language governing permissions and
5543 * limitations under the License.
5544 */function p2(t,e){const n=e;if(!n||n.responseStart===void 0)return;const r=Kn.getInstance().getTimeOrigin(),i=Math.floor((n.startTime+r)*1e3),s=n.responseStart?Math.floor((n.responseStart-n.startTime)*1e3):void 0,o=Math.floor((n.responseEnd-n.startTime)*1e3),l=n.name&&n.name.split("?")[0],c={performanceController:t,url:l,responsePayloadBytes:n.transferSize,startTimeUs:i,timeToResponseInitiatedUs:s,timeToResponseCompletedUs:o};bve(c)}/**
5545 * @license
5546 * Copyright 2020 Google LLC
5547 *
5548 * Licensed under the Apache License, Version 2.0 (the "License");
5549 * you may not use this file except in compliance with the License.
5550 * You may obtain a copy of the License at
5551 *
5552 *   http://www.apache.org/licenses/LICENSE-2.0
5553 *
5554 * Unless required by applicable law or agreed to in writing, software
5555 * distributed under the License is distributed on an "AS IS" BASIS,
5556 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5557 * See the License for the specific language governing permissions and
5558 * limitations under the License.
5559 */const Nve=5e3;function m2(t){ik()&&(setTimeout(()=>Mve(t),0),setTimeout(()=>Dve(t),0),setTimeout(()=>Lve(t),0))}function Dve(t){const e=Kn.getInstance(),n=e.getEntriesByType("resource");for(const r of n)p2(t,r);e.setupObserver("resource",r=>p2(t,r))}function Mve(t){const e=Kn.getInstance(),n=e.getEntriesByType("navigation"),r=e.getEntriesByType("paint");if(e.onFirstInputDelay){let i=setTimeout(()=>{Na.createOobTrace(t,n,r),i=void 0},Nve);e.onFirstInputDelay(s=>{i&&(clearTimeout(i),Na.createOobTrace(t,n,r,s))})}else Na.createOobTrace(t,n,r)}function Lve(t){const e=Kn.getInstance(),n=e.getEntriesByType("measure");for(const r of n)g2(t,r);e.setupObserver("measure",r=>g2(t,r))}function g2(t,e){const n=e.name;n.substring(0,Xb.length)!==Xb&&Na.createUserTimingTrace(t,n)}/**
5560 * @license
5561 * Copyright 2020 Google LLC
5562 *
5563 * Licensed under the Apache License, Version 2.0 (the "License");
5564 * you may not use this file except in compliance with the License.
5565 * You may obtain a copy of the License at
5566 *
5567 *   http://www.apache.org/licenses/LICENSE-2.0
5568 *
5569 * Unless required by applicable law or agreed to in writing, software
5570 * distributed under the License is distributed on an "AS IS" BASIS,
5571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5572 * See the License for the specific language governing permissions and
5573 * limitations under the License.
5574 */class Vve{constructor(e,n){this.app=e,this.installations=n,this.initialized=!1}_init(e){this.initialized||(e?.dataCollectionEnabled!==void 0&&(this.dataCollectionEnabled=e.dataCollectionEnabled),e?.instrumentationEnabled!==void 0&&(this.instrumentationEnabled=e.instrumentationEnabled),Kn.getInstance().requiredApisAvailable()?Bge().then(n=>{n&&(vve(),c3(this).then(()=>m2(this),()=>m2(this)),this.initialized=!0)}).catch(n=>{Zs.info(`Environment doesn't support IndexedDB: ${n}`)}):Zs.info('Firebase Performance cannot start if the browser does not support "Fetch" and "Promise", or cookies are disabled.'))}set instrumentationEnabled(e){Si.getInstance().instrumentationEnabled=e}get instrumentationEnabled(){return Si.getInstance().instrumentationEnabled}set dataCollectionEnabled(e){Si.getInstance().dataCollectionEnabled=e}get dataCollectionEnabled(){return Si.getInstance().dataCollectionEnabled}}const Fve="[DEFAULT]";function $ve(t,e){return t=Kge(t),new Na(t,e)}const Uve=(t,{options:e})=>{const n=t.getProvider("app").getImmediate(),r=t.getProvider("installations-internal").getImmediate();if(n.name!==Fve)throw Tr.create("FB not default");if(typeof window>"u")throw Tr.create("no window");Hye(window);const i=new Vve(n,r);return i._init(e),i};function jve(){Kr(new En("performance",Uve,"PUBLIC")),Pn(l2,Jb),Pn(l2,Jb,"esm2017")}jve();/**
5575 * @license
5576 * Copyright 2020 Google LLC
5577 *
5578 * Licensed under the Apache License, Version 2.0 (the "License");
5579 * you may not use this file except in compliance with the License.
5580 * You may obtain a copy of the License at
5581 *
5582 *   http://www.apache.org/licenses/LICENSE-2.0
5583 *
5584 * Unless required by applicable law or agreed to in writing, software
5585 * distributed under the License is distributed on an "AS IS" BASIS,
5586 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5587 * See the License for the specific language governing permissions and
5588 * limitations under the License.
5589 */class Bve{constructor(e,n){this.app=e,this._delegate=n}get instrumentationEnabled(){return this._delegate.instrumentationEnabled}set instrumentationEnabled(e){this._delegate.instrumentationEnabled=e}get dataCollectionEnabled(){return this._delegate.dataCollectionEnabled}set dataCollectionEnabled(e){this._delegate.dataCollectionEnabled=e}trace(e){return $ve(this._delegate,e)}}const zve="@firebase/performance-compat",Wve="0.2.5";/**
5590 * @license
5591 * Copyright 2020 Google LLC
5592 *
5593 * Licensed under the Apache License, Version 2.0 (the "License");
5594 * you may not use this file except in compliance with the License.
5595 * You may obtain a copy of the License at
5596 *
5597 *   http://www.apache.org/licenses/LICENSE-2.0
5598 *
5599 * Unless required by applicable law or agreed to in writing, software
5600 * distributed under the License is distributed on an "AS IS" BASIS,
5601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5602 * See the License for the specific language governing permissions and
5603 * limitations under the License.
5604 */function qve(t){t.INTERNAL.registerComponent(new En("performance-compat",Hve,"PUBLIC")),t.registerVersion(zve,Wve)}function Hve(t){const e=t.getProvider("app-compat").getImmediate(),n=t.getProvider("performance").getImmediate();return new Bve(e,n)}qve(Kt);/**
5605 * @license
5606 * Copyright 2017 Google LLC
5607 *
5608 * Licensed under the Apache License, Version 2.0 (the "License");
5609 * you may not use this file except in compliance with the License.
5610 * You may obtain a copy of the License at
5611 *
5612 *   http://www.apache.org/licenses/LICENSE-2.0
5613 *
5614 * Unless required by applicable law or agreed to in writing, software
5615 * distributed under the License is distributed on an "AS IS" BASIS,
5616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5617 * See the License for the specific language governing permissions and
5618 * limitations under the License.
5619 */const Gve="FirebaseError";let p3=class m3 extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Gve,Object.setPrototypeOf(this,m3.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Kve.prototype.create)}},Kve=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Qve(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new p3(i,l,r)}};function Qve(t,e){return t.replace(Yve,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const Yve=/\{\$([^}]+)}/g;/**
5620 * @license
5621 * Copyright 2021 Google LLC
5622 *
5623 * Licensed under the Apache License, Version 2.0 (the "License");
5624 * you may not use this file except in compliance with the License.
5625 * You may obtain a copy of the License at
5626 *
5627 *   http://www.apache.org/licenses/LICENSE-2.0
5628 *
5629 * Unless required by applicable law or agreed to in writing, software
5630 * distributed under the License is distributed on an "AS IS" BASIS,
5631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5632 * See the License for the specific language governing permissions and
5633 * limitations under the License.
5634 */function ak(t){return t&&t._delegate?t._delegate:t}/**
5635 * @license
5636 * Copyright 2017 Google LLC
5637 *
5638 * Licensed under the Apache License, Version 2.0 (the "License");
5639 * you may not use this file except in compliance with the License.
5640 * You may obtain a copy of the License at
5641 *
5642 *   http://www.apache.org/licenses/LICENSE-2.0
5643 *
5644 * Unless required by applicable law or agreed to in writing, software
5645 * distributed under the License is distributed on an "AS IS" BASIS,
5646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5647 * See the License for the specific language governing permissions and
5648 * limitations under the License.
5649 */const Jve="type.googleapis.com/google.protobuf.Int64Value",Xve="type.googleapis.com/google.protobuf.UInt64Value";function g3(t,e){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}function Zb(t){if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===!0||t===!1||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(e=>Zb(e));if(typeof t=="function"||typeof t=="object")return g3(t,e=>Zb(e));throw new Error("Data cannot be encoded in JSON: "+t)}function Jv(t){if(t==null)return t;if(t["@type"])switch(t["@type"]){case Jve:case Xve:{const e=Number(t.value);if(isNaN(e))throw new Error("Data cannot be decoded from JSON: "+t);return e}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(e=>Jv(e)):typeof t=="function"||typeof t=="object"?g3(t,e=>Jv(e)):t}/**
5650 * @license
5651 * Copyright 2020 Google LLC
5652 *
5653 * Licensed under the Apache License, Version 2.0 (the "License");
5654 * you may not use this file except in compliance with the License.
5655 * You may obtain a copy of the License at
5656 *
5657 *   http://www.apache.org/licenses/LICENSE-2.0
5658 *
5659 * Unless required by applicable law or agreed to in writing, software
5660 * distributed under the License is distributed on an "AS IS" BASIS,
5661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5662 * See the License for the specific language governing permissions and
5663 * limitations under the License.
5664 */const y3="functions";/**
5665 * @license
5666 * Copyright 2017 Google LLC
5667 *
5668 * Licensed under the Apache License, Version 2.0 (the "License");
5669 * you may not use this file except in compliance with the License.
5670 * You may obtain a copy of the License at
5671 *
5672 *   http://www.apache.org/licenses/LICENSE-2.0
5673 *
5674 * Unless required by applicable law or agreed to in writing, software
5675 * distributed under the License is distributed on an "AS IS" BASIS,
5676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5677 * See the License for the specific language governing permissions and
5678 * limitations under the License.
5679 */const y2={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 Jc extends p3{constructor(e,n,r){super(`${y3}/${e}`,n||""),this.details=r}}function Zve(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function e_e(t,e){let n=Zve(t),r=n,i;try{const s=e&&e.error;if(s){const o=s.status;if(typeof o=="string"){if(!y2[o])return new Jc("internal","internal");n=y2[o],r=o}const l=s.message;typeof l=="string"&&(r=l),i=s.details,i!==void 0&&(i=Jv(i))}}catch{}return n==="ok"?null:new Jc(n,r,i)}/**
5680 * @license
5681 * Copyright 2017 Google LLC
5682 *
5683 * Licensed under the Apache License, Version 2.0 (the "License");
5684 * you may not use this file except in compliance with the License.
5685 * You may obtain a copy of the License at
5686 *
5687 *   http://www.apache.org/licenses/LICENSE-2.0
5688 *
5689 * Unless required by applicable law or agreed to in writing, software
5690 * distributed under the License is distributed on an "AS IS" BASIS,
5691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5692 * See the License for the specific language governing permissions and
5693 * limitations under the License.
5694 */class t_e{constructor(e,n,r){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||e.get().then(i=>this.auth=i,()=>{}),this.messaging||n.get().then(i=>this.messaging=i,()=>{}),this.appCheck||r.get().then(i=>this.appCheck=i,()=>{})}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return e?.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(e){if(this.appCheck){const n=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return n.error?null:n.token}return null}async getContext(e){const n=await this.getAuthToken(),r=await this.getMessagingToken(),i=await this.getAppCheckToken(e);return{authToken:n,messagingToken:r,appCheckToken:i}}}/**
5695 * @license
5696 * Copyright 2017 Google LLC
5697 *
5698 * Licensed under the Apache License, Version 2.0 (the "License");
5699 * you may not use this file except in compliance with the License.
5700 * You may obtain a copy of the License at
5701 *
5702 *   http://www.apache.org/licenses/LICENSE-2.0
5703 *
5704 * Unless required by applicable law or agreed to in writing, softw
5704are
5705 * distributed under the License is distributed on an "AS IS" BASIS,
5706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5707 * See the License for the specific language governing permissions and
5708 * limitations under the License.
5709 */const v2="us-central1";function n_e(t){let e=null;return{promise:new Promise((n,r)=>{e=setTimeout(()=>{r(new Jc("deadline-exceeded","deadline-exceeded"))},t)}),cancel:()=>{e&&clearTimeout(e)}}}let r_e=class{constructor(e,n,r,i,s=v2,o){this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new t_e(n,r,i),this.cancelAllRequests=new Promise(l=>{this.deleteService=()=>Promise.resolve(l())});try{const l=new URL(s);this.customDomain=l.origin,this.region=v2}catch{this.customDomain=null,this.region=s}}_delete(){return this.deleteService()}_url(e){const n=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${n}/${this.region}/${e}`:this.customDomain!==null?`${this.customDomain}/${e}`:`https://${this.region}-${n}.cloudfunctions.net/${e}`}};function i_e(t,e,n){t.emulatorOrigin=`http://${e}:${n}`}function s_e(t,e,n){return(r=>l_e(t,e,r,n||{}))}function o_e(t,e,n){return(r=>v3(t,e,r,n||{}))}async function a_e(t,e,n,r){n["Content-Type"]="application/json";let i;try{i=await r(t,{method:"POST",body:JSON.stringify(e),headers:n})}catch{return{status:0,json:null}}let s=null;try{s=await i.json()}catch{}return{status:i.status,json:s}}function l_e(t,e,n,r){const i=t._url(e);return v3(t,i,n,r)}async function v3(t,e,n,r){n=Zb(n);const i={data:n},s={},o=await t.contextProvider.getContext(r.limitedUseAppCheckTokens);o.authToken&&(s.Authorization="Bearer "+o.authToken),o.messagingToken&&(s["Firebase-Instance-ID-Token"]=o.messagingToken),o.appCheckToken!==null&&(s["X-Firebase-AppCheck"]=o.appCheckToken);const l=r.timeout||7e4,c=n_e(l),d=await Promise.race([a_e(e,i,s,t.fetchImpl),c.promise,t.cancelAllRequests]);if(c.cancel(),!d)throw new Jc("cancelled","Firebase Functions instance was deleted.");const h=e_e(d.status,d.json);if(h)throw h;if(!d.json)throw new Jc("internal","Response is not valid JSON object.");let m=d.json.data;if(typeof m>"u"&&(m=d.json.result),typeof m>"u")throw new Jc("internal","Response is missing data field.");return{data:Jv(m)}}const _2="@firebase/functions",w2="0.11.2";/**
5710 * @license
5711 * Copyright 2019 Google LLC
5712 *
5713 * Licensed under the Apache License, Version 2.0 (the "License");
5714 * you may not use this file except in compliance with the License.
5715 * You may obtain a copy of the License at
5716 *
5717 *   http://www.apache.org/licenses/LICENSE-2.0
5718 *
5719 * Unless required by applicable law or agreed to in writing, software
5720 * distributed under the License is distributed on an "AS IS" BASIS,
5721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5722 * See the License for the specific language governing permissions and
5723 * limitations under the License.
5724 */const u_e="auth-internal",c_e="app-check-internal",d_e="messaging-internal";function f_e(t,e){const n=(r,{instanceIdentifier:i})=>{const s=r.getProvider("app").getImmediate(),o=r.getProvider(u_e),l=r.getProvider(d_e),c=r.getProvider(c_e);return new r_e(s,o,l,c,i,t)};Kr(new En(y3,n,"PUBLIC").setMultipleInstances(!0)),Pn(_2,w2,e),Pn(_2,w2,"esm2017")}function E2(t,e,n){i_e(ak(t),e,n)}function h_e(t,e,n){return s_e(ak(t),e,n)}function p_e(t,e,n){return o_e(ak(t),e,n)}f_e(fetch.bind(self));/**
5725 * @license
5726 * Copyright 2017 Google LLC
5727 *
5728 * Licensed under the Apache License, Version 2.0 (the "License");
5729 * you may not use this file except in compliance with the License.
5730 * You may obtain a copy of the License at
5731 *
5732 *   http://www.apache.org/licenses/LICENSE-2.0
5733 *
5734 * Unless required by applicable law or agreed to in writing, software
5735 * distributed under the License is distributed on an "AS IS" BASIS,
5736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5737 * See the License for the specific language governing permissions and
5738 * limitations under the License.
5739 */const m_e="FirebaseError";let eI=class _3 extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=m_e,Object.setPrototypeOf(this,_3.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,g_e.prototype.create)}},g_e=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?y_e(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new eI(i,l,r)}};function y_e(t,e){return t.replace(v_e,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const v_e=/\{\$([^}]+)}/g,__e="@firebase/functions-compat",w_e="0.3.8";/**
5740 * @license
5741 * Copyright 2020 Google LLC
5742 *
5743 * Licensed under the Apache License, Version 2.0 (the "License");
5744 * you may not use this file except in compliance with the License.
5745 * You may obtain a copy of the License at
5746 *
5747 *   http://www.apache.org/licenses/LICENSE-2.0
5748 *
5749 * Unless required by applicable law or agreed to in writing, software
5750 * distributed under the License is distributed on an "AS IS" BASIS,
5751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5752 * See the License for the specific language governing permissions and
5753 * limitations under the License.
5754 */class w3{constructor(e,n){this.app=e,this._delegate=n,this._region=this._delegate.region,this._customDomain=this._delegate.customDomain}httpsCallable(e,n){return h_e(this._delegate,e,n)}httpsCallableFromURL(e,n){return p_e(this._delegate,e,n)}useFunctionsEmulator(e){const n=e.match("[a-zA-Z]+://([a-zA-Z0-9.-]+)(?::([0-9]+))?");if(n==null)throw new eI("functions","No origin provided to useFunctionsEmulator()");if(n[2]==null)throw new eI("functions","Port missing in origin provided to useFunctionsEmulator()");return E2(this._delegate,n[1],Number(n[2]))}useEmulator(e,n){return E2(this._delegate,e,n)}}/**
5755 * @license
5756 * Copyright 2020 Google LLC
5757 *
5758 * Licensed under the Apache License, Version 2.0 (the "License");
5759 * you may not use this file except in compliance with the License.
5760 * You may obtain a copy of the License at
5761 *
5762 *   http://www.apache.org/licenses/LICENSE-2.0
5763 *
5764 * Unless required by applicable law or agreed to in writing, software
5765 * distributed under the License is distributed on an "AS IS" BASIS,
5766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5767 * See the License for the specific language governing permissions and
5768 * limitations under the License.
5769 */const E_e="us-central1",S_e=(t,{instanceIdentifier:e})=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("functions").getImmediate({identifier:e??E_e});return new w3(n,r)};function T_e(){const t={Functions:w3};Kt.INTERNAL.registerComponent(new En("functions-compat",S_e,"PUBLIC").setServiceProps(t).setMultipleInstances(!0))}/**
5770 * @license
5771 * Copyright 2020 Google LLC
5772 *
5773 * Licensed under the Apache License, Version 2.0 (the "License");
5774 * you may not use this file except in compliance with the License.
5775 * You may obtain a copy of the License at
5776 *
5777 *   http://www.apache.org/licenses/LICENSE-2.0
5778 *
5779 * Unless required by applicable law or agreed to in writing, software
5780 * distributed under the License is distributed on an "AS IS" BASIS,
5781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5782 * See the License for the specific language governing permissions and
5783 * limitations under the License.
5784 */T_e();Kt.registerVersion(__e,w_e);/**
5785 * @license
5786 * Copyright 2017 Google LLC
5787 *
5788 * Licensed under the Apache License, Version 2.0 (the "License");
5789 * you may not use this file except in compliance with the License.
5790 * You may obtain a copy of the License at
5791 *
5792 *   http://www.apache.org/licenses/LICENSE-2.0
5793 *
5794 * Unless required by applicable law or agreed to in writing, software
5795 * distributed under the License is distributed on an "AS IS" BASIS,
5796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5797 * See the License for the specific language governing permissions and
5798 * limitations under the License.
5799 */var Vt;(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"})(Vt||(Vt={}));const b_e={debug:Vt.DEBUG,verbose:Vt.VERBOSE,info:Vt.INFO,warn:Vt.WARN,error:Vt.ERROR,silent:Vt.SILENT},I_e=Vt.INFO,R_e={[Vt.DEBUG]:"log",[Vt.VERBOSE]:"log",[Vt.INFO]:"info",[Vt.WARN]:"warn",[Vt.ERROR]:"error"},x_e=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=R_e[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let k_e=class{constructor(e){this.name=e,this._logLevel=I_e,this._logHandler=x_e,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Vt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?b_e[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,Vt.DEBUG,...e),this._logHandler(this,Vt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Vt.VERBOSE,...e),this._logHandler(this,Vt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Vt.INFO,...e),this._logHandler(this,Vt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Vt.WARN,...e),this._logHandler(this,Vt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Vt.ERROR,...e),this._logHandler(this,Vt.ERROR,...e)}};function E3(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function S3(){try{return typeof indexedDB=="object"}catch{return!1}}function T3(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}function b3(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
5800 * @license
5801 * Copyright 2017 Google LLC
5802 *
5803 * Licensed under the Apache License, Version 2.0 (the "License");
5804 * you may not use this file except in compliance with the License.
5805 * You may obtain a copy of the License at
5806 *
5807 *   http://www.apache.org/licenses/LICENSE-2.0
5808 *
5809 * Unless required by applicable law or agreed to in writing, software
5810 * distributed under the License is distributed on an "AS IS" BASIS,
5811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5812 * See the License for the specific language governing permissions and
5813 * limitations under the License.
5814 */const C_e="FirebaseError";let I3=class R3 extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=C_e,Object.setPrototypeOf(this,R3.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,x3.prototype.create)}},x3=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?A_e(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new I3(i,l,r)}};function A_e(t,e){return t.replace(P_e,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const P_e=/\{\$([^}]+)}/g;/**
5815 * @license
5816 * Copyright 2019 Google LLC
5817 *
5818 * Licensed under the Apache License, Version 2.0 (the "License");
5819 * you may not use this file except in compliance with the License.
5820 * You may obtain a copy of the License at
5821 *
5822 *   http://www.apache.org/licenses/LICENSE-2.0
5823 *
5824 * Unless required by applicable law or agreed to in writing, software
5825 * distributed under the License is distributed on an "AS IS" BASIS,
5826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5827 * See the License for the specific language governing permissions and
5828 * limitations under the License.
5829 */const O_e=1e3,N_e=2,D_e=14400*1e3,M_e=.5;function S2(t,e=O_e,n=N_e){const r=e*Math.pow(n,t),i=Math.round(M_e*r*(Math.random()-.5)*2);return Math.min(D_e,r+i)}/**
5830 * @license
5831 * Copyright 2021 Google LLC
5832 *
5833 * Licensed under the Apache License, Version 2.0 (the "License");
5834 * you may not use this file except in compliance with the License.
5835 * You may obtain a copy of the License at
5836 *
5837 *   http://www.apache.org/licenses/LICENSE-2.0
5838 *
5839 * Unless required by applicable law or agreed to in writing, software
5840 * distributed under the License is distributed on an "AS IS" BASIS,
5841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5842 * See the License for the specific language governing permissions and
5843 * limitations under the License.
5844 */function Lm(t){return t&&t._delegate?t._delegate:t}/**
5845 * @license
5846 * Copyright 2019 Google LLC
5847 *
5848 * Licensed under the Apache License, Version 2.0 (the "License");
5849 * you may not use this file except in compliance with the License.
5850 * You may obtain a copy of the License at
5851 *
5852 *   http://www.apache.org/licenses/LICENSE-2.0
5853 *
5854 * Unless required by applicable law or agreed to in writing, software
5855 * distributed under the License is distributed on an "AS IS" BASIS,
5856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5857 * See the License for the specific language governing permissions and
5858 * limitations under the License.
5859 */const T2="analytics",L_e="firebase_id",V_e="origin",F_e=60*1e3,$_e="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",lk="https://www.googletagmanager.com/gtag/js";/**
5860 * @license
5861 * Copyright 2019 Google LLC
5862 *
5863 * Licensed under the Apache License, Version 2.0 (the "License");
5864 * you may not use this file except in compliance with the License.
5865 * You may obtain a copy of the License at
5866 *
5867 *   http://www.apache.org/licenses/LICENSE-2.0
5868 *
5869 * Unless required by applicable law or agreed to in writing, software
5870 * distributed under the License is distributed on an "AS IS" BASIS,
5871 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5872 * See the License for the specific language governing permissions and
5873 * limitations under the License.
5874 */const Qn=new k_e("@firebase/analytics");/**
5875 * @license
5876 * Copyright 2019 Google LLC
5877 *
5878 * Licensed under the Apache License, Version 2.0 (the "License");
5879 * you may not use this file except in compliance with the License.
5880 * You may obtain a copy of the License at
5881 *
5882 *   http://www.apache.org/licenses/LICENSE-2.0
5883 *
5884 * Unless required by applicable law or agreed to in writing, softw
5884are
5885 * distributed under the License is distributed on an "AS IS" BASIS,
5886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5887 * See the License for the specific language governing permissions and
5888 * limitations under the License.
5889 */const U_e={"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},Ii=new x3("analytics","Analytics",U_e);/**
5890 * @license
5891 * Copyright 2019 Google LLC
5892 *
5893 * Licensed under the Apache License, Version 2.0 (the "License");
5894 * you may not use this file except in compliance with the License.
5895 * You may obtain a copy of the License at
5896 *
5897 *   http://www.apache.org/licenses/LICENSE-2.0
5898 *
5899 * Unless required by applicable law or agreed to in writing, software
5900 * distributed under the License is distributed on an "AS IS" BASIS,
5901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5902 * See the License for the specific language governing permissions and
5903 * limitations under the License.
5904 */function j_e(t){if(!t.startsWith(lk)){const e=Ii.create("invalid-gtag-resource",{gtagURL:t});return Qn.warn(e.message),""}return t}function k3(t){return Promise.all(t.map(e=>e.catch(n=>n)))}function B_e(t,e){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(t,e)),n}function z_e(t,e){const n=B_e("firebase-js-sdk-policy",{createScriptURL:j_e}),r=document.createElement("script"),i=`${lk}?l=${t}&id=${e}`;r.src=n?n?.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function W_e(t){let e=[];return Array.isArray(window[t])?e=window[t]:window[t]=e,e}async function q_e(t,e,n,r,i,s){const o=r[i];try{if(o)await e[o];else{const c=(await k3(n)).find(d=>d.measurementId===i);c&&await e[c.appId]}}catch(l){Qn.error(l)}t("config",i,s)}async function H_e(t,e,n,r,i){try{let s=[];if(i&&i.send_to){let o=i.send_to;Array.isArray(o)||(o=[o]);const l=await k3(n);for(const c of o){const d=l.find(m=>m.measurementId===c),h=d&&e[d.appId];if(h)s.push(h);else{s=[];break}}}s.length===0&&(s=Object.values(e)),await Promise.all(s),t("event",r,i||{})}catch(s){Qn.error(s)}}function G_e(t,e,n,r){async function i(s,...o){try{if(s==="event"){const[l,c]=o;await H_e(t,e,n,l,c)}else if(s==="config"){const[l,c]=o;await q_e(t,e,n,r,l,c)}else if(s==="consent"){const[l]=o;t("consent","update",l)}else if(s==="get"){const[l,c,d]=o;t("get",l,c,d)}else if(s==="set"){const[l]=o;t("set",l)}else t(s,...o)}catch(l){Qn.error(l)}}return i}function K_e(t,e,n,r,i){let s=function(...o){window[r].push(arguments)};return window[i]&&typeof window[i]=="function"&&(s=window[i]),window[i]=G_e(s,t,e,n),{gtagCore:s,wrappedGtag:window[i]}}function Q_e(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes(lk)&&n.src.includes(t))return n;return null}/**
5905 * @license
5906 * Copyright 2020 Google LLC
5907 *
5908 * Licensed under the Apache License, Version 2.0 (the "License");
5909 * you may not use this file except in compliance with the License.
5910 * You may obtain a copy of the License at
5911 *
5912 *   http://www.apache.org/licenses/LICENSE-2.0
5913 *
5914 * Unless required by applicable law or agreed to in writing, software
5915 * distributed under the License is distributed on an "AS IS" BASIS,
5916 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5917 * See the License for the specific language governing permissions and
5918 * limitations under the License.
5919 */const Y_e=30,J_e=1e3;class X_e{constructor(e={},n=J_e){this.throttleMetadata=e,this.intervalMillis=n}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,n){this.throttleMetadata[e]=n}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const C3=new X_e;function Z_e(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function ewe(t){var e;const{appId:n,apiKey:r}=t,i={method:"GET",headers:Z_e(r)},s=$_e.replace("{app-id}",n),o=await fetch(s,i);if(o.status!==200&&o.status!==304){let l="";try{const c=await o.json();!((e=c.error)===null||e===void 0)&&e.message&&(l=c.error.message)}catch{}throw Ii.create("config-fetch-failed",{httpStatus:o.status,responseMessage:l})}return o.json()}async function twe(t,e=C3,n){const{appId:r,apiKey:i,measurementId:s}=t.options;if(!r)throw Ii.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw Ii.create("no-api-key")}const o=e.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},l=new iwe;return setTimeout(async()=>{l.abort()},F_e),A3({appId:r,apiKey:i,measurementId:s},o,l,e)}async function A3(t,{throttleEndTimeMillis:e,backoffCount:n},r,i=C3){var s;const{appId:o,measurementId:l}=t;try{await nwe(r,e)}catch(c){if(l)return Qn.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${l} provided in the "measurementId" field in the local Firebase config. [${c?.message}]`),{appId:o,measurementId:l};throw c}try{const c=await ewe(t);return i.deleteThrottleMetadata(o),c}catch(c){const d=c;if(!rwe(d)){if(i.deleteThrottleMetadata(o),l)return Qn.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${l} provided in the "measurementId" field in the local Firebase config. [${d?.message}]`),{appId:o,measurementId:l};throw c}const h=Number((s=d?.customData)===null||s===void 0?void 0:s.httpStatus)===503?S2(n,i.intervalMillis,Y_e):S2(n,i.intervalMillis),m={throttleEndTimeMillis:Date.now()+h,backoffCount:n+1};return i.setThrottleMetadata(o,m),Qn.debug(`Calling attemptFetch again in ${h} millis`),A3(t,m,r,i)}}function nwe(t,e){return new Promise((n,r)=>{const i=Math.max(e-Date.now(),0),s=setTimeout(n,i);t.addEventListener(()=>{clearTimeout(s),r(Ii.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function rwe(t){if(!(t instanceof I3)||!t.customData)return!1;const e=Number(t.customData.httpStatus);return e===429||e===500||e===503||e===504}class iwe{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function swe(t,e,n,r,i){if(i&&i.global){t("event",n,r);return}else{const s=await e,o=Object.assign(Object.assign({},r),{send_to:s});t("event",n,o)}}async function owe(t,e,n,r){if(r&&r.global)return t("set",{screen_name:n}),Promise.resolve();{const i=await e;t("config",i,{update:!0,screen_name:n})}}async function awe(t,e,n,r){if(r&&r.global)return t("set",{user_id:n}),Promise.resolve();{const i=await e;t("config",i,{update:!0,user_id:n})}}async function lwe(t,e,n,r){if(r&&r.global){const i={};for(const s of Object.keys(n))i[`user_properties.${s}`]=n[s];return t("set",i),Promise.resolve()}else{const i=await e;t("config",i,{update:!0,user_properties:n})}}async function uwe(t,e){const n=await t;window[`ga-disable-${n}`]=!e}/**
5920 * @license
5921 * Copyright 2020 Google LLC
5922 *
5923 * Licensed under the Apache License, Version 2.0 (the "License");
5924 * you may not use this file except in compliance with the License.
5925 * You may obtain a copy of the License at
5926 *
5927 *   http://www.apache.org/licenses/LICENSE-2.0
5928 *
5929 * Unless required by applicable law or agreed to in writing, softw
5929are
5930 * distributed under the License is distributed on an "AS IS" BASIS,
5931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5932 * See the License for the specific language governing permissions and
5933 * limitations under the License.
5934 */async function cwe(){if(S3())try{await T3()}catch(t){return Qn.warn(Ii.create("indexeddb-unavailable",{errorInfo:t?.toString()}).message),!1}else return Qn.warn(Ii.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function dwe(t,e,n,r,i,s,o){var l;const c=twe(t);c.then(v=>{n[v.measurementId]=v.appId,t.options.measurementId&&v.measurementId!==t.options.measurementId&&Qn.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${v.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(v=>Qn.error(v)),e.push(c);const d=cwe().then(v=>{if(v)return r.getId()}),[h,m]=await Promise.all([c,d]);Q_e(s)||z_e(s,h.measurementId),i("js",new Date);const g=(l=o?.config)!==null&&l!==void 0?l:{};return g[V_e]="firebase",g.update=!0,m!=null&&(g[L_e]=m),i("config",h.measurementId,g),h.measurementId}/**
5935 * @license
5936 * Copyright 2019 Google LLC
5937 *
5938 * Licensed under the Apache License, Version 2.0 (the "License");
5939 * you may not use this file except in compliance with the License.
5940 * You may obtain a copy of the License at
5941 *
5942 *   http://www.apache.org/licenses/LICENSE-2.0
5943 *
5944 * Unless required by applicable law or agreed to in writing, software
5945 * distributed under the License is distributed on an "AS IS" BASIS,
5946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5947 * See the License for the specific language governing permissions and
5948 * limitations under the License.
5949 */let fwe=class{constructor(e){this.app=e}_delete(){return delete Io[this.app.options.appId],Promise.resolve()}},Io={},b2=[];const I2={};let tv="dataLayer",P3="gtag",R2,Vm,tI=!1;function hwe(t){if(tI)throw Ii.create("already-initialized");t.dataLayerName&&(tv=t.dataLayerName),t.gtagName&&(P3=t.gtagName)}function pwe(){const t=[];if(E3()&&t.push("This is a browser extension environment."),b3()||t.push("Cookies are not available."),t.length>0){const e=t.map((r,i)=>`(${i+1}) ${r}`).join(" "),n=Ii.create("invalid-analytics-context",{errorInfo:e});Qn.warn(n.message)}}function mwe(t,e,n){pwe();const r=t.options.appId;if(!r)throw Ii.create("no-app-id");if(!t.options.apiKey)if(t.options.measurementId)Qn.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw Ii.create("no-api-key");if(Io[r]!=null)throw Ii.create("already-exists",{id:r});if(!tI){W_e(tv);const{wrappedGtag:s,gtagCore:o}=K_e(Io,b2,I2,tv,P3);Vm=s,R2=o,tI=!0}return Io[r]=dwe(t,b2,I2,e,R2,tv,n),new fwe(t)}async function gwe(){if(E3()||!b3()||!S3())return!1;try{return await T3()}catch{return!1}}function ywe(t,e,n){t=Lm(t),owe(Vm,Io[t.app.options.appId],e,n).catch(r=>Qn.error(r))}function vwe(t,e,n){t=Lm(t),awe(Vm,Io[t.app.options.appId],e,n).catch(r=>Qn.error(r))}function _we(t,e,n){t=Lm(t),lwe(Vm,Io[t.app.options.appId],e,n).catch(r=>Qn.error(r))}function wwe(t,e){t=Lm(t),uwe(Io[t.app.options.appId],e).catch(n=>Qn.error(n))}function O3(t,e,n,r){t=Lm(t),swe(Vm,Io[t.app.options.appId],e,n,r).catch(i=>Qn.error(i))}const x2="@firebase/analytics",k2="0.10.1";function Ewe(){Kr(new En(T2,(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),i=e.getProvider("installations-internal").getImmediate();return mwe(r,i,n)},"PUBLIC")),Kr(new En("analytics-internal",t,"PRIVATE")),Pn(x2,k2),Pn(x2,k2,"esm2017");function t(e){try{const n=e.getProvider(T2).getImmediate();return{logEvent:(r,i,s)=>O3(n,r,i,s)}}catch(n){throw Ii.create("interop-component-reg-failed",{reason:n})}}}Ewe();const Swe="@firebase/analytics-compat",Twe="0.2.7";/**
5950 * @license
5951 * Copyright 2020 Google LLC
5952 *
5953 * Licensed under the Apache License, Version 2.0 (the "License");
5954 * you may not use this file except in compliance with the License.
5955 * You may obtain a copy of the License at
5956 *
5957 *   http://www.apache.org/licenses/LICENSE-2.0
5958 *
5959 * Unless required by applicable law or agreed to in writing, software
5960 * distributed under the License is distributed on an "AS IS" BASIS,
5961 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5962 * See the License for the specific language governing permissions and
5963 * limitations under the License.
5964 */class N3{constructor(e,n){this.app=e,this._delegate=n}logEvent(e,n,r){O3(this._delegate,e,n,r)}setCurrentScreen(e,n){ywe(this._delegate,e,n)}setUserId(e,n){vwe(this._delegate,e,n)}setUserProperties(e,n){_we(this._delegate,e,n)}setAnalyticsCollectionEnabled(e){wwe(this._delegate,e)}}/**
5965 * @license
5966 * Copyright 2021 Google LLC
5967 *
5968 * Licensed under the Apache License, Version 2.0 (the "License");
5969 * you may not use this file except in compliance with the License.
5970 * You may obtain a copy of the License at
5971 *
5972 *   http://www.apache.org/licenses/LICENSE-2.0
5973 *
5974 * Unless required by applicable law or agreed to in writing, software
5975 * distributed under the License is distributed on an "AS IS" BASIS,
5976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5977 * See the License for the specific language governing permissions and
5978 * limitations under the License.
5979 */var nI;(function(t){t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.BEGIN_CHECKOUT="begin_checkout",t.CHECKOUT_PROGRESS="checkout_progress",t.EXCEPTION="exception",t.GENERATE_LEAD="generate_lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.REMOVE_FROM_CART="remove_from_cart",t.SCREEN_VIEW="screen_view",t.SEARCH="search",t.SELECT_CONTENT="select_content",t.SELECT_ITEM="select_item",t.SELECT_PROMOTION="select_promotion",t.SET_CHECKOUT_OPTION="set_checkout_option",t.SHARE="share",t.SIGN_UP="sign_up",t.TIMING_COMPLETE="timing_complete",t.VIEW_CART="view_cart",t.VIEW_ITEM="view_item",t.VIEW_ITEM_LIST="view_item_list",t.VIEW_PROMOTION="view_promotion",t.VIEW_SEARCH_RESULTS="view_search_results"})(nI||(nI={}));/**
5980 * @license
5981 * Copyright 2021 Google LLC
5982 *
5983 * Licensed under the Apache License, Version 2.0 (the "License");
5984 * you may not use this file except in compliance with the License.
5985 * You may obtain a copy of the License at
5986 *
5987 *   http://www.apache.org/licenses/LICENSE-2.0
5988 *
5989 * Unless required by applicable law or agreed to in writing, software
5990 * distributed under the License is distributed on an "AS IS" BASIS,
5991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5992 * See the License for the specific language governing permissions and
5993 * limitations under the License.
5994 */const bwe=t=>{const e=t.getProvider("app-compat").getImmediate(),n=t.getProvider("analytics").getImmediate();return new N3(e,n)};function Iwe(){const t={Analytics:N3,settings:hwe,isSupported:gwe,EventName:nI};Kt.INTERNAL.registerComponent(new En("analytics-compat",bwe,"PUBLIC").setServiceProps(t).setMultipleInstances(!0))}Iwe();Kt.registerVersion(Swe,Twe);/**
5995 * @license
5996 * Copyright 2017 Google LLC
5997 *
5998 * Licensed under the Apache License, Version 2.0 (the "License");
5999 * you may not use this file except in compliance with the License.
6000 * You may obtain a copy of the License at
6001 *
6002 *   http://www.apache.org/licenses/LICENSE-2.0
6003 *
6004 * Unless required by applicable law or agreed to in writing, software
6005 * distributed under the License is distributed on an "AS IS" BASIS,
6006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6007 * See the License for the specific language governing permissions and
6008 * limitations under the License.
6009 */const D3=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},Rwe=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},xwe={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,l=o?t[i+1]:0,c=i+2<t.length,d=c?t[i+2]:0,h=s>>2,m=(s&3)<<4|l>>4;let g=(l&15)<<2|d>>6,v=d&63;c||(v=64,o||(g=64)),r.push(n[h],n[m],n[g],n[v])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(D3(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Rwe(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],l=i<t.length?n[t.charAt(i)]:0;++i;const d=i<t.length?n[t.charAt(i)]:64;++i;const m=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||l==null||d==null||m==null)throw new kwe;const g=s<<2|l>>
60094;if(r.push(g),d!==64){const v=l<<4&240|d>>2;if(r.push(v),m!==64){const E=d<<6&192|m;r.push(E)}}}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 kwe extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Cwe=function(t){const e=D3(t);return xwe.encodeByteArray(e,!0)},C2=function(t){return Cwe(t).replace(/\./g,"")};/**
6010 * @license
6011 * Copyright 2021 Google LLC
6012 *
6013 * Licensed under the Apache License, Version 2.0 (the "License");
6014 * you may not use this file except in compliance with the License.
6015 * You may obtain a copy of the License at
6016 *
6017 *   http://www.apache.org/licenses/LICENSE-2.0
6018 *
6019 * Unless required by applicable law or agreed to in writing, software
6020 * distributed under the License is distributed on an "AS IS" BASIS,
6021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6022 * See the License for the specific language governing permissions and
6023 * limitations under the License.
6024 */function Awe(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[C2(JSON.stringify(n)),C2(JSON.stringify(o)),""].join(".")}/**
6025 * @license
6026 * Copyright 2017 Google LLC
6027 *
6028 * Licensed under the Apache License, Version 2.0 (the "License");
6029 * you may not use this file except in compliance with the License.
6030 * You may obtain a copy of the License at
6031 *
6032 *   http://www.apache.org/licenses/LICENSE-2.0
6033 *
6034 * Unless required by applicable law or agreed to in writing, software
6035 * distributed under the License is distributed on an "AS IS" BASIS,
6036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6037 * See the License for the specific language governing permissions and
6038 * limitations under the License.
6039 */const Pwe="FirebaseError";
6039class Kw extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Pwe,Object.setPrototypeOf(this,Kw.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Owe.prototype.create)}}class Owe{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?Nwe(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Kw(i,l,r)}}function Nwe(t,e){return t.replace(Dwe,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const Dwe=/\{\$([^}]+)}/g;/**
6040 * @license
6041 * Copyright 2021 Google LLC
6042 *
6043 * Licensed under the Apache License, Version 2.0 (the "License");
6044 * you may not use this file except in compliance with the License.
6045 * You may obtain a copy of the License at
6046 *
6047 *   http://www.apache.org/licenses/LICENSE-2.0
6048 *
6049 * Unless required by applicable law or agreed to in writing, software
6050 * distributed under the License is distributed on an "AS IS" BASIS,
6051 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6052 * See the License for the specific language governing permissions and
6053 * limitations under the License.
6054 */function ol(t){return t&&t._delegate?t._delegate:t}/**
6055 * @license
6056 * Copyright 2017 Google LLC
6057 *
6058 * Licensed under the Apache License, Version 2.0 (the "License");
6059 * you may not use this file except in compliance with the License.
6060 * You may obtain a copy of the License at
6061 *
6062 *   http://www.apache.org/licenses/LICENSE-2.0
6063 *
6064 * Unless required by applicable law or agreed to in writing, software
6065 * distributed under the License is distributed on an "AS IS" BASIS,
6066 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6067 * See the License for the specific language governing permissions and
6068 * limitations under the License.
6069 */const M3="firebasestorage.googleapis.com",L3="storageBucket",Mwe=120*1e3,Lwe=600*1e3,Vwe=1e3;/**
6070 * @license
6071 * Copyright 2017 Google LLC
6072 *
6073 * Licensed under the Apache License, Version 2.0 (the "License");
6074 * you may not use this file except in compliance with the License.
6075 * You may obtain a copy of the License at
6076 *
6077 *   http://www.apache.org/licenses/LICENSE-2.0
6078 *
6079 * Unless required by applicable law or agreed to in writing, software
6080 * distributed under the License is distributed on an "AS IS" BASIS,
6081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6082 * See the License for the specific language governing permissions and
6083 * limitations under the License.
6084 */class nn extends Kw{constructor(e,n,r=0){super(fT(e),`Firebase Storage: ${n} (${fT(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,nn.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return fT(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
6085${this.customData.serverResponse}`:this.message=this._baseMessage}}var Ut;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(Ut||(Ut={}));function fT(t){return"storage/"+t}function uk(){const t="An unknown error occurred, please check the error payload for server response.";return new nn(Ut.UNKNOWN,t)}function Fwe(t){return new nn(Ut.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function $we(t){return new nn(Ut.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function Uwe(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new nn(Ut.UNAUTHENTICATED,t)}function jwe(){return new nn(Ut.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function Bwe(t){return new nn(Ut.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function V3(){return new nn(Ut.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function F3(){return new nn(Ut.CANCELED,"User canceled the upload/download.")}function zwe(t){return new nn(Ut.INVALID_URL,"Invalid URL '"+t+"'.")}function Wwe(t){return new nn(Ut.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function qwe(){return new nn(Ut.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+L3+"' property when initializing the app?")}function $3(){return new nn(Ut.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Hwe(){return new nn(Ut.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function Gwe(){return new nn(Ut.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function Kwe(t){return new nn(Ut.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Xc(t){return new nn(Ut.INVALID_ARGUMENT,t)}function U3(){return new nn(Ut.APP_DELETED,"The Firebase app was deleted.")}function j3(t){return new nn(Ut.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function rp(t,e){return new nn(Ut.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function fh(t){throw new nn(Ut.INTERNAL_ERROR,"Internal error: "+t)}/**
6086 * @license
6087 * Copyright 2017 Google LLC
6088 *
6089 * Licensed under the Apache License, Version 2.0 (the "License");
6090 * you may not use this file except in compliance with the License.
6091 * You may obtain a copy of the License at
6092 *
6093 *   http://www.apache.org/licenses/LICENSE-2.0
6094 *
6095 * Unless required by applicable law or agreed to in writing, software
6096 * distributed under the License is distributed on an "AS IS" BASIS,
6097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6098 * See the License for the specific language governing permissions and
6099 * limitations under the License.
6100 */class xr{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=xr.makeFromUrl(e,n)}catch{return new xr(e,"")}if(r.path==="")return r;throw Wwe(e)}static makeFromUrl(e,n){let r=null;const i="([A-Za-z0-9.\\-_]+)";function s(P){P.path.charAt(P.path.length-1)==="/"&&(P.path_=P.path_.slice(0,-1))}const o="(/(.*))?$",l=new RegExp("^gs://"+i+o,"i"),c={bucket:1,path:3};function d(P){P.path_=decodeURIComponent(P.path)}const h="v[A-Za-z0-9_]+",m=n.replace(/[.]/g,"\\."),g="(/([^?#]*).*)?$",v=new RegExp(`^https?://${m}/${h}/b/${i}/o${g}`,"i"),E={bucket:1,path:3},S=n===M3?"(?:storage.googleapis.com|storage.cloud.google.com)":n,w="([^?#]*)",b=new RegExp(`^https?://${S}/${i}/${w}`,"i"),I=[{regex:l,indices:c,postModify:s},{regex:v,indices:E,postModify:d},{regex:b,indices:{bucket:1,path:2},postModify:d}];for(let P=0;P<I.length;P++){const x=I[P],N=x.regex.exec(e);if(N){const k=N[x.indices.bucket];let V=N[x.indices.path];V||(V=""),r=new xr(k,V),x.postModify(r);break}}if(r==null)throw zwe(e);return r}}class Qwe{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/**
6101 * @license
6102 * Copyright 2017 Google LLC
6103 *
6104 * Licensed under the Apache License, Version 2.0 (the "License");
6105 * you may not use this file except in compliance with the License.
6106 * You may obtain a copy of the License at
6107 *
6108 *   http://www.apache.org/licenses/LICENSE-2.0
6109 *
6110 * Unless required by applicable law or agreed to in writing, software
6111 * distributed under the License is distributed on an "AS IS" BASIS,
6112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6113 * See the License for the specific language governing permissions and
6114 * limitations under the License.
6115 */function Ywe(t,e,n){let r=1,i=null,s=null,o=!1,l=0;function c(){return l===2}let d=!1;function h(...w){d||(d=!0,e.apply(null,w))}function m(w){i=setTimeout(()=>{i=null,t(v,c())},w)}function g(){s&&clearTimeout(s)}function v(w,...b){if(d){g();return}if(w){g(),h.call(null,w,...b);return}if(c()||o){g(),h.call(null,w,...b);return}r<64&&(r*=2);let I;l===1?(l=2,I=0):I=(r+Math.random())*1e3,m(I)}let E=!1;function S(w){E||(E=!0,g(),!d&&(i!==null?(w||(l=2),clearTimeout(i),m(0)):w||(l=1)))}return m(0),s=setTimeout(()=>{o=!0,S(!0)},n),S}function Jwe(t){t(!1)}/**
6116 * @license
6117 * Copyright 2017 Google LLC
6118 *
6119 * Licensed under the Apache License, Version 2.0 (the "License");
6120 * you may not use this file except in compliance with the License.
6121 * You may obtain a copy of the License at
6122 *
6123 *   http://www.apache.org/licenses/LICENSE-2.0
6124 *
6125 * Unless required by applicable law or agreed to in writing, software
6126 * distributed under the License is distributed on an "AS IS" BASIS,
6127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6128 * See the License for the specific language governing permissions and
6129 * limitations under the License.
6130 */function Xwe(t){return t!==void 0}function Zwe(t){return typeof t=="function"}function eEe(t){return typeof t=="object"&&!Array.isArray(t)}function Qw(t){return typeof t=="string"||t instanceof String}function A2(t){return ck()&&t instanceof Blob}function ck(){return typeof Blob<"u"}function rI(t,e,n,r){if(r<e)throw Xc(`Invalid value for '${t}'. Expected ${e} or greater.`);if(r>n)throw Xc(`Invalid value for '${t}'. Expected ${n} or less.`)}/**
6131 * @license
6132 * Copyright 2017 Google LLC
6133 *
6134 * Licensed under the Apache License, Version 2.0 (the "License");
6135 * you may not use this file except in compliance with the License.
6136 * You may obtain a copy of the License at
6137 *
6138 *   http://www.apache.org/licenses/LICENSE-2.0
6139 *
6140 * Unless required by applicable law or agreed to in writing, software
6141 * distributed under the License is distributed on an "AS IS" BASIS,
6142 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6143 * See the License for the specific language governing permissions and
6144 * limitations under the License.
6145 */function al(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function B3(t){const e=encodeURIComponent;let n="?";for(const r in t)if(t.hasOwnProperty(r)){const i=e(r)+"="+e(t[r]);n=n+i+"&"}return n=n.slice(0,-1),n}/**
6146 * @license
6147 * Copyright 2017 Google LLC
6148 *
6149 * Licensed under the Apache License, Version 2.0 (the "License");
6150 * you may not use this file except in compliance with the License.
6151 * You may obtain a copy of the License at
6152 *
6153 *   http://www.apache.org/licenses/LICENSE-2.0
6154 *
6155 * Unless required by applicable law or agreed to in writing, software
6156 * distributed under the License is distributed on an "AS IS" BASIS,
6157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6158 * See the License for the specific language governing permissions and
6159 * limitations under the License.
6160 */var eu;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(eu||(eu={}));/**
6161 * @license
6162 * Copyright 2022 Google LLC
6163 *
6164 * Licensed under the Apache License, Version 2.0 (the "License");
6165 * you may not use this file except in compliance with the License.
6166 * You may obtain a copy of the License at
6167 *
6168 *   http://www.apache.org/licenses/LICENSE-2.0
6169 *
6170 * Unless required by applicable law or agreed to in writing, software
6171 * distributed under the License is distributed on an "AS IS" BASIS,
6172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6173 * See the License for the specific language governing permissions and
6174 * limitations under the License.
6175 */function z3(t,e){const n=t>=500&&t<600,i=[408,429].indexOf(t)!==-1,s=e.indexOf(t)!==-1;return n||i||s}/**
6176 * @license
6177 * Copyright 2017 Google LLC
6178 *
6179 * Licensed under the Apache License, Version 2.0 (the "License");
6180 * you may not use this file except in compliance with the License.
6181 * You may obtain a copy of the License at
6182 *
6183 *   http://www.apache.org/licenses/LICENSE-2.0
6184 *
6185 * Unless required by applicable law or agreed to in writing, software
6186 * distributed under the License is distributed on an "AS IS" BASIS,
6187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6188 * See the License for the specific language governing permissions and
6189 * limitations under the License.
6190 */class tEe{constructor(e,n,r,i,s,o,l,c,d,h,m,g=!0){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s,this.additionalRetryCodes_=o,this.callback_=l,this.errorCallback_=c,this.timeout_=d,this.progressCallback_=h,this.connectionFactory_=m,this.retry=g,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((v,E)=>{this.resolve_=v,this.reject_=E,this.start_()})}start_(){const e=(r,i)=>{if(i){r(!1,new ky(!1,null,!0));return}const s=this.connectionFactory_();this.pendingConnection_=s;const o=l=>{const c=l.loaded,d=l.lengthComputable?l.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,d)};this.progressCallback_!==null&&s.addUploadProgressListener(o),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(o),this.pendingConnection_=null;const l=s.getErrorCode()===eu.NO_ERROR,c=s.getStatus();if(!l||z3(c,this.additionalRetryCodes_)&&this.retry){const h=s.getErrorCode()===eu.ABORT;r(!1,new ky(!1,null,h));return}const d=this.successCodes_.indexOf(c)!==-1;r(!0,new ky(d,s))})},n=(r,i)=>{const s=this.resolve_,o=this.reject_,l=i.connection;if(i.wasSuccessCode)try{const c=this.callback_(l,l.getResponse());Xwe(c)?s(c):s()}catch(c){o(c)}else if(l!==null){const c=uk();c.serverResponse=l.getErrorText(),this.errorCallback_?o(this.errorCallback_(l,c)):o(c)}else if(i.canceled){const c=this.appDelete_?U3():F3();o(c)}else{const c=V3();o(c)}};this.canceled_?n(!1,new ky(!1,null,!0)):this.backoffId_=Ywe(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&Jwe(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class ky{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}}function nEe(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function rEe(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function iEe(t,e){e&&(t["X-Firebase-GMPID"]=e)}function sEe(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}
6190function oEe(t,e,n,r,i,s,o=!0){const l=B3(t.urlParams),c=t.url+l,d=Object.assign({},t.headers);return iEe(d,e),nEe(d,n),rEe(d,s),sEe(d,r),new tEe(c,t.method,d,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,o)}/**
6191 * @license
6192 * Copyright 2017 Google LLC
6193 *
6194 * Licensed under the Apache License, Version 2.0 (the "License");
6195 * you may not use this file except in compliance with the License.
6196 * You may obtain a copy of the License at
6197 *
6198 *   http://www.apache.org/licenses/LICENSE-2.0
6199 *
6200 * Unless required by applicable law or agreed to in writing, software
6201 * distributed under the License is distributed on an "AS IS" BASIS,
6202 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6203 * See the License for the specific language governing permissions and
6204 * limitations under the License.
6205 */function aEe(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function lEe(...t){const e=aEe();if(e!==void 0){const n=new e;for(let r=0;r<t.length;r++)n.append(t[r]);return n.getBlob()}else{if(ck())return new Blob(t);throw new nn(Ut.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function uEe(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}/**
6206 * @license
6207 * Copyright 2021 Google LLC
6208 *
6209 * Licensed under the Apache License, Version 2.0 (the "License");
6210 * you may not use this file except in compliance with the License.
6211 * You may obtain a copy of the License at
6212 *
6213 *   http://www.apache.org/licenses/LICENSE-2.0
6214 *
6215 * Unless required by applicable law or agreed to in writing, software
6216 * distributed under the License is distributed on an "AS IS" BASIS,
6217 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6218 * See the License for the specific language governing permissions and
6219 * limitations under the License.
6220 */function cEe(t){if(typeof atob>"u")throw Kwe("base-64");return atob(t)}/**
6221 * @license
6222 * Copyright 2017 Google LLC
6223 *
6224 * Licensed under the Apache License, Version 2.0 (the "License");
6225 * you may not use this file except in compliance with the License.
6226 * You may obtain a copy of the License at
6227 *
6228 *   http://www.apache.org/licenses/LICENSE-2.0
6229 *
6230 * Unless required by applicable law or agreed to in writing, software
6231 * distributed under the License is distributed on an "AS IS" BASIS,
6232 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6233 * See the License for the specific language governing permissions and
6234 * limitations under the License.
6235 */const qi={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class hT{constructor(e,n){this.data=e,this.contentType=n||null}}function W3(t,e){switch(t){case qi.RAW:return new hT(q3(e));case qi.BASE64:case qi.BASE64URL:return new hT(H3(t,e));case qi.DATA_URL:return new hT(fEe(e),hEe(e))}throw uk()}function q3(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|r&63);else if((r&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{const s=r,o=t.charCodeAt(++n);r=65536|(s&1023)<<10|o&1023,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function dEe(t){let e;try{e=decodeURIComponent(t)}catch{throw rp(qi.DATA_URL,"Malformed data URL.")}return q3(e)}function H3(t,e){switch(t){case qi.BASE64:{const i=e.indexOf("-")!==-1,s=e.indexOf("_")!==-1;if(i||s)throw rp(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break}case qi.BASE64URL:{const i=e.indexOf("+")!==-1,s=e.indexOf("/")!==-1;if(i||s)throw rp(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=cEe(e)}catch(i){throw i.message.includes("polyfill")?i:rp(t,"Invalid character found")}const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}class G3{constructor(e){this.base64=!1,this.contentType=null;const n=e.match(/^data:([^,]+)?,/);if(n===null)throw rp(qi.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const r=n[1]||null;r!=null&&(this.base64=pEe(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}function fEe(t){const e=new G3(t);return e.base64?H3(qi.BASE64,e.rest):dEe(e.rest)}function hEe(t){return new G3(t).contentType}function pEe(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/**
6236 * @license
6237 * Copyright 2017 Google LLC
6238 *
6239 * Licensed under the Apache License, Version 2.0 (the "License");
6240 * you may not use this file except in compliance with the License.
6241 * You may obtain a copy of the License at
6242 *
6243 *   http://www.apache.org/licenses/LICENSE-2.0
6244 *
6245 * Unless required by applicable law or agreed to in writing, software
6246 * distributed under the License is distributed on an "AS IS" BASIS,
6247 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6248 * See the License for the specific language governing permissions and
6249 * limitations under the License.
6250 */class yo{constructor(e,n){let r=0,i="";A2(e)?(this.data_=e,r=e.size,i=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=i}size(){return this.size_}type(){return this.type_}slice(e,n){if(A2(this.data_)){const r=this.data_,i=uEe(r,e,n);return i===null?null:new yo(i)}else{const r=new Uint8Array(this.data_.buffer,e,n-e);return new yo(r,!0)}}static getBlob(...e){if(ck()){const n=e.map(r=>r instanceof yo?r.data_:r);return new yo(lEe.apply(null,n))}else{const n=e.map(o=>Qw(o)?W3(qi.RAW,o).data:o.data_);let r=0;n.forEach(o=>{r+=o.byteLength});const i=new Uint8Array(r);let s=0;return n.forEach(o=>{for(let l=0;l<o.length;l++)i[s++]=o[l]}),new yo(i,!0)}}uploadData(){return this.data_}}/**
6251 * @license
6252 * Copyright 2017 Google LLC
6253 *
6254 * Licensed under the Apache License, Version 2.0 (the "License");
6255 * you may not use this file except in compliance with the License.
6256 * You may obtain a copy of the License at
6257 *
6258 *   http://www.apache.org/licenses/LICENSE-2.0
6259 *
6260 * Unless required by applicable law or agreed to in writing, software
6261 * distributed under the License is distributed on an "AS IS" BASIS,
6262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6263 * See the License for the specific language governing permissions and
6264 * limitations under the License.
6265 */function dk(t){let e;try{e=JSON.parse(t)}catch{return null}return eEe(e)?e:null}/**
6266 * @license
6267 * Copyright 2017 Google LLC
6268 *
6269 * Licensed under the Apache License, Version 2.0 (the "License");
6270 * you may not use this file except in compliance with the License.
6271 * You may obtain a copy of the License at
6272 *
6273 *   http://www.apache.org/licenses/LICENSE-2.0
6274 *
6275 * Unless required by applicable law or agreed to in writing, software
6276 * distributed under the License is distributed on an "AS IS" BASIS,
6277 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6278 * See the License for the specific language governing permissions and
6279 * limitations under the License.
6280 */function mEe(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function gEe(t,e){const n=e.split("/").filter(r=>r.length>0).join("/");return t.length===0?n:t+"/"+n}function K3(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/**
6281 * @license
6282 * Copyright 2017 Google LLC
6283 *
6284 * Licensed under the Apache License, Version 2.0 (the "License");
6285 * you may not use this file except in compliance with the License.
6286 * You may obtain a copy of the License at
6287 *
6288 *   http://www.apache.org/licenses/LICENSE-2.0
6289 *
6290 * Unless required by applicable law or agreed to in writing, software
6291 * distributed under the License is distributed on an "AS IS" BASIS,
6292 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6293 * See the License for the specific language governing permissions and
6294 * limitations under the License.
6295 */function yEe(t,e){return e}class $r{constructor(e,n,r,i){this.server=e,this.local=n||e,this.writable=!!r,this.xform=i||yEe}}let Cy=null;function vEe(t){return!Qw(t)||t.length<2?t:K3(t)}function Yw(){if(Cy)return Cy;const t=[];t.push(new $r("bucket")),t.push(new $r("generation")),t.push(new $r("metageneration")),t.push(new $r("name","fullPath",!0));function e(s,o){return vEe(o)}const n=new $r("name");n.xform=e,t.push(n);function r(s,o){return o!==void 0?Number(o):o}const i=new $r("size");return i.xform=r,t.push(i),t.push(new $r("timeCreated")),t.push(new $r("updated")),t.push(new $r("md5Hash",null,!0)),t.push(new $r("cacheControl",null,!0)),t.push(new $r("contentDisposition",null,!0)),t.push(new $r("contentEncoding",null,!0)),t.push(new $r("contentLanguage",null,!0)),t.push(new $r("contentType",null,!0)),t.push(new $r("metadata","customMetadata",!0)),Cy=t,Cy}function _Ee(t,e){function n(){const r=t.bucket,i=t.fullPath,s=new xr(r,i);return e._makeStorageReference(s)}Object.defineProperty(t,"ref",{get:n})}function wEe(t,e,n){const r={};r.type="file";const i=n.length;for(let s=0;s<i;s++){const o=n[s];r[o.local]=o.xform(r,e[o.server])}return _Ee(r,t),r}function Q3(t,e,n){const r=dk(e);return r===null?null:wEe(t,r,n)}function EEe(t,e,n,r){const i=dk(e);if(i===null||!Qw(i.downloadTokens))return null;const s=i.downloadTokens;if(s.length===0)return null;const o=encodeURIComponent;return s.split(",").map(d=>{const h=t.bucket,m=t.fullPath,g="/b/"+o(h)+"/o/"+o(m),v=al(g,n,r),E=B3({alt:"media",token:d});return v+E})[0]}function fk(t,e){const n={},r=e.length;for(let i=0;i<r;i++){const s=e[i];s.writable&&(n[s.server]=t[s.local])}return JSON.stringify(n)}/**
6296 * @license
6297 * Copyright 2019 Google LLC
6298 *
6299 * Licensed under the Apache License, Version 2.0 (the "License");
6300 * you may not use this file except in compliance with the License.
6301 * You may obtain a copy of the License at
6302 *
6303 *   http://www.apache.org/licenses/LICENSE-2.0
6304 *
6305 * Unless required by applicable law or agreed to in writing, software
6306 * distributed under the License is distributed on an "AS IS" BASIS,
6307 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6308 * See the License for the specific language governing permissions and
6309 * limitations under the License.
6310 */const P2="prefixes",O2="items";function SEe(t,e,n){const r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n[P2])for(const i of n[P2]){const s=i.replace(/\/$/,""),o=t._makeStorageReference(new xr(e,s));r.prefixes.push(o)}if(n[O2])for(const i of n[O2]){const s=t._makeStorageReference(new xr(e,i.name));r.items.push(s)}return r}function TEe(t,e,n){const r=dk(n);return r===null?null:SEe(t,e,r)}class jo{constructor(e,n,r,i){this.url=e,this.method=n,this.handler=r,this.timeout=i,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/**
6311 * @license
6312 * Copyright 2017 Google LLC
6313 *
6314 * Licensed under the Apache License, Version 2.0 (the "License");
6315 * you may not use this file except in compliance with the License.
6316 * You may obtain a copy of the License at
6317 *
6318 *   http://www.apache.org/licenses/LICENSE-2.0
6319 *
6320 * Unless required by applicable law or agreed to in writing, software
6321 * distributed under the License is distributed on an "AS IS" BASIS,
6322 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6323 * See the License for the specific language governing permissions and
6324 * limitations under the License.
6325 */function qs(t){if(!t)throw uk()}function Jw(t,e){function n(r,i){const s=Q3(t,i,e);return qs(s!==null),s}return n}function bEe(t,e){function n(r,i){const s=TEe(t,e,i);return qs(s!==null),s}return n}function IEe(t,e){function n(r,i){const s=Q3(t,i,e);return qs(s!==null),EEe(s,i,t.host,t._protocol)}return n}function ef(t){function e(n,r){let i;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?i=jwe():i=Uwe():n.getStatus()===402?i=$we(t.bucket):n.getStatus()===403?i=Bwe(t.path):i=r,i.status=n.getStatus(),i.serverResponse=r.serverResponse,i}return e}function Xw(t){const e=ef(t);function n(r,i){let s=e(r,i);return r.getStatus()===404&&(s=Fwe(t.path)),s.serverResponse=i.serverResponse,s}return n}function Y3(t,e,n){const r=e.fullServerUrl(),i=al(r,t.host,t._protocol),s="GET",o=t.maxOperationRetryTime,l=ne
6325w jo(i,s,Jw(t,n),o);return l.errorHandler=Xw(e),l}function REe(t,e,n,r,i){const s={};e.isRoot?s.prefix="":s.prefix=e.path+"/",n.length>0&&(s.delimiter=n),r&&(s.pageToken=r),i&&(s.maxResults=i);const o=e.bucketOnlyServerUrl(),l=al(o,t.host,t._protocol),c="GET",d=t.maxOperationRetryTime,h=new jo(l,c,bEe(t,e.bucket),d);return h.urlParams=s,h.errorHandler=ef(e),h}function xEe(t,e,n){const r=e.fullServerUrl(),i=al(r,t.host,t._protocol),s="GET",o=t.maxOperationRetryTime,l=new jo(i,s,IEe(t,n),o);return l.errorHandler=Xw(e),l}function kEe(t,e,n,r){const i=e.fullServerUrl(),s=al(i,t.host,t._protocol),o="PATCH",l=fk(n,r),c={"Content-Type":"application/json; charset=utf-8"},d=t.maxOperationRetryTime,h=new jo(s,o,Jw(t,r),d);return h.headers=c,h.body=l,h.errorHandler=Xw(e),h}function CEe(t,e){const n=e.fullServerUrl(),r=al(n,t.host,t._protocol),i="DELETE",s=t.maxOperationRetryTime;function o(c,d){}const l=new jo(r,i,o,s);return l.successCodes=[200,204],l.errorHandler=Xw(e),l}function AEe(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function J3(t,e,n){const r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=AEe(null,e)),r}function PEe(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};function l(){let I="";for(let P=0;P<2;P++)I=I+Math.random().toString().slice(2);return I}const c=l();o["Content-Type"]="multipart/related; boundary="+c;const d=J3(e,r,i),h=fk(d,n),m="--"+c+`\r
6326Content-Type: application/json; charset=utf-8\r
6327\r
6328`+h+`\r
6329--`+c+`\r
6330Content-Type: `+d.contentType+`\r
6331\r
6332`,g=`\r
6333--`+c+"--",v=yo.getBlob(m,r,g);if(v===null)throw $3();const E={name:d.fullPath},S=al(s,t.host,t._protocol),w="POST",b=t.maxUploadRetryTime,C=new jo(S,w,Jw(t,n),b);return C.urlParams=E,C.headers=o,C.body=v.uploadData(),C.errorHandler=ef(e),C}class Xv{constructor(e,n,r,i){this.current=e,this.total=n,this.finalized=!!r,this.metadata=i||null}}function hk(t,e){let n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch{qs(!1)}return qs(!!n&&(e||["active"]).indexOf(n)!==-1),n}function OEe(t,e,n,r,i){const s=e.bucketOnlyServerUrl(),o=J3(e,r,i),l={name:o.fullPath},c=al(s,t.host,t._protocol),d="POST",h={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},m=fk(o,n),g=t.maxUploadRetryTime;function v(S){hk(S);let w;try{w=S.getResponseHeader("X-Goog-Upload-URL")}catch{qs(!1)}return qs(Qw(w)),w}const E=new jo(c,d,v,g);return E.urlParams=l,E.headers=h,E.body=m,E.errorHandler=ef(e),E}function NEe(t,e,n,r){const i={"X-Goog-Upload-Command":"query"};function s(d){const h=hk(d,["active","final"]);let m=null;try{m=d.getResponseHeader("X-Goog-Upload-Size-Received")}catch{qs(!1)}m||qs(!1);const g=Number(m);return qs(!isNaN(g)),new Xv(g,r.size(),h==="final")}const o="POST",l=t.maxUploadRetryTime,c=new jo(n,o,s,l);return c.headers=i,c.errorHandler=ef(e),c}const N2=256*1024;function DEe(t,e,n,r,i,s,o,l){const c=new Xv(0,0);if(o?(c.current=o.current,c.total=o.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw Hwe();const d=c.total-c.current;let h=d;i>0&&(h=Math.min(h,i));const m=c.current,g=m+h;let v="";h===0?v="finalize":d===h?v="upload, finalize":v="upload";const E={"X-Goog-Upload-Command":v,"X-Goog-Upload-Offset":`${c.current}`},S=r.slice(m,g);if(S===null)throw $3();function w(P,x){const N=hk(P,["active","final"]),k=c.current+h,V=r.size();let L;return N==="final"?L=Jw(e,s)(P,x):L=null,new Xv(k,V,N==="final",L)}const b="POST",C=e.maxUploadRetryTime,I=new jo(n,b,w,C);return I.headers=E,I.body=S.uploadData(),I.progressCallback=l||null,I.errorHandler=ef(t),I}/**
6334 * @license
6335 * Copyright 2017 Google LLC
6336 *
6337 * Licensed under the Apache License, Version 2.0 (the "License");
6338 * you may not use this file except in compliance with the License.
6339 * You may obtain a copy of the License at
6340 *
6341 *   http://www.apache.org/licenses/LICENSE-2.0
6342 *
6343 * Unless required by applicable law or agreed to in writing, softw
6343are
6344 * distributed under the License is distributed on an "AS IS" BASIS,
6345 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6346 * See the License for the specific language governing permissions and
6347 * limitations under the License.
6348 */const MEe={STATE_CHANGED:"state_changed"},Br={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function pT(t){switch(t){case"running":case"pausing":case"canceling":return Br.RUNNING;case"paused":return Br.PAUSED;case"success":return Br.SUCCESS;case"canceled":return Br.CANCELED;case"error":return Br.ERROR;default:return Br.ERROR}}/**
6349 * @license
6350 * Copyright 2017 Google LLC
6351 *
6352 * Licensed under the Apache License, Version 2.0 (the "License");
6353 * you may not use this file except in compliance with the License.
6354 * You may obtain a copy of the License at
6355 *
6356 *   http://www.apache.org/licenses/LICENSE-2.0
6357 *
6358 * Unless required by applicable law or agreed to in writing, software
6359 * distributed under the License is distributed on an "AS IS" BASIS,
6360 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6361 * See the License for the specific language governing permissions and
6362 * limitations under the License.
6363 */class LEe{constructor(e,n,r){if(Zwe(e)||n!=null||r!=null)this.next=e,this.error=n??void 0,this.complete=r??void 0;else{const s=e;this.next=s.next,this.error=s.error,this.complete=s.complete}}}/**
6364 * @license
6365 * Copyright 2017 Google LLC
6366 *
6367 * Licensed under the Apache License, Version 2.0 (the "License");
6368 * you may not use this file except in compliance with the License.
6369 * You may obtain a copy of the License at
6370 *
6371 *   http://www.apache.org/licenses/LICENSE-2.0
6372 *
6373 * Unless required by applicable law or agreed to in writing, software
6374 * distributed under the License is distributed on an "AS IS" BASIS,
6375 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6376 * See the License for the specific language governing permissions and
6377 * limitations under the License.
6378 */function Sc(t){return(...e)=>{Promise.resolve().then(()=>t(...e))}}class VEe{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=eu.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=eu.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=eu.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,i){if(this.sent_)throw fh("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,e,!0),i!==void 0)for(const s in i)i.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,i[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw fh("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw fh("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw fh("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw fh("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class FEe extends VEe{initXhr(){this.xhr_.responseType="text"}}function Ls(){return new FEe}/**
6379 * @license
6380 * Copyright 2017 Google LLC
6381 *
6382 * Licensed under the Apache License, Version 2.0 (the "License");
6383 * you may not use this file except in compliance with the License.
6384 * You may obtain a copy of the License at
6385 *
6386 *   http://www.apache.org/licenses/LICENSE-2.0
6387 *
6388 * Unless required by applicable law or agreed to in writing, software
6389 * distributed under the License is distributed on an "AS IS" BASIS,
6390 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6391 * See the License for the specific language governing permissions and
6392 * limitations under the License.
6393 */class X3{constructor(e,n,r=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=n,this._metadata=r,this._mappings=Yw(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=i=>{if(this._request=void 0,this._chunkMultiplier=1,i._codeEquals(Ut.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{const s=this.isExponentialBackoffExpired();if(z3(i.status,[]))if(s)i=V3();else{this.sleepTime=Math.max(this.sleepTime*2,Vwe),this._needToFetchStatus=!0,this.completeTransitions_();return}this._error=i,this._transition("error")}},this._metadataErrorHandler=i=>{this._request=void 0,i._codeEquals(Ut.CANCELED)?this.completeTransitions_():(this._error=i,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((i,s)=>{this._resolve=i,this._reject=s,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){const e=this._transferred;return n=>this._updateProgress(e+n)}_shouldDoResumable(e){return e.size()>256*1024}_start(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([n,r])=>{switch(this._state){case"running":e(n,r);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused");break}})}_createResumable(){this._resolveToken((e,n)=>{const r=OEe(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest
vendor: 4,426 bytes, lines 6393-6397
6393(r,Ls,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._uploadUrl=s,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const e=this._uploadUrl;this._resolveToken((n,r)=>{const i=NEe(this._ref.storage,this._ref._location,e,this._blob),s=this._ref.storage._makeRequest(i,Ls,n,r);this._request=s,s.getPromise().then(o=>{o=o,this._request=void 0,this._updateProgress(o.current),this._needToFetchStatus=!1,o.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const e=N2*this._chunkMultiplier,n=new Xv(this._transferred,this._blob.size()),r=this._uploadUrl;this._resolveToken((i,s)=>{let o;try{o=DEe(this._ref._location,this._ref.storage,r,this._blob,e,this._mappings,n,this._makeProgressCallback())}catch(c){this._error=c,this._transition("error");return}const l=this._ref.storage._makeRequest(o,Ls,i,s,!1);this._request=l,l.getPromise().then(c=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(c.current),c.finalized?(this._metadata=c.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){N2*this._chunkMultiplier*2<32*1024*1024&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,n)=>{const r=Y3(this._ref.storage,this._ref._location,this._mappings),i=this._ref.storage._makeRequest(r,Ls,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,n)=>{const r=PEe(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),i=this._ref.storage._makeRequest(r,Ls,e,n);this._request=i,i.getPromise().then(s=>{this._request=void 0,this._metadata=s,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){const n=this._transferred;this._transferred=e,this._transferred!==n&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,this._request!==void 0?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":const n=this._state==="paused";this._state=e,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=F3(),this._state=e,this._notifyObservers();break;case"error":this._state=e,this._notifyObservers();break;case"success":this._state=e,this._notifyObservers();break}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}}get snapshot(){const e=pT(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,n,r,i){const s=new LEe(n||void 0,r||void 0,i||void 0);return this._addObserver(s),()=>{this._removeObserver(s)}}then(e,n){return this._promise.then(e,n)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){const n=this._observers.indexOf(e);n!==-1&&this._observers.splice(n,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(n=>{this._notifyObserver(n)})}_finishPromise(){if(this._resolve!==void 0){let e=!0;switch(pT(this._state)){case Br.SUCCESS:Sc(this._resolve.bind(null,this.snapshot))();break;case Br.CANCELED:case Br.ERROR:const n=this._reject;Sc(n.bind(null,this._error))();break;default:e=!1;break}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(pT(this._state)){case Br.RUNNING:case Br.PAUSED:e.next&&Sc(e.next.bind(e,this.snapshot))();break;case Br.SUCCESS:e.complete&&Sc(e.complete.bind(e))();break;case Br.CANCELED:case Br.ERROR:e.error&&Sc(e.error.bind(e,this._error))();break;default:e.error&&Sc(e.error.bind(e,this._error))()}}resume(){const e=this._state==="paused"||this._state==="pausing";return e&&this._transition("running"),e}pause(){const e=this._state==="running";return e&&this._transition("pausing"),e}cancel(){const e=this._state==="running"||this._state==="pausing";return e&&this._transition("canceling"),e}}/**
6394 * @license
6395 * Copyright 2019 Google LLC
6396 *
6397 * Licensed under the Apache License, Version 2.0 (the "License");
6398 * you may not use this file except in compliance with the License.
6399 * You may obtain a copy of the License at
6400 *
6401 *   http://www.apache.org/licenses/LICENSE-2.0
6402 *
6403 * Unless required by applicable law or agreed to in writing, software
6404 * distributed under the License is distributed on an "AS IS" BASIS,
6405 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6406 * See the License for the specific language governing permissions and
6407 * limitations under the License.
6408 */class wu{constructor(e,n){this._service=e,n instanceof xr?this._location=n:this._location=xr.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new wu(e,n)}get root(){const e=new xr(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return K3(this._location.path)}get storage(){return this._service}get parent(){const e=mEe(this._location.path);if(e===null)return null;const n=new xr(this._location.bucket,e);return new wu(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw j3(e)}}function $Ee(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new X3(t,new yo(e),n)}function UEe(t){const e={prefixes:[],items:[]};return Z3(t,e).then(()=>e)}async function Z3(t,e,n){const i=await e6(t,{pageToken:n});e.prefixes.push(...i.prefixes),e.items.push(...i.items),i.nextPageToken!=null&&await Z3(t,e,i.nextPageToken)}function e6(t,e){e!=null&&typeof e.maxResults=="number"&&rI("options.maxResults",1,1e3,e.maxResults);const n=e||{},r=REe(t.storage,t._location,"/",n.pageToken,n.maxResults);return t.storage.makeRequestWithTokens(r,Ls)}function jEe(t){t._throwIfRoot("getMetadata");const e=Y3(t.storage,t._location,Yw());return t.storage.makeRequestWithTokens(e,Ls)}function BEe(t,e){t._throwIfRoot("updateMetadata");const n=kEe(t.storage,t._location,e,Yw());return t.storage.makeRequestWithTokens(n,Ls)}function zEe(t){t._throwIfRoot("getDownloadURL");const e=xEe(t.storage,t._location,Yw());return t.storage.makeRequestWithTokens(e,Ls).then(n=>{if(n===null)throw Gwe();return n})}function WEe(t){t._throwIfRoot("deleteObject");const e=CEe(t.storage,t._location);return t.storage.makeRequestWithTokens(e,Ls)}function t6(t,e){const n=gEe(t._location.path,e),r=new xr(t._location.bucket,n);return new wu(t.storage,r)}/**
6409 * @license
6410 * Copyright 2017 Google LLC
6411 *
6412 * Licensed under the Apache License, Version 2.0 (the "License");
6413 * you may not use this file except in compliance with the License.
6414 * You may obtain a copy of the License at
6415 *
6416 *   http://www.apache.org/licenses/LICENSE-2.0
6417 *
6418 * Unless required by applicable law or agreed to in writing, software
6419 * distributed under the License is distributed on an "AS IS" BASIS,
6420 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6421 * See the License for the specific language governing permissions and
6422 * limitations under the License.
6423 */function qEe(t){return/^[A-Za-z]+:\/\//.test(t)}function HEe(t,e){return new wu(t,e)}function n6(t,e){if(t instanceof pk){const n=t;if(n._bucket==null)throw qwe();const r=new wu(n,n._bucket);return e!=null?n6(r,e):r}else return e!==void 0?t6(t,e):t}function GEe(t,e){if(e&&qEe(e)){if(t instanceof pk)return HEe(t,e);throw Xc("To use ref(service, url), the first argument must be a Storage instance.")}else return n6(t,e)}function D2(t,e){const n=e?.[L3];return n==null?null:xr.makeFromBucketSpec(n,t)}function KEe(t,e,n,r={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:i}=r;i&&(t._overrideAuthToken=typeof i=="string"?i:Awe(i,t.app.options.projectId))}class pk{constructor(e,n,r,i,s){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=s,this._bucket=null,this._host=M3,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=Mwe,this._maxUploadRetryTime=Lwe,this._requests=new Set,i!=null?this._bucket=xr.makeFromBucketSpec(i,this._host):this._bucket=D2(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=xr.makeFromBucketSpec(this._url,e):this._bucket=D2(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){rI("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){rI("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});
6423return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new wu(this,e)}_makeRequest(e,n,r,i,s=!0){if(this._deleted)return new Qwe(U3());{const o=oEe(e,this._appId,r,i,n,this._firebaseVersion,s);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[r,i]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,i).getPromise()}}const M2="@firebase/storage",L2="0.12.2";/**
6424 * @license
6425 * Copyright 2020 Google LLC
6426 *
6427 * Licensed under the Apache License, Version 2.0 (the "License");
6428 * you may not use this file except in compliance with the License.
6429 * You may obtain a copy of the License at
6430 *
6431 *   http://www.apache.org/licenses/LICENSE-2.0
6432 *
6433 * Unless required by applicable law or agreed to in writing, software
6434 * distributed under the License is distributed on an "AS IS" BASIS,
6435 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6436 * See the License for the specific language governing permissions and
6437 * limitations under the License.
6438 */const QEe="storage";function YEe(t,e,n){return t=ol(t),$Ee(t,e,n)}function JEe(t){return t=ol(t),jEe(t)}function XEe(t,e){return t=ol(t),BEe(t,e)}function ZEe(t,e){return t=ol(t),e6(t,e)}function e0e(t){return t=ol(t),UEe(t)}function t0e(t){return t=ol(t),zEe(t)}function n0e(t){return t=ol(t),WEe(t)}function V2(t,e){return t=ol(t),GEe(t,e)}function r0e(t,e){return t6(t,e)}function i0e(t,e,n,r={}){KEe(t,e,n,r)}function s0e(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new pk(n,r,i,e,Mo)}function o0e(){Kr(new En(QEe,s0e,"PUBLIC").setMultipleInstances(!0)),Pn(M2,L2,""),Pn(M2,L2,"esm2017")}o0e();/**
6439 * @license
6440 * Copyright 2020 Google LLC
6441 *
6442 * Licensed under the Apache License, Version 2.0 (the "License");
6443 * you may not use this file except in compliance with the License.
6444 * You may obtain a copy of the License at
6445 *
6446 *   http://www.apache.org/licenses/LICENSE-2.0
6447 *
6448 * Unless required by applicable law or agreed to in writing, software
6449 * distributed under the License is distributed on an "AS IS" BASIS,
6450 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6451 * See the License for the specific language governing permissions and
6452 * limitations under the License.
6453 */class Ay{constructor(e,n,r){this._delegate=e,this.task=n,this.ref=r}get bytesTransferred(){return this._delegate.bytesTransferred}get metadata(){return this._delegate.metadata}get state(){return this._delegate.state}get totalBytes(){return this._delegate.totalBytes}}/**
6454 * @license
6455 * Copyright 2020 Google LLC
6456 *
6457 * Licensed under the Apache License, Version 2.0 (the "License");
6458 * you may not use this file except in compliance with the License.
6459 * You may obtain a copy of the License at
6460 *
6461 *   http://www.apache.org/licenses/LICENSE-2.0
6462 *
6463 * Unless required by applicable law or agreed to in writing, software
6464 * distributed under the License is distributed on an "AS IS" BASIS,
6465 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6466 * See the License for the specific language governing permissions and
6467 * limitations under the License.
6468 */class F2{constructor(e,n){this._delegate=e,this._ref=n,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}get snapshot(){return new Ay(this._delegate.snapshot,this,this._ref)}then(e,n){return this._delegate.then(r=>{if(e)return e(new Ay(r,this,this._ref))},n)}on(e,n,r,i){let s;return n&&(typeof n=="function"?s=o=>n(new Ay(o,this,this._ref)):s={next:n.next?o=>n.next(new Ay(o,this,this._ref)):void 0,complete:n.complete||void 0,error:n.error||void 0}),this._delegate.on(e,s,r||void 0,i||void 0)}}class $2{constructor(e,n){this._delegate=e,this._service=n}get prefixes(){return this._delegate.prefixes.map(e=>new Ro(e,this._service))}get items(){return this._delegate.items.map(e=>new Ro(e,this._service))}get nextPageToken(){return this._delegate.nextPageToken||null}}/**
6469 * @license
6470 * Copyright 2020 Google LLC
6471 *
6472 * Licensed under the Apache License, Version 2.0 (the "License");
6473 * you may not use this file except in compliance with the License.
6474 * You may obtain a copy of the License at
6475 *
6476 *  http://www.apache.org/licenses/LICENSE-2.0
6477 *
6478 * Unless required by applicable law or agreed to in writing, software
6479 * distributed under the License is distributed on an "AS IS" BASIS,
6480 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6481 * See the License for the specific language governing permissions and
6482 * limitations under the License.
6483 */class Ro{constructor(e,n){this._delegate=e,this.storage=n}get name(){return this._delegate.name}get bucket(){return this._delegate.bucket}get fullPath(){return this._delegate.fullPath}toString(){return this._delegate.toString()}child(e){const n=r0e(this._delegate,e);return new Ro(n,this.storage)}get root(){return new Ro(this._delegate.root,this.storage)}get parent(){const e=this._delegate.parent;return e==null?null:new Ro(e,this.storage)}put(e,n){return this._throwIfRoot("put"),new F2(YEe(this._delegate,e,n),this)}putString(e,n=qi.RAW,r){this._throwIfRoot("putString");const i=W3(n,e),s=Object.assign({},r);return s.contentType==null&&i.contentType!=null&&(s.contentType=i.contentType),new F2(new X3(this._delegate,new yo(i.data,!0),s),this)}listAll(){return e0e(this._delegate).then(e=>new $2(e,this.storage))}list(e){return ZEe(this._delegate,e||void 0).then(n=>new $2(n,this.storage))}getMetadata(){return JEe(this._delegate)}updateMetadata(e){return XEe(this._delegate,e)}getDownloadURL(){return t0e(this._delegate)}delete(){return this._throwIfRoot("delete"),n0e(this._delegate)}_throwIfRoot(e){if(this._delegate._location.path==="")throw j3(e)}}/**
6484 * @license
6485 * Copyright 2020 Google LLC
6486 *
6487 * Licensed under the Apache License, Version 2.0 (the "License");
6488 * you may not use this file except in compliance with the License.
6489 * You may obtain a copy of the License at
6490 *
6491 *   http://www.apache.org/licenses/LICENSE-2.0
6492 *
6493 * Unless required by applicable law or agreed to in writing, software
6494 * distributed under the License is distributed on an "AS IS" BASIS,
6495 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6496 * See the License for the specific language governing permissions and
6497 * limitations under the License.
6498 */class r6{constructor(e,n){this.app=e,this._delegate=n}get maxOperationRetryTime(){return this._delegate.maxOperationRetryTime}get maxUploadRetryTime(){return this._delegate.maxUploadRetryTime}ref(e){if(U2(e))throw Xc("ref() expected a child path but got a URL, use refFromURL instead.");return new Ro(V2(this._delegate,e),this)}refFromURL(e){if(!U2(e))throw Xc("refFromURL() expected a full URL but got a child path, use ref() instead.");try{xr.makeFromUrl(e,this._delegate.host)}catch{throw Xc("refFromUrl() expected a valid full URL but got an invalid one.")}return new Ro(V2(this._delegate,e),this)}setMaxUploadRetryTime(e){this._delegate.maxUploadRetryTime=e}setMaxOperationRetryTime(e){this._delegate.maxOperationRetryTime=e}useEmulator(e,n,r={}){i0e(this._delegate,e,n,r)}}function U2(t){return/^[A-Za-z]+:\/\//.test(t)}const a0e="@firebase/storage-compat",l0e="0.3.5";/**
6499 * @license
6500 * Copyright 2020 Google LLC
6501 *
6502 * Licensed under the Apache License, Version 2.0 (the "License");
6503 * you may not use this file except in compliance with the License.
6504 * You may obtain a copy of the License at
6505 *
6506 *   http://www.apache.org/licenses/LICENSE-2.0
6507 *
6508 * Unless required by applicable law or agreed to in writing, software
6509 * distributed under the License is distributed on an "AS IS" BASIS,
6510 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6511 * See the License for the specific language governing permissions and
6512 * limitations under the License.
6513 */const u0e="storage-compat";function c0e(t,{instanceIdentifier:e}){const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("storage").getImmediate({identifier:e});return new r6(n,r)}function d0e(t){const e={TaskState:Br,TaskEvent:MEe,StringFormat:qi,Storage:r6,Reference:Ro};t.INTERNAL.registerComponent(new En(u0e,c0e,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion(a0e,l0e)}d0e(Kt);const nxe=!1,mk={apiKey:"AIzaSyB8rnYLOfE0H_OuhYQulmW7hbUQE4wPVVM",authDomain:"openfeedback.io",databaseURL:"https://open-feedback-42.firebaseio.com",projectId:"open-feedback-42",storageBucket:"open-feedback-42.appspot.com",appId:"1:635903227116:web:7978ecfc172bfad5b1e1c9",measurementId:"G-B6BZNN36JR"},gk=Kt.initializeApp(mk),rxe=Kt.auth,Vh=gk.auth(),gs=gk.firestore(),eo=mk.measurementId?gk.analytics():null,vi=Kt.firestore.FieldValue.serverTimestamp,Py=Kt.firestore.Timestamp.now,ixe=Kt.firestore.FieldValue.delete,sxe=Kt.firestore.FieldValue.arrayRemove,oxe=Kt.firestore.FieldValue.arrayUnion,f0e={alert:Kt.functions().httpsCallable("alert"),deleteProject:Kt.functions().httpsCallable("deleteProject")},axe={sendContactEmail:`https://us-central1-${mk.projectId}.cloudfunctions.net/sendContactEmail`};Vh.useDeviceLanguage();Kt.performance();const lxe=async t=>{const e=t.bucket,n=t.fullPath;return`https://storage.googleapis.com/${e}/${n}`};class h0e{constructor(e){this.config=e,!(Kt.apps.filter(n=>n.name===this.config.projectId).length>0)&&Kt.initializeApp(this.config,this.config.projectId)}getFirestore(){return Kt.app(this.config.projectId).firestore()}getTalks(){const e=this.getFirestore(),n=e.collection("schedule").get(),r=e.collection("sessions").get();return Promise.all([n,r]).then(([i,s])=>{let o={},l=[];
6513return s.forEach(c=>{o[c.id]={...c.data(),id:c.id}}),i.forEach(c=>{l.push(c.data())}),JO(o,l)})}getTalk(e){const n=this.getFirestore(),r=n.collection("schedule").get(),i=n.collection("sessions").doc(e).get();return Promise.all([r,i]).then(([s,o])=>{let l={},c=[];return l[e]={...o.data(),id:o.id},s.forEach(d=>{c.push(d.data())}),JO(l,c)})}getSpeakers(){return this.getFirestore().collection("speakers").get().then(e=>{let n={};return e.forEach(r=>{n[r.id]=r.data(),n[r.id].id=r.id}),n})}isReadOnly(){return!0}}class p0e{constructor(e){e.jsonUrl!==this.jsonUrl&&(this.jsonUrl=e.jsonUrl,this.data=null)}getJsonData(){return this.data?Promise.resolve(this.data):fetch(this.jsonUrl).then(async e=>{if(e.ok){if(this.data=await e.json(),this.data.sessions){let n="";Object.values(this.data.sessions).forEach(r=>{n=""+r.id,this.data.sessions[n]={...r,id:n},this.data.sessions[n].speakers&&Array.isArray(this.data.sessions[n].speakers)&&(this.data.sessions[n].speakers=this.data.sessions[n].speakers.filter(i=>ZO(i))),this.data.sessions[n].tags&&Array.isArray(this.data.sessions[n].tags)&&(this.data.sessions[n].tags=this.data.sessions[n].tags.filter(i=>ZO(i)))})}return this.data}else throw new Error("Something went wrong when loading the data. "+JSON.stringify(e))})}getTalks(){return this.getJsonData().then(e=>e.sessions)}getTalk(e){return this.getJsonData().then(n=>({[e]:n.sessions[e]}))}getSpeakers(){return this.getJsonData().then(e=>e.speakers)}isReadOnly(){return!0}}const j2=t=>{const e={};return t.forEach(n=>{e[n.id]={...n.data(),id:n.id}}),e};class m0e{constructor(e){this.projectId=e}firestoreProject(){return gs.collection("projects").doc(this.projectId)}getTalks(){return this.firestoreProject().collection("talks").get().then(e=>j2(e))}getTalk(e){return this.firestoreProject().collection("talks").doc(e).get().then(n=>({[n.id]:{id:n.id,...n.data()}}))}getSpeakers(){return this.firestoreProject().collection("speakers").get().then(e=>j2(e))}addTalk(e){return this.firestoreProject().collection("talks").add({...e,createdAt:vi(),updatedAt:vi()}).then(n=>n.id)}removeTalk(e){return this.firestoreProject().collection("talks").doc(e).delete()}editTalk(e){return this.firestoreProject().collection("talks").doc(e.id).set({...e,updatedAt:vi()},{merge:!0})}addSpeaker(e){return this.firestoreProject().collection("speakers").add({...e,createdAt:vi(),updatedAt:vi()}).then(n=>n.id)}removeSpeaker(e){return this.firestoreProject().collection("speakers").doc(e).delete()}editSpeaker(e){return this.firestoreProject().collection("speakers").doc(e.id).set({...e,updatedAt:vi()},{merge:!0})}isReadOnly(){return!1}}const g0e="hoverboardv2",y0e="jsonurl",v0e="openfeedbackv1",_0e={getTalks(){ks()},getTalk(t){ks()},addTalk(t){ks()},removeTalk(t){ks()},editTalk(t){ks()},getSpeakers(){ks()},addSpeaker(t){ks()},removeSpeaker(t){ks()},editSpeaker(t){ks()},isReadOnly(){ks()}};let io=_0e;const w0e=(t,e)=>{switch(t){case g0e:return new h0e(e.config);case y0e:return new p0e(e.config);case v0e:return new m0e(e.id);default:return null}},E0e=(t,e)=>{io=w0e(t,e)},ks=()=>{console.warn("The project is not initialized yet.")},S0e=t=>e=>gs.collection("projects").doc(t).get().then(n=>{if(n.exists){const r=n.data();r.id=t,r.voteItems=I0e(r.voteItems,navigator.language||navigator.userLanguage),E0e(r.setupType,r),e({type:NF,payload:r})}else e({type:ZT,payload:"Unknown project id, probably some copy-past issue?"})}).catch(n=>{e({type:ZT,payload:n.toString()})}),T0e=t=>({type:LF,payload:{date:t}}),b0e=t=>(e,n)=>{const r=s=>{const o=s.data(),l=o?Object.keys(o).reduce((d,h)=>(Object.keys(o[h]).length===0?d[h]=o[h]:d[h]={...Object.keys(o[h]).reduce((m,g)=>(m[g]={...o[h][g],id:g},m),{})},d),{}):{},c={id:s.id,...l};e({type:DF,payload:c})},i=s=>{e({type:MF,payload:s})};if(W9(n()))return gs.collection("projects").doc(On(n()).id).collection("sessionVotes").doc(t).onSnapshot(s=>r(s),i);gs.collection("projects").doc(On(n()).id).collection("sessionVotes").doc(t).get().then(r).catch(i)},I0e=(t,e)=>{if(!t)return[];if(!e||t.length===0)return t;const n=e,r=e.split("-")[0];return t.map(i=>{if(!i.languages||i.languages.length===0)return i;if(i.languages[n])return{...i,name:i.languages[n]};const s=Object.keys(i.languages).filter(o=>{const l=o.split("-")[0];return l&&l===r});return s.length>0&&i.languages[s[0]]?{...i,name:i.languages[s[0]]}:{...i,name:i.name||""}})}
6513,iI="login/success",i6="login/error",s6="logout",o6=t=>{f0e.alert(t).then(e=>console.info("Alert triggered",e)).catch(e=>console.warn("Alert failed",e))},R0e={message:"Firebase Authentification Quota Reached",alias:"firebase-authentification-quota-reached",description:"Authentification quota has been reached, user no longer can vote or create accounts",tags:["OverwriteQuietHours","Critical","firebase"],priority:"P1"},x0e=(t,e)=>({message:"React error catched",alias:"react-error-catch-"+iR(String(t)+JSON.stringify(e)+window.location.href),description:"An error occurred in javascript catched by React DidCatch.",details:{error:String(t),stack:JSON.stringify(e),origin:window.origin,location:window.location},tags:["react"],priority:"P5"}),k0e=(t,e)=>({message:"Feedback App: React error catched",alias:"feedback-react-error-catch-"+iR(String(t)+JSON.stringify(e)+window.location.href),description:"An error occurred in javascript catched by React DidCatch.",details:{error:String(t),stack:JSON.stringify(e),origin:window.origin,location:window.location},tags:["react"],priority:"P2"}),C0e=(t,e)=>({message:"Root/Landing App: React error catched",alias:"landing-react-error-catch-"+iR(String(t)+JSON.stringify(e)+window.location.href),description:"An error occurred in javascript catched by React DidCatch.",details:{error:String(t),stack:JSON.stringify(e),origin:window.origin,location:window.location},tags:["react"],priority:"P2"}),uxe=t=>{eo&&eo.setUserId(t)},A0e=t=>{eo&&eo.logEvent("login",{method:t?"anonymous":"account"})},cxe=t=>{eo&&eo.logEvent("sign_up",{method:"account"})},P0e=()=>(t,e)=>{kV(e())||(Vh.onAuthStateChanged(n=>{n?(t({type:iI,payload:n}),A0e(!0)):t({type:s6})}),Vh.currentUser?t({type:iI,payload:Vh.currentUser}):Vh.signInAnonymously().catch(n=>{n.code==="auth/too-many-requests"&&o6(R0e),t({type:i6,payload:n})}))},yk="vote/add/beforeSuccess",Zw="vote/add/success",Nu="vote/add/error",vk="vote/remove/success",_k="vote/remove/beforeSuccess",a6="vote/getUserVote/success",l6="vote/getUserVote/error",u6="vote/delete/postError",c6="vote/delete/loadError",d6="vote/update/success",f6="vote/update/error",h6=t=>t.talk,eE=t=>h6(t).selected,O0e=t=>h6(t).errorTalkLoad,p6=Xn(AF,eE,(t,e)=>t[e]),N0e=Xn(p6,z_,(t,e)=>!t||!t.speakers?[]:Object.values(e).filter(n=>t.speakers.includes(n.id))),tE="active",wk="deleted",Ek="hidden",m6="boolean",Sk="text",Tk="textPlus",D0e="title",M0e="separator",bk=t=>t.votes,Fm=t=>bk(t).currentUserVotes,L0e=t=>bk(t).errorVotePost,V0e=t=>bk(t).errorVotesLoad,g6=Xn(Fm,eE,(t,e)=>{const n={};return Object.values(t).filter(r=>r.talkId===e).forEach(r=>{n[r.voteItemId]||(n[r.voteItemId]=[]),n[r.voteItemId].push(r)}),n}),F0e=Xn(Fm,(t,e)=>e,(t,e)=>{const n={};return Object.values(t).filter(r=>r.talkId===e&&(r.status===tE||r.status===Ek)).forEach(r=>{n[r.voteItemId]||(n[r.voteItemId]=[]),n[r.voteItemId].push(r)}),n}),$0e=Xn(Fm,t=>{const e={};return Object.values(t).forEach(n=>{e[n.talkId]=n}),e}),y6=(t,e,n)=>{eo&&eo.logEvent("vote",{project_name:t,project_id:e,voteType:n})},v6=(t,e)=>{eo&&eo.logEvent("unvote",{project_name:t,project_id:e})},_6=(t,e,n,r=null)=>{const i=g6(n())[t.id],s=o=>o.pending?(console.info("Unable to modify a vote that has not been written on the database"),!0):!1;if(i&&i.length>0)if(r){const o=i.find(l=>l.text&&l.voteType!==Tk);if(o&&!s(o))return[o.id,o]}else{const o=i.find(l=>!l.text);if(o&&!s(o))return[o.id,o]}return[gs.collection("projects").doc(e).collection("userVotes").doc().id]},U0e=(t,e,n)=>{const r=On(e),[i,s,o]=w6(r.voteStartTime,r.voteEndTime);return i?!1:(t({type:Nu,payload:{error:n(s)+(o?` ${o}`:"")}}),!0)},w6=(t,e)=>{const n=new Date().getTime();return e&&Date.parse(e)<n?[!1,"vote.rangePassed"]:t&&n<Date.parse(t)?[!1,"vote.rangeNotReached",new Date(t).toLocaleString()]:[!0]},$m=(t,e,n)=>U0e(t,e(),n)?!1:(im(e()).isAnonymous||t({type:Nu,payload:{error:n("vote.adminNotAnonymous")}}),!0),j0e=(t,e,n,r)=>(i,s)=>{if(!$m(i,s,r))return;const o=On(s()),l=o.id,[c,d]=_6(e,l,s,n),h={projectId:l,talkId:t,voteItemId:e.id,id:c,createdAt:d?d.createdAt:vi(),updatedAt:vi(),userId:im(s()).uid,status:tE};e.type===Sk&&(h.text=n.trim(),h.text.length===0)||(i({type:yk,payload:{[h.id]:{...h,pending:!0}}}),i({type:Qs,payload:{vote:h,amount:1}}),gs.collection("projects").doc(l).collection("userVotes").doc(c).set(h,{merge:!0}).then(()=>{i({type:Zw,payload:{voteId:c}}),y6(o.name,l,e.type)}).catch(m=>{i({type:Nu,payload:{error:`Unable to save the vote, ${m}`,voteId:h.id}}),i({type:Qs,payload:{vote:h,amount:-1}})}))},B2=(t,e)=>(n,r)=>{if(Fm(r())[t.id].pending){console.info("Unable to delete vote as it has not been writed on the database");return}if(!$m(n,r,e))return;const i=On(r());n({type:_k,payload:t}),n({type:Qs,payload:{vote:t,amount:-1}}),gs.collection("projects").doc(On(r()).id).collection("userVotes").doc(t.id).set({status:wk,updatedAt:vi()},{merge:!0}).then(()=>{n({type:vk,payload:t}),v6(i.name,i.id)}).catch(s=>{n({type:Nu,payload:{error:`Unable to save the vote, ${s}`,voteWhichShouldHaveBeenDeleted:t}}),n({type:Qs,payload:{vote:t,amount:1}})})},B0e=(t,e,n)=>(r,i)=>{!$m(r,i,n)||e.trim().length===0||(r({type:Qs,payload:{vote:{...t,text:e.trim()}}}),gs.collection("projects").doc(On(i()).id).collection("userVotes").doc(t.id).update({text:e,updatedAt:vi()}).then(()=>{r({type:d6,payload:{vote:{[t.id]:{...t,text:e}}}})}).catch(s=>{r({type:f6,payload:{error:s.toString(),voteId:t.id}})}))},E6=()=>(t,e)=>{gs.collection("projects").doc(On(e()).id).collection("userVotes").where("userId","==",im(e()).uid).get().then(n=>{const r={};
6513n.forEach(i=>{r[i.id]=i.data(),r[i.id].id=i.id}),t({type:a6,payload:r})}).catch(n=>{t({type:l6,payload:n})})},z0e=()=>({type:u6}),z2=()=>({type:c6});var hh={},W2;function W0e(){if(W2)return hh;W2=1;var t=ys();Object.defineProperty(hh,"__esModule",{value:!0}),hh.default=void 0;var e=t(Do()),n=to();return hh.default=(0,e.default)((0,n.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),hh}var q0e=W0e();const H0e=Pr(q0e),S6="core/talks/get/success",T6="core/talks/get/loading",b6="core/talks/get/error",Ik="core/talks/filter",I6="core/talk/add/success",R6="core/talk/add/error",x6="core/talk/edit/success",k6="core/talk/edit/error",C6="core/talk/remove/success",A6="core/talk/remove/error",P6="admin/notification/add",O6="admin/notification/setCurrent",N6="admin/notification/open",G0e=t=>t.admin,Rk=t=>G0e(t).adminNotifications,K0e=t=>Rk(t).notifications,dxe=t=>Rk(t).current,Q0e=t=>Rk(t).isOpen,tf=t=>(e,n)=>{e({type:P6,payload:{...t,key:new Date().getTime()}}),Q0e(n())?e(D6(!1)):e(Y0e())},Y0e=()=>(t,e)=>{const n=K0e(e());n.length>0&&(t({type:O6,payload:n[0]}),t(D6(!0)))},D6=t=>({type:N6,payload:t}),J0e=()=>t=>(t({type:T6}),io.getTalks().then(e=>(t({type:S6,payload:e}),e)).catch(e=>{t({type:b6,payload:e.toString()})})),X0e=t=>e=>{e({type:Ik,payload:t})},fxe=t=>e=>io.addTalk(t).then(n=>{e({type:I6,payload:{...t,id:n}})}).catch(n=>{e({type:R6,payload:{error:n}}),e(tf({type:"error",message:`Failed to add talk, ${n}`}))}),hxe=t=>e=>io.editTalk(t).then(()=>{e({type:x6,payload:t})}).catch(n=>{e({type:k6,payload:{error:n}}),e(tf({type:"error",message:`Failed to edit talk, ${n}`}))}),pxe=t=>e=>io.removeTalk(t.id).then(()=>{e({type:C6,payload:t})}).catch(n=>{e({type:A6,payload:{error:n}}),e(tf({type:"error",message:`Failed to remove talk, ${n}`}))}),Z0e=Dr(t=>({container:{backgroundColor:t.palette.mode==="dark"?t.palette.background.paper:ir[100]},wrapper:{width:"100%",marginLeft:"auto",marginRight:"auto",[t.breakpoints.up("md")]:{width:900}},input:{height:55,[t.breakpoints.down("lg")]:{paddingLeft:10,paddingRight:10}}})),eSe=()=>{const{t}=pr(),e=Or(),n=Z0e(),r=Eu();return A.jsx("div",{className:n.container,children:A.jsx("div",{className:n.wrapper,children:A.jsx(D_,{className:n.input,placeholder:t("searchPlaceholder"),fullWidth:!0,onChange:i=>r(X0e(i.target.value)),startAdornment:A.jsx(UJ,{position:"start",children:A.jsx(H0e,{style:{color:e.palette.text.secondary}})})})})})};var ph={},q2;function tSe(){if(q2)return ph;q2=1;var t=ys();Object.defineProperty(ph,"__esModule",{value:!0}),ph.default=void 0;var e=t(Do()),n=to();return ph.default=(0,e.default)((0,n.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),ph}var nSe=tSe();const rSe=Pr(nSe);var mh={},H2;function iSe(){if(H2)return mh;H2=1;var t=ys();Object.defineProperty(mh,"__esModule",{value:!0}),mh.default=void 0;var e=t(Do()),n=to();return mh.default=(0,e.default)((0,n.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),mh}var sSe=iSe();const oSe=Pr(sSe),aSe=()=>{try{return window.self!==window.top}catch{return!0}},nE=()=>new URLSearchParams(Ya().search),lSe=Dr(t=>({logo:{marginRight:20,maxHeight:60,maxWidth:200},iconLeft:{minWidth:28,position:"absolute",top:0,"& a":{padding:18,dis
6513play:"block",transition:"background-color 200ms","&:hover":{backgroundColor:Gl(t.palette.pageBackground,.2)}},"& svg":{color:t.palette.textDimmed}},iconRight:{minWidth:28,position:"absolute",right:20,display:"flex",gap:10,alignItems:"center","& svg":{color:ir[600]},"& a":{padding:8},"& > *:hover":{backgroundColor:Gl(t.palette.pageBackground,.2)},"& > *":{borderRadius:10,"&:hover":{backgroundColor:Gl(t.palette.pageBackground,.2)}}},boxCenter:{width:"100%",marginLeft:"auto",marginRight:"auto",justifyContent:"center",alignItems:"center",display:"flex",[t.breakpoints.up("md")]:{justifyContent:"flex-start",width:900}},container:{backgroundColor:t.palette.pageBackground,top:0,left:"auto",right:0,position:e=>e.inIFrame?"relative":"sticky",zIndex:3,boxShadow:e=>e.inIFrame?"none":`0px 1px 15px ${t.palette.headerShadow}`,marginBottom:20},header:{height:65,display:"flex",alignItems:"center"}})),uSe=({project:t})=>{const e=lSe({inIFrame:aSe()}),{t:n}=pr(),r=i_(),i=nE().get("hideHeader");return i&&i==="true"?null:A.jsxs("header",{className:e.container,children:[A.jsxs("div",{className:e.header,children:[A.jsx("div",{className:e.iconLeft,children:r.talkId&&A.jsx(o_,{title:n("talks.list"),to:`/${r.projectId}/${r.date}`,children:A.jsx(rSe,{color:"primary"})})}),A.jsx("div",{className:e.iconRight,children:t.scheduleLink&&A.jsx("a",{href:t.scheduleLink,target:"_blank",title:`${t.name} website`,rel:"noopener noreferrer",children:A.jsx(oSe,{})})}),A.jsxs("div",{className:e.boxCenter,children:[A.jsx("img",{className:e.logo,src:t.logoSmall,alt:`logo ${t.name}`}),A.jsx(AJ,{lgDown:!0,children:A.jsx(Nr,{variant:"h1",color:"textPrimary","aria-label":t.hideEventName&&t.name,children:!t.hideEventName&&t.name})})]})]}),!r.talkId&&A.jsx(eSe,{})]})},cSe=_e("main")(({theme:t})=>({marginLeft:0,marginRight:0,width:"100%",boxSizing:"border-box",[t.breakpoints.up(900)]:{width:900,marginLeft:"auto",marginRight:"auto"},[t.breakpoints.down("lg")]:{paddingLeft:t.spacing(2),paddingRight:t.spacing(2)}})),mT=({children:t})=>{const e=Or(),n=Eu(),r=r_(),i=i_(),{t:s}=pr(),o=st(On),l=st(OF),c=st($9),d=st(U9),h=st(j9),m=st(one),g=st(kV);return T.useEffect(()=>{g&&o&&n(E6())},[n,g,o]),T.useEffect(()=>{o?(document.title=o.name+" - Feedback",I9(o.favicon),n(P0e())):n(S0e(i.projectId))},[i.projectId,o,n]),T.useEffect(()=>{const{date:v,projectId:E}=i;!v&&l.length>0&&!l.includes(ld)&&r(`/${E}/${l[0]}`)},[i,l,r]),m?A.jsx(qh,{error:s("auth.errorLogin"),errorDetail:s(m)}):c?A.jsx(qh,{error:s("project.errorLoad"),errorDetail:c}):d?A.jsx(yie,{to:"/404"}):h?A.jsx(qh,{error:s("project.errorLoadVotes"),errorDetail:h}
6513):A.jsxs(An,{backgroundColor:e.palette.pageBackground,minHeight:"100vh",display:"flex",flexDirection:"column",children:[o?A.jsxs(An,{flex:1,children:[A.jsx(uSe,{project:o}),A.jsxs(cSe,{children:[" ",t]})]}):A.jsx(Dd,{height:"90vh"}),A.jsx(une,{})]})},Id={RED_ORANGE:"rgb(255,86,49)",DARK_RED_ORANGE:"#a95543",LIGHT_RED_ORANGE:"#ffc1ad",DARK_GRAY:"#292929",GRAY:"#8A8A8A",LIGHT_GRAY:"#B3B3B3",WHITE:"#FFFFFF",ADMIN_BACKGROUND:"#292929",ADMIN_BACKGROUND_LIGHT:"#F5F5F5"},M6=Dr(()=>({a:{padding:10,color:"inherit",display:"block"},blank:{padding:10,fontSize:25,lineHeight:"0.6em"}})),dSe={weekday:"long",day:"numeric"},fSe={weekday:"long",day:"numeric",month:"long"},hSe=({date:t,url:e,isSelected:n,noDateLabel:r,displayFullDates:i})=>{const s=Or(),{t:o}=pr(),l=M6({isSelected:n}),d=(h=>h!==ld?i?Ae.fromISO(h).toLocaleString(fSe):Ae.fromISO(h).toLocaleString(dSe):r)(t);return A.jsx(An,{sx:{transition:"all 120ms ease-in-out",color:n?s.palette.text.primary:s.palette.text.secondary,borderBottom:`2px ${n?Id.RED_ORANGE:s.palette.pageBackgroun
6513d} solid`,"&:hover":{color:Id.RED_ORANGE}},children:A.jsx(o_,{to:`${e}`,className:l.a,title:o("talks.date")+d,children:d})})},pSe=({children:t})=>{const e=M6();return A.jsx(Nr,{className:e.blank,children:t})},mSe=Dr({menu:{display:"flex",flexWrap:"wrap",justifyContent:"center",marginBottom:16}}),gSe=()=>{const{t}=pr(),e=st(OF),n=st(Gp),r=st($M),i=st(UM),{items:s}=UX({count:e.length,page:e.indexOf(n)+1,boundaryCount:2,hideNextButton:!0,hidePrevButton:!0}),o=mSe();return e.length===1&&e.includes(ld)?"":A.jsx(A.Fragment,{children:A.jsx("ul",{className:o.menu,children:s.map(({page:l,type:c,selected:d},h)=>{let m=null;const g=l-1;if(c==="start-ellipsis"||c==="end-ellipsis")m=A.jsx(pSe,{isSelected:!1,children:"…"},"...");else if(c==="page"){const v=e[g];m=A.jsx(hSe,{date:v,url:`/${r}/${v===ld?"":v}`,noDateLabel:t("talks.menuNoDate"),isSelected:d,displayFullDates:i},v)}return A.jsx("li",{children:m},h)})})})},L6="talk/get/success",V6="talk/get/error",F6="talk/setSelected",ySe=t=>e=>{io.getTalk(t).then(n=>{e({type:L6,payload:n})}).catch(n=>{e({type:V6,payload:n.toString()})})},xk=t=>e=>{e({type:F6,payload:t}),e({type:Ik,payload:""})},vSe=Dr(t=>({speaker:{display:"flex",alignItems:"center",marginRight:"18px",paddingRight:12,transition:"all 200ms",marginTop:e=>e.isSmall?-4:1,"&:hover":{textDecoration:"none",boxShadow:e=>e.isLinkable?`0 0 3px ${t.palette.headerShadow}`:"none",borderRadius:"20px 4px 4px 20px"}},avatar:{marginRight:"13px"},smallAvatar:{height:"20px",width:"20px"},mediumAvatar:{height:"40px",width:"40px"},smallText:{fontSize:"12px",opacity:.7,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical"},mediumText:{fontSize:"15px",opacity:.7}})),_Se=({name:t,photoUrl:e,socialProfil:n,size:r})=>{const{t:i}=pr(),s=r===$6,o=!s&&n,l=vSe({isLinkable:o,isSmall:s}),c=o?{component:eV,href:n,target:"_blank",title:n}:{component:"div"};return A.jsxs(An,{className:l.speaker,...c,children:[A.jsx(VQ,{src:e,alt:`${i("speakerAvatar")} ${t}`,className:l.avatar+" "+l[r+"Avatar"]}),A.jsx(Nr,{color:"textPrimary",className:l[r+"Text"],children:t})]})},wSe=Dr(()=>({speakers:{display:"flex",alignItems:"center",flexWrap:"wrap",maxHeight:t=>t.isSmall?58:"none"},exceeding:{fontSize:"12px"}})),ESe=3,$6="small",SSe="medium",U6=({speakers:t,size:e=SSe})=>{const n=e===$6,r=wSe({isSmall:n}),{t:i}=pr(),s=n?t.slice(0,ESe):t,o=t.length-s.length,l=o>1?i("speakers"):i("speaker");return A.jsxs("div",{className:r.speakers,children:[s.map((c,d)=>A.jsx(_Se,{...c,size:e},d)),o>0&&A.jsxs(Nr,{className:r.exceeding,children:["+ ",o," ",l]})]})},TSe=Dr(t=>({itemContainer:{margin:-1},paper:{padding:t.spacing(2),textAlign:"center",fontSize:"17px",boxShadow:"none",borderRadius:"0",backgroundColor:t.palette.background.default,color:t.palette.text.secondary,border:"1px solid "+t.palette.grey[300],height:"150px",boxSizing:"border-box","&:hover":{backgroundColor:t.palette.mode==="dark"?I_(t.palette.background.default,.2):Gl(t.palette.background.default,.05),cursor:"pointer"},display:"flex",flexDirection:"column",justifyContent:"space-between",transition:"all 200ms ease-out"},paperSelected:{opacity:.5},talkTitle:{wordBreak:"break-word",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical"},a:{display:"block"}})),kk=({talk:t,userVote:e})=>{const n=TSe(),{t:r}=pr(),i=st(z_),s=st($M),o=`${n.paper} ${e?n.paperSelected:""}`,l=t.speakers&&t.speakers.map(d=>i[d]),c=B_(t.startTime);return A.jsx(Xa,{item:!0,xs:12,sm:6,md:4,className:`${n.itemContainer} talk`,children:A.jsx(o_,{to:`/${s}/${c}/${t.id}`,title:r("talks.vote")+t.title,className:n.a,children:A.jsxs(Tu,{className:o,children:[A.jsx(Nr,{color:"textPrimary",className:n.talkTitle,children:t.title}),l&&A.jsx(U6,{speakers:l,size:"small"})]})})})};kk.propTypes={talk:Pc.object.isRequired,userVote:Pc.object};const bSe=Dr(()=>({track:{marginTop:40,marginBottom:30}})),ISe=({talks:t,userTalkVote:e})=>{const n=Eu(),r=bSe();return t.map((i,s)=>A.jsxs("div",{children:[A.jsx(Nr,{color:"textPrimary",component:"h2",variant:"h3",className:r.track,
6513children:i.track}),A.jsx(Xa,{container:!0,spacing:2,children:i.talks.map((o,l)=>A.jsx(kk,{talk:o,userVote:e[o.id],onClick:c=>n(xk(c.id))},l))})]},s))},RSe="speaker/get/success",xSe="speaker/get/error",j6="speakers/get/success",B6="speakers/get/error",z6="speakers/filter",W6="speaker/add/success",q6="speaker/add/error",H6="speaker/edit/success",G6="speaker/edit/error",K6="speaker/remove/success",Q6="speaker/remove/error",Y6=()=>t=>io.getSpeakers().then(e=>{t({type:j6,payload:e})}).catch(e=>{t({type:B6,payload:e})}),mxe=t=>e=>e({type:z6,payload:t}),gxe=t=>e=>io.addSpeaker(t).then(n=>{const r={...t,id:n};return e({type:W6,payload:r}),r}).catch(n=>{e({type:q6,payload:{error:n}}),e(tf({type:"error",message:`Failed to add speaker, ${n}`}))}),yxe=t=>e=>io.editSpeaker(t).then(()=>{e({type:H6,payload:t})}).catch(n=>{e({type:G6,payload:{error:n}}),e(tf({type:"error",message:`Failed to edit speaker, ${n}`}))}),vxe=t=>e=>io.removeSpeaker(t.id).then(()=>{e({type:K6,payload:t})}).catch(n=>{e({type:Q6,payload:{error:n}}),e(tf({type:"error",message:`Failed to remove speaker, ${n}`}))}),kSe=({otherMatch:t})=>{const{t:e}=pr(),n=st(Gp);return A.jsxs(Nr,{color:"textPrimary",children:[e(t?"searchNoMatch":"searchNoMatchAtAll")," ",t&&Ae.fromISO(n,{setZone:!0}).toLocaleString({weekday:"long",month:"long",day:"numeric"})+"."]})},CSe=Dr(t=>({container:{padding:16,borderRadius:4,marginTop:32,backgroundColor:t.palette.mode==="dark"?t.palette.background.paper:ir[100]},talks:{transform:"scale(0.9)"}})),ASe=({talks:t,userTalkVote:e})=>{const n=CSe(),{t:r}=pr(),i=Eu();return t.length===0?null:A.jsxs(An,{className:n.container,children:[A.jsx(Nr,{color:"textPrimary",children:r("searchExtendedMatch")}),A.jsx(Xa,{container:!0,spacing:2,className:n.talks,children:t.map((s,o)=>A.jsx(kk,{talk:s,userVote:e[s.id],onClick:l=>i(xk(l.id))},o))})]})},G2=()=>{const t=Eu(),e=i_(),n=r_(),r=st(On),i=st(hie),s=st(cm),o=st(mie),l=st(pie),c=st(PF),d=st($0e),h=st(gie),m=st(Gp);if(T.useEffect(()=>{t(J0e()),t(Y6())},[t]),T.useEffect(()=>{t(T0e(e.date||ld))},[e.date,t]),T.useEffect(()=>{s&&s.length===1&&!l&&r&&!r.disableSoloTalkRedirect&&m&&n(`/${r.id}/${m}/${s[0].id}`)},[s,r,history,m,l]),i)return A.jsx(qh,{error:"Unable to load the talks. This is bad.",errorDetail:i});if(l&&(!o||o.length<1))return A.jsx(Dd,{});const g=!l&&o.length===0;return A.jsxs("div",{children:[A.jsx(gSe,{}),o.length>0&&A.jsx(ISe,{talks:o,userTalkVote:d}),g&&A.jsx(kSe,{otherMatch:h.length>0}),c&&A.jsx(ASe,{talks:h,userTalkVote:d})]})};function K2(t,e){return Math.random()*(e-t)+t}const PSe=15,OSe=({count:t=0,colors:e})=>{const n=T.useRef(null),r=T.useRef(null),i=T.useRef({circles:[]}),s=T.useCallback((o,l)=>{if(l===void 0||!o||!n.current||!r.current)return;const c=n.current.clientWidth,d=n.current.clientHeight,h=window.devicePixelRatio;r.current.style.width=`${c}px`,r.current.style.height=`${d}px`,r.current.width=c*h,r.current.height=d*h,o.scale(h,h);const m=i.current.circles,g=m.length;if(l!==g)if(l>g){const v=Array(l-g).fill(null).map(()=>({x:K2(0,c),y:K2(0,d),opacity:Math.floor(Math.random()*80)+20}));m.push(...v)}else m.length=l;o.clearRect(0,0,c,d),m.forEach((v,E)=>{let S="#"+e[0]+v.opacity.toString(16).padStart(2,"0");e.length>1&&(S="#"+e[E%e.length]+"60"),o.fillStyle=S,o.beginPath(),o.arc(v.x,v.y,PSe,0,2*Math.PI),o.fill()}),l!==g&&(i.current={circles:m})},[e]);return T.useEffect(()=>{if(r.current){const o=r.current.getContext("2d");s(o,t)}return()=>{if(r.current){const o=r.current.getContext("2d");o&&o.clearRect(0,0,r.current.width,r.current.height)}}},[t,s]),A.jsxs(A.Fragment,{children:[A.jsx(An,{ref:n,position:"absolute",width:"100%",height:"100%"}
6513),A.jsx("canvas",{ref:r,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}})]})},NSe=ii.memo(OSe),DSe=Dr(t=>({item:{padding:t.spacing(2),textAlign:"center",fontSize:"17px",borderRadius:"0",color:t.palette.text.secondary,boxShadow:"inset 0 0 0 1px "+t.palette.paperVoteBorder,height:"100px",width:"100%",boxSizing:"border-box",border:0,backgroundColor:"transparent","&:hover":{backgroundColor:bL(t.palette.background.paper,.07),cursor:"pointer"},display:"flex",alignItems:"center",justifyContent:"center",position:"relative",transition:"all 200ms ease-out"},selectedItem:{boxShadow:"inset 0 0 0 5px "+t.palette.paperVoteBorder}})),J6=({isSelected:t,chipColors:e,onClick:n,count:r,children:i,className:s})=>{const o=DSe(),l=`${o.item} ${t?o.selectedItem:""} ${s}`;return A.jsxs(Tu,{elevation:1,className:l,onClick:n,component:"button",children:[i,A.jsx(NSe,{colors:e,count:r})]})},MSe=Dr(t=>({itemContainer:{margin:-1},voteTitle:{color:t.palette.textVoteTitle,zIndex:2,textShadow:`0px 0px 6px ${t.palette.textVoteTitleShadow}`},voteResult:{position:"absolute",bottom:"5px",fontSize:"14px",transition:"all 200ms ease-in-out",zIndex:2,textShadow:`0px 0px 6px ${t.palette.textVoteTitleShadow}`}})),X6=({voteItem:t,isSelected:e,voteResult:n,onVoteChange:r,chipColors:i})=>{const s=MSe();return A.jsx(Xa,{item:!0,xs:6,sm:4,md:3,className:s.itemContainer,"aria-label":t.name,"data-testid":"VoteItem",children:A.jsxs(J6,{isSelected:e,chipColors:i,onClick:()=>r(t),count:n,displayChildren:n>0,children:[A.jsx("span",{className:s.voteTitle,children:t.name}),n>0&&A.jsxs("span",{className:s.voteResult,children:[n," ",n>1?"votes":"vote"]})]})})};X6.propTypes={voteItem:Pc.object.isRequired,isSelected:Pc.bool,voteResult:Pc.number,chipColors:Pc.array};var gh={},Q2;function LSe(){if(Q2)return gh;Q2=1;var t=ys();Object.defineProperty(gh,"__esModule",{value:!0}),gh.default=void 0;var e=t(Do()),n=to();return gh.default=(0,e.default)((0,n.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),gh}var VSe=LSe();const FSe=Pr(VSe);var yh={},Y2;function $Se(){if(Y2)return yh;Y2=1;var t=ys();Object.defineProperty(yh,"__esModule",{value:!0}),yh.default=void 0;var e=t(Do()),n=to();return yh.default=(0,e.default)((0,n.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),yh}var USe=$Se();const jSe=Pr(USe);var vh={},J2;function BSe(){if(J2)return vh;J2=1;var t=ys();Object.defineProperty(vh,"__esModule",{value:!0}),vh.default=void 0;var e=t(Do()),n=to();return vh.default=(0,e.default)((0,n.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),vh}var zSe=BSe();const WSe=Pr(zSe),qSe=Dr(t=>({container:{display:"flex",marginTop:t.spacing(2)},button:{width:"80px !important",height:"80px !important",float:"left",marginRight:t.spacing(2)},right:{flexDirection:"row",flex:1},date:{color:t.palette.textDimmed,fontSize:14,marginBottom:0},comment:{borderBottom:e=>e.isLast?"":`1px solid ${t.palette.paperBorder}`,paddingBottom:15,marginTop:10,wordBreak:"break-word",whiteSpace:"pre-wrap"}})),HSe=({vote:t,isLast:e,isSelected:n,chipColors:r,onVoteChange:i,currentUserId:s})=>{const o=qSe({isLast:e}),{t:l}=pr(),c=t.userId===s,d=t.plus===void 0?1:t.plus;return A.jsxs("li",{className:o.container,children:[A.jsxs(J6,{className:o.button,count:d??1,isSelected:n,chipColors:r,onClick:i,children:[d," ",d>1?"votes":"vote"]}),A.jsxs("div",{className:o.right,children:[A.jsxs("p",{className:o.date,children:[Ae.fromJSDate(t.updatedAt).minus({seconds:1}).toRelative(),c?", "+l("vote.yourVote"):""]}),A.jsx(Nr,{className:o.comment,color:"textPrimary",children:t.text})]})]})},GSe=(t,e,n)=>(r,i)=>{if(!$m(r,i,n))return;const s=e.id,o=i(),l=eE(o),c=On(o),d=c.id,[h]=_6(t,d,i),m={projectId:d,talkId:l,voteItemId:t.id,id:h,voteId:s,createdAt:vi(),updatedAt:vi(),voteType:Tk,userId:im(o).uid,status:tE};r({type:yk,payload:{[m.id]:{...m,pending:!0}}}),r({type:Qs,payload:{vote:{...m,id:s,text:e.text,plus:1},amount:1}}),gs.collection("projects").doc(d).collection("userVotes").doc(h).set(m,{merge:!0}).then(()=>{r({type:Zw,payload:{voteId:h}}),y6(c.name,d,t.type)}).catch(g=>{r({type:Nu,payload:{error:`Unable to save the vote, ${g}`,voteId:m.id}}),r({type:Qs,payload:{vote:{...m,id:s,text:e.text,plus:1},amount:-1}})})},KSe=(t,e)=>(n,r)=>{if(!$m(n,r,e)||!t)return;if(Fm(r())[t.id].pending){console.info("Unable to delete vote as it has not been written on the database");return}const i=On(r());n({type:_k,payload:t}),n({type:Qs,payload:{vote:{...t,id:t.voteId,text:"used only as type...",plus:1},amount:-1}}),gs.collection("projects").doc(i.id).collection("userVotes").doc(t.id).set({status:wk,updatedAt:vi()},{merge:!0}).then(()=>{n({type:vk,payload:t}),v6(i.name,i.id)}).catch(s=>{n({type:Nu,payload:{error:`Unable to save the vote, ${s}`,voteWhichShouldHaveBeenDeleted:t}}),n({type:Qs,payload:{vote:{...t,id:t.voteId,text:"used only as type...",plus:1},amount:1}})})}
6513,QSe=({result:t,chipColors:e,voteItem:n,currentUserVotes:r})=>{const i=st(im),s=Eu(),{t:o}=pr();return A.jsx("ul",{className:"comments",children:t.map((l,c)=>{const[d,h]=YSe(r,i,l);return A.jsx(HSe,{vote:l,chipColors:e,isLast:c===t.length-1,isSelected:d,currentUserId:i?i.uid:"",onVoteChange:()=>{s(d?KSe(h,o):GSe(n,l,o))}},c)})})},YSe=(t,e,n)=>{if(!t)return[!1,null];const r=t.find(i=>i.voteId===n.id);return r?[!0,r]:n.userId===e.uid?[!0,null]:[!1,null]},JSe=Dr(t=>({itemContainer:{margin:-1},item:{overflow:"hidden",padding:`${t.spacing(1)} ${t.spacing(2)}`,textAlign:"center",fontSize:"17px",borderRadius:"0",color:t.palette.text.secondary,boxShadow:"inset 0 0 0 1px "+t.palette.paperBorder,boxSizing:"border-box","&:hover":{backgroundColor:bL(t.palette.background.paper,.07)},display:"flex",alignItems:"center",justifyContent:"center",position:"relative",transition:"all 200ms ease-out"},textArea:{},leftIcon:{marginRight:t.spacing(1),fontSize:20},buttonContainer:{marginTop:10,marginBottom:30,display:"flex",justifyContent:"flex-end"},saveButton:{marginLeft:16,backgroundColor:"#3673ff"},voteHidden:{padding:10,background:Id.RED_ORANGE,color:"white",margin:"16px 0",borderRadius:6},voteHiddenIcon:{verticalAlign:"text-bottom"}})),XSe=_e(RZ)({width:"100%",height:"100%",border:"none","& .MuiInput-underline:after, & .MuiInput-underline:before":{borderBottom:"none !important"}}),ZSe=({currentUserVotes:t,onVoteChange:e,voteItem:n,voteResult:r,chipColors:i})=>{const{t:s}=pr(),o=JSe(),[l,c]=T.useState({comment:"",status:null,dataLoaded:!1});T.useEffect(()=>{if(t&&(!l.dataLoaded||!l.vote)){const g=t.find(v=>!!v.text&&v.voteType!==Tk);g&&c({dataLoaded:!0,comment:g.text,status:g.status,vote:g})}},[t,l.vote,l.dataLoaded]);const d=g=>{c({...l,comment:g.target.value})},h=()=>{c({...l,comment:"",status:null,vote:null}),l.vote&&e(n,null,l.vote)},m=t&&l.dataLoaded?"comment.update":"comment.save";return A.jsxs(Xa,{item:!0,xs:12,className:o.itemContainer,"data-testid":"VoteItem",children:[A.jsx(Nr,{variant:"h6",color:"textPrimary",component:"h3",children:n.name}),A.jsx(Tu,{elevation:1,className:o.item,children:A.jsx(XSe,{multiline:!0,fullWidth:!0,variant:"standard",placeholder:s("comment.placeholder"),onChange:d,value:l.comment})}),l.status&&l.status===Ek&&A.jsxs("div",{className:o.voteHidden,children:[A.jsx(WSe,{className:o.voteHiddenIcon}),A.jsx(RS,{i18nKey:"comment.hidden"})]}),l.comment&&A.jsxs("div",{className:o.buttonContainer,children:[A.jsxs(iu,{onClick:h,children:[A.jsx(jSe,{className:o.leftIcon}),A.jsx(RS,{i18nKey:"comment.delete",children:"Delete comment"})]}),A.jsxs(iu,{variant:"contained",color:"secondary",className:o.saveButton,onClick:()=>e(n,l.comment),children:[A.jsx(FSe,{className:o.leftIcon}),A.jsx(RS,{i18nKey:m})]})]}
6513),r&&A.jsx(QSe,{result:r,voteItem:n,chipColors:i,currentUserVotes:t})]})},eTe=({voteItem:t})=>A.jsx(Xa,{item:!0,xs:12,"data-testid":"VoteItem",children:A.jsx(Nr,{variant:"h4",color:"textPrimary",component:"h3",children:t.name})}),tTe=Dr(t=>({separator:{borderColor:t.palette.divider,marginTop:t.spacing(2),marginBottom:t.spacing(2)}})),nTe=()=>{const t=tTe();return A.jsx(Xa,{item:!0,xs:12,"data-testid":"VoteItem",children:A.jsx("hr",{className:t.separator})})},rTe=({voteItem:t,userVotes:e,voteResult:n,chipColors:r,onVoteChange:i})=>{switch(t.type){default:case m6:return A.jsx(X6,{onVoteChange:s=>{i(s,null,e&&e[0])},voteItem:t,isSelected:!!e,voteResult:n,chipColors:r});case Sk:return A.jsx(ZSe,{onVoteChange:i,voteItem:t,currentUserVotes:e,voteResult:n,chipColors:r});case D0e:return A.jsx(eTe,{voteItem:t});case M0e:return A.jsx(nTe,{})}};var _h={},X2;function iTe(){if(X2)return _h;X2=1;var t=ys();Object.defineProperty(_h,"__esModule",{value:!0}),_h.default=void 0;var e=t(Do()),n=to();return _h.default=(0,e.default)((0,n.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),_h}var sTe=iTe();const oTe=Pr(sTe),aTe=Dr(t=>({close:{padding:t.spacing(1)/2}})),Z2=({text:t,actionText:e,actionCallback:n,closeCallback:r})=>{const i=aTe();return A.jsx(fZ,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:!0,autoHideDuration:6e3,onClose:r,ContentProps:{"aria-describedby":"message-id"},message:A.jsx("span",{id:"message-id",children:t}),action:e&&[A.jsx(iu,{color:"secondary",size:"small",onClick:n,children:e},"undo"),A.jsx(DL,{"aria-label":"Close",color:"inherit",sx:{padding:1},className:i?i.close:null,onClick:r,size:"large",children:A.jsx(oTe,{})},"close")]})},lTe={LAYOUT:2};var wh={},eM;function uTe(){if(eM)return wh;eM=1;var t=ys();Object.defineProperty(wh,"__esModule",{value:!0}),wh.default=void 0;var e=t(Do()),n=to();return wh.default=(0,e.default)((0,n.jsx)("path",{d:"M3 11h8V3H3zm2-6h4v4H5zM3 21h8v-8H3zm2-6h4v4H5zm8-12v8h8V3zm6 6h-4V5h4zm0 10h2v2h-2zm-6-6h2v2h-2zm2 2h2v2h-2zm-2 2h2v2h-2zm2 2h2v2h-2zm2-2h2v2h-2zm0-4h2v2h-2zm2 2h2v2h-2z"}),"QrCode"),wh}var cTe=uTe();const dTe=Pr(cTe),fTe="modulepreload",hTe=function(t){return"/"+t},tM={},rE=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");i=c(n.map(d=>{if(d=hTe(d),d in tM)return;tM[d]=!0;const h=d.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":fTe,h||(g.as="script"),g.crossOrigin="",g.href=d,l&&g.setAttribute("nonce",l),document.head.appendChild(g),h)return new Promise((v,E)=>{g.addEventListener("load",v),g.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})},pTe=T.lazy(()=>rE(()=>import("./QRCode-D5m7MKXV.js"),[]).then(t=>({default:t.QRCode}))),mTe=({open:t,onClose:e,value:n,eventColor:r="#000000",title:i="QR Code",fileName:s="qr-code",size:o=300,logo:l})=>{const{t:c}=pr();return SV(wY,{open:t,onClose:e,"aria-labelledby":"qr-code-dialog-title",maxWidth:"sm",fullWidth:!0,children:[Wn(LY,{id:"qr-code-dialog-title",sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:i}),Wn(OY,{children:Wn(An,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:o,sx:{borderRadius:1,padding:2},children:t&&Wn(T.Suspense,{fallback:Wn(An,{display:"flex",justifyContent:"center",alignItems:"center",width:o,height:o,children:Wn(VI,{})}),children:Wn(pTe,{data:n,size:o,eventColor:r?r.startsWith("#")?r:`#${r}`:void 0,className:"qr-code-dialog-qr",showDownload:!0,downloadFileName:s,logo:l})})})}),Wn(IY,{children:Wn(iu,{onClick:e,variant:"text",color:"primary",children:c("qrCode.close")})})]})},gTe=({url:t,title:e="QR Code",tooltipTitle:n="Show QR Code",size:r="medium",fileName:i="qr-code",logo:s,eventColor:o})=>{const[l,c]=T.useState(!1),d=Or(),h=d.palette.mode==="dark"?I_(d.palette.pageBackgroun
6513d,.5):Gl(d.palette.pageBackground,.5);return SV(Ate,{children:[Wn(wZ,{title:n,children:Wn(DL,{onClick:()=>c(!0),size:r,sx:{color:h,"&:hover":{backgroundColor:d.palette.action.hover}},"aria-label":n,children:Wn(dTe,{})})}),Wn(mTe,{open:l,onClose:()=>c(!1),value:t,title:e,fileName:i,logo:s,eventColor:o})]})},yTe={weekday:"long",day:"numeric",month:"long"},vTe={weekday:"long",day:"numeric",month:"long",year:"numeric"},_Te=(t,e=!1)=>{const n=Ae.fromISO(t.startTime,{setZone:!0}).toLocaleString(e?vTe:yTe),r=Ae.fromISO(t.startTime,{setZone:!0}).setZone("local",{keepLocalTime:!0}).toLocaleString(Ae.TIME_SIMPLE),i=t.endTime?" - "+Ae.fromISO(t.endTime,{setZone:!0}).toLocaleString(Ae.TIME_SIMPLE):"";return`${n} / ${r}${i}`},wTe=({talk:t,speakers:e})=>{const n=Or(),r=st(On),i=nE().get("hideHeader"),s=st(UM);return i&&i==="true"?A.jsx(An,{height:2}):A.jsxs(An,{display:"flex",gap:2,marginBottom:4,justifyContent:"space-between",alignItems:"flex-start",children:[A.jsxs(An,{children:[A.jsxs(Nr,{variant:"h2",color:"textPrimary",sx:{wordBreak:"break-word"},children:[t.title,A.jsx(An,{color:n.palette.textDimmed,fontSize:20,marginLeft:1,component:"span",children:t.tags&&t.tags.map((o,l)=>A.jsxs("span",{children:["#",o," "]},l))})]}),A.jsx(An,{fontSize:16,color:n.palette.textDimmed,marginBottom:2,children:t.startTime&&_Te(t,s)}),A.jsx(U6,{speakers:e})]}),A.jsx(gTe,{url:document.location.href,fileName:t.title.trim()+"-qr-code-openfeedback",logo:r.logoSmall,eventColor:r.chipColors?r.chipColors[0]:void 0})]})},ETe=Xn(eE,F9,z9,g6,L9,(t,e)=>e,(t,e,n,r,i,s)=>{if(n&&!s&&(!r||Object.keys(r).length===0))if(i[0]&&i[1]){const[c]=w6(i[0],i[1]);if(c)return[]}else return[];if(!e||!e[t])return[];let o=e[t],l={};return Object.entries(o).forEach(([c,d])=>{typeof d=="object"?(l[c]=[],Object.entries(d).forEach(([,h])=>{const m=Object.keys(h);if(!h||m.length===0||m.length===1&&m[0]==="id")return;const g=h.updatedAt?.toDate?.()??h.createdAt?.toDate?.()??null,v=h.createdAt?.toDate?.()??g;g&&l[c].push({...h,updatedAt:g,createdAt:v})}),l[c]=l[c].sort((h,m)=>m.updatedAt-h.updatedAt)):l[c]=d}),l}),STe=()=>{const{talkId:t}=i_(),{t:e}=pr(),n=Eu(),r=nE().get("displayVotes"),i=t,s=st(p6),o=st(N0e),l=st(q9),c=st(I=>F0e(I,t)),d=st(I=>ETe(I,r)),h=st(O0e),m=st(L0e),g=st(V0e),v=st(B9);T.useEffect(()=>{n(ySe(i)),n(xk(i)),n(Y6());const I=n(b0e(i));return()=>{I&&I()}},[n,i]);const E=(I,P,x)=>{if(x)switch(I.type){case Sk:P&&P.length>0?n(B0e(x,P,e)):n(B2(x,e));break;default:case m6:n(B2(x,e));break}else n(j0e(s.id,I,P,e))},S=()=>{n(z2()),n(E6())},w=()=>{n(z0e())},b=()=>{n(z2())};if(h)return A.jsx(qh,{error:"Unable to load the talk/speakers/vote options",errorDetail:h});if(!s||!o||!l)return A.jsx(Dd,{});let C=null;return m&&(C=A.jsx(Z2,{text:m,closeCallback:w})),g&&(C=A.jsx(Z2,{text:"Unable to load the vote results, reason: "+m,actionText:"Retry",actionCallback:S,closeCallback:b})),A.jsxs("div",{children:[A.jsx(wTe,{talk:s,speakers:o}),A.jsx(Xa,{container:!0,spacing:lTe.LAYOUT,sx:{marginBottom:6},children:l.map((I,P)=>A.jsx(rTe,{voteItem:I,userVotes:c[I.id],voteResult:d[I.id],chipColors:v,onVoteChange:E},P))}),C]})},TTe={loading:"Loading",donate:"Donate",becomeSponsor:"Become a sponsor"},bTe={placeholder:"Your answer",delete:"Delete",update:"Update",save:"Save",hidden:"Your vote has been hidden by the event organizer. Contact them for more information"},ITe={adminNotAnonymous:"You are logged in to the admin, your vote will not be anonymous.",rangePassed:"Unable to save the vote, the vote period has passed.",rangeNotReached:"You cannot vote before the ",yourVote:"from you"},RTe="Search",xTe="No talk matched your criteria.",kTe="No talk matched your criteria on ",CTe="Talk(s) on the other day matching your search:",ATe="Avatar of",PTe="speaker",OTe="speakers",NTe={menuNoDate:"Without date",list:"Go to talks list",vote:"Vote for the talk ",date:"Display talks for the "},DTe={madeBy:"Powered by"},MTe={errorLoad:"Unable to load the event",errorLoadVotes:"Unable to load event votes"},LTe={errorLogin:"Unable to identify you as guest"},VTe={switchToLightMode:"Switch to Light Mode",switchToDarkMode:"Switch to Dark Mode",downloadPng:"Download PNG",downloadSvg:"Download SVG",close:"Close",colorSelection:"QR Code Color",colorBlack:"Black",colorWhite:"White",colorEvent:"Event Color",colorCustom:"Custom Color"},FTe={common:TTe,comment:bTe,vote:ITe,searchPlaceholder:RTe,searchNoMatchAtAll:xTe,searchNoMatch:kTe,searchExtendedMatch:CTe,speakerAvatar:ATe,speaker:PTe,speakers:OTe,talks:NTe,footer
6513:DTe,project:MTe,auth:LTe,qrCode:VTe},$Te={loading:"Chargement",donate:"Faire un don",becomeSponsor:"Devenir sponsor"},UTe={placeholder:"Votre réponse",delete:"Supprimer",update:"Mettre à jour",save:"Sauvegarder",hidden:"Votre vote a été caché par les organisateurs de l'évènement. Contactez les si vous voulez plus d'informations."},jTe={adminNotAnonymous:"Vous êtes connecté à l'admin, le vote ne sera pas anonyme.",rangePassed:"La date de fin de vote est passé, impossible de sauvegarder le vote.",rangeNotReached:"Vous ne pouvez pas voter avant le  ",yourVote:"de vous"},BTe="Recherche",zTe="Aucune présentation ne correspond à vos critères.",WTe="Aucune présentation ne correspond à vos critères le",qTe="Présentation(s) les autres jours correspondant à votre recherche:",HTe="Avatar de",GTe="orateur·rice",KTe="orateurs·rices",QTe={menuNoDate:"Sans date",list:"Afficher la liste des présentations",vote:"Voter pour la présentation ",date:"Afficher les présentations du "},YTe={madeBy:"Propulsé par"},JTe={errorLoad:"Impossible de charger l'évènement",errorLoadVotes:"Erreur lors du chargement des votes"},XTe={errorLogin:"Erreur lors de l'identification en invité"},ZTe={switchToLightMode:"Mode clair qui illumine vos yeux",switchToDarkMode:"Mode sombre qui fait mal aux yeux",downloadPng:"Télécharger en PNG",downloadSvg:"Télécharger en SVG",close:"Fermer",colorSelection:"Couleur du QR Code",colorBlack:"Noir",colorWhite:"Blanc",colorEvent:"Couleur de l'événement",colorCustom:"Couleur personnalisée"},ebe={common:$Te,comment:UTe,vote:jTe,searchPlaceholder:BTe,searchNoMatchAtAll:zTe,searchNoMatch:WTe,searchExtendedMatch:qTe,speakerAvatar:HTe,speaker:GTe,speakers:KTe,talks:QTe,footer:YTe,project:JTe,auth:XTe,qrCode:ZTe};function br(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.forEach(function(i){GI(t,i,n[i])})}return t}function qp(t,e){if(e&&(Rr(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gs(t)}function Rd(t){return Rd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rd(t)}function iE(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uv(t,e)}var tbe={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,n){console&&console[e]&&console[e].apply(console,n)}},nbe=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_s(this,t),this.init(e,n)}return Ci(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||tbe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,s){return s&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new t(this.logger,br({},{prefix:"".concat(this.prefix,":").concat(n,":")},this.options))}}]),t})(),So=new nbe,Qa=(function(){function t(){_s(this,t),this.observers={}}return Ci(t,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(s){i.observers[s]=i.observers[s]||[],i.observers[s].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];if(this.observers[n]){var o=[].concat(this.observers[n]);o.forEach(function(c){c.apply(void 0,i)})}if(this.observers["*"]){var l=[].concat(this.observers["*"]);l.forEach(function(c){c.apply(c,[n].concat(i))})}}}]),t})();function Eh(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function nM(t){return t==null?"":""+t}function rbe(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function Ck(t,e,n){function r(l){return l&&l.indexOf("###")>-1?l.replace(/###/g,"."):l}function i(){return!t||typeof t=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var o=r(s.shift());!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return i()?{}:{obj:t,k:r(s.shift())}}function rM(t,e,n){var r=Ck(t,e,Object),i=r.obj,s=r.k;i[s]=n}function ibe(t,e,n,r){var i=Ck(t,e,Object),s=i.obj,o=i.k;s[o]=s[o]||[],s[o].push(n)}function Zv(t,e){var n=Ck(t,e),r=n.obj,i=n.k;if(r)return r[i]}function iM(t,e,n){var r=Zv(t,n);return r!==void 0?r:Zv(e,n)}function Z6(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="str
6513ing"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Z6(t[r],e[r],n):t[r]=e[r]);return t}function Tc(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var sbe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function obe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return sbe[e]}):t}var sE=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,abe=(function(t){iE(e,t);function e(n){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return _s(this,e),r=qp(this,Rd(e).call(this)),sE&&Qa.call(Gs(r)),r.data=n||{},r.options=i,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r}return Ci(e,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var i=this.options.ns.indexOf(r);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(r,i,s){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=[r,i];return s&&typeof s!="string"&&(c=c.concat(s)),s&&typeof s=="string"&&(c=c.concat(l?s.split(l):s)),r.indexOf(".")>-1&&(c=r.split(".")),Zv(this.data,c)}},{key:"addResource",value:function(r,i,s,o){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var d=[r,i];s&&(d=d.concat(c?s.split(c):s)),r.indexOf(".")>-1&&(d=r.split("."),o=i,i=d[1]),this.addNamespaces(i),rM(this.data,d,o),l.silent||this.emit("added",r,i,s,o)}},{key:"addResources",value:function(r,i,s){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in s)(typeof s[l]=="string"||Object.prototype.toString.apply(s[l])==="[object Array]")&&this.addResource(r,i,l,s[l],{silent:!0});o.silent||this.emit("added",r,i,s)}},{key:"addResourceBundle",value:function(r,i,s,o,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[r,i];r.indexOf(".")>-1&&(d=r.split("."),o=s,s=i,i=d[1]),this.addNamespaces(i);var h=Zv(this.data,d)||{};o?Z6(h,s,l):h=br({},h,s),rM(this.data,d,h),c.silent||this.emit("added",r,i,s)}},{key:"removeResourceBundle",value:function(r,i){this.hasResourceBundle(r,i)&&delete this.data[r][i],this.removeNamespaces(i),this.emit("removed",r,i)}},{key:"hasResourceBundle",value:function(r,i){return this.getResource(r,i)!==void 0}},{key:"getResourceBundle",value:function(r,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?br({},{},this.getResource(r,i)):this.getResource(r,i)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"toJSON",value:function(){return this.data}}]),e})(Qa),ez={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,s){var o=this;return e.forEach(function(l){o.processors[l]&&(n=o.processors[l].process(n,r,i,s))}),n}},sM={},oM=(function(t){iE(e,t);function e(n){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _s(this,e),r=qp(this,Rd(e).call(this)),sE&&Qa.call(Gs(r)),rbe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
6513i18nFormat","utils"],n,Gs(r)),r.options=i,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=So.create("translator"),r}return Ci(e,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},s=this.resolve(r,i);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(r,i){var s=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS;if(s&&r.indexOf(s)>-1){var c=r.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:r,namespaces:l};var d=r.split(s);(s!==o||s===o&&this.options.ns.indexOf(d[0])>-1)&&(l=d.shift()),r=d.join(o)}return typeof l=="string"&&(l=[l]),{key:r,namespaces:l}}},{key:"translate",value:function(r,i,s){var o=this;if(Rr(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,c=this.extractFromKey(r[r.length-1],i),d=c.key,h=c.namespaces,m=h[h.length-1],g=i.lng||this.language,v=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(v){var E=i.nsSeparator||this.options.nsSeparator;return m+E+d}return d}var S=this.resolve(r,i),w=S&&S.res,b=S&&S.usedKey||d,C=S&&S.exactUsedKey||d,I=Object.prototype.toString.apply(w),P=["[object Number]","[object Function]","[object RegExp]"],x=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject,k=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if(N&&w&&k&&P.indexOf(I)<0&&!(typeof x=="string"&&I==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,w,i):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");if(l){var V=I==="[object Array]",L=V?[]:{},F=V?C:b;for(var K in w)if(Object.prototype.hasOwnProperty.call(w,K)){var ne="".concat(F).concat(l).concat(K);L[K]=this.translate(ne,br({},i,{joinArrays:!1,ns:h})),L[K]===ne&&(L[K]=w[K])}w=L}}else if(N&&typeof x=="string"&&I==="[object Array]")w=w.join(x),w&&(w=this.extendTranslation(w,r,i,s));else{var Q=!1,X=!1,ee=i.count!==void 0&&typeof i.count!="string",J=e.hasDefaultValue(i),Z=ee?this.pluralResolver.getSuffix(g,i.count):"",B=i["defaultValue".concat(Z)]||i.defaultValue;!this.isValidLookup(w)&&J&&(Q=!0,w=B),this.isValidLookup(w)||(X=!0,w=d);var te=J&&B!==w&&this.options.updateMissing;if(X||Q||te){if(this.logger.log(te?"updateKey":"missingKey",g,m,d,te?B:w),l){var M=this.resolve(d,br({},i,{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var G=[],ae=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ae&&ae[0])for(var pe=0;pe<ae.length;pe++)G.push(ae[pe]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(i.lng||this.language):G.push(i.lng||this.language);var ue=function(fe,Re,Se){o.options.missingKeyHandler?o.options.missingKeyHandler(fe,m,Re,te?Se:w,te,i):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(fe,m,Re,te?Se:w,te,i),o.emit("missingKey",fe,m,Re,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ee?G.forEach(function(Ee){o.pluralResolver.getSuffixes(Ee).forEach(function(fe){ue([Ee],d+fe,i["defaultValue".concat(fe)]||B)})}):ue(G,d,B))}w=this.extendTranslation(w,r,i,S,s),X&&w===d&&this.options.appendNamespaceToMissingKey&&(w="".concat(m,":").concat(d)),X&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(w))}return w}},{key:"extendTranslation",value:function(r,i,s,o,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)r=this.i18nFormat.parse(r,s,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(br({},s,{interpolation:br({},this.options.interpolation,s.interpolation)}));var d=s.interpolation&&s.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,h;if(d){var m=r.match(this.interpolator.nestingRegexp);h=m&&m.length}var g=s.replace&&typeof s.replace!="string"?s.replace:s;if(this.options.interpolation.defaultVariables&&(g=br({},this.options.interpolation.defaultVariables,g)),r=this.interpolator.interpolate(r,g,s.lng||this.language,s),d){var v=r.match(this.interpolator.nestingRegexp),E=v&&v.length;h<E&&(s.nest=!1)}s.nest!==!1&&(r=this.interpolator.nest(r,function(){for(var b=arguments.length,C=new Array(b),I=0;I<b;I++)C[I]=arguments[I];return l&&l[0]===C[0]&&!s.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(C[0]," in key: ").concat(i[0])),null):c.translate.apply(c,C.concat([i]))}
6513,s)),s.interpolation&&this.interpolator.reset()}var S=s.postProcess||this.options.postProcess,w=typeof S=="string"?[S]:S;return r!=null&&w&&w.length&&s.applyPostProcessor!==!1&&(r=ez.handle(w,r,i,this.options&&this.options.postProcessPassResolved?br({i18nResolved:o},s):s,this)),r}},{key:"resolve",value:function(r){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,l,c,d,h;return typeof r=="string"&&(r=[r]),r.forEach(function(m){if(!i.isValidLookup(o)){var g=i.extractFromKey(m,s),v=g.key;l=v;var E=g.namespaces;i.options.fallbackNS&&(E=E.concat(i.options.fallbackNS));var S=s.count!==void 0&&typeof s.count!="string",w=s.context!==void 0&&typeof s.context=="string"&&s.context!=="",b=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);E.forEach(function(C){i.isValidLookup(o)||(h=C,!sM["".concat(b[0],"-").concat(C)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(h)&&(sM["".concat(b[0],"-").concat(C)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(h,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(I){if(!i.isValidLookup(o)){d=I;var P=v,x=[P];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(x,v,I,C,s);else{var N;S&&(N=i.pluralResolver.getSuffix(I,s.count)),S&&w&&x.push(P+N),w&&x.push(P+="".concat(i.options.contextSeparator).concat(s.context)),S&&x.push(P+=N)}for(var k;k=x.pop();)i.isValidLookup(o)||(c=k,o=i.getResource(I,C,k,s))}}))})}}),{res:o,usedKey:l,exactUsedKey:c,usedLng:d,usedNS:h}}},{key:"isValidLookup",value:function(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,i,s){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,i,s,o):this.resourceStore.getResource(r,i,s,o)}}],[{key:"hasDefaultValue",value:function(r){var i="defaultValue";for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&i===s.substring(0,i.length)&&r[s]!==void 0)return!0;return!1}}]),e})(Qa);function gT(t){return t.charAt(0).toUpperCase()+t.slice(1)}var lbe=(function(){function t(e){_s(this,t),this.options=e,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=So.create("languageUtils")}return Ci(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=gT(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=gT(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=gT(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isWhitelisted",value:function(n){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(n)}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;
6513return n.forEach(function(s){if(!i){var o=r.formatLanguageCode(s);(!r.options.supportedLngs||r.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&n.forEach(function(s){if(!i){var o=r.getLanguagePartFromCode(s);if(r.isSupportedCode(o))return i=o;i=r.options.supportedLngs.find(function(l){if(l.indexOf(o)===0)return l})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,s=this.getFallbackCodes(r||this.options.fallbackLng||[],n),o=[],l=function(d){d&&(i.isSupportedCode(d)?o.push(d):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(d)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(n))):typeof n=="string"&&l(this.formatLanguageCode(n)),s.forEach(function(c){o.indexOf(c)<0&&l(i.formatLanguageCode(c))}),o}}]),t})(),ube=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],cbe={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};function dbe(){var t={};return ube.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:cbe[e.fc]}})}),t}var fbe=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_s(this,t),this.languageUtils=e,this.options=n,this.logger=So.create("pluralResolver"),this.rules=dbe()}return Ci(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=this.getRule(n);return r&&r.numbers.length>1}}
6513,{key:"getPluralFormsOfKey",value:function(n,r){return this.getSuffixes(n).map(function(i){return r+i})}},{key:"getSuffixes",value:function(n){var r=this,i=this.getRule(n);return i?i.numbers.map(function(s){return r.getSuffix(n,s)}):[]}},{key:"getSuffix",value:function(n,r){var i=this,s=this.getRule(n);if(s){var o=s.noAbs?s.plurals(r):s.plurals(Math.abs(r)),l=s.numbers[o];this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1&&(l===2?l="plural":l===1&&(l=""));var c=function(){return i.options.prepend&&l.toString()?i.options.prepend+l.toString():l.toString()};return this.options.compatibilityJSON==="v1"?l===1?"":typeof l=="number"?"_plural_".concat(l.toString()):c():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1?c():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(n)),""}}]),t})(),hbe=(function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_s(this,t),this.logger=So.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return Ci(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:obe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Tc(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Tc(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Tc(r.nestingPrefix):r.nestingPrefixEscaped||Tc("$t("),this.nestingSuffix=r.nestingSuffix?Tc(r.nestingSuffix):r.nestingSuffixEscaped||Tc(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,s){var o=this,l,c,d,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function m(w){return w.replace(/\$/g,"$$$$")}var g=function(b){if(b.indexOf(o.formatSeparator)<0){var C=iM(r,h,b);return o.alwaysFormat?o.format(C,void 0,i):C}var I=b.split(o.formatSeparator),P=I.shift().trim(),x=I.join(o.formatSeparator).trim();return o.format(iM(r,h,P),x,i,s)};this.resetRegExp();var v=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,E=s&&s.interpolation&&s.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,S=[{regex:this.regexpUnescape,safeValue:function(b){return m(b)}},{regex:this.regexp,safeValue:function(b){return o.escapeValue?m(o.escape(b)):m(b)}}];return S.forEach(function(w){for(d=0;l=w.regex.exec(n);){if(c=g(l[1].trim()),c===void 0)if(typeof v=="function"){var b=v(n,l,s);c=typeof b=="string"?b:""}else if(E){c=l[0];continue}else o.logger.warn("missed to pass in variable ".concat(l[1]," for interpolating ").concat(n)),c="";else typeof c!="string"&&!o.useRawValueToEscape&&(c=nM(c));if(n=n.replace(l[0],w.safeValue(c)),w.regex.lastIndex=0,d++,d>=o.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,l,c=br({},s);c.applyPostProcessor=!1,delete c.defaultValue;function d(v,E){var S=this.nestingOptionsSeparator;if(v.indexOf(S)<0)return v;var w=v.split(new RegExp("".concat(S,"[ ]*{"))),b="{".concat(w[1]);v=w[0],b=this.interpolate(b,c),b=b.replace(/'/g,'"');try{c=JSON.parse(b),E&&(c=br({},E,c))}catch(C){return this.logger.warn("failed parsing options string in nesting for key ".concat(v),C),"".concat(v).concat(S).concat(b)}return delete c.defaultValue,v}for(;o=this.nestingRegexp.exec(n);){var h=[],m=!1;if(o[0].includes(this.formatSeparator)&&!/{.*}/.test(o[1])){var g=o[1].split(this.formatSeparator).map(function(v){return v.trim()});o[1]=g.shift(),h=g,m=!0}if(l=r(d.call(this,o[1].trim(),c),c),l&&o[0]===n&&typeof l!="string")return l;typeof l!="string"&&(l=nM(l)),l||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(n)),l=""),m&&(l=h.reduce(function(v,E){return i.format(v,E,s.lng,s)},l.trim())),n=n.replace(o[0],l),this.regexp.lastIndex=0}return n}}]),t})();function pbe(t,e){for(var n=t.indexOf(e);n!==-1;)t.splice(n,1),n=t.indexOf(e)}var mbe=(function(t){iE(e,t);function e(n,r,i){var s,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return _s(this,e),s=qp(this,Rd(e).call(this)),sE&&Qa.call(Gs(s)),s.backend=n,s.store=r,s.services=i,s.languageUtils=i.languageUtils,s.options=o,s.logger=So.create("backendConnector"),s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(i,o.backend,o),s}return Ci(e,[{key:"queueLoad",value:function(r,i,s,o){var l=this,c=[],d=[],h=[],m=[];return r.forEach(function(g){var v=!0;
6513i.forEach(function(E){var S="".concat(g,"|").concat(E);!s.reload&&l.store.hasResourceBundle(g,E)?l.state[S]=2:l.state[S]<0||(l.state[S]===1?d.indexOf(S)<0&&d.push(S):(l.state[S]=1,v=!1,d.indexOf(S)<0&&d.push(S),c.indexOf(S)<0&&c.push(S),m.indexOf(E)<0&&m.push(E)))}),v||h.push(g)}),(c.length||d.length)&&this.queue.push({pending:d,loaded:{},errors:[],callback:o}),{toLoad:c,pending:d,toLoadLanguages:h,toLoadNamespaces:m}}},{key:"loaded",value:function(r,i,s){var o=r.split("|"),l=o[0],c=o[1];i&&this.emit("failedLoading",l,c,i),s&&this.store.addResourceBundle(l,c,s),this.state[r]=i?-1:2;var d={};this.queue.forEach(function(h){ibe(h.loaded,[l],c),pbe(h.pending,r),i&&h.errors.push(i),h.pending.length===0&&!h.done&&(Object.keys(h.loaded).forEach(function(m){d[m]||(d[m]=[]),h.loaded[m].length&&h.loaded[m].forEach(function(g){d[m].indexOf(g)<0&&d[m].push(g)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(h){return!h.done})}},{key:"read",value:function(r,i,s){var o=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,d=arguments.length>5?arguments[5]:void 0;return r.length?this.backend[s](r,i,function(h,m){if(h&&m&&l<5){setTimeout(function(){o.read.call(o,r,i,s,l+1,c*2,d)},c);return}d(h,m)}):d(null,{})}},{key:"prepareLoading",value:function(r,i){var s=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof i=="string"&&(i=[i]);var c=this.queueLoad(r,i,o,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(d){s.loadOne(d)})}},{key:"load",value:function(r,i,s){this.prepareLoading(r,i,{},s)}},{key:"reload",value:function(r,i,s){this.prepareLoading(r,i,{reload:!0},s)}},{key:"loadOne",value:function(r){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=r.split("|"),l=o[0],c=o[1];this.read(l,c,"read",void 0,void 0,function(d,h){d&&i.logger.warn("".concat(s,"loading namespace ").concat(c," for language ").concat(l," failed"),d),!d&&h&&i.logger.log("".concat(s,"loaded namespace ").concat(c," for language ").concat(l),h),i.loaded(r,d,h)})}},{key:"saveMissing",value:function(r,i,s,o,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}s==null||s===""||(this.backend&&this.backend.create&&this.backend.create(r,i,s,o,null,br({},c,{isUpdate:l})),!(!r||!r[0])&&this.store.addResource(r[0],i,s,o))}}]),e})(Qa);function gbe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if(Rr(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),Rr(e[2])==="object"||Rr(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}
6513function aM(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&(t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t.supportedLngs=t.whitelist),t.nonExplicitWhitelist&&(t.nonExplicitSupportedLngs=t.nonExplicitWhitelist),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Oy(){}var ybe=(function(t){iE(e,t);function e(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(_s(this,e),n=qp(this,Rd(e).call(this)),sE&&Qa.call(Gs(n)),n.options=aM(r),n.services={},n.logger=So,n.modules={external:[]},i&&!n.isInitialized&&!r.isClone){if(!n.options.initImmediate)return n.init(r,i),qp(n,Gs(n));setTimeout(function(){n.init(r,i)},0)}return n}return Ci(e,[{key:"init",value:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(s=i,i={}),i.whitelist&&!i.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),i.nonExplicitWhitelist&&!i.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=br({},gbe(),this.options,aM(i)),this.format=this.options.interpolation.format,s||(s=Oy);function o(E){return E?typeof E=="function"?new E:E:null}if(!this.options.isClone){this.modules.logger?So.init(o(this.modules.logger),this.options):So.init(null,this.options);var l=new lbe(this.options);this.store=new abe(this.options.resources,this.options);var c=this.services;c.logger=So,c.resourceStore=this.store,c.languageUtils=l,c.pluralResolver=new fbe(l,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c.interpolator=new hbe(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new mbe(o(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(E){for(var S=arguments.length,w=new Array(S>1?S-1:0),b=1;b<S;b++)w[b-1]=arguments[b];r.emit.apply(r,[E].concat(w))}),this.modules.languageDetector&&(c.languageDetector=o(this.modules.languageDetector),c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=o(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new oM(this.services,this.options),this.translator.on("*",function(E){for(var S=arguments.length,w=new Array(S>1?S-1:0),b=1;b<S;b++)w[b-1]=arguments[b];r.emit.apply(r,[E].concat(w))}),this.modules.external.forEach(function(E){E.init&&E.init(r)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(E){r[E]=function(){var S;return(S=r.store)[E].apply(S,arguments)}});var m=["addResource","addResources","addResourceBundle","removeResourceBundle"];m.forEach(function(E){r[E]=function(){var S;return(S=r.store)[E].apply(S,arguments),r}});var g=Eh(),v=function(){var S=function(b,C){r.isInitialized&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),g.resolve(C),s(b,C)};if(r.languages&&r.options.compatibilityAPI!=="v1"&&!r.isInitialized)return S(null,r.t.bind(r));r.changeLanguage(r.options.lng,S)};return this.options.resources||!this.options.initImmediate?v():setTimeout(v,0),g}},{key:"loadResources",value:function(r){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oy,o=s,l=typeof r=="string"?r:this.language;if(typeof r=="function"&&(o=r),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return o();var c=[],d=function(g){if(g){var v=i.services.languageUtils.toResolveHierarchy(g);v.forEach(function(E){c.indexOf(E)<0&&c.push(E)})}};if(l)d(l);else{var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.forEach(function(m){return d(m)})}
6513this.options.preload&&this.options.preload.forEach(function(m){return d(m)}),this.services.backendConnector.load(c,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(r,i,s){var o=Eh();return r||(r=this.languages),i||(i=this.options.ns),s||(s=Oy),this.services.backendConnector.reload(r,i,function(l){o.resolve(),s(l)}),o}},{key:"use",value:function(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&ez.addPostProcessor(r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"changeLanguage",value:function(r,i){var s=this;this.isLanguageChangingTo=r;var o=Eh();this.emit("languageChanging",r);var l=function(h,m){m?(s.language=m,s.languages=s.services.languageUtils.toResolveHierarchy(m),s.translator.changeLanguage(m),s.isLanguageChangingTo=void 0,s.emit("languageChanged",m),s.logger.log("languageChanged",m)):s.isLanguageChangingTo=void 0,o.resolve(function(){return s.t.apply(s,arguments)}),i&&i(h,function(){return s.t.apply(s,arguments)})},c=function(h){var m=typeof h=="string"?h:s.services.languageUtils.getBestMatchFromCodes(h);m&&(s.language||(s.language=m,s.languages=s.services.languageUtils.toResolveHierarchy(m)),s.translator.language||s.translator.changeLanguage(m),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(m)),s.loadResources(m,function(g){l(g,m)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(r),o}},{key:"getFixedT",value:function(r,i){var s=this,o=function l(c,d){var h;if(Rr(d)!=="object"){for(var m=arguments.length,g=new Array(m>2?m-2:0),v=2;v<m;v++)g[v-2]=arguments[v];h=s.options.overloadTranslationOptionHandler([c,d].concat(g))}else h=br({},d);return h.lng=h.lng||l.lng,h.lngs=h.lngs||l.lngs,h.ns=h.ns||l.ns,s.t(c,h)};return typeof r=="string"?o.lng=r:o.lngs=r,o.ns=i,o}},{key:"t",value:function(){var r;return this.translator&&(r=this.translator).translate.apply(r,arguments)}},{key:"exists",value:function(){var r;return this.translator&&(r=this.translator).exists.apply(r,arguments)}},{key:"setDefaultNamespace",value:function(r){this.options.defaultNS=r}},{key:"hasLoadedNamespace",value:function(r){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
6513if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var d=function(g,v){var E=i.services.backendConnector.state["".concat(g,"|").concat(v)];return E===-1||E===2};if(s.precheck){var h=s.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(o,r)||!this.services.backendConnector.backend||d(o,r)&&(!l||d(c,r)))}},{key:"loadNamespaces",value:function(r,i){var s=this,o=Eh();return this.options.ns?(typeof r=="string"&&(r=[r]),r.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){o.resolve(),i&&i(l)}),o):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(r,i){var s=Eh();typeof r=="string"&&(r=[r]);var o=this.options.preload||[],l=r.filter(function(c){return o.indexOf(c)<0});return l.length?(this.options.preload=o.concat(l),this.loadResources(function(c){s.resolve(),i&&i(c)}),s):(i&&i(),Promise.resolve())}},{key:"dir",value:function(r){if(r||(r=this.languages&&this.languages.length>0?this.languages[0]:this.language),!r)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return new e(r,i)}},{key:"cloneInstance",value:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oy,o=br({},this.options,i,{isClone:!0}),l=new e(o),c=["store","services","language"];return c.forEach(function(d){l[d]=r[d]}),l.services=br({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new oM(l.services,l.options),l.translator.on("*",function(d){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];l.emit.apply(l,[d].concat(m))}),l.init(o,s),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}}]),e})(Qa),vbe=new ybe,tz=[],_be=tz.forEach,wbe=tz.slice;function Ebe(t){return _be.call(wbe.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var lM=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Sbe=function(e,n,r){var i=r||{};i.path=i.path||"/";var s=encodeURIComponent(n),o="".concat(e,"=").concat(s);if(i.maxAge>0){var l=i.maxAge-0;if(Number.isNaN(l))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(l))}if(i.domain){if(!lM.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!lM.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invali
6513d");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var c=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(c){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},uM={create:function(e,n,r,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),i&&(s.domain=i),document.cookie=Sbe(e,encodeURIComponent(n),s)},read:function(e){for(var n="".concat(e,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var s=r[i];s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(n)===0)return s.substring(n.length,s.length)}return null},remove:function(e){this.create(e,"",-1)}},Tbe={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document<"u"){var r=uM.read(e.lookupCookie);r&&(n=r)}return n}
vendor: 1,471 bytes, line 6513
6513,cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document<"u"&&uM.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},bbe={name:"querystring",lookup:function(e){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),s=i.split("&"),o=0;o<s.length;o++){var l=s[o].indexOf("=");if(l>0){var c=s[o].substring(0,l);c===e.lookupQuerystring&&(n=s[o].substring(l+1))}}}return n}},Sh=null,cM=function(){if(Sh!==null)return Sh;try{Sh=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Sh=!1}return Sh},Ibe={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&cM()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&cM()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},Th=null,dM=function(){if(Th!==null)return Th;try{Th=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Th=!1}return Th},Rbe={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&dM()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(n=r)}return n}
6513,cacheUserLanguage:function(e,n){n.lookupSessionStorage&&dM()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},xbe={name:"navigator",lookup:function(e){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},kbe={name:"htmlTag",lookup:function(e){var n,r=e.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Cbe={name:"path",lookup:function(e){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof r[e.lookupFromPathIndex]!="string")return;n=r[e.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},Abe={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function Pbe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var nz=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_s(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Ci(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=Ebe(r,this.options||{},Pbe()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Tbe),this.addDetector(bbe),this.addDetector(Ibe),this.addDetector(Rbe),this.addDetector(xbe),this.addDetector(kbe),this.addDetector(Cbe),this.addDetector(Abe)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(s){if(r.detectors[s]){var o=r.detectors[s].lookup(r.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(s){i.detectors[s]&&i.detectors[s].cacheUserLanguage(n,i.options)}))}}]),t})();nz.type="languageDetector";const Obe=t=>{const e=vbe.createInstance();return e.use(nz).init({resources:t,fallbackLng:"en",debug:!1,ns:["translations"],defaultNS:"translations",interpolation:{escapeValue:!1,formatSeparator:","},react:{useSuspense:!1}}),document.documentElement.lang=e.language,e},Nbe=Obe({en:{translations:FTe},fr:{translations:ebe}}),fM=({children:t,loading:e=!1,color:n="primary",style:r={},...i})=>{const s=Or();return A.jsxs(iu,{style:r,...i,sx:{background:r.design==="text"?"none":r.customBg?r.customBg:s.palette[n].main,color:r.customText?r.customText:r.design==="text"?s.palette.text.primary:Id.WHITE,padding:r.type==="big"?"12px 32px":r.type==="small"?"3px 4px":"6px 8px",":hover":{background:r.design==="text"?I_(g8(s.palette[n].dark,1),.8):r.customBg?Gl(r.customBg,.2):s.palette[n].dark},":disabled":{color:s.palette[n].dark}},children:[t,e&&A.jsx(VI,{size:20,sx:{color:"white",marginLeft:10}})]})};class Ak extends T.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,n){o6(this.props.errorToReport(e,n.componentStack))}render(){return this.state.hasError?A.jsxs(An,{margin:4,children:[A.jsxs("h3",{children:["Something went wrong. It may be linked to an issue with Open Feedback itself or your internet connection."," "]}),A.jsx("p",{children:"An alert has been triggered and someone will hopefully f
6513ix this soon (I think it is me)"}),A.jsx("br",{}),A.jsx("pre",{children:String(this.state.error)}),A.jsx("br",{}),A.jsx(fM,{href:window.location.href,children:"Reload the page"}),A.jsx("br",{}),A.jsx("br",{}),A.jsx(fM,{style:{design:"text"},variant:"outlined",href:"https://github.com/HugoGresse/open-feedback/issues",children:"Report the issue"})]}):this.props.children}}const Dbe=()=>{const t=nE().get("forceColorScheme");let e=TL("(prefers-color-scheme: dark)");t&&(t==="light"?e=!1:t==="dark"&&(e=!0));const n=ii.useMemo(()=>P8(bI({typography:{h1:{fontSize:24,fontWeight:400},h2:{fontSize:24,fontWeight:400},h3:{fontSize:20,fontWeight:400}},palette:{primary:{main:Id.RED_ORANGE,dark:Id.DARK_RED_ORANGE,contrastText:"rgba(255,255,255, 0.87)"},secondary:{main:"#3673ff",contrastText:"rgba(255,255,255, 0.87)"},background:{default:e?"#303030":"#fafafa",paper:e?"#595959":"#EDEDED"},text:{primary:e?ir[50]:ir[900],secondary:e?"rgba(255, 255, 255, 0.7)":ir[600]},mode:e?"dark":"light",pageBackground:e?"#303030":"#fff",headerShadow:e?"#000":"#B3B3B3",paperBorder:e?ir[600]:ir[300],paperVoteBorder:e?ir[400]:ir[300],textVoteTitle:e?ir[400]:ir[900],textVoteTitleShadow:e?ir[800]:ir[50],textDimmed:e?ir[400]:ir[600]}})),[e]);return A.jsx(Ak,{errorToReport:k0e,children:A.jsx(ine,{i18n:Nbe,children:A.jsx(yL,{injectFirst:!0,children:A.jsx(N8,{theme:n,children:A.jsxs(LM,{children:[A.jsx(cs,{path:"/",element:A.jsx(mT,{children:A.jsx(G2,{})})}),A.jsx(cs,{path:"/:date",element:A.jsx(mT,{children:A.jsx(G2,{})})}),A.jsx(cs,{path:"/:date/:talkId",element:A.jsx(mT,{children:A.jsx(STe,{})})})]})})})})})},Mbe=T.lazy(()=>rE(()=>import("./AdminApp-B8vFZvJm.js").then(t=>t.A),__vite__mapDeps([0,1,2,3,4]))),hM=()=>A.jsx(Ak,{errorToReport:x0e,children:A.jsx(T.Suspense,{fallback:A.jsx(Dd,{}),children:A.jsx(Mbe,{})})}),Lbe=T.lazy(()=>rE(()=>import("./Root-CxMUGQFv.js"),__vite__mapDeps([5,4,1]))),Vbe=()=>A.jsx(Ak,{errorToReport:C0e,children:A.jsx(T.Suspense,{fallback:A.jsx(Dd,{}),children:A.jsx(Lbe,{})})}),Fbe=T.lazy(()=>rE(()=>import("./SuperAdminApp-D0cKHoNh.js"),__vite__mapDeps([6,2,1,3]))),$be=()=>Wn(T.Suspense,{fallback:Wn(Dd,{}),children:Wn(Fbe,{})}),Ube=()=>A.jsx(v9,{children:A.jsxs(LM,{children:[A.jsx(cs,{exact:!0,path:"/",element:A.jsx(Vbe,{})}),A.jsx(cs,{strict:!0,exact:!0,path:"/admin",render:()=>A.jsx(u9,{to:"/admin/"})}),A.jsx(cs,{path:"/admin/",element:A.jsx(hM,{})}),A.jsx(cs,{path:"/admin//*",element:A.jsx(hM,{})}),A.jsx(cs,{path:"/superadmin/",element:A.jsx($be,{})}),A.jsx(cs,{path:"/:projectId//*",element:A.jsx(Dbe,{})}),A.jsx(cs,{component:b9,status:404})]})});function sr(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var jbe=typeof Symbol=="function"&&Symbol.observable||"@@observable",pM=jbe,yT=()=>Math.random().toString(36).substring(7).split("").join("."),Bbe={INIT:`@@redux/INIT${yT()}`,REPLACE:`@@redux/REPLACE${yT()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yT()}`},e_=Bbe;function zbe(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function rz(t,e,n){if(typeof t!="function")throw new Error(sr(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(sr(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(sr(1));return n(rz)(t,e)}let r=t,i=e,s=new Map,o=s,l=0,c=!1;
6513function d(){o===s&&(o=new Map,s.forEach((w,b)=>{o.set(b,w)}))}function h(){if(c)throw new Error(sr(3));return i}function m(w){if(typeof w!="function")throw new Error(sr(4));if(c)throw new Error(sr(5));let b=!0;d();const C=l++;return o.set(C,w),function(){if(b){if(c)throw new Error(sr(6));b=!1,d(),o.delete(C),s=null}}}function g(w){if(!zbe(w))throw new Error(sr(7));if(typeof w.type>"u")throw new Error(sr(8));if(typeof w.type!="string")throw new Error(sr(17));if(c)throw new Error(sr(9));try{c=!0,i=r(i,w)}finally{c=!1}return(s=o).forEach(C=>{C()}),w}function v(w){if(typeof w!="function")throw new Error(sr(10));r=w,g({type:e_.REPLACE})}function E(){const w=m;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(sr(11));function C(){const P=b;P.next&&P.next(h())}return C(),{unsubscribe:w(C)}},[pM](){return this}}}return g({type:e_.INIT}),{dispatch:g,subscribe:m,getState:h,replaceReducer:v,[pM]:E}}function Wbe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:e_.INIT})>"u")throw new Error(sr(12));if(typeof n(void 0,{type:e_.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(sr(13))})}function iz(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const o=e[s];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let i;try{Wbe(n)}catch(s){i=s}return function(o={},l){if(i)throw i;let c=!1;const d={};for(let h=0;h<r.length;h++){const m=r[h],g=n[m],v=o[m],E=g(v,l);if(typeof E>"u")throw l&&l.type,new Error(sr(14));d[m]=E,c=c||E!==v}return c=c||r.length!==Object.keys(o).length,c?d:o}}function sz(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function qbe(...t){return e=>(n,r)=>{const i=e(n,r);let s=()=>{throw new Error(sr(15))};const o={getState:i.getState,dispatch:(c,...d)=>s(c,...d)},l=t.map(c=>c(o));return s=sz(...l)(i.dispatch),{...i,dispatch:s}}}const Hbe={list:{},filter:null,errorTalksLoad:null,loading:!1,loaded:!1},Gbe=(t=Hbe,{payload:e,type:n})=>{switch(n){case L6:return{...t,list:{...t.list,...e}};case T6:return{...t,loading:!0};case S6:return{...t,list:e,loading:!1,loaded:!0};case Ik:return{...t,filter:e};case I6:case x6:return{...t,list:{...t.list,[e.id]:e}};case C6:{const{[e.id]:r,...i}=t.list;return{...t,list:i}}case R6:case k6:case A6:return console.error(n,e),t;case b6:return console.error(n,e),{...t,errorTalksLoad:e};default:return t}},Kbe={selected:null,errorTalkLoad:null},Qbe=(t=Kbe,{payload:e,type:n})=>{switch(n){case F6:return{...t,selected:e};case V6:return{...t,errorTalkLoad:e,loading:!1};default:return t}},Ybe="admin/projects/get/success",Jbe="admin/projects/get/error",Xbe="admin/project/get/success",Zbe="admin/project/get/error",Um="admin/project/select",eIe="admin/project/edit/success",_xe="admin/project/edit/error",wxe="admin/project/add/success",tIe="admin/project/add/ongoing",nIe="admin/project/add/error",rIe="admin/project/projectApi/init",mM={list:{},filter:"",selected:null},iIe=(t=mM,{payload:e,type:n})=>{switch(n){case RSe:return{...t,list:{...t.list,...e}};case j6:return{...t,list:e};case z6:return{...t,filter:e};case Um:return mM;case W6:case H6:return{...t,list:{...t.list,[e.id]:e}};case K6:{const{[e.id]:r,...i}=t.list;return{...t,list:i}}case q6:case G6:case Q6:case xSe:case B6:return console.warn(e),t;default:return t}},sIe={project:{id:null,contact:null,favicon:null,firebaseConfig:null,logoSmall:null,name:null,voteItems:null,chipColors:[]},talkVotes:null,selectedDate:"",projectLoadError:null,projectVotesError:null},oIe=(t=sIe,{payload:e,type:n})=>{switch(n){case NF:return{...t,project:{...e}};case DF:return{...t,talkVotes:{...t.talkVotes,[e.id]:e}};case Zw:return{...t};case Qs:{const r=e.vote;let i=null;try{i=t.talkVotes[r.talkId][r.voteItemId]}catch{i=null}let s;return r.text?e.amount===-1?r.plus?s={...i,[r.id]:{...i[r.id],plus:i[r.id].plus-1,updatedAt:Py()}}:(s={...i},delete s[r.id]):r.plus?s={...i,[r.id]:{...i[r.id],plus:(i[r.id].plus||1)+1,updatedAt:Py()}}:s={...i,[r.id]:{...r,plus:1,text:r.text,updatedAt:Py(),createdAt:Py()}}:(i==null&&(i=0),s=i+e.amount),!t.talkVotes||!t.talkVotes[r.talkId]?{...t,talkVotes:{...t.talkVotes,[r.talkId]:{[r.voteItemId]:s}}}:{...t,talkVotes:{...t.talkVotes,[r.talkId]:{...t.talkVotes[r.talkId],[r.voteItemId]:s}}}}case MF:return console.error(e),{...t,projectVotesError:e};case vie:return{...t,projectLoadNotFound:!0};case ZT:return console.error(e),{...t,projectLoadError:e};case LF:return{...t,selectedDate:e.date};default:return t}},aIe={user:null,isLogin:!1,error:null},lIe=(t=aIe,{payload:e,type:n})=>{switch(n){case iI:return{...t,isLogin:!0,user:e};case s6:return{...t,isLogin:!1,user:null};case i6:return console.error(e),{...t,error:e};default:return t}},uIe={currentUserVotes:{},errorVotePost:null,errorVotesLoad:null},cIe=(t=uIe,{payload:e,type:n})=>{switch(n){case a6:return{...t,currentUserVotes:e};case yk:return{...t,currentUserVotes:{...t.currentUserVotes,...e}};case Zw:{const r={...t.currentUserVotes,[e.voteId]:{...t.currentUserVotes[e.voteId],pending:!1}};return{...t,currentUserVotes:r}}case Nu:{const r={...t.currentUserVotes};return delete r[e.voteId],console.error(e.error),{...t,currentUserVotes:r,errorVotePost:e.error.toString()}}case _k:{const r={...t.currentUserVotes,[e.id]:{...t.currentUserVotes[e.id],status:wk,pending:!0}};return{...t,currentUserVotes:r}}case vk:{const r={...t.currentUserVotes,[e.id]:{...t.currentUserVotes[e.id],pending:!1}};return{...t,...t,currentUserVotes:r}}case l6:return console.error(e),{...t,errorVotesLoad:e.toString()};case u6:return{...t,errorVotePost:null};case c6:return{...t,errorVotesLoad:null};case d6:return{...t,currentUserVotes:{...t.currentUserVotes,...e.vote}};case f6:return{...t,errorVotePost:e.error.toString()};default:return t}},dIe="admin/login/success",fIe="admin/login/error",nf="admin/logout",hIe={user:null,isLogin:!1,error:null},pIe=(t=hIe,{payload:e,type:n})=>{switch(n){case dIe:return{...t,isLogin:!0,user:e,error:null};case nf:return{...t,isLogin:!1,user:null,error:null};case fIe:return console.error(e),{...t,error:e};default:return t}},mIe="admin/voteItems/get/success",gIe="admin/voteItems/edit",yIe="admin/voteItems/reorder",vIe="admin/voteItems/delete",_Ie="admin/voteItems/deleteAll",wIe="admin/voteItems/add",EIe="admin/voteItems/save/ongoing",oz="admin/voteItems/save/success",SIe="admin/voteItems/save/error",TIe="admin/voteItems/save/confirm",gM={data:{projects:[]},projectApiInit:!1,projectsLoaded:!1,projectLoadError:null,projectVotesError:null,selectedProjectId:null},bIe=(t=gM,{payload:e,type:n})=>{switch(n){case nf:return gM;case tIe:return{...t,projectsLoaded:!1};case nIe:return{...t,projectsLoaded:!0};case Ybe:{const r=e.reduce((i,s)=>{const o=i.findIndex(l=>l.id===s.id);return o>-1?i[o]=s:i.push(s),i},[...t.data.projects]);return{...t,data:{projects:r},projectsLoaded:!0}}case Xbe:{const r=Array.from(t.data.projects).filter(i=>i.id!==e.id);return r.push(e),{...t,data:{...t.data,projects:r,projectsLoaded:!0}}}case Um:return{...t,selectedProjectId:e};case eIe:{const r=t.data.projects.map(i=>i.id===t.selectedProjectId?{...i,...e}:i);return{...t,data:{...t.data,projects:r}}}case rIe:return{...t,projectApiInit:!0};case oz:return{...t,data:{...t.data,projects:t.data.projects.map(r=>r.id===t.selectedProjectId?{...r,voteItems:e}:r)}};case Jbe:return console.error(e),{...t,projectLoadError:e};case Zbe:return console.error(e),{...t,projectLoadError:e,projectsLoaded:!0};default:return t}},IIe={notifications:[],current:null,isOpen:!1},RIe=(t=IIe,{payload:e,type:n})=>{switch(n){case P6:return{...t,notifications:t.notifications.concat([e])};case N6:return{...t,isOpen:e};case O6:return{...t,current:e,notifications:t.notifications.filter(r=>
6513r.key!==e.key)};default:return t}},xIe="admin/dashboard/getTalkVotes/success",Exe="admin/dashboard/getTalkVotes/error",kIe="admin/dashboard/clearTalkVotes",CIe="admin/dashboard/getUserVotes/success",Sxe="admin/dashboard/getUserVotes/error",yM={data:{talkVotes:[],userVotes:[]},talkVotesLoaded:!1,talkVotesError:null,userVotesLoaded:!1},AIe=(t=yM,{payload:e,type:n})=>{switch(n){case xIe:return{...t,data:{...t.data,talkVotes:e},talkVotesLoaded:!0};case CIe:return{...t,data:{...t.data,userVotes:e},userVotesLoaded:!0};case nf:case kIe:return yM;default:return t}},vM={voteItems:[],ongoingSave:!1,shouldConfirmSave:!1},PIe=(t=vM,{payload:e,type:n})=>{switch(n){case Um:return vM;case mIe:return{...t,voteItems:e||[]};case gIe:{let r=t.shouldConfirmSave;const i=t.voteItems.map(s=>s.id===e.id?e:s.id===e.oldId?(r=!0,e):s);return{...t,voteItems:i,shouldConfirmSave:r}}case yIe:{const{activeId:r,overId:i}=e,s=[...t.voteItems],o=s.findIndex(c=>c.id===r),l=s.findIndex(c=>c.id===i);if(o!==-1&&l!==-1&&o!==l){const[c]=s.splice(o,1);s.splice(l,0,c);const d=s.map((h,m)=>({...h,position:m}));return{...t,voteItems:d}}return t}case vIe:{const r=t.voteItems.findIndex(s=>s.id===e.id),i=[...t.voteItems.slice(0,r),...t.voteItems.slice(r+1)];return{...t,voteItems:i,shouldConfirmSave:t.shouldConfirmSave?!0:!e.local}}case _Ie:return{...t,voteItems:[]};case wIe:return{...t,voteItems:[...t.voteItems,e]};case TIe:return{...t,shouldConfirmSave:!1};case oz:return{...t,ongoingSave:!1,voteItems:e};case SIe:return{...t,ongoingSave:!1};case EIe:return{...t,ongoingSave:!0};default:return t}},OIe="admin/users/get/success",NIe="admin/users/filter/set",DIe="admin/users/invite/get/success",MIe="admin/users/invite/add",LIe="admin/users/invite/remove/success",VIe="admin/users/invites/get/success",FIe="admin/organizations/get/success",$Ie="admin/organizations/get/error",az="admin/organization/select",UIe="admin/organization/get/success",vT={usersData:{},invite:{},pendingInvites:[],filter:""},jIe=(t=vT,{payload:e,type:n})=>{switch(n){case OIe:return{...t,usersData:{...t.usersData,[e.uid]:e}};case NIe:return{...t,filter:e};case DIe:return{...t,invite:e};case VIe:return{...t,pendingInvites:e};case MIe:return{...t,pendingInvites:[...t.pendingInvites,e]};case LIe:return{...t,pendingInvites:t.pendingInvites.filter(r=>r.id!==e)};case az:case Um:return{...vT,usersData:t.usersData};case nf:return{...vT};default:return t}},BIe="admin/moderation/getTextVotes/success",Txe="admin/moderation/getTextVotes/error",zIe="admin/moderation/hideVoteSuccess",WIe="admin/moderation/unhideVoteSuccess",_M={data:{textVotes:{}},textVotesLoaded:!1,textVotesError:null},qIe=(t=_M,{payload:e,type:n})=>{switch(n){case BIe:return{...t,data:{...t.data,textVotes:{...t.data.textVotes,...e}},textVotesLoaded:!0};case zIe:return{...t,data:{...t.data,textVotes:{...t.data.textVotes,[e.talkId]:t.data.textVotes[e.talkId].map(r=>r.voteId===e.voteId?{...r,status:Ek}:r)}}};case WIe:return{...t,data:{...t.data,textVotes:{...t.data.textVotes,[e.talkId]:t.data.textVotes[e.talkId].map(r=>r.voteId===e.voteId?{...r,status:tE}:r)}}};case nf:case Um:return _M;default:return t}},wM={data:{organizations:[]},organizationsLoaded:!1,organizationsLoadError:null,selectedOrganizationId:null},HIe=(t=wM,{payload:e,type:n})=>{switch(n){case nf:return wM;case az:return{...t,selectedOrganizationId:e};case FIe:return{...t,data:{organizations:e},organizationsLoaded:!0};case $Ie:return{...t,organizationsLoadError:e};case UIe:{let r=[];return t.data.organizations.length>0?r=t.data.organizations.map(i=>i.id===e.id?{...e}:i):r.push(e),{...t,data:{...t.data,organizations:r}}}default:return t}},GIe=iz({adminAuth:pIe,adminProject:bIe,adminNotifications:RIe,adminDashboard:AIe,adminVotingForm:PIe,adminUsers:jIe,adminModeration:qIe,adminOrganization:HIe}),KIe=iz({talks:Gbe,talk:Qbe,speakers:iIe,project:oIe,auth:lIe,votes:cIe,admin:GIe});function QIe(t){return({dispatch:n,getState:r})=>i=>s=>typeof s=="function"?s(n,r,t):i(s)}var YIe=QIe();const JIe=()=>{const t=[YIe],e=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||sz;return rz(KIe,e(qbe(...t)))},XIe=JIe(),ZIe=document.getElementById("root"),eRe=iW.createRoot(ZIe);
6513eRe.render(A.jsx(ii.StrictMode,{children:A.jsx(_W,{store:XIe,children:A.jsx(Ube,{})})}));export{tRe as $,kL as A,NL as B,bu as C,Od as D,Gi as E,Ny as F,fv as G,zr as H,II as I,UX as J,TT as K,ZJ as L,YL as M,op as N,Kp as O,Pc as P,D8 as Q,La as R,Ui as S,ro as T,$n as U,Dr as V,oRe as W,fte as X,Obe as Y,G0e as Z,O as _,ve as a,wxe as a$,Vh as a0,nf as a1,fIe as a2,dIe as a3,gs as a4,A0e as a5,cxe as a6,uxe as a7,vi as a8,r_ as a9,pp as aA,VI as aB,Ae as aC,uRe as aD,h0e as aE,iu as aF,p0e as aG,Xn as aH,mIe as aI,vIe as aJ,TIe as aK,M0e as aL,EIe as aM,tf as aN,oz as aO,SIe as aP,yIe as aQ,lRe as aR,wIe as aS,gIe as aT,_Ie as aU,m6 as aV,Sk as aW,eo as aX,UIe as aY,$Ie as aZ,tIe as a_,Eu as aa,st as ab,An as ac,Id as ad,nxe as ae,Dd as af,rxe as ag,ys as ah,Do as ai,to as aj,Pr as ak,Xa as al,VQ as am,DL as an,oTe as ao,D_ as ap,qY as aq,qJ as ar,RS as as,pr as at,TX as au,fM as av,a8 as aw,v0e as ax,g0e as ay,y0e as az,Ie as b,gRe as b$,nIe as b0,E0e as b1,rIe as b2,az as b3,Um as b4,kIe as b5,Xbe as b6,Zbe as b7,AJ as b8,wY as b9,On as bA,J0e as bB,Y6 as bC,S0e as bD,I_ as bE,Gl as bF,g8 as bG,Wn as bH,wZ as bI,oSe as bJ,jSe as bK,UJ as bL,GL as bM,Kt as bN,lxe as bO,oX as bP,YY as bQ,RZ as bR,CI as bS,E_ as bT,MK as bU,HL as bV,iX as bW,uS as bX,sR as bY,fie as bZ,PF as b_,LY as ba,OY as bb,DIe as bc,o_ as bd,Ybe as be,Jbe as bf,FIe as bg,IY as bh,nE as bi,dxe as bj,Q0e as bk,fZ as bl,aZ as bm,Y0e as bn,D6 as bo,uc as bp,xIe as bq,Exe as br,CIe as bs,Sxe as bt,cm as bu,hRe as bv,z_ as bw,tE as bx,IM as by,TL as bz,Ve as c,w_ as c$,mRe as c0,X0e as c1,hxe as c2,fxe as c3,gxe as c4,pxe as c5,io as c6,fRe as c7,die as c8,mxe as c9,WIe as cA,zIe as cB,pRe as cC,NIe as cD,OIe as cE,VIe as cF,LIe as cG,sxe as cH,oxe as cI,WSe as cJ,Py as cK,MIe as cL,eV as cM,i_ as cN,LM as cO,cs as cP,u9 as cQ,FSe as cR,nRe as cS,KL as cT,rRe as cU,I9 as cV,ine as cW,P8 as cX,AT as cY,dRe as cZ,axe as c_,yxe as ca,vxe as cb,D0e as cc,SV as cd,sV as ce,Ate as cf,iRe as cg,eIe as ch,_xe as ci,ixe as cj,f0e as ck,wW as cl,rE as cm,rSe as cn,Hp as co,lne as cp,yL as cq,N8 as cr,bI as cs,Ya as ct,dTe as cu,mTe as cv,cRe as cw,Ek as cx,BIe as cy,Txe as cz,rt as d,Pd as d0,R8 as d1,Tl as d2,lq as d3,cq as d4,kK as d5,nu as d6,b_ as d7,CL as d8,w0e as d9,lG as da,_L as db,va as dc,Zp as dd,S_ as de,Ki as df,u_ as dg,JM as dh,kr as di,sRe as dj,Jp as dk,ov as dl,xQ as dm,bl as dn,od as dp,la as dq,Qf as dr,zRe as ds,fy as dt,GQ as du,KQ as dv,$I as dw,gI as e,R_ as f,it as g,M8 as h,ii as i,A as j,Ze as k,ot as l,VG as m,Or as n,Fl as o,wn as p,dv as q,T as r,_e as s,Tu as t,fG as u,Nr as v,vs as w,lI as x,Ma as y,AL as z};

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